CN115544214A - Event processing method and device and computer readable storage medium - Google Patents

Event processing method and device and computer readable storage medium Download PDF

Info

Publication number
CN115544214A
CN115544214A CN202211533022.5A CN202211533022A CN115544214A CN 115544214 A CN115544214 A CN 115544214A CN 202211533022 A CN202211533022 A CN 202211533022A CN 115544214 A CN115544214 A CN 115544214A
Authority
CN
China
Prior art keywords
event
historical
entity
target
events
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211533022.5A
Other languages
Chinese (zh)
Other versions
CN115544214B (en
Inventor
牟昊
邓钢清
何宇轩
徐亚波
李旭日
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Datastory Information Technology Co ltd
Original Assignee
Guangzhou Datastory Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Datastory Information Technology Co ltd filed Critical Guangzhou Datastory Information Technology Co ltd
Priority to CN202211533022.5A priority Critical patent/CN115544214B/en
Publication of CN115544214A publication Critical patent/CN115544214A/en
Application granted granted Critical
Publication of CN115544214B publication Critical patent/CN115544214B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3346Query execution using probabilistic model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an event processing method, an event processing device and a computer readable storage medium, wherein the method comprises the following steps: event extraction is carried out on the text information by adopting an event extraction model; adopting an entity recognition model to perform entity extraction on the text information; determining a target event according to the extracted event information and the entity; calculating cosine similarity between the target event and each historical event in the event database, and judging whether the target event is the same as any one of the previous K historical events according to the previous K historical events with the highest cosine similarity, entities thereof and entities of the target event; if not, updating the target event increment to the event database; otherwise, updating the corresponding historical event in the event database; the event extraction model is adopted to extract the event, the entity recognition model is adopted to extract the entity, and the cosine similarity and the entity similarity of the event are combined to comprehensively judge the event similarity, so that the accuracy of event extraction and combination can be improved.

Description

Event processing method and device and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an event processing method, an event processing apparatus, an event processing device, and a computer-readable storage medium.
Background
Various events occur all the time in the world, the extraction of events is particularly important for combing the development of events, and the relationship between the events and characters, enterprises, industries and the like, so that the method can help people to quickly know the development process of the events, and can also promote the application of natural languages such as intelligent search, question-answering systems, recommendation, text generation and the like. However, there are several descriptions of the same event, especially chinese, which are very strange on the network, and if these same events are not combined, it will not be beneficial to the application of the event downstream, such as intelligent search: the results searched by the keywords are likely to be different descriptions of the same event, which is not beneficial for the user to filter the desired results. Therefore, how to combine the same events is also particularly important.
The existing event merging method merges similar events by the boundary distance of characters, but the boundary distance is very time-consuming, and for different events with one or two different characters, similar events can be considered, for example: the two events of 'apple issuing iphone 12' and 'apple issuing iphone 13' are different only in one character, but the two events of 'apple issuing iphone 12' and 'apple issuing iphone 13' are considered to be the same event by calculating the boundary distance.
Disclosure of Invention
Embodiments of the present invention provide an event processing method, an event processing apparatus, and a computer-readable storage medium, which can effectively improve the accuracy of event extraction and merging.
In a first aspect, an embodiment of the present invention provides an event processing method, including:
acquiring text information, and performing event extraction on the text information by adopting an event extraction model to obtain event information;
entity extraction is carried out on the text information by adopting an entity identification model, and an entity in the text information is obtained;
determining a target event according to the event information and the entity;
calculating cosine similarity between the target event and each historical event in an event database, and selecting the first K historical events with highest cosine similarity from the event database;
judging whether the target event and any one of the first K historical events are the same event or not according to the cosine similarity and the entity of the selected first K historical events and the entity of the target event;
if not, updating the target event increment to the event database;
and if so, updating the historical events which belong to the same event with the target event in the event database.
As an improvement of the above scheme, the event information includes an event and its event type, and a probability of the event type.
As an improvement of the above scheme, the determining a target event according to the event information and the entity includes:
judging whether the probability of the event type of the currently extracted event is greater than a set probability threshold value or not;
if not, discarding the currently extracted event;
if yes, judging whether the entity exists in the currently extracted event;
when the entity exists in the currently extracted event, outputting the currently extracted event as a target event;
and when the entity does not exist in the currently extracted event, discarding the currently extracted event.
As an improvement of the above solution, the calculating cosine similarity between the target event and each historical event in an event database, and selecting the top K historical events with the highest cosine similarity from the event database includes:
inputting the target event into a vector model to obtain an event vector of the target event;
calculating cosine similarity between the event vector and each historical event in an event database;
and selecting the first K historical events with the highest cosine similarity from the event database.
As an improvement of the above, the method further comprises:
and carrying out standardization processing on the currently extracted entity through a preset normalization code table.
As an improvement of the above scheme, the determining, according to the cosine similarity of the selected previous K historical events and the entities thereof, and the entity of the target event, whether the target event is the same as any one of the previous K historical events includes:
for the previous K historical events, judging whether the cosine similarity between the ith historical event and the target event is greater than a preset similarity threshold value or not;
if not, determining that the target event is not the same as the ith historical event;
if yes, judging whether the standardized entity is the same as the entity corresponding to the ith historical event or not;
when the standardized entity is different from the entity corresponding to the ith historical event, extracting the (i + 1) th historical event, and returning to a cosine similarity judgment process; i is more than or equal to 1 and less than or equal to K-1;
when the standardized entity is the same as the entity corresponding to the ith historical event, inputting the target event and the ith historical event into an event similarity judgment model to obtain an event judgment result; and the event judgment result comprises the same event and different events.
As an improvement of the above scheme, between the extraction of the (i + 1) th historical event, the method further comprises the following steps:
judging whether the ith historical event is the last historical event in the previous K historical events;
if yes, determining that the target event and the ith historical event are not the same event;
if not, extracting the (i + 1) th historical event.
As an improvement of the above solution, the updating the historical event in the event database, which belongs to the same event as the target event, includes:
updating fields of historical events which belong to the same event as the target event in the event database;
wherein the field includes an occurrence time and a volume of the corresponding event.
In a second aspect, an embodiment of the present invention provides an event processing device, including: a processor; a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the event handling method according to any one of the first aspect when executing the computer program.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program runs, a device in which the computer-readable storage medium is located is controlled to execute the event processing method according to any one of the first aspect.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: obtaining event information by obtaining text information and adopting an event extraction model to carry out event extraction on the text information; adopting an entity recognition model to perform entity extraction on the text information to obtain an entity in the text information; determining a target event according to the event information and the entity; calculating cosine similarity between the target event and each historical event in an event database, and selecting the first K historical events with highest cosine similarity from the event database; judging whether the target event and any one of the first K historical events are the same event or not according to the cosine similarity and the entity of the selected first K historical events and the entity of the target event; if not, updating the target event increment to the event database; if yes, updating historical events which belong to the same event as the target event in the event database; the invention adopts an event extraction model to extract events, an entity recognition model to extract entities, and the cosine similarity and the entity similarity of the events are combined to comprehensively judge the similarity of the events; and if the events are judged to belong to the same event, directly updating the corresponding historical events in the event database, and if the events are judged not to belong to the same event, updating the event increment into the event database, so that the accuracy of event extraction and combination can be improved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings occupied in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of an event processing method according to an embodiment of the present invention;
FIG. 2 is a flow diagram of event extraction provided by an embodiment of the present invention;
FIG. 3 is a flow diagram of event merging provided by an embodiment of the present invention;
fig. 4 is a schematic diagram of an event processing device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Example one
Please refer to fig. 1, which is a flowchart illustrating an event processing method according to an embodiment of the present invention, the event processing method includes:
s1: acquiring text information, and performing event extraction on the text information by adopting an event extraction model to obtain event information;
for example, an API tool may be used to crawl text information from web pages such as websites, microblogs, wechat posts, etc., for example: the # Gong X Xun XX brand speaker # Xia to// @ regeneration is Yu Cheng En, the # Gong X Xun XX brand speaker # is delicious and stays between lips, and happiness is put in the heart. The sweet blessing is delivered to you, the best taste is melted you-and-Xue XX @ Xuxu Chinese brand name Gong' X @ Gong X Simon together, we wish you summer to happy!
And inputting the crawled text information into a pre-constructed event extraction model, and extracting the event information of the text information. The event extraction model is constructed by adopting a BERT model. It should be noted that the BERT model belongs to the prior art, and is not explained in the embodiment of the present invention.
The event information comprises an event and an event type thereof, and the probability of the event type. The event comprises three elements of a subject, a predicate and an object. Taking the text information as an example, inputting the text information into the BERT model, the event can be obtained as follows: "Gong X", "speakers", xun XX ", the event types are: by way of introduction, the probability of an event type is: 0.9988. it should be noted that the event type may be predefined and configured in the event extraction model, so as to perform event type classification and probability prediction on the input text information.
S2: adopting an entity recognition model to perform entity extraction on the text information to obtain an entity in the text information;
in the embodiment of the present invention, the entity may be obtained by inputting the text information into an entity recognition model, for example: { brand: xu XX, name of person: gong X }.
S3: determining a target event according to the event information and the entity;
s4: calculating cosine similarity between the target event and each historical event in an event database, and selecting the first K historical events with highest cosine similarity from the event database;
s5: judging whether the target event and any one of the first K historical events are the same event or not according to the cosine similarity and the entity of the selected first K historical events and the entity of the target event;
s6: if not, updating the target event increment to the event database;
s7: and if so, updating the historical events which belong to the same event with the target event in the event database.
In the embodiment of the invention, an event extraction model is adopted for extracting events, an entity recognition model is used for extracting entities, and the cosine similarity and the entity similarity of the events are combined to comprehensively judge the similarity of the events; and if the events are judged to belong to the same event, directly updating the corresponding historical events in the event database, and if the events are judged not to belong to the same event, updating the event increment into the event database, so that the accuracy of event extraction and combination can be improved.
In an optional embodiment, the determining a target event according to the event information and the entity includes:
judging whether the probability of the event type of the currently extracted event is greater than a set probability threshold value or not;
if not, discarding the currently extracted event;
if yes, judging whether the entity exists in the currently extracted event;
when the entity exists in the currently extracted event, outputting the currently extracted event as a target event;
and when the entity does not exist in the currently extracted event, discarding the currently extracted event.
Illustratively, the entity recognition model is constructed using a BERT model. The event extraction process is as shown in fig. 2, and text information is input into an event extraction model to obtain the probability of an event and the event type; inputting the text information into an entity recognition model to obtain an entity; in order to reduce calculation, whether the probability of the event type is greater than a preset probability threshold value or not can be judged, if not, the event is directly discarded, and corresponding text information is not input into an entity recognition model to carry out entity extraction; if so, retaining the event, and simultaneously inputting the corresponding text information into the entity recognition model to obtain an entity; and then judging whether the reserved event has an entity output by the entity recognition model, if not, discarding the event, and if so, outputting the event as a target event. For example, set the probability threshold to 0.7, at which time the event "goer X generation xu XX" is retained, and the entity { brand: xu XX, name of person: gong X, and outputting the currently extracted event as a target event. In the embodiment of the invention, the event is extracted by using the event extraction model, the entity recognition model and the event probability threshold value together, so that the accuracy of event extraction can be improved.
In an optional embodiment, the calculating cosine similarity between the target event and each historical event in an event database, and selecting the top K historical events with the highest cosine similarity from the event database includes:
inputting the target event into a vector model to obtain an event vector of the target event;
calculating cosine similarity between the event vector and each historical event in an event database;
and selecting the first K historical events with the highest cosine similarity from the event database.
Illustratively, the vector model is constructed by adopting a BERT model, 768-dimensional event vectors for representing the target event can be obtained by inputting the target event Gong X pronoun XX into the vector model, cosine similarity between the event vectors and each historical event in an event database is calculated, topK historical events with the highest cosine similarity are selected, and then the polarity of the topK events is sequenced from large to small according to the cosine similarity. The cosine similarity distance calculation formula of the event vector and the historical event is as follows:
Figure 159080DEST_PATH_IMAGE001
where n represents the dimension of the event vector, x i The i component, y, of the corresponding target vector representing the target event i Representing the ith component of the time vector corresponding to the historical time. It should be noted that 768-dimensional event vectors that characterize the historical events can also be obtained by inputting the historical events into the vector model. In order to reduce data display, setting K to 3, at this time, selecting the first 3 historical events with the largest cosine similarity, and sorting the cosine similarities from large to small, for example:
historical event 1: gong X becomes Xu XX brand speaker, entity: gong X, xu XX, cosine similarity: 0.98.
historical event 2: gong X for Yanshu XX, entity: goujin, shu XX, cosine similarity: 0.62.
historical event 3: gong X generation Charlotte Tilbury, entity: gong X, charlotte Tilbury, cosine similarity: 0.45.
in an optional embodiment, the method further comprises:
and carrying out standardization processing on the currently extracted entity through a preset normalization code table.
The normalized code table records different alternative names and standard names of the brand entities. For example, the normalized code table includes a key column in which a standard name is recorded and a word column in which an alternative name of the standard name is recorded; if the brand entity exists in the target event and exists in the word column of the normalized code table, the brand entity is replaced by the standard name corresponding to the key column, and the standardization processing of the event entity is realized so as to facilitate the combination of similar events.
Further, the determining, according to the cosine similarity of the selected first K historical events and the entities thereof, whether the target event is the same as any one of the previous K historical events includes:
for the previous K historical events, judging whether the cosine similarity between the ith historical event and the target event is greater than a preset similarity threshold value or not;
if not, determining that the target event is not the same as the ith historical event;
if yes, judging whether the standardized entity is the same as the entity corresponding to the ith historical event;
when the standardized entity is different from the entity corresponding to the ith historical event, extracting the (i + 1) th historical event, and returning to a cosine similarity judgment process; i is more than or equal to 1 and less than or equal to K-1;
when the standardized entity is the same as the entity corresponding to the ith historical event, inputting the target event and the ith historical event into an event similarity judgment model to obtain an event judgment result; the event judgment result comprises the same event and different events.
Further, between the extraction of the (i + 1) th historical event, the method further comprises the following steps:
judging whether the ith historical event is the last historical event in the previous K historical events;
if yes, determining that the target event is not the same as the ith historical event;
if not, extracting the (i + 1) th historical event.
The process of event merging is shown in fig. 3, the target event is input into a vector model to obtain an event vector, then cosine similarity between the event vector and historical events in an event database is calculated, and topK historical events are selected; and meanwhile, the normalization code table is adopted to carry out normalization processing on the entity output by the entity recognition model, so as to obtain a normalized entity. Then, taking a historical event according to the sequence of cosine similarity from large to small, judging whether the cosine similarity of the historical event is greater than a preset similarity threshold, if not, indicating that the target event is a new event, and incrementally storing the event in an event database; if yes, further judging whether the entity in the historical event is the same as the standardized entity; if the entities are the same, an event similarity judgment model is adopted to judge whether the target event and the historical event are the same event; if the events are the same, merging the target event and the historical event, if the events are not the same, indicating that the target event is a new event, and incrementally storing the new event in an event database. If the entities are different, judging whether the historical event is the last event in the topK historical events; if not, the target event is a new event, and the increment is stored in an event database; if yes, taking the next historical event from the topK historical events, and repeating the merging process.
And the event similarity judgment model is constructed by adopting a BERT model. For example, the similarity threshold is set to 0.85. For the above-mentioned topK historical events: historical event 1, historical event 2, historical event 3; selecting a historical event 1: gong X becomes the Xuxx brand speaker, the cosine similarity of the historical event to the target event: 0.98, which is greater than a preset similarity threshold value of 0.85; historical event 1: gong X becomes the entity in Xuxx brand speakers: gong X and Xun XX, the entity of the target event "Gong X for Xun XX" is: xuxx and Gong X, namely the historical event 1 is the same as the target event, the historical event 1 and the target event are merged, and the related information of the historical event 1 in the time database is updated. In the embodiment of the invention, the cosine similarity, the event similarity judgment model and the entity similarity are utilized to comprehensively judge the event similarity, so that similar events are merged, the accuracy of event merging can be further improved, and the repeated retention of similar events is avoided.
In an alternative embodiment, the updating the historical events belonging to the same event as the target event in the event database includes:
updating fields of historical events which belong to the same event as the target event in the event database;
wherein the field includes an occurrence time and a volume of the corresponding event.
In the embodiment of the invention, the historical events stored in the event database are provided with fields for representing the occurrence time and the volume of sound of the events; updating the occurrence time and the sound volume of the event corresponding to the field of the historical event when the target event is identified to be the same as one historical event in the event database; wherein, every time an event similar to the historical event is identified, the sound volume is increased by 1.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: in the event extraction stage, a probability threshold value is set to filter the events output by the event extraction model, so that the events with low confidence coefficient can be filtered, and the entity identification can be set to filter the non-concerned events, thereby avoiding the false extraction, incomplete extraction and unimportant event extraction of the event extraction model; in the event merging stage, whether the events are the same event is judged by using the cosine similarity and the brand entity, and meanwhile, the brand entity is used for standardization, so that the same events are prevented from being extracted repeatedly, and the event extraction accuracy and the event merging accuracy are effectively improved.
Example two
Referring to fig. 4, which is a schematic diagram of an event processing apparatus according to an embodiment of the present invention, the event processing apparatus of the embodiment includes: a processor 100, a memory 200 for storing one or more computer programs; such as event handlers. When the one or more computer programs are executed by the processor 100, the processor 100 can implement the event processing method according to any one of the embodiments, for example, steps S1 to S7 shown in fig. 1, and can achieve the same technical effect, and the details are not repeated here to avoid repetition. Alternatively, the processor implements the functions of the modules/units in the above device embodiments when executing the computer program.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the event processing device.
The event processing device can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing devices. The event processing device may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of an event processing device, and does not constitute a limitation of the event processing device, and may include more or fewer components than those shown, or some components may be combined, or different components, for example, the event processing device may further include an input-output device, a network access device, a bus, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center for the event processing device, with various interfaces and lines connecting the various parts of the overall event processing device.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the event processing device by executing or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the module/unit integrated with the event processing device can be stored in a computer readable storage medium if it is implemented in the form of software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
EXAMPLE III
The embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, where the computer program controls, when running, a device in which the computer-readable storage medium is located to execute the event processing method according to any one of the embodiments, and the same technical effect can be achieved, and in order to avoid repetition, details are not repeated here.
It should be noted that the above-described embodiments of the apparatus are merely illustrative, where the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. An event processing method, comprising:
acquiring text information, and performing event extraction on the text information by adopting an event extraction model to obtain event information;
entity extraction is carried out on the text information by adopting an entity identification model, and an entity in the text information is obtained;
determining a target event according to the event information and the entity;
calculating cosine similarity between the target event and each historical event in an event database, and selecting the first K historical events with highest cosine similarity from the event database;
judging whether the target event and any one of the first K historical events are the same event or not according to the cosine similarity and the entity of the selected first K historical events and the entity of the target event;
if not, updating the target event increment to the event database;
and if so, updating the historical events which belong to the same event with the target event in the event database.
2. The event processing method according to claim 1, wherein the event information includes an event and its event type, and a probability of the event type.
3. The event processing method of claim 2, wherein said determining a target event based on said event information and said entity comprises:
judging whether the probability of the event type of the currently extracted event is greater than a set probability threshold value or not;
if not, discarding the currently extracted event;
if yes, judging whether the entity exists in the event extracted currently;
when the entity exists in the currently extracted event, outputting the currently extracted event as a target event;
and when the entity does not exist in the currently extracted event, discarding the currently extracted event.
4. The event processing method according to claim 1, wherein the calculating cosine similarity between the target event and each historical event in an event database, and selecting the top K historical events with highest cosine similarity from the event database comprises:
inputting the target event into a vector model to obtain an event vector of the target event;
calculating cosine similarity between the event vector and each historical event in an event database;
and selecting the first K historical events with the highest cosine similarity from the event database.
5. The event processing method of claim 1, wherein the method further comprises:
and carrying out standardization processing on the currently extracted entity through a preset normalization code table.
6. The event processing method according to claim 5, wherein the determining, according to the cosine similarity of the selected first K historical events and the entities thereof, and the entity of the target event, whether the target event is the same as any one of the previous K historical events comprises:
for the previous K historical events, judging whether the cosine similarity between the ith historical event and the target event is greater than a preset similarity threshold value or not;
if not, determining that the target event is not the same as the ith historical event;
if yes, judging whether the standardized entity is the same as the entity corresponding to the ith historical event;
when the standardized entity is different from the entity corresponding to the ith historical event, extracting the (i + 1) th historical event, and returning to a cosine similarity judgment process; i is more than or equal to 1 and less than or equal to K-1;
when the standardized entity is the same as the entity corresponding to the ith historical event, inputting the target event and the ith historical event into an event similarity judgment model to obtain an event judgment result; the event judgment result comprises the same event and different events.
7. The event processing method according to claim 6, further comprising, between extracting the i +1 th historical event:
judging whether the ith historical event is the last historical event in the previous K historical events;
if yes, determining that the target event is not the same as the ith historical event;
if not, extracting the (i + 1) th historical event.
8. The event processing method according to claim 1, wherein said updating the historical events belonging to the same event as the target event in the event database comprises:
updating fields of historical events which belong to the same event as the target event in the event database;
wherein the fields include an occurrence time and a volume of sound of the corresponding event.
9. An event processing apparatus characterized by comprising: a processor; a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the event processing method of any of claims 1-8 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the event processing method according to any one of claims 1 to 8.
CN202211533022.5A 2022-12-02 2022-12-02 Event processing method, device and computer readable storage medium Active CN115544214B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211533022.5A CN115544214B (en) 2022-12-02 2022-12-02 Event processing method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211533022.5A CN115544214B (en) 2022-12-02 2022-12-02 Event processing method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN115544214A true CN115544214A (en) 2022-12-30
CN115544214B CN115544214B (en) 2023-06-23

Family

ID=84722346

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211533022.5A Active CN115544214B (en) 2022-12-02 2022-12-02 Event processing method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115544214B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112628A (en) * 2023-09-08 2023-11-24 廊坊丛林科技有限公司 Logistics data updating method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424281A (en) * 2013-08-30 2015-03-18 宏碁股份有限公司 Integration method and system of event
CN110399478A (en) * 2018-04-19 2019-11-01 清华大学 Event finds method and apparatus
CN112908488A (en) * 2021-02-09 2021-06-04 北京药明津石医药科技有限公司 Event recognition method and device, computer equipment and storage medium
CN114676346A (en) * 2022-03-17 2022-06-28 平安科技(深圳)有限公司 News event processing method and device, computer equipment and storage medium
CN115129882A (en) * 2022-05-19 2022-09-30 广州数说故事信息科技有限公司 Event context analysis method based on knowledge graph, storage medium and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424281A (en) * 2013-08-30 2015-03-18 宏碁股份有限公司 Integration method and system of event
CN110399478A (en) * 2018-04-19 2019-11-01 清华大学 Event finds method and apparatus
CN112908488A (en) * 2021-02-09 2021-06-04 北京药明津石医药科技有限公司 Event recognition method and device, computer equipment and storage medium
CN114676346A (en) * 2022-03-17 2022-06-28 平安科技(深圳)有限公司 News event processing method and device, computer equipment and storage medium
CN115129882A (en) * 2022-05-19 2022-09-30 广州数说故事信息科技有限公司 Event context analysis method based on knowledge graph, storage medium and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112628A (en) * 2023-09-08 2023-11-24 廊坊丛林科技有限公司 Logistics data updating method and system

Also Published As

Publication number Publication date
CN115544214B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN111814770B (en) Content keyword extraction method of news video, terminal device and medium
WO2020237856A1 (en) Smart question and answer method and apparatus based on knowledge graph, and computer storage medium
CN110457672B (en) Keyword determination method and device, electronic equipment and storage medium
CN110851598B (en) Text classification method and device, terminal equipment and storage medium
CN111831804B (en) Method and device for extracting key phrase, terminal equipment and storage medium
WO2019041521A1 (en) Apparatus and method for extracting user keyword, and computer-readable storage medium
WO2020000717A1 (en) Web page classification method and device, and computer-readable storage medium
US8782042B1 (en) Method and system for identifying entities
CN110928992B (en) Text searching method, device, server and storage medium
CN114357117A (en) Transaction information query method and device, computer equipment and storage medium
CN115840808A (en) Scientific and technological project consultation method, device, server and computer-readable storage medium
TW202123026A (en) Data archiving method, device, computer device and storage medium
CN111814481B (en) Shopping intention recognition method, device, terminal equipment and storage medium
CN115544214A (en) Event processing method and device and computer readable storage medium
CN113741864A (en) Automatic design method and system of semantic service interface based on natural language processing
CN111401034A (en) Text semantic analysis method, semantic analysis device and terminal
CN113128205A (en) Script information processing method and device, electronic equipment and storage medium
CN114842982B (en) Knowledge expression method, device and system for medical information system
CN115098794A (en) Public opinion manufacturing group identification method, device, equipment and storage medium
CN114461790A (en) Automatic news event theme generation method and device, electronic equipment and storage medium
CN111259209A (en) User intention prediction method based on artificial intelligence, electronic device and storage medium
CN112182235A (en) Method and device for constructing knowledge graph, computer equipment and storage medium
CN113934842A (en) Text clustering method and device and readable storage medium
CN112528646A (en) Word vector generation method, terminal device and computer-readable storage medium
CN116702024B (en) Method, device, computer equipment and storage medium for identifying type of stream data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant