Event processing method and device based on event processing model, equipment and medium

By using a semantic and temporal difference feature fusion method based on an event processing model, the problem of low accuracy in incremental clustering is solved, and high-accuracy integration of events and target topics is achieved.

CN116450814BActive Publication Date: 2025-11-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210003231.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-04
Publication Date
2025-11-25
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of integrating the latest developments and topics through incremental clustering is low, resulting in a low accuracy of event integration.

Method used

An event-based model is used to extract semantic features and time difference features of an event through a semantic feature extraction layer and a time difference feature extraction layer, respectively. These features are then fused through a feature fusion layer, and the output layer is used to predict the correlation between the event and the target topic.

Benefits of technology

It improved the accuracy of predicting the correlation between events and target topics, and increased the accuracy of event integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116450814B_ABST
    Figure CN116450814B_ABST
Patent Text Reader

Abstract

The application provides an event processing method based on an event processing model, comprising: through a semantic feature extraction layer of the event processing model, performing semantic feature extraction on a to-be-processed event and each topic event respectively to obtain corresponding semantic features; then, through a time difference feature extraction layer, performing time difference feature extraction on the to-be-processed event and each topic event respectively according to a reference time to obtain corresponding time difference features; then, through a feature fusion layer, fusing the semantic features and corresponding time difference features of the to-be-processed event and the semantic features and corresponding time difference features of each topic event respectively to obtain corresponding fusion features; finally, through an output layer, predicting the correlation between the to-be-processed event and a target topic based on the corresponding fusion features of the to-be-processed event and each topic event to obtain a corresponding prediction result. In this way, the accuracy of event processing can be improved, so that the correlation between the event and the target topic can be accurately predicted.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the artificial intelligence technology field, and particularly relates to an event processing method and device based on an event processing model, an electronic device and a computer readable storage medium. BACKGROUND

[0002] For a topic with a long duration (often composed of multiple events that have occurred), when a latest progress event is obtained, the correlation between the latest progress event and the corresponding target topic needs to be determined, and then the latest progress event is integrated into the corresponding topic to form an event context containing the latest progress event, so that the user can intuitively understand the development process of the event through the event context.

[0003] Generally, in order to integrate the latest progress event into the topic, a clustering method is usually used, that is, the latest progress event is incrementally clustered with the topic, so as to determine the correlation between the latest progress event and the topic according to the clustering center and the threshold, and then determine the topic to which the latest progress event belongs, so as to integrate the latest progress event into the topic. However, when the correlation between the latest progress event and the topic is predicted by the above incremental clustering method, the accuracy of the prediction is low due to the low accuracy of the clustering, and thus 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 the event integration is low. SUMMARY

[0004] The embodiments of the present application provide an event processing method and device based on an event processing model, an electronic device, a computer readable storage medium and a computer program product, which can improve the prediction accuracy of the event processing model, thereby accurately predicting the correlation between the event and the target topic.

[0005] The technical solutions of the embodiments of the present application are as follows:

[0006] The embodiments of the present application provide an event processing method based on an event processing model, the event processing model comprising a semantic feature extraction layer, a time difference feature extraction layer, a feature fusion layer and an output layer, and the method comprising:

[0007] The semantic feature extraction layer is used to respectively extract semantic features of a to-be-processed event and at least one topic event, to obtain the semantic features of the to-be-processed event and the semantic features of each topic event;

[0008] The at least one topic event belongs to the same target topic.

[0009] extracting a time difference feature of the to-be-processed event by the time difference feature extraction layer, and extracting a time difference feature of each of the topic events by extracting a time difference between an occurrence time of each of the topic events and the reference time;

[0010] fusing the semantic feature of the to-be-processed event and the corresponding time difference feature by the feature fusion layer to obtain a fusion feature of the to-be-processed event, and fusing the semantic feature of each of the topic events and the corresponding time difference feature to obtain a fusion feature of each of the topic events;

[0011] predicting a correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion features of the topic events by the output layer to obtain a corresponding prediction result.

[0012] An event processing device based on an event processing model is provided in the embodiments of the present application, the event processing model comprising a semantic feature extraction layer, a time difference feature extraction layer, a feature fusion layer, and an output layer, and the device comprising:

[0013] The semantic feature extraction module is configured to extract semantic features of a to-be-processed event and at least one topic event by the semantic feature extraction layer to obtain the semantic features of the to-be-processed event and the semantic features of the topic events, respectively; wherein the at least one topic event belongs to a same target topic.

[0014] The time difference feature extraction module is configured to extract a time difference feature of the to-be-processed event by extracting a time difference between an occurrence time of the to-be-processed event and a reference time by the time difference feature extraction layer, and extract a time difference feature of each of the topic events by extracting a time difference between an occurrence time of each of the topic events and the reference time.

[0015] The feature fusion module is configured to fuse the semantic feature of the to-be-processed event and the corresponding time difference feature by the feature fusion layer to obtain a fusion feature of the to-be-processed event, and fuse the semantic feature of each of the topic events and the corresponding time difference feature to obtain a fusion feature of each of the topic events.

[0016] The output module is configured to predict a correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion features of the topic events by the output layer to obtain a corresponding prediction result.

[0017] In the above scheme, the device further comprises a screening module, the screening module is configured to: acquire at least one topic from the topic library, and determine topic keywords of each of the topics; match the content of the to-be-processed event with the topic keywords of each of the topics respectively to obtain corresponding matching results; and when the matching results obtained represent that there is a topic matched with the to-be-processed event in the at least one topic, determine the topic matched with the to-be-processed event as the target topic.

[0018] In the above scheme, the screening module is further configured to: for each of the topics, determine at least one topic event contained in the topic, and acquire at least two event keywords of each of the topic events; and from the at least two event keywords of each of the topic events, select a target number of event keywords as the topic keywords of the topic.

[0019] In the above scheme, the screening module is further configured to: perform entity recognition on the content of each of the topic events to obtain at least one entity keyword corresponding to a preset entity type, and take the entity keyword as a candidate event keyword of the topic event; perform character weight analysis on the content of each of the topic events to obtain at least one action keyword, and take the action keyword as a candidate event keyword of the topic event; and from the candidate event keywords obtained, select at least two candidate event keywords as the event keywords of the topic event.

[0020] In the above scheme, the screening module is further configured to: count the number of occurrences of different event keywords in the at least two event keywords of each of the topic events; sort the at least two event keywords of each of the topic events in descending order according to the number of occurrences to obtain a sorting result; and from the first event keyword of the sorting result, sequentially select event keywords until a target number of event keywords are selected as the topic keywords of the topic.

[0021] In the above scheme, the semantic feature extraction module is further configured to: respectively perform intermediate semantic feature extraction on the to-be-processed event and each of the topic events to obtain intermediate semantic features of the to-be-processed event and intermediate semantic features of each of the topic events; perform enhancement processing on the intermediate semantic features of the to-be-processed event based on the distinguishing identifier of the to-be-processed event to obtain the semantic features of the to-be-processed event, and perform enhancement processing on the intermediate semantic features of each of the topic events based on the distinguishing identifier of each of the topic events to obtain the semantic features of each of the topic events.

[0022] In the above scheme, the time difference feature extraction module is further configured to: perform difference processing 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; acquire a mapping relationship between the time difference and the time difference feature; and determine the time difference feature of each of the topic events based on the mapping relationship and the time difference between each of the topic events and the reference time.

[0023] In the above scheme, the feature fusion module is further configured to: perform fusion processing on the semantic feature of the to-be-processed event and the corresponding time difference feature to obtain a fusion feature of the to-be-processed event; and perform fusion processing on the semantic feature of each of the topic events and the corresponding time difference feature to obtain a fusion feature of each of the topic events.

[0024] 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 to-be-processed event and the fusion feature of each of the topic events by the first fusion layer to obtain a first target fusion feature; and perform prediction on the correlation between the to-be-processed event and the target topic based on the first target fusion feature by the first prediction layer to obtain a corresponding prediction result.

[0025] 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 feature of each of the topic events by the second fusion layer to obtain a second target fusion feature; and perform prediction on the correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the second target fusion feature by the second prediction layer to obtain a corresponding prediction result.

[0026] In the above scheme, the output layer includes a binary classification layer, and the output module is further configured to: perform binary classification on the correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion feature of each of the topic events by the binary classification layer to obtain a binary classification result; and the binary classification result is used to indicate whether the to-be-processed event is related to the target topic.

[0027] In the above scheme, the output layer includes a logistic regression layer, and the output module is further configured to: perform relevance score prediction on the correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion feature of each of the topic events by the logistic regression layer to obtain a score used to indicate the correlation degree between the to-be-processed event and the target topic.

[0028] In the above scheme, the device further comprises an integration module, configured to integrate the to-be-processed event into the target topic according to the occurrence time of the event to obtain an event context corresponding to the target topic when the prediction result indicates that the to-be-processed event is related to the target topic, wherein the event context comprises the to-be-processed event and at least one topic event.

[0029] In the above scheme, the device further comprises a presentation module, configured to present an event search control; and present the event context in response to an event search operation for the target topic triggered based on the event search control.

[0030] In the above scheme, the device further comprises a training module, configured to obtain an event training sample carrying a label and a corresponding topic training sample; wherein the label is used to indicate a correlation between the event training sample and the corresponding topic training sample, and the topic training sample comprises at least one topic sample event; the semantic feature extraction layer is used to perform semantic feature extraction on the event training sample and each topic sample event respectively to obtain a semantic feature of the event training sample and a semantic feature of each topic sample event; the time difference feature extraction layer is used to perform 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 feature fusion layer is used to fuse the semantic feature of the event training sample and a corresponding time difference feature to obtain a fusion feature of the event training sample, and fuse the semantic feature of each topic sample event and a corresponding time difference feature to obtain a fusion feature of each topic sample event; and the output layer is used to predict 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 corresponding prediction result; compare the prediction result with the label to obtain a difference between the prediction result and the label, and update model parameters of the event processing model based on the difference.

[0031] In the scheme, the output layer includes a binary classification layer and a logistic regression layer, and the output module is further configured to perform binary 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 through the binary classification layer to obtain a binary classification result, and perform 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 through the logistic regression layer to obtain a score indicating the correlation degree between the event training sample and the topic training sample; obtain a first difference between a first loss function corresponding to the binary classification layer, the binary classification result and a binary classification sub-label in the label, determine a value of the first loss function based on the first difference, obtain a second difference between a second loss function corresponding to the logistic regression layer, the score and a score sub-label in the label, and determine a value of the second loss function based on the second difference; combine the value of the first loss function and the value of the second loss function to determine a value of a target loss function corresponding to the event processing model, and update the model parameter of the event processing model based on the value of the target loss function.

[0032] The embodiments of the present application also provide a method for training an event processing model, the event processing model comprising a semantic feature extraction layer, a time difference feature extraction layer, a feature fusion layer and an output layer, and the method comprising:

[0033] The semantic feature extraction layer is configured to extract semantic features from an event training sample carrying a label and at least one topic sample event respectively to obtain semantic features of the event training sample and semantic features of each topic sample event.

[0034] The at least one topic sample event belongs to a same topic training sample, and the label is used to indicate the correlation between the event training sample and the topic training sample.

[0035] The time difference feature extraction layer is configured to extract time difference features from 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 extract time difference features from a time difference between an occurrence time of each topic sample event and the reference time to obtain time difference features of each topic sample event.

[0036] The feature fusion layer is configured to fuse the semantic features of the event training sample with corresponding time difference features to obtain a fusion feature of the event training sample, and fuse the semantic features of each topic sample event with corresponding time difference features to obtain fusion features of each topic sample event.

[0037] The output layer is used to predict 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, and obtain a corresponding prediction result.

[0038] A difference between the prediction result and the label is obtained, and the event processing model is trained based on the difference, so as to predict the correlation between a to-be-processed event and a target topic including at least one topic event by using the trained event processing model.

[0039] An electronic device is provided in an embodiment of the present application, and the electronic device includes:

[0040] A memory is configured to store executable instructions.

[0041] A processor is configured to execute the executable instructions stored in the memory, and implement the event processing method based on the event processing model provided in the embodiments of the present application.

[0042] An electronic device is provided in an embodiment of the present application, and the electronic device includes:

[0043] A memory is configured to store executable instructions.

[0044] A processor is configured to execute the executable instructions stored in the memory, and implement the training method of the event processing model provided in the embodiments of the present application.

[0045] A computer readable storage medium is provided in an embodiment of the present application, and the computer readable storage medium stores executable instructions, which are used to cause a processor to execute the event processing method based on the event processing model provided in the embodiments of the present application.

[0046] A computer readable storage medium is provided in an embodiment of the present application, and the computer readable storage medium stores executable instructions, which are used to cause a processor to execute the training method of the event processing model provided in the embodiments of the present application.

[0047] A computer program product or a computer program is provided in an embodiment of the present application, and the computer program product or the computer program includes computer instructions stored in a computer readable storage medium. A processor of an 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 in the embodiments of the present application.

[0048] The embodiment of the application provides a computer program product or computer program, which comprises 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.

[0049] The embodiment of the application has the following beneficial technical effects:

[0050] In the prediction of the correlation between the to-be-processed event and the target topic, the semantic features of the to-be-processed event 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 as to obtain the fusion features of the to-be-processed event and the fusion features of each topic event. Then, the correlation between the to-be-processed event and the target topic is predicted based on the fusion features of the to-be-processed event and the fusion features of each topic event. In this way, the semantic feature and the time difference feature of the to-be-processed event and the semantic feature and the time difference feature of each topic event are fused and processed, so that the context semantic information and the time information of the to-be-processed event and the target topic are fully utilized, the correlation between the to-be-processed event and the target topic is accurately predicted, and then when the to-be-processed event is integrated into the topic, the accuracy of event integration is improved. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 FIG. 1 is an architectural schematic diagram of an event processing system based on an event processing model provided by the embodiment of the application;

[0052] Figure 2 FIG. 2 is a structural schematic diagram of an electronic device provided by the embodiment of the application;

[0053] Figure 3 FIG. 3 is a flow schematic diagram of an event processing method based on an event processing model provided by the embodiment of the application;

[0054] Figure 4 FIG. 4 is a structural schematic diagram of an event processing model provided by the embodiment of the application;

[0055] Figure 5 FIG. 5 is a flow schematic diagram of determining a target topic associated with a to-be-processed event provided by the embodiment of the application;

[0056] Figure 6 FIG. 6 is a schematic diagram of an event processing method based on an event processing model provided by the embodiment of the application;

[0057] Figure 7 FIG. 7 is a flow schematic diagram of a process of determining a topic keyword of a topic provided by the embodiment of the application;

[0058] Figure 8 FIG. 1 is a flowchart of a process for determining event keywords of each topic event based on entity keywords and action keywords according to an embodiment of the present application;

[0059] Figure 9 FIG. 2 is a flowchart of a process for determining semantic features of a to-be-processed event and semantic features of each topic event according to an embodiment of the present application;

[0060] Figure 10 FIG. 3 is a schematic diagram of a process for determining semantic features of a to-be-processed event and semantic features of each topic event according to an embodiment of the present application;

[0061] Figure 11 FIG. 4 is a flowchart of a process for determining semantic features of a to-be-processed event and time difference features of each topic event according to an embodiment of the present application;

[0062] Figure 12 FIG. 5 is a schematic diagram of a process for determining time difference features of each topic event according to an embodiment of the present application;

[0063] Figure 13 FIG. 6 is a schematic diagram of a time difference-time difference feature mapping table according to an embodiment of the present application;

[0064] Figure 14 FIG. 7 is a schematic diagram of a process for determining fusion features of each topic event according to an embodiment of the present application;

[0065] Figure 15 FIG. 8 is a structural schematic diagram of an event processing model according to an embodiment of the present application;

[0066] Figure 16 FIG. 9 is a structural schematic diagram of an event processing model according to an embodiment of the present application;

[0067] Figure 17 FIG. 10 is a structural schematic diagram of an event processing model according to an embodiment of the present application;

[0068] Figure 18 FIG. 11 is a structural schematic diagram of an event processing model according to an embodiment of the present application;

[0069] Figure 19 FIG. 12 is a structural schematic diagram of an event processing model according to an embodiment of the present application;

[0070] Figure 20 FIG. 13 is a flowchart of an event processing method based on an event processing model according to an embodiment of the present application;

[0071] Figure 21 FIG. 14 is a flowchart of an event processing method based on an event processing model according to an embodiment of the present application;

[0072] Figure 22 is an exemplary event context presentation schematic diagram provided by an embodiment of the present application;

[0073] Figure 23 is an exemplary event context presentation schematic diagram provided by an embodiment of the present application;

[0074] Figure 24 is a flow schematic diagram of an event processing method based on an event processing model provided by an embodiment of the present application;

[0075] Figure 25 is a flow schematic diagram of a training method of an event processing model provided by an embodiment of the present application;

[0076] Figure 26 is a flow schematic diagram of an event processing method based on an event processing model provided by an embodiment of the present application;

[0077] Figure 27 is a schematic diagram of an embodiment of the present application for obtaining a semantic vector of each event in an event sequence constituted by a latest progress event and each topic event based on an encoding module;

[0078] Figure 28A is a schematic diagram of a fusion process of a bidirectional LSTM model provided by an embodiment of the present application;

[0079] Figure 28B is a schematic diagram of a fusion process of a single-layer Transformer model provided by an embodiment of the present application;

[0080] Figure 29 is a schematic diagram of a double-loss optimization provided by an embodiment of the present application;

[0081] Figure 30 is a structural schematic diagram of a training device based on an event processing model provided by an embodiment of the present application. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings, and the described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by a person of ordinary skill in the art without making creative efforts fall within the scope of protection of the present application.

[0083] In the following description, “some embodiments” are described, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0084] In the following description, the terms "first", "second", "third" are merely used to distinguish similar objects, and do not represent a specific order or sequence of the objects. Understandably, the "first", "second", "third" can be interchanged in a specific order or sequence as permitted, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In the following description, the term "a plurality of" refers to at least two.

[0085] Unless otherwise defined, 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 in this application is for the purpose of describing embodiments of this application only and is not intended to be limiting of this application.

[0086] Before further detailing the embodiments of the present application, the terms and phrases involved in the embodiments of the present application are explained, and the terms and phrases involved in the embodiments of the present application are applicable to the following explanations.

[0087] 1) Named Entity Recognition (NER), also known as entity recognition, entity chunking and entity extraction, is used to locate and classify named entities in text into pre-defined categories such as person, organization, location, time expression, quantity, currency value, percentage, etc.; generally, the task of named entity recognition is to identify three major categories (entity category, time category and number category) and seven minor categories (person name, organization name, place name, time, date, currency and percentage) named entities in the text to be processed. In the embodiments of the present application, through named entity recognition, entities of preset entity types are obtained, such as entities of person name and place name types.

[0088] 2) Nature Language processing (NLP) is an important direction in the field of computer science and artificial intelligence; it refers to the study of various theories and methods that can realize effective communication between people and computers using natural language. Therefore, natural language processing is a science that integrates linguistics, computer science and mathematics; thus, the research in the field of natural language processing will involve natural language, i.e. the language used in daily life, so natural language processing is closely related to the study of linguistics. Natural language processing technology usually includes machine reading comprehension (MRC), text processing, semantic understanding, machine translation, robot question and answer and knowledge graph, etc.

[0089] 3) Machine Reading Comprehension (MRC) is a natural language processing task, which is generally in the form of one question and one answer.

[0090] 4) Transformer model, a model based on self-attention mechanism, which can be used for sequence modeling

[0091] 5) LSTM (Long short-term memory) model, a long short-term memory model, which can be used for sequence modeling

[0092] 6) BERT model (Bidirectional Encoder Representations from Transformer), a natural language processing pre-training technology, which is used to train a semantic representation of a text containing rich semantic information by using a large amount of unlabeled corpus, and then fine-tune the semantic representation of the text in a specific natural language processing task, and finally apply it to the natural language processing task.

[0093] The applicant finds that, in general, in order to integrate the latest progress event into the topic, the clustering method is usually used, that is, the latest progress event is incrementally clustered with the topic, the correlation between the latest progress event and the topic is determined according to the cluster center and the threshold, and then the topic to which the latest progress event belongs is determined, so as to integrate the latest progress event into the topic. However, the above-mentioned method of incrementally clustering has the problem that the computational overhead increases with the increase of the number of topics, resulting in low efficiency of event integration and difficulty in controlling the threshold; at the same time, for the process of determining the correlation between the latest progress event and the topic based on the above-mentioned incremental clustering method, a conventional vector distance, a Term Frequency-Inverse Document Frequency (TF-IDF), a named entity and other basic simple features are generally used for similarity calculation. Most of the invention innovations are concentrated on designing different clustering methods and increasing various clustering features, and the simple traditional features are used for similarity calculation, which is simple to implement but has low accuracy.

[0094] Based on this, the embodiments of the present application provide an event processing method and device based on an event processing model, an electronic device, a computer readable storage medium and a computer program product, which technically ensure the accuracy and effectiveness, and the calculation time consumption will not increase with the increase of the number of topics and events, which is better than the clustering method, and the implicit reading comprehension input and timestamp fusion are creatively designed, which fully captures the context and time information of the topic and the latest progress event, greatly improving the accuracy and rationality of predicting the correlation between the latest progress event and the topic.

[0095] Referring to Figure 1 , Figure 1The application provides an event processing system 100 based on an event processing model. The event processing system 100 is used in an application scenario of event processing based on an event processing model (for example, a scenario of showing an event context, specifically, in a search scenario, by accurately predicting a correlation between a to-be-processed event and a target topic, a good context is generated when searching for an event with continuous information, all contexts are expanded by clicking a more button, the displayed context includes a title of each event in the context, a time when the event occurs, the corresponding article is jumped to by clicking the event title, the user is provided with gain information outside the search word through the event context, the user's demand for related reading is actively mined under the premise of meeting the user's search demand, and the user value of a search result page is improved; for example, an application scenario of search recommendation, in an information flow scenario, when a user completes an article reading, by accurately predicting a correlation between a to-be-processed event and a target topic, a search keyword of a topic event related to the article can be recommended at the bottom of the article, the user's demand for understanding related events is met, and the user search frequency is improved; for example, an application scenario of associated search, in a search scenario, when a user searches for a related event, by accurately predicting a correlation between a to-be-processed event and a target topic, a keyword of the latest progress can be directly displayed in a search result, the user is guided to pay attention to the related event, and the user search frequency is improved. A terminal (for example, a terminal 400) is connected to a server 200 through a network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0096] The terminal 400 is used for a user to use a client 401 to display a display interface 401-1 (for example, a display interface 401-1). The terminal 400 and the server 200 are connected to each other through a wired or wireless network.

[0097] The server 200 is configured to perform semantic feature extraction on a to-be-processed event and at least one topic event through a semantic feature extraction layer of an event processing model, to obtain semantic features of the to-be-processed event and semantic features of each topic event, wherein the at least one topic event belongs to a same target topic; perform time difference feature extraction on a time difference between an occurrence time of the to-be-processed event and a reference time through a time difference feature extraction layer, to obtain a time difference feature of the to-be-processed event, 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; perform fusion on the semantic features of the to-be-processed event and corresponding time difference features through a feature fusion layer, to obtain a fusion feature of the to-be-processed event, and perform fusion on the semantic features of each topic event and corresponding time difference features, to obtain a fusion feature of each topic event; and perform prediction on a correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion features of each topic event through an output layer, to obtain a corresponding prediction result.

[0098] The server 200 is further configured to, when the prediction result indicates that the to-be-processed event is related to the target topic, integrate the to-be-processed event into the target topic according to the occurrence time of the to-be-processed event, to obtain an event context corresponding to the target topic, the event context including the to-be-processed event and at least one topic event; and send the event context to the terminal 400.

[0099] The terminal 400 is configured to present the event context obtained from the server 200 in the display interface 401-1.

[0100] In some embodiments, the server 200 can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 400 can be 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 vehicle-mounted terminal, an aircraft, and 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), but is not limited thereto. The terminal device and the server can be connected directly or indirectly through wired or wireless communication, which is not limited in the embodiments of the present application.

[0101] Referring to Figure 2 , Figure 2 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. In actual application, the electronic device can be Figure 1 the server 200 or the terminal 400 shown in the figure, referring to Figure 2 , Figure 2 The electronic device includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal 400 are coupled together through a bus system 440. It can be understood that the bus system 440 is used to realize the connection and communication between the components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 440 in the figure. Figure 2

[0102] ​The processor 410 can be an integrated circuit chip that has a processing capability of signals, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor.

[0103] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432 that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0104] The memory 450 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 450 optionally includes one or more storage devices physically located in proximity to the processor 410.

[0105] The memory 450 includes volatile memory or non-volatile memory, and can also include both volatile and non-volatile memory. Non-volatile memory can be read only memory (ROM), and volatile memory can be random access memory (RAM). The memory 450 described in embodiments of the present application is intended to include any suitable type of memory.

[0106] In some embodiments, the memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or a subset or superset thereof, which are exemplarily illustrated below.

[0107] The operating system 451 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0108] The network communication module 452 is used to reach other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including Bluetooth, wireless compatibility certification (WiFi), and universal serial bus (USB), etc.

[0109] a presentation module 453 for enabling presentation of information (e.g., a user interface for operating the peripheral device and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with the user interface 430;

[0110] an input processing module 454 for detecting and translating one or more user inputs or interactions from one or more input devices 432.

[0111] In some embodiments, the event processing apparatus based on the event processing model provided by the embodiments of the present application can be implemented in a software manner, Figure 2 An event processing apparatus 455 based on the event processing model stored in the memory 450 is shown, which can be software in the form of programs and plug-ins, etc., including the following software modules: a semantic feature extraction module 4551, a time difference feature extraction module 4552, a feature fusion module 4553, and an output module 4554. These modules are logical, and thus can be combined or further split according to the implemented functions.

[0112] In some other embodiments, the event processing apparatus based on the event processing model provided by the embodiments of the present application can be implemented in a hardware manner. As an example, the event processing apparatus based on the event processing model provided by the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the event processing method based on the event processing model provided by the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can use one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic elements.

[0113] In some embodiments, a terminal or a server can 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 can be a native program or a software module in an operating system; can be 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, a web browser APP; can also be a mini-program, i.e., a program that only needs to be downloaded into a browser environment to run; and can also be a mini-program that can be embedded into any APP. In summary, the above computer program can be any form of application program, module or plug-in.

[0114] 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 actual implementation, the event processing method based on the event processing model provided in the embodiments of the present application can be implemented by a terminal or a server alone, or by a terminal and a server cooperatively, to execute the event processing method based on the event processing model provided in the embodiments of the present application by the server 200 in the terminal 100 and the server 200 in the system 1000 in FIG. 1. Figure 1 Figure 3 Figure 3 is a flowchart of the event processing method based on the event processing model provided in the embodiments of the present application. It should be noted that the event processing model includes a semantic feature extraction layer, a time difference feature extraction layer, a feature fusion layer and an output layer, see Figure 4 Figure 4 is a structural diagram of the event processing model provided in the embodiments of the present application. The steps shown are described in combination with Figure 3 and Figure 4 .

[0115] In step 101, the server performs semantic feature extraction on the to-be-processed event and at least one topic event respectively through the semantic feature extraction layer, to obtain semantic features of the to-be-processed event and semantic features of each topic event; wherein the at least one topic event belongs to the same target topic.

[0116] In actual implementation, first, the to-be-processed event needs to be obtained, which can be obtained by detecting the event, or by receiving an event sent by another device, etc., which is not limited in the embodiments of the present application.

[0117] ​​​It should be noted that the to-be-processed event refers to an event to be processed, and the event is used to describe information of an event that has occurred, such as a news event, a highlight event; and the to-be-processed event can be a latest event or a historical event, where the historical event refers to an event of an event that has occurred after the corresponding event time, and the embodiments of the present application do not limit this; in addition, the to-be-processed event at least includes text information, and can also include at least one of audio, video, image and table. In addition, the target topic can be a topic in the topic library, or a topic possibly associated with the to-be-processed event screened from the topic library, and the like, and the embodiments of the present application do not limit this; and the topic is an event theme, which is a collection of related events, and includes at least one topic event, and the topic event is also an event.

[0118] In some embodiments, for the case that the target topic is a topic possibly associated with the to-be-processed event screened from the database, first, topic screening is performed from the database, so that the target topic associated with the to-be-processed event, and then the process of determining the target topic associated with the to-be-processed event will be described.

[0119] Referring to Figure 5 , Figure 5 is a flowchart of a process of determining a target topic associated with a to-be-processed event provided by the embodiments of the present application, based on Figure 3 Before step 101, the following can also be performed:

[0120] Step 201, the server obtains at least one topic from the topic library, and determines topic keywords of each topic.

[0121] In actual implementation, first, a topic library containing a plurality of topics is obtained in advance, so that after obtaining the to-be-processed event, a plurality of topics are obtained from the topic library and topic keywords of each topic are determined.

[0122] As an example, when the to-be-processed event is a news event (i.e. a latest event), referring to Figure 6 , Figure 6 is a flowchart of an event processing method based on an event processing model provided by the embodiments of the present application, here, the to-be-processed event is "the first department responds to Zhang Er's revocation of the ban on the first object", three topics are obtained from the topic library, and topic keywords of each topic are determined, such as the topic keywords of topic 1 are "nurse" and "deputy director", the topic keywords of topic 2 are "H place" and "jumping car", and the topic keywords of topic 3 are "Li San" and "first object".

[0123] In actual implementation, when obtaining at least one topic from the topic library, first, the topic keywords of each topic are determined, and the process of determining the topic keywords of each topic is based on the event keywords of at least one topic event included in the topic, see Figure 7 , Figure 7 is a flowchart of the process of determining the topic keywords of the topic according to an embodiment of the present application, based on Figure 5 , and next, the process of determining the topic keywords of each topic will be described in combination with Figure 7

[0124] In step 2011, at least one topic event included in the topic is determined, and at least two event keywords of each topic event are obtained.

[0125] It should be noted that the event keywords of the topic event are obtained from multiple dimensions.

[0126] In some embodiments, one of the dimensions can be the entity of the topic event, specifically, a preset entity type is obtained in advance, such as a person name type and a place name type; then entity recognition is performed on the content of each topic event to obtain at least one entity keyword corresponding to the preset entity type, and the entity keyword is taken as a candidate event keyword of the topic event.

[0127] In some embodiments, one of the dimensions can be the character weight of the topic event, specifically, character weight analysis is performed on the content of each topic event to obtain at least one action keyword, and the action keyword is taken as a candidate event keyword of the topic event.

[0128] 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 can be that character weight analysis is performed on the content of each topic event to obtain keywords greater than a weight threshold, and then the keywords greater than the weight threshold are obtained, and the keywords representing actions in the obtained keywords greater than the weight threshold are determined as the candidate event keywords of the topic event.

[0129] In actual implementation, after the candidate event keywords of the topic event are determined, at least two candidate event keywords are selected from the obtained candidate event keywords as the event keywords of the topic event, specifically, when the event keywords of the topic event are determined based on the entity keywords, all the entity keywords can be taken as the event keywords of the topic event, or keywords can be extracted from the entity keywords to obtain the event keywords of the topic event; when the event keywords of the topic event are determined based on the action keywords, all the action keywords can be taken as the event keywords of the topic event, or keywords can be extracted from the action keywords to obtain the event keywords of the topic event; or keywords obtained in any combination of the entity keywords and the action keywords can be determined as the event keywords of the topic event.​

[0130] It should be noted that since an event usually includes at least one of a person, a place, and an action, the keywords of the topic event are determined based on the keywords associated with the person, the place, and the action in the topic event, which can improve the accuracy of the event keywords of the topic event.

[0131] It should be noted that when the keywords obtained in any combination manner of the entity keywords and the action keywords are determined as the event keywords of the topic event, since the number of keywords in the event keywords of each topic event is limited, the number of keywords selected from the action keywords to be determined as the event keywords of the topic event can be determined based on the number of keywords included in the entity keywords, and whether the action keywords are also determined as the event keywords of the topic event can be determined based on the number of keywords included in the entity keywords.

[0132] Next, the process of determining the keywords obtained in any combination manner of the entity keywords and the action keywords as the event keywords of the topic event is described with reference to Figure 8 , Figure 8 is a flowchart of the process of determining the event keywords of each topic event based on the entity keywords and the action keywords provided by the embodiments of the present application, based on Figure 7 , the process of determining the event keywords of each topic event is described Figure 8

[0133] In step 20111, the number of entity keywords corresponding to the entity keywords is obtained.

[0134] In step 20112, when the number of entity keywords is less than the preset number of event keywords of the topic event, the entity keywords and the action keywords are combined as the event keywords of the topic event.

[0135] 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 less than the preset number of event keywords of the topic event, it is determined that the entity keywords are not enough to be determined as the event keywords of the topic event, and the action keywords also need to be determined as the event keywords of the topic event; that is, at this time, the event keywords of the topic event include the entity keywords and the action keywords.

[0136] As an example, the preset number of event keywords of the 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 less than m, at this time, m-n action keywords are selected according to the weight, so as to determine the event keywords of the topic event.

[0137] ​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 the event keywords of the topic event.

[0138] It should be noted that when the number of keywords in each event keyword of the topic event is limited, when the number of entity keywords is greater than or equal to the number of event keywords of the preset topic event, the keywords in the entity keywords are sufficient as the topic event key strings, at this time, the event keywords of the topic event include the entity keywords.

[0139] In the above example, when n is greater than or equal to m, m entity keywords are selected from n entity keywords as event keywords of the topic event.

[0140] Step 2012, from the at least two event keywords of each topic event, select a target number of event keywords as topic keywords of the topic.

[0141] In actual implementation, from the at least two event keywords of each topic event, selecting a target number of event keywords as topic keywords of the topic can be specifically: counting the number of occurrences of different event keywords in the at least two event keywords of each topic event; according to the number of occurrences, descendingly sorting the at least two event keywords of each topic event to obtain a sorting result; starting from the first event keyword of the sorting result, sequentially selecting event keywords until a target number of event keywords are selected as topic keywords of the topic.

[0142] It should be noted that the process of step 2011-step 2012 is performed for each topic.

[0143] 202, match the content of the event to be processed with the topic keywords of the topic respectively, and obtain the corresponding matching results.

[0144] In actual implementation, first, match each topic in the topic library with the event to be processed, and match the topic keywords corresponding to each topic with the content of the event to be processed.

[0145] It should be noted that the topic keyword is a keyword of the topic, the topic library includes multiple topics, each topic is a theme of an event; and each topic in the topic library includes at least one topic event, the topic events included by different topics can be the same or different; and the at least one topic event refers to an event associated with the topic and occurring in different time periods, so that the at least one topic event has a time sequence.

[0146] With the above example, the content of the to-be-processed event "the first department responds to Zhang Er to cancel the ban on the first object" is matched with the topic keywords of the three topics "nurse and deputy director", "H place and jump car", and "Li San and the first object", and three matching results are obtained.

[0147] In step 203, when the obtained matching result indicates that there is a topic matching the to-be-processed event in at least one topic, the topic matching the to-be-processed event is determined as the target topic.

[0148] In actual implementation, when the obtained matching result indicates that there is a topic matching the to-be-processed event in at least one topic, the topic matching the to-be-processed event is determined as the target topic; when the obtained matching result indicates that there is no topic matching the to-be-processed event in at least one topic, a new topic including the to-be-processed event is constructed, and the new topic is updated to the topic library.

[0149] With the above example, since only the topic keyword "first object" in "Li San and the first object" in topic 3 matches the "first object" in the content of the to-be-processed event "the first department responds to Zhang Er to cancel the ban on the first object", the obtained matching result indicates that there is a topic matching the to-be-processed event in the three topics, that is, topic 3, and therefore, topic 3 is the target topic matching the to-be-processed event.

[0150] In this way, the keywords of the topics are first matched with the content of the to-be-processed event to recall at least one topic event that may be related to the to-be-processed event, and then the similarity relationship between the to-be-processed event and each topic event is used to accurately predict the correlation between the to-be-processed event and the topic. Therefore, by using the recall-prediction mode, the correlation between the to-be-processed event and the topic can be accurately predicted, and the calculation time of the prediction process is less related to the number of topics, so that the efficiency of event processing can be improved.

[0151] In actual implementation, after obtaining the to-be-processed event and the target topic, each topic event included in the to-be-processed event and the target topic can be input to the event processing model. Here, the to-be-processed event and each topic event can be first assembled into an implicit question and answer sentence pattern, such as [CLS] to-be-processed event [SEP] [CLS] topic event 1 [SEP] … [CLS] topic event n [SEP], and then the assembled implicit question and answer sentence pattern 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 to-be-processed event and each topic event. See Figure 9 , Figure 9 is a flowchart of a process of determining the semantic features of the to-be-processed event and the semantic features of each topic event provided by the embodiments of the present application, based on Figure 3, step 101 can be implemented by the following way:

[0152] Step 1011, respectively, obtain the distinguishing mark corresponding to the event to be processed and each topic event, the distinguishing mark distinguishes different events.

[0153] In actual implementation, first, respectively, obtain the distinguishing mark corresponding to the event to be processed and each topic event, here, for the assembled implicit question and answer sentence, the distinguishing mark can be "CLS" and "SEP", in this way, through the distinguishing mark, the event to be processed and each topic event input into the event processing model can be distinguished.

[0154] Step 1012, respectively, extract the 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.

[0155] In actual implementation, referring to Figure 10 , Figure 10 is a schematic diagram of the determination process of the semantic features of the event to be processed and the semantic features of each topic event provided by the embodiment of the application, based on Figure 10 , respectively, extract the 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.

[0156] Step 1013, based on the distinguishing mark of the event to be processed, the intermediate semantic features of the event to be processed are enhanced, to obtain the semantic features of the event to be processed, and based on the distinguishing mark of each topic event, the intermediate semantic features of each topic event are enhanced, to obtain the semantic features of each topic event.

[0157] In actual implementation, continuing to refer to Figure 10 , based on the distinguishing mark "CLS" of the event to be processed, the intermediate semantic features of the event to be processed are enhanced, to obtain the semantic features of the event to be processed; based on the distinguishing mark "CLS" of each topic event, the intermediate semantic features of each topic event are enhanced, to obtain the semantic features of each topic event.

[0158] It should be noted that the process of extracting the intermediate semantic features of the to-be-processed event and each topic event through the intermediate semantic feature extraction layer can be that the intermediate semantic features of the to-be-processed event and each topic event are first extracted, and the intermediate semantic features such as the word vector, the text vector, and the position vector in the to-be-processed event and each topic event are determined, wherein the word vector is the semantic information of a single word / word in the text, the text vector is used to depict the global semantic information of the text and is fused with the semantic information of the single word / word, and the position vector is used to distinguish the difference in the semantic information carried by the words / words appearing at different positions in the text; then the intermediate semantic features such as the word vector, the text vector, and the position vector in the to-be-processed event and each topic event are enhanced, and the semantic features of the to-be-processed event and each topic event are obtained.

[0159] In step 102, the time difference feature extraction layer is used to extract the time difference between the occurrence time of the to-be-processed event and the reference time, obtain the time difference feature of the to-be-processed event, and extract the time difference between the occurrence time of each topic event and the reference time, and obtain the time difference feature of each topic event.

[0160] In actual implementation, after obtaining the to-be-processed event and the target topic, the to-be-processed event and each topic event included in the target topic can be input into the event processing model. Here, the to-be-processed event and each topic event can be first assembled into an implicit question and answer sentence, such as [CLS] to-be-processed event [SEP] [CLS] topic event 1 [SEP] … [CLS] topic event n [SEP], and then the assembled implicit question and answer sentence is input into the event processing model, so that the time difference feature extraction layer of the event processing model extracts the time difference features of the to-be-processed event and each topic event. See Figure 11 , Figure 11 is a flowchart of the process of determining the semantic features of the to-be-processed event and the time difference features of each topic event provided by the embodiments of the present application, based on Figure 3 , step 102 can be implemented by the following method:

[0161] In step 1021, the occurrence time of each topic event is subtracted from the reference time to obtain the time difference between each topic event and the reference time.

[0162] In actual implementation, first, the reference time set in advance is obtained. Here, the reference time can be the occurrence time of the to-be-processed event, or a time set in advance according to requirements; after obtaining the reference time, the occurrence time of each topic event is subtracted from the reference time to obtain the time difference between each topic event and the reference time.

[0163] As an example, the reference time is the occurrence time of the to-be-processed event. See Figure 12 ,Figure 12 is a schematic diagram of a process for determining the time difference feature of each topic event provided by an embodiment of the present application, based on Figure 12 , respectively, the time difference feature of each topic event is extracted, which is specifically extracting the time difference feature from the assembled implicit question and answer sentence pattern, such as [CLS] to-be-processed event [SEP] [CLS] topic event 1 [SEP] … [CLS] topic event n [SEP], that is, the occurrence time (i.e. the reference time) of the to-be-processed event is subtracted from the occurrence time of each topic event to obtain the time difference between each topic event and the reference time.

[0164] It should be noted that the process of subtracting the reference time from the occurrence time of each topic event needs to be rounded up, that is, the time less than one day is calculated as one day.

[0165] Step 1022, obtaining the mapping relationship between the time difference and the time difference feature.

[0166] In actual implementation, after determining the time difference of each topic event, the mapping relationship between the time difference and the time difference feature is obtained, which can be presented based on the time difference-time difference feature mapping table, for example, see Figure 13 , Figure 13 is a schematic diagram of a time difference-time difference feature mapping table provided by an embodiment of the present application, it should be noted that Figure 13 a and b in the above formula are positive integers greater than 2, and b is greater than a, here a and b can be set according to the user's demand.

[0167] Step 1023, determining the time difference feature of each topic event based on the mapping relationship, the time difference between each topic event and the reference time.

[0168] In actual implementation, after determining the mapping relationship between the time difference and the time difference feature, the time difference feature 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 searching the time difference-time difference feature mapping table.

[0169] 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 time difference feature of each topic event can also be obtained by encoding the obtained time difference between each topic event and the reference time, and the process of obtaining the time difference feature of each topic event can also be other ways, which are not limited by the embodiments of the present application.

[0170] In step 103, the semantic feature of the to-be-processed event and the corresponding time difference feature are fused through a feature fusion layer to obtain a fusion feature of the to-be-processed event, and the semantic feature of each topic event and the corresponding time difference feature are fused to obtain a fusion feature of each topic event.

[0171] In actual implementation, the feature fusion process through the feature fusion layer is divided into two processes, one is to fuse the semantic feature of the to-be-processed event and the corresponding time difference feature to obtain the fusion feature of the to-be-processed event, and the other is to fuse the semantic feature of each topic event and the corresponding time difference feature to obtain the fusion feature of each topic event.

[0172] In actual implementation, for the process of obtaining the fusion feature of the to-be-processed event, due to the difference in the setting of the reference time, when the reference time is the occurrence time of the to-be-processed event, the time difference of the to-be-processed event is 0, at this time, the fusion feature of the to-be-processed event is the semantic feature of the to-be-processed event; when the reference time is not the occurrence time of the to-be-processed event, the time difference of the to-be-processed event is not 0, then the fusion feature of the to-be-processed event is the feature obtained by fusing the semantic feature of the to-be-processed event and the corresponding time difference feature, here, the fusion processing can be summation processing or other processing mode, which is not limited by the embodiments of the present application.

[0173] In actual implementation, for the process of obtaining the fusion feature of each topic event, refer to Figure 14 , Figure 14 is a schematic diagram of the process of determining the fusion feature of each topic event provided by the embodiments of the present application, based on Figure 14 , the semantic feature 1 of the topic event 1 and the time difference feature 1, the semantic feature 2 of the topic event 2 and the time difference feature 2, …, and the semantic feature n of the topic event n and the time difference feature n are obtained, then the semantic feature 1 of the topic event 1 and the time difference feature 1 are fused to obtain the fusion feature of the topic event 1; the semantic feature 2 of the topic event 2 and the time difference feature 2 are fused to obtain the fusion feature of the topic event 2, …, the semantic feature n of the topic event n and the time difference feature n are fused to obtain the fusion feature of the topic event n.

[0174] In step 104, the output layer is used to predict the correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion feature of each topic event, and obtain the corresponding prediction result.

[0175] In some embodiments, the output layer includes a first fusion layer and a first prediction layer, refer to Figure 15 , Figure 15 is a structural schematic diagram of the event processing model provided by the embodiments of the present application, based on Figure 15The first fusion layer is used to fuse the fusion features of the to-be-processed event and the fusion features of the topic events, to obtain first target fusion features.

[0176] In some embodiments, the output layer includes a second fusion layer and a second prediction layer, as shown in Figure 16 , Figure 16 is a structural diagram of an event processing model provided by an embodiment of the present application, based on Figure 16 The second fusion layer is used to fuse the fusion features of the topic events, to obtain second target fusion features, and then the second prediction layer is used to predict the correlation between the to-be-processed event and the target topic based on the fusion features of the to-be-processed event and the second target fusion features, to obtain a corresponding prediction result. It should be noted that the second fusion layer only fuses the fusion features of the topic events, and does not process the fusion features of the to-be-processed event.

[0177] In some embodiments, the output layer further includes a binary classification layer, as shown in Figure 17 , Figure 17 is a structural diagram of an event processing model provided by an embodiment of the present application, based on Figure 17 The binary classification layer is used to perform binary classification on the correlation between the to-be-processed event and the target topic based on the fusion features of the to-be-processed event and the fusion features of the topic events, to obtain a binary classification result, wherein the binary classification result is used to indicate whether the to-be-processed event is related to the target topic.

[0178] It should be noted that the binary classification result can be 0 or 1. When the binary classification result is 0, the to-be-processed event is not related to the target topic, and when the binary classification result is 1, the to-be-processed event is related to the target topic.

[0179] In some embodiments, the output layer further includes a logistic regression layer, as shown in Figure 18 , Figure 18 is a structural diagram of an event processing model provided by an embodiment of the present application, based on Figure 18 The logistic regression layer is used to predict a correlation score of the correlation between the to-be-processed event and the target topic based on the fusion features of the to-be-processed event and the fusion features of the topic events, to obtain a score used to indicate a correlation degree of the to-be-processed event and the target topic.

[0180] It should be noted that the score interval here can be set as [0, 4], the score of 0 represents that the to-be-processed event is irrelevant to the target topic, the score of 1 represents that the to-be-processed event is weakly relevant to the target topic, the score of 2 represents that the to-be-processed event is slightly relevant to the target topic, the score of 3 represents that the to-be-processed event is relatively relevant to the target topic, and the score of 4 represents that the to-be-processed event is strongly relevant to the target topic, that is, the score is in a proportional relationship with the degree of relevance; here, a correlation threshold can be set in advance, for example, when the correlation threshold is 3 points, it is considered that the to-be-processed event is relevant to the target topic when the predicted score is greater than or equal to 3 points, and it is considered that the to-be-processed event is irrelevant to the target topic when the predicted score is less than 3 points; and the correlation threshold can be set according to the actual needs of the user.

[0181] In some embodiments, the output layer can further include a binary classification layer and a logistic regression layer, see Figure 19 , Figure 19 FIG. 1 is a structural schematic diagram of an event processing model provided by an embodiment of the present application, based on Figure 19 , through the binary classification layer, the correlation between the to-be-processed event and the target topic is binary classified based on the fusion features of the to-be-processed event and the fusion features of each topic event, to obtain a binary classification result indicating whether the to-be-processed event is relevant to the target topic, and meanwhile through the logistic regression layer, the correlation between the to-be-processed event and the target topic is predicted based on the fusion features of the to-be-processed event and the fusion features of each topic event, to obtain a score indicating the degree of correlation between the to-be-processed event and the target topic.

[0182] It should be noted that after obtaining the binary classification result and the score, based on the actual needs of the user, the binary classification result is selected as the prediction result of the correlation between the to-be-processed event and the target topic, or the score is selected as the prediction result of the correlation between the to-be-processed event and the target topic.

[0183] In actual implementation, after predicting the correlation between the to-be-processed event and the target topic and obtaining the corresponding prediction result, when the prediction result represents that the to-be-processed event is relevant to the target topic, the to-be-processed event is integrated into the target topic according to the occurrence time of the event, to obtain an event context corresponding to the target topic, and here, the event context includes the to-be-processed event and at least one topic event.

[0184] In some embodiments, see Figure 20 , Figure 20 FIG. 2 is a flow schematic diagram of an event processing method based on the event processing model provided by an embodiment of the present application, after obtaining the event context corresponding to the target topic, the following can also be performed:

[0185] Step 301, the server presents an event search control.

[0186] It should be noted that the search control is used for information search, so the search control can be used for search of the topic event.

[0187] At step 302, in response to the event search operation for the target topic triggered based on the event search control, the event thread is presented.

[0188] Referring to Figure 21 , Figure 21 is a flowchart of an event processing method based on an event processing model provided in the present application, based on Figure 20 , step 302 can also be implemented in the following manner:

[0189] At step 3021, in response to the first search operation acting on the event search control, the simplified event thread corresponding to the event thread and the presentation control corresponding to the simplified event thread are presented.

[0190] In actual implementation, when the user triggers the event search control to search information, if the searched information is information associated with the integrated target topic, upon receiving the first search operation acting on the event search control, the presentation of the search result is performed in response to the first search operation. Here, the presented search result can include the simplified event thread corresponding to the event thread and the presentation control corresponding to the simplified event thread.

[0191] It should be noted that the simplified event thread belongs to the event thread, and the presentation form is part of the events in the event thread; the presentation control is used to present the entire event thread, such as a "view more" button, an expansion icon, etc.

[0192] At step 3022, in response to the presentation operation acting on the presentation control, the event thread is presented, wherein each event in the presented event thread includes an event title and an event time, and the event is any one of the at least one topic event and the to-be-processed event.

[0193] It should be noted that when the user triggers the presentation control to view the entire event thread, the server also receives the presentation operation acting on the presentation control; at this time, the event integration device presents the entire event thread in response to the presentation operation; and the event integration device presents the event thread by presenting the event title and the event time of each event in the event thread, wherein the event is any one of the at least one topic event and the to-be-processed event.

[0194] In actual implementation, the search recommendation result can be included in the presented search result, and the search recommendation result refers to the recommendation information for the integrated target topic, such as "Are you searching for the title of the integrated target topic?"; here, when the user performs a triggering operation on the search recommendation result, the server can present the simplified event thread corresponding to the event thread, and the presentation control corresponding to the simplified event thread, and present the event thread in response to the presentation operation on the presentation control; or the event thread can be directly presented; the embodiments of the present application do not limit this.

[0195] As an example, refer to Figure 22 , Figure 22 is an exemplary presentation schematic diagram of an event thread provided by the embodiments of the present application; as shown in Figure 22 , the page 22-1 is a presentation page of a search result, and the simplified event thread 22-11 corresponding to the event thread is presented, and the presentation control 22-12 is also presented; when the presentation control 22-12 is clicked (presentation operation), the entire event thread 22-5 shown in the area 22-2 is presented; here, each event in the presented event thread is realized by presenting the event title (such as the event title 22-211) and the event time (such as the event time 22-212), and the detailed information of the corresponding event is presented by clicking the event title 22-211.

[0196] As an example, refer to Figure 23 , Figure 23 is an exemplary presentation schematic diagram of an event thread provided by the embodiments of the present application; as shown in Figure 23 , the page 23-1 is a presentation page of a search result, and the other results are presented, and the search recommendation result 23-11 is also presented; when the search recommendation result 23-11 is clicked, the event thread 22-1 shown in the area 22-2 in Figure 22 is presented.

[0197] Step 3023, presenting the event detail information in response to the viewing operation on the event title or the event time.

[0198] It should be noted that the event title or the event time is a triggerable control, or a control for viewing details corresponding to each event exists; when the user triggers the event title, or the event time, or the control for viewing details, the server receives the viewing operation on the event title or the event time, or the viewing operation on the control for viewing details; at this time, the event detail information is presented in response to the viewing operation, wherein the event detail information refers to the detailed description information of the event in the event thread.

[0199] In some embodiments, refer to Figure 24 , Figure 24is a flowchart of an event processing method based on an event processing model provided by an embodiment of the present application. After obtaining the event thread corresponding to the target topic, the following steps can also be performed:

[0200] In step 401, the last to-be-presented information of the target event is presented.

[0201] It should be noted that the target event is any one of the to-be-processed event and the at least one topic event included in the event thread; the last to-be-presented information refers to the information of the last presentation progress of the target event, for example, the last page of the target event or the end of the target event.

[0202] In step 402, the remaining events in the event thread associated with the target event are presented in a recommended area corresponding to the last to-be-presented information.

[0203] It should be noted that the page presenting the last to-be-presented information also presents a recommended area for presenting recommended information; here, the recommended information presented by the server in the recommended area is the remaining events, which are any event in the event thread except the target event, or the latest event in the event thread except the target event. The remaining events can be displayed in the form of search content in a search box, or in the form of a link, and the like, which are not limited in the embodiments of the present application.

[0204] In step 403, in response to a second search operation on the remaining events, detailed information of the remaining events is presented.

[0205] In actual implementation, when the user triggers the viewing operation on the remaining events, the server also receives the second search operation on the remaining events; at this time, the server presents the detailed information of the remaining events in response to the second search operation, to complete the response to the second search operation.

[0206] It should be noted that steps 301-302 and steps 401-403 can be implemented by the server, or the server can send the event thread to the terminal and be implemented by the terminal, which are not limited in the embodiments of the present application.

[0207] In this way, the event thread can provide gain information outside the search word, actively mine related reading demand on the premise of meeting the search demand, improve the completeness of information presentation in the search result page, reduce the search times of not obtaining target information in the search scene, thereby reducing the resource consumption of the search process, and also improve the conversion rate of the search and increase the search frequency of the user.

[0208] In some embodiments, before the event processing based on the event processing model, the event processing model is first trained, see Figure 25 ,Figure 25 is a flowchart of a training method of an event processing model provided by an embodiment of the present application, which will be described in combination with Figure 25 the steps shown.

[0209] In step 501, the server acquires an event training sample carrying a label and a corresponding topic training sample; the label is used to indicate the correlation between the event training sample and the corresponding topic training sample, and the topic training sample contains at least one topic sample event.

[0210] In step 502, the semantic feature extraction layer is used to respectively perform semantic feature extraction on the event training sample and each topic sample event, to obtain the semantic feature of the event training sample and the semantic feature of each topic sample event.

[0211] In step 503, the time difference feature extraction layer is used to perform time difference feature extraction on the time difference between the occurrence time of the event training sample and the reference time, to obtain the time difference feature of the event training sample, and perform time difference feature extraction on the time difference between the occurrence time of each topic sample event and the reference time, to obtain the time difference feature of each topic sample event.

[0212] In step 504, the feature fusion layer is used to fuse the semantic feature of the event training sample and the corresponding time difference feature, to obtain the fusion feature of the event training sample, and fuse the semantic feature of each topic sample event and the corresponding time difference feature, to obtain the fusion feature of each topic sample event.

[0213] In step 505, the output layer is used to predict 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 the corresponding prediction result.

[0214] It should be noted that the output layer includes at least one of a binary classification layer and a logistic regression layer. When the output layer only includes the binary classification layer, the binary classification layer is used to perform binary 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, to obtain a binary classification result.

[0215] When the output layer only includes the logistic regression layer, the logistic regression layer is used to perform 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 used to indicate the correlation degree between the event training sample and the topic training sample.

[0216] When the output layer comprises the binary classification layer and the logistic regression layer, the binary classification result of the correlation between the event training sample and the topic training sample is obtained by the binary classification layer based on the fusion feature of the event training sample and the fusion feature of each topic sample event, and the score indicating the correlation degree between the event training sample and the topic training sample is obtained by the logistic regression layer based on the fusion feature of the event training sample and the fusion feature of each topic sample event.

[0217] In step 506, the prediction result is compared with the label to obtain the difference between the prediction result and the label, and the model parameter of the event processing model is updated based on the difference.

[0218] It should be noted that, since the output layer comprises at least one of the binary classification layer and the logistic regression layer, when the output layer only comprises the binary classification layer, the binary classification result of the correlation between the event training sample and the topic training sample is obtained by the binary classification layer of the output layer, then the binary classification result is compared with the corresponding label to obtain the difference between the binary classification result and the corresponding label, and the model parameter of the event processing model is updated based on the difference.

[0219] When the output layer only comprises the logistic regression layer, the score of the correlation between the event training sample and the topic training sample is obtained by the logistic regression layer of the output layer, then the score is compared with the corresponding label to obtain the difference between the score and the corresponding label, and the model parameter of the event processing model is updated based on the difference.

[0220] When the output layer comprises the binary classification layer and the logistic regression layer, the binary classification result of the correlation between the event training sample and the topic training sample is obtained by the binary classification layer of the output layer, and the score of the correlation between the event training sample and the topic training sample is obtained by the logistic regression layer of the output layer, then the binary classification result and the score are compared with the respective corresponding labels to obtain the difference between the binary classification result and the corresponding label and the difference between the score and the corresponding label, and the model parameter of the event processing model is updated based on the two differences.

[0221] Next, the process of updating the model parameter of the event processing model when the output layer comprises the binary classification layer and the logistic regression layer is described in detail. Referring to FIG. 5, Figure 26 , Figure 26 is a flowchart of the event processing method based on the event processing model provided by the embodiments of the present application, based on Figure 25 , step 506 can also be implemented in the following way:

[0222] In step 5061, the first loss function corresponding to the binary classification layer, the binary classification result, and the first difference of the binary classification sub-label in the label are obtained, the value of the first loss function is determined based on the first difference, the second loss function corresponding to the logistic regression layer, the score, and the second difference of the score sub-label in the label are obtained, and the value of the second loss function is determined based on the second difference.

[0223] In actual implementation, when the output layer includes the binary classification layer and the logistic regression layer, the label includes the score sub-label and the binary classification sub-label. Exemplarily, the interval of the score sub-label can be set as [0, 4], 0 represents that the event training sample is irrelevant to the corresponding topic training sample, 1 represents that the event training sample is weakly relevant to the corresponding topic training sample, 2 represents that the event training sample is slightly relevant to the corresponding topic training sample, 3 represents that the event training sample is relatively relevant to the corresponding topic training sample, and 4 represents that the event training sample is strongly relevant to the corresponding topic training sample, that is, the score is in a proportional relationship with the degree of relevance; and the binary classification sub-label can be 0 or 1, 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.

[0224] In step 5062, the value of the target loss function corresponding to the event processing model is determined by combining the value of the first loss function and the value of the second loss function, and the model parameter of the event processing model is updated based on the value of the target loss function.

[0225] In actual implementation, the manner of combining the value of the first loss function and the value of the second loss function can be directly summing the value of the first loss function and the value of the second loss function, or can be weighted 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 respectively. The manner of combining the value of the first loss function and the value of the second loss function is not limited in the embodiments of the present application.

[0226] In actual 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 parameter of the event processing model can be updated based on the value of the target loss function. In this way, the model training speed is accelerated and the model training efficiency is improved by updating the model parameter of the event processing model based on the value of the target loss function determined by combining the value of the first loss function and the value of the second loss function.

[0227] By applying the above embodiments of this application, the semantic features of the event to be processed and the corresponding time difference features, as well as the semantic features of each topic event in the target topic and the corresponding time difference features, are fused to obtain the fused features of the event to be processed and the fused features of each topic event. Then, based on the fused features of the event to be processed and the fused features of each topic event, the correlation between the event to be processed and the target topic is predicted. Thus, by fusing the semantic features and time difference features of the event to be processed and the semantic features and time difference features of each topic event, the contextual semantic information and time information of the event to be processed and the target topic are fully utilized, thereby accurately predicting the correlation between the event to be processed and the target topic. Furthermore, when the event to be processed is integrated into its respective topic, the accuracy of event integration is improved.

[0228] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.

[0229] For news topics with a long duration (often composed of multiple events (at least one topic event)), when new developments occur, we aim to use machine learning to attach the latest developments (events to be processed) to the topic (target topic), forming an event timeline containing the latest developments. This allows users to intuitively understand the development process of the event through the timeline information. This application embodiment designs a model based on implicit reading comprehension input, timestamp fusion, and dual-loss optimization, constructing a complete topic and event similarity calculation mode. This significantly improves the accuracy and effectiveness of topic and event matching, realizing a large-scale automated event and topic attachment system. Specifically, this application embodiment achieves this through two stages: recall and classification, including the following steps:

[0230] Based on the latest developments in the event, retrieve potentially relevant news topics (target topics) from the news topic database (topic library).

[0231] It should be noted that each news topic in the news topic database corresponds to a topic keyword. When the server matches any keyword in the topic keyword in the latest development event, it determines that the news topic is one of the potentially related news topics.

[0232] For example, see Figure 6 , Figure 6 This is an exemplary schematic diagram of news topic recall provided in an embodiment of this application; such as Figure 6As shown, the title of the latest progress event is "First Department Responds to Zhang Er's Revocation of the Ban on the First Object". In the news topic database, news topic 1 includes 3 events, and the corresponding topic keywords are "nurse" and "deputy director"; news topic 2 includes 4 events, and the corresponding topic keywords are "H place" and "jumping car"; news topic 3 includes 4 events, and the corresponding topic keywords are "Li San" and "first object". When matching the topic keywords of each news topic in the news topic database in the latest progress event, since the topic keywords corresponding to news topic 3 are "first object", which matches the "first object" in the title of the latest progress event, news topic 3 is one of the possible related news topics for recall.

[0233] It should be further noted that the topic keywords are the two keywords with the largest number among the event keywords of all topic events under the news topic. The event keywords of each topic event can be obtained through entity recognition and word weight analysis. Here, the server can use an entity recognition model (Char-Word Union CNN, CWCNN) to realize entity recognition, and take the person name type and place name type entities in the recognized entities as the first keywords (entity keywords); the server can use an "XGboost" model to realize word weight analysis, and take the verbs in the words with a weight higher than a weight threshold as the second keywords (action keywords); if the number of first keywords is greater than 3 (the preset number of event keywords of a topic event), the second keywords are no longer considered, and only the first keywords are taken as the keywords of the topic event; if the number of first keywords is less than 3 (the preset number of event keywords of a topic event), the first keywords and the second keywords are taken together as the topic keywords of the topic event.

[0234] Then, the correlation of each news topic in the possible related news topics with the latest progress event is matched, so as to determine whether each news topic is related to the latest progress event. For this purpose, here a set of models TDE-LSTM and TDE-Trans based on implicit reading comprehension input, timestamp fusion and double loss optimization are used to realize the process of determining whether each news topic is related to the latest progress event. Wherein TDE represents time diff embedding, and LSTM and Trans represent different encoders.

[0235] 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, 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-LSTM 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 the processing process based on the implicit reading comprehension sub-model, the processing process based on the timestamp fusion sub-model, and the processing process based on the double-loss optimization.

[0236] The processing process based on the implicit reading comprehension sub-model is described below. The sub-model models each event in the topic and obtains the representation of the event. Specifically, the new event and the topic events are assembled into an implicit question-answer sentence: [CLS] new event title [SEP] [CLS] topic event 1 title [SEP] … [CLS] topic event 5 title [SEP]. The constructed sentence is first the new event, followed by up to five topic events (which can be more, here it is preset to 5), and a [CLS] separator is added at the beginning of each event sentence, and a [SEP] separator is added at the end of the event sentence. The “CLS” represents the beginning of the sentence sequence, and the “SEP” represents the division between sentences. This constructed sentence does not have an explicit question element, but it follows the construction paradigm of the MRC question-answering model input, so it is called an implicit reading comprehension input.

[0237] As an example, see Figure 6 Taking topic 3 as an example, the model will construct an input of “[CLS] the first department responds to Zhang Er’s revocation of the injunction on the first object [SEP] [CLS] Li San seals the first object [SEP] … (here, the 2nd to 5th topic events in the topic are omitted)”.

[0238] In actual implementation, after constructing the event sequence of the latest progress event and each topic event in the topic, the semantic vector of each event in the event sequence composed of the latest progress event and each topic event is obtained through an encoding module (such as a BERT model), as shown in Figure 27 Figure 27 is a schematic diagram provided by an embodiment of the present application for obtaining the semantic vector of each event in the event sequence composed of the latest progress event and each topic event based on an encoding module, based on Figure 27 , after constructing the event sequence of the latest progress event and each topic event in the topic, the intermediate semantic vector (intermediate semantic feature) of each event (the latest progress event and each topic event) is determined through the BERT model, and then the output vector of all [CLS] positions is taken as the event representation vector (semantic feature) of the corresponding event Figure 27 indicated by the black solid arrow in the figure). ​

[0239] The following describes the processing process based on the timestamp fusion sub-model, which is mainly used to fuse important time difference information between events into event representation. Specifically, first, time difference information is constructed, i.e., taking the latest progress event timestamp as a reference, the difference between each topic event timestamp and the latest progress event timestamp is obtained to obtain a time difference in days (rounded up), 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 will be fused with the obtained event representation vector to obtain a fusion vector of the latest progress event and each topic event (first target fusion feature). It should be noted that there are two processes of fusion processing here. The first fusion process is to add the obtained time difference vector to the obtained event representation vector to obtain a summed vector. The second fusion process is to calculate the event representation of the summed vector, i.e., the fusion vector. Here, based on the differences between the TDE-LSTM model and the TDE-Trans model, there are two fusion structures for the second fusion process, i.e., a bidirectional LSTM model and a single-layer Transformer model. Both of these two fusion structures can realize the second fusion process. For details, refer to Figure 28A and Figure 28B , Figure 28A is a schematic diagram of the fusion process of the bidirectional LSTM model provided by the embodiments of the present application, Figure 28B is a schematic diagram of the fusion process of the single-layer Transformer model provided by the embodiments of the present application, as shown in Figure 28A and Figure 28B , after obtaining the vector obtained by adding the obtained time difference vector to the obtained event representation vector, the fusion vector is calculated through the bidirectional LSTM model or the single-layer Transformer model.

[0240] In actual implementation, after obtaining the fusion vector, the fusion vector is calculated through a fully connected layer to determine whether each news topic is related to the latest progress event. Specifically, the score representing the correlation degree of each news topic and the latest progress event is obtained by calculating the fusion vector. It should be noted that there are two results representing the correlation degree of each news topic and the latest progress event. One is a regression result in the interval [0, 4], and the other is a binary classification result in the interval [0, 1]. The regression result of 0 represents that the latest progress event is not related to the news topic, the regression result of 1 represents that the latest progress event is weakly related to the news topic, the regression result of 2 represents that the latest progress event is slightly related to the news topic, the regression result of 3 represents that the latest progress event is relatively related to the news topic, and the regression result of 4 represents that the latest progress event is strongly related to the news topic. The binary classification result of 0 represents that the latest progress event is not related to the news topic, and the binary classification result of 1 represents that the latest progress event is related to the news topic.

[0241] The following describes the processing procedure based on double-loss optimization. When constructing the training sample, the embodiments of the present application have a fine-grained matching label (scored label) of 0-4 points and a binary classification matching label (binary classification sub-label) for each set of event training sample-topic training sample. The 0-4 points respectively represent that the event training sample and the topic training sample are irrelevant, weakly related, slightly related, more related, and strongly related, that is, the greater the score, the more related. The binary classification matching label is relevant and irrelevant. The embodiments of the present application design a double-loss optimization method to simultaneously utilize the information of the two labels. Among them, the classification task is based on the binary classification matching label, and the binary classification cross-entropy loss is determined based on the difference between the binary classification matching label and the binary classification result; and the regression task is based on the fine-grained matching label, and the Huber loss (a parametric loss function for regression problems, which can reduce the degree of punishment for abnormal points and is more robust) is determined based on the difference between the fine-grained matching label and the regression result; after obtaining the binary classification cross-entropy loss and the Huber loss, the two losses are added to obtain the target loss, so as to update the model parameters of the TDE-LSTM model or the TDE-Trans model based on the target loss. For example, see Figure 29 , Figure 29 is a schematic diagram of the double-loss optimization provided by the embodiments of the present application, based on Figure 29 After obtaining the binary classification cross-entropy loss and the Huber loss, the two losses are added to obtain the target loss, so as to update the model parameters of the TDE-LSTM model based on the target loss.

[0242] The following describes the actual effect of the TDE-LSTM model and the TDE-Trans model.

[0243] It should be noted that the event processing model provided by the embodiments of the present application is trained on multiple topics of the event graph 600, filters possible candidate events according to the keywords of the topics, and constructs 1.3w latest progress events-topics. The final model accuracy is 0.869, and the F1 is 0.868.

[0244] In actual implementation, taking the BERTMRC model as a benchmark model, the embodiments of the present application count the effects of the TDE-LSTM model, the TDE-Trans model, and the BERTMRC model and perform corrosion tests, see Table 1.

[0245] Table 1

[0246]

[0247] Wherein, the lower MAE, MSE indexes are better; the higher Accuracy, F1 are better, it can be determined that the TDE-Trans and TDE-LSTM models are superior to the BERTMRC as a benchmark model. From the corrosion test, it is found that the implicit reading comprehension input proposed in the embodiment of the application has the greatest effect on the final effect; the double-loss optimization and the timestamp fusion have a positive effect on the result.

[0248] The embodiment of the application also verifies the effect of the model on the continuous development event, specifically, referring to Table 2, T is the number of topic events (all the above experiments are set to 5), it can be seen that as the number of topic events increases, the F1 of the model gradually improves. In this way, it is verified that the model can cope with the continuous development event, and as the number of topic events increases, the accuracy of the discrimination gradually improves.

[0249] Table 2

[0250]

[0251] In actual implementation, in the business, due to the automatic batch topic mounting capability, it is not necessary to manually investigate and judge from a large number of topics, and the time consumption of manual operation is reduced from 20 minutes to less than 1 minute, which greatly improves the operation efficiency. In the production environment, the coverage rate of the topic generated by the automatic batch topic mounting capability is improved from 12.42% to 17.22%, and the contribution of the generated context in the search result page to the user click is 5%, and the click rate CTR is 35.72%. In this way, the resource consumption of the search process is reduced, and the conversion rate of the search is also improved, and the user search frequency is improved.

[0252] It should be noted that there are various designs for the question and answer sentence of the reading comprehension model, the embodiment of the application uses the construction mode of implicit reading comprehension, and in actual use, it can also be replaced by an explicit question, for example: “x xx event is A, B, C, D, E topic event follow-up? ”, for the construction mode of the input sequence, the embodiment of the application does not make any limitation; at the same time, the BERT model for determining the event representation described above can also be replaced by other optimized pre-training task Chinese pre-training models, the embodiment of the application does not make any limitation, in addition, the domain data can also be used to fine-tune the pre-training model, so as to improve the effect of the event representation.

[0253] By fusing the semantic features and the corresponding time difference features of the to-be-processed event and the semantic features and the corresponding time difference features of each topic event in the target topic, the fusion features of the to-be-processed event and the fusion features of each topic event are obtained, and then the correlation between the to-be-processed event and the target topic is predicted based on the fusion features of the to-be-processed event and the fusion features of each topic event. In this way, by fusing the semantic features and the time difference features of the to-be-processed event and the semantic features and the time difference features of each topic event, the context semantic information and the time information of the to-be-processed event and the target topic are fully utilized, so that the correlation between the to-be-processed event and the target topic is accurately predicted, and then when the to-be-processed event is integrated into the topic to which the to-be-processed event belongs, the accuracy of event integration is improved.

[0254] The following continues to describe an exemplary structure of the event processing apparatus 455 based on the event processing model implemented as a software module, in some embodiments, as shown in FIG. 4B, the software module stored in the event processing apparatus 455 based on the event processing model in the memory 440 can include: Figure 2

[0255] The semantic feature extraction module 4551 is configured to perform semantic feature extraction on the to-be-processed event and at least one topic event respectively through a semantic feature extraction layer of the event processing model, to obtain semantic features of the to-be-processed event and semantic features of each topic event, wherein the at least one topic event belongs to the same target topic.

[0256] 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 to-be-processed event and a reference time through a time difference feature extraction layer of the event processing model, to obtain time difference features of the to-be-processed event, and perform time difference feature extraction on a time difference between an occurrence time of each topic event and the reference time, to obtain time difference features of each topic event.

[0257] The feature fusion module 4553 is configured to fuse the semantic features of the to-be-processed event and the corresponding time difference features through a feature fusion layer of the event processing model, to obtain fusion features of the to-be-processed event, and fuse the semantic features of each topic event and the corresponding time difference features, to obtain fusion features of each topic event.

[0258] The output module 4554 is configured to predict a correlation between the to-be-processed event and the target topic based on the fusion features of the to-be-processed event and the fusion features of each topic event through an output layer of the event processing model, to obtain a corresponding prediction result.

[0259] ​In some embodiments, the device further comprises a screening module configured to: obtain at least one topic from a topic library, and determine topic keywords of each of the topics; match the content of the event to be processed with the topic keywords of each of the topics respectively, to obtain corresponding matching results; and when the matching results obtained indicate that there is a topic matching the event to be processed in the at least one topic, determine the topic matching the event to be processed as the target topic.

[0260] In some embodiments, the screening module is further configured to, for each of the topics, perform the following processing: determine at least one topic event included in the topic, and obtain at least two event keywords of each of the topic events; and select a target number of event keywords from the at least two event keywords of each of the topic events as the topic keywords of the topic.

[0261] In some embodiments, the screening module is further configured to: perform entity recognition on the content of each of the topic events to obtain at least one entity keyword corresponding to a preset entity type, and take the entity keyword as a candidate event keyword of the topic event; perform character weight analysis on the content of each of the topic events to obtain at least one action keyword, and take the action keyword as a candidate event keyword of the topic event; and select at least two candidate event keywords from the candidate event keywords obtained as the event keywords of the topic event.

[0262] In some embodiments, the screening module is further configured to: count the number of occurrences of different event keywords in the at least two event keywords of each of the topic events; sort the at least two event keywords of each of the topic events in descending order according to the number of occurrences to obtain a sorting result; and perform event keyword selection in sequence from the first event keyword of the sorting result until a target number of event keywords are selected as the topic keywords of the topic.

[0263] 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 respectively to obtain intermediate semantic features of the event to be processed and intermediate semantic features of each of the topic events; perform enhancement processing on the intermediate semantic features of the event to be processed based on the distinguishing identifier of the event to be processed to obtain semantic features of the event to be processed, and perform enhancement processing on the intermediate semantic features of each of the topic events based on the distinguishing identifier of each of the topic events to obtain semantic features of each of the topic events.

[0264] In some embodiments, the time difference feature extraction module 4552 is further configured to: obtain a time difference between each of the topic events and the reference time by performing a difference operation on a time of occurrence of each of the topic events and the reference time; obtain a mapping relationship between the time difference and a time difference feature; and determine the time difference feature of each of the topic events based on the mapping relationship and the time difference between each of the topic events and the reference time.

[0265] In some embodiments, the feature fusion module 4553 is further configured to: fuse the semantic feature of the to-be-processed event and a corresponding time difference feature to obtain a fusion feature of the to-be-processed event; and fuse the semantic feature of each of the topic events and a corresponding time difference feature to obtain a fusion feature of each of the topic events.

[0266] 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 to-be-processed event and the fusion feature of each of the topic events by the first fusion layer to obtain a first target fusion feature; and perform prediction on the correlation between the to-be-processed event and the target topic based on the first target fusion feature by the first prediction layer to obtain a corresponding prediction result.

[0267] 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 feature of each of the topic events by the second fusion layer to obtain a second target fusion feature; and perform prediction on the correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the second target fusion feature by the second prediction layer to obtain a corresponding prediction result.

[0268] In some embodiments, the output layer includes a binary classification layer, and the output module 4554 is further configured to: perform binary classification on the correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion feature of each of the topic events by the binary classification layer to obtain a binary classification result; and the binary classification result is used to indicate whether the to-be-processed event is related to the target topic.

[0269] In some embodiments, the output layer includes a logistic regression layer, and the output module 4554 is further configured to: perform relevance score prediction on the correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion feature of each of the topic events by the logistic regression layer to obtain a score used to indicate a degree of relevance between the to-be-processed event and the target topic.

[0270] In some embodiments, the apparatus further includes an integration module configured to, when the prediction result indicates that the to-be-processed event is related to the target topic, integrate the to-be-processed event into the target topic according to a time of occurrence of the to-be-processed event, to obtain an event context corresponding to the target topic, the event context including the to-be-processed event and at least one topic event.

[0271] In some embodiments, the apparatus further includes a presentation module configured to present an event search control, and in response to an event search operation for the target topic triggered based on the event search control, present the event context.

[0272] In some embodiments, the apparatus further includes a training module configured to obtain an event training sample carrying a label and a corresponding topic training sample, wherein the label is used to indicate a correlation between the event training sample and the corresponding topic training sample, the topic training sample including at least one topic sample event; perform semantic feature extraction on the event training sample and each of the topic sample events respectively by using the semantic feature extraction layer, to obtain semantic features of the event training sample and each of the topic sample events; perform time difference feature extraction on a time difference between a time of occurrence of the event training sample and a reference time by using the time difference feature extraction layer, to obtain a time difference feature of the event training sample, and perform time difference feature extraction on a time difference between a time of occurrence of each of the topic sample events and the reference time, to obtain a time difference feature of each of the topic sample events; perform fusion of the semantic features of the event training sample and corresponding time difference features by using the feature fusion layer, to obtain a fusion feature of the event training sample, and perform fusion of the semantic features of each of the topic sample events and corresponding time difference features, to obtain a fusion feature of each of the topic sample events; and based on the fusion feature of the event training sample and the fusion features of each of the topic sample events, predict a correlation between the event training sample and the topic training sample by using the output layer, to obtain a corresponding prediction result, compare the prediction result with the label, to obtain a difference between the prediction result and the label, and update model parameters of the event processing model based on the difference.

[0273] In some embodiments, the output layer includes a binary classification layer and a logistic regression layer, and the output module 4554 is further configured to perform binary classification on the relevance between the event training sample and the topic training sample based on the fusion features of the event training sample and the fusion features of each of the topic sample events by the binary classification layer to obtain a binary classification result, and perform relevance score prediction on the relevance between the event training sample and the topic training sample based on the fusion features of the event training sample and the fusion features of each of the topic sample events by the logistic regression layer to obtain a score indicating the relevance between the event training sample and the topic training sample; obtain a first difference between a first loss function corresponding to the binary classification layer, the binary classification result, and a binary classification sub-label in the label, determine a value of the first loss function based on the first difference, and obtain a second difference between a second loss function corresponding to the logistic regression layer, the score, and a score sub-label in the label, determine a value of the second loss function based on the second difference; combine the value of the first loss function and the value of the second loss function to determine a value of a target loss function corresponding to the event processing model, and update the model parameters of the event processing model based on the value of the target loss function.

[0274] The event processing model includes a semantic feature extraction layer, a time difference feature extraction layer, a feature fusion layer, and an output layer. The training device 3000 provided in the embodiments of the present application is described below. Figure 30 , Figure 30 is a structural schematic diagram of the training device 3000 based on the event processing model provided in the embodiments of the present application. The training device 3000 based on the event processing model provided in the embodiments of the present application includes:

[0275] The first feature extraction module 3001 is configured to perform semantic feature extraction on an event training sample carrying a label and at least one topic sample event by the semantic feature extraction layer to obtain semantic features of the event training sample and semantic features of each of the topic sample events.

[0276] The at least one topic sample event belongs to the same topic training sample, and the label is used to indicate the relevance between the event training sample and the topic training sample.

[0277] The second feature extraction module 3002 is configured to perform time difference feature extraction on a time difference between an occurrence time of the event training sample and a reference time by the time difference feature extraction layer 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 of the topic sample events and the reference time to obtain a time difference feature of each of the topic sample events.

[0278] a fusion module 3003 configured to fuse the semantic features and the corresponding time difference features of the event training samples to obtain fused features of the event training samples, and fuse the semantic features and the corresponding time difference features of each of the topic sample events to obtain fused features of each of the topic sample events via the feature fusion layer;

[0279] a prediction module 3004 configured to predict the relevance between the event training samples and the topic training samples based on the fused features of the event training samples and the fused features of each of the topic sample events to obtain corresponding prediction results via the output layer;

[0280] a parameter updating module 3005 configured to obtain a difference between the prediction results and the labels, and train the event processing model based on the difference, so as to predict the relevance between a to-be-processed event and a target topic including at least one topic event via the trained event processing model.

[0281] The embodiment of the present application provides a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a 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 an event processing model provided in the embodiment of the present application.

[0282] The embodiment of the present application provides a computer readable storage medium storing executable instructions, wherein the executable instructions are stored in the computer readable storage medium. When the executable instructions are executed by a processor, the processor will execute the event processing method based on an event processing model provided in the embodiment of the present application, for example, the event processing method based on an event processing model as shown in the embodiment of the present application. Figure 3

[0283] In some embodiments, the computer readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM, etc.; or various devices including one or any combination of the above memories.

[0284] In some embodiments, the executable instructions can be in the form of programs, software, software modules, scripts or codes, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and can be deployed in any form, including being deployed as independent programs or being deployed as modules, components, subroutines or other units suitable for use in a computing environment.

[0285] ​As an example, executable instructions can correspond to a file in a file system, can be stored in a portion of a file that holds other programs or data, e.g., one or more scripts stored in a 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.

[0286] As an example, executable instructions can be deployed to be executed on one computer, or on multiple computers that are located at one site, or that are distributed across multiple sites and that are interconnected by a communication network.

[0287] To sum up, through the embodiments of the present application, the following technical effects can be realized:

[0288] (1) Through the fusion processing of the semantic features and the time difference features of the to-be-processed event and the fusion processing of the semantic features and the time difference features of each topic event, the context semantic information and the time information of the to-be-processed event and the target topic are fully utilized, so as to accurately predict the correlation between the to-be-processed event and the target topic.

[0289] (2) The keywords of the topic event are determined based on the keywords associated with the characters, the locations and the actions in the topic event, so that the accuracy of the event keywords of the topic event can be improved.

[0290] (3) The keywords of the topic are matched with the content of the to-be-processed event first, at least one topic event that can be related to the to-be-processed event is recalled, and then the correlation between the to-be-processed event and the topic is accurately predicted based on the similarity relationship between the to-be-processed event and each topic event; in this way, by using the recall-prediction mode, the correlation between the to-be-processed event and the topic can be accurately predicted, and the correlation between the calculation time of the prediction process and the number of topics is small, so that the efficiency of event processing can be improved.

[0291] (4) The event context can provide gain information outside the search word, actively excavate the related reading demand under the premise of meeting the search demand, improve the integrity of the information presented in the search result page, reduce the search times of not obtaining the target information in the search scene, thereby reducing the resource consumption of the search process, and also can improve the conversion rate of the search, and improve the user search frequency.

[0292] The above merely describes the embodiments of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement and improvement made within the spirit and scope of the present application shall be included in the protection scope of the present application.

Claims

1. An event processing method based on an event processing model, characterized by, The event processing model 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: The semantic feature extraction layer is used to extract semantic features of the to-be-processed event and at least one topic event respectively, to obtain the semantic features of the to-be-processed event and the semantic features of each topic event; The at least one topic event belongs to the same target topic; The time difference feature extraction layer is used to extract time difference features of a time difference between the occurrence time of the to-be-processed event and a reference time, to obtain the time difference features of the to-be-processed event, and to extract time difference features of a time difference between the occurrence time of each topic event and the reference time, to obtain the time difference features of each topic event; The feature fusion layer is used to fuse the semantic features of the to-be-processed event and the corresponding time difference features, to obtain the fusion features of the to-be-processed event, and to fuse the semantic features of each topic event and the corresponding time difference features, to obtain the fusion features of each topic event; The output layer is used to predict the correlation between the to-be-processed event and the target topic based on the fusion features of the to-be-processed event and the fusion features of each topic event, to obtain the corresponding prediction result.

2. The method of claim 1, wherein, Before the semantic feature extraction layer is used to extract semantic features of the to-be-processed event and at least one topic event respectively, to obtain the semantic features of the to-be-processed event and the semantic features of each topic event, the method further comprises the following steps: At least one topic is obtained from a topic library, and topic keywords of each topic are determined; The content of the to-be-processed event is matched with the topic keywords of each topic respectively, to obtain the corresponding matching results; When the obtained matching results represent that there is a topic matched with the to-be-processed event in the at least one topic, the topic matched with the to-be-processed event is determined as the target topic.

3. The method of claim 2, wherein, The determination of the topic keywords of each topic comprises the following steps: The following processing is performed for each topic: At least one topic event included in the topic is determined, and at least two event keywords of each topic event are obtained; From the at least two event keywords of each topic event, a target number of event keywords are selected as the topic keywords of the topic.

4. The method of claim 3, wherein, The obtaining of the at least two event keywords of each topic event comprises the following steps: Entity recognition is performed on the content of each topic event, to obtain at least one entity keyword corresponding to a preset entity type, and the entity keyword is taken as a candidate event keyword of the topic event; Character weight analysis is performed on the content of each topic event, to obtain at least one action keyword, and the action keyword is taken as a candidate event keyword of the topic event; From the obtained candidate event keywords, at least two candidate event keywords are selected as the event keywords of the topic event.

5. The method of claim 3, wherein, The selection of the target number of event keywords from the at least two event keywords of each topic event as the topic keywords of the topic comprises the following steps: Counting the number of occurrences of different event keywords in at least two event keywords of each of the topic events; sequentially selecting event keywords from the first event keyword of the sorting result until a target number of event keywords are selected as topic keywords of the topic. The semantic feature extraction of the to-be-processed event and the at least one topic event respectively includes:

6. The method of claim 1, wherein, obtaining a distinguishing mark corresponding to the to-be-processed event and each of the topic events respectively, the distinguishing mark distinguishing different events; performing intermediate semantic feature extraction on the to-be-processed event and each of the topic events respectively to obtain intermediate semantic features of the to-be-processed event and each of the topic events; performing enhancement processing on the intermediate semantic features of the to-be-processed event based on the distinguishing mark of the to-be-processed event to obtain the semantic features of the to-be-processed event, and performing enhancement processing on the intermediate semantic features of each of the topic events based on the distinguishing mark of each of the topic events to obtain the semantic features of each of the topic events. The time difference feature extraction of the time difference between the occurrence time of each of the topic events and the reference time includes:

7. The method of claim 1, wherein, performing difference processing on the occurrence time of each of the topic events and the reference time to obtain the time difference between each of the topic events and the reference time; obtaining a mapping relationship between the time difference and the time difference feature; determining the time difference feature of each of the topic events based on the mapping relationship, and the time difference between each of the topic events and the reference time. The fusion of the semantic features of the to-be-processed event and the corresponding time difference features includes:

8. The method of claim 1, wherein, performing fusion processing on the semantic features of the to-be-processed event and the corresponding time difference features to obtain the fusion features of the to-be-processed event. The fusion of the semantic features of each of the topic events and the corresponding time difference features includes: performing fusion processing on the semantic features of each of the topic events and the corresponding time difference features to obtain the fusion features of each of the topic events. The output layer includes a first fusion layer and a first prediction layer; 9. The method of claim 1, wherein, The prediction of the correlation between the to-be-processed event and the target topic based on the fusion features of the to-be-processed event and the fusion features of each of the topic events through the output layer includes: performing feature fusion on the fusion features of the to-be-processed event and the fusion features of each of the topic events through the first fusion layer to obtain first target fusion features; performing prediction on the correlation between the to-be-processed event and the target topic based on the first target fusion features through the first prediction layer to obtain a corresponding prediction result. The output layer includes a second fusion layer and a second prediction layer; 10. The method of claim 1, wherein, ​ The output layer is configured to predict a correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion features of the topic events, and obtain a corresponding prediction result. The second fusion layer is configured to perform feature fusion on the fusion features of the topic events, and obtain a second target fusion feature. The second prediction layer is configured to predict a correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the second target fusion feature, and obtain a corresponding prediction result.

11. The method of claim 1, wherein, The output layer includes a binary classification layer. The output layer is configured to predict a correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion features of the topic events, and obtain a corresponding prediction result. The binary classification layer is configured to perform binary classification on the correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion features of the topic events, and obtain a binary classification result. The binary classification result is used to indicate whether the to-be-processed event is related to the target topic.

12. The method of claim 1, wherein, The output layer includes a logistic regression layer. The output layer is configured to predict a correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion features of the topic events, and obtain a corresponding prediction result. The logistic regression layer is configured to perform correlation score prediction on the correlation between the to-be-processed event and the target topic based on the fusion feature of the to-be-processed event and the fusion features of the topic events, and obtain a score used to indicate a correlation degree between the to-be-processed event and the target topic.

13. The method of claim 1, wherein, After the correlation between the to-be-processed event and the target topic is predicted to obtain a corresponding prediction result, the method further includes: When the prediction result indicates that the to-be-processed event is related to the target topic, the to-be-processed event is integrated into the target topic according to an occurrence time of the event, and an event context corresponding to the target topic is obtained, the event context including the to-be-processed event and at least one topic event.

14. The method of claim 13, wherein, After the to-be-processed event is integrated into the target topic to obtain an event context corresponding to the target topic, the method further includes: Presenting an event search control; In response to an event search operation for the target topic triggered based on the event search control, the event context is presented.

15. The method of claim 1, wherein, Before the semantic feature extraction layer is used to extract semantic features of the to-be-processed event and the at least one topic event, the method further includes: Obtaining event training samples carrying labels and corresponding topic training samples; wherein the labels are used to indicate a correlation between the event training samples and the corresponding topic training samples, and the topic training samples include at least one topic sample event. The semantic feature extraction layer extracts semantic features from the event training samples and each topic sample event to obtain the semantic features of the event training samples and each topic sample event. Through the time difference feature extraction layer, the time difference between the occurrence time of the event training sample and the base time is extracted to obtain the time difference feature of the event training sample, and the time difference between the occurrence time of each topic sample event and the base time is extracted to obtain the time difference feature of each topic sample event. The feature fusion layer fuses the semantic features of the event training samples with the corresponding time difference features to obtain the fused features of the event training samples, and fuses the semantic features of each topic sample event with the corresponding time difference features to obtain the fused features of each topic sample event. Through the output layer, based on the fusion features of the event training samples and the fusion features of each topic sample event, the correlation between the event training samples and the topic training samples is predicted to obtain the corresponding prediction results. Obtain the difference between the prediction result and the label, and update the model parameters of the event processing model based on the difference.

16. The method of claim 15, wherein, The output layer includes a binary classification layer and a logistic regression layer; the correlation between the event training samples and the topic training samples is predicted through the output layer based on the fusion features of the event training samples and the fusion features of each topic sample event, to obtain the corresponding prediction results, including: The binary classification layer performs binary classification on the correlation between the event training samples and the topic training samples based on the fusion features of the event training samples and the fusion features of the topic training samples, obtaining a binary classification result. The logistic regression layer then predicts the correlation score between the event training samples and the topic training samples based on the fusion features of the event training samples and the fusion features of the topic training samples, obtaining a score that indicates the degree of correlation between the event training samples and the topic training samples. The step of comparing the prediction result with the label to obtain the difference between the prediction result and the label, and updating the model parameters of the event processing model based on the difference, includes: Obtain the first loss function corresponding to the binary classification layer, the binary classification result, and the first difference between the binary sub-labels in the label; determine the value of the first loss function based on the first difference; and obtain the second loss function corresponding to the logistic regression layer, the score, and the second difference between the score sub-labels in the label; determine the value of the second loss function based on the second difference. By combining the values ​​of the first loss function and the second loss function, the value of the target loss function corresponding to the event processing model is determined, and the model parameters of the event processing model are updated based on the value of the target loss function.

17. A method of training an event processing model, the method comprising: The event processing model 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 semantic feature extraction layer is used to extract semantic features of an event training sample and semantic features of at least one topic sample event respectively, so as to obtain the semantic features of the event training sample and the semantic features of each topic sample event; The at least one topic sample event belongs to a same topic training sample, and the label is used to indicate a correlation between the event training sample and the topic training sample; The time difference feature extraction layer is used to extract time difference features of a time difference between an occurrence time of the event training sample and a reference time, so as to obtain the time difference features of the event training sample, and extract time difference features of a time difference between an occurrence time of each topic sample event and the reference time, so as to obtain the time difference features of each topic sample event; The feature fusion layer is used to fuse the semantic features of the event training sample and corresponding time difference features, so as to obtain fusion features of the event training sample, and fuse the semantic features of each topic sample event and corresponding time difference features, so as to obtain fusion features of each topic sample event; The output layer is used to predict the correlation between the event training sample and the topic training sample based on the fusion features of the event training sample and the fusion features of each topic sample event, so as to obtain a corresponding prediction result; A difference between the prediction result and the label is obtained, and the event processing model is trained based on the difference, so that the event processing model obtained by training is used to predict a correlation between a to-be-processed event and a target topic comprising at least one topic event.

18. An event processing apparatus based on an event processing model, characterized by The event processing model comprises a semantic feature extraction layer, a time difference feature extraction layer, a feature fusion layer and an output layer, and the device comprises: A semantic feature extraction module is configured to extract semantic features of a to-be-processed event and semantic features of at least one topic event through the semantic feature extraction layer, so as to obtain the semantic features of the to-be-processed event and the semantic features of each topic event; wherein the at least one topic event belongs to a same target topic; A time difference feature extraction module is configured to extract time difference features of a time difference between an occurrence time of the to-be-processed event and a reference time through the time difference feature extraction layer, so as to obtain the time difference features of the to-be-processed event, and extract time difference features of a time difference between an occurrence time of each topic event and the reference time, so as to obtain the time difference features of each topic event; A feature fusion module is configured to fuse the semantic features of the to-be-processed event and corresponding time difference features through the feature fusion layer, so as to obtain fusion features of the to-be-processed event, and fuse the semantic features of each topic event and corresponding time difference features, so as to obtain fusion features of each topic event; An output module is configured to predict, based on the fusion feature of the to-be-processed event and the fusion feature of each topic event, a correlation between the to-be-processed event and the target topic through the output layer, and obtain a corresponding prediction result.

19. An electronic device, comprising: Comprising: a memory configured to store executable instructions; a processor configured to execute the executable instructions stored in the memory to implement the method in any one of claims 1 to 17.

20. A computer-readable storage medium, characterized in that, executable instructions stored in the memory, which, when executed by the processor, cause the processor to implement the method in any one of claims 1 to 17.

Citation Information

Patent Citations

  • SinglePass algorithm based method for achieving tagged corpus-free active prediction of emergency in mobile customer service field

    CN108549647A

  • Method and device for predicting viral transmission of network information in social network

    CN112948825A