Event description text prediction method, device, equipment and storage medium

By extracting key information from the event description text and using relationship trees and databases for noun replacement processing, the problem of inaccurate causal relationship prediction in the existing technology is solved, and the rationality and referability of the event description text are improved.

CN114416912BActive Publication Date: 2024-10-29PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210082422.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-24
Publication Date
2024-10-29
Estimated Expiration
2042-01-24

AI Technical Summary

Technical Problem

Existing probabilistic statistical methods based on word co-occurrence relationships have inaccurate prediction results when dealing with events with implicit causal relationships, resulting in low rationality and referenceability of event description texts.

Method used

By extracting key verbs and nouns from the event description text, the event relationship tree and the noun relationship database are used to determine the node matching degree and correlation degree, and the noun replacement process is performed to generate the target description text to retain the causal relationship between events.

Benefits of technology

The rationality and referenceability of the event description text is improved to ensure that the prediction results are more consistent with the actual situation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416912B_ABST
    Figure CN114416912B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and computer-readable storage medium for predicting a description text of an event, the method comprising: obtaining an event description text of a target event from a source terminal; semantically parsing the event description text to obtain key verbs and key nouns; determining the first node matching degree of the key verbs and the nodes in the event relationship tree based on the event relationship tree; determining the target node in the event relationship tree according to the first node matching degree, obtaining the target first text and the target second text; determining the first degree of association between the noun in the target first text and the noun in the target second text; determining the target noun corresponding to the key noun according to the first degree of association and the key noun; performing noun replacement processing on the target second text according to the target noun, obtaining the target description text, and sending it to the target terminal. The present application also relates to blockchain technology, and the target description text can be stored in the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of text prediction, and in particular to a method, device, equipment and computer-readable storage medium for predicting event description text. Background Art

[0002] With the frequent occurrence of emergencies in recent years, the whole society has paid more and more attention to emergencies. Without adequate preparation, emergencies often catch people off guard. If life safety is involved, time is life. Therefore, only by responding quickly and accurately can life safety be protected. The relevant experience accumulated in the handling of more and more emergencies can be used as preparatory measures for dealing with future emergencies, and the development of events can provide great help for emergency prediction.

[0003] Most of the current work uses probabilistic statistics based on word co-occurrence relationships to describe the logical laws and behavior patterns between events. For example, given the context of an event and several candidate subsequent events, the only correct subsequent event is selected from these subsequent events. However, this event prediction method is not suitable for situations where there is an implicit causal relationship between some events, such as event pairs where "causal" related words do not appear in the text. For situations where there is an implicit relationship, the causal relationship between events is not reasonably applied. Instead, the co-occurrence probability between events is used to judge the possibility of the result event and the cause event appearing in the same context. In this way, the predicted event may not be consistent with the objective facts of the cause event, resulting in unreasonable and low reference value of the predicted event description text. Summary of the invention

[0004] The main purpose of the present application is to provide a method, device, equipment and computer-readable storage medium for predicting event description text, aiming to improve the rationality and accuracy of the predicted event description text.

[0005] In a first aspect, the present application provides a method for predicting a description text of an event, the method comprising the following steps:

[0006] Get the event description text of the target event from the source terminal;

[0007] Performing semantic analysis on the event description text to obtain key verbs and key nouns;

[0008] Based on the event relationship tree, determining the first node matching degree between the key verb and a node in the event relationship tree, wherein the node is used to indicate a first text and a second text corresponding to the first text, the first text is a cause event description text, and the second text is a result event description text;

[0009] According to the first node matching degree, determining a target node in the event relationship tree, and obtaining a target first text and a target second text indicated by the target node;

[0010] Determining a first correlation degree between a noun in the target first text and a noun in the target second text based on a preset noun relationship database;

[0011] Based on a preset semantic network, determining a target noun corresponding to the key noun according to the first association degree and the key noun, wherein a second association degree between the target noun and the key noun is greater than or equal to the first association degree;

[0012] The target second text is subjected to noun replacement processing according to the target noun to obtain a target description text, and the target description text is sent to the target terminal.

[0013] In a second aspect, the present application further provides a device for predicting a description text of an event, the device comprising:

[0014] A text acquisition module, used to acquire the event description text of the target event from the source terminal;

[0015] A semantic analysis module, used for performing semantic analysis on the event description text to obtain key verbs and key nouns;

[0016] A first node matching degree determination module, configured to determine, based on an event relationship tree, a first node matching degree between the key verb and a node in the event relationship tree, wherein the node is used to indicate a first text and a second text corresponding to the first text, the first text being a cause event description text, and the second text being a result event description text;

[0017] A target node determination module, used to determine a target node in the event relationship tree according to the first node matching degree, and obtain a target first text and a target second text indicated by the target node;

[0018] A first correlation degree determination module, configured to determine a first correlation degree between a noun in the target first text and a noun in the target second text based on a preset noun relationship database;

[0019] a target noun determination module, configured to determine a target noun corresponding to the key noun based on a preset semantic network and according to the first association degree and the key noun, wherein a second association degree between the target noun and the key noun is greater than or equal to the first association degree;

[0020] The target description text determination module is used to perform noun replacement processing on the target second text according to the target noun to obtain the target description text, and send the target description text to the target terminal.

[0021] In a third aspect, the present application further provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the event description text prediction method as described above are implemented.

[0022] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the event description text prediction method as described above are implemented.

[0023] The present application provides a method, device, equipment and computer-readable storage medium for predicting a description text of an event, the method comprising obtaining an event description text of a target event from a source terminal; performing semantic analysis on the event description text to obtain key verbs and key nouns; determining a first node matching degree between the key verb and a node in the event relationship tree based on an event relationship tree, wherein the node is used to indicate a first text and a second text corresponding to the first text, the first text is a cause event description text, and the second text is a result event description text; determining a target node in the event relationship tree according to the first node matching degree, and obtaining a target first text and a target second text indicated by the target node; determining a first degree of association between a noun in the target first text and a noun in the target second text based on a preset noun relationship database; determining a target noun corresponding to the key noun based on a preset semantic network according to the first degree of association and the key noun, wherein a second degree of association between the target noun and the key noun is greater than or equal to the first degree of association; performing noun replacement processing on the target second text according to the target noun to obtain a target description text, and sending the target description text to a target terminal. The present application determines the target node associated with the target event in the event relationship tree, and determines the association relationship between nouns in the cause description text and result description text contained in the target node, so as to retain the relationship between events when predicting the target event, thereby improving the rationality and reference value of the predicted event description text. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0025] Figure 1 A schematic diagram of a flow chart of a method for predicting a description text of an event provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of a scenario for implementing the method for predicting event description text provided by the present application;

[0027] Figure 3 A schematic diagram of another scenario for implementing the event description text prediction method provided by the present application;

[0028] Figure 4 A schematic block diagram of a device for predicting event description text provided in an embodiment of the present application;

[0029] Figure 5 The present invention is a block diagram showing the structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0032] The embodiment of the present application provides a method, device, computer equipment and computer-readable storage medium for predicting the description text of an event. Among them, the description text prediction method of the event can be applied to a terminal device, which can be an electronic device such as a tablet computer, a laptop computer, a desktop computer, etc. It can also be applied to a server, which can be a separate server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0033] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0034] Please refer to Figure 1 , Figure 1 A flowchart of a method for predicting event description text provided in an embodiment of the present application.

[0035] like Figure 1 As shown, the event description text prediction method includes steps S101 to S107.

[0036] Step S101: Acquire the event description text of the target event from the source terminal.

[0037] For example, Figure 2 As shown, in the terminal, a description text of the target event can be generated in response to the user's input operation, so that the server or the terminal performing text prediction can obtain the description text of the target event from the source terminal. After the server or the terminal performing text prediction predicts the target description text, the target description text is sent to the target terminal.

[0038] Exemplarily, the target event may be a disaster event or a cause event that may lead to another event, and the description text may be used to describe the event. It is understandable that the description text may include multiple texts. It is understandable that the description text of the target event includes but is not limited to Chinese or English.

[0039] Exemplarily, the description text of the target event can be obtained by voice conversion. Specifically, the description voice used by the user to describe the target event is obtained, and the description voice is converted into text through a trained text conversion model, thereby obtaining the description text of the target event. It can be understood that the voice can be converted into text in the source terminal so that the server or the terminal performing text prediction can obtain the description text of the target event from the source terminal.

[0040] It is understandable that the words in the description text of the target event include multiple parts of speech, such as nouns, verbs, and prepositions. Specifically, the description text of the target event may be, for example, an earthquake occurred in country A. In the description text of the target event, country A is a noun and the occurrence of an earthquake is a verb. And it is possible to predict the disaster event or other events affected by the earthquake by predicting the description text of the target event "an earthquake occurred in country A". It is understandable that the description text of the target event is only for illustration and does not limit the description text of the target event.

[0041] Step S102: semantically analyze the event description text to obtain key verbs and key nouns.

[0042] Exemplarily, the event description text may be input into a semantic parsing model so that the semantic parsing model performs semantic parsing on the description text of the target event to obtain multiple keywords, and then determines the part of speech of each keyword to obtain key verbs and key nouns.

[0043] For example, in the semantic parsing model, the description text of the target event is segmented by the word segmentation sub-model of the semantic parsing model to obtain at least two keywords; and the part of speech of each keyword is determined by the part of speech determination sub-model of the semantic parsing model to obtain key verbs and key nouns.

[0044] Exemplarily, in the part-of-speech determination sub-model, the part-of-speech of each keyword can be determined by a preset grammar template. Specifically, the preset grammar template can include the contextual relationship between each word, so that the part-of-speech of each keyword can be determined when matching the preset grammar template with keywords with word order.

[0045] Exemplarily, the preset grammar template may be a grammar template focusing on verbs. Specifically, verbs may be identified through the VevbNet (verb network) vocabulary, and different verbs correspond to different preset grammar templates. It is understandable that after the VevbNet (verb network) vocabulary recognizes the verbs in the description text, the corresponding preset grammar template is used to identify the parts of speech corresponding to the remaining keywords in the description text. For example, in a certain verb grammar template, the part of speech of the word before the verb is a noun, and the part of speech of the word after the verb is an adverb of degree. It can be determined that in the sentence matching the verb grammar template, the word before the key verb is a key noun, and the word after the key verb is an adverb of degree.

[0046] By matching the description text of the target event with the verb grammatical template, the accuracy of identifying key verbs and key nouns can be improved.

[0047] Step S103: Based on the event relationship tree, determine the first node matching degree between the key verb and the node in the event relationship tree, wherein the node is used to indicate a first text and a second text corresponding to the first text, the first text is a cause event description text, and the second text is a result event description text.

[0048] Exemplarily, the event relationship tree can be a tree structure. It can be understood that the event relationship tree includes a root node and multiple child nodes of the root node, wherein the child nodes of the multiple root nodes have the same hierarchical relationship, and each node can be used to indicate a description text of a causal event pair. The description text of the causal event pair includes a first text for describing the cause event and a second text for describing the result event corresponding to the cause event. For example, the first text is: an earthquake occurred in country B, and the second text is: region C (the capital of country B) was affected by the disaster.

[0049] Exemplarily, the key verb may be matched with the verb in the first text indicated by the node in the event relationship tree to obtain the first node matching degree between the key verb and the node of the event relationship tree. And the first text matching the target event description text is determined in the event relationship tree through the first node matching degree.

[0050] For example, the first text in the node with the highest first node matching degree is determined as the first text matching the description text of the target event.

[0051] In some embodiments, based on the event relationship tree, determining the first matching degree between the key verb and the nodes in the event relationship tree includes: obtaining the verbs in the first text corresponding to each node of the event relationship tree; based on a preset cosine similarity algorithm, calculating the similarity between the key verb and the verb in the first text, obtaining the similarity between the key verb and each first text, and using the similarity as the first node matching degree between the keyword and the node.

[0052] Exemplarily, the nodes of the event relationship tree are traversed, and the verbs in the first text indicated by each node are obtained. The similarity between the obtained verbs of the first text and the key verbs is calculated to obtain the similarity between the key verbs and the verbs of the first text, so as to determine the matching degree between the key verbs and the first nodes of each node of the event relationship tree.

[0053] Exemplarily, based on a preset cosine similarity algorithm, similarity calculation between the key verb and the verb in the first text may be, for example, vectorizing the key verb to obtain a key verb vector, and vectorizing the verb in the first text to obtain a first text verb vector, and calculating the similarity between the key verb vector and the first text verb vector according to the following formula:

[0054]

[0055] Among them, A i Used to indicate the key verb vector, B i It is used to indicate the first text verb vector, i is the vector element at the i-th position in the vector, n is the number of vector elements in the vector, and cosθ is used to indicate the similarity.

[0056] By using the above preset cosine similarity algorithm, the similarity between the key verb and the verb in the first text indicated by each node can be obtained, thereby determining the first matching degree between the key verb and each node of the event relationship tree.

[0057] Step S104: determining a target node in the event relationship tree according to the first node matching degree, and obtaining a target first text and a target second text in the target node.

[0058] Exemplarily, after calculating the first matching degree between the keyword and each node, the target node corresponding to the key verb is determined in the event relationship tree according to the first matching degree to obtain the target first text and the target second text indicated by the target node.

[0059] It can be understood that the first node with the highest matching degree is used as the target node of the key verb.

[0060] Exemplarily, if the key verb has the same similarity as the verb in the first text indicated by multiple nodes, the association strength between the cause event and the result event indicated by the node is determined through a preset embbeding network. Specifically, the association strength can be used to indicate the probability of the result event occurring after the cause event occurs. If the probability of the result event occurring after the cause event occurs is 1, the weight value of the node is determined to be 1; if the probability of the result event occurring after the cause event occurs is 50%, the weight value of the node is determined to be 50%, so that the target node can still be determined when the verb similarity is the same. It can be understood that the probability of occurrence can be determined based on the cause event that occurred historically and the result event that occurred historically.

[0061] The weight value of the first node matching degree is determined by the association strength between the cause event and the result event. The similarity between the key verb and the verb in the first text indicated by the node is multiplied by the corresponding weight value to obtain the first node matching degree to determine the target node.

[0062] In some embodiments, the event relationship tree includes at least two levels, and determining the target node in the event relationship tree based on the first node matching degree includes: determining the first node matching degree between the key verb and each node of the Nth layer of the event relationship tree, wherein N is a natural number greater than 0 and N is not greater than the total number of layers of the event relationship tree; determining the node whose first node matching degree is greater than the node matching threshold as the node to be calculated; when N is less than the total number of layers of the event relationship tree, determining the second node matching degree between the key verb and the child node of the node to be calculated; if the second matching degree of the child node of the node to be calculated is less than the first matching degree of the node to be calculated, determining the node to be calculated as the target node.

[0063] Exemplarily, the event relationship tree is a tree structure, including at least two layers, and except for the layer where the root node of the event relationship tree is located, the remaining layers include at least two nodes. It can be understood that the nodes in the event relationship tree except the root node are all child nodes of the root node.

[0064] Exemplarily, the root node is located at the first layer, the child node of the root node is the first child node and is located at the second layer, the child node of the first child node is the second child node and is located at the third layer, and so on to form an event relationship tree, where the total number of layers of the event relationship tree is M.

[0065] Exemplarily, the key verbs can be used to calculate similarity starting from the Nth layer of the event relationship tree, or they can be used to calculate similarity starting from the root node of the event relationship tree. It is understandable that when the key verbs are used to calculate similarity starting from the Nth layer of the event relationship tree, the first node matching degree between the key verbs and each node in the Nth layer of the event relationship tree is obtained, and the first node matching degree of each node is compared with a preset node matching threshold, and the nodes whose first node matching degree is greater than the preset node matching threshold are used as nodes to be calculated, and the matching degree of the child nodes of the nodes to be calculated is calculated.

[0066] It is understandable that when N is less than M, the subnodes of the node to be calculated are matched, wherein the subnodes of the node to be calculated are located at the N+1 layer. When N is equal to M, the node to be calculated has no corresponding subnodes, and the node to be calculated is determined as the target node. It is understandable that if the node to be calculated has no subnodes, and the first node matching degrees of at least two nodes to be calculated are the same, the weight value can be calculated by the above-mentioned correlation strength between the cause event indicated by the node and the result event to determine the target node in the node to be calculated.

[0067] Exemplarily, if the second matching degree between the key verb and the child node of the node to be calculated is less than the first matching degree, the target node is determined according to the node to be calculated, for example, the node to be calculated with the highest first matching degree is determined and determined as the target node.

[0068] If the second matching degree of the child node of the node to be calculated is greater than the first matching degree of the node to be calculated, N is increased by 1.

[0069] Exemplarily, if the second matching degree of the child node of the node to be calculated is greater than the first matching degree, N is increased by 1 so that the key verb continues to calculate the matching degree with the nodes in the event relationship tree until N=M or the second matching degree of the child node of the node to be calculated is less than the first matching degree. The target node is determined through the above steps and will not be described again here.

[0070] In some embodiments, the key verb is in the N+1 layer, and the matching degree is calculated between the key verb and the child node to be calculated. That is, in the N+1 layer of the event relationship tree, except for the child node to be calculated, the remaining nodes are not calculated until the M layer of the event relationship tree is calculated or the second matching degree of the child node to be calculated is less than the first matching degree. The target node is determined through the above steps and the calculation is stopped.

[0071] In other embodiments, the matching degree of the key verb is calculated with all nodes in the N+1 layer, and it is determined whether there is a node whose corresponding third matching degree is greater than the second matching degree of the child node of the node to be calculated; if not and N+1 is less than M, the matching degree of the key verb and the child node of the node to be calculated is calculated; if so, the node whose third matching degree is greater than the second matching degree is determined as the child node to be calculated, and the fourth matching degree corresponding to the parent node of the child node to be calculated and the sixth matching degree of the child node are calculated. The specific steps are as described above and will not be described here.

[0072] By determining the target node through the matching degree, the accuracy of the target node determination can be improved.

[0073] Step S105: determining a first correlation degree between the nouns in the target first text and the nouns in the target second text based on a preset noun relationship database.

[0074] Exemplarily, after determining the target node, the first degree of association between the first noun in the first text indicated by the target node and the second noun in the second text is determined based on the first text and the second text indicated by the target node and based on the noun relationship database. It can be understood that the degree of association can be characterized by association information, including but not limited to association information of geographic locations, association information of people, and association information between objects. For example, the degree of association of nouns used to indicate father-son association information is greater than the degree of association of nouns used to indicate uncle-nephew association information. It can be understood that in actual applications, the degree of association corresponding to the association information between nouns can be set according to needs, and the present application is not limited thereto.

[0075] In some embodiments, based on a preset noun relationship database, determining a first degree of association between a noun in the target first text and a noun in the target second text includes: obtaining a first noun in the target first text, and obtaining a second noun in the target second text; determining a plurality of candidate noun triples in the noun relationship database based on the first noun, wherein the candidate noun triples contain nouns identical to the first noun; determining whether the second noun exists in the candidate noun triples; and determining the first degree of association from the candidate noun triples containing the second noun.

[0076] Exemplarily, the noun relationship library includes multiple noun triples (v1, v2, l), where v1 is used to indicate a noun, v2 is used to indicate a noun that has some association with v1, and l is used to indicate the association information between v1 and v2, for example, v1 is country A, v2 is region B, and l is the capital of the country.

[0077] Exemplarily, a first noun is obtained from a first text indicated by a target node, and a second noun is obtained from a second text indicated by the same target node, and a noun triple that is the same as the first noun and the second noun is searched in a noun relationship database, and a first degree of association between the first noun and the second noun is determined based on association information in the noun triple.

[0078] For example, a plurality of candidate triples are determined in a noun relationship database through the first noun. It is understandable that one of the nouns in the candidate triples is the same as the first noun. Since a noun can have different associations with multiple nouns, a target triple is determined from multiple candidate triples through the second noun, and a triple with the same noun as the first noun and the second noun is determined as the target triple. The first association information between the first noun and the second noun is obtained in the target triple, and the first association degree between the first noun and the second noun is determined based on the mapping relationship between the preset association information and the association degree.

[0079] Exemplarily, the degree of association between nouns can be determined through association information of noun triples in a noun relationship database to improve the accuracy of target noun determination, thereby improving the rationality of the predicted target description text.

[0080] Step S106: Based on a preset semantic network, according to the first association degree and the key noun, determine a target noun corresponding to the key noun, wherein a second association degree between the target noun and the key noun is greater than or equal to the first association degree.

[0081] Exemplarily, the preset semantic network may be, for example, the open source Wordnet. Through the key noun and the first degree of association, the target noun corresponding to the key noun may be determined, wherein the second degree of association between the key noun and the target noun is greater than the first degree of association. For example, the first association information is the capital of a country, and it may be determined that the first degree of association is level five, and the degree of association of important cities in the country is level four. Therefore, the second degree of association needs to be greater than or equal to the first degree of association, that is, the second association information corresponding to the second degree of association is also used to indicate the capital of a country, and cannot be association information used to indicate important cities in the country.

[0082] For example, the key noun is country C, and the first associated information is the country's capital, then the target noun should be region D, the capital of country C. It can be understood that the key noun can also be other nouns, such as the noun father indicating a family relationship, and the first and second associated information can also be other relationships, such as family relationships. The key noun, the first and second associated information, and the target noun are not limited here.

[0083] Step S107: performing noun replacement processing on the target second text according to the target noun to obtain a target description text, and sending the target description text to the target terminal.

[0084] Exemplarily, after determining the target noun, the noun in the second text indicated by the target node is replaced to obtain a target description text, wherein the target description text is used to describe the result event corresponding to the target event, and the target description text is sent to the target terminal.

[0085] For example, the target event is an earthquake in country C, and the first text indicated by the target node matching the target event is an earthquake in country A, and the second text is that region B (the capital of country A) was affected by the disaster; the target noun is determined to be region D, the capital of country C, through the semantic network; the second text indicated by the target node is obtained: region B was affected by the disaster; and the noun in the second text is replaced with the target noun to obtain the target description text: region D was affected by the disaster; thus completing the prediction of the result event corresponding to the target event. The obtained target description text is sent to the target terminal so that the corresponding personnel can know the predicted target description text, so as to know the corresponding information, and thus set the corresponding prevention policy or implement the corresponding response policy.

[0086] In some embodiments, the target description text can also be stored in the blockchain so that when the target terminal device needs to obtain the target description text, it can be broadcast to the blockchain to obtain the target description text. The blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods, each of which contains a batch of network transaction information for verifying the validity of its information (anti-counterfeiting) and generating the next block. The blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.

[0087] In some embodiments, before determining the first node matching degree between the key verb and the node in the event relationship tree based on the event relationship tree, it also includes: obtaining a descriptive text dataset of sample event pairs, wherein the sample event pairs include a sample first text and a sample second text corresponding to the sample first text, the sample first text is a sample cause event description text, and the sample second text is a sample result event description text; clustering multiple sample event pairs according to the sample first text and the sample second text contained in the sample event pairs to obtain the event relationship tree.

[0088] Exemplarily, an event relationship tree is established so that the first text matching the target event description text can be determined in the event relationship tree through the key verbs of the target event description text. Specifically, the event relationship tree can be established through the description text dataset of the sample event pair. It can be understood that the description text dataset of the sample event pair includes description texts of multiple causal event pairs, wherein the causal event pair includes a sample first text and a sample second text, the sample first text is a sample cause event description text, and the sample second text is a sample result event description text of the result event corresponding to the sample cause event.

[0089] Exemplarily, multiple event pairs are clustered to obtain nodes in the event relationship tree, thereby obtaining the event relationship tree. It can be understood that each cluster can be regarded as a node, and the event pair before clustering can also be regarded as a node, so that multiple nodes can be obtained, and the event relationship tree can be constructed by multiple nodes.

[0090] It is understandable that the established event key tree can also be stored in the blockchain.

[0091] In some embodiments, clustering a plurality of sample event pairs according to the sample first text and the sample second text contained in the sample event pairs to obtain the event relationship tree includes: vectorizing the sample first text to obtain a first sample text vector, and vectorizing the sample second text to obtain a second sample text vector; determining the vector distance between each sample event pair according to the first sample text vector and the second sample text vector corresponding to each sample event pair based on a preset vector distance calculation formula; classifying each sample event pair into a plurality of event pair first clusters according to the vector distance between each sample event pair, wherein each event pair first cluster includes at least two sample event pairs; calculating the vector distance between each event pair first cluster, and classifying each event pair first cluster into a plurality of event pair second clusters according to the vector distance between each event pair first cluster, wherein each event pair second cluster includes at least two event pair first clusters; determining the event relationship tree according to each event pair first cluster and each event pair second cluster.

[0092] Exemplarily, the sample first text and the sample second text in each sample event pair are vectorized to obtain the corresponding sample first text vector and sample second text vector, and based on the preset vector distance calculation formula, the vector distances of the sample first text vectors and sample second text vectors of different sample event pairs are calculated. It can be understood that the sum of the distances between the sample first text vectors and the distances between the sample second text vectors corresponding to different sample event pairs can represent the vector distances between different sample event pairs, as shown in the following formula:

[0093] SIM( <c i ,e i >, <c j ,e j >)=SIM(c i ,c j )+SIM(e i ,e j )

[0094] Among them, SIM is used to indicate the vector distance, c i represents the sample first text vector of the i-th sample event pair, e i The sample second text vector representing the i-th sample event pair; c j represents the sample first text vector of the jth sample event pair, e j Represents the sample second text vector of the jth sample event pair.

[0095] It can be understood that after calculating the vector distances between different sample event pairs, multiple sample event pairs can be classified according to the vector distances between different sample event pairs, such as Figure 3 As shown, a plurality of first clusters are obtained; and the vector distances between the plurality of first clusters are calculated, and the plurality of first clusters are classified to obtain a plurality of second clusters, and so on, to establish an event relationship tree.

[0096] In some embodiments, the method of classifying each of the sample event pairs into a plurality of first clusters of event pairs based on the vector distance between each of the sample event pairs includes: determining a first sample event pair, and taking the sample event pairs other than the first sample event pair in the description text data set of the present event pair as target sample event pairs in sequence; calculating the vector distance between the first sample event pair and the target sample event pair; determining the target sample event pair having the smallest vector distance to the first sample event pair as the second sample event pair, and classifying the first sample event pair and the second sample event pair into the same first cluster of event pairs.

[0097] Exemplarily, two sample event pairs with the smallest vector distance are determined, clustered, and a first cluster of event pairs is obtained; specifically, a sample event pair is set as a target sample event pair, the vector distances between the remaining sample event pairs and the target sample event pair are calculated, and the sample event pair with the smallest vector distance to the target sample event pair among the remaining sample event pairs is determined, and the sample event pair is clustered with the target sample event pair to obtain a first cluster of event pairs; among the sample event pairs remaining after clustering, the target sample event pair is determined again, and the above calculations are repeated to obtain a first cluster of multiple event pairs.

[0098] Exemplarily, the sample first text vectors and the sample second text vectors corresponding to the sample event pairs contained in the first cluster of event pairs are added to obtain the sample third text vectors and the sample fourth text vectors corresponding to the first cluster of event pairs, and the vector distances between the first clusters of each event pair are calculated through the sample third text vectors and the sample fourth text vectors corresponding to the first cluster of event pairs to determine the second cluster of event pairs. This calculation method is analogous until the Nth cluster of event pairs is obtained, which can include all sample event pairs in the sample event pair data set. It can be understood that N is also used to indicate the number of layers of the event relationship tree.

[0099] Exemplarily, the Nth cluster of events can be used to indicate the nodes of the event relationship tree. It can be understood that the first text and the second text indicated by the node should be able to include the information indicated by the first text and the second text of the child nodes of the node. Therefore, when obtaining the Nth cluster of events, it is necessary to generalize the first text and the second text contained in the Nth cluster to determine the Nth cluster, that is, the first text and the second text corresponding to the node.

[0100] Specifically, the first sample text can be segmented based on the word segmentation model to obtain multiple keywords; based on the semantic generalization model, each keyword is semantically generalized to obtain the attribute concept word corresponding to each keyword, wherein the attribute concept word is used to describe the attribute or category of the keyword; based on the entity word database, the attribute concept word is entity matched to obtain the entity word corresponding to the attribute concept word, and the entity word is a word associated with the attribute or category of the attribute concept word; each entity word is spliced ​​to obtain the first text indicated by the parent node of the node where the first sample text is located; similarly, the second sample text can be processed in the same way to obtain the second text indicated by the parent node of the node where it is located, thereby obtaining the first text and the second text indicated by the node corresponding to the Nth cluster of the event pair, and establishing an event relationship tree through multiple nodes.

[0101] The event description text prediction method provided in the above embodiment determines the first text that matches the target event description text in the event relationship tree, and uses the second text corresponding to the first text and the first degree of association between nouns in the first text and the second text to predict the target description text of the result event corresponding to the target event, so that the relationship between the events can be retained, thereby improving the rationality and reference value of the predicted target description text.

[0102] See also Figure 4 , Figure 4 It is a schematic diagram of a device for predicting a description text of an event provided by an embodiment of the present application. The device for predicting a description text of an event can be configured in a server or a terminal to execute the aforementioned method for predicting a description text of an event.

[0103] like Figure 4 As shown, the event description text prediction device 100 includes: a text acquisition module 110, a semantic analysis module 120, a first node matching degree determination module 130, a target node determination module 140, a first association degree determination module 150, a target noun determination module 160, and a target description text determination module 170.

[0104] The text acquisition module 110 is used to acquire the event description text of the target event from the source terminal.

[0105] The semantic analysis module 120 is used to perform semantic analysis on the event description text to obtain key verbs and key nouns.

[0106] A first node matching degree determination module 130, configured to determine, based on an event relationship tree, a first node matching degree between the key verb and a node in the event relationship tree, wherein the node is used to indicate a first text and a second text corresponding to the first text, the first text being a cause event description text, and the second text being a result event description text;

[0107] The target node determination module 140 is used to determine the target node in the event relationship tree according to the first node matching degree, and obtain the target first text and the target second text indicated by the target node.

[0108] The first correlation degree determination module 150 is used to determine a first correlation degree between a noun in the target first text and a noun in the target second text based on a preset noun relationship database.

[0109] The target noun determination module 160 is used to determine a target noun corresponding to the key noun based on a preset semantic network, according to the first association degree and the key noun, wherein the second association degree between the target noun and the key noun is greater than or equal to the first association degree.

[0110] The target description text determination module 170 is used to perform noun replacement processing on the target second text according to the target noun to obtain a target description text, and send the target description text to the target terminal.

[0111] Exemplarily, the first node matching degree determination module 130 further includes a verb acquisition submodule and a similarity calculation submodule.

[0112] The verb acquisition submodule is used to acquire the verbs in the first text corresponding to each node of the event relationship tree.

[0113] The similarity calculation submodule is used to calculate the similarity between the key verb and the verbs in the first text based on a preset cosine similarity algorithm, obtain the similarity between the key verb and each of the first texts, and use the similarity as the first node matching degree between the key verb and the node.

[0114] Exemplarily, the target node determination module 140 is further configured to:

[0115] Determine the first node matching degree between the key verb and each node of the Nth layer of the event relationship tree, where N is a natural number greater than 0 and N is not greater than the total number of layers of the event relationship tree;

[0116] Determine the node whose first node matching degree is greater than the node matching threshold as the node to be calculated;

[0117] When N is less than the total number of layers of the event relationship tree, determining a second node matching degree between the key verb and a child node of the node to be calculated;

[0118] If the second matching degree of the child node of the node to be calculated is less than the first matching degree of the node to be calculated, determining the target node according to the node to be calculated;

[0119] If the second matching degree of the child node of the node to be calculated is greater than the first matching degree of the node to be calculated, N is increased by 1.

[0120] Exemplarily, the first association degree determination module 150 includes a noun acquisition submodule, a noun triple determination submodule, and a second noun judgment submodule.

[0121] A noun acquisition submodule, used to acquire a first noun in the target first text, and to acquire a second noun in the target second text;

[0122] a noun triple determination submodule, configured to determine, in the noun relationship database, a plurality of candidate noun triples according to the first noun, wherein the candidate noun triples include nouns identical to the first noun;

[0123] A second noun judgment submodule, used for determining whether the second noun exists in the candidate noun triple;

[0124] The first association degree determination module 150 is further configured to determine the first association degree from the candidate noun triples containing the second noun.

[0125] Exemplarily, the event description text prediction device 100 further includes a sample description text acquisition module and an event relationship tree establishment module.

[0126] A sample description text acquisition module is used to acquire a description text dataset of a sample event pair, wherein the sample event pair includes a sample first text and a sample second text corresponding to the sample first text, the sample first text is a sample cause event description text, and the sample second text is a sample result event description text;

[0127] The event relationship tree building module is used to cluster a plurality of sample event pairs according to the sample first text and the sample second text contained in the sample event pairs to obtain the event relationship tree.

[0128] Exemplarily, the event relationship tree building module includes a vector processing submodule, a vector distance calculation submodule, an event pair classification submodule, and a cluster classification submodule.

[0129] The vector processing submodule is used to perform vectorization processing on the sample first text to obtain the sample first text vector, and to perform vectorization processing on the sample second text to obtain the sample second text vector.

[0130] A vector distance calculation submodule, configured to determine the vector distance between each of the sample event pairs based on a preset vector distance calculation formula and according to the sample first text vector and the sample second text vector corresponding to each of the sample event pairs;

[0131] An event pair classification submodule, used for classifying each of the sample event pairs into a plurality of first event pair clusters according to the vector distance between each of the sample event pairs, wherein each of the first event pair clusters includes at least two sample event pairs;

[0132] A cluster classification submodule, used for calculating the vector distance between each of the event pairs of the first clusters, and classifying each of the event pairs of the first clusters into a plurality of event pairs of the second clusters according to the vector distance between each of the event pairs of the first clusters, wherein each of the event pairs of the second clusters includes at least two of the event pairs of the first clusters;

[0133] The event relationship tree establishing module is further used to determine the event relationship tree according to each of the first clusters of the event pairs and each of the second clusters of the event pairs.

[0134] Exemplarily, the event pair classification submodule further includes a target sample event pair determination submodule, an event pair vector distance calculation submodule, and a marker comparison submodule.

[0135] The identification determination submodule is used to determine a first sample event pair, and to sequentially use sample event pairs other than the first sample event pair in the description text data set of the present event pair as target sample event pairs.

[0136] The candidate language identification determination submodule is used to calculate the vector distance between the first sample event pair and the target sample event pair.

[0137] The event pair classification submodule is further used to determine that the target sample event pair having the smallest vector distance with the first sample event pair is the second sample event pair, and classify the first sample event pair and the second sample event pair into the same event pair first cluster.

[0138] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0139] The method of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0140] See also Figure 5 , Figure 5 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a server or a terminal.

[0141] like Figure 5 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.

[0142] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute a description text prediction method for any event.

[0143] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0144] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute the description text prediction method of any event.

[0145] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that the structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0146] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0147] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0148] Get the event description text of the target event from the source terminal;

[0149] Performing semantic analysis on the event description text to obtain key verbs and key nouns;

[0150] Based on the event relationship tree, determining the first node matching degree between the key verb and a node in the event relationship tree, wherein the node is used to indicate a first text and a second text corresponding to the first text, the first text is a cause event description text, and the second text is a result event description text;

[0151] According to the first node matching degree, determining a target node in the event relationship tree, and obtaining a target first text and a target second text indicated by the target node;

[0152] Determining a first correlation degree between a noun in the target first text and a noun in the target second text based on a preset noun relationship database;

[0153] Based on a preset semantic network, determining a target noun corresponding to the key noun according to the first association degree and the key noun, wherein a second association degree between the target noun and the key noun is greater than or equal to the first association degree;

[0154] The target second text is subjected to noun replacement processing according to the target noun to obtain a target description text, and the target description text is sent to the target terminal.

[0155] In one embodiment, when the processor determines the matching degree between the key verb and the first node of the node in the event relationship tree based on the event relationship tree, it is configured to implement:

[0156] Obtaining verbs in the first text corresponding to each node of the event relationship tree;

[0157] Based on a preset cosine similarity algorithm, similarity is calculated between the key verb and the verbs in the first text to obtain the similarity between the key verb and each of the first texts, and the similarity is used as the first node matching degree between the key verb and the node.

[0158] In one embodiment, when determining the target node in the event relationship tree according to the first node matching degree, the processor is configured to implement:

[0159] Determine the first node matching degree between the key verb and each node of the Nth layer of the event relationship tree, where N is a natural number greater than 0 and N is not greater than the total number of layers of the event relationship tree;

[0160] Determine the node whose first node matching degree is greater than the node matching threshold as the node to be calculated;

[0161] When N is less than the total number of layers of the event relationship tree, determining a second node matching degree between the key verb and a child node of the node to be calculated;

[0162] If the second matching degree of the child node of the node to be calculated is less than the first matching degree of the node to be calculated, determining the target node according to the node to be calculated;

[0163] If the second matching degree of the child node of the node to be calculated is greater than the first matching degree of the node to be calculated, N is increased by 1.

[0164] In one embodiment, when the processor determines the first degree of association between the noun in the target first text and the noun in the target second text based on a preset noun relationship database, it is configured to implement:

[0165] Acquire a first noun in the target first text, and acquire a second noun in the target second text;

[0166] According to the first noun, determining a plurality of candidate noun triples in the noun relationship database, wherein the candidate noun triples include nouns identical to the first noun;

[0167] Determine whether the second noun exists in the candidate noun triple;

[0168] The first degree of association is determined from candidate noun triples in which the second noun exists.

[0169] In one embodiment, before determining the matching degree between the key verb and the first node of the node in the event relationship tree based on the event relationship tree, the processor is configured to implement:

[0170] Acquire a description text dataset of a sample event pair, wherein the sample event pair includes a sample first text and a sample second text corresponding to the sample first text, the sample first text is a sample cause event description text, and the sample second text is a sample result event description text;

[0171] According to the sample first text and the sample second text contained in the sample event pairs, a plurality of the sample event pairs are clustered to obtain the event relationship tree.

[0172] In one embodiment, when the processor clusters a plurality of sample event pairs according to the sample first text and the sample second text included in the sample event pairs to obtain the event relationship tree, the processor is configured to implement:

[0173] Performing vectorization processing on the sample first text to obtain a sample first text vector, and performing vectorization processing on the sample second text to obtain a sample second text vector;

[0174] Based on a preset vector distance calculation formula, according to the sample first text vector and the sample second text vector corresponding to each of the sample event pairs, determine the vector distance between each of the sample event pairs;

[0175] Classifying each of the sample event pairs into a plurality of first event pair clusters according to the vector distance between each of the sample event pairs, wherein each of the first event pair clusters includes at least two sample event pairs;

[0176] Calculating the vector distance between each of the event pairs of first clusters, and classifying each of the event pairs of first clusters into a plurality of event pairs of second clusters according to the vector distance between each of the event pairs of first clusters, wherein each of the event pairs of second clusters includes at least two of the event pairs of first clusters;

[0177] The event relationship tree is determined according to the first clustering of each event pair and the second clustering of each event pair.

[0178] In one embodiment, when the processor implements classifying each of the sample event pairs into a plurality of first clusters of event pairs according to the vector distance between each of the sample event pairs, the processor is configured to implement:

[0179] Determine a first sample event pair, and sequentially use sample event pairs other than the first sample event pair in the description text data set of the present event pair as target sample event pairs;

[0180] Calculating a vector distance between the first sample event pair and the target sample event pair;

[0181] A target sample event pair having the smallest vector distance to the first sample event pair is determined as a second sample event pair, and the first sample event pair and the second sample event pair are classified into the same event pair first cluster.

[0182] It should be noted that technicians in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the description text prediction of the above-mentioned event description can refer to the corresponding process in the aforementioned event description text prediction control method embodiment, and will not be repeated here.

[0183] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the event description text prediction method of the present application.

[0184] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0185] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0186] It should also be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0187] The serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for predicting event description text, characterized in that: include: Get the event description text of the target event from the source terminal; Performing semantic analysis on the event description text to obtain key verbs and key nouns; Based on the event relationship tree, determining the first node matching degree between the key verb and a node in the event relationship tree, wherein the node is used to indicate a first text and a second text corresponding to the first text, the first text is a cause event description text, and the second text is a result event description text; According to the first node matching degree, determining a target node in the event relationship tree, and obtaining a target first text and a target second text indicated by the target node; Determining a first correlation degree between a noun in the target first text and a noun in the target second text based on a preset noun relationship database; Based on a preset semantic network, determining a target noun corresponding to the key noun according to the first association degree and the key noun, wherein a second association degree between the target noun and the key noun is greater than or equal to the first association degree; Performing noun replacement processing on the target second text according to the target noun to obtain a target description text, and sending the target description text to a target terminal; The event relationship tree includes at least two levels, and determining the target node in the event relationship tree according to the first node matching degree includes: Determine the first node matching degree between the key verb and each node of the Nth layer of the event relationship tree, where N is a natural number greater than 0 and N is not greater than the total number of layers of the event relationship tree; Determine the node whose first node matching degree is greater than the node matching threshold as the node to be calculated; When N is less than the total number of layers of the event relationship tree, determining a second node matching degree between the key verb and a child node of the node to be calculated; If the second matching degree of the child node of the node to be calculated is less than the first matching degree of the node to be calculated, determining the target node according to the node to be calculated; If the second matching degree of the child node of the node to be calculated is greater than the first matching degree of the node to be calculated, N is increased by 1; The determining, based on a preset noun relationship database, a first correlation degree between a noun in the target first text and a noun in the target second text comprises: Acquire a first noun in the target first text, and acquire a second noun in the target second text; According to the first noun, determining a plurality of candidate noun triples in the noun relationship database, wherein the candidate noun triples include nouns identical to the first noun; Determine whether the second noun exists in the candidate noun triple; The first degree of association is determined from candidate noun triples in which the second noun exists.

2. The method for predicting event description text according to claim 1, characterized in that: The determining, based on the event relationship tree, the first node matching degree between the key verb and the node in the event relationship tree comprises: Obtaining verbs in the first text corresponding to each node of the event relationship tree; Based on a preset cosine similarity algorithm, similarity is calculated between the key verb and the verbs in the first text to obtain the similarity between the key verb and each of the first texts, and the similarity is used as the first node matching degree between the key verb and the node.

3. The method for predicting event description text according to claim 1, characterized in that: Before determining the first node matching degree between the key verb and the node in the event relationship tree based on the event relationship tree, the method further includes: Acquire a description text dataset of a sample event pair, wherein the sample event pair includes a sample first text and a sample second text corresponding to the sample first text, the sample first text is a sample cause event description text, and the sample second text is a sample result event description text; According to the sample first text and the sample second text contained in the sample event pairs, a plurality of the sample event pairs are clustered to obtain the event relationship tree.

4. The method for predicting event description text according to claim 3, characterized in that: The step of clustering a plurality of sample event pairs according to the sample first text and the sample second text contained in the sample event pairs to obtain the event relationship tree includes: Performing vectorization processing on the sample first text to obtain a sample first text vector, and performing vectorization processing on the sample second text to obtain a sample second text vector; Based on a preset vector distance calculation formula, according to the sample first text vector and the sample second text vector corresponding to each of the sample event pairs, determine the vector distance between each of the sample event pairs; Classifying each of the sample event pairs into a plurality of first event pair clusters according to the vector distance between each of the sample event pairs, wherein each of the first event pair clusters includes at least two sample event pairs; Calculating the vector distance between each of the first clusters of the event pairs, and classifying each of the first clusters of the event pairs into a plurality of second clusters of the event pairs according to the vector distance between each of the first clusters of the event pairs, wherein each of the second clusters of the event pairs includes at least two of the first clusters of the event pairs; The event relationship tree is determined according to the first clustering of each event pair and the second clustering of each event pair.

5. The method for predicting event description text according to claim 4, characterized in that: The step of classifying each of the sample event pairs into a plurality of first clusters of event pairs according to the vector distances between the sample event pairs comprises: Determine a first sample event pair, and sequentially use sample event pairs other than the first sample event pair in a description text data set of the sample event pair as target sample event pairs; Calculating a vector distance between the first sample event pair and the target sample event pair; A target sample event pair having the smallest vector distance to the first sample event pair is determined as a second sample event pair, and the first sample event pair and the second sample event pair are classified into the same event pair first cluster.

6. A device for predicting event description text, characterized in that: The event description text prediction device comprises: A text acquisition module, used to acquire the event description text of the target event from the source terminal; A semantic analysis module, used for performing semantic analysis on the event description text to obtain key verbs and key nouns; A first node matching degree determination module, used for determining a first node matching degree between the key verb and a node in the event relationship tree based on the event relationship tree, wherein the node is used to indicate a first text and a second text corresponding to the first text, the first text is a cause event description text, and the second text is a result event description text; A target node determination module, used to determine a target node in the event relationship tree according to the first node matching degree, and obtain a target first text and a target second text indicated by the target node; A first correlation degree determination module, configured to determine a first correlation degree between a noun in the target first text and a noun in the target second text based on a preset noun relationship database; a target noun determination module, configured to determine a target noun corresponding to the key noun based on a preset semantic network and according to the first association degree and the key noun, wherein a second association degree between the target noun and the key noun is greater than or equal to the first association degree; a target description text determination module, configured to perform noun replacement processing on the target second text according to the target noun, obtain a target description text, and send the target description text to a target terminal; Wherein, the target node determination module is also used for: Determine the first node matching degree between the key verb and each node of the Nth layer of the event relationship tree, where N is a natural number greater than 0 and N is not greater than the total number of layers of the event relationship tree; Determine the node whose first node matching degree is greater than the node matching threshold as the node to be calculated; When N is less than the total number of layers of the event relationship tree, determining a second node matching degree between the key verb and a child node of the node to be calculated; If the second matching degree of the child node of the node to be calculated is less than the first matching degree of the node to be calculated, determining the target node according to the node to be calculated; If the second matching degree of the child node of the node to be calculated is greater than the first matching degree of the node to be calculated, N is increased by 1; The first association degree determination module includes a noun acquisition submodule, a noun triple determination submodule, and a second noun judgment submodule; The noun acquisition submodule is used to acquire the first noun in the target first text and acquire the second noun in the target second text; The noun triple determination submodule is used to determine a plurality of candidate noun triples in the noun relationship database according to the first noun, wherein the candidate noun triples include nouns identical to the first noun; The second noun determination submodule is used to determine whether the second noun exists in the candidate noun triple; The first association degree determination module is further configured to determine the first association degree from the candidate noun triples containing the second noun.

7. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the event description text prediction method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the event description text prediction method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Domain-specific Chinese event extraction method

    CN108920447A

  • Event query method and device and storage medium

    CN113590774A