Disaster factor similarity calculation method based on Siamese-XLNet network

Through the similarity calculation method of disaster factors based on Siamese-XLNet network, the problems of commonality and high calculation cost of disaster factors are solved, and the standardization, unified description and efficient calculation of disaster factors are realized.

CN119415966APending Publication Date: 2025-02-11BEIJING INFORMATION SCI & TECH UNIV +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411451617.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

It is difficult for the prior art to achieve the universality, standardization and unified description of multiple disaster factors of disaster factors, and the accuracy of natural language similarity calculation is positively correlated with computing power resources, resulting in high computing costs.

Method used

The similarity calculation method of disaster factors based on Siamese-XLNet network is adopted, and the similarity of disaster factors is calculated by building a twin network, using disaster factors to update the network weights, and combining word vector embedding and pooling operations.

Benefits of technology

The universality of the calculation of similarity of multiple disaster factors has been achieved, the calculation accuracy and efficiency have been improved, the computing power cost has been reduced, and the standardization and unified description of disaster factors has been provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415966A_ABST
    Figure CN119415966A_ABST
Patent Text Reader

Abstract

The invention provides a disaster factor similarity calculation method based on a Siamese-XLNet network, and the method comprises the specific steps: 1, extracting disaster factors from a disaster rescue report, and building a disaster factor set; step 2, constructing a twin network based on the Siamese-XLNet; step 3, using disaster factors to update twin network weight parameters; 4, calling word vectors of disaster factors from the updated twin network; and 5, inputting the word vectors of the disaster factors into the Softmax function of the neural network for normalization processing, and obtaining the similarity probability of the two factors as the similarity of the two factors. The method can be suitable for similarity calculation of disaster factors of multiple disaster types, and has generality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of artificial intelligence, and in particular relates to a disaster factor similarity calculation method based on a Siamese-XLNet network. Background Art

[0002] With global climate change, extreme weather events are frequent, causing serious loss of life and property. In recent years, extreme weather disasters have become a hot topic in academic research, especially the complex coupling relationship between disaster factors and the evolution mechanism of events, involving disciplines such as disaster science, safety engineering, and informatics. Disasters are a giant complex system, and their disaster factors have the characteristics of multiple types, multiple objects, and multiple couplings. The main way to analyze their coupling relationships and evolution mechanisms is to manually extract source data from emergency rescue reports and then conduct mechanism modeling. Since report writing and element extraction are all done manually, the subjectivity of manual labor and language usage habits will cause problems such as non-standard and non-uniform source data, which will become interference noise for downstream tasks. Therefore, solving the standardization and unification of disaster factor source data from the perspective of semantic similarity is the basic requirement for realizing mechanism modeling.

[0003] Disaster factors are unstructured data, and their standardization is mainly based on natural language processing technology. In the existing research on disaster mechanisms, the normative description of disaster factors is relatively weak. This is because: ① Disaster science belongs to a multidisciplinary cross-field, and different fields have different descriptions of the same object; ② Although some disasters have formulated national standards for disaster factors, there is still a lack of unified top-level design and they are not universal for multiple disasters; ③ The polysemy and heteronymy of the Chinese language increase the subjective color of the description of disaster factors, affecting the standardized description. To solve the above problems, theories and methods such as formal concept analysis, artificial intelligence, and language functionalism have been applied to the unified description of disaster factors. Formal concept analysis first requires the establishment of a knowledge system manually, and a concept grid is constructed on the basis of this system. Although the alignment problem of risk factors in different fields is solved, the subjective understanding of researchers in the whole process still affects the objectivity of the unified description of disaster factors, and there is also a lack of unified alignment reference basis. Artificial intelligence technology is widely used in natural language processing in general fields, but disaster factors correspond to different disasters and belong to a small range of professional fields. The existing general semantic similarity calculation network model is difficult to have the generalization ability of multiple disasters. Functional language first requires manual coding of contextual semantics, and the establishment of coding rules is difficult and requires a lot of manual work. Therefore, in the absence of a unified top-level design, it is crucial to study a universal method for calculating the similarity of disaster factors and to achieve the standardization and unified description of disaster factors.

[0004] In addition, the accuracy of natural language similarity calculation is positively correlated with computing resources, especially when the text size is large, this contradiction is quite prominent. Therefore, under the condition of ensuring a certain degree of similarity calculation accuracy, not increasing computing power costs is a problem that needs to be solved in disaster factor similarity calculation. Summary of the invention

[0005] The purpose of the present invention is to solve the problems in the prior art and propose a disaster factor similarity calculation method based on Siamese-XLNet network. The method can be applied to the disaster factor similarity calculation of multiple disasters and has generality.

[0006] The present invention is implemented by the following technical scheme. The present invention proposes a disaster factor similarity calculation method based on the Siamese-XLNet network. The specific steps of the method are:

[0007] Step 1: Extract disaster factors from disaster relief reports and establish a disaster factor set;

[0008] Step 2: Build a twin network based on Siamese-XLNet;

[0009] Step 3: Use disaster factors to update the weight parameters of the twin network;

[0010] Step 4: Call the word vector of the disaster factor from the updated twin network;

[0011] Step 5: Input the word vector of the disaster factor into the Softmax function of the neural network for normalization, and obtain the similarity probability of the two factors as the similarity of the two factors.

[0012] Furthermore, in step one, disaster factors are manually extracted to form a set according to the classification principle of "people-land-things-objects-organizations".

[0013] Furthermore, in the Siamese-XLNet-based twin network, the two word vector encodings use the same XLNet, and a pooling operation is added afterwards to output word vectors of the same size. The word vectors output by XLNet are feature extracted and compressed through the pooling operation to obtain u and v, and u and v are combined in the form of |uv|. Finally, the Softmax function is used to calculate the similarity.

[0014] Furthermore, the pooling operation realizes outputting word vectors of the same size by adopting the MAX-strategy strategy to obtain the maximum value of all output word vectors.

[0015] Furthermore, in step three, element-wise difference |uv| is used to combine u and v, multiplied by the trainable weight matrix W, and the multiplication result is sent to the softmax classifier to calculate the normalized probability of disaster factors corresponding to different semantics as the output of the similarity calculation result, and the output similarity calculation result is compared with the true value, and the cross entropy is used as the loss function to update the weight of the twin network.

[0016] Furthermore, in step 4, the disaster factor word vector with the same dimension is retrieved from the pooling layer in step 3.

[0017] Furthermore, in step five, the disaster factor word vector in step four is sent to the softmaxt function to obtain the similarity value of the two factors, and the disaster factors greater than a certain set threshold are merged into one category for standardized unified description.

[0018] Compared with the prior art, the present invention has the following advantages:

[0019] The present invention provides a new solution for the standardized and unified description of disaster factors. Compared with the existing inventions, the innovations are as follows: it proposes to apply the word vector embedding model to word vector embedding, and uses the twin network structure to compare the similarity of two word vectors, thereby improving the calculation accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.

[0021] Figure 1 It is a schematic diagram of the process of calculating the similarity of disaster factors based on the Siamese-XLNet network of the present invention;

[0022] Figure 2 Schematic diagram of the Siamese-XLNet network structure of the present invention. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] See also Figure 1-Figure 2,This paper proposes a disaster factor similarity calculation method based on Siamese-XLNet network, Figure 1 The flowchart of the disaster factor similarity calculation method based on the Siamese-XLNet network provided by the present invention is shown, and the specific steps of the method are:

[0025] Step 1: Extract disaster factors from disaster relief reports and establish a disaster factor set;

[0026] In step one, taking water transportation disasters as an example, disaster emergency rescue cases are collected, and disaster factors are manually extracted to form a set according to the classification principle of "people-land-things-organization".

[0027] Step 2: Build a twin network based on Siamese-XLNet;

[0028] Siamese-XLNet follows the structure of the twin network. In the twin network based on Siamese-XLNet, the two word vectors are encoded using the same XLNet, and a pooling operation is added afterwards to output word vectors of the same size. The word vectors output by XLNet are feature extracted and compressed through the pooling operation to obtain u and v, and u and v are combined in the form of |uv|, and finally the Softmax function is used for similarity calculation. The pooling operation is specifically implemented by outputting word vectors of the same size by using the MAX-strategy strategy to obtain the maximum value of all output word vectors.

[0029] Step 3: Use disaster factors to update the weight parameters of the twin network;

[0030] The similarity calculation of disaster factors is essentially a classification task. In step 3, element-wise difference |uv| is used to combine u and v, multiplied by the trainable weight matrix W, and the multiplication result is sent to the softmax classifier to calculate the normalized probability corresponding to disaster factors with different semantics as the output of the similarity calculation result. The output similarity calculation result is compared with the true value, and the cross entropy is used as the loss function to update the weight of the twin network.

[0031] Step 4: Call the word vector of the disaster factor from the updated twin network;

[0032] In step 4, the disaster factor word vector with consistent dimension is retrieved from the pooling layer in step 3.

[0033] Step 5: Input the word vector of the disaster factor into the Softmax function of the neural network for normalization, and obtain the similarity probability of the two factors as the similarity of the two factors.

[0034] In step five, the disaster factor word vector in step four is sent to the softmaxt function to obtain the similarity value of the two factors, and the disaster factors greater than a certain set threshold are merged into one category for standardized unified description.

[0035] The above is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent replacement and improvement made to the above embodiments without departing from the content of the technical solution of the present invention, based on the technical essence of the present invention, within the spirit and principles of the present invention, still fall within the protection scope of the technical solution of the present invention.

Claims

1. A disaster factor similarity calculation method based on Siamese-XLNet network is characterized by: The specific steps of the method are: Step 1: Extract disaster factors from disaster relief reports and establish a disaster factor set; Step 2: Build a twin network based on Siamese-XLNet; Step 3: Use disaster factors to update the weight parameters of the twin network; Step 4: Call the word vector of the disaster factor from the updated twin network; Step 5: Input the word vector of the disaster factor into the Softmax function of the neural network for normalization, and obtain the similarity probability of the two factors as the similarity of the two factors.

2. The method according to claim 1, characterized in that: In step one, disaster factors are manually extracted to form a set according to the classification principle of "people-land-things-objects-organizations".

3. The method according to claim 2, characterized in that: In the Siamese-XLNet-based twin network, the two word vector encodings use the same XLNet, and a pooling operation is added afterwards to output word vectors of the same size. The word vectors output by XLNet are feature extracted and compressed through the pooling operation to obtain u and v, and u and v are combined in the form of |uv|. Finally, the Softmax function is used to calculate the similarity.

4. The method according to claim 3, characterized in that: The pooling operation is implemented to output word vectors of the same size by using the MAX-strategy to obtain the maximum value of all output word vectors.

5. The method according to claim 3, characterized in that: In step three, element-wise difference |uv| is used to combine u and v, multiplied by the trainable weight matrix W, and the multiplication result is sent to the softmax classifier to calculate the normalized probability of disaster factors corresponding to different semantics as the output of the similarity calculation result. The output similarity calculation result is compared with the true value, and the cross entropy is used as the loss function to update the weight of the twin network.

6. The method according to claim 5, characterized in that: In step 4, the disaster factor word vector with consistent dimension is retrieved from the pooling layer in step 3.

7. The method according to claim 6, characterized in that: In step five, the disaster factor word vector in step four is sent to the softmaxt function to obtain the similarity value of the two factors, and the disaster factors greater than a certain set threshold are merged into one category for standardized unified description.