Earthquake disaster early warning method and system

By using the XGBoost earthquake disaster warning model to process historical and real-time earthquake data, the problem that existing systems are difficult to process high-dimensional earthquake feature information is solved, more accurate and rapid earthquake disaster warning is achieved, and personnel and property safety guarantees are improved.

CN120183146AInactive Publication Date: 2025-06-20WUJI TECHNOLOGY DEVELOPMENT (HEBEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510277809.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-06-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing earthquake early warning system is difficult to quickly and accurately process high-dimensional seismic characteristic information, and there are shortcomings in the safety of people's lives and property.

Method used

The XGBoost earthquake disaster warning model is used to obtain historical seismic source sample data for training, and combine real-time earthquake observation data for prediction to determine the degree of earthquake disaster risk.

Benefits of technology

It realizes the rapid and accurate processing of high-dimensional earthquake characteristic information, improves the accuracy and timeliness of earthquake disaster warnings, and enhances the protection of people's lives and property safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120183146A_ABST
    Figure CN120183146A_ABST
Patent Text Reader

Abstract

The invention provides an earthquake disaster early warning method and system, and the method comprises the steps: obtaining the sample data of a historical seismic source, and enabling the sample data to comprise sample input data and a true value; inputting the sample data into a pre-trained XGBoost earthquake disaster early warning model for training, and obtaining a trained XGBoost earthquake disaster early warning model; acquiring parameter data of a to-be-measured seismic source in real time through a ground seismic observation station, and inputting the parameter data of the to-be-measured seismic source into the trained XGBoost seismic disaster early warning model to obtain the amplitude of the seismic oscillation acceleration of the to-be-measured seismic source along with the periodic change of the building; and determining the earthquake disaster danger degree according to the amplitude of the earthquake motion acceleration of the to-be-measured seismic source changing along with the period of the building. According to the method and the system, high-dimensional seismic feature information can be quickly and accurately processed while the lives and properties of people are emphasized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of earthquake early warning, and in particular relates to an earthquake disaster early warning method and system. Background Art

[0002] Earthquake is one of the most destructive natural disasters. As an effective earthquake prevention and disaster prevention tool, earthquake early warning system has always been the focus of human research. At present, most earthquake early warning systems use traditional fitting regression methods to process earthquake characteristic information. This technical solution can show the warning effect more intuitively, but it is limited to low-dimensional information that conforms to linear distribution and cannot process high-dimensional earthquake characteristic information. With the continuous advancement of earthquake monitoring technology, when an earthquake occurs, the types of earthquake characteristic information obtained by the earthquake early warning system are increasing. At the same time, it also puts forward higher requirements on whether the existing earthquake early warning system can obtain warning information faster and more accurately. In addition, since the greatest harm caused by earthquakes is the harm to people's lives and property, this also points out to the existing earthquake early warning system that the warning system must not only be more accurate and faster, but also take into account the lives and property of the guardians. Therefore, there is an urgent need for an early warning method that can process a variety of earthquake disaster characteristic information to solve the above problems. Summary of the invention

[0003] In view of this, the present invention provides an earthquake disaster early warning method and system, which can focus on the lives and properties of people while taking into account the rapid and accurate processing of high-dimensional earthquake characteristic information.

[0004] An embodiment of the present invention provides an earthquake disaster early warning method, comprising: Step S1: Obtain sample data of historical earthquake sources, the sample data includes sample input data and true values, the sample input data includes: earthquake source magnitude, earthquake source depth, earthquake source distance, earthquake source equivalent shear wave velocity, earthquake source observation station altitude and seismic peak acceleration, and the true value includes the amplitude of seismic acceleration changing with the building period; Step S2: inputting the sample data into the pre-trained XGBoost earthquake disaster early warning model for training to obtain a trained XGBoost earthquake disaster early warning model; Step S3: Acquire parameter data of the earthquake source to be measured in real time through the ground seismic observation station, input the parameter data of the earthquake source to be measured into the trained XGBoost earthquake disaster early warning model to obtain the amplitude of the seismic acceleration of the earthquake source to be measured that changes with the building period, and determine the earthquake disaster risk level according to the amplitude of the seismic acceleration of the earthquake source to be measured that changes with the building period; wherein the parameter data of the earthquake source to be measured include: magnitude of the earthquake source to be measured, depth of the earthquake source to be measured, distance from the earthquake source to be measured, equivalent shear wave velocity of the earthquake source to be measured, altitude of the observation station of the earthquake source to be measured, and peak seismic acceleration.

[0005] Optionally, the hyperparameters of the XGBoost earthquake disaster warning model include the learning rate, the minimum number of samples required for a given model, the maximum depth of the decision tree, the loss function required for a given model, the ratio of the training data set to the test data set, the ratio of randomly sampling features when building a tree, and the regularization term.

[0006] Optionally, inputting the sample data into a pre-trained XGBoost earthquake disaster warning model for training includes: If the signal-to-noise ratio of the sample data is greater than a first threshold, select the feature data of the pre-trained XGBoost earthquake disaster warning model based on a first method; the first method is a method based on the Gini coefficient; If the similarity of the feature distribution of the sample data is less than a first similarity, select the feature data of the pre-trained XGBoost earthquake disaster warning model based on a second method; the second method is a method based on information gain, and the similarity of the feature distribution is obtained by calculating the information entropy of each feature.

[0007] Optionally, a method for earthquake disaster warning provided by an embodiment of the present invention further includes quantitatively evaluating the predicted value of the XGBoost earthquake disaster warning model by using the SHAP model, analyzing the SHAP value of each feature value in the input sample, and the SHAP value represents the contribution of each feature to the predicted value.

[0008] Optionally, a method for earthquake disaster warning provided by an embodiment of the present invention further includes preprocessing the training data set by using the MCMC algorithm with an adaptive step size, and the specific steps are as follows: Step S21: Read the i th feature vector x i from the training data set and calculate the predicted value corresponding to the i th feature vector x i by using the predicted value function of the XGBoost earthquake disaster warning model; y i , i and the initial value of is 1; i Step S22: Calculate the likelihood probability x i of the predicted value being y i while the P ( y i | x i ) in the training data set; Step S23: Use the normal distribution to give a random step size x i+1 =x i +△ x Generate the (i + 1)-th feature vector x i+1 and calculate the i (i + 1)-th feature vector x i+1 using the prediction value function of the XGBoost earthquake disaster warning model y i+1 ; △ x obeys a normal random distribution in the value interval [-1, 1]; Step S24: Calculate the likelihood probability i+1 of the given x i+1 (i + 1)-th feature vector y i+1 in the training dataset when the prediction value is P ( y i+1 | x i+1 ); Step S25: Determine whether P ( y i+1 | x i+1 ) is greater than P ( y i | x i ). If so, incorporate x i+1 and y i+1 into the training dataset. Otherwise, set x i+1 = x i , y i+1 = y i and incorporate them into the training dataset; Step S26: Let i = i + 1 and determine whether i is equal to the preset threshold. If so, exit. Otherwise, return to step 21.

[0009] Optionally, the prediction value function of the XGBoost earthquake disaster warning model is:

[0010]

[0011] where x i is the iThe n -dimensional feature vector of a sample, q ( x i ) is the index function that maps the feature vector x i to the leaf node of the decision tree structure, f k is to x i map to the function with the weight of the leaf node in the decision tree structure being , is the i th feature vector x i corresponding predicted value.

[0012] Optionally, the objective function Obj of the XGBoost earthquake disaster warning model is:

[0013] where, is the loss function of the i th sample, is the regularization term;

[0014] where, γ represents the regularization term coefficient of the complexity of each leaf, T and u respectively represent the number of leaves and the weights of the leaves, and the regularization term is used to avoid overfitting.

[0015] The embodiment of the present invention also provides an earthquake disaster warning system, including: A sample data acquisition module, configured to acquire sample data of historical earthquake sources, where the sample data includes sample input data and true values. The sample input data includes: earthquake source magnitude, earthquake source depth, earthquake source distance, earthquake source equivalent shear wave velocity, earthquake source observation station altitude, and peak ground acceleration. The true values include the amplitudes of ground acceleration varying with the building period; An XGBoost earthquake disaster warning model training module, configured to input the sample data into a pre-trained XGBoost earthquake disaster warning model for training to obtain a trained XGBoost earthquake disaster warning model; The seismic source early warning module is used to obtain the parameter data of the seismic source to be measured in real time through ground seismic observation stations, input the parameter data of the seismic source to be measured into the trained XGBoost earthquake disaster early warning model to obtain the amplitude of the ground motion acceleration of the seismic source to be measured varying with the building period, and determine the degree of earthquake disaster risk according to the amplitude of the ground motion acceleration of the seismic source to be measured varying with the building period; wherein, the parameter data of the seismic source to be measured includes: the magnitude of the seismic source to be measured, the depth of the seismic source to be measured, the distance of the seismic source to be measured, the equivalent shear wave velocity of the seismic source to be measured, the altitude of the seismic source observation station, and the peak ground motion acceleration.

[0016] In the third aspect of the embodiments of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the above earthquake disaster early warning detection method are implemented.

[0017] In the fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above earthquake disaster early warning detection method are implemented.

[0018] The beneficial effects of the present invention compared with the prior art: The present invention provides an earthquake disaster early warning method and system, including: obtaining sample data of historical seismic sources, the sample data including sample input data and true values, the sample data including: the magnitude of the seismic source, the depth of the seismic source, the distance of the seismic source, the equivalent shear wave velocity of the seismic source, the altitude of the seismic source observation station, and the peak ground motion acceleration, and the true values including the amplitude of the ground motion acceleration varying with the building period; constructing an XGBoost earthquake disaster early warning model capable of predicting the amplitude of the ground motion acceleration varying with the building period, obtaining the parameter data of the seismic source to be measured, inputting the parameter data of the seismic source to be measured into the trained XGBoost earthquake disaster early warning model to obtain the amplitude of the ground motion acceleration of the seismic source to be measured varying with the building period, and determining the degree of earthquake disaster risk according to the amplitude of the ground motion acceleration of the seismic source to be measured varying with the building period. This method and system can, while focusing on the lives and property of people, also give consideration to quickly and accurately processing high-dimensional earthquake characteristic information. Description of the Drawings

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0020] Figure 1It is a schematic flow chart of an earthquake disaster early warning method provided by an embodiment of the present invention; Figure 2 It is another schematic flow chart of an earthquake disaster early warning method provided by an embodiment of the present invention; Figure 3 It is a schematic structural diagram of an earthquake disaster early warning system provided by an embodiment of the present invention. Specific embodiments

[0021] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known devices are omitted to avoid unnecessary details from interfering with the description of the present invention.

[0022] To make the purpose, technical solutions and advantages of the present invention clearer, the following will be described through specific embodiments in conjunction with the accompanying drawings.

[0023] Embodiment 1 See the appendix Figure 1 , an embodiment of the present invention provides an earthquake disaster early warning method, including: Step S1: Obtain sample data of historical earthquake sources, where the sample data includes sample input data and true values. The sample input data includes: earthquake source magnitude, earthquake source depth, earthquake source distance, earthquake source equivalent shear wave velocity, earthquake source observation station altitude, and peak ground acceleration. The true value includes the amplitude of ground acceleration varying with the building period; Step S2: Input the sample data into a pre-trained XGBoost earthquake disaster early warning model for training to obtain a trained XGBoost earthquake disaster early warning model; Step S3: Real-time obtain parameter data of the to-be-detected earthquake source through a ground seismic observation station, input the parameter data of the to-be-detected earthquake source into the trained XGBoost earthquake disaster early warning model to obtain the amplitude of the ground acceleration of the to-be-detected earthquake source varying with the building period, and determine the earthquake disaster risk level according to the amplitude of the ground acceleration of the to-be-detected earthquake source varying with the building period; wherein, the parameter data of the to-be-detected earthquake source includes: to-be-detected earthquake source magnitude, to-be-detected earthquake source depth, to-be-detected earthquake source distance, to-be-detected earthquake source equivalent shear wave velocity, to-be-detected earthquake source observation station altitude, and peak ground acceleration.

[0024] Among them, the amplitude of ground motion acceleration varying with the building period is an important concept in the field of earthquake engineering, which reflects the dynamic response characteristics of buildings under earthquake action. Since the safety of buildings is crucial to the life and property safety of people, determining the degree of earthquake disaster risk based on the amplitude of ground motion acceleration varying with the building period can better protect the life and property of people.

[0025] Optionally, an earthquake disaster warning method provided by an embodiment of the present invention further includes: inputting test data into a trained XGBoost earthquake disaster warning model to obtain an output result of the test data, calculating the accuracy rate of the trained XGBoost earthquake disaster warning model according to the test result and the test data, and if the accuracy rate is lower than a preset standard value, retraining the trained XGBoost earthquake disaster warning model.

[0026] Optionally, the hyperparameters of the XGBoost earthquake disaster warning model include a learning rate, the minimum number of samples required for a given model, the maximum depth of a decision tree, the loss function required for a given model, the ratio of the training data set to the test data set, the ratio of randomly sampling features when building a tree, and a regularization term.

[0027] Optionally, the step of inputting the sample data into a pre-trained XGBoost earthquake disaster warning model for training includes: If the signal-to-noise ratio of the sample data is greater than a first threshold, selecting feature data of the pre-trained XGBoost earthquake disaster warning model based on a first method; the first method is a method based on the Gini coefficient; If the feature distribution similarity of the sample data is less than a first similarity, selecting feature data of the pre-trained XGBoost earthquake disaster warning model based on a second method; the second method is a method based on information gain, and the feature distribution similarity is obtained by calculating the information entropy of each feature.

[0028] In an embodiment of the present invention, considering that the amount of sample data is very large, in order to reduce the calculation amount, before performing the XGBoost earthquake disaster warning model, features that contribute greatly to the model prediction performance can be first screened out from the sample data, and the model can be trained based on the data of these important features, removing irrelevant or redundant features, thereby reducing the complexity of the model, reducing the risk of overfitting, and improving the generalization ability and operation efficiency of the model.

[0029] Specifically, when performing feature selection, a method based on the Gini coefficient or information gain can be used. In order to ensure the effect of feature extraction, an embodiment of the present invention dynamically adjusts the method of feature selection based on the characteristics of the sample data.

[0030] For example, when there is a lot of noise in the earthquake monitoring environment, the sample data will contain more noise data. For example, when collecting earthquake monitoring data in the field, natural phenomena such as strong winds, heavy rains, and waves will generate environmental noise; for example, if there are construction sites, vehicles driving, and crowds gathering near the monitoring area, the vibrations generated by these activities will become noise sources, causing the earthquake monitoring data to be disturbed.

[0031] In order to better predict earthquakes in a noisy environment, a first threshold can be set in advance. When the signal-to-noise ratio of the sample data is greater than the first threshold, it indicates that the noise of the sample data is relatively large. At this time, the use of the Gini coefficient can more stably evaluate the impact of the feature on the target variable (that is, the model output data), and will not cause a large deviation in the assessment of the importance of the feature due to individual noise data.

[0032] At the same time, considering different geological structural areas, such as plate boundaries and plate interiors, the distribution of seismic data characteristics will be very different. The crustal activity is frequent at the plate boundaries, and the magnitude, focal depth and other characteristics of the seismic data vary widely. Shallow, medium and deep source earthquakes may occur, and the magnitude can range from small earthquakes to very large earthquakes; while the seismic activity inside the plate is relatively weak, the magnitude is usually small, and the focal depth is relatively shallow and concentrated.

[0033] In order to better extract features in an environment where the feature distribution of earthquake monitoring data is quite different, the information entropy of various earthquake monitoring data can be calculated first to obtain multiple information entropies, and then the relative standard deviation of multiple information entropies can be calculated. If the relative standard deviation of multiple information entropies is greater than the pre-set second threshold, it indicates that the amount of information contained in each feature is different and the distribution difference is large. At this time, feature selection can be performed based on information gain. Information gain can more accurately evaluate the importance of each feature according to its influence on the target variable under different values, and dig out features that are truly important for earthquake prediction.

[0034] The beneficial effects of the present invention compared with the prior art are as follows: The present invention provides a method and system for earthquake disaster early warning, including: obtaining sample data of historical earthquake sources, where the sample data includes sample input data and true values. The sample data includes: earthquake source magnitude, earthquake source depth, earthquake source distance, earthquake source equivalent shear wave velocity, altitude of the earthquake source observation station, and peak ground acceleration. The true value includes the amplitude of ground motion acceleration varying with the building period; constructing an XGBoost earthquake disaster early warning model capable of predicting the amplitude of ground motion acceleration varying with the building period, obtaining parameter data of the to-be-detected earthquake source, inputting the parameter data of the to-be-detected earthquake source into the trained XGBoost earthquake disaster early warning model to obtain the amplitude of ground motion acceleration varying with the building period of the to-be-detected earthquake source, and determining the degree of earthquake disaster risk according to the amplitude of ground motion acceleration varying with the building period of the to-be-detected earthquake source. This method and system can, while emphasizing the life and property of people, also take into account the rapid and accurate processing of high-dimensional earthquake characteristic information.

[0035] Among them, in this embodiment, the method for feature selection is dynamically adjusted based on different characteristics of earthquake monitoring data, which is beneficial to improving the accuracy of earthquake prediction.

[0036] Embodiment 2 See Appendix Figure 1 and Appendix Figure 2 , an embodiment of the present invention provides a method for earthquake disaster early warning, including: Step S1: Obtain sample data of historical earthquake sources. The sample data includes sample input data and true values. The sample input data includes: earthquake source magnitude, earthquake source depth, earthquake source distance, earthquake source equivalent shear wave velocity, altitude of the earthquake source observation station, and peak ground acceleration. The true value includes the amplitude of ground motion acceleration varying with the building period; Step S2: Input the sample data into a pre-trained XGBoost earthquake disaster early warning model for training to obtain a trained XGBoost earthquake disaster early warning model; Step S3: Real-time obtain parameter data of the to-be-detected earthquake source through a ground earthquake observation station, input the parameter data of the to-be-detected earthquake source into the trained XGBoost earthquake disaster early warning model to obtain the amplitude of ground motion acceleration varying with the building period of the to-be-detected earthquake source, and determine the degree of earthquake disaster risk according to the amplitude of ground motion acceleration varying with the building period of the to-be-detected earthquake source; among them, the parameter data of the to-be-detected earthquake source includes: to-be-detected earthquake source magnitude, to-be-detected earthquake source depth, to-be-detected earthquake source distance, to-be-detected earthquake source equivalent shear wave velocity, altitude of the to-be-detected earthquake source observation station, and peak ground acceleration.

[0037] Optionally, a method for earthquake disaster early warning provided by an embodiment of the present invention further includes preprocessing the training data set using an MCMC algorithm with an adaptive step size. The specific steps are as follows: Step S21: Randomly read thei One eigenvector x i And calculate the i th eigenvector x i using the prediction value function of the XGBoost earthquake disaster warning model y i ; Step S22: Calculate the likelihood probability i th eigenvector x i in the training dataset while the predicted value is y i ; P ( y i | x i ) Step S23: Generate the (i + 1)th eigenvector x i+1 = x i + △ x using a normal distribution to give a random step size x i+1 And calculate the predicted value i + 1th eigenvector x i+1 ; △ y i+1 follows a normal random distribution in the value interval [-1, 1]; x Step S24: Calculate the likelihood probability th eigenvector i+1 in the training dataset while the predicted value is x i+1 ; y i+1 ; P ( y i+1 | x i+1 ) Step S25: Judge whether P ( y i+1 | x i+1 ) is greater than P ( y i | x i ). If so, then x i+1 and yi+1 Incorporate it into the training dataset, otherwise x i+1 = x i , y i+1 = y i Incorporate it into the training dataset; Step S26: Let i = i + 1, and determine i whether it is equal to the preset threshold. If so, exit; if not, return to execute step 23.

[0038] In this embodiment, since the feature information of the training dataset is easily limited by the accuracy of the information acquisition device, resulting in a high degree of discretization, the adaptive-step MCMC algorithm adopted in the embodiment of the present invention adjusts the parameters of the feature vectors in the small training dataset through the method of normal random distribution, reducing the discretization degree of the training dataset to accelerate the training speed and training accuracy.

[0039] Optionally, the prediction value function of the XGBoost earthquake disaster warning model is:

[0040]

[0041] where x i is the i -dimensional feature vector of the n th sample, q ( x i ) is the index function that maps the feature vector x i to the leaf node of the decision tree structure, f k is the function that maps x i to the weight of the leaf node of the decision tree structure as , is the i feature vector x i corresponding prediction value.

[0042] Optionally, the objective function Obj of the XGBoost earthquake disaster warning model is:

[0043] where is the loss function of the i th sample, is the regularization term;

[0044] Among them, γ represents the regularization term coefficient of the complexity of each leaf, T and u represent the number of leaves and the weight of the leaves respectively, and the regularization term is used to avoid overfitting.

[0045] Optionally, input the training data set into the pre-trained XGBoost earthquake disaster warning model for training, and the trained XGBoost earthquake disaster warning model obtained includes: Step S41: Obtain n feature vectors of the pre-trained XGBoost earthquake disaster warning model x i of the data set, and calculate the predicted value corresponding to the feature vector x i using the prediction value function of the XGBoost earthquake disaster warning model ; Step S42: Train with the aim of minimizing the objective function Obj of the XGBoost earthquake disaster warning model; Step S43: Continuously iterate to obtain the minimum value of the objective function Obj of the XGBoost earthquake disaster warning model, and finally obtain the trained XGBoost earthquake disaster warning model. In the t-th iteration is expressed as the following formula:

[0046] Among them, is the model in the t-th iteration, which is composed of the model in the (t - 1)-th iteration plus the new sub-model f t ( x i ); Perform a second-order Taylor expansion on the objective function Obj of the XGBoost earthquake disaster warning model in the t-th iteration, and obtain:

[0047]

[0048] Among them, g i is the first-order derivative of with respect to h i is the second-order derivative of with respect to

[0049] Embodiment 3 The embodiment of the present invention provides an earthquake disaster warning method, including: Step S1: Obtain the sample data of historical earthquake sources. The sample data includes sample input data and true values. The sample input data includes: earthquake source magnitude, earthquake source depth, earthquake source distance, earthquake source equivalent shear wave velocity, elevation of the earthquake source observation station, and peak ground acceleration. The true value includes the amplitude of ground motion acceleration varying with the building period. Step S2: Input the sample data into the pre-trained XGBoost earthquake disaster warning model for training to obtain the trained XGBoost earthquake disaster warning model. Step S3: Real-time obtain the parameter data of the earthquake source to be measured through a ground earthquake observation station. Input the parameter data of the earthquake source to be measured into the trained XGBoost earthquake disaster warning model to obtain the amplitude of the ground motion acceleration of the earthquake source to be measured varying with the building period, and determine the degree of earthquake disaster risk according to the amplitude of the ground motion acceleration of the earthquake source to be measured varying with the building period. Among them, the parameter data of the earthquake source to be measured includes: earthquake source magnitude to be measured, earthquake source depth to be measured, earthquake source distance to be measured, earthquake source equivalent shear wave velocity to be measured, elevation of the earthquake source observation station to be measured, and peak ground acceleration.

[0050] Optionally, an earthquake disaster warning method provided by an embodiment of the present invention further includes quantitatively evaluating the predicted value of the XGBoost earthquake disaster warning model by using the SHAP model, and analyzing the SHAP value of each feature value in the input sample. The SHAP value represents the contribution of each feature to the predicted value.

[0051] Quantitatively evaluating the predicted value of the XGBoost earthquake disaster warning model by using the SHAP model and analyzing the SHAP value of each feature value in the input sample includes: Assume the i th sample is x i , the sample has j feature values, the j th feature of this sample is x ij , the predicted value of this sample value is , then the SHAP value is as follows:

[0052] Among them, y base is the model baseline, representing the mean of the target variable of the sample, f ( x ij ) is x ij The SHAP value of represents the contribution value of the j th feature to the predicted value , when f ([[]] x ij) > 0 indicates that the feature plays a positive role; if f ( x ij ) < 0 indicates that the feature plays a negative role, and this feature reduces the predicted value.

[0053] In this embodiment, the SHAP value can intuitively show the correlation between the predicted value and each parameter of the feature vector, which is convenient for adjusting the feature vector. In the embodiment of the present invention, SHAP is used to calculate the correlation between the earthquake source magnitude, earthquake source depth, earthquake source distance, earthquake source equivalent shear wave velocity, earthquake source observation station altitude, and peak ground acceleration of the earthquake and the amplitude of the ground motion acceleration varying with the building period respectively.

[0054] Embodiment 4 See Appendix Figure 3 The embodiment of the present invention provides an earthquake disaster early warning system, including: A sample data acquisition module, configured to acquire sample data of historical earthquake sources. The sample data includes sample input data and true values. The sample input data includes: earthquake source magnitude, earthquake source depth, earthquake source distance, earthquake source equivalent shear wave velocity, earthquake source observation station altitude, and peak ground acceleration of the earthquake. The true value includes the amplitude of the ground motion acceleration varying with the building period; An XGBoost earthquake disaster early warning model training module, configured to input the sample data into a pre-trained XGBoost earthquake disaster early warning model for training to obtain a trained XGBoost earthquake disaster early warning model; An earthquake source early warning module, configured to acquire parameter data of a to-be-detected earthquake source in real time through a ground seismic observation station, input the parameter data of the to-be-detected earthquake source into the trained XGBoost earthquake disaster early warning model to obtain the amplitude of the ground motion acceleration of the to-be-detected earthquake source varying with the building period, and determine the degree of earthquake disaster risk according to the amplitude of the ground motion acceleration of the to-be-detected earthquake source varying with the building period. Wherein, the parameter data of the to-be-detected earthquake source includes: to-be-detected earthquake source magnitude, to-be-detected earthquake source depth, to-be-detected earthquake source distance, to-be-detected earthquake source equivalent shear wave velocity, to-be-detected earthquake source observation station altitude, and peak ground acceleration of the earthquake.

[0055] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. An earthquake disaster early warning method, characterized in that: include: Step S1: Obtain sample data of historical earthquake sources, the sample data includes sample input data and true values, the sample input data includes: earthquake source magnitude, earthquake source depth, earthquake source distance, earthquake source equivalent shear wave velocity, earthquake source observation station altitude and seismic peak acceleration, and the true value includes the amplitude of seismic acceleration changing with the building period; Step S2: inputting the sample data into the pre-trained XGBoost earthquake disaster early warning model for training to obtain a trained XGBoost earthquake disaster early warning model; Step S3: Acquire parameter data of the earthquake source to be measured in real time through the ground seismic observation station, input the parameter data of the earthquake source to be measured into the trained XGBoost earthquake disaster early warning model to obtain the amplitude of the seismic acceleration of the earthquake source to be measured that changes with the building period, and determine the earthquake disaster risk level according to the amplitude of the seismic acceleration of the earthquake source to be measured that changes with the building period; wherein the parameter data of the earthquake source to be measured include: magnitude of the earthquake source to be measured, depth of the earthquake source to be measured, distance from the earthquake source to be measured, equivalent shear wave velocity of the earthquake source to be measured, altitude of the observation station of the earthquake source to be measured, and peak seismic acceleration.

2. The earthquake disaster early warning method according to claim 1, characterized in that: The hyperparameters of the XGBoost earthquake disaster warning model include learning rate, minimum number of samples required for a given model, maximum depth of the decision tree, loss function required for a given model, ratio of training data set to test data set, ratio of random sampling of features when building a tree, and regularization term.

3. The earthquake disaster early warning method according to claim 1, characterized in that: The step of inputting the sample data into a pre-trained XGBoost earthquake disaster early warning model for training comprises: If the signal-to-noise ratio of the sample data is greater than a first threshold, selecting feature data of a pre-trained XGBoost earthquake disaster early warning model based on a first method; the first method is a method based on the Gini coefficient; If the feature distribution similarity of the sample data is less than the first similarity, the feature data of the pre-trained XGBoost earthquake disaster warning model is selected based on the second method; the second method is a method based on information gain, and the feature distribution similarity is obtained by calculating the information entropy of each feature.

4. The earthquake disaster early warning method according to claim 1, characterized in that: It also includes the use of the SHAP model to quantitatively evaluate the prediction value of the XGBoost earthquake disaster warning model, and analyze the SHAP value of each feature value in the input sample. The SHAP value represents the contribution of each feature to the prediction value.

5. The earthquake disaster early warning method according to claim 1, characterized in that: The method also includes preprocessing the training data set using an MCMC algorithm with an adaptive step size, and the specific steps are as follows: Step S21: Read the first i feature vector x i The prediction value function of the XGBoost earthquake disaster early warning model is used to calculate the i feature vector x i The corresponding predicted value y i , i The initial value of is 1; Step S22: Calculate the given i feature vector x i The predicted value is y i The likelihood probability P ( y i | x i ); Step S23: Using normal distribution to give a random step length x i+1 = x i +△ x Generate the i+1th eigenvector x i+1 The prediction value function of the XGBoost earthquake disaster early warning model is used to calculate the i +1 eigenvector x i+1 The corresponding predicted value y i+1 ,△ x The value interval [-1,1] follows a normal random distribution; Step S24: Calculate the given i+1 feature vector x i+1 The predicted value is y i+1 The likelihood probability P ( y i+1 | x i+1 ); Step S25: Determination P ( y i+1 | x i+1 ) is greater than P ( y i | x i ), if so, x i+1 and y i+1 into the training data set, if otherwise x i+1 = x i , y i+1 = y i Incorporating the training data set; Step S26: Let i=i+1, and determine i Check whether the preset threshold is reached. If yes, exit. If no, return to step 21.

6. The earthquake disaster early warning method according to claim 1, characterized in that: The prediction value function of the XGBoost earthquake disaster early warning model is: in, x i For the i Sample n dimensional feature vector, q ( x i ) is the feature vector x i The index function mapped to the leaf nodes of the decision tree structure, f k For the general x i The weight of the leaf node mapped to the decision tree structure is The function of For the i Eigenvector x i The corresponding predicted value.

7. The earthquake disaster early warning method according to claim 1, characterized in that: The objective function Obj of the XGBoost earthquake disaster early warning model is: in, For the i The loss function of samples is is the regularization term; Among them, γ represents the regularization coefficient of the complexity of each leaf, T and u represent the number of leaves and the weight of the leaves respectively, and the regularization term is used to avoid overfitting.

8. An earthquake disaster early warning system, characterized in that: include: The sample data acquisition module is used to obtain sample data of historical earthquake sources. The sample data includes sample input data and true values. The sample input data includes: earthquake source magnitude, earthquake source depth, earthquake source distance, earthquake source equivalent shear wave velocity, earthquake source observation station altitude and earthquake peak acceleration. The true value includes the amplitude of earthquake acceleration changing with the building cycle. An XGBoost earthquake disaster warning model training module is used to input the sample data into a pre-trained XGBoost earthquake disaster warning model for training to obtain a trained XGBoost earthquake disaster warning model; The earthquake source warning module is used to obtain the parameter data of the earthquake source to be measured in real time through the ground earthquake observation station, input the parameter data of the earthquake source to be measured into the trained XGBoost earthquake disaster warning model to obtain the amplitude of the seismic acceleration of the earthquake source to be measured that changes with the building cycle, and determine the degree of earthquake disaster danger according to the amplitude of the seismic acceleration of the earthquake source to be measured that changes with the building cycle; wherein, the parameter data of the earthquake source to be measured include: the magnitude of the earthquake source to be measured, the depth of the earthquake source to be measured, the distance of the earthquake source to be measured, the equivalent shear wave velocity of the earthquake source to be measured, the altitude of the observation station of the earthquake source to be measured, and the peak seismic acceleration.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

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.