Emergency scheme recommendation method and device for emergencies, equipment and medium
By disassembling emergencies and emergency plans into features and sub-schemes, and building corresponding map models, the performance limitations of traditional emergency decision-making methods in unconventional events are solved, and accurate emergency plans are recommended in complex scenarios.
Patent Information
- Application Number
- CN202411922832.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-18
AI Technical Summary
Traditional emergency decision-making methods rely highly on the coverage and similarity measurement methods of the case library. In unconventional emergencies, the sparsity of events and the complexity of the situation limit the performance of the method, resulting in the recommended handling scheme being inaccurate and unreasonable.
By obtaining historical emergencies and emergency plans in the case library, split them into event features and sub-schemes, constructing feature-sub-scheme graphs, feature-feature graphs and sub-scheme-scheme graphs, combining factual knowledge graphs, input them into the scheme recommendation model, computing the fusion representation vector, and generating target emergency plans.
In unconventional and complex emergencies, reasonable, accurate and efficient emergency response plans can be recommended to reduce casualties and property losses, and are highly adaptable.
Smart Images

Figure CN119849755A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of emergency operation resource scheduling and artificial intelligence technology, and in particular to a method, device, equipment and medium for recommending an emergency plan for an emergency event. Background Art
[0002] In daily life, emergencies happen from time to time, such as building fires, gas leaks and explosions, typhoons and rainstorms, urban waterlogging, etc. Therefore, before an emergency occurs, emergency prevention measures should be taken to ensure the safe operation of all aspects of production and life. After an emergency occurs, emergency response should be carried out as soon as possible to reduce casualties and property losses.
[0003] The traditional emergency response method is: after receiving the report of the emergency, the responsible department generally analyzes the disaster situation manually, obtains an emergency response plan through expert judgment and leadership decision-making, and notifies the relevant departments to implement it. However, emergency response to emergencies requires every second, and the speed of manual analysis and judgment is limited. It is difficult to come up with an effective emergency response plan as soon as possible, which may lead to delayed emergency response, aggravating casualties and property losses.
[0004] With the continuous development of artificial intelligence technology, emergency decision-making methods based on knowledge graphs and graph neural networks have gradually become a research hotspot. The traditional case-based reasoning emergency decision-making method is to match the current emergency event with similar historical event handling solutions in the case library, and then make corrections based on the real-time scenario to obtain solutions for new scenarios. However, this type of work is highly dependent on the coverage and similarity measurement methods of the case library. In some unconventional emergency scenarios, the sparsity of events and the complexity of the scenarios will limit the performance of such methods, which will lead to the final scenario solution being inapplicable, the emergency response being unreasonable, and further aggravating casualties and property losses. Summary of the invention
[0005] The present invention provides a method, device, equipment and medium for recommending emergency plans for emergencies, which solves the problem that traditional emergency decision-making methods are highly dependent on the coverage and similarity measurement methods of case libraries. In some unconventional emergency scenarios, the sparsity of events and the complexity of situations will limit the performance of such methods, resulting in inaccurate and unreasonable recommended disposal plans.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is to provide a method for recommending emergency plans for emergencies, including the steps of: obtaining multiple historical emergencies and their corresponding historical emergency plans in a case library, and splitting each of the historical emergencies into multiple historical event features, and splitting each of the historical emergency plans into multiple historical sub-plans; constructing a feature-sub-plan graph, a feature-feature graph, and a sub-plan-sub-plan graph according to all the historical event features and historical sub-plans; inputting the feature-sub-plan graph, the feature-feature graph, the sub-plan-sub-plan graph, and the knowledge graph into a pre-constructed plan recommendation model, and calculating and obtaining a first fusion representation vector corresponding to the historical event feature and a second fusion representation vector corresponding to the historical sub-plan; obtaining a target emergency event, and splitting the target emergency event into multiple target event features, and then inputting them into the plan recommendation model; selecting a third fusion representation vector corresponding to each target event feature from all the first fusion representation vectors; and calculating and obtaining a corresponding target sub-plan list according to the third fusion representation vector using a target recommendation function, and generating a target emergency plan.
[0007] In some embodiments, the step of constructing a feature-sub-scheme graph, a feature-feature graph, and a sub-scheme-sub-scheme graph respectively according to all the historical event features and historical sub-schemes specifically includes: constructing the feature-sub-scheme graph according to all the historical event features and historical sub-schemes, and the associations between the historical event features and historical sub-schemes; wherein the feature-sub-scheme graph includes an environmental condition-sub-scheme graph, a disaster condition-sub-scheme graph, and an accident cause-sub-scheme graph; constructing the feature-feature graph according to all the historical event features and their internal relationships; constructing the sub-scheme-sub-scheme graph according to all the historical sub-schemes and their internal relationships.
[0008] In some embodiments, the step of inputting the feature-sub-scheme graph, feature-feature graph, sub-scheme-sub-scheme graph, and the knowledge graph into a pre-built solution recommendation model, and respectively calculating the first fused representation vector corresponding to the historical event feature and the second fused representation vector corresponding to the historical sub-scheme, specifically includes: using the feature-sub-scheme graph, respectively calculating the first embedding vector of each historical event feature and the second embedding vector of each historical sub-scheme; using the feature-feature graph, respectively calculating the third embedding vector of each historical event feature; using the sub-scheme-sub-scheme graph, respectively calculating the fourth embedding vector of each historical sub-scheme; extracting the first entity vector of each historical event feature and the second entity vector of each historical sub-scheme from the knowledge graph; fusing the first embedding vector, the third embedding vector and the first entity vector of each historical event feature to generate the first fused representation vector; fusing the second embedding vector, the fourth embedding vector and the second entity vector of each historical sub-scheme to generate the second fused representation vector.
[0009] In some embodiments, the step of using the feature-sub-scheme graph to respectively calculate the first embedding vector of each of the historical event features and the second embedding vector of each of the historical sub-schemes specifically includes: the feature-sub-scheme graph includes an environment condition-sub-scheme graph, a disaster condition-sub-scheme graph and an accident cause-sub-scheme graph; performing multi-layer attention convolution operations on the environment condition-sub-scheme graph to generate an environment vector and a first sub-scheme vector, respectively; performing multi-layer attention convolution operations on the disaster condition-sub-scheme graph to generate a disaster vector and a second sub-scheme vector, respectively; performing multi-layer attention convolution operations on the accident cause-sub-scheme graph to generate an accident vector and a third sub-scheme vector, respectively; performing a sum operation on the environment vector, the disaster vector and the accident vector to obtain the first embedding vector; performing a sum operation on the first sub-scheme vector, the second sub-scheme vector and the third sub-scheme vector to obtain the second embedding vector.
[0010] In some embodiments, the multi-layer attention convolution operation includes multi-layer neighbor sampling and attention weighted summation operations.
[0011] In some embodiments, the step of calculating the corresponding target sub-scheme list based on the third fusion representation vector using the target recommendation function specifically includes: calculating the overall feature matrix of all the target event features for all the historical sub-schemes based on all the third fusion representation vectors and all the second fusion representation vectors; organizing all the second fusion representation vectors into a scheme representation matrix; calculating the probability vector corresponding to each of the historical sub-schemes based on the overall feature matrix and the scheme representation matrix using the target recommendation function; selecting from all the historical sub-schemes based on all the probability vectors, and generating the target sub-scheme list.
[0012] In some embodiments, the step of calculating the overall feature matrix of all the target event features for all the historical sub-schemes based on all the third fused representation vectors and all the second fused representation vectors specifically includes: organizing all the third fused representation vectors into a feature representation matrix; calculating the attention weight of each of the historical sub-schemes based on the feature representation matrix and all the second fused representation vectors; and performing a nonlinear transformation on the feature representation matrix based on the attention weight of each of the historical sub-schemes to generate the overall feature matrix.
[0013] The present invention also provides an emergency plan recommendation device for emergencies, comprising: an acquisition unit, used to acquire multiple historical emergencies and their corresponding historical emergency plans in a case library, and also used to acquire target emergencies; a splitting unit, used to split each of the historical emergencies into multiple historical event features, and also used to split each of the historical emergency plans into multiple historical sub-plans, and also used to split the target emergencies into multiple target event features; a construction unit, used to construct a feature-sub-plan graph, a feature-feature graph, and a sub-plan-sub-plan graph according to all the historical event features and historical sub-plans; an embedding unit, used to input the feature-sub-plan graph, the feature-feature graph, the sub-plan-sub-plan graph, and the knowledge graph into a pre-constructed plan recommendation model, and respectively calculate and obtain a first fusion representation vector corresponding to the historical event feature and a second fusion representation vector corresponding to the historical sub-plan; and also used to select a third fusion representation vector corresponding to each of the target event features from all the first fusion representation vectors; a recommendation unit, used to calculate and obtain a corresponding target sub-plan list based on the third fusion representation vector and use a target recommendation function, and generate a target emergency plan.
[0014] 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.
[0015] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described above are implemented.
[0016] The beneficial effects of the present invention are as follows: the present application provides a method, device, equipment and medium for recommending emergency plans for emergencies. The method comprises the steps of: obtaining multiple historical emergencies and their corresponding historical emergency plans in a case library, and splitting each historical emergency event into multiple historical event features, and splitting each historical emergency plan into multiple historical sub-plans; constructing a feature-sub-plan graph, a feature-feature graph, and a sub-plan-sub-plan graph according to all historical event features and historical sub-plans; inputting the feature-sub-plan graph, the feature-feature graph, the sub-plan-sub-plan graph, and the knowledge graph of facts into a pre-constructed plan recommendation model, and respectively calculating and obtaining the first fusion representation vector corresponding to the historical event feature and the second fusion representation vector corresponding to the historical sub-plan; obtaining a target emergency event, and splitting the target emergency event into multiple target event features, and then inputting them into the plan recommendation model; selecting a third fusion representation vector corresponding to each target event feature from all first fusion representation vectors; and calculating and obtaining a corresponding target sub-plan list according to the third fusion representation vector using a target recommendation function, and generating a target emergency plan. This application decomposes emergencies into feature levels, and emergency plans into sub-plan levels, and deeply explores the global and local information of emergencies and emergency plans from multiple different perspectives, thereby realizing the reuse of event attributes and basic plans. The entity vectors extracted from the knowledge graph are further integrated to enrich the semantics of the model, enhance the association between features and sub-plans, and thus alleviate the sparsity problem of emergencies in the case library, so that regardless of whether the emergency exists in the case library, the corresponding sub-plan can be recommended through the same features after decomposition, and the target emergency plan can be generated. In some unconventional and complex emergency scenarios, this application can still recommend reasonable, accurate and efficient emergency response plans, effectively reducing casualties and property losses, and has strong adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flowchart of a method for recommending an emergency plan for an emergency event in the present application;
[0018] Figure 2 It is a data flow diagram of a method for recommending an emergency plan for an emergency event in the present application;
[0019] Figure 3 It is a schematic diagram of a multi-layer attention convolution operation in a method for recommending an emergency plan for an emergency event in the present application;
[0020] Figure 4 It is a schematic diagram of the composition of a device for recommending an emergency plan for an emergency event in the present application;
[0021] Figure 5 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;
[0022] Figure 6 It is a schematic block diagram of an embodiment of a computer-readable storage medium of 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 a method for recommending an emergency plan for an emergency, comprising the steps of:
[0026] S1: Obtain multiple historical emergencies and their corresponding historical emergency plans in the case library, split each historical emergency event into multiple historical event features, and split each historical emergency plan into multiple historical sub-plans.
[0027] S2: Based on all historical event features and historical sub-schemes, construct feature-sub-scheme graphs, feature-feature graphs, and sub-scheme-sub-scheme graphs respectively.
[0028] S3: Input the feature-sub-plan graph, feature-feature graph, sub-plan-sub-plan graph, and the knowledge graph into the pre-built plan recommendation model, and calculate the first fusion representation vector corresponding to the historical event features and the second fusion representation vector corresponding to the historical sub-plan.
[0029] S4: Obtain a target emergency event, split the target emergency event into multiple target event features, and input them into a solution recommendation model; select a third fusion representation vector corresponding to each target event feature from all first fusion representation vectors.
[0030] S5: According to the third fusion representation vector, using the target recommendation function, calculate and obtain the corresponding target sub-plan list, and generate a target emergency plan.
[0031] This application decomposes emergencies into feature levels, and emergency plans into sub-plan levels, and deeply explores the global and local information of emergencies and emergency plans from multiple different perspectives, thereby realizing the reuse of event attributes and basic plans. The entity vectors extracted from the knowledge graph are further integrated to enrich the semantics of the model, enhance the association between features and sub-plans, and thus alleviate the sparsity problem of emergencies in the case library, so that regardless of whether the emergency exists in the case library, the corresponding sub-plan can be recommended through the same features after decomposition, and the target emergency plan can be generated. In some unconventional and complex emergency scenarios, this application can still recommend reasonable, accurate and efficient emergency response plans, effectively reducing casualties and property losses, and has strong adaptability.
[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 emergency plan recommendation method provided by the embodiment of the present application, which is described in detail as follows:
[0034] S1: Obtain multiple historical emergencies and their corresponding historical emergency plans in the case library, split each historical emergency event into multiple historical event features, and split each historical emergency plan into multiple historical sub-plans.
[0035] The case library records several representative historical emergencies that occurred in the past and their corresponding historical emergency plans. Each historical emergency contains a variety of complex information, such as event type, risk level, involved personnel, location, time, etc., which constitutes multiple different characteristics of historical emergencies.
[0036] Each historical emergency event is divided into multiple historical event features, and each historical emergency plan is divided into multiple historical sub-plans. This can deeply explore the correlation and evolution law between multiple historical event features in historical emergencies; it can also deeply explore the correlation and evolution law between multiple historical sub-plans in historical emergency plans; at the same time, it can also deeply explore the correlation and evolution law between multiple historical event features and corresponding historical sub-plans. This is conducive to alleviating the sparsity problem of the case library, thereby improving the semantic representation of historical emergencies and historical emergency plans.
[0037] In this embodiment, all historical event features can be expressed as A = {a 1 ,a 2 ,...,a M}; All historical sub-schemes can be expressed as T = {t 1 ,t 2 ,...,t N}. Where M represents the number of all historical event features, a 1 ,a 2 ,...,a M Represents the characteristics of each historical event, N represents the number of all historical sub-schemes, t 1 ,t 2 ,...,t N Represents each historical sub-scheme respectively.
[0038] Then any historical emergency event and its corresponding historical emergency plan can be expressed by the following formula:
[0039] q=<as,ts> = <as={a 1 ,a 2 ,...,a k},ts={t 1 ,t 2 ,...,t m}>
[0040] Where as represents a historical emergency, ts represents a historical emergency plan, k represents the number of historical event features in a historical emergency, m represents the number of historical sub-plans in a historical emergency plan, and a 1 ,a 2 ,...,a k Represents the characteristics of each historical event in the historical emergency, t 1 ,t 2 ,...,t m Represents each historical sub-plan in the historical emergency plan.
[0041] S2: Based on all historical event features and historical sub-schemes, construct feature-sub-scheme graphs, feature-feature graphs, and sub-scheme-sub-scheme graphs respectively.
[0042] Specific, combined Figure 2 As shown, according to all the historical event features and historical sub-schemes in S1, as well as the correlation between the historical event features and historical sub-schemes, a feature-sub-scheme diagram is constructed. The feature-sub-scheme diagram includes an environmental situation-sub-scheme diagram 11, a disaster situation-sub-scheme diagram 12, and an accident cause-sub-scheme diagram 13.
[0043] It should be noted that all historical event characteristics can be divided into three categories, namely environmental characteristics, disaster characteristics, and accident cause characteristics. Therefore, any historical emergency event in S1 and its corresponding historical emergency plan can be further expressed by the following formula:
[0044]
[0045] in, Represents each environmental characteristic in a historical emergency event. Represents the characteristics of each disaster situation in a historical emergency event. Represents the characteristics of each accident cause in a historical emergency, t 1 ,t 2 ,...,t m Represents each historical sub-plan in the historical emergency plan, represents the number of environmental conditions characteristic of a historical emergency, Represents the number of disaster characteristics in a historical emergency event, represents the number of accident cause characteristics in a historical emergency event, and m represents the number of historical sub-plans in a historical emergency plan.
[0046] In this embodiment, the environmental situation-sub-scheme diagram 11 represents the relationship between multiple different environmental situation features in each historical emergency event and multiple different historical sub-schemes in the corresponding historical emergency plan, and each two associated environmental situation features and historical sub-schemes are connected by an edge. The environmental situation-sub-scheme diagram 11 can be represented by a set as:
[0047]
[0048] In this embodiment, the disaster situation-sub-plan diagram 12 represents the relationship between multiple different disaster situation characteristics in each historical emergency event and multiple different historical sub-plans in the corresponding historical emergency plan, and each two related disaster situation characteristics and historical sub-plans are connected by an edge. The disaster situation-sub-plan diagram 12 can be represented by a set as:
[0049]
[0050] In this embodiment, the accident cause-sub-scheme diagram 13 represents the relationship between multiple different accident cause characteristics in each historical emergency event and multiple different historical sub-schemes in the corresponding historical emergency plan, and each two associated accident cause characteristics and historical sub-schemes are connected by an edge. The accident cause-sub-scheme diagram 13 can be represented by a set as:
[0051]
[0052] Furthermore, similar to the above, the multiple different environmental characteristics, disaster characteristics, and accident cause characteristics in each historical emergency are also interrelated. Based on all the historical event characteristics and their internal relationships, a feature-feature Figure 2 The different historical sub-plans within each historical emergency plan are also interrelated. Based on all historical sub-plans and their internal relationships, a sub-plan-sub-plan Figure 3 .
[0053] Specifically, to build sub-scheme-sub-scheme Figure 3 For example, the construction method is:
[0054] First, we count the frequency of each two historical sub-plans in the case library appearing in the historical emergency plans corresponding to the same historical emergency event, and obtain the frequency matrix. Secondly, we set the hyperparameter threshold. If the co-occurrence frequency of two historical sub-plans exceeds the hyperparameter threshold, the matrix item of the frequency matrix is set to 1, otherwise it is 0. The above process can be expressed by the following formula:
[0055]
[0056] Among them, t m and t n Each represents one of the historical sub-plans, and TT represents sub-plan-sub-plan Figure 3 , x t Represents the hyperparameter threshold.
[0057] Furthermore, a sub-scheme-sub-scheme is constructed based on the frequency matrix. Figure 3 .
[0058] It should be noted that feature-feature Figure 2 The construction method can refer to the above sub-scheme-sub-scheme Figure 3 The construction method will not be described here.
[0059] S3: Input the feature-sub-plan graph, feature-feature graph, sub-plan-sub-plan graph, and the knowledge graph into the pre-built plan recommendation model, and calculate the first fusion representation vector corresponding to the historical event features and the second fusion representation vector corresponding to the historical sub-plan.
[0060] refer to Figure 2 , Figure 3 As shown, firstly, the first embedding vector h of each historical event feature is calculated by using the feature-sub-scheme graph (i.e., the environmental situation-sub-scheme graph 11, the disaster situation-sub-scheme graph 12, and the accident cause-sub-scheme graph 13). a and the second embedding vector h of the historical sub-scheme t .
[0061] Specifically, a multi-layer attention convolution operation is performed on the environment situation-sub-scheme diagram 11 to generate an environment vector and a first sub-scheme vector respectively; a multi-layer attention convolution operation is performed on the disaster situation-sub-scheme diagram 12 to generate a disaster vector and a second sub-scheme vector respectively; a multi-layer attention convolution operation is performed on the accident cause-sub-scheme diagram 13 to generate an accident vector and a third sub-scheme vector respectively; wherein the multi-layer attention convolution operation includes multi-layer neighbor sampling and attention weighted summation operations. The environment vector, the disaster vector and the accident vector are summed to obtain the first embedding vector h of the historical event feature. a ; Add the first sub-scheme vector, the second sub-scheme vector and the third sub-scheme vector to obtain the second embedding vector h of the historical sub-scheme t .
[0062] In this embodiment, the environment situation-sub-scheme diagram 11 is taken as an example. First, the first-layer neighbor sampling is performed to obtain the information transmitted by its first-order neighbors, which is expressed by the following formula:
[0063]
[0064] in, represents the information transmitted by the first-order neighbors, e t represents the initial vector of one of the historical sub-schemes t in the environmental situation-sub-scheme Figure 11, represents the weight transformation matrix of the first layer, ET represents the environmental situation-sub-scheme Figure 11, 0 represents the first layer, a e Represents the environmental situation characteristics in the environmental situation-sub-scheme Figure 11.
[0065] Furthermore, the attention weighted summation operation is used to merge the information transmitted by its first-order neighbors, which can be expressed as follows:
[0066]
[0067]
[0068] in, represents the information transmitted by the first-order neighbors, Represents the information of all neighbors in the first layer, Represents a e The first layer of neighbors, tanh represents the activation function, w(a e ,t) represents the weight, Represents e t exp represents the natural exponential function.
[0069] Further, the representation vector of the first layer of the environmental situation feature in the environmental situation-sub-scheme Figure 11 is updated:
[0070]
[0071] in, represents the representation vector of the environmental situation features of the first layer, || represents the concatenation operation, represents the aggregation parameter matrix of the first layer, Represents the information of all neighbors in the first layer.
[0072] By analogy, the k-th layer representation vector of the environmental situation feature in the environmental situation-sub-scheme Figure 11 is updated:
[0073]
[0074] in, The representation vector representing the environmental situation characteristics of the kth layer, represents the aggregation parameter matrix of the kth layer, The representation vector representing the environmental situation characteristics of the k-1th layer, Represents the information of all neighbors in the kth layer.
[0075] Through the above calculation method, the environment vector corresponding to the environment condition-sub-scheme diagram 11 (i.e., the representation vector of the last layer of the environment condition feature) can be obtained. Referring to the above method, the first sub-scheme vector corresponding to the environment condition-sub-scheme diagram 11, the disaster vector and the second sub-scheme vector corresponding to the disaster condition-sub-scheme diagram 12, and the accident vector and the third sub-scheme vector corresponding to the accident cause-sub-scheme diagram 13 can be obtained by the same logic. The specific calculation steps will not be repeated here.
[0076] Furthermore, the environment vector, the disaster vector and the accident vector are summed to obtain the first embedding vector h of the historical event feature. a ; Add the first sub-scheme vector, the second sub-scheme vector and the third sub-scheme vector to obtain the second embedding vector h of the historical sub-scheme t The above process is expressed by the following formula:
[0077]
[0078] Among them, h a The first embedding vector representing the characteristics of historical events, represents the environment vector, represents the disaster vector, represents the accident vector, h t The second embedding vector representing the historical sub-scheme, represents the first sub-scheme vector, represents the second sub-scheme vector, Represents the third sub-scheme vector, L 1 , L 2 , and L 3 They represent the graph convolution depths of the environmental situation-sub-plan Figure 11, the disaster situation-sub-plan Figure 12, and the accident cause-sub-plan Figure 13 respectively.
[0079] Furthermore, using feature-feature Figure 2 , calculate the third embedding vector s of each historical event feature a ; Using sub-scheme-sub-scheme Figure 3 , calculate the fourth embedding vector s of each historical sub-scheme t .
[0080] Specifically, feature-feature Figure 2 , Sub-scheme-Sub-scheme Figure 3 Perform a single-layer graph attention convolution operation to obtain the third embedding vector s of each historical event feature a and the fourth embedding vector s for each historical sub-scheme t The above process is expressed by the following formula:
[0081]
[0082] Among them, s a The third embedding vector representing the features of historical events, w(a,p) represents feature-feature Figure 2 The weight of p Representative features-features Figure 2 The initial vector of historical event features in , Representative features-features Figure 2The neighbor set of historical event feature a, s t represents the fourth embedding vector of the historical sub-plan, w(t,k) represents the sub-plan-sub-plan Figure 3 The weight of k Representative sub-scheme-sub-scheme Figure 3 The initial vector of the historical sub-scheme in , Representative sub-scheme-sub-scheme Figure 3 The neighbor set of the historical sub-scheme t, V a and V t Represents feature-feature Figure 2 and sub-scheme-sub-scheme Figure 3 The weight parameters of the graph attention network.
[0083] Furthermore, the first entity vector of each historical event feature and the second entity vector of each historical sub-scheme are extracted from the rational knowledge graph 4.
[0084] Among them, the event knowledge graph 4 describes the complex relationship between historical event features and historical sub-schemes, and includes multiple relationship types, such as rescue role, personnel deployment requirements, event description, implementation details, etc. This application uses the TransE method to extract the first entity vector l of each historical event feature respectively. a and the second entity vector l of each historical sub-scheme t .
[0085] In this embodiment, the knowledge graph 4 is an emergency handling operation knowledge graph.
[0086]
[0087] The emergency processing knowledge graph covers the standard process of emergency decision-making operations and the steps for handling various accidents, which is conducive to enhancing the correlation between historical event characteristics and historical sub-plans, thereby alleviating the sparsity of the case library.
[0088] Furthermore, the first embedding vector, the third embedding vector and the first entity vector of each historical event feature are fused to generate the first fused representation vector of the historical event feature; the second embedding vector, the fourth embedding vector and the second entity vector of each historical sub-scheme are fused to generate the second fused representation vector of the historical sub-scheme. The above process is expressed by the following formula:
[0089]
[0090] Among them, h a The first embedding vector representing the characteristics of historical events, h t The second embedding vector representing the historical sub-scheme, s a The third embedding vector representing the characteristics of historical events, st The fourth embedding vector representing the historical sub-scheme, l a The first entity vector representing the characteristics of historical events, l t The second entity vector representing the historical sub-scheme, represents the first fusion representation vector, Represents the second fusion representation vector, Z a Representatives will a Mapped to h a and a In a consistent dimensional space, Z t Representatives will t Mapped to h t and t in a consistent dimensional space.
[0091] S4: Obtain a target emergency event, split the target emergency event into multiple target event features, and input them into a solution recommendation model; select a third fusion representation vector corresponding to each target event feature from all first fusion representation vectors.
[0092] Obtain the target emergency event, and split the target emergency event into multiple target event features according to the method in S1, and input them into the trained solution recommendation model.
[0093] Find the historical event features that are the same as the target event features, find the first fused representation vector of the same historical event features from the first fused representation vectors of all historical event features obtained in S3, and use it as the third fused representation vector corresponding to the target event features.
[0094] S5: According to the third fusion representation vector, using the target recommendation function, calculate and obtain the corresponding target sub-plan list, and generate a target emergency plan.
[0095] Combination Figure 2 As shown, according to all the third fusion representation vectors, and all the second fusion representation vectors The overall feature matrix 5 of all target event features for all historical sub-schemes is calculated.
[0096] Specifically, all the third fusion representation vectors are organized into a feature representation matrix 7. According to the feature representation matrix 7 and all the second fusion representation vectors The attention weight of each historical sub-scheme is calculated. According to the attention weight of each historical sub-scheme, the feature representation matrix 7 is nonlinearly transformed to generate the overall feature matrix 5. The above method can be expressed by the following formula:
[0097]
[0098] Among them, π t represents the attention weight of historical sub-scheme t, e as represents the feature representation matrix 7, represent The transpose operation, e feature (as,t) represents the overall feature matrix of all target event features for historical sub-scheme t, then the overall feature matrix of all target event features for all historical sub-schemes is expressed as e feature (as),π′ t Represents π t D copies are made, softmax represents the normalized exponential function, ReLU represents the nonlinear activation function, 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.
[0099] Furthermore, the second fusion representation vector of all historical sub-schemes Organized as a scheme representation matrix6.
[0100] Furthermore, according to the overall feature matrix 5 and the solution representation matrix 6, the target recommendation function is used to calculate and obtain the probability vector corresponding to each historical sub-solution.
[0101] In this embodiment, the target recommendation function is expressed as:
[0102]
[0103] Among them, f(as,T) represents the probability vector calculated by the target recommendation function, sigmoid represents normalization, rowsum represents the row summation operation, and e feature (as) represents the overall feature matrix 5, Representative scheme representation matrix 6.
[0104] Furthermore, according to all probability vectors, selection is made from all historical sub-plans, and a target sub-plan list is generated.
[0105] Specifically, all probability vectors are arranged from high to low, and the historical sub-plans corresponding to the first K probability vectors are selected as the target sub-plan list. And based on the target sub-plan list, the final target emergency plan is generated. Among them, the value range of K is [1, N).
[0106] In summary, taking the following Table 1 as an example, Table 1 shows a case of a target emergency in the fire protection field.
[0107] Table 1
[0108]
[0109] According to the target emergency, the solution recommendation model of this application recommends the corresponding target sub-solution list. Not only is the recommendation process fast and efficient, but the target emergency plan finally adopted is also reasonable and accurate, effectively reducing casualties and property losses.
[0110] It should be noted that the solution recommendation model of this application is obtained by training the case library and the target loss function, and the target loss function is expressed as:
[0111]
[0112] Among them, Loss represents the target loss function, argmin represents the minimum value, WMSE represents the weighted mean square loss, and λ θ represents a constant parameter, θ represents a set of trainable parameters, ts′ represents a multi-hot vector corresponding to historical emergency plans, as represents historical emergencies, f(as,T) represents a probability vector, and Q represents a set of real numbers.
[0113] Corresponding to the emergency plan recommendation method in the above embodiment, Figure 4 A schematic diagram of the composition of an emergency plan recommendation 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.
[0114] refer to Figure 4 The recommended device for the emergency plan includes:
[0115] The acquisition unit 101 is used to acquire a plurality of historical emergency events and their corresponding historical emergency plans in the case library, and is also used to acquire a target emergency event.
[0116] The splitting unit 102 is used to split each historical emergency event into a plurality of historical event features, to split each historical emergency plan into a plurality of historical sub-plans, and to split a target emergency event into a plurality of target event features.
[0117] The construction unit 103 is used to construct a feature-sub-scheme graph, a feature-feature graph, and a sub-scheme-sub-scheme graph according to all historical event features and historical sub-schemes.
[0118] The embedding unit 104 is used to input the feature-sub-scheme graph, the feature-feature graph, the sub-scheme-sub-scheme graph, and the knowledge graph into the pre-built solution recommendation model, and respectively calculate the first fusion representation vector corresponding to the historical event feature and the second fusion representation vector corresponding to the historical sub-scheme; it is also used to select the third fusion representation vector corresponding to each target event feature from all the first fusion representation vectors.
[0119] The recommendation unit 105 is used to calculate and obtain a corresponding target sub-plan list according to the third fusion representation vector using the target recommendation function, and generate a target emergency plan.
[0120] It should be noted that since the above-mentioned emergency plan recommendation 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 emergency plan recommendation method, and will not be repeated here.
[0121] 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 emergency plan recommendation method.
[0122] See also Figure 5 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.
[0123] 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.
[0124] 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.
[0125] 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.
[0126] 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.
[0127] 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.
[0128] 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.
[0129] 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).
[0130] 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.
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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.
[0135] 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.
[0136] Based on the same inventive concept, the present application also provides a computer-readable storage medium storing a computer program, which can be executed by a processor to implement the above-mentioned emergency plan recommendation method.
[0137] See also Figure 6 , if the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium 300. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions / computer programs to enable an IoT device (which can be a personal computer, server, or network terminal, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks or optical disks, and electronic terminals such as computers, mobile phones, laptops, tablet computers, cameras, etc. having the above-mentioned storage media.
[0138] The description of the execution process of the program data in the computer-readable storage medium can refer to the description in the above-mentioned method embodiments of the present application, and will not be repeated here.
[0139] It can be seen that the present invention discloses a method, device, equipment and medium for recommending emergency plans for emergencies. The method includes the steps of: obtaining multiple historical emergencies and their corresponding historical emergency plans in a case library, splitting each historical emergency event into multiple historical event features, and splitting each historical emergency plan into multiple historical sub-plans; constructing a feature-sub-plan graph, a feature-feature graph, and a sub-plan-sub-plan graph according to all historical event features and historical sub-plans; inputting the feature-sub-plan graph, the feature-feature graph, the sub-plan-sub-plan graph, and the knowledge graph of facts into a pre-constructed plan recommendation model, and respectively calculating and obtaining the first fusion representation vector corresponding to the historical event feature and the second fusion representation vector corresponding to the historical sub-plan; obtaining a target emergency event, and splitting the target emergency event into multiple target event features, and then inputting them into the plan recommendation model; selecting a third fusion representation vector corresponding to each target event feature from all the first fusion representation vectors; and calculating and obtaining a corresponding target sub-plan list according to the third fusion representation vector using a target recommendation function, and generating a target emergency plan. This application decomposes emergencies into feature levels, and emergency plans into sub-plan levels, and deeply explores the global and local information of emergencies and emergency plans from multiple different perspectives, thereby realizing the reuse of event attributes and basic plans. The entity vectors extracted from the knowledge graph are further integrated to enrich the semantics of the model, enhance the association between features and sub-plans, and thus alleviate the sparsity problem of emergencies in the case library, so that regardless of whether the emergency exists in the case library, the corresponding sub-plan can be recommended through the same features after decomposition, and the target emergency plan can be generated. In some unconventional and complex emergency scenarios, this application can still recommend reasonable, accurate and efficient emergency response plans, effectively reducing casualties and property losses, and has strong adaptability.
[0140] 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 recommending emergency plans for emergencies, characterized in that: Includes steps: Acquire multiple historical emergencies and their corresponding historical emergency plans in the case library, split each of the historical emergencies into multiple historical event features, and split each of the historical emergency plans into multiple historical sub-plans; According to all the historical event features and historical sub-schemes, construct a feature-sub-scheme graph, a feature-feature graph, and a sub-scheme-sub-scheme graph respectively; Input the feature-sub-scheme graph, feature-feature graph, sub-scheme-sub-scheme graph, and the knowledge graph of facts into a pre-built scheme recommendation model, and respectively calculate and obtain a first fused representation vector corresponding to the historical event feature and a second fused representation vector corresponding to the historical sub-scheme; Obtain a target emergency event, split the target emergency event into multiple target event features, and input them into the solution recommendation model; select a third fusion representation vector corresponding to each target event feature from all the first fusion representation vectors; According to the third fusion representation vector, using the target recommendation function, a corresponding target sub-plan list is calculated and a target emergency plan is generated.
2. The method for recommending an emergency plan according to claim 1, characterized in that: The step of constructing a feature-sub-scheme graph, a feature-feature graph, and a sub-scheme-sub-scheme graph respectively according to all the historical event features and historical sub-schemes specifically includes: According to all the historical event characteristics and historical sub-schemes, and the associations between the historical event characteristics and historical sub-schemes, the characteristic-sub-scheme graph is constructed; wherein the characteristic-sub-scheme graph includes an environmental condition-sub-scheme graph, a disaster condition-sub-scheme graph, and an accident cause-sub-scheme graph; Constructing the feature-feature graph according to all the historical event features and their internal relations; The sub-scheme-sub-scheme graph is constructed based on all the historical sub-schemes and their internal relationships.
3. The method for recommending an emergency plan according to claim 1, characterized in that: The step of inputting the feature-sub-scheme graph, feature-feature graph, sub-scheme-sub-scheme graph, and event knowledge graph into a pre-built scheme recommendation model, and respectively calculating and obtaining a first fused representation vector corresponding to the historical event feature and a second fused representation vector corresponding to the historical sub-scheme, specifically includes: Using the feature-sub-scheme graph, respectively calculating and obtaining a first embedding vector of each of the historical event features and a second embedding vector of each of the historical sub-schemes; Using the feature-feature graph, calculate and obtain a third embedding vector of each of the historical event features; Using the sub-scheme-sub-scheme graph, calculating and obtaining a fourth embedding vector of each of the historical sub-schemes; Extracting the first entity vector of each of the historical event features and the second entity vector of each of the historical sub-schemes from the knowledge graph; The first embedding vector, the third embedding vector and the first entity vector of each of the historical event features are fused to generate the first fused representation vector; the second embedding vector, the fourth embedding vector and the second entity vector of each of the historical sub-schemes are fused to generate the second fused representation vector.
4. The method for recommending an emergency plan according to claim 3, characterized in that: The step of using the feature-sub-scheme graph to respectively calculate and obtain a first embedding vector for each of the historical event features and a second embedding vector for each of the historical sub-schemes specifically includes: The feature-sub-scheme diagram includes an environmental condition-sub-scheme diagram, a disaster condition-sub-scheme diagram and an accident cause-sub-scheme diagram; Performing a multi-layer attention convolution operation on the environment situation-sub-scheme graph to generate an environment vector and a first sub-scheme vector respectively; Performing a multi-layer attention convolution operation on the disaster situation-sub-scheme graph to generate a disaster vector and a second sub-scheme vector respectively; Performing a multi-layer attention convolution operation on the accident cause-sub-scheme graph to generate an accident vector and a third sub-scheme vector respectively; The environment vector, the disaster vector and the accident vector are summed to obtain the first embedding vector; the first sub-scheme vector, the second sub-scheme vector and the third sub-scheme vector are summed to obtain the second embedding vector.
5. The method for recommending an emergency plan according to claim 4, characterized in that: The multi-layer attention convolution operation includes multi-layer neighbor sampling and attention weighted summation operations.
6. The method for recommending an emergency plan according to claim 1, characterized in that: The step of calculating and obtaining a corresponding target sub-scheme list according to the third fused representation vector by using a target recommendation function specifically includes: According to all the third fused representation vectors and all the second fused representation vectors, an overall feature matrix of all the target event features for all the historical sub-schemes is calculated; Organizing all the second fusion representation vectors into a solution representation matrix; According to the overall feature matrix and the solution representation matrix, using the target recommendation function, a probability vector corresponding to each of the historical sub-solutions is calculated; According to all the probability vectors, selection is made from all the historical sub-schemes, and the target sub-scheme list is generated.
7. The method for recommending an emergency plan according to claim 6, characterized in that: The step of calculating and obtaining the overall feature matrix of all the target event features for all the historical sub-schemes according to all the third fused representation vectors and all the second fused representation vectors specifically includes: Organizing all of the third fused representation vectors into a feature representation matrix; According to the feature representation matrix and all the second fusion representation vectors, calculating the attention weight of each of the historical sub-schemes; According to the attention weight of each of the historical sub-schemes, the feature representation matrix is nonlinearly transformed to generate the overall feature matrix.
8. A device for recommending emergency plans for emergencies, characterized in that: include: An acquisition unit, used to acquire multiple historical emergencies and their corresponding historical emergency plans in the case library, and also used to acquire target emergencies; A splitting unit, used to split each of the historical emergency events into a plurality of historical event features, and also used to split each of the historical emergency plans into a plurality of historical sub-plans, and also used to split the target emergency event into a plurality of target event features; A construction unit, used to construct a feature-sub-scheme graph, a feature-feature graph, and a sub-scheme-sub-scheme graph according to all the historical event features and historical sub-schemes; The embedding unit is used to input the feature-sub-scheme graph, feature-feature graph, sub-scheme-sub-scheme graph, and the knowledge graph into the pre-built solution recommendation model, and respectively calculate the first fusion representation vector corresponding to the historical event feature and the second fusion representation vector corresponding to the historical sub-scheme; and is also used to select the third fusion representation vector corresponding to each target event feature from all the first fusion representation vectors; The recommendation unit is used to calculate and obtain a corresponding target sub-plan list based on the third fusion representation vector and use the target recommendation function, and generate a target emergency plan.
9. 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 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.