Matter information extraction method, device, computer equipment and storage medium

By calculating the similarity and amount of information between statements and background words in the agreement file and entity recognition, the matter information in the agreement file is automatically filtered out, which solves the problem of low efficiency in obtaining matter information in the existing technology and improves efficiency.

CN114091431BActive Publication Date: 2024-10-08华润数字科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111413034.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2024-10-08
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

In the existing technology, the acquisition efficiency of item information in agreement documents is low, requires a lot of manual processing, is long, and contains a large number of meaningless statements.

Method used

By calculating the similarity between the first sentence in the text to be processed and the preset background words, meaningless sentences are filtered out, the amount of information and entity recognition are calculated, and sentences with a certain amount of information and containing entities are filtered out as matter information.

Benefits of technology

It realizes automatic filtering of item information from text, improves the efficiency of item information acquisition, and reduces the time and energy of manual processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114091431B_ABST
    Figure CN114091431B_ABST
Patent Text Reader

Abstract

The embodiment of the present application belongs to the field of artificial intelligence, and relates to a method, device, computer equipment and storage medium for extracting event information, the method comprising: obtaining a text to be processed containing at least one first sentence; respectively calculating the similarity between each first sentence and each preset background word; filtering each first sentence according to the similarity to obtain at least one second sentence; calculating the amount of information of each second sentence; performing entity recognition on each second sentence to obtain an entity recognition result; filtering each second sentence according to the obtained amount of information and the entity recognition result to obtain event information in the text to be processed. The present application can automatically filter out event information from the text, thereby improving the efficiency of acquiring event information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, computer equipment and storage medium for extracting event information. Background Art

[0002] In people's daily lives, in order to promote and achieve certain matters, they usually sign agreement documents such as plan agreements and memoranda. In the subsequent process of promoting the implementation of matters, it is often necessary to supervise the matters according to the matter information in the agreement documents.

[0003] Currently, the information of the matters is usually found by manually processing the agreement documents. However, the agreement documents are often long and contain a lot of clichés, background introductions and other sentences that lack substantive content. It takes a lot of manual effort to process them, resulting in low efficiency in obtaining the information of the matters. Summary of the invention

[0004] The purpose of the embodiments of the present application is to propose a method, device, computer equipment and storage medium for extracting matter information to solve the problem of low efficiency in obtaining matter information.

[0005] In order to solve the above technical problems, the present application embodiment provides a method for extracting event information, which adopts the following technical solution:

[0006] Obtaining a text to be processed containing at least one first sentence;

[0007] Calculate the similarity between each first sentence and each preset background word respectively;

[0008] Screening the first sentences according to the similarity to obtain at least one second sentence;

[0009] Calculate the information content of each second sentence;

[0010] Performing entity recognition on each of the second sentences to obtain an entity recognition result;

[0011] The second sentences are screened according to the obtained information volume and entity recognition results to obtain the matter information in the text to be processed.

[0012] In order to solve the above technical problems, the embodiment of the present application further provides a device for extracting event information, which adopts the following technical solution:

[0013] A text acquisition module, used to acquire a text to be processed containing at least one first sentence;

[0014] A similarity calculation module, used to calculate the similarity between each first sentence and each preset background word;

[0015] A first screening module, configured to screen the first sentences according to the similarity to obtain at least one second sentence;

[0016] An information volume calculation module, used for calculating the information volume of each second sentence;

[0017] An entity recognition module, used to perform entity recognition on each of the second sentences to obtain an entity recognition result;

[0018] The second screening module is used to screen the second sentences according to the obtained information volume and entity recognition results to obtain the matter information in the text to be processed.

[0019] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0020] Obtaining a text to be processed containing at least one first sentence;

[0021] Calculate the similarity between each first sentence and each preset background word respectively;

[0022] Screening the first sentences according to the similarity to obtain at least one second sentence;

[0023] Calculate the information content of each second sentence;

[0024] Performing entity recognition on each of the second sentences to obtain an entity recognition result;

[0025] The second sentences are screened according to the obtained information volume and entity recognition results to obtain the matter information in the text to be processed.

[0026] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0027] Obtaining a text to be processed containing at least one first sentence;

[0028] Calculate the similarity between each first sentence and each preset background word respectively;

[0029] Screening the first sentences according to the similarity to obtain at least one second sentence;

[0030] Calculate the information content of each second sentence;

[0031] Performing entity recognition on each of the second sentences to obtain an entity recognition result;

[0032] The second sentences are screened according to the obtained information volume and entity recognition results to obtain the matter information in the text to be processed.

[0033] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: after obtaining the text to be processed, the similarity between the first sentence in the text to be processed and the preset background words is calculated; the background words are phrases related to the background description, and according to the similarity between the first sentence and the background words, the meaningless sentences that appear as background descriptions can be deleted to obtain the second sentence; the information amount of the second sentence is then calculated and the entity is recognized, and according to the information amount and entity recognition results, the second sentence with low information amount and no meaningful entity can be deleted, so that the remaining second sentence with a certain amount of information and containing the required entity can be used as matter information; the present application can automatically filter out matter information from the text, thereby improving the efficiency of obtaining matter information. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0036] Figure 2 is a flow chart of an embodiment of a method for extracting matter information according to the present application;

[0037] Figure 3 is a schematic structural diagram of an embodiment of a device for extracting event information according to the present application;

[0038] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0040] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0041] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0042] like Figure 1 As shown, the system architecture 100 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, wireless communication links or optical fiber cables, etc.

[0043] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0044] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.

[0045] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0046] It should be noted that the matter information extraction method provided in the embodiment of the present application is generally executed by a server, and accordingly, the matter information extraction device is generally set in the server.

[0047] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0048] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for extracting event information according to the present application. The method for extracting event information comprises the following steps:

[0049] Step S201, obtaining a text to be processed including at least one first sentence.

[0050] In this embodiment, the electronic device (eg Figure 1 The server shown in the figure) can communicate with the terminal through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0051] Specifically, the server first needs to obtain the text to be processed so as to process the text to be processed and obtain the matter information. The sentences in the text to be processed are first sentences, and the text to be processed contains at least one first sentence. The server can obtain multiple texts to be processed at one time.

[0052] Step S202, respectively calculating the similarity between each first sentence and each preset background word.

[0053] The background words may be pre-set phrases related to the background description, for example, the background words may be phrases such as "in the spirit of friendly negotiation" and "both parties reach an agreement".

[0054] Specifically, for each first sentence in the text to be processed, the similarity between the first sentence and each background word is calculated respectively. The first sentence and each background word can be converted into corresponding representation vectors by using a model such as word2vec in the field of natural language processing, and the semantic similarity between the first sentence and each background word can be obtained by calculating the cosine similarity between the representation vectors.

[0055] In one embodiment, the text cluster to which the text to be processed belongs can be determined by a clustering algorithm. A plurality of texts are clustered by a clustering algorithm to obtain at least one text cluster, each of which contains at least one text. The text contents described by different text clusters may be different, and different background words can be pre-set according to different text clusters. Therefore, corresponding background words can be selected according to the text cluster to which the text to be processed belongs, thereby improving the accuracy of background information calculation in the text to be processed.

[0056] Step S203: Screen the first sentences according to the similarity to obtain at least one second sentence.

[0057] Specifically, the obtained similarity represents the semantic similarity between the first sentence and the background word, so that it can be determined whether the first sentence is information such as background description based on the similarity. When it is confirmed that the first sentence is information such as background description, it indicates that the first sentence may lack practical value and can be deleted, leaving at least one second sentence.

[0058] Furthermore, the above-mentioned step S203 may include: for each first sentence, comparing the similarity between the first sentence and each background word with a preset similarity threshold to obtain a comparison result; when it is determined according to the comparison result that there is a similarity greater than the similarity threshold, marking the first sentence as a sentence to be deleted; deleting each sentence to be deleted in the text to be processed to obtain at least one second sentence.

[0059] The similarity threshold may be a preset similarity value.

[0060] Specifically, a preset similarity threshold is obtained. There may be multiple background words. For a first sentence, the similarity between the first sentence and each background word needs to be calculated. Then each similarity is compared with the similarity threshold to perform a size comparison and obtain a comparison result.

[0061] There may be multiple background words. When the similarity is compared with the similarity threshold, all background words may share one similarity threshold, or different similarity thresholds may be set according to different background words.

[0062] When, according to the comparison result, among the multiple similarities corresponding to the first sentence, there is a similarity whose value is greater than the similarity threshold, it indicates that the first sentence is too similar to a certain background word, and the first sentence can be marked as a sentence to be deleted. Then, all the sentences to be deleted are deleted from the text to be processed, and the remaining sentences are marked as second sentences.

[0063] In this embodiment, the similarity is compared with a preset similarity threshold. When there is a similarity greater than the similarity threshold, it can be determined that the first sentence has too high similarity with a background word, and it can be deleted to obtain a second sentence that is not a background description in the text to be processed.

[0064] Step S204, calculating the information amount of each second sentence.

[0065] Specifically, the amount of information is a measure of the amount of information contained in the second sentence. The second sentence can be first segmented, and the amount of information of the second sentence can be calculated based on the segmentation result. The higher the value of the amount of information, the higher the practical value of the second sentence.

[0066] Step S205: perform entity recognition on each second sentence to obtain an entity recognition result.

[0067] Specifically, entity recognition is performed on the second sentence to identify entities and entity types in the second sentence, and an entity recognition result is obtained. Named entities in the second sentence can be found through entity recognition. Named entities can be names of people, names of organizations, names of places, and other entities identified by names. More extensive entities also include numbers, dates, currencies, addresses, and the like.

[0068] Step S206, screening each second sentence according to the obtained information amount and entity recognition result to obtain the matter information in the text to be processed.

[0069] Specifically, the information value of the second sentence can be determined based on the amount of information; and whether the second sentence contains the required type of entity can be determined based on the entity recognition result. Therefore, the second sentence can be screened based on the amount of information and the entity recognition result, and the second sentences with a certain amount of information and the required entity can be retained. These second sentences have a certain practical value and can be used as the matter information in the text to be processed.

[0070] In one embodiment, a preset information volume threshold is obtained, and when the information volume of the second sentence is greater than the information volume threshold and the second sentence contains an entity, the second sentence can be used as matter information.

[0071] The matter information can be output and displayed independently from the text to be processed; or, the matter information can be highlighted in the text to be processed, and then the text to be processed with the highlighted effect can be output and displayed.

[0072] In this embodiment, after obtaining the text to be processed, the similarity between the first sentence in the text to be processed and the preset background words is calculated; the background words are phrases related to the background description, and according to the similarity between the first sentence and the background words, the meaningless sentences that appear as background descriptions can be deleted to obtain the second sentence; the information amount of the second sentence is then calculated and the entity recognition is performed, and according to the information amount and entity recognition results, the second sentence with low information amount and no meaningful entity can be deleted, so that the remaining second sentence with a certain amount of information and containing the required entity can be used as matter information; the present application can automatically filter out matter information from the text, thereby improving the efficiency of obtaining matter information.

[0073] Furthermore, the above step S204 may include: performing word segmentation processing on each second sentence to obtain at least one sub-word; determining the text cluster to which the text to be processed belongs through a clustering algorithm; determining the first word frequency of each sub-word according to the text cluster corpus corresponding to the text cluster, and determining the second word frequency of each sub-word according to a preset general corpus; and calculating the information content of the second sentence based on the obtained first word frequency and second word frequency.

[0074] Specifically, when calculating the amount of information, the second sentence is first segmented to obtain at least one subword, and then the text cluster to which the text to be processed belongs is determined by a clustering algorithm.

[0075] A text cluster is obtained by clustering multiple texts. A text cluster can contain multiple texts. Each text cluster has a corresponding text cluster corpus, which is constructed based on the texts contained in the text cluster.

[0076] In one embodiment, a plurality of texts to be processed may be acquired at one time, and then the plurality of texts to be processed may be clustered to obtain at least one text cluster, and then a text cluster corpus of each text cluster may be generated respectively.

[0077] In one embodiment, a certain number of texts are pre-stored in the server, and the pre-stored texts are clustered to obtain a plurality of text clusters. After obtaining the text to be processed, the text cluster to which the text to be processed belongs is determined based on a clustering algorithm, and then the text to be processed is added to the text cluster corpus corresponding to the text cluster to update the text cluster corpus.

[0078] The clustering algorithm used can be a K-means clustering algorithm (k-means clustering algorithm, k-means clustering algorithm, is an iterative clustering analysis algorithm) or a KNN algorithm (K-Nearest Neighbor, K nearest neighbor classification algorithm).

[0079] The present application also applies to a general corpus. The general corpus can be constructed in advance based on various types of texts. For example, a general news website can be crawled to construct a general corpus.

[0080] The frequency of each subword in the text cluster corpus can be calculated to obtain the first word frequency of each subword; then the frequency of each subword in the general corpus can be calculated to obtain the second word frequency of each subword. Based on the first word frequency and the second word frequency of each subword in the second sentence, the information content of the second sentence can be calculated.

[0081] In one embodiment, the calculation formula of the information volume is as follows:

[0082]

[0083] Where n represents the number of subwords in the second sentence S, is the first word frequency of the subword; is the second word frequency of the subword.

[0084] In this embodiment, the second sentence is first segmented to obtain multiple sub-words, and then the text cluster to which the text to be processed belongs is determined. The first word frequency and the second word frequency of each sub-word are calculated according to the text cluster corpus and the general corpus corresponding to the text cluster. Each sub-word is comprehensively measured through different corpora, thereby improving the scientific nature of the amount of information finally obtained.

[0085] Furthermore, the above-mentioned step S206 may include: based on the obtained information volume and entity recognition results, deleting the second sentence whose information volume is less than a preset information volume threshold and does not contain an entity, to obtain at least one third sentence; for each third sentence, determining the named entities in the third sentence based on the entity recognition result of the third sentence; according to a preset named entity dictionary, adjusting the named entities in the third sentence to standard named entities, to obtain a fourth sentence; processing the fourth sentence according to a preset sentence structure adjustment strategy, to obtain matter information in the text to be processed.

[0086] The information volume threshold may be a preset information volume value.

[0087] Specifically, a preset information volume threshold can be obtained, and the information volume of the second sentence can be compared with the information volume threshold. When the information volume is less than the information volume threshold, and it is determined based on the entity recognition result that the second sentence does not contain an entity, it indicates that the second sentence has no practical value and can be deleted. The remaining sentence is the third sentence.

[0088] The third sentence can be output as event information. However, in order to improve the readability and semantic coherence of the third sentence, the third sentence can be further processed. In the text to be processed, due to the irregularity in writing, there may be a large number of abbreviated entities, for example: "Agricultural Bank of China Co., Ltd." is abbreviated as "Agricultural Bank of China", and "Agricultural Bank of China Shanghai Branch" is abbreviated as "Agricultural Bank of China Shanghai Branch".

[0089] In order to avoid unclear expressions of the parties involved in the matter, the recognized named entities are first assumed to be abbreviations. Then the preset named entity dictionary is obtained, which records a large number of named entities, including standard named entities (entity names in the entire process and standard status) and named entities expressed in various abbreviations. Through the named entity dictionary, the standard named entity corresponding to the named entity in the third sentence can be queried. Then the standard named entity replaces the corresponding named entity in the third sentence to obtain the fourth sentence.

[0090] The expression of the fourth sentence may be non-standard, so the fourth sentence can be further optimized according to the preset sentence adjustment strategy. For example, when an inverted expression is identified in the fourth sentence, the fourth sentence is adjusted to a normal expression form; or, the syntactic components in the fourth sentence are identified through a syntactic analysis algorithm (there are eight syntactic components, namely subject, predicate, object, verb, attributive, adverbial, complement and central word), and then the phrases corresponding to different syntactic components are highlighted in different forms, or the fourth sentence is simplified to retain only the subject, predicate, object and other sentence contents.

[0091] After processing the fourth statement, the event information can be obtained.

[0092] In this embodiment, the second sentence is first screened according to the amount of information and the entity recognition results to obtain a third sentence with practical value; then, the named entities in the sentence are adjusted to standard named entities through the named entity dictionary, and the fourth sentence is adjusted through the sentence structure adjustment strategy to improve the readability and semantic coherence of the matter information.

[0093] Furthermore, the above-mentioned step of adjusting the named entities in the third sentence to standard named entities according to a preset named entity dictionary to obtain the fourth sentence may include: calculating the similarity between the named entities and the existing named entities in the preset named entity dictionary; selecting the existing named entity corresponding to the highest similarity as the bridging named entity; among the named entities of the same category of the bridging named entity recorded in the named entity dictionary, selecting the existing named entity with the longest length as the standard named entity; replacing the named entities in the third sentence with standard named entities to obtain the fourth sentence.

[0094] Specifically, the named entities in the third sentence and the named entities in the named entity dictionary can be converted into representation vectors. For example, the representation vectors are generated by the word2vec model. Then, the semantic similarity between the named entities in the third sentence and the existing named entities is obtained by calculating the cosine similarity between the representation vectors.

[0095] The existing named entities in the named entity dictionary are pre-classified, and the named entities pointing to the same concept are marked as the same category. For example, "AB University" and "A University" belong to the same category. Among the existing named entities in the same category, there are full names and various abbreviations. The longest existing named entity can be used as the full name, that is, the standard named entity.

[0096] The existing named entity corresponding to the highest similarity is selected as the bridging named entity. The bridging named entity is not necessarily a standard named entity, but the bridging entity is used as a bridge. Among the named entities of the same category as the bridging entity, the longest existing named entity is selected as the standard named entity. Then the named entity in the third sentence is replaced with the standard named entity to obtain the fourth sentence.

[0097] When the length of the named entity in the third sentence exceeds the longest existing named entity in the named entity dictionary, the named entity in the third sentence may not be replaced.

[0098] In this embodiment, after finding the most similar bridge entity in the named entity dictionary based on similarity, the standard named entity is searched, and the named entity in the third sentence is replaced with the standard named entity, thereby standardizing the sentence expression.

[0099] Furthermore, the above-mentioned step of processing the fourth sentence according to a preset sentence structure adjustment strategy to obtain the matter information in the text to be processed may include: identifying the syntactic structure of the fourth sentence to obtain a syntactic structure recognition result; when it is determined according to the syntactic structure recognition result that the fourth sentence contains a syntactic structure of a preset category, determining the fourth sentence as the matter information in the text to be processed; when it is determined according to the syntactic structure recognition result that the fourth sentence does not contain a subject structure, searching for the subject of the fourth sentence in reverse order according to the position of the first sentence corresponding to the fourth sentence in the text to be processed; and generating the matter information in the text to be processed based on the found subject and the fourth sentence.

[0100] Specifically, syntax recognition is performed on the fourth sentence to obtain a syntactic structure recognition result, which can record the syntactic structure (also called syntactic components) in the fourth sentence, including: subject, predicate, object, verb, attributive, adverbial, complement and central word.

[0101] When it is determined according to the syntactic structure recognition result that the fourth sentence contains a syntactic structure of a preset category, the fourth sentence can be used as the matter information in the text to be processed. In one embodiment, when the fourth sentence contains a subject, a predicate and an object at the same time, the fourth sentence can be used as the matter information.

[0102] When it is determined according to the syntactic structure recognition result that the fourth sentence does not contain a subject structure, in order to make the sentence clear and improve readability, a subject search operation needs to be performed. When searching for the subject, the position of the first sentence corresponding to the fourth sentence in the text to be processed is taken as the starting position, and the subject of the fourth sentence is searched in reverse order in the text to be processed. After the subject is found, the subject is combined with the fourth sentence to obtain the event information.

[0103] In this embodiment, the syntactic structure of the fourth sentence is identified, and when it is identified that the fourth sentence contains a syntactic structure of a preset category, the fourth sentence is determined to be matter information; when it is identified that the fourth sentence lacks a subject, the subject of the fourth sentence is searched and the matter information is regenerated, thereby improving the readability and completeness of the matter information.

[0104] Furthermore, the above-mentioned step of searching for the subject of the fourth sentence in reverse order according to the position of the first sentence corresponding to the fourth sentence in the text to be processed when it is determined according to the syntactic structure recognition result that the fourth sentence does not contain a subject structure includes: searching for a short sentence containing a subject structure in reverse order according to the position of the first sentence corresponding to the fourth sentence in the text to be processed when it is determined according to the syntactic structure recognition result that the fourth sentence does not contain a subject structure; determining the subject in the first short sentence containing a subject structure found as the subject of the fourth sentence.

[0105] The short sentence may be a phrase between separators such as commas, semicolons, and colons in the text to be processed.

[0106] Specifically, when it is determined according to the syntactic structure recognition result that the fourth sentence does not contain a subject structure, the position of the first sentence corresponding to the fourth sentence in the to-be-processed text is used as a starting point to search in reverse order for a short sentence containing a subject structure. In one embodiment, the subject in the first short sentence containing a subject structure found in reverse order can be determined as the subject of the fourth sentence.

[0107] For example, the fourth sentence "open 5 large supermarkets with a total area of ​​not less than 10,000 square meters" has no subject, so starting from the first sentence corresponding to this fourth sentence in the text to be processed, the syntactic components of the sentences that appear earlier are identified in reverse order. Assuming that the text to be processed is "Company A has decided to invest about 45 million yuan in Guiyang before 2025. Open 5 large supermarkets with a total area of ​​not less than 10,000 square meters", then find the subject "Company A" in "Company A has decided to invest about 45 million yuan in Guiyang before 2025." to complete the subject search process. Then combine the subject "Company A" with the fourth sentence "open 5 large supermarkets with a total area of ​​not less than 10,000 square meters" to generate the event sentence "Company A opens 5 large supermarkets with a total area of ​​not less than 10,000 square meters".

[0108] When searching in reverse order, parallel subjects may appear. For example, "Companies A, B and C each invested RMB 10 million, RMB 5 million and RMB 3 million, and decided to open five large supermarkets with a total area of ​​no less than 10,000 square meters in Guiyang before 2025." Therefore, multiple subjects may also appear in the fourth sentence. According to language expression habits, when a sentence has no subject, the subject closest to the sentence is usually the missing subject, otherwise the sentence will be ambiguous.

[0109] In this embodiment, the subject in the first short sentence containing a subject structure found in reverse order is determined as the subject of the fourth sentence, thereby ensuring the integrity of the structure of the fourth sentence.

[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0111] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0112] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a device for extracting event information. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0113] like Figure 3 As shown, the event information extraction device 300 described in this embodiment includes: a text acquisition module 301, a similarity calculation module 302, a first screening module 303, an information volume calculation module 304, an entity recognition module 305 and a second screening module 306, wherein:

[0114] The text acquisition module 301 is used to acquire a text to be processed that contains at least one first sentence.

[0115] The similarity calculation module 302 is used to calculate the similarity between each first sentence and each preset background word.

[0116] The first screening module 303 is used to screen the first sentences according to the similarity to obtain at least one second sentence.

[0117] The information volume calculation module 304 is used to calculate the information volume of each second sentence.

[0118] The entity recognition module 305 is used to perform entity recognition on each second sentence to obtain an entity recognition result.

[0119] The second screening module 306 is used to screen each second sentence according to the obtained information volume and entity recognition result to obtain the matter information in the text to be processed.

[0120] In this embodiment, after obtaining the text to be processed, the similarity between the first sentence in the text to be processed and the preset background words is calculated; the background words are phrases related to the background description, and according to the similarity between the first sentence and the background words, the meaningless sentences that appear as background descriptions can be deleted to obtain the second sentence; the information amount of the second sentence is then calculated and the entity recognition is performed, and according to the information amount and entity recognition results, the second sentence with low information amount and no meaningful entity can be deleted, so that the remaining second sentence with a certain amount of information and containing the required entity can be used as matter information; the present application can automatically filter out matter information from the text, thereby improving the efficiency of obtaining matter information.

[0121] In some optional implementations of this embodiment, the first screening module 303 may include: a comparison submodule, a sentence marking submodule, and a sentence deletion submodule, wherein:

[0122] The comparison submodule is used to compare the similarity between each first sentence and each background word with a preset similarity threshold to obtain a comparison result.

[0123] The sentence marking submodule is used to mark the first sentence as a sentence to be deleted when it is determined according to the comparison result that there is a similarity greater than a similarity threshold.

[0124] The sentence deletion submodule is used to delete each sentence to be deleted in the text to be processed to obtain at least one second sentence.

[0125] In this embodiment, the similarity is compared with a preset similarity threshold. When there is a similarity greater than the similarity threshold, it can be determined that the first sentence has too high similarity with a background word, and it can be deleted to obtain a second sentence that is not a background description in the text to be processed.

[0126] In some optional implementations of this embodiment, the information volume calculation module 304 may include: a sentence segmentation submodule, a text cluster determination submodule, a word frequency determination submodule, and an information volume calculation submodule, wherein:

[0127] The sentence segmentation submodule is used to perform a segmentation process on each second sentence to obtain at least one subword.

[0128] The text cluster determination submodule is used to determine the text cluster to which the to-be-processed text belongs through a clustering algorithm.

[0129] The word frequency determination submodule is used to determine the first word frequency of each subword according to the sentence cluster corpus corresponding to the text cluster, and to determine the second word frequency of each subword according to a preset general corpus.

[0130] The information volume calculation submodule is used to calculate the information volume of the second sentence based on the obtained first word frequency and second word frequency.

[0131] In this embodiment, the second sentence is first segmented to obtain multiple sub-words, and then the text cluster to which the text to be processed belongs is determined. The first word frequency and the second word frequency of each sub-word are calculated according to the text cluster corpus and the general corpus corresponding to the text cluster. Each sub-word is comprehensively measured through different corpora, thereby improving the scientific nature of the amount of information finally obtained.

[0132] In some optional implementations of this embodiment, the second screening module 306 may include: a deletion submodule, an entity determination submodule, an entity adjustment submodule, and a statement adjustment submodule, wherein:

[0133] The deletion submodule is used to delete the second sentence whose information amount is less than a preset information amount threshold and does not contain an entity according to the obtained information amount and entity recognition result, so as to obtain at least one third sentence.

[0134] The entity determination submodule is used to determine, for each third sentence, a named entity in the third sentence according to an entity recognition result of the third sentence.

[0135] The entity adjustment submodule is used to adjust the named entities in the third sentence to standard named entities according to a preset named entity dictionary to obtain a fourth sentence.

[0136] The sentence adjustment submodule is used to process the fourth sentence according to a preset sentence structure adjustment strategy to obtain the matter information in the text to be processed.

[0137] In this embodiment, the second sentence is first screened according to the amount of information and the entity recognition results to obtain a third sentence with practical value; then, the named entities in the sentence are adjusted to standard named entities through the named entity dictionary, and the fourth sentence is adjusted through the sentence structure adjustment strategy to improve the readability and semantic coherence of the matter information.

[0138] In some optional implementations of this embodiment, the entity adjustment submodule may include: a similarity calculation unit, a bridge selection unit, a standard selection unit, and an entity replacement unit, wherein:

[0139] The similarity calculation unit is used to calculate the similarity between the named entity and each stored named entity in the preset named entity dictionary.

[0140] The bridge selection unit is used to select the existing named entity corresponding to the highest similarity as the bridge named entity.

[0141] The standard selection unit is used to select the longest named entity from the named entities of the same category as the bridge named entity recorded in the named entity dictionary as the standard named entity.

[0142] The entity replacement unit is used to replace the named entity in the third sentence with a standard named entity to obtain a fourth sentence.

[0143] In this embodiment, after finding the most similar bridge entity in the named entity dictionary based on similarity, the standard named entity is searched, and the named entity in the third sentence is replaced with the standard named entity, thereby standardizing the sentence expression.

[0144] In some optional implementations of this embodiment, the sentence adjustment submodule may include: a structure recognition unit, a sentence determination unit, a subject search unit, and an information generation unit, wherein:

[0145] The structure recognition unit is used to recognize the syntactic structure of the fourth sentence and obtain a syntactic structure recognition result.

[0146] The sentence determination unit is used to determine the fourth sentence as the matter information in the text to be processed when it is determined according to the syntactic structure recognition result that the fourth sentence contains a syntactic structure of a preset category.

[0147] The subject search unit is used to search for the subject of the fourth sentence in reverse order according to the position of the first sentence corresponding to the fourth sentence in the text to be processed when it is determined according to the syntactic structure recognition result that the fourth sentence does not contain a subject structure.

[0148] The information generating unit is used to generate the matter information in the text to be processed according to the found subject and the fourth sentence.

[0149] In this embodiment, the syntactic structure of the fourth sentence is identified, and when it is identified that the fourth sentence contains a syntactic structure of a preset category, the fourth sentence is determined to be matter information; when it is identified that the fourth sentence lacks a subject, the subject of the fourth sentence is searched and the matter information is regenerated, thereby improving the readability and completeness of the matter information.

[0150] In some optional implementations of this embodiment, the subject search unit may include: a short sentence search subunit and a subject determination subunit, wherein:

[0151] The short sentence search subunit is used to search for a short sentence containing a subject structure in reverse order according to the position of the first sentence corresponding to the fourth sentence in the text to be processed when it is determined that the fourth sentence does not contain a subject structure according to the syntactic structure recognition result.

[0152] The subject determination subunit is used to determine the subject in the first short sentence containing a subject structure found as the subject of the fourth sentence.

[0153] In this embodiment, the subject in the first short sentence containing a subject structure found in reverse order is determined as the subject of the fourth sentence, thereby ensuring the integrity of the structure of the fourth sentence.

[0154] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0155] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0156] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0157] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the matter information extraction method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0158] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the method for extracting event information.

[0159] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0160] The computer device provided in this embodiment can execute the above-mentioned method for extracting matter information. Here, the method for extracting matter information can be the method for extracting matter information in each of the above-mentioned embodiments.

[0161] In this embodiment, after obtaining the text to be processed, the similarity between the first sentence in the text to be processed and the preset background words is calculated; the background words are phrases related to the background description, and according to the similarity between the first sentence and the background words, the meaningless sentences that appear as background descriptions can be deleted to obtain the second sentence; the information amount of the second sentence is then calculated and the entity recognition is performed, and according to the information amount and entity recognition results, the second sentence with low information amount and no meaningful entity can be deleted, so that the remaining second sentence with a certain amount of information and containing the required entity can be used as matter information; the present application can automatically filter out matter information from the text, thereby improving the efficiency of obtaining matter information.

[0162] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the matter information extraction method as described above.

[0163] In this embodiment, after obtaining the text to be processed, the similarity between the first sentence in the text to be processed and the preset background words is calculated; the background words are phrases related to the background description, and according to the similarity between the first sentence and the background words, the meaningless sentences that appear as background descriptions can be deleted to obtain the second sentence; the information amount of the second sentence is then calculated and the entity recognition is performed, and according to the information amount and entity recognition results, the second sentence with low information amount and no meaningful entity can be deleted, so that the remaining second sentence with a certain amount of information and containing the required entity can be used as matter information; the present application can automatically filter out matter information from the text, thereby improving the efficiency of obtaining matter information.

[0164] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0165] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A method for extracting event information, characterized in that: The steps include: Obtaining a text to be processed containing at least one first sentence; Calculate the similarity between each first sentence and each preset background word respectively; Screening the first sentences according to the similarity to obtain at least one second sentence; Calculate the information content of each second sentence; Performing entity recognition on each of the second sentences to obtain an entity recognition result; The second sentences are screened according to the obtained information amount and entity recognition result to obtain the matter information in the text to be processed; The step of calculating the amount of information of each second sentence comprises: Perform word segmentation on each second sentence to obtain at least one subword; Determine the text cluster to which the to-be-processed text belongs by using a clustering algorithm; Determining the first word frequency of each subword according to the text cluster corpus corresponding to the text cluster, and determining the second word frequency of each subword according to a preset general corpus; Calculate the information content of the second sentence based on the obtained first word frequency and second word frequency; The step of screening the second sentences according to the obtained information volume and entity recognition results to obtain the matter information in the text to be processed includes: According to the obtained information volume and entity recognition result, the second sentence whose information volume is less than a preset information volume threshold and does not contain the entity is deleted to obtain at least one third sentence; For each third sentence, determining a named entity in the third sentence according to an entity recognition result of the third sentence; According to a preset named entity dictionary, the named entities in the third sentence are adjusted to standard named entities to obtain a fourth sentence; The fourth sentence is processed according to a preset sentence structure adjustment strategy to obtain the matter information in the text to be processed.

2. The method for extracting event information according to claim 1, characterized in that: The step of screening the first sentences according to the similarity to obtain at least one second sentence comprises: For each first sentence, the similarity between the first sentence and each of the background words is compared with a preset similarity threshold to obtain a comparison result; When it is determined according to the comparison result that there is a similarity greater than the similarity threshold, marking the first sentence as a sentence to be deleted; Each sentence to be deleted in the text to be processed is deleted to obtain at least one second sentence.

3. The method for extracting event information according to claim 1, characterized in that: The step of adjusting the named entities in the third sentence to standard named entities according to a preset named entity dictionary to obtain the fourth sentence comprises: Calculating the similarity between the named entity and each stored named entity in a preset named entity dictionary; Select the existing named entity corresponding to the highest similarity as the bridge named entity; Among the named entities of the same category as the bridge named entity recorded in the named entity dictionary, selecting the existing named entity with the longest length as the standard named entity; The named entities in the third sentence are replaced with the standard named entities to obtain a fourth sentence.

4. The method for extracting event information according to claim 1, characterized in that: The step of processing the fourth sentence according to the preset sentence structure adjustment strategy to obtain the matter information in the text to be processed includes: Recognize the syntactic structure of the fourth sentence to obtain a syntactic structure recognition result; When it is determined according to the syntactic structure recognition result that the fourth sentence contains a syntactic structure of a preset category, determining the fourth sentence as the matter information in the text to be processed; When it is determined according to the syntactic structure recognition result that the fourth sentence does not contain a subject structure, searching for the subject of the fourth sentence in reverse order according to the position of the first sentence corresponding to the fourth sentence in the text to be processed; The matter information in the text to be processed is generated according to the found subject and the fourth sentence.

5. The method for extracting event information according to claim 4, characterized in that: When it is determined according to the syntactic structure recognition result that the fourth sentence does not contain a subject structure, the step of searching for the subject of the fourth sentence in reverse order according to the position of the first sentence corresponding to the fourth sentence in the text to be processed comprises: When it is determined according to the syntactic structure recognition result that the fourth sentence does not contain a subject structure, searching in reverse order for a short sentence containing a subject structure according to the position of the first sentence corresponding to the fourth sentence in the to-be-processed text; The subject in the first short sentence containing a subject structure found is determined as the subject of the fourth sentence.

6. A device for extracting event information, characterized in that: include: A text acquisition module, used to acquire a text to be processed containing at least one first sentence; A similarity calculation module, used to calculate the similarity between each first sentence and each preset background word; A first screening module, configured to screen the first sentences according to the similarity to obtain at least one second sentence; An information volume calculation module, used for calculating the information volume of each second sentence; An entity recognition module, used to perform entity recognition on each of the second sentences to obtain an entity recognition result; A second screening module is used to screen the second sentences according to the obtained information volume and entity recognition results to obtain the matter information in the text to be processed; The calculating the amount of information of each second sentence comprises: Perform word segmentation on each second sentence to obtain at least one subword; Determine the text cluster to which the to-be-processed text belongs by using a clustering algorithm; Determining the first word frequency of each subword according to the text cluster corpus corresponding to the text cluster, and determining the second word frequency of each subword according to a preset general corpus; Calculate the information content of the second sentence based on the obtained first word frequency and second word frequency; The second sentences are screened according to the obtained information volume and entity recognition results to obtain the item information in the text to be processed, including: According to the obtained information volume and entity recognition result, the second sentence whose information volume is less than a preset information volume threshold and does not contain the entity is deleted to obtain at least one third sentence; For each third sentence, determining a named entity in the third sentence according to an entity recognition result of the third sentence; According to a preset named entity dictionary, the named entities in the third sentence are adjusted to standard named entities to obtain a fourth sentence; The fourth sentence is processed according to a preset sentence structure adjustment strategy to obtain the matter information in the text to be processed.

7. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the method for extracting matter information as described in any one of claims 1 to 5 when executing the computer-readable instructions.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the method for extracting matter information as described in any one of claims 1 to 5.