CN116450814A - Event processing method, device, equipment and medium based on event processing model - Google Patents
Event processing method, device, equipment and medium based on event processing model Download PDFInfo
- Publication number
- CN116450814A CN116450814A CN202210003231.2A CN202210003231A CN116450814A CN 116450814 A CN116450814 A CN 116450814A CN 202210003231 A CN202210003231 A CN 202210003231A CN 116450814 A CN116450814 A CN 116450814A
- Authority
- CN
- China
- Prior art keywords
- event
- topic
- processed
- features
- fusion
- 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.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 144
- 238000003672 processing method Methods 0.000 title claims abstract description 31
- 230000004927 fusion Effects 0.000 claims abstract description 241
- 238000000605 extraction Methods 0.000 claims abstract description 98
- 238000012549 training Methods 0.000 claims description 187
- 238000000034 method Methods 0.000 claims description 96
- 230000006870 function Effects 0.000 claims description 49
- 238000007477 logistic regression Methods 0.000 claims description 31
- 230000009471 action Effects 0.000 claims description 28
- 230000015654 memory Effects 0.000 claims description 25
- 238000013507 mapping Methods 0.000 claims description 19
- 238000007499 fusion processing Methods 0.000 claims description 16
- 238000003860 storage Methods 0.000 claims description 16
- 238000004458 analytical method Methods 0.000 claims description 8
- 230000002708 enhancing effect Effects 0.000 claims description 8
- 238000012163 sequencing technique Methods 0.000 claims description 4
- 230000001960 triggered effect Effects 0.000 claims description 4
- 239000010410 layer Substances 0.000 description 165
- 230000000875 corresponding effect Effects 0.000 description 117
- 230000008569 process Effects 0.000 description 45
- 238000010586 diagram Methods 0.000 description 37
- 239000013598 vector Substances 0.000 description 31
- 238000004590 computer program Methods 0.000 description 11
- 238000012216 screening Methods 0.000 description 11
- 230000002596 correlated effect Effects 0.000 description 10
- 238000003058 natural language processing Methods 0.000 description 10
- 230000004044 response Effects 0.000 description 10
- 230000010354 integration Effects 0.000 description 9
- 238000005457 optimization Methods 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000002457 bidirectional effect Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 239000002356 single layer Substances 0.000 description 4
- 238000013473 artificial intelligence Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000007797 corrosion Effects 0.000 description 2
- 238000005260 corrosion Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 238000005065 mining Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000002123 temporal effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000010485 coping Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 239000013604 expression vector Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 230000007787 long-term memory Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
- G06F16/353—Clustering; Classification into predefined classes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
- G06F40/295—Named entity recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
- G06N20/20—Ensemble learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Business, Economics & Management (AREA)
- Strategic Management (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Economics (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Medical Informatics (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Development Economics (AREA)
- Evolutionary Computation (AREA)
- Game Theory and Decision Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Databases & Information Systems (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application provides an event processing method based on an event processing model, which comprises the following steps: respectively extracting semantic features of the event to be processed and each topic event through a semantic feature extraction layer of the event processing model to obtain corresponding semantic features; then, respectively extracting time difference features of the event to be processed and each topic event according to the reference time by a time difference feature extraction layer to obtain corresponding time difference features; the semantic features of the events to be processed and the corresponding time difference features are respectively fused with the semantic features of the events of each topic and the corresponding time difference features through a feature fusion layer, so that corresponding fusion features are obtained; and finally, predicting the correlation between the event to be processed and the target topic based on the event to be processed and the corresponding fusion characteristics of each topic event through an output layer, and obtaining a corresponding prediction result. Therefore, the accuracy rate of event processing can be improved, and the correlation between the event and the target topic can be accurately predicted.
Description
Technical Field
The present disclosure relates to artificial intelligence technology, and in particular, to an event processing method, an event processing device, an electronic device, and a computer readable storage medium based on an event processing model.
Background
For topics with longer duration (often consisting of a plurality of occurred events), when the latest progress event is acquired, the correlation between the latest progress event and the corresponding target topics needs to be determined, and then the latest progress event is integrated under the corresponding topics to form event context containing the latest progress event, so that a user can intuitively know the progress of the event through the event context.
Generally, in order to integrate the latest progress event under the topic, a clustering manner is generally adopted, that is, the latest progress event and the topic are clustered in an incremental manner, so as to determine the correlation between the latest progress event and the topic according to a clustering center and a threshold value, and then determine the topic to which the latest progress event belongs, so as to integrate the latest progress event to the topic to which the latest progress event belongs. However, when the above prediction of the correlation between the latest progress event and the topic is performed by incremental clustering, the accuracy of clustering is low, so that the accuracy of predicting the correlation between the latest progress event and the topic is also low, and further, when the latest progress event is integrated into the topic, the accuracy of event integration is low.
Disclosure of Invention
The embodiment of the application provides an event processing method, an event processing device, electronic equipment, a computer readable storage medium and a computer program product based on an event processing model, which can improve the prediction accuracy of the event processing model so as to accurately predict the correlation between an event and a target topic.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides an event processing method based on an event processing model, wherein the event processing model comprises the following steps: the method comprises a semantic feature extraction layer, a time difference feature extraction layer, a feature fusion layer and an output layer, and the method comprises the following steps:
respectively extracting semantic features of an event to be processed and at least one topic event through the semantic feature extraction layer to obtain semantic features of the event to be processed and semantic features of each topic event;
wherein the at least one topic event belongs to the same target topic;
performing time difference feature extraction on the time difference between the occurrence time of the event to be processed and the reference time through the time difference feature extraction layer to obtain time difference features of the event to be processed, and performing time difference feature extraction on the time difference between the occurrence time of each topic event and the reference time to obtain time difference features of each topic event;
Fusing semantic features of the events to be processed and corresponding time difference features through the feature fusion layer to obtain fusion features of the events to be processed, and fusing semantic features of the topic events and corresponding time difference features to obtain fusion features of the topic events;
and predicting the correlation between the event to be processed and the target topic based on the fusion characteristics of the event to be processed and the fusion characteristics of each topic event through the output layer, so as to obtain a corresponding prediction result.
The embodiment of the application provides an event processing device based on an event processing model, wherein the event processing model comprises: semantic feature extraction layer, time difference feature extraction layer, feature fusion layer and output layer, the device includes:
the semantic feature extraction module is used for extracting semantic features of an event to be processed and at least one topic event through the semantic feature extraction layer respectively to obtain semantic features of the event to be processed and semantic features of each topic event; wherein the at least one topic event belongs to the same target topic;
the time difference feature extraction module is used for extracting time difference features of the occurrence time of the event to be processed and the time difference of the reference time through the time difference feature extraction layer to obtain time difference features of the event to be processed, and extracting time difference features of the occurrence time of each topic event and the time difference of the reference time to obtain time difference features of each topic event;
The feature fusion module is used for fusing the semantic features of the event to be processed with the corresponding time difference features through the feature fusion layer to obtain fusion features of the event to be processed, and fusing the semantic features of each topic event with the corresponding time difference features to obtain fusion features of each topic event;
the output module is used for predicting the correlation between the event to be processed and the target topic based on the fusion characteristics of the event to be processed and the fusion characteristics of each topic event through the output layer, so as to obtain a corresponding prediction result.
In the above scheme, the device further comprises a screening module, wherein the screening module is used for acquiring at least one topic from the topic library and determining topic keywords of each topic; matching the content of the event to be processed with topic keywords of each topic respectively to obtain corresponding matching results; and when the obtained matching result represents that topics matched with the event to be processed exist in the at least one topic, determining the topics matched with the event to be processed as the target topics.
In the above solution, the screening module is further configured to perform, for each of the topics, the following processing: determining at least one topic event contained in the topic, and acquiring at least two event keywords of each topic event; selecting a target number of event keywords from at least two event keywords of each topic event as topic keywords of the topic.
In the above scheme, the screening module is further configured to identify an entity of the content of each topic event, obtain at least one entity keyword corresponding to a preset entity type, and use the entity keyword as a candidate event keyword of the topic event; performing character weight analysis on the content of each topic event to obtain at least one action keyword, and taking the action keyword as a candidate event keyword of the topic event; and selecting at least two candidate event keywords from the obtained candidate event keywords as event keywords of the topic event.
In the above scheme, the screening module is further configured to count the number of occurrences of different event keywords in at least two event keywords of each topic event; according to the occurrence times, at least two event keywords of each topic event are ordered in a descending order, and an ordering result is obtained; and sequentially selecting event keywords from the first event keyword of the sequencing result until a target number of event keywords are selected as topic keywords of the topics.
In the above scheme, the semantic feature extraction module is further configured to extract intermediate semantic features of the event to be processed and each topic event, so as to obtain intermediate semantic features of the event to be processed and intermediate semantic features of each topic event; based on the distinguishing identification of the events to be processed, enhancing the intermediate semantic features of the events to be processed to obtain the semantic features of the events to be processed, and based on the distinguishing identification of the events to be processed, enhancing the intermediate semantic features of the events to be processed to obtain the semantic features of the events to be processed.
In the above scheme, the time difference feature extraction module is further configured to perform a difference processing on the occurrence time of each topic event and the reference time, so as to obtain a time difference between each topic event and the reference time; acquiring a mapping relation between the time difference and the time difference characteristic; and determining the time difference characteristic of each topic event based on the mapping relation and the time difference between each topic event and the reference time.
In the above scheme, the feature fusion module is further configured to fuse the semantic feature of the event to be processed with a corresponding time difference feature to obtain a fused feature of the event to be processed; and carrying out fusion processing on the semantic features of each topic event and the corresponding time difference features to obtain fusion features of each topic event.
In the above scheme, the output layer includes a first fusion layer and a first prediction layer, and the output module is further configured to perform feature fusion on the fusion feature of the event to be processed and the fusion feature of each topic event through the first fusion layer, so as to obtain a first target fusion feature; and predicting the correlation between the event to be processed and the target topic based on the first target fusion characteristic through the first prediction layer to obtain a corresponding prediction result.
In the above scheme, the output layer includes a second fusion layer and a second prediction layer, and the output module is further configured to perform feature fusion on the fusion features of each topic event through the second fusion layer to obtain a second target fusion feature; and predicting the correlation between the event to be processed and the target topic based on the fusion characteristic of the event to be processed and the second target fusion characteristic through the second prediction layer to obtain a corresponding prediction result.
In the above scheme, the output layer includes a two-classification layer, and the output module is further configured to, through the two-classification layer, perform two-classification on a correlation between the event to be processed and the target topic based on the fusion feature of the event to be processed and the fusion feature of each topic event, to obtain a two-classification result; the classification result is used for indicating whether the event to be processed is related to the target topic or not.
In the above scheme, the output layer includes a logistic regression layer, and the output module is further configured to predict, through the logistic regression layer, a relevance score for a relevance relationship between the event to be processed and the target topic based on the fusion feature of the event to be processed and the fusion feature of each topic event, so as to obtain a score for indicating a relevance degree between the event to be processed and the target topic.
In the above solution, the apparatus further includes an integration module, where the integration module is configured to integrate, when the prediction result indicates that the event to be processed is related to the target topic, the event to be processed into the target topic according to an occurrence time of the event, so as to obtain an event context corresponding to the target topic, where the event context includes the event to be processed and at least one topic event.
In the above scheme, the device further comprises a presenting module, wherein the presenting module is used for presenting the event searching control; and responding to an event searching operation aiming at the target topic and triggered based on the event searching control, and presenting the event context.
In the above scheme, the device further comprises a training module, wherein the training module is used for acquiring event training samples carrying labels and corresponding topic training samples; the label is used for indicating the correlation between the event training sample and the corresponding topic training sample, and the topic training sample comprises at least one topic sample event; extracting semantic features of the event training samples and the topic sample events through the semantic feature extraction layer respectively to obtain semantic features of the event training samples and semantic features of the topic sample events; performing time difference feature extraction on the time difference between the occurrence time of the event training sample and the reference time through the time difference feature extraction layer to obtain time difference features of the event training sample, and performing time difference feature extraction on the time difference between the occurrence time of each topic sample event and the reference time to obtain time difference features of each topic sample event; fusing semantic features of the event training samples and corresponding time difference features through the feature fusion layer to obtain fusion features of the event training samples, and fusing semantic features of each topic sample event and corresponding time difference features to obtain fusion features of each topic sample event; predicting the correlation between the event training sample and the topic training sample based on the fusion characteristics of the event training sample and the fusion characteristics of each topic sample event through the output layer to obtain a corresponding prediction result; and comparing the predicted result with the label to obtain the difference between the predicted result and the label, and updating the model parameters of the event processing model based on the difference.
In the above scheme, the output layer includes a two-classification layer and a logistic regression layer, and the output module is further configured to, through the two-classification layer, perform two-classification on a correlation between the event training sample and the topic training sample based on the fusion feature of the event training sample and the fusion feature of each topic sample event, to obtain a classification result, and perform, through the logistic regression layer, a correlation score prediction on a correlation between the event training sample and the topic training sample based on the fusion feature of the event training sample and the fusion feature of each topic sample event, to obtain a score for indicating a degree of correlation between the event training sample and the topic training sample; acquiring a first loss function corresponding to the classification layer, the classification result and a first difference of the classification sub-labels in the labels, determining a value of the first loss function based on the first difference, acquiring a second loss function corresponding to the logistic regression layer, the score and a second difference of the molecular labels in the labels, and determining a value of the second loss function based on the second difference; and determining the value of a target loss function corresponding to the event processing model by combining the value of the first loss function and the value of the second loss function, and updating model parameters of the event processing model based on the value of the target loss function.
The embodiment of the application also provides a training method of the event processing model, wherein the event processing model comprises the following steps: the method comprises a semantic feature extraction layer, a time difference feature extraction layer, a feature fusion layer and an output layer, and the method comprises the following steps:
respectively extracting semantic features of an event training sample carrying a tag and at least one topic sample event through the semantic feature extraction layer to obtain semantic features of the event training sample and semantic features of each topic sample event;
wherein the at least one topic sample event belongs to the same topic training sample, and the tag is used for indicating the correlation between the event training sample and the topic training sample;
performing time difference feature extraction on the time difference between the occurrence time of the event training sample and the reference time through the time difference feature extraction layer to obtain time difference features of the event training sample, and performing time difference feature extraction on the time difference between the occurrence time of each topic sample event and the reference time to obtain time difference features of each topic sample event;
fusing semantic features of the event training samples and corresponding time difference features through the feature fusion layer to obtain fusion features of the event training samples, and fusing semantic features of each topic sample event and corresponding time difference features to obtain fusion features of each topic sample event;
Predicting the correlation between the event training sample and the topic training sample based on the fusion characteristics of the event training sample and the fusion characteristics of each topic sample event through the output layer to obtain a corresponding prediction result;
and obtaining the difference between the prediction result and the label, and training the event processing model based on the difference so as to predict the correlation between the event to be processed and the target topic comprising at least one topic event through the event processing model obtained through training.
An embodiment of the present application provides an electronic device, including:
a memory for storing executable instructions;
and the processor is used for realizing the event processing method based on the event processing model when executing the executable instructions stored in the memory.
An embodiment of the present application provides an electronic device, including:
a memory for storing executable instructions;
and the processor is used for realizing the training method of the event processing model provided by the embodiment of the application when executing the executable instructions stored in the memory.
The embodiment of the application provides a computer readable storage medium, which stores executable instructions for causing a processor to execute, so as to implement an event processing method based on an event processing model.
The embodiment of the application provides a computer readable storage medium, which stores executable instructions for causing a processor to execute, so as to implement the training method of the event processing model provided by the embodiment of the application.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the event processing method based on the event processing model provided by the embodiment of the application.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the training method of the event processing model provided by the embodiment of the application.
The embodiment of the application has the following beneficial technical effects:
When the correlation between the event to be processed and the target topic is predicted, the semantic features of the event to be processed and the corresponding time difference features are fused, and the semantic features of each topic event in the target topic and the corresponding time difference features are fused, so that the fusion features of the event to be processed and the fusion features of each topic event are obtained, then the correlation between the event to be processed and the target topic is predicted based on the fusion features of the event to be processed and the fusion features of each topic event, and thus, the context semantic information and the time difference information of the event to be processed and the target topic are fully utilized, the correlation between the event to be processed and the target topic is accurately predicted, and the event integration accuracy is improved when the event to be processed is integrated to the topic.
Drawings
FIG. 1 is a schematic architecture diagram of an event processing system based on an event processing model provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 3 is a flowchart of an event processing method based on an event processing model according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an event handling model according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of determining a target topic associated with an event to be processed provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of an event processing method based on an event processing model provided in an embodiment of the present application;
FIG. 7 is a flow chart of a process for determining topic keywords for a topic provided by an embodiment of the present application;
FIG. 8 is a flow chart of a process for determining event keywords for each topic event based on entity keywords and action keywords provided in an embodiment of the present application;
fig. 9 is a flow chart of a process for determining semantic features of an event to be processed and semantic features of each topic event provided in an embodiment of the present application;
fig. 10 is a schematic diagram of a process for determining semantic features of an event to be processed and semantic features of each topic event according to an embodiment of the present application;
fig. 11 is a flow chart of a process for determining semantic features of events to be processed and time difference features of each topic event provided in the embodiment of the present application;
FIG. 12 is a schematic diagram of a process for determining a time difference characteristic of each topic event provided in an embodiment of the present application;
FIG. 13 is a schematic diagram of a time difference-time difference feature mapping table provided in an embodiment of the present application;
fig. 14 is a schematic diagram of a determination process of fusion features of topic events provided in an embodiment of the present application;
FIG. 15 is a schematic structural diagram of an event handling model provided in an embodiment of the present application;
FIG. 16 is a schematic diagram of an event handling model provided in an embodiment of the present application;
FIG. 17 is a schematic diagram of an event handling model provided in an embodiment of the present application;
FIG. 18 is a schematic diagram of an event handling model provided in an embodiment of the present application;
FIG. 19 is a schematic diagram of the structure of an event handling model provided by an embodiment of the present application;
FIG. 20 is a flowchart of an event processing method based on an event processing model according to an embodiment of the present application;
FIG. 21 is a flowchart of an event processing method based on an event processing model according to an embodiment of the present application;
FIG. 22 is a schematic representation of an exemplary context of events provided by embodiments of the present application;
FIG. 23 is a schematic representation of an exemplary context of events provided by an embodiment of the present application;
FIG. 24 is a flowchart of an event processing method based on an event processing model according to an embodiment of the present application;
FIG. 25 is a flow chart of a training method for an event handling model according to an embodiment of the present application;
FIG. 26 is a flowchart of an event processing method based on an event processing model according to an embodiment of the present application;
FIG. 27 is a schematic diagram of obtaining semantic vectors of each event in an event sequence of up-to-date progress events and topic events based on an encoding module provided in an embodiment of the present application;
FIG. 28A is a schematic diagram of a fusion process of a bi-directional LSTM model provided by an embodiment of the present application;
FIG. 28B is a schematic illustration of a fusion process of a monolayer transducer model provided in an embodiment of the present application;
FIG. 29 is a schematic diagram of a double-penalty optimization provided by an embodiment of the present application;
fig. 30 is a schematic structural diagram of a training device based on an event processing model according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to the accompanying drawings, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In the following description, the terms "first", "second", "third" and the like are merely used to distinguish similar objects and do not represent a particular ordering of the objects, it being understood that the "first", "second", "third" may be interchanged with a particular order or sequence, as permitted, to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described herein. In the following description, the term "plurality" refers to at least two.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application.
Before further describing embodiments of the present application in detail, the terms and expressions that are referred to in the embodiments of the present application are described, and are suitable for the following explanation.
1) Named entity recognition (Named Entity Recognition, NER), also known as entity recognition, entity blocking, and entity extraction, for locating and classifying named entities in text into predefined categories, such as people, organizations, locations, temporal expressions, numbers, monetary values, percentages, etc.; typically, the task of named entity recognition is to identify three major classes (entity class, time class, and number class) and seven minor classes (person name, organization name, place name, time, date, currency, and percentage) of named entities in the text to be processed. In the embodiment of the present application, a named entity identification is used to obtain an entity of a preset entity type, for example, an entity of a person name and a place name type.
2) Natural language processing (Nature Language processing, NLP), an important direction in the fields of computer science and artificial intelligence; refers to the study of various theories and methods that enable effective communication between humans and computers in natural language. Therefore, natural language processing is a science that integrates linguistics, computer science and mathematics; thus, research in the field of natural language processing will involve natural language, i.e., language that people use routinely, so natural language processing has a close relationship with research in linguistics. Natural language processing techniques typically include machine-reading understanding (Machine Reading Comprehension, MRC), text processing, semantic understanding, machine translation, robotic questions and answers, and knowledge maps, among others.
3) Machine-readable understanding (Machine Reading Comprehension, MRC), a natural language processing task, is typically in the form of a question-and-answer.
4) Transformer model, a model based on self-attention mechanism, can be used for modeling sequences
5) LSTM (Long short-term memory) model, long-term memory model, can be used for modeling sequence
6) The BERT model (Bidirectional Encoder Representations from Transformer) is a natural language processing pre-training technology, and is used for training by using a large-scale non-labeling corpus to obtain semantic representations of texts containing rich semantic information, and then performing fine adjustment on the semantic representations of the texts in a specific natural language processing task, so that the semantic representations are finally applied to the natural language processing task.
The applicant found that, in general, in order to integrate the latest progress event under the topic, a clustering manner is generally adopted, namely, the latest progress event and the topic are clustered in an increment mode, so that the correlation between the latest progress event and the topic is determined according to a clustering center and a threshold value, and then the topic to which the latest progress event belongs is determined, so that the latest progress event is integrated to the topic to which the latest progress event belongs. However, in the incremental clustering manner, there is a problem that the calculation overhead increases with the increase of the number of topics, so that the efficiency of event integration is low and the threshold value is difficult to control; meanwhile, for the process of determining the correlation between the latest progress event and the topic based on the incremental clustering mode, the similarity calculation is generally carried out by using conventional vector distance, term Frequency-reverse file Frequency (Term Frequency-Inverse Docu ment Frequency, TF-IDF), named entity and other basic simple features, most innovation is focused on designing different clustering methods and adding various clustering features, and the similarity calculation is carried out by adopting simple traditional features, so that the realization is simple but the accuracy is lower.
Based on the above, the embodiment of the application provides an event processing method, an event processing device, electronic equipment, a computer readable storage medium and a computer program product based on an event processing model, which ensure accuracy and effectiveness from technical logic, ensure that the calculation time consumption does not increase along with the increase of topics and the number of events, are superior to a clustering method, creatively design implicit reading and understanding input and timestamp fusion, fully capture context and time information of topics and latest progress events, and greatly strengthen the accuracy and rationality of predicting the correlation between the latest progress events and the topics.
Referring to fig. 1, fig. 1 is a schematic diagram of an architecture of an event processing system 100 based on an event processing model provided in an embodiment of the present application, in order to implement an application scenario of event processing based on an event processing model (for example, a scenario for displaying event context, specifically, in a search scenario, by accurately predicting a correlation between an event to be processed and a target topic, so that generated context is displayed when an event with continuity information is searched, clicking and expanding more buttons to expand all contexts, the displayed context includes a title of each event in the context, a time when an event occurs, clicking an event title and then skipping a corresponding article, providing gain information of a user outside search terms through the event context, meeting a requirement of a user for actively mining a user for related reading under the premise of search requirement of the user, improving a user value of a search result page, and, for example, in an application scenario for searching recommendation, in an information flow scenario, by accurately predicting a correlation between an event to be processed and a target topic, so as to meet a requirement of a user for knowing about a related event when the topic is recommended at the bottom of the article, for example, by directly searching a local area network 300, when the correlation between the user is directly searching for a related event is predicted by a network 300, and a new search result is shown in a local area network, and the correlation of the search scenario can be improved, or a combination of the two.
The terminal 400 is configured for a user to use the client 401 and display on a display interface 401-1 (the display interface 401-1 is shown as an example). The terminal 400 and the server 200 are connected to each other through a wired or wireless network.
The server 200 is configured to perform semantic feature extraction on an event to be processed and at least one topic event through a semantic feature extraction layer of the event processing model, so as to obtain semantic features of the event to be processed and semantic features of each topic event, where at least one topic event belongs to the same target topic; then, through a time difference feature extraction layer, extracting time difference features of the occurrence time of the event to be processed and the time difference of the reference time to obtain time difference features of the event to be processed, and extracting the time difference features of the occurrence time of each topic event and the time difference of the reference time to obtain the time difference features of each topic event; then, through a feature fusion layer, the semantic features of the event to be processed are fused with corresponding time difference features to obtain fusion features of the event to be processed, and the semantic features of each topic event are fused with corresponding time difference features to obtain fusion features of each topic event; and predicting the correlation between the event to be processed and the target topic based on the fusion characteristics of the event to be processed and the fusion characteristics of each topic event through an output layer to obtain a corresponding prediction result.
The server 200 is further configured to integrate the event to be processed into the target topic according to the occurrence time of the event when the prediction result indicates that the event to be processed is related to the target topic, so as to obtain an event context corresponding to the target topic, where the event context includes the event to be processed and at least one topic event; and transmits the event context to the terminal 400.
The terminal 400 is configured to present the context of the event retrieved from the server 200 in the display interface 401-1.
In some embodiments, the server 200 may be a stand-alone physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs, content Deliver Network), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 400 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a set-top box, a smart voice interaction device, a smart home appliance, a car terminal, an aircraft, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device, a smart speaker, and a smart watch), etc. The terminal device and the server may be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiments of the present application.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, in an actual application, the electronic device may be the server 200 or the terminal 400 shown in fig. 1, referring to fig. 2, and the electronic device shown in fig. 2 includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in terminal 400 are coupled together by a bus system 440. It is understood that the bus system 440 is used to enable connected communication between these components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled in fig. 2 as bus system 440.
The processor 410 may be an integrated circuit chip having signal processing capabilities such as a general purpose processor, such as a microprocessor or any conventional processor, or the like, a digital signal processor (DSP, digital Signal Processor), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
The user interface 430 includes one or more output devices 431, including one or more speakers and/or one or more visual displays, that enable presentation of the media content. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
Memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard drives, optical drives, and the like. Memory 450 optionally includes one or more storage devices physically remote from processor 410.
Memory 450 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The non-volatile memory may be read only memory (ROM, read Only Me mory) and the volatile memory may be random access memory (RAM, random Access Memor y). The memory 450 described in the embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules and data structures, or subsets or supersets thereof, as exemplified below.
An operating system 451 including system programs, e.g., framework layer, core library layer, driver layer, etc., for handling various basic system services and performing hardware-related tasks, for implementing various basic services and handling hardware-based tasks;
network communication module 452 for reaching other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: bluetooth, wireless compatibility authentication (WiFi), and universal serial bus (USB, universal Serial Bus), etc.;
A presentation module 453 for enabling presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, speakers, etc.) associated with the user interface 430;
an input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the event processing device based on the event processing model provided in the embodiments of the present application may be implemented in a software manner, and fig. 2 shows the event processing device 455 based on the event processing model stored in the memory 450, which may be software in the form of a program and a plug-in, and includes the following software modules: the semantic feature extraction module 4551, the time difference feature extraction module 4552, the feature fusion module 4553 and the output module 4554 are logical, and thus may be arbitrarily combined or further split according to the implemented functions.
In other embodiments, the event processing apparatus based on the event processing model provided in the embodiments of the present application may be implemented in hardware, and by way of example, the event processing apparatus based on the event processing model provided in the embodiments of the present application may be a processor in the form of a hardware decoding processor that is programmed to perform the event processing method based on the event processing model provided in the embodiments of the present application, for example, the processor in the form of a hardware decoding processor may employ one or more application specific integrated circuits (ASIC, application Spe cific Integrated Circuit), DSP, programmable logic device (PLD, programmable Logic Device), complex programmable logic device (CPLD, complex Programmable Logic Device), field programmable gate array (FPGA, field-Programmable Gate Array), or other electronic component.
In some embodiments, the terminal or the server may implement the event processing method based on the event processing model provided in the embodiments of the present application by running a computer program. For example, the computer program may be a native program or a software module in an operating system; a Native Application (APP), i.e. a program that needs to be installed in an operating system to run, such as an instant messaging APP and a web browser APP; the method can also be an applet, namely a program which can be run only by being downloaded into a browser environment; but also an applet that can be embedded in any APP. In general, the computer programs described above may be any form of application, module or plug-in.
Based on the above description of the event processing system and the electronic device based on the event processing model provided in the embodiments of the present application, the event processing method based on the event processing model provided in the embodiments of the present application is described below. In practical implementation, the event processing method based on the event processing model provided in the embodiment of the present application may be implemented by a terminal or a server alone, or implemented by the terminal and the server cooperatively, and the event processing method based on the event processing model provided in the embodiment of the present application is illustrated by separately executing the server 200 in fig. 1 as an example. Referring to fig. 3, fig. 3 is a flow chart of an event processing method based on an event processing model according to an embodiment of the present application, and it should be noted that the event processing model includes: referring to fig. 4, fig. 4 is a schematic structural diagram of an event processing model provided in an embodiment of the present application, and the illustrated steps are described with reference to fig. 3 and fig. 4.
Step 101, a server respectively performs semantic feature extraction on an event to be processed and at least one topic event through a semantic feature extraction layer to obtain semantic features of the event to be processed and semantic features of each topic event; wherein at least one topic event belongs to the same target topic.
In practical implementation, the event to be processed needs to be acquired first, where the event may be detected to acquire the event to be processed, or may be acquired from an event sent by another device, etc., which is not limited in this embodiment of the present application.
It should be noted that, the event to be processed refers to an event to be processed, and the event is information describing what happens, for example, a news event and a point-of-view event; the event to be processed may be an event that has progressed recently, or may be a history event, where the history event refers to an event that has occurred after a corresponding event time, which is not limited in the embodiment of the present application; in addition, the event to be processed at least comprises text information, and can also comprise at least one of audio and video, images and tables. In addition, the target topics may be topics in a topic library, topics possibly related to the event to be processed may be screened out from the topic library, and the embodiment of the application is not limited to this; also, a topic is an event topic, which is a collection of related events, including at least one topic event, which is also an event.
In some embodiments, for the case that the target topic is a topic that is selected from the database and may be associated with the event to be processed, topic screening is first required from the database, so that the target topic is associated with the event to be processed, and next, a process of determining the target topic associated with the event to be processed will be described.
Referring to fig. 5, fig. 5 is a schematic flow chart of determining a target topic associated with an event to be processed according to an embodiment of the present application, based on fig. 3, before step 101, may further be performed:
in step 201, the server acquires at least one topic from the topic library, and determines topic keywords of each topic.
In actual implementation, a preset topic library containing a plurality of topics is firstly acquired, so that after an event to be processed is acquired, the topics are acquired from the topic library, and topic keywords of the topics are determined.
As an example, when the event to be processed is a news event (i.e. the latest progress event), referring to fig. 6, fig. 6 is a schematic diagram of an event processing method based on an event processing model provided in the embodiment of the present application, where the event to be processed is "first department responds to second department to cancel the ban on the first object", three topics are obtained from the topic library, and topic keywords of each topic are determined, for example, topic keywords of topic 1 are "nurse" and "secondary court", topic keywords of topic 2 are "H place" and "skip car", and topic keywords of topic 3 are "Li San" and "first object".
In practical implementation, in acquiring at least one topic from the topic library, first determining topic keywords of each topic, where the process of determining topic keywords of each topic is determined based on event keywords of at least one topic event included in the topic, referring to fig. 7, fig. 7 is a schematic flow chart of a process of determining topic keywords of a topic provided in an embodiment of the present application, based on fig. 5, and next, a process of determining topic keywords of each topic will be described with reference to fig. 7.
In step 2011, at least one topic event contained in the topic is determined, and at least two event keywords of each topic event are obtained.
Here, the event keywords of the topic event are acquired from a plurality of dimensions.
In some embodiments, one dimension may be an entity of the topic event, specifically, a preset entity type, such as a name type and a place name type, is obtained in advance; and then carrying out entity identification on the content of each topic event to obtain at least one entity keyword corresponding to the preset entity type, and taking the entity keyword as a candidate event keyword of the topic event.
In some embodiments, one dimension may be a character weight of a topic event, specifically, the content of each topic event is subjected to character weight analysis to obtain at least one action keyword, and the action keyword is used as a candidate event keyword of the topic event.
It should be noted that, the process of performing character weight analysis on the content of each topic event to obtain at least one action keyword may be that performing character weight analysis on the content of each topic event to obtain a keyword greater than a weight threshold, so as to determine, as a candidate event keyword of the topic event, a keyword representing an action in the obtained keywords greater than the weight threshold.
In practical implementation, after determining candidate event keywords of a topic event, selecting at least two candidate event keywords from the obtained candidate event keywords as event keywords of the topic event, specifically, when determining the event keywords of the topic event based on the entity keywords, all the entity keywords can be used as event keywords of the topic event, and keywords can be extracted from the entity keywords to obtain the event keywords of the topic event; when determining the event keywords of the topic event based on the action keywords, all the action keywords can be used as the event keywords of the topic event, and the keywords can be extracted from the action keywords to obtain the event keywords of the topic event; the keywords obtained in any combination of the entity keywords and the action keywords can be determined to be event keywords of the topic event.
It should be noted that, since generally one event includes at least one of a person, a place and an action, determining keywords of a topic event based on keywords associated with the person, the place and the action, respectively, in the topic event can improve accuracy of event keywords of the topic event.
When determining the keywords obtained by any combination of the entity keywords and the action keywords as the event keywords of the topic event, since the number of keywords in the event keywords of each topic event is limited, it may be determined how many keywords are selected from the action keywords as the event keywords of the topic event based on the number of keywords included in the entity keywords, and whether or not the action keywords are also determined as the event keywords of the topic event based on the number of keywords included in the entity keywords.
Next, a process of determining the keywords obtained by any combination of the entity keywords and the action keywords as event keywords of the topic event will be described, referring to fig. 8, fig. 8 is a schematic flow diagram of a process of determining event keywords of each topic event based on the entity keywords and the action keywords provided in the embodiment of the present application, and a process of determining event keywords of each topic event will be described with reference to fig. 8 based on fig. 7
In step 20111, the number of entity keywords corresponding to the entity keywords is obtained.
In step 20112, when the number of entity keywords is smaller than the number of event keywords of the preset topic event, the entity keywords and action keywords are combined into event keywords of the topic event.
It should be noted that, when the number of keywords in the event keywords of each topic event is limited, when the number of entity keywords is smaller than the number of event keywords of a preset topic event, determining that the entity keywords are not enough as event keywords of the topic event, and determining that the action keywords are also required as event keywords of the topic event; that is, at this time, the event keywords of the topic event include an entity keyword and an action keyword.
As an example, the number of event keywords of the preset topic event is m (m is a positive integer), and the number of entity keywords is n (n is a natural number), when n is smaller than m, m-n action keywords are selected according to the weight at this time, so as to determine the event keywords of the topic event.
In step 20113, when the number of entity keywords is greater than or equal to the number of event keywords of the preset topic event, the entity keywords are determined as event keywords of the topic event.
It should be noted that, when the number of keywords in the event keywords of each topic event is limited, when the number of entity keywords is greater than or equal to the number of event keywords of a preset topic event, determining that the keywords in the entity keywords are enough to be used as topic event keyword strings, where the event keywords of the topic event include the entity keywords.
In the above example, when n is greater than or equal to m, m entity keywords are selected from the n entity keywords as event keywords of the topic event.
Step 2012, selecting a target number of event keywords from at least two event keywords of each topic event as topic keywords of the topic.
In actual implementation, selecting a target number of event keywords from at least two event keywords of each topic event as topic keywords of the topic may specifically be counting the occurrence times of different event keywords in the at least two event keywords of each topic event; according to the occurrence times, at least two event keywords of each topic event are ordered in a descending order, and an ordering result is obtained; and starting from the first event keywords of the sequencing result, sequentially selecting event keywords until the event keywords with the target number are selected as topic keywords of topics.
The process from step 2011 to step 2012 is performed for each topic.
202, matching the content of the event to be processed with topic keywords of the topic respectively to obtain corresponding matching results.
In actual implementation, each topic in the topic library is matched with the event to be processed, and topic keywords corresponding to the topics are matched with the content of the event to be processed.
It should be noted that the topic keyword is a keyword of a topic, and the topic library includes a plurality of topics, each topic being a subject of one thing; in addition, each topic in the topic library comprises at least one topic event, and the topic events included in different topics can be the same or different; and, at least one topic event refers to events associated with a topic that occur in different time periods, such that there is a temporal order between at least one topic event.
In the above example, the content "first department responds to the second and withdraws the ban of the first object" of the event to be processed is matched with the topic keywords "nurse and secondary yard long", "H ground and skip" of the three topics, and "Li San and the first object" to obtain three matching results.
In step 203, when the obtained matching result indicates that there is a topic matching the event to be processed in at least one topic, determining the topic matching the event to be processed as a target topic.
In actual implementation, when the obtained matching result represents that topics matched with the event to be processed exist in at least one topic, determining the topics matched with the event to be processed as target topics; when the obtained matching result represents that no topic matched with the event to be processed exists in at least one topic, a new topic comprising the event to be processed is constructed, and the new topic is updated into a topic library.
In the above example, since only the topic keyword of "Li San" in the topic 3 and "first object" in the first object "is matched with the" first object "in the content of the event to be processed," the first department responds to the second revocation of the forbidden pair of the first object ", the obtained matching result characterizes that the topic matched with the event to be processed, namely, topic 3 exists in the three topics, and therefore, the topic 3 is the target topic matched with the event to be processed.
In this way, firstly, matching is carried out based on the keywords of the topics and the content of the events to be processed, at least one topic event possibly related to the events to be processed is recalled, and then, based on the similarity relationship between the events to be processed and each topic event, the related relationship between the events to be processed and the topics is accurately predicted; therefore, the method and the device can accurately predict the correlation between the event to be processed and the topics by adopting a recall-prediction mode, and the correlation between the calculation time consumption of the prediction process and the number of topics is small, so that the event processing efficiency can be improved.
In practical implementation, after obtaining the event to be processed and the target topic, each topic event included in the event to be processed and the target topic may be input to an event processing model, where the event to be processed and each topic event may be assembled into an implicit question-answer sentence format, for example [ CLS ] event to be processed [ SEP ] [ CLS ] topic event 1[ SEP ] … … [ CLS ] topic event n [ SEP ], and then the assembled implicit question-answer sentence format is input to the event processing model, so that the semantic feature extraction layer of the event processing model performs semantic feature extraction on the event to be processed and each topic event, referring to fig. 9, fig. 9 is a flow schematic diagram of a determining process of the semantic feature of the event to be processed and the semantic feature of each topic event provided in the embodiment of the present application, based on fig. 3, step 101 may be implemented as follows:
in step 1011, the distinguishing identifiers corresponding to the event to be processed and each topic event are respectively obtained, and the distinguishing identifiers distinguish different events.
In actual implementation, first, respectively acquiring distinguishing identifications corresponding to the event to be processed and each topic event, wherein the distinguishing identifications can be 'CLS' and 'SEP' for the implicit question-answer sentence type after assembly is completed, so that the event to be processed and each topic event input into the event processing model can be distinguished through the distinguishing identifications.
Step 1012, extracting intermediate semantic features of the event to be processed and each topic event respectively, so as to obtain the intermediate semantic features of the event to be processed and the intermediate semantic features of each topic event.
In practical implementation, referring to fig. 10, fig. 10 is a schematic diagram of a process for determining semantic features of an event to be processed and semantic features of each topic event provided in the embodiment of the present application, and based on fig. 10, intermediate semantic feature extraction is performed on the event to be processed and each topic event, specifically, intermediate semantic feature extraction is performed on an assembled implicit question-answer sentence, such as [ CLS ] event to be processed [ SEP ] [ CLS ] topic event 1[ SEP ] … … [ CLS ] topic event n [ S EP ], to obtain intermediate semantic features of the event to be processed and intermediate semantic features of each topic event.
Step 1013, based on the distinguishing identification of the event to be processed, enhancing the intermediate semantic feature of the event to be processed to obtain the semantic feature of the event to be processed, and based on the distinguishing identification of each topic event, enhancing the intermediate semantic feature of each topic event to obtain the semantic feature of each topic event.
In actual implementation, with continued reference to fig. 10, the intermediate semantic features of the event to be processed are enhanced based on the distinguishing identifier "CLS" of the event to be processed, so as to obtain the semantic features of the event to be processed; based on the identification of the CLS of each topic event, the intermediate semantic features of each topic event are enhanced, so that the semantic features of each topic event are obtained.
It should be noted that, the process of extracting the intermediate semantic features of the event to be processed and each topic event through the intermediate semantic feature extraction layer may be that the intermediate semantic feature extraction is performed on the event to be processed and each topic event first, and intermediate semantic features in the event to be processed and each topic event, such as a word vector, a text vector and a position vector, are determined, where the word vector is semantic information of a single word/word in a text, and the text vector is used to describe global semantic information of the text and is fused with the semantic information of the single word/word; the position vector is used for distinguishing the difference of semantic information carried by words/words appearing at different positions of the text; and then respectively carrying out enhancement processing on the to-be-processed event and the intermediate semantic features in each topic event, such as a word vector, a text vector and a position vector, so as to obtain the semantic features of the to-be-processed event and the semantic features of each topic event.
Step 102, extracting time difference features of the occurrence time of the event to be processed and the time difference of the reference time by a time difference feature extraction layer to obtain time difference features of the event to be processed, and extracting time difference features of the occurrence time of each topic event and the time difference of the reference time to obtain time difference features of each topic event.
In practical implementation, after obtaining the event to be processed and the target topic, each topic event included in the event to be processed and the target topic may be input to an event processing model, where the event to be processed and each topic event may be assembled into an implicit question-answer sentence format, for example [ CLS ] event to be processed [ SEP ] [ CLS ] topic event 1[ SEP ] … … [ CLS ] topic event n [ SEP ], and then the assembled implicit question-answer sentence format is input to the event processing model, so that the time difference feature extraction layer of the event processing model performs time difference feature extraction on the event to be processed and each topic event, referring to fig. 11, fig. 11 is a schematic flow chart of a determining process of the semantic feature of the event to be processed and the time difference feature of each topic event provided in the embodiment of the application, based on fig. 3, step 102 may be implemented as follows:
step 1021, performing a difference processing on the occurrence time of each topic event and the reference time to obtain a time difference between each topic event and the reference time.
In actual implementation, firstly, a preset reference time is obtained, wherein the reference time can be the occurrence time of an event to be processed or the preset time according to the requirement; after the reference time is acquired, the occurrence time of each topic event and the reference time are subjected to difference processing, and the time difference between each topic event and the reference time is obtained.
As an example, the reference time is an occurrence time of an event to be processed, referring to fig. 12, fig. 12 is a schematic diagram illustrating a process of determining a time difference feature of each topic event provided in the embodiment of the present application, and based on fig. 12, time difference feature extraction is performed on each topic event, specifically, time difference feature extraction is performed on an implicit question-answer sentence type, such as [ CLS ] to-be-processed event [ SEP ] [ CLS ] topic event 1[ SEP ] … … [ CLS ] topic event n [ SEP ], that is, the occurrence time of the event to be processed (i.e., the reference time) and the occurrence time of each topic event are subjected to difference processing, so as to obtain a time difference between each topic event and the reference time.
The difference between the reference time and the occurrence time of each topic event is calculated by one day, which is the time less than one day.
Step 1022, obtain the mapping relation between the time difference and the time difference feature.
In practical implementation, after determining the time difference of each topic event, the mapping relationship between the time difference and the time difference feature is obtained, for example, the mapping relationship between the time difference and the time difference feature may be represented based on a time difference-time difference feature mapping table, see fig. 13, fig. 13 is a schematic diagram of the time difference-time difference feature mapping table provided in the embodiment of the present application, and it should be noted that a and b in fig. 13 are positive integers greater than 2, and b is greater than a, where a and b may be set according to the needs of a user.
Step 1023, determining a time difference characteristic of each topic event based on the mapping relation and the time difference between each topic event and the reference time.
In practical implementation, after the mapping relation between the time difference and the time difference characteristic is determined, the time difference characteristic of each topic event can be determined according to the time difference between each topic event and the reference time. In the above example, when the mapping relationship between the time difference and the time difference feature is presented based on the time difference-time difference feature mapping table, the corresponding time difference feature is determined according to the time difference by looking up the time difference-time difference feature mapping table.
It should be noted that, in addition to determining the corresponding time difference feature according to the time difference through the mapping relationship table, in some embodiments, the obtained time difference between each topic event and the reference time may also be encoded, so that the time difference feature of each topic event may be obtained based on the encoding result, and the process of obtaining the time difference feature of each topic event may also be other manners, which is not limited in this embodiment of the present application.
Step 103, fusing semantic features of the event to be processed with corresponding time difference features through a feature fusion layer to obtain fusion features of the event to be processed, and fusing the semantic features of each topic event with corresponding time difference features to obtain fusion features of each topic event.
In actual implementation, the process of feature fusion through a feature fusion layer is divided into two, wherein one is to fuse semantic features of an event to be processed with corresponding time difference features to obtain fusion features of the event to be processed; and one is to fuse the semantic features of each topic event with the corresponding time difference features to obtain the fusion features of each topic event.
In actual implementation, for the process of obtaining the fusion characteristics of the event to be processed, due to the difference of the setting of the reference time, when the reference time is the occurrence time of the event to be processed, the time difference of the event to be processed is 0, and at this time, the fusion characteristics of the event to be processed are the semantic characteristics of the event to be processed; when the reference time is not the occurrence time of the event to be processed, and the time difference of the event to be processed is not 0, the fusion feature of the event to be processed is a feature obtained after the semantic feature of the event to be processed and the corresponding time difference feature are fused, where the fusion process may be summation process or other processing modes, and the embodiment of the present application does not limit the process.
In practical implementation, for a process of obtaining the fusion feature of each topic event, referring to fig. 14, fig. 14 is a schematic diagram of a process of determining the fusion feature of each topic event provided in the embodiment of the present application, based on fig. 14, when obtaining the semantic feature 1 and the time difference feature 1 of the topic event 1, the semantic feature 2 and the time difference features 2, … … of the topic event 2, and the semantic feature n and the time difference feature n of the topic event n, then fusing the semantic feature 1 and the time difference feature 1 of the topic event 1 to obtain the fusion feature of the topic event 1; the semantic features 2 and the time difference features 2 of the topic event 2 are fused to obtain fusion features of the topic event 2, … …, and the semantic features n and the time difference features n of the topic event n are fused to obtain fusion features of the topic event n.
Step 104, predicting the correlation between the event to be processed and the target topic based on the fusion characteristics of the event to be processed and the fusion characteristics of each topic event through the output layer, and obtaining a corresponding prediction result.
In some embodiments, the output layer includes a first fusion layer and a first prediction layer, referring to fig. 15, fig. 15 is a schematic structural diagram of an event processing model provided in this embodiment of the present application, based on fig. 15, first, feature fusion is performed on fusion features of events to be processed and fusion features of events on each topic through the first fusion layer to obtain a first target fusion feature, and then, based on the first target fusion feature, correlation between the events to be processed and the target topics is predicted through the first prediction layer to obtain a corresponding prediction result.
In some embodiments, the output layer includes a second fusion layer and a second prediction layer, referring to fig. 16, fig. 16 is a schematic structural diagram of an event processing model provided in the embodiments of the present application, based on fig. 16, first, feature fusion is performed on fusion features of each topic event through the second fusion layer to obtain a second target fusion feature, and then, based on the fusion features of the event to be processed and the second target fusion feature, the correlation between the event to be processed and the target topic is predicted through the second prediction layer to obtain a corresponding prediction result. It should be noted that, the second fusion layer only performs feature fusion on the fusion features of each topic event, and does not process the fusion features of the event to be processed.
In some embodiments, the output layer further includes a two-classification layer, referring to fig. 17, fig. 17 is a schematic structural diagram of an event processing model provided in the embodiments of the present application, based on fig. 17, by using the two-classification layer, based on the fusion feature of the event to be processed and the fusion feature of each topic event, two classifications of the correlation between the event to be processed and the target topic are performed, so as to obtain a classification result, where the classification result is used to indicate whether the event to be processed is correlated with the target topic.
It should be noted that, the classification result may be 0 or 1, when the classification result is 0, the event to be processed is not related to the target topic, and when the classification result is 1, the event to be processed is related to the target topic.
In some embodiments, the output layer further includes a logistic regression layer, referring to fig. 18, fig. 18 is a schematic structural diagram of an event processing model provided in the embodiments of the present application, and based on fig. 18, by using the logistic regression layer, based on fusion features of an event to be processed and fusion features of events of each topic, correlation score prediction is performed on a correlation relationship between the event to be processed and a target topic, so as to obtain a score indicating a degree of correlation between the event to be processed and the target topic.
It should be noted that, the score interval here may be set as [0,4], where the score is 0, and represents that the event to be processed is not related to the target topic, the score is 1, and represents that the event to be processed is weakly related to the target topic, the score is 2, and represents that the event to be processed is slightly related to the target topic, the score is 3, and the score is 4, and represents that the event to be processed is strongly related to the target topic, i.e. the score is in direct proportion to the degree of the correlation; here, the correlation threshold may be preset, for example, the correlation threshold is 3 minutes, that is, when the prediction score is greater than or equal to 3 minutes, the event to be processed may be considered to be related to the target topic, and when the prediction score is less than 3 minutes, the event to be processed may be considered to be unrelated to the target topic; and the relevant threshold value can be set according to the actual requirements of the user.
In some embodiments, the output layer may further include a two-classification layer and a logistic regression layer, referring to fig. 19, fig. 19 is a schematic structural diagram of an event processing model provided in the embodiment of the present application, based on fig. 19, by using the two-classification layer, based on the fusion feature of the event to be processed and the fusion feature of each topic event, the correlation relationship between the event to be processed and the target topic is classified into two categories, to obtain a classification result for indicating whether the event to be processed is correlated with the target topic, and meanwhile, by using the logistic regression layer, based on the fusion feature of the event to be processed and the fusion feature of each topic event, the correlation score prediction is performed on the correlation relationship between the event to be processed and the target topic, to obtain a score for indicating the degree of correlation between the event to be processed and the target topic.
After obtaining the classification result and the score, selecting the classification result as a prediction result of the correlation between the event to be processed and the target topic or selecting the score as a prediction result of the correlation between the event to be processed and the target topic based on the actual demand of the user.
In actual implementation, predicting the correlation between the event to be processed and the target topic, and after obtaining a corresponding prediction result, integrating the event to be processed into the target topic according to the occurrence time of the event when the prediction result represents that the event to be processed is correlated with the target topic, so as to obtain an event context corresponding to the target topic, wherein the event context comprises the event to be processed and at least one topic event.
In some embodiments, referring to fig. 20, fig. 20 is a flowchart of an event processing method based on an event processing model provided in the embodiments of the present application, after obtaining an event context corresponding to a target topic, the method may further be performed:
in step 301, the server presents an event search control.
It should be noted that the search control is used for searching information, and thus, the search control may be used for searching for a topic event.
Step 302, in response to an event search operation for a target topic triggered based on an event search control, presenting an event context.
Referring to fig. 21, fig. 21 is a schematic flow chart of an event processing method based on an event processing model according to an embodiment of the present application, based on fig. 20, step 302 may be further implemented as follows:
in response to a first search operation acting on the event search control, a reduced event context corresponding to the event context and a presentation control corresponding to the reduced event context are presented 3021.
In actual implementation, when a user triggers the event search control to search information, if the searched information is information related to the integrated target topics, when a first search operation acting on the event search control is received, the first search operation is responded, and the presentation of search results is performed. Here, the search results presented may include simplified event context corresponding to the event context, and presentation controls corresponding to the simplified event context.
It should be noted that, the simplified event context belongs to the event context, and the presentation form is part of the events in the event context; the presentation control is used to present the entire context of the event, such as a "view more" button, an expand icon, etc.
In response to the rendering operation acting on the rendering control, a context of events is rendered, wherein each event in the context of events rendered includes an event title and an event time, the event being any one of a pending event and at least one topic event.
It should be noted that, when the user triggers the presentation control to view the whole event context, the server receives the presentation operation acting on the presentation control; at this time, the event integrating device presents the entire event context in response to the presenting operation; and the event integrating device achieves the presentation of the event context by presenting the event title and the event time of each event in the event context, wherein the event is any one of the event to be processed and at least one topic event.
In practical implementation, the presented search results may include search recommendation results, where the search recommendation results are recommendation information indicating integrated target topics, such as "whether you are searching for the title of the integrated target topic'? "; here, when the user performs a triggering operation on the search recommendation result, the server may present the simplified event context corresponding to the event context and the presentation control corresponding to the simplified event context, and present the event context in response to the presentation operation acting on the presentation control; event context can also be presented directly; the embodiments of the present application are not limited in this regard.
As an example, referring to fig. 22, fig. 22 is a schematic representation of one exemplary context of events provided by embodiments of the present application; as shown in FIG. 22, the page 22-1 is a presentation page of search results, presenting simplified event context 22-11 corresponding to event context, and presenting presentation control 22-12; when the presentation control 22-12 is clicked (a presentation operation), the entire event context 22-5 is presented as shown in region 22-2; here, each event in the presented event context is implemented by presenting an event title (e.g., event title 22-211) and an event time (e.g., event time 22-212), and detailed information of the corresponding event is presented by clicking on the event title 22-211.
As an example, referring to fig. 23, fig. 23 is a schematic representation of an exemplary event context provided by an embodiment of the present application; as shown in FIG. 23, page 23-1 is a presentation page of search results with other results presented along with search recommendation 23-11, and when search recommendation 23-11 is clicked, event context 22-1 shown in area 22-2 of FIG. 22 is presented.
In step 3023, event detail information is presented in response to a viewing operation acting on the event title or event time.
It should be noted that, the event title or the event time is a triggerable control, or each event corresponds to a control for checking details, when the user triggers the event title, the event time, or the control for checking details, the server receives a checking operation acting on the event title or the event time, or a checking operation acting on the control for checking details; at this time, event detail information, which refers to detailed description information of the events in the event context, is presented in response to the viewing operation.
In some embodiments, referring to fig. 24, fig. 24 is a flow chart of an event processing method based on an event processing model provided in the embodiments of the present application, after obtaining an event context corresponding to a target topic, the method may further be performed:
step 401, presenting the last information to be presented of the target event.
It should be noted that, the target event is any event of the event to be processed and at least one topic event included in the event context; the last to-be-presented information refers to information of the last presentation progress of the target event, such as the last page of the target event, and the end of the target event.
And step 402, presenting the rest events in the event context associated with the target event in a recommended area corresponding to the information to be presented finally.
It should be noted that, the page presenting the information to be presented finally is also presented with a recommendation area, and the recommendation area is used for presenting recommendation information; here, the recommendation information presented by the server in the recommendation area is the remaining event, where the remaining event is any event except the target event in the event context, and may be the event of the latest progress except the target event in the event context. The remaining events may be displayed in the form of search content in the search box, may be displayed in the form of links, and the like, which is not limited in the embodiment of the present application.
In step 403, detailed information of the remaining events is presented in response to a second search operation on the remaining events.
In actual implementation, when the user triggers a view operation for the remaining events, the server also receives a second search operation for the remaining events; at this time, the server presents detailed information of the remaining events in response to the second search operation to complete the response to the second search operation.
It should be noted that, steps 301 to 302 and steps 401 to 403 may be implemented by a server; the method can also be realized by a terminal by sending event context to the terminal by a server; the embodiments of the present application are not limited in this regard.
Therefore, gain information outside the search word can be provided through event context, related reading requirements are actively mined on the premise of meeting search requirements, the integrity of information presentation in a search result page is improved, the search times of non-acquired target information in a search scene are reduced, the resource consumption in the search process is reduced, the conversion rate of search can be improved, and the search frequency of users is increased.
In some embodiments, before event processing is performed based on the event processing model, the event processing model is trained first, referring to fig. 25, fig. 25 is a flowchart of a training method for an event processing model according to an embodiment of the present application, and the steps shown in fig. 25 will be described.
Step 501, a server acquires an event training sample carrying a tag and a corresponding topic training sample; the labels are used for indicating the correlation between event training samples and corresponding topic training samples, and the topic training samples comprise at least one topic sample event.
Step 502, extracting semantic features of the event training sample and each topic sample event through a semantic feature extraction layer, so as to obtain semantic features of the event training sample and semantic features of each topic sample event.
Step 503, performing time difference feature extraction on the time difference between the occurrence time of the event training sample and the reference time through the time difference feature extraction layer to obtain time difference features of the event training sample, and performing time difference feature extraction on the time difference between the occurrence time of each topic sample event and the reference time to obtain time difference features of each topic sample event.
Step 504, through a feature fusion layer, fusing semantic features of the event training samples with corresponding time difference features to obtain fusion features of the event training samples, and fusing semantic features of each topic sample event with corresponding time difference features to obtain fusion features of each topic sample event.
Step 505, through the output layer, based on the fusion features of the event training samples and the fusion features of the events of each topic sample, predicting the correlation between the event training samples and the topic training samples, and obtaining corresponding prediction results.
It should be noted that, when the output layer includes only the two classification layers, the two classification layers are used to perform two classification on the correlation between the event training sample and the topic training sample based on the fusion feature of the event training sample and the fusion feature of each topic sample event, so as to obtain a two classification result.
When the output layer only comprises a logistic regression layer, the correlation score prediction is carried out on the correlation between the event training sample and the topic training sample based on the fusion characteristics of the event training sample and the fusion characteristics of each topic sample event through the logistic regression layer, so that the score for indicating the correlation degree of the event training sample and the topic training sample is obtained.
When the output layer comprises a two-classification layer and a logistic regression layer, the two-classification layer is used for carrying out two-classification on the correlation between the event training sample and the topic training sample based on the fusion characteristics of the event training sample and the fusion characteristics of each topic sample event to obtain a two-classification result, and the logistic regression layer is used for carrying out correlation score prediction on the correlation between the event training sample and the topic training sample based on the fusion characteristics of the event training sample and the fusion characteristics of each topic sample event to obtain a score for indicating the correlation degree of the event training sample and the topic training sample.
And step 506, comparing the predicted result with the label to obtain the difference between the predicted result and the label, and updating the model parameters of the event processing model based on the difference.
It should be noted that, because the output layer includes at least one of the two classification layers and the logistic regression layer, when the output layer includes only the two classification layers, the two classification layers of the output layer obtain the two classification results of the two classification of the correlation between the event training sample and the topic training sample, then compare the two classification results with the corresponding labels to obtain the differences between the two classification results and the corresponding labels, and update the model parameters of the event processing model based on the differences.
When the output layer only comprises a logistic regression layer, obtaining a score for carrying out correlation score prediction on the correlation relation between the event training sample and the topic training sample through the logistic regression layer of the output layer, then comparing the score with a corresponding label to obtain the difference between the score and the corresponding label, and updating the model parameters of the event processing model based on the difference.
When the output layer comprises a two-classification layer and a logistic regression layer, obtaining a two-classification result for carrying out two-classification on the correlation between the event training sample and the topic training sample through the two-classification layer of the output layer, obtaining a score for carrying out correlation score prediction on the correlation between the event training sample and the topic training sample through the logistic regression layer of the output layer, then respectively comparing the two-classification result and the score with the labels corresponding to each other to obtain the difference between the two-classification result and the corresponding label and the difference between the score and the corresponding label, and updating the model parameters of the event processing model based on the two differences.
Next, a process of updating model parameters of the event processing model when the output layer includes the two classification layers and the logistic regression layer will be described in detail. Referring to fig. 26, fig. 26 is a schematic flow chart of an event processing method based on an event processing model according to an embodiment of the present application, and based on fig. 25, step 506 may be further implemented as follows:
step 5061, obtaining a first loss function corresponding to the two classification layers, a classification result and a first difference of the two classification sub-labels in the label, determining a value of the first loss function based on the first difference, obtaining a second loss function corresponding to the logistic regression layer, a score and a second difference of the obtained sub-labels in the label, and determining a value of the second loss function based on the second difference.
In practical implementation, when the output layer includes a two-classification layer and a logistic regression layer, the label includes a molecular label and a two-classification sub-label, where the interval of the molecular label may be set to [0,4], where, for example, 0 represents that the event training sample is not related to the corresponding topic training sample, 1 represents that the event training sample is weakly related to the corresponding topic training sample, 2 represents that the event training sample is slightly related to the corresponding topic training sample, 3 represents that the event training sample is relatively related to the corresponding topic training sample, and 4 represents that the event training sample is strongly related to the corresponding topic training sample, that is, the score is in a proportional relationship with the degree of correlation; and the two classification sub-labels can be 0 or 1, wherein 0 represents that the event training sample is irrelevant to the corresponding topic training sample, and 1 represents that the event training sample is relevant to the corresponding topic training sample.
Step 5062, determining a value of a target loss function corresponding to the event processing model by combining the value of the first loss function and the value of the second loss function, and updating model parameters of the event processing model based on the value of the target loss function.
In practical implementation, the method of combining the value of the first loss function and the value of the second loss function may be directly summing the value of the first loss function and the value of the second loss function, or may be the method of weighting and summing the value of the first loss function and the value of the second loss function according to the first weight and the second weight corresponding to the first loss function and the second loss function, and the embodiment of the present application does not limit the method of combining the value of the first loss function and the value of the second loss function.
In practical implementation, after the value of the target loss function is determined by combining the value of the first loss function and the value of the second loss function, the model parameters of the event processing model can be updated based on the value of the target loss function.
By applying the embodiment of the application, the semantic features of the events to be processed and the corresponding time difference features are fused, and the semantic features of the events of each topic and the corresponding time difference features in the target topics are fused, so that the fusion features of the events to be processed and the fusion features of the events of each topic are obtained, and then the correlation between the events to be processed and the target topics is predicted based on the fusion features of the events to be processed and the fusion features of the events of each topic, so that the context semantic information and the time information of the events to be processed and the target topics are fully utilized, and the correlation between the events to be processed and the target topics is accurately predicted, and further the accuracy of event integration is improved when the events to be processed are integrated to the topics.
In the following, an exemplary application of the embodiments of the present application in a practical application scenario will be described.
For some news topics (often consisting of a plurality of events (at least one topic event) which have long duration, when the latest progress of the topics occurs, we want to mount the latest progress (events to be processed) under the topics (target topics) by means of machine mining to form event venues containing the latest progress, so that users can intuitively know the progress of the events through venues information. The embodiment of the application designs a set of model based on implicit reading and understanding input, timestamp fusion and double-loss optimization, constructs a set of complete topic and event similarity calculation mode, greatly improves the accuracy and effectiveness of topic and event matching, and realizes a large-scale automatic event topic mounting system, and particularly, the embodiment of the application is realized through recall and classification two stages, and comprises the following steps:
News topics (target topics) that may be relevant are recalled from a news topic database (topic library) according to the event content of the latest progress event.
It should be noted that, each news topic in the news topic database corresponds to a topic keyword (topic keyword), and when the server matches any one of the topic keywords in the latest progress event, the server determines that the news topic is one of the possibly related news topics.
Illustratively, referring to FIG. 6, FIG. 6 is an exemplary news topic recall schematic provided by embodiments of the present application; as shown in fig. 6, "the first department responds to the second revocation of the ban on the first object" is the title of the latest progress event. In the news topic database, news topic 1 comprises 3 events, and corresponding topic keywords are 'nurses' and 'secondary yards'; news topic 2 includes 4 events, the corresponding topic keywords are "H land" and "skip"; news topic 3 includes 4 events, with corresponding topic keywords being "Li San" and "first object". When the topic keyword of each news topic in the news topic database is matched in the latest progress event, the news topic 3 is one of the news topics possibly related to recall because the "first object" in the topic keyword corresponding to the news topic 3 is matched with the "first object" in the title of the latest progress event.
The topic keywords are the most number of two keywords in the event keywords of all topic events under the news topic. The event keywords of each topic event can be obtained through entity identification and Word weight analysis, wherein the server can adopt an entity identification model (Char-Word Union CNN, CWCNN) to realize entity identification, and takes the entity of the name type and the place name type in the identified entity as a first keyword (entity keyword); the server can adopt an XGboost model to realize word weight analysis, and uses verbs in words with weights higher than a weight threshold value as second keywords (action keywords); if the number of words of the first keywords is greater than 3 (the number of event keywords of a preset topic event), the second keywords are not considered any more, and only the first keywords are used as the keywords of the topic event; if the number of words of the first keyword is less than 3 (the number of event keywords of a preset topic event), the first keyword and the second keyword are used together as topic keywords of the topic event.
Then, the correlation relationship between each of the possibly related news topics and the latest progress event is matched, so that whether each news topic is correlated with the latest progress event or not is judged. In this regard, the process of determining whether each news topic is relevant to the most recent progress event is implemented here by a set of models TDE-LSTM and TDE-Trans based on implicit reading understanding inputs, timestamp fusion and double loss optimization. Where TD E represents time diff embedding, LSTM and Trans represent different encoders.
It should be noted that, the TDE-LSTM model and the TDE-Trans model are two models that can determine whether each news topic is related to the latest progress event, and before determining whether each news topic is related to the latest progress event based on the TDE-LSTM model and the TDE-Trans model, the TDE-L STM model and the TDE-Trans model need to be trained first, and the training process of the TDE-LSTM model and the TDE-Trans model includes a processing process based on implicit reading understanding sub-model, a processing process based on a timestamp fusion sub-model, and a processing process based on double-loss optimization.
The following describes a process based on an implicit reading understanding of a sub-model that models each event within a topic and obtains a representation of the event. Specifically, new events and topic events are assembled into an implicit question-answer sentence pattern: [ CLS ] New event Title [ SEP ] [ CLS ] topic event 1 Title [ SEP ] … … [ CLS ] topic event 5 Title [ SEP ]. The constructed sentence is a new event, and is followed by at most five topic events (more can be preset as 5 events here), the [ CLS ] separator is added to the head of each event sentence, the [ SEP ] separator is added to the tail of each event sentence, namely 'CLS' represents the beginning of the sentence sequence, and 'SEP' represents the division among sentences. This structured sentence pattern has no explicit question elements, but follows the structured paradigm of MRC question-answer model input, so is called implicit read understanding input.
As an example, referring to fig. 6, taking topic 3 as an example, the model would be structured as "[ CLS ] the first department responds to the second revocation of the first object's ban [ SEP ] [ CLS ] Li San to block the input of the first object [ SEP ] … … (here the 2 nd to 5 th topic event in the topic is omitted)".
In actual implementation, after the event sequence of the latest progress event and each topic event in the topics is built, the semantic vector of each event in the event sequence formed by the latest progress event and each topic event is obtained through an encoding module (such as a BERT model), as shown in fig. 27, fig. 27 is a schematic diagram provided in the embodiment of the present application, based on the encoding module, the semantic vector of each event in the event sequence formed by the latest progress event and each topic event is obtained, based on fig. 27, after the event sequence of the latest progress event and each topic event in the topics is built, the intermediate semantic vector (intermediate semantic feature) of each event (latest progress event and each topic event) is determined through the BERT model, and then the output vectors of all [ CLS ] positions are used as event representation vectors (semantic features) of the corresponding events (shown by black solid arrows in fig. 27).
The following describes a processing procedure based on a timestamp fusion sub-model, where the timestamp fusion sub-model is mainly used to fuse important time difference information among events into event representations, specifically, first, time difference information is constructed, that is, a time difference (rounded up) in units of days is obtained by making a difference between each topic event timestamp and a latest progress event timestamp based on the latest progress event timestamp, and then, a corresponding time difference vector (time difference extraction feature) is obtained according to a set mapping table. Then, the obtained time difference vector is fused with the obtained event expression vector to obtain a fusion vector (first target fusion feature) of the latest progress event and each topic event. It should be noted that, there are two processes in the fusion process, the first fusion process is to add the obtained time difference vector to the obtained event representation vector to obtain the added vector, the second fusion process is to calculate the event representation of the added vector, i.e. the fusion vector, where, based on the difference between the TDE-LSTM model and the TDE-Trans model, there are two fusion structures, i.e. the bidirectional LSTM model and the single layer Trans-former model, for the second fusion process, and both the two fusion structures can implement the second fusion process, specifically referring to fig. 28A and 28B, fig. 28A is a schematic diagram of the fusion process of the bidirectional LSTM model provided in the embodiment of the present application, and fig. 28B is a schematic diagram of the fusion process of the single layer Trans-former model provided in the embodiment of the present application, as shown in fig. 28A and 28B, after obtaining the vector to which the obtained time difference vector is to be added to the obtained event representation vector, the fusion vector is calculated by the bidirectional LSTM model or the single layer Trans-former model.
In practical implementation, after obtaining a fusion vector, calculating the fusion vector through a full-connection layer to determine whether each news topic is related to the latest progress event, specifically, calculating the fusion vector to obtain a score representing the degree of relativity of each news topic to the latest progress event, wherein two results representing the degree of relativity of each news topic to the latest progress event exist, one is a regression result with intervals of [0,4], and the other is a classification result with intervals of [0,1 ]; wherein, the regression result is 0 to represent that the latest progress event is not related to the news topic, the regression result is 1 to represent that the latest progress event is weakly related to the news topic, the regression result is 2 to represent that the latest progress event is slightly related to the news topic, the regression result is 3 to represent that the latest progress event is relatively related to the news topic, and the regression result is 4 to represent that the latest progress event is strongly related to the news topic; and a classification result of 0 indicates that the latest progress event is not related to the news topic, and a classification result of 1 indicates that the latest progress event is related to the news topic.
In the following, a process based on double-loss optimization is described, and in constructing training samples, the embodiments of the present application have 0-4 points of fine granularity matching tags (molecular tags) and two points of class matching tags (two classes of molecular tags) for each set of event training samples-topic training samples. Wherein 0-4 points represent the event training samples and topic training samples are uncorrelated, weakly correlated, slightly correlated, more correlated and strongly correlated respectively, i.e. the larger the point is, the more correlated is. The two classes match the labels, i.e., correlated, uncorrelated. The embodiment of the application designs a double-loss optimization method for simultaneously utilizing the information of two tags. The method comprises the steps of performing a classification task based on a two-class matching label, and determining two-class cross entropy loss based on the difference between the two-class matching label and a two-class result; the regression task is carried out based on the fine-grained matching label, and Huber loss (a parameter loss function for regression problem can reduce the punishment degree to abnormal points and is more robust) is determined based on the difference between the fine-grained matching label and the regression result; after the two kinds of cross entropy loss and Huber loss are obtained, the two losses are added to obtain target loss, so that model parameters are updated on the basis of the target loss in a TDE-LSTM model or a TDE-Trans model. For example, referring to fig. 29, fig. 29 is a schematic diagram of dual-loss optimization provided in the embodiment of the present application, based on fig. 29, after two kinds of cross entropy loss and Huber loss are obtained, the two losses are summed to obtain a target loss, so that model parameters of the TDE-LSTM model are updated based on the target loss.
Next, the actual effects of the TDE-LSTM model and the TDE-Trans model will be described.
It should be noted that, the event processing model provided in the embodiment of the present application trains on a plurality of topics in the event map 600, filters possible candidate events according to keywords of the topics, constructs 1.3w latest progress events-topics, and has a final model accuracy of 0.869 and an F1 of 0.868.
In actual implementation, the effects of the TDE-LSTM model, the TDE-Trans model and the BERTMRC model are counted and corrosion tests are carried out by taking the BERTMRC model as a reference model in the embodiment of the application, and the table 1 is referred to.
TABLE 1
Wherein, the lower the MAE, the better the MSE index; the higher Accurcy, the better F1, it can be determined that both the TDE-Trans and TDE-LSTM models are superior to BERTMRC, which is the reference model. From corrosion tests, the implicit reading understanding input provided by the embodiment of the application improves the final effect to the greatest extent; both double loss optimization and timestamp fusion have a positive impact on the results.
The embodiment of the application also verifies the effect of the model on the continuous development events, specifically, referring to table 2, t is the number of topic events (the above experiments are all set to 5), and it can be seen that as the number of topic events increases, the F1 of the model is gradually improved. Thus, the model is verified to be capable of coping with the continuously developed event, and the judgment precision is gradually improved along with the increase of the topic event.
TABLE 2
In actual implementation, because the automatic batch topic mounting capability is provided in the business, manual investigation and judgment from mass topics are not needed, the time consumption of manual operation is reduced from 20 minutes to less than 1 minute, and the operation efficiency is greatly improved. In the production environment, the coverage rate is improved from 12.42% to 17.22% through topics generated by automatic batch topic mounting capability, 5% of user clicks are contributed by venation generated in a search result page, and the click rate CTR is 35.72%. Therefore, the resource consumption in the searching process is reduced, the searching conversion rate can be improved, and the searching frequency of users is improved.
It should be noted that, regarding to various designs of question-answer sentence patterns of the reading understanding model, the embodiment of the application uses an implicit reading understanding construction mode, and in practice, the embodiment can also be replaced by an explicit question sentence, for example: is the "x xx event subsequent to the a, B, C, D, E topic event? The embodiment of the application is not limited by the way the input sequence is constructed; meanwhile, the BERT model for determining the event representation in the embodiment of the application can be replaced by a Chinese pre-training model optimized by pre-training tasks, and the embodiment of the application is not limited to the BERT model, and in addition, the field data can be finely tuned on the pre-training model, so that the effect of event representation is improved.
By applying the embodiment of the application, the semantic features of the events to be processed and the corresponding time difference features are fused, and the semantic features of the events of each topic and the corresponding time difference features in the target topics are fused, so that the fusion features of the events to be processed and the fusion features of the events of each topic are obtained, and then the correlation between the events to be processed and the target topics is predicted based on the fusion features of the events to be processed and the fusion features of the events of each topic, so that the context semantic information and the time information of the events to be processed and the target topics are fully utilized, and the correlation between the events to be processed and the target topics is accurately predicted, and further the accuracy of event integration is improved when the events to be processed are integrated to the topics.
Continuing with the description below of an exemplary architecture implemented as a software module for the event processing model based event processing device 455 provided in embodiments of the present application, in some embodiments, as shown in fig. 2, the software module stored in the event processing model based event processing device 455 of the memory 440 may include:
The semantic feature extraction module 4551 is configured to perform semantic feature extraction on an event to be processed and at least one topic event through a semantic feature extraction layer of the event processing model, so as to obtain semantic features of the event to be processed and semantic features of each topic event; wherein the at least one topic event belongs to the same target topic;
the time difference feature extraction module 4552 is configured to perform time difference feature extraction on a time difference between an occurrence time of the event to be processed and a reference time through a time difference feature extraction layer of the event processing model to obtain a time difference feature of the event to be processed, and perform time difference feature extraction on a time difference between an occurrence time of each topic event and the reference time to obtain a time difference feature of each topic event;
the feature fusion module 4553 is configured to fuse, through a feature fusion layer of the event processing model, semantic features of the event to be processed with corresponding time difference features to obtain fusion features of the event to be processed, and fuse the semantic features of each topic event with corresponding time difference features to obtain fusion features of each topic event;
And the output module 4554 is configured to predict, through an output layer of the event processing model, a correlation between the event to be processed and the target topic based on the fusion feature of the event to be processed and the fusion feature of each topic event, so as to obtain a corresponding prediction result.
In some embodiments, the apparatus further includes a screening module, where the screening module is configured to obtain at least one topic from a topic library, and determine topic keywords of each topic; matching the content of the event to be processed with topic keywords of each topic respectively to obtain corresponding matching results; and when the obtained matching result represents that topics matched with the event to be processed exist in the at least one topic, determining the topics matched with the event to be processed as the target topics.
In some embodiments, the screening module is further configured to perform, for each of the topics, the following: determining at least one topic event contained in the topic, and acquiring at least two event keywords of each topic event; selecting a target number of event keywords from at least two event keywords of each topic event as topic keywords of the topic.
In some embodiments, the screening module is further configured to identify an entity of the content of each topic event, obtain at least one entity keyword corresponding to a preset entity type, and use the entity keyword as a candidate event keyword of the topic event; performing character weight analysis on the content of each topic event to obtain at least one action keyword, and taking the action keyword as a candidate event keyword of the topic event; and selecting at least two candidate event keywords from the obtained candidate event keywords as event keywords of the topic event.
In some embodiments, the screening module is further configured to count the number of occurrences of different event keywords in at least two event keywords of each of the topic events; according to the occurrence times, at least two event keywords of each topic event are ordered in a descending order, and an ordering result is obtained; and sequentially selecting event keywords from the first event keyword of the sequencing result until a target number of event keywords are selected as topic keywords of the topics.
In some embodiments, the semantic feature extraction module 4551 is further configured to perform intermediate semantic feature extraction on the event to be processed and each of the topic events, to obtain intermediate semantic features of the event to be processed and intermediate semantic features of each of the topic events; based on the distinguishing identification of the events to be processed, enhancing the intermediate semantic features of the events to be processed to obtain the semantic features of the events to be processed, and based on the distinguishing identification of the events to be processed, enhancing the intermediate semantic features of the events to be processed to obtain the semantic features of the events to be processed.
In some embodiments, the time difference feature extraction module 4552 is further configured to perform a difference process on the occurrence time of each of the topic events and the reference time, to obtain a time difference between each of the topic events and the reference time; acquiring a mapping relation between the time difference and the time difference characteristic; and determining the time difference characteristic of each topic event based on the mapping relation and the time difference between each topic event and the reference time.
In some embodiments, the feature fusion module 4553 is further configured to fuse the semantic feature of the event to be processed with a corresponding time difference feature to obtain a fused feature of the event to be processed; and carrying out fusion processing on the semantic features of each topic event and the corresponding time difference features to obtain fusion features of each topic event.
In some embodiments, the output layer includes a first fusion layer and a first prediction layer, and the output module 4554 is further configured to perform feature fusion on the fusion feature of the event to be processed and the fusion feature of each topic event through the first fusion layer to obtain a first target fusion feature; and predicting the correlation between the event to be processed and the target topic based on the first target fusion characteristic through the first prediction layer to obtain a corresponding prediction result.
In some embodiments, the output layer includes a second fusion layer and a second prediction layer, and the output module 4554 is further configured to perform feature fusion on the fusion features of each of the topic events through the second fusion layer to obtain a second target fusion feature; and predicting the correlation between the event to be processed and the target topic based on the fusion characteristic of the event to be processed and the second target fusion characteristic through the second prediction layer to obtain a corresponding prediction result.
In some embodiments, the output layer includes a two-classification layer, and the output module 4554 is further configured to, through the two-classification layer, perform two-classification on a correlation between the event to be processed and the target topic based on the fusion feature of the event to be processed and the fusion feature of each topic event, to obtain a two-classification result; the classification result is used for indicating whether the event to be processed is related to the target topic or not.
In some embodiments, the output layer includes a logistic regression layer, and the output module 4554 is further configured to perform, by using the logistic regression layer, correlation score prediction on a correlation between the event to be processed and the target topic based on the fusion feature of the event to be processed and the fusion feature of each topic event, to obtain a score indicating a degree of correlation between the event to be processed and the target topic.
In some embodiments, the apparatus further includes an integration module, where the integration module is configured to integrate the event to be processed into the target topic according to an occurrence time of the event when the prediction result characterizes that the event to be processed is related to the target topic, so as to obtain an event context corresponding to the target topic, where the event context includes the event to be processed and at least one topic event.
In some embodiments, the apparatus further comprises a presentation module for presenting the event search control; and responding to an event searching operation aiming at the target topic and triggered based on the event searching control, and presenting the event context.
In some embodiments, the apparatus further comprises a training module, configured to obtain an event training sample carrying a tag and a corresponding topic training sample; the label is used for indicating the correlation between the event training sample and the corresponding topic training sample, and the topic training sample comprises at least one topic sample event; extracting semantic features of the event training samples and the topic sample events through the semantic feature extraction layer respectively to obtain semantic features of the event training samples and semantic features of the topic sample events; performing time difference feature extraction on the time difference between the occurrence time of the event training sample and the reference time through the time difference feature extraction layer to obtain time difference features of the event training sample, and performing time difference feature extraction on the time difference between the occurrence time of each topic sample event and the reference time to obtain time difference features of each topic sample event; fusing semantic features of the event training samples and corresponding time difference features through the feature fusion layer to obtain fusion features of the event training samples, and fusing semantic features of each topic sample event and corresponding time difference features to obtain fusion features of each topic sample event; predicting the correlation between the event training sample and the topic training sample based on the fusion characteristics of the event training sample and the fusion characteristics of each topic sample event through the output layer to obtain a corresponding prediction result; and comparing the predicted result with the label to obtain the difference between the predicted result and the label, and updating the model parameters of the event processing model based on the difference.
In some embodiments, the output layer includes a two-classification layer and a logistic regression layer, and the output module 4554 is further configured to, through the two-classification layer, perform two-classification on a correlation between the event training sample and the topic training sample based on the fusion feature of the event training sample and the fusion feature of each topic sample event, to obtain a classification result, and perform, through the logistic regression layer, a correlation score prediction on the correlation between the event training sample and the topic training sample based on the fusion feature of the event training sample and the fusion feature of each topic sample event, to obtain a score for indicating a degree of correlation between the event training sample and the topic training sample; acquiring a first loss function corresponding to the classification layer, the classification result and a first difference of the classification sub-labels in the labels, determining a value of the first loss function based on the first difference, acquiring a second loss function corresponding to the logistic regression layer, the score and a second difference of the molecular labels in the labels, and determining a value of the second loss function based on the second difference; and determining the value of a target loss function corresponding to the event processing model by combining the value of the first loss function and the value of the second loss function, and updating model parameters of the event processing model based on the value of the target loss function.
The training device 3000 based on the event processing model provided in the embodiment of the present application is described below, where the event processing model includes: referring to fig. 30, fig. 30 is a schematic structural diagram of an event processing model-based training device 3000 provided in an embodiment of the present application, where the event processing model-based training device 3000 provided in the embodiment of the present application includes:
the first feature extraction module 3001 is configured to perform semantic feature extraction on an event training sample carrying a tag and at least one topic sample event through the semantic feature extraction layer, so as to obtain semantic features of the event training sample and semantic features of each topic sample event;
wherein the at least one topic sample event belongs to the same topic training sample, and the tag is used for indicating the correlation between the event training sample and the topic training sample;
the second feature extraction module 3002 is configured to perform, by using the time difference feature extraction layer, time difference feature extraction on a time difference between an occurrence time of the event training sample and a reference time to obtain a time difference feature of the event training sample, and perform time difference feature extraction on a time difference between an occurrence time of each topic sample event and the reference time to obtain a time difference feature of each topic sample event;
The fusion module 3003 is configured to fuse, through the feature fusion layer, the semantic features of the event training samples with corresponding time difference features to obtain fusion features of the event training samples, and fuse the semantic features of each topic sample event with corresponding time difference features to obtain fusion features of each topic sample event;
the prediction module 3004 is configured to predict, through the output layer, a correlation between the event training sample and the topic training sample based on the fusion feature of the event training sample and the fusion feature of each topic sample event, so as to obtain a corresponding prediction result;
the parameter updating module 3005 is configured to obtain a difference between the prediction result and the tag, and train the event processing model based on the difference, so as to predict, according to the event processing model obtained by training, a correlation between an event to be processed and a target topic including at least one topic event.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the event processing method based on the event processing model according to the embodiment of the application.
The embodiments of the present application provide a computer readable storage medium storing executable instructions, wherein the executable instructions are stored, which when executed by a processor, cause the processor to perform an event processing method based on an event processing model provided by the embodiments of the present application, for example, an event processing method based on an event processing model as shown in fig. 3.
In some embodiments, the computer readable storage medium may be FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; but may be a variety of devices including one or any combination of the above memories.
In some embodiments, the executable instructions may be in the form of programs, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and they may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
As an example, the executable instructions may, but need not, correspond to files in a file system, may be stored as part of a file that holds other programs or data, such as in one or more scripts in a hypertext markup language (html, hyper Text Markup Language) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
As an example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site or, alternatively, distributed across multiple sites and interconnected by a communication network.
In summary, the following technical effects can be achieved through the embodiments of the present application:
(1) By means of fusion processing of semantic features and time difference features of the events to be processed and fusion processing of semantic features and time difference features of each topic event, context semantic information and time information of the events to be processed and the target topics are fully utilized, and accordingly correlation between the events to be processed and the target topics is accurately predicted.
(2) The keywords of the topic event are determined based on the keywords respectively associated with the person, the place and the action in the topic event, so that the accuracy of the event keywords of the topic event can be improved.
(3) Firstly, matching the key words of topics with the content of the events to be processed, recalling at least one topic event possibly related to the events to be processed, and then accurately predicting the related relationship between the events to be processed and the topics based on the similar relationship between the events to be processed and the events of the topics; in this way, the correlation between the event to be processed and the topics can be accurately predicted by adopting the recall-prediction mode, and the correlation between the calculation time consumption of the prediction process and the number of topics is small, so that the event processing efficiency can be improved.
(4) Gain information outside the search word can be provided through event context, related reading requirements are actively mined on the premise that search requirements are met, the integrity of information presentation in a search result page is improved, the search times of non-acquired target information in a search scene are reduced, accordingly, resource consumption in a search process is reduced, the conversion rate of search can be improved, and the search frequency of users is increased.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and scope of the present application are intended to be included within the scope of the present application.
Claims (20)
1. An event processing method based on an event processing model, wherein the event processing model comprises: the method comprises a semantic feature extraction layer, a time difference feature extraction layer, a feature fusion layer and an output layer, and the method comprises the following steps:
respectively extracting semantic features of an event to be processed and at least one topic event through the semantic feature extraction layer to obtain semantic features of the event to be processed and semantic features of each topic event;
wherein the at least one topic event belongs to the same target topic;
Performing time difference feature extraction on the time difference between the occurrence time of the event to be processed and the reference time through the time difference feature extraction layer to obtain time difference features of the event to be processed, and performing time difference feature extraction on the time difference between the occurrence time of each topic event and the reference time to obtain time difference features of each topic event;
fusing semantic features of the events to be processed and corresponding time difference features through the feature fusion layer to obtain fusion features of the events to be processed, and fusing semantic features of the topic events and corresponding time difference features to obtain fusion features of the topic events;
and predicting the correlation between the event to be processed and the target topic based on the fusion characteristics of the event to be processed and the fusion characteristics of each topic event through the output layer, so as to obtain a corresponding prediction result.
2. The method as set forth in claim 1, wherein before the semantic feature extraction is performed on the event to be processed and the at least one topic event by the semantic feature extraction layer to obtain the semantic feature of the event to be processed and the semantic feature of each topic event, the method further includes:
Acquiring at least one topic from a topic library, and determining topic keywords of each topic;
matching the content of the event to be processed with topic keywords of each topic respectively to obtain corresponding matching results;
and when the obtained matching result represents that topics matched with the event to be processed exist in the at least one topic, determining the topics matched with the event to be processed as the target topics.
3. The method of claim 2, wherein said determining topic keywords for each of said topics comprises:
the following processing is performed for each of the topics:
determining at least one topic event contained in the topic, and acquiring at least two event keywords of each topic event;
selecting a target number of event keywords from at least two event keywords of each topic event as topic keywords of the topic.
4. The method of claim 3, wherein the obtaining at least two event keywords for each of the topic events comprises:
performing entity identification on the content of each topic event to obtain at least one entity keyword corresponding to a preset entity type, and taking the entity keyword as a candidate event keyword of the topic event;
Performing character weight analysis on the content of each topic event to obtain at least one action keyword, and taking the action keyword as a candidate event keyword of the topic event;
and selecting at least two candidate event keywords from the obtained candidate event keywords as event keywords of the topic event.
5. The method as set forth in claim 3, wherein said selecting a target number of event keywords from at least two event keywords of each of said topic events as topic keywords of said topic comprises:
counting the occurrence times of different event keywords in at least two event keywords of each topic event;
according to the occurrence times, at least two event keywords of each topic event are ordered in a descending order, and an ordering result is obtained;
and sequentially selecting event keywords from the first event keyword of the sequencing result until a target number of event keywords are selected as topic keywords of the topics.
6. The method as set forth in claim 1, wherein the performing semantic feature extraction on the event to be processed and the at least one topic event to obtain semantic features of the event to be processed and semantic features of each topic event includes:
Respectively acquiring distinguishing identifiers corresponding to the event to be processed and each topic event, wherein the distinguishing identifiers distinguish different events;
respectively extracting intermediate semantic features of the event to be processed and each topic event to obtain the intermediate semantic features of the event to be processed and the intermediate semantic features of each topic event;
based on the distinguishing identification of the events to be processed, enhancing the intermediate semantic features of the events to be processed to obtain the semantic features of the events to be processed, and based on the distinguishing identification of the events to be processed, enhancing the intermediate semantic features of the events to be processed to obtain the semantic features of the events to be processed.
7. The method as set forth in claim 1, wherein the extracting the time difference feature of the time difference between the occurrence time of each of the topic events and the reference time to obtain the time difference feature of each of the topic events includes:
performing difference processing on the occurrence time of each topic event and the reference time to obtain a time difference between each topic event and the reference time;
acquiring a mapping relation between the time difference and the time difference characteristic;
And determining the time difference characteristic of each topic event based on the mapping relation and the time difference between each topic event and the reference time.
8. The method of claim 1, wherein the fusing the semantic features of the event to be processed with the corresponding time difference features to obtain the fused features of the event to be processed comprises:
carrying out fusion processing on the semantic features of the event to be processed and the corresponding time difference features to obtain fusion features of the event to be processed;
fusing the semantic features of each topic event with corresponding time difference features to obtain fused features of each topic event, wherein the fused features comprise:
and carrying out fusion processing on the semantic features of each topic event and the corresponding time difference features to obtain fusion features of each topic event.
9. The method of claim 1, wherein the output layer comprises a first fusion layer and a first prediction layer;
the predicting, by the output layer, a correlation between the event to be processed and the target topic based on the fusion feature of the event to be processed and the fusion feature of each topic event, to obtain a corresponding prediction result, including:
Performing feature fusion on the fusion features of the events to be processed and the fusion features of the topic events through the first fusion layer to obtain first target fusion features;
and predicting the correlation between the event to be processed and the target topic based on the first target fusion characteristic through the first prediction layer to obtain a corresponding prediction result.
10. The method of claim 1, wherein the output layer comprises a second fusion layer and a second prediction layer;
the predicting, by the output layer, a correlation between the event to be processed and the target topic based on the fusion feature of the event to be processed and the fusion feature of each topic event, to obtain a corresponding prediction result, including:
feature fusion is carried out on the fusion features of the topic events through the second fusion layer, so that second target fusion features are obtained;
and predicting the correlation between the event to be processed and the target topic based on the fusion characteristic of the event to be processed and the second target fusion characteristic through the second prediction layer to obtain a corresponding prediction result.
11. The method of claim 1, wherein the output layer comprises two classification layers;
The predicting, by the output layer, a correlation between the event to be processed and the target topic based on the fusion feature of the event to be processed and the fusion feature of each topic event, to obtain a corresponding prediction result, including:
performing two-classification on the correlation between the event to be processed and the target topic based on the fusion characteristics of the event to be processed and the fusion characteristics of each topic event through the two-classification layer to obtain a two-classification result;
the classification result is used for indicating whether the event to be processed is related to the target topic or not.
12. The method of claim 1, wherein the output layer comprises a logistic regression layer;
the predicting, by the output layer, a correlation between the event to be processed and the target topic based on the fusion feature of the event to be processed and the fusion feature of each topic event, to obtain a corresponding prediction result, including:
and carrying out relevance score prediction on the relevance relation between the event to be processed and the target topic based on the fusion characteristics of the event to be processed and the fusion characteristics of each topic event through the logistic regression layer to obtain a score for indicating the relevance degree of the event to be processed and the target topic.
13. The method as set forth in claim 1, wherein the predicting the correlation between the event to be processed and the target topic, after obtaining a corresponding prediction result, further includes:
when the prediction result represents that the event to be processed is related to the target topic, integrating the event to be processed into the target topic according to the occurrence time of the event to obtain an event context corresponding to the target topic, wherein the event context comprises the event to be processed and at least one topic event.
14. The method of claim 13, wherein after integrating the event to be processed into the target topic to obtain an event context corresponding to the target topic, the method further comprises:
presenting an event search control;
and responding to an event searching operation aiming at the target topic and triggered based on the event searching control, and presenting the event context.
15. The method as set forth in claim 1, wherein before the semantic feature extraction is performed on the event to be processed and the at least one topic event by the semantic feature extraction layer, respectively, the method further includes:
Acquiring an event training sample carrying a label and a corresponding topic training sample; the label is used for indicating the correlation between the event training sample and the corresponding topic training sample, and the topic training sample comprises at least one topic sample event;
extracting semantic features of the event training samples and the topic sample events through the semantic feature extraction layer respectively to obtain semantic features of the event training samples and semantic features of the topic sample events;
performing time difference feature extraction on the time difference between the occurrence time of the event training sample and the reference time through the time difference feature extraction layer to obtain time difference features of the event training sample, and performing time difference feature extraction on the time difference between the occurrence time of each topic sample event and the reference time to obtain time difference features of each topic sample event;
fusing semantic features of the event training samples and corresponding time difference features through the feature fusion layer to obtain fusion features of the event training samples, and fusing semantic features of each topic sample event and corresponding time difference features to obtain fusion features of each topic sample event;
Predicting the correlation between the event training sample and the topic training sample based on the fusion characteristics of the event training sample and the fusion characteristics of each topic sample event through the output layer to obtain a corresponding prediction result;
and obtaining the difference between the prediction result and the label, and updating the model parameters of the event processing model based on the difference.
16. The method of claim 15, wherein the output layer comprises a two-classification layer and a logistic regression layer; the predicting, by the output layer, the correlation between the event training sample and the topic training sample based on the fusion feature of the event training sample and the fusion feature of each topic sample event, to obtain a corresponding prediction result, including:
performing two-class classification on the correlation between the event training sample and the topic training sample based on the fusion characteristics of the event training sample and the fusion characteristics of each topic sample event through the two-class classification layer to obtain a two-class classification result, and performing correlation score prediction on the correlation between the event training sample and the topic training sample based on the fusion characteristics of the event training sample and the fusion characteristics of each topic sample event through the logistic regression layer to obtain a score for indicating the correlation degree of the event training sample and the topic training sample;
Comparing the predicted result with the label to obtain a difference between the predicted result and the label, and updating model parameters of the event processing model based on the difference, wherein the method comprises the following steps:
acquiring a first loss function corresponding to the classification layer, the classification result and a first difference of the classification sub-labels in the labels, determining a value of the first loss function based on the first difference, acquiring a second loss function corresponding to the logistic regression layer, the score and a second difference of the molecular labels in the labels, and determining a value of the second loss function based on the second difference;
and determining the value of a target loss function corresponding to the event processing model by combining the value of the first loss function and the value of the second loss function, and updating model parameters of the event processing model based on the value of the target loss function.
17. A method of training an event processing model, the event processing model comprising: the method comprises a semantic feature extraction layer, a time difference feature extraction layer, a feature fusion layer and an output layer, and the method comprises the following steps:
respectively extracting semantic features of an event training sample carrying a tag and at least one topic sample event through the semantic feature extraction layer to obtain semantic features of the event training sample and semantic features of each topic sample event;
Wherein the at least one topic sample event belongs to the same topic training sample, and the tag is used for indicating the correlation between the event training sample and the topic training sample;
performing time difference feature extraction on the time difference between the occurrence time of the event training sample and the reference time through the time difference feature extraction layer to obtain time difference features of the event training sample, and performing time difference feature extraction on the time difference between the occurrence time of each topic sample event and the reference time to obtain time difference features of each topic sample event;
fusing semantic features of the event training samples and corresponding time difference features through the feature fusion layer to obtain fusion features of the event training samples, and fusing semantic features of each topic sample event and corresponding time difference features to obtain fusion features of each topic sample event;
predicting the correlation between the event training sample and the topic training sample based on the fusion characteristics of the event training sample and the fusion characteristics of each topic sample event through the output layer to obtain a corresponding prediction result;
And obtaining the difference between the prediction result and the label, and training the event processing model based on the difference so as to predict the correlation between the event to be processed and the target topic comprising at least one topic event through the event processing model obtained through training.
18. An event processing device based on an event processing model, wherein the event processing model comprises: semantic feature extraction layer, time difference feature extraction layer, feature fusion layer and output layer, the device includes:
the semantic feature extraction module is used for extracting semantic features of an event to be processed and at least one topic event through the semantic feature extraction layer respectively to obtain semantic features of the event to be processed and semantic features of each topic event; wherein the at least one topic event belongs to the same target topic;
the time difference feature extraction module is used for extracting time difference features of the occurrence time of the event to be processed and the time difference of the reference time through the time difference feature extraction layer to obtain time difference features of the event to be processed, and extracting time difference features of the occurrence time of each topic event and the time difference of the reference time to obtain time difference features of each topic event;
The feature fusion module is used for fusing the semantic features of the event to be processed with the corresponding time difference features through the feature fusion layer to obtain fusion features of the event to be processed, and fusing the semantic features of each topic event with the corresponding time difference features to obtain fusion features of each topic event;
the output module is used for predicting the correlation between the event to be processed and the target topic based on the fusion characteristics of the event to be processed and the fusion characteristics of each topic event through the output layer, so as to obtain a corresponding prediction result.
19. An electronic device, comprising:
a memory for storing executable instructions;
a processor for implementing the method of any one of claims 1 to 17 when executing executable instructions stored in said memory.
20. A computer readable storage medium storing executable instructions for causing a processor to perform the method of any one of claims 1-17.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210003231.2A CN116450814A (en) | 2022-01-04 | 2022-01-04 | Event processing method, device, equipment and medium based on event processing model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210003231.2A CN116450814A (en) | 2022-01-04 | 2022-01-04 | Event processing method, device, equipment and medium based on event processing model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116450814A true CN116450814A (en) | 2023-07-18 |
Family
ID=87120655
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210003231.2A Pending CN116450814A (en) | 2022-01-04 | 2022-01-04 | Event processing method, device, equipment and medium based on event processing model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116450814A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117875522A (en) * | 2024-03-12 | 2024-04-12 | 之江实验室 | Method, device, storage medium and equipment for predicting event number |
CN118152668A (en) * | 2024-05-10 | 2024-06-07 | 腾讯科技(深圳)有限公司 | Media information processing method and device, equipment, storage medium and program product |
-
2022
- 2022-01-04 CN CN202210003231.2A patent/CN116450814A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117875522A (en) * | 2024-03-12 | 2024-04-12 | 之江实验室 | Method, device, storage medium and equipment for predicting event number |
CN118152668A (en) * | 2024-05-10 | 2024-06-07 | 腾讯科技(深圳)有限公司 | Media information processing method and device, equipment, storage medium and program product |
CN118152668B (en) * | 2024-05-10 | 2024-07-23 | 腾讯科技(深圳)有限公司 | Media information processing method and device, equipment, storage medium and program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112507715B (en) | Method, device, equipment and storage medium for determining association relation between entities | |
JP7206288B2 (en) | Music recommendation method, apparatus, computing equipment and medium | |
US11741072B2 (en) | Method and apparatus for real-time interactive recommendation | |
US11797773B2 (en) | Navigating electronic documents using domain discourse trees | |
CN112163165B (en) | Information recommendation method, device, equipment and computer readable storage medium | |
US11172040B2 (en) | Method and apparatus for pushing information | |
US11580144B2 (en) | Search indexing using discourse trees | |
KR20170004154A (en) | Method and system for automatically summarizing documents to images and providing the image-based contents | |
CN116450814A (en) | Event processing method, device, equipment and medium based on event processing model | |
CN112188312B (en) | Method and device for determining video material of news | |
WO2023160500A1 (en) | Encyclopedia information display method and apparatus, device and medium | |
CN105786897B (en) | For providing the context aware body constructing method for paying close attention to information of the user based on context aware | |
CN110972499A (en) | Labeling system of neural network | |
CN115858910A (en) | Object recommendation method and device based on artificial intelligence and electronic equipment | |
WO2023040516A1 (en) | Event integration method and apparatus, and electronic device, computer-readable storage medium and computer program product | |
CN112417133A (en) | Training method and device of ranking model | |
CN111639234B (en) | Method and device for mining core entity attention points | |
KR102532216B1 (en) | Method for establishing ESG database with structured ESG data using ESG auxiliary tool and ESG service providing system performing the same | |
US11314793B2 (en) | Query processing | |
CN116484085A (en) | Information delivery method, device, equipment, storage medium and program product | |
CN113961811A (en) | Conversational recommendation method, device, equipment and medium based on event map | |
CN116453702B (en) | Data processing method, device, system and medium for autism behavior feature set | |
CN113010702B (en) | Interactive processing method and device for multimedia information, electronic equipment and storage medium | |
CN115840813A (en) | Extended event display method, device, equipment and computer readable storage medium | |
Nguyen | Temporal models for mining, ranking and recommendation in the Web |
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 | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40090433 Country of ref document: HK |