Event situation prediction method and device and electronic equipment
The event situation prediction method addresses sparsity and complexity in traditional models by decomposing events into features and using graph-based models with attention mechanisms, enhancing accuracy and reliability in predicting subsequent events.
Patent Information
- Application Number
- CN202411252677.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-24
AI Technical Summary
Traditional deep learning models face challenges in predicting subsequent events due to sparsity issues in historical case libraries, requiring extensive training data, and are computationally complex, leading to inaccurate predictions, especially in emergency scenarios with limited data similarity.
An event situation prediction method involving decomposing historical events into features, constructing internal and inter-event feature graphs, and using a trained model to calculate and match feature representations for accurate prediction, incorporating attention mechanisms to enhance correlation characterization.
The method improves prediction accuracy and reliability by integrating complex event relationships, enriching semantic representation, and alleviating sparsity issues, enabling reliable prediction of subsequent events even with limited historical data.
Smart Images

Figure CN119179907A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning and artificial intelligence technology, and in particular to an event situation prediction method, device and electronic equipment. Background Art
[0002] Once an emergency occurs, it often brings about significant economic losses and social impacts, seriously threatening the safety of people's lives and property. What is more serious is that emergencies often trigger a series of subsequent events. The core characteristics of subsequent events are their unpredictability, collateral effects and amplification effects. Subsequent events may be triggered by improper handling, environmental factors or human factors. Their consequences are often more serious than the original events, and the scope of impact and degree of loss often exceed the original events themselves, thereby exacerbating the severity of the overall disaster. In view of the significant consequences of subsequent events, it is particularly important to implement feature predictions for subsequent situations that may occur after an emergency. After a natural disaster occurs, accurate predictions can not only deploy prevention and response measures in advance, effectively reduce the losses caused by the disaster, but also guide the optimization of rescue strategies.
[0003] The research on event prediction has evolved from preliminary exploration to modern technological innovation, and the research methods and theoretical frameworks have been continuously improved and developed. In the 1970s and 1980s, this field mainly relied on the manual coding stage. Researchers manually extracted events from story texts and built event chains and expert systems based on these events. This method is limited by the experience and subjectivity of experts and is difficult to handle large-scale data sets. With the introduction of statistical methods, researchers have proposed script event prediction methods based on statistical co-occurrence. These methods predict subsequent events by learning the probability distribution between events, but still face the problems of data sparsity and limited generalization ability. With the rise of deep learning technology, script event prediction methods based on deep neural networks have gradually become mainstream. These methods map events to low-dimensional vector spaces. In order to improve the accuracy and efficiency of event prediction, a variety of neural network models are used to learn event embedding and calculate the correlation between events.
[0004] However, in the field of deep learning technology, the prediction of subsequent events still faces many challenges. When dealing with new events, traditional prediction models rely heavily on the comprehensiveness and case quality of historical case libraries; in the rapidly changing real environment, these traditional methods often fail to achieve the expected prediction results, especially when faced with the sparsity of emergency response cases, that is, the lack of cases similar or related to new events in the historical database, and it is difficult for the prediction model to extract effective features from them to guide the development of subsequent situations. The development of subsequent events is jointly influenced by many factors, and the factors are intertwined with each other, requiring the prediction model to take into account the test of multiple variables and multiple factors, which increases the complexity and computational burden of model construction; and the prediction model requires a large amount of data to train, and the quality and scale of the data have a significant impact on the prediction effect of the model. If the training data is insufficient or of low quality, the model may not be able to learn effective feature representations, resulting in inaccurate prediction results. Summary of the invention
[0005] The present invention provides an event situation prediction method, device and electronic device to solve the problem that when predicting subsequent events in the field of deep learning, traditional prediction models face the sparsity problem of historical case libraries when processing new events, resulting in the prediction model being unable to accurately predict subsequent events; and traditional prediction models are too complex, require too much training data, and have a large amount of calculation.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is to provide an event situation prediction method, including the steps of: obtaining multiple historical events in a historical event library, and decomposing each of the historical events into corresponding multiple historical event features; constructing an event internal feature map and an event inter-event feature map based on all the historical event features; inputting the event internal feature map and the event inter-event feature map into a trained event feature prediction model, and calculating and obtaining the feature representation of the historical event features; obtaining a target predecessor event, and decomposing the target predecessor event into multiple target predecessor event features, and then inputting them into the event feature prediction model, using the feature representation of the historical event features to match the target predecessor event features with the corresponding target predecessor feature representation; and according to the target predecessor feature representation, using the target prediction function, calculating and obtaining the target subsequent event features.
[0007] In some embodiments, the step of constructing an internal event feature graph and an inter-event feature graph based on all the historical event features specifically includes: utilizing an event graph to respectively combine all the historical event features into a plurality of corresponding historical event feature pairs; constructing the internal event feature graph and the inter-event feature graph based on a plurality of the historical event feature pairs and their internal relationships; wherein each of the historical event feature pairs includes a plurality of corresponding historical preceding event features and historical subsequent event features.
[0008] In some embodiments, the step of inputting the event internal feature graph and the inter-event feature graph into the trained event feature prediction model to calculate and obtain the feature representation of the historical event features specifically includes: using the event internal feature graph and the inter-event feature graph to calculate and obtain the embedded feature representation of each of the historical event features; using a heterogeneous graph representation method to extract the entity feature representation of each of the historical event features from the logical graph; performing a weighted sum operation on the embedded feature representation and the entity feature representation of each of the historical event features to fuse and obtain the feature representation corresponding to each of the historical event features.
[0009] In some embodiments, the step of calculating and obtaining the embedded feature representation of each of the historical event features using the internal event feature graph and the inter-event feature graph specifically includes: the embedded feature representation includes a first embedded feature representation and a second embedded feature representation; a multi-layer attention convolution operation is performed on the internal event feature graph to obtain the first embedded feature representation of each of the historical event features; a multi-layer attention convolution operation is performed on the inter-event feature graph to obtain the second embedded feature representation of each of the historical event features.
[0010] In some embodiments, the step of calculating and obtaining target subsequent event features based on the target preceding feature representation and using a target prediction function specifically includes: screening all feature representations of the historical event features based on the target preceding feature representation to obtain a corresponding plurality of candidate feature representations; calculating and obtaining a candidate feature matrix based on the candidate feature representations; calculating and obtaining a prediction probability corresponding to each candidate feature representation based on the candidate feature matrix and using a target prediction function, arranging the prediction probabilities from high to low, and selecting the first K corresponding candidate feature representations as the target subsequent event features.
[0011] In some embodiments, the step of screening all feature representations of the historical event features according to the target preceding feature representation to obtain a corresponding plurality of candidate feature representations therefrom specifically includes: organizing the plurality of target preceding feature representations into a target preceding feature matrix, performing a weighted sum operation on the target preceding feature matrix, and obtaining a corresponding plurality of candidate feature representations.
[0012] In some embodiments, the step of calculating and obtaining a candidate feature matrix based on the candidate feature representations specifically includes: performing a nonlinear transformation on a plurality of the candidate feature representations to obtain the candidate feature matrix.
[0013] In some embodiments, the training method of the event feature prediction model includes the steps of: using the historical event library to train the event feature prediction model multiple times; using a multi-label loss function to compare the results of each training, and modifying and optimizing the parameters of the event feature prediction model accordingly, until the training result minimizes the value of the multi-label loss function, thereby obtaining the trained event feature prediction model.
[0014] The present invention also provides an event situation prediction device, comprising: an acquisition unit, used to acquire multiple historical events in a historical event library, and also used to acquire target predecessor events; a disassembly unit, used to disassemble each of the historical events into corresponding multiple historical event features, and also used to disassemble the target predecessor event into multiple target predecessor event features; a construction unit, used to construct an event internal feature map and an event inter-event feature map based on all the historical event features; an embedding unit, used to calculate and obtain the feature representation of the historical event features based on the event internal feature map and the event inter-event feature map; and also used to use the feature representation of the historical event features to match the target predecessor event features with the corresponding target predecessor feature representation; a prediction unit, used to calculate and obtain the target subsequent event features based on the target predecessor feature representation and using a target prediction function.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method when executing the computer program.
[0016] The beneficial effects of the present invention are as follows: the present application provides an event situation prediction method, device and electronic device. The method comprises the steps of: obtaining multiple historical events in a historical event library, decomposing each historical event into corresponding multiple historical event features; constructing an event internal feature map and an event-to-event feature map based on all historical event features; inputting the event internal feature map and the event-to-event feature map into a trained event feature prediction model, and calculating and obtaining the feature representation of the historical event features; obtaining a target preceding event, and decomposing the target preceding event into multiple target preceding event features, and then inputting them into the event feature prediction model, using the feature representation of the historical event features, matching the target preceding event features with the corresponding target preceding feature representation; and using the target preceding feature representation, using the target prediction function, calculating and obtaining the target subsequent event features. The present application trains the event feature prediction model through the historical event library, so that it can effectively integrate different information in the event internal feature map and the event-to-event feature map, capture the complex interrelationships and influences between events, and enable the event feature prediction model to have comprehensive information integration capabilities, and have higher accuracy and reliability when predicting emergencies. This application also breaks down events into feature levels, deeply explores the global and local information of events, obtains feature representations of events, introduces an attention mechanism to characterize the fine-grained correlation between event features, and integrates the feature representations extracted from the event graph to enrich the semantics of the model, thereby improving the quality of learning and the accuracy of recommendations. This allows the corresponding subsequent event features to be predicted through the same features after decomposition, regardless of whether the emergency event exists in the historical event library, thereby alleviating the sparsity problem of emergency events. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of an event situation prediction method provided by this application;
[0018] Figure 2 It is a data flow diagram of an event situation prediction method provided by this application;
[0019] Figure 3 It is a schematic diagram of an event feature prediction model predicting an event in an embodiment of an event situation prediction method provided by the present application;
[0020] Figure 4 It is a partial schematic diagram of an embodiment of a matter-of-event graph in an event situation prediction method provided by the present application;
[0021] Figure 5 It is a schematic diagram of the composition of an event situation prediction device provided by the present application;
[0022] Figure 6 It is a schematic diagram of the architecture of an embodiment of an electronic device provided by the present application. DETAILED DESCRIPTION
[0023] In order to facilitate the understanding of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings and specific embodiments. Preferred embodiments of the present invention are provided in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0024] It should be noted that, unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used in this specification includes any and all combinations of one or more related listed items.
[0025] like Figure 1 As shown, the present invention provides an event situation prediction method, comprising the steps of:
[0026] S1: Acquire multiple historical events in the historical event library, and decompose each historical event into multiple corresponding historical event features.
[0027] S2: Based on all historical event features, construct event internal feature graphs and inter-event feature graphs.
[0028] S3: Input the internal feature map of the event and the feature map between events into the trained event feature prediction model to calculate and obtain the feature representation of the historical event features.
[0029] S4: Obtain a target preceding event, decompose the target preceding event into multiple target preceding event features, and input them into an event feature prediction model. Use the feature representation of historical event features to match the target preceding event features with corresponding target preceding feature representations.
[0030] S5: According to the target pre-feature representation, the target subsequent event features are calculated and obtained using the target prediction function.
[0031] This application trains the event feature prediction model through the historical event library, so that it can effectively integrate the different information in the internal feature map of the event and the feature map between events, capture the complex interrelationships and influences between events, and enable the event feature prediction model to have comprehensive information integration capabilities, and have higher accuracy and reliability when predicting emergencies. This application also deconstructs the event into the feature level, deeply explores the global and local information of the event, obtains the feature representation of the event, introduces the attention mechanism to characterize the fine-grained correlation between event features, and integrates the feature representation extracted from the event map to enrich the semantics of the model, improves the quality of learning and the accuracy of recommendations, so that regardless of whether the emergency exists in the historical event library, the corresponding subsequent event features can be predicted through the same features after deconstruction, alleviating the sparsity problem of emergencies.
[0032] Combine the following Figures 1 to 6 , the present application is further described in detail with specific embodiments.
[0033] Figure 1 The following is a flow chart of the event situation prediction method provided by the embodiment of the present application, which is described in detail as follows:
[0034] S1: Acquire multiple historical events in the historical event library, and decompose each historical event into multiple corresponding historical event features.
[0035] Among them, the historical event database records multiple representative emergencies that occurred in the past and the subsequent chain events they generated. Each historical event contains a variety of complex information, such as event type, risk level, involved personnel, location, time, etc., which constitute the different characteristics of historical events. Decomposing each historical event into multiple corresponding historical event features can deeply explore the correlation and evolution law between multiple historical event features in historical events, which is conducive to alleviating the sparsity problem of the historical event database, thereby improving the semantic representation and prediction effect of historical events.
[0036] In this embodiment, all historical event features can be expressed as:
[0037] F={f1,f2,…,f M}
[0038] Among them, F represents all historical event features, M represents the number of all historical event features, f1, f2, ..., f M Represent the characteristics of each historical event.
[0039] S2: Based on all historical event features, construct event internal feature graphs and inter-event feature graphs.
[0040] refer to Figure 2, using the event graph, all historical event features are combined into multiple corresponding historical event feature pairs; based on multiple historical event feature pairs and their internal relationships, internal event feature graphs and inter-event feature graphs are constructed; wherein each historical event feature pair includes multiple corresponding historical preceding event features and historical subsequent event features.
[0041] It should be noted that the causal graph is a knowledge base based on the evolutionary laws and patterns between events, aiming to reveal the development logic and internal connections of events. By describing the evolutionary laws and patterns between events, the causal graph provides a directed cyclic graph structure, where nodes represent events and directed edges represent the logical relationships between events such as timing, cause and effect, conditions, and hierarchy. Figure 4 In the embodiment shown, the earthquake is the first emergency event, and the rest are a series of chain events or people and objects involved caused by the emergency event. Figure 4 As shown, earthquakes can cause building collapse, casualties, or landslides; when building collapse, casualties, landslides and other events occur, they will cause a series of related follow-up events. For example, casualties will lead to increased medical needs, further causing resource shortages, etc.
[0042] Specifically, according to the event graph, a plurality of corresponding historical event feature pairs can be constructed, each of which corresponds to a historical preceding event and a historical subsequent event that actually occurred, and thus includes a plurality of corresponding historical preceding event features and historical subsequent event features; in this embodiment, the historical event feature pairs are represented by symbols:
[0043] p= <pe={f m , …, f n}, se={f p , …, f q}>
[0044] Among them, p represents one of the historical event feature pairs, pe represents the historical preceding event corresponding to the historical event feature pair, se represents the historical subsequent event corresponding to the historical event feature pair, and f m , …, f n represents multiple different historical preceding event characteristics, f p , …, f q Represents multiple different historical subsequent event characteristics.
[0045] Furthermore, based on multiple historical event feature pairs and their internal relationships, internal event feature graphs and inter-event feature graphs are constructed to explore the local event feature evolution laws.
[0046] Among them, the event internal feature graph represents the relationship between multiple different historical predecessor event features within each historical predecessor event, and each two related historical predecessor event features are connected by an edge; at the same time, it also represents the relationship between multiple different historical subsequent event features within each historical subsequent event, and each two related historical subsequent event features are connected by an edge.
[0047] The feature graph between events represents the relationship between multiple different historical preceding event features in each historical preceding event and multiple different historical subsequent event features in each historical subsequent event, which can be expressed as a set:
[0048] {(f m , f p ),…,(f m , f q ),…,(f n , f p ),…,(f n , f q )}
[0049] In this embodiment, the internal feature graph of an event is an undirected graph, and the feature graph between events is a directed graph; an undirected graph represents that there is no directional relationship between the features of two historical preceding events or between the features of two historical subsequent events, and a directed graph represents that each historical preceding event feature will point to the historical subsequent event feature associated with it.
[0050] S3: Input the internal feature map of the event and the feature map between events into the trained event feature prediction model to calculate and obtain the feature representation of the historical event features.
[0051] Among them, the multi-graph neural network model in the deep learning model is first used to build the initial event feature prediction model.
[0052] Secondly, the event feature prediction model is trained multiple times using the above historical event library. The multi-label loss function is used to compare the results of each training, and the error between the actual historical subsequent events corresponding to the historical predecessor events and the predicted subsequent events of the historical predecessor events predicted by the event feature prediction model is compared; the parameters of the event feature prediction model are modified and optimized according to the error, until the training result minimizes the value of the multi-label loss function (that is, the error between the actual and predicted subsequent events is minimized), and a trained event feature prediction model is obtained.
[0053] In this embodiment, the multi-label loss function is expressed by the following formula:
[0054]
[0055] Among them, Loss represents the multi-label loss function, argmin represents the minimum value, represents the mean square loss, Θ represents the set of trainable parameters, pe represents the historical preceding events, Represents all candidate event features except pe, represents the target prediction function, se represents the actual historical subsequent events, se' represents the multi-hot vector of historical subsequent events, λ represents a constant, and M represents the number of all historical event features.
[0056] For further information, please refer to Figure 2 , the constructed event internal feature map and event inter-event feature map are input into the trained event feature prediction model.
[0057] In this embodiment, the internal feature graph of events and the feature graph between events are used to calculate and obtain the embedded feature representation of each historical event feature, so as to capture the fine-grained relationship and evolution law between the historical event features from both global and local perspectives; wherein the embedded feature representation includes a first embedded feature representation and a second embedded feature representation.
[0058] Specifically, a multi-layer attention convolution operation is performed on the internal feature map of the event to obtain the first embedded feature representation of each historical event feature; a multi-layer attention convolution operation is performed on the feature map between events to obtain the second embedded feature representation of each historical event feature.
[0059] Here, we take the internal feature graph of an event as an example, and for one of the historical preceding event features f m , and perform multi-layer attention convolution operations on it, which can be expressed by the following formulas, including:
[0060] Get the information passed by its first-order neighbors:
[0061]
[0062] in, represents the first-order neighbor f n The information conveyed, Represents f n The initial representation of represents the conversion weight matrix of the first layer, intra represents the internal feature map of the event, 0 represents the first layer, and R represents a real number. Represents a real number matrix of dimension 1×d0, where d0 represents the dimension of the initial representation and d1 represents the dimension of the output of the first layer.
[0063] A weighted sum operation is used to combine information from all neighbors:
[0064]
[0065] in, Represents the information of all neighbors in the first layer, Represents f m The first layer of neighbors, tanh represents the activation function, π(f m , f n ) represents the weight, T represents the transposition operation, Represents f m The initial representation of , exp represents the natural exponential function.
[0066] Update the representation of the historical preceding event features of the first layer:
[0067]
[0068] in, The first embedding feature representation representing the historical preceding event features of the first layer, || represents the concatenation operation, Represents the aggregated weight matrix of the first layer.
[0069] Update the representation of the historical preceding event features of the kth layer and obtain the first embedded feature representation of the historical event features:
[0070]
[0071] in, The first embedding feature representation representing the historical preceding event features of the kth layer, represents the aggregate weight matrix of the kth layer, The first embedding feature representation representing the historical preceding event features of the k-1th layer, Represents the information of all neighbors in the kth layer, Represents f n The first embedding feature representation of the historical preceding event features at the k-1th layer, Represents the transformation weight matrix of the kth layer.
[0072] Based on the example of the internal feature graph of an event, the second embedded feature representation of the historical event features of the feature graph between events can be obtained in the same way:
[0073]
[0074] in, The second embedding feature representation representing the historical preceding event features of the kth layer, represents the aggregate weight matrix of the kth layer, The second embedding feature representation representing the historical preceding event features of the k-1th layer, Represents the information of all neighbors in the kth layer, Represents f nThe second embedding feature representation of the historical preceding event features at the k-1th layer is: represents the conversion weight matrix of the kth layer, inter represents the feature map between events, π'(f m , f n ) represents the weight of the feature map between events.
[0075] Furthermore, the heterogeneous graph representation method HIN2Vec is used to extract the entity feature representation of each historical event feature from the event graph. Among them, HIN2Vec is a representation learning framework for heterogeneous information networks, which uses neural networks to learn the representation of nodes and relationships (meta-paths). The use of heterogeneous graph representation methods enables the model to simultaneously utilize the topological structure and node information of the event graph, improving the quality of learning.
[0076] Furthermore, a weighted sum operation is performed on the embedded feature representation and entity feature representation of each historical event feature to obtain the feature representation corresponding to each historical event feature:
[0077]
[0078] in, Represents the characteristics of historical events m The corresponding feature representation is, Represents f m The first embedding feature representation of Represents f m The second embedding feature representation is, represents entity feature representation, W Tr Used to Mapped to In the same dimensional space, L represents the number of layers.
[0079] S4: Obtain a target preceding event, decompose the target preceding event into multiple target preceding event features, and input them into an event feature prediction model. Use the feature representation of historical event features to match the target preceding event features with corresponding target preceding feature representations.
[0080] Obtain the target preceding event to be predicted, and decompose the target preceding event into multiple target preceding event features according to the method in S1, and input them into the trained event feature prediction model.
[0081] Find the historical event features that are the same as the target preceding event features, find the feature representation of the same historical event features from the feature representations of all historical event features obtained in S3, and use it as the target preceding feature representation corresponding to the target preceding event feature.
[0082] S5: According to the target pre-feature representation, the target subsequent event features are calculated and obtained using the target prediction function.
[0083] Specifically, according to the target pre-feature representation, the feature representations of all historical event features are screened to obtain corresponding multiple candidate feature representations.
[0084] In this embodiment, a plurality of target pre-feature representations are organized into a target pre-feature matrix, and a weighted sum operation is performed on the target pre-feature matrix to obtain a corresponding plurality of candidate feature representations.
[0085] Furthermore, according to the candidate feature representations, a candidate feature matrix is calculated, including: performing nonlinear transformation on multiple candidate feature representations to obtain the candidate feature matrix.
[0086] The above method can be expressed by the following formula:
[0087]
[0088] Among them, e event (pe,f c ) represents one of the candidate event features f c The candidate feature representation of represents the candidate feature representation, e pe =R pe×d represents the target pre-feature matrix, represents the attention weight, Representatives will The representation matrix obtained by copying d copies, softmax represents the normalized exponential function, ReLU represents the nonlinear activation function, f c represents the candidate event features, W mlp represents the weight matrix of the multilayer perceptron, Sum represents summation, ⊙ represents element-wise product, b mlp Represents the bias vector of the multilayer perceptron.
[0089] According to the candidate feature matrix, the target prediction function is used to calculate the prediction probability corresponding to each candidate feature representation, and the prediction probabilities are arranged from high to low, and the first K corresponding candidate feature representations are selected as the target subsequent event features. Among them, the value range of K is [1, M), and the target prediction function is expressed as:
[0090]
[0091] in, Represents the predicted probability calculated by the target prediction function, pad represents the alignment operation, sigmoid represents normalization, and rowsum represents the row summation operation. represents multiple candidate feature representations, Represents the candidate feature matrix.
[0092] According to the obtained prediction probabilities, candidate feature representations corresponding to the first K prediction probabilities arranged from high to low are selected as the features of multiple target subsequent events predicted for the target preceding event.
[0093] by Figure 3 As an example, the event feature prediction model of the present application predicts multiple target subsequent event features (such as building collapse, road damage, drinking water source pollution, etc. on the right) for multiple target preceding event features of target preceding events (such as natural disasters, midnight, winter, etc. on the left).
[0094] Corresponding to the event situation prediction method in the above embodiment, Figure 5 A schematic diagram of the composition of an event situation prediction device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0095] refer to Figure 5 , the event situation prediction device comprises:
[0096] An acquisition unit 101 is used to acquire multiple historical events in a historical event library and also to acquire a target preceding event;
[0097] The decomposition unit 102 is used to decompose each historical event into a corresponding plurality of historical event features, and is also used to decompose a target preceding event into a plurality of target preceding event features;
[0098] A construction unit 103, configured to construct an event internal feature graph and an event inter-event feature graph according to all historical event features;
[0099] The embedding unit 104 is used to calculate and obtain the feature representation of the historical event feature according to the internal feature graph of the event and the feature graph between events; and is also used to match the corresponding target preceding feature representation for the target preceding event feature using the feature representation of the historical event feature;
[0100] The prediction unit 105 is used to calculate and obtain the target subsequent event features according to the target pre-feature representation and using the target prediction function.
[0101] It should be noted that since the above-mentioned event situation prediction device is based on the same concept as the embodiment of the method of the present application, its specific functions, the process of each module realizing its respective function and the technical effects brought about can be specifically referred to the description of the embodiment shown in the above-mentioned event situation prediction method, and will not be repeated here.
[0102] Based on the same inventive concept, the present application also provides an electronic device, which includes a processor, a memory and a communication circuit, and the processor is connected to the memory and the communication circuit respectively; wherein the communication circuit is used for communication connection, the memory is used to store a computer program, and the processor is used to execute the computer program to implement the above-mentioned surface mesh generation method.
[0103] See also Figure 6 The electronic device described in the embodiment of the present application may specifically include a processor 210 and a memory 220. The memory 220 is coupled to the processor 210.
[0104] The processor 210 is used to control the operation of the electronic device. The processor 210 may also be referred to as a CPU (Central Processing Unit). The processor 210 may be an integrated circuit chip having the ability to process signals. The processor 210 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 210 may also be any conventional processor, etc.
[0105] The memory 220 is used to store computer programs, and may be a RAM, a ROM, or other types of storage terminals. Specifically, the memory 220 may include one or more computer-readable storage media, which may be non-transitory or transient. The memory 220 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage terminals, flash memory storage terminals. In some embodiments, the non-transitory computer-readable storage medium in the memory 220 is used to store at least one program code.
[0106] The processor 210 is used to execute the computer program stored in the memory 220 to implement the methods described in the various method embodiments of the present application.
[0107] In some embodiments, the electronic device may further include: a peripheral terminal interface 230 and at least one peripheral terminal. The processor 210, the memory 220 and the peripheral terminal interface 230 may be connected via a bus or a signal line. Each peripheral terminal may be connected to the peripheral terminal interface 230 via a bus, a signal line or a circuit board. Specifically, the peripheral terminal includes: at least one of a radio frequency circuit 240, a display screen 250, an audio circuit 260 and a power supply 270.
[0108] The peripheral terminal interface 230 may be used to connect at least one peripheral terminal related to I / O (Input / output) to the processor 210 and the memory 220. In some embodiments, the processor 210, the memory 220, and the peripheral terminal interface 230 are integrated on the same chip or circuit board; in some other implementations, any one or two of the processor 210, the memory 220, and the peripheral terminal interface 230 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0109] The radio frequency circuit 240 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 240 communicates with the communication network and other IoT devices through electromagnetic signals, and the radio frequency circuit 240 is the communication circuit of the electronic device. The radio frequency circuit 240 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 240 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, an operator identity module card, and the like. The radio frequency circuit 240 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 240 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0110] The display screen 250 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 250 is a touch display screen, the display screen 250 also has the ability to collect touch signals on the surface or above the surface of the display screen 250. The touch signal can be input to the processor 210 as a control signal for processing. At this time, the display screen 250 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 250 can be one, set on the front panel of the electronic device; in other embodiments, the display screen 250 can be at least two, respectively set on different surfaces of the electronic device or in a folding design; in other embodiments, the display screen 250 can be a flexible display screen, set on a curved surface or a folding surface of the electronic device. Even, the display screen 250 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 250 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0111] The audio circuit 260 may include a microphone and a speaker. The microphone is used to collect sound waves from the operator and the environment, and convert the sound waves into electrical signals and input them into the processor 210 for processing, or input them into the radio frequency circuit 240 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged in different parts of the electronic device. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 210 or the radio frequency circuit 240 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 260 may also include a headphone jack.
[0112] The power supply 270 is used to power various components in the electronic device. The power supply 270 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 270 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0113] For a detailed description of the functions and execution processes of each functional module or component in the electronic device embodiment of the present application, reference can be made to the description in the above-mentioned method embodiments of the present application, which will not be repeated here.
[0114] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the various embodiments of the electronic devices described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0115] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0116] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0117] It can be seen that the present invention discloses an event situation prediction method, device and electronic device. The method includes the steps of: obtaining multiple historical events in a historical event library, decomposing each historical event into corresponding multiple historical event features; constructing an event internal feature map and an event-to-event feature map based on all historical event features; inputting the event internal feature map and the event-to-event feature map into a trained event feature prediction model, and calculating and obtaining the feature representation of the historical event features; obtaining a target preceding event, and decomposing the target preceding event into multiple target preceding event features, and then inputting them into the event feature prediction model, using the feature representation of the historical event features, matching the target preceding event features with the corresponding target preceding feature representation; according to the target preceding feature representation, using the target prediction function, calculating and obtaining the target subsequent event features. The present application trains the event feature prediction model through the historical event library, so that it can effectively integrate the different information in the event internal feature map and the event-to-event feature map, capture the complex interrelationships and influences between events, and enable the event feature prediction model to have comprehensive information integration capabilities, and have higher accuracy and reliability when predicting emergencies. This application also breaks down events into feature levels, deeply explores the global and local information of events, obtains feature representations of events, introduces an attention mechanism to characterize the fine-grained correlation between event features, and integrates the feature representations extracted from the event graph to enrich the semantics of the model, thereby improving the quality of learning and the accuracy of recommendations. This allows the corresponding subsequent event features to be predicted through the same features after decomposition, regardless of whether the emergency event exists in the historical event library, thereby alleviating the sparsity problem of emergency events.
[0118] The above are only embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for predicting an event situation, characterized in that: Includes steps: Acquire multiple historical events in the historical event library, and decompose each of the historical events into multiple corresponding historical event features; According to all the historical event features, construct an event internal feature graph and an event inter-event feature graph; Inputting the event internal feature graph and the inter-event feature graph into a trained event feature prediction model to calculate and obtain the feature representation of the historical event feature; Obtain a target preceding event, decompose the target preceding event into a plurality of target preceding event features, and input the features into the event feature prediction model, and use the feature representation of the historical event features to match the target preceding event features with corresponding target preceding feature representations; According to the target pre-feature representation, the target subsequent event features are calculated and acquired using the target prediction function.
2. The event situation prediction method according to claim 1, characterized in that: The step of constructing an event internal feature graph and an event inter-event feature graph based on all the historical event features specifically includes: By using the event graph, all the historical event features are combined into a plurality of corresponding historical event feature pairs; Constructing the event internal feature graph and the inter-event feature graph according to the plurality of historical event feature pairs and their internal relations; Each of the historical event feature pairs includes a plurality of corresponding historical preceding event features and historical subsequent event features.
3. The event situation prediction method according to claim 1, characterized in that: The step of inputting the event internal feature graph and the inter-event feature graph into the trained event feature prediction model to calculate and obtain the feature representation of the historical event feature specifically includes: Using the event internal feature graph and the event inter-feature graph, calculate and obtain the embedded feature representation of each of the historical event features; Using a heterogeneous graph representation method, extracting entity feature representations of each historical event feature from the logical graph; A weighted sum operation is performed on the embedded feature representation and the entity feature representation of each of the historical event features to obtain the feature representation corresponding to each of the historical event features by fusing them.
4. The event situation prediction method according to claim 3, characterized in that: The step of calculating and obtaining the embedded feature representation of each of the historical event features by using the event internal feature graph and the event inter-event feature graph specifically includes: The embedded feature representation includes a first embedded feature representation and a second embedded feature representation; Performing a multi-layer attention convolution operation on the internal feature graph of the event to obtain the first embedded feature representation of each of the historical event features; Perform a multi-layer attention convolution operation on the feature graph between the events to obtain the second embedded feature representation of each of the historical event features.
5. The event situation prediction method according to claim 1, characterized in that: The step of calculating and acquiring target subsequent event features by using a target prediction function according to the target pre-feature representation specifically includes: According to the target pre-feature representation, screening all feature representations of the historical event features, and obtaining corresponding multiple candidate feature representations; According to the candidate feature representation, a candidate feature matrix is calculated and obtained; According to the candidate feature matrix, the target prediction function is used to calculate the prediction probability corresponding to each candidate feature representation, the prediction probabilities are arranged from high to low, and the first K corresponding candidate feature representations are selected as the target subsequent event features.
6. The event situation prediction method according to claim 5, characterized in that: The step of screening all feature representations of the historical event features according to the target pre-feature representation to obtain a corresponding plurality of candidate feature representations specifically includes: The plurality of target pre-feature representations are organized into a target pre-feature matrix, and a weighted sum operation is performed on the target pre-feature matrix to obtain the corresponding plurality of candidate feature representations.
7. The event situation prediction method according to claim 5, characterized in that: The step of calculating and obtaining a candidate feature matrix according to the candidate feature representation specifically includes: Nonlinear transformation is performed on the plurality of candidate feature representations to obtain the candidate feature matrix.
8. The event situation prediction method according to claim 1, characterized in that: The training method of the event feature prediction model comprises the steps of: Using the historical event database, training the event feature prediction model multiple times; The multi-label loss function is used to compare the results of each training, and the parameters of the event feature prediction model are modified and optimized accordingly until the training result minimizes the value of the multi-label loss function, thereby obtaining the trained event feature prediction model.
9. An event situation prediction device, characterized in that: include: An acquisition unit, used to acquire multiple historical events in the historical event library, and also used to acquire a target preceding event; A decomposition unit, used to decompose each of the historical events into a corresponding plurality of historical event features, and also used to decompose the target preceding event into a plurality of target preceding event features; A construction unit, used to construct an event internal feature graph and an inter-event feature graph according to all the historical event features; An embedding unit, used for calculating and obtaining a feature representation of the historical event feature according to the event internal feature graph and the inter-event feature graph; Also used for matching the target preceding event feature with the corresponding target preceding feature representation by using the feature representation of the historical event feature; The prediction unit is used to calculate and obtain the target subsequent event features based on the target pre-feature representation and using the target prediction function.
10. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 8 when executing the computer program.
