Chemical emergency hazard prediction method, device, equipment and medium

By combining K-means clustering and random forest algorithms with a large language model, the problem of a unified standard for predicting the hazards of chemical plant accidents was solved, achieving efficient and accurate hazard assessment of chemical plant accidents, and adapting to the characteristics of various types of chemical plants.

CN120951023APending Publication Date: 2025-11-14CHINA ORDNANCE EQUIP GRP AUTOMATION RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510917081.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing technologies lack unified and authoritative standards for predicting the hazards of chemical accidents in chemical plants, and the models have poor generalization ability, making it difficult to adapt to the characteristics of different types of chemical plants.

Method used

We employ K-means unsupervised clustering and random forest supervised classification, combined with a large language model, to collect chemical emergency data from the internet. We extract the event subject, extract dimensional data, and predict hazards to form a sample set and train the model. We then optimize the parameters using cross-validation and GridSearch.

Benefits of technology

It has achieved standardized, scientific and accurate prediction of chemical emergencies, improved the model's generalization ability and prediction accuracy, and can adapt to the hazard assessment of different types of chemical plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120951023A_ABST
    Figure CN120951023A_ABST
Patent Text Reader

Abstract

The invention discloses a chemical emergency hazard prediction method, device, equipment and medium, and relates to the technical field of hazard prediction, the method is combined with an unsupervised learning algorithm to assist accident analysis to complete generation of a labeled sample, and when a supervised learning algorithm is used, the labeled sample can be rapidly generated. And an integrated learning thought is adopted to complete accident hazard prediction, so that standard, scientific and accurate accident analysis and risk level evaluation are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hazard prediction technology, and in particular to a method, apparatus, equipment and medium for predicting the hazards of chemical emergencies based on K-means and random forest. Background Technology

[0002] Research on the hazard prediction of chemical emergencies is one of the key areas of scientific and technological development worldwide. Chemical accidents are characterized by their suddenness, severe environmental pollution and damage, and high difficulty in rescue operations. Research on chemical accident safety focuses on both accident monitoring and prevention, and on developing efficient methods for post-disaster hazard prediction and emergency rescue strategies. Chemical accidents often cause air pollution, and the diffusion of pollutants in the atmosphere greatly affects subsequent accident rescue efforts. Therefore, to achieve accurate accident analysis and hazard prediction, numerous scholars and research institutions both domestically and internationally are continuously conducting research on various types of technical methods.

[0003] Abroad, research institutions actively apply various technologies in the fields of accident analysis and hazard prediction. MARAHIM et al. used Convolutional Neural Networks (CNNs) and customized the loss function of CNNs to improve the prediction accuracy of major accidents. T. VAIYAPURI et al. compared the performance of multilayer perceptrons, logistic regression, and the K-nearest neighbor algorithm in predicting accident severity, finding that multilayer perceptrons outperformed other algorithms. YANG Yang et al. used the XGBoost model and SHAP value analysis to select various event ontology attributes and environmental factors affecting accident severity, establishing a Bayesian network-based accident severity prediction model, verifying that the model's prediction accuracy reached 89.05%. YAN Miaomiao et al. used Bayesian networks to optimize the parameters of the random forest algorithm for accident severity prediction.

[0004] In China, Chen Zhi used SMOTE sampling and random undersampling algorithms to analyze accident data. However, because the SMOTE method does not consider the distribution characteristics of neighboring minority samples and random undersampling may lose important data useful to the model, it affects the generalization performance of the model. Some researchers are studying the use of Borderline Synthetic Minority Oversampling (BMOTE) to improve the model and solve the problem of class imbalance in accident data. Lü Pu et al. transformed the impact of accident severity into an image format and applied a convolutional neural network to establish a corresponding accident severity prediction model. Ji Xiaofeng et al. explored the nonlinear impact of accident ontology attributes on accident severity based on the LightBGM model combined with the SHAP attribution method. In addition, some scholars have used ensemble learning ideas such as Extreme Gradient Boosting Tree (XGBoost), Random Forest, Light Gradient Boosting Machine (LightGBM), and CatBoost to establish ensemble models to avoid the problem that individual models may obtain local optima and have poor generalization ability.

[0005] Existing research both domestically and internationally mainly focuses on coal mine accidents, oil depot fires or explosions, traffic accidents, and public facility accidents. Research on accidents related to chemical plants is still in its early stages. Furthermore, there are many types of chemical plants in my country, and due to differences in the chemical substances involved and plant structures, there are no unified and authoritative standards for accident analysis and hazard prediction. Summary of the Invention

[0006] In view of the above problems, the present invention provides a method, apparatus, equipment and medium for predicting the hazards of chemical emergencies to overcome or at least partially solve the above problems.

[0007] This invention provides the following solution:

[0008] A method for predicting the hazards of chemical emergencies includes:

[0009] Open-source data on chemical-related emergencies is collected and filtered based on keywords;

[0010] A large language model is used to extract event subjects from the open-source data and fuse similar subjects to obtain several target event subjects;

[0011] Extract the dimensional data of each subject of the target event and fuse the information extracted from each dimension;

[0012] Calculate the accident level classification result of each target event subject under the national standard;

[0013] The dimensional data corresponding to each of the target event subjects are respectively input into the chemical emergency hazard prediction model, so that the chemical emergency hazard prediction model outputs the hazard prediction result corresponding to each of the target event subjects; the chemical emergency hazard prediction model includes a random forest supervised classification algorithm;

[0014] Display the corresponding dimensional data for each target event, the accident level classification results under the national standard, the accident overview, related public opinion, and the hazard prediction results.

[0015] Preferably, the data acquisition method for training the chemical emergency hazard prediction model includes:

[0016] Collect various news reports or research materials on several historical chemical-related emergencies through the Internet;

[0017] Organize and extract the historical dimension data corresponding to each of the aforementioned historical chemical emergencies;

[0018] The K-means unsupervised clustering algorithm is used to cluster the historical dimension data to complete the classification of the hazards of historical chemical emergencies and obtain the clustering results.

[0019] The clustering results are analyzed, and the historical dimension data are labeled according to the analysis results in order to determine the hazard risk level data of each historical chemical emergency.

[0020] Based on the historical dimension data and hazard risk registration data of the aforementioned historical chemical emergencies, a sample set and a test set of chemical emergency hazards are formed;

[0021] The chemical emergency hazard prediction model is trained using the sample set and the test set.

[0022] Preferably, during multi-round training, cross-validation and GridSearch are used simultaneously for parameter optimization.

[0023] Preferably: After training the hazard prediction model for chemical emergencies, the model is stored offline to the local file system.

[0024] Preferably, the accidents are marked as 1, 2, 3, and 4 according to their severity, from most serious to least serious.

[0025] Preferably, the dimensional data includes at least whether there are residential buildings nearby, whether it is located in the main urban area, whether it affects nearby residential buildings, whether it affects nearby water sources, whether it affects the atmosphere, whether it affects the soil, whether there are dangerous sources nearby, whether it releases toxic substances, the total number of deaths, the total number of injuries, and the total economic loss.

[0026] A chemical emergency hazard prediction device, used to execute the above-described chemical emergency hazard prediction method, the device comprising:

[0027] The data acquisition unit is used to collect and filter open-source data on chemical emergencies based on keywords;

[0028] The event subject extraction unit is used to extract the event subject from the open source data using a large language model and to fuse similar subjects to obtain several target event subjects.

[0029] The dimensional information extraction unit is used to extract the dimensional data of each target event subject and fuse the information extracted from each dimension;

[0030] The accident level classification result calculation unit is used to calculate the accident level classification result of each target event subject under the national standard;

[0031] The hazard prediction unit is used to input the dimensional data corresponding to each of the target event subjects into the chemical emergency hazard prediction model, so that the chemical emergency hazard prediction model outputs the hazard prediction result corresponding to each of the target event subjects; the chemical emergency hazard prediction model includes a random forest supervised classification algorithm;

[0032] The display unit is used to display the dimensional data corresponding to each target event, the accident level classification results under the national standard, the accident overview, related public opinion, and the hazard prediction results.

[0033] A chemical emergency hazard prediction device, the device comprising a processor and a memory:

[0034] The memory is used to store program code and transmit the program code to the processor;

[0035] The processor is used to execute the above-mentioned chemical emergency hazard prediction method according to the instructions in the program code.

[0036] A computer-readable storage medium for storing program code for executing the above-described method for predicting the hazards of chemical emergencies.

[0037] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0038] This application provides a method, apparatus, equipment, and medium for predicting the hazards of chemical emergencies. The method combines unsupervised learning algorithms to assist in accident analysis to generate labeled samples. At the same time, when using supervised learning algorithms, it also adopts the idea of ​​ensemble learning to complete the accident hazard prediction, thereby achieving standardized, scientific, and accurate accident analysis and risk level assessment.

[0039] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0041] Figure 1 This is a flowchart of a method for predicting the hazards of chemical emergencies provided in an embodiment of the present invention;

[0042] Figure 2 This is a schematic diagram of keyword configuration for predicting the hazards of chemical emergencies provided in an embodiment of the present invention;

[0043] Figure 3 This is a schematic diagram of a chemical emergency hazard prediction device provided in an embodiment of the present invention;

[0044] Figure 4 This is a schematic diagram of a chemical emergency hazard prediction device provided in an embodiment of the present invention. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of protection of the present invention.

[0046] See Figure 1 This invention provides a method for predicting the hazards of chemical emergencies, such as... Figure 1 As shown, the method may include:

[0047] S101: Collect and filter open-source data on chemical emergencies based on keywords;

[0048] S102: Use a large language model to extract event subjects from the open source data and fuse similar subjects to obtain several target event subjects;

[0049] S103: Extract the dimensional data of each subject of the target event and fuse the information extracted from each dimension; in specific implementation, the embodiments of this application may provide the dimensional data including at least whether there are residences around, whether it is located in the main urban area, whether it affects nearby residences, whether it affects nearby water sources, whether it affects the atmosphere, whether it affects the soil, whether there are dangerous sources around, whether it releases toxic substances, the total number of deaths, the total number of injuries, and the total economic loss.

[0050] S104: Calculate the accident level classification result of each target event subject under the national standard;

[0051] S105: Input the dimensional data corresponding to each of the target event subjects into the chemical emergency hazard prediction model, so that the chemical emergency hazard prediction model outputs the hazard prediction result corresponding to each of the target event subjects; the chemical emergency hazard prediction model includes a random forest supervised classification algorithm;

[0052] S106: Display the dimensional data corresponding to each target event, the accident level classification results under the national standard, the accident overview, related public opinion, and the hazard prediction results.

[0053] In specific implementation, the embodiments of this application can provide a data acquisition method for training the chemical emergency hazard prediction model, including:

[0054] Collect various news reports or research materials on several historical chemical-related emergencies through the Internet;

[0055] Organize and extract the historical dimension data corresponding to each of the aforementioned historical chemical emergencies;

[0056] The K-means unsupervised clustering algorithm is used to cluster the historical dimension data to complete the classification of the hazards of historical chemical emergencies and obtain the clustering results.

[0057] The clustering results are analyzed, and the historical dimension data are labeled according to the analysis results in order to determine the hazard risk level data of each historical chemical emergency.

[0058] Based on the historical dimension data and hazard risk registration data of the aforementioned historical chemical emergencies, a sample set and a test set of chemical emergency hazards are formed; in specific implementation, the embodiments of this application can provide that the accidents are marked as 1, 2, 3, 4 according to the severity level of the accident from most serious to least serious.

[0059] The chemical emergency hazard prediction model is trained using the sample set and the test set.

[0060] Furthermore, during multiple rounds of training, cross-validation and GridSearch are used simultaneously for parameter optimization.

[0061] After training the hazard prediction model for chemical emergencies, it is stored offline to the local file system.

[0062] The chemical emergency hazard prediction method provided in this application focuses on the prediction of hazards from chemical emergencies. Based on the open-source data collected from the Internet, which mainly consists of news, journal articles, accident analysis reports, etc. related to chemical emergencies, it is necessary to sort out the dimensional data of chemical emergencies in the above documents and use a clustering algorithm to cluster the dimensional data to obtain the hazard classification results of chemical emergencies.

[0063] To predict the hazards of chemical emergencies, the hazards of chemical emergencies are first classified using the K-means algorithm, and the clustering results are analyzed to determine the hazard risk level of chemical emergencies.

[0064] Then, based on the dimensional data and hazard risk data of chemical emergencies, a hazard sample set and test set for chemical emergencies are formed. The random forest algorithm is used to train the hazard prediction model for chemical emergencies and store it offline. Finally, for the open source data of newly occurring chemical emergencies collected from the Internet, the event dimensional data is obtained through large language model analysis and processing, loaded into the hazard prediction model for chemical emergencies, and the accident hazard risk assessment results are generated.

[0065] The following is a detailed description of the chemical emergency hazard prediction method provided in the embodiments of this application.

[0066] 1. Training of hazard prediction models for chemical emergencies.

[0067] Step 1: Data collection.

[0068] Collect various news reports or research materials related to historical events involving chemical emergencies through the internet.

[0069] Step 2: Dimension Extraction.

[0070] The dimensional data of chemical facility accidents were collected and extracted. The main dimensions are shown in Table 1:

[0071] Table 1. Main Dimensions of the Event

[0072] Serial Number Dimension 1 Are there any residences nearby? 2 Is it located in the main urban area? 3 Does it affect nearby residences? 4 Does it affect nearby water sources? 5 Does it have an impact on the atmosphere? 6 Does it have an impact on the soil? 7 Are there any hazards nearby? 8 Does it release toxic substances? 9 Total number of deaths 10 Total number of injured 11 Overall economic loss

[0073] Step 3: Use the K-means algorithm to cluster the dimensional data and complete the hazard classification of chemical emergencies;

[0074] Step 4: Analyze the clustering results and label the dimensional data according to the analysis results: label them as 1, 2, 3, 4 according to the severity level of the accident (from most severe to least severe). Determine the hazard risk level of each chemical emergency.

[0075] Step 5: Generate a sample set.

[0076] Based on dimensional data and hazard risk data of chemical emergencies, a hazard sample set and test set for chemical emergencies are formed.

[0077] Step 6: Use the random forest algorithm to train the model using labeled dimensional data: During training, the training set and test set are randomly divided in a 7:3 ratio. During multiple rounds of training, cross-validation and GridSearch are used to optimize parameters.

[0078] Step 7: Complete the training of the chemical emergency hazard prediction model and store it offline to the local file system.

[0079] 2. Application of hazard prediction models for chemical emergencies.

[0080] Step 1: Collect and filter open-source data on chemical-related emergencies based on keywords;

[0081] Step 2: Data preprocessing.

[0082] A large language model is used to extract event subjects from the collected open-source data and fuse similar subjects;

[0083] For each event subject, extract event dimension data and integrate the information extracted from each dimension;

[0084] Calculate the accident classification results of events under national standards.

[0085] Step 3: Load the chemical emergency hazard prediction model, input the dimensional data, and perform prediction calculations;

[0086] Step 4: Finally, the data will be presented in the form of reports, which may include dimensional data, accident level classification results under national standards, accident overview, related public opinion, and hazard prediction results.

[0087] Data processing results and analysis.

[0088] 1. Model training.

[0089] Step 1: Collect relevant historical event data. Some data on chemical-related emergencies are shown in Table 2.

[0090] Table 2 Partial List of Chemical-Related Emergencies

[0091] Serial Number Event Name 1 Beijing Dongfang Chemical Plant Explosion and Fire Accident 2 Kaixian blowout accident 3 chlorine gas leak and explosion accident at Chongqing Tianyuan Chemical Plant 4 Fire at the Olefin Plant of Qilu Branch of China Petroleum & Chemical Corporation 5 Major explosion and fire accident at Haoye Chemical Co., Ltd. 6 Explosion at Amuai Refinery 7 Explosion accident at Shanghai Petrochemical Co., Ltd.'s No. 1 ethylene glycol unit 8 Tianjin Port Ruihai Company Hazardous Materials Warehouse Major Fire and Explosion Accident 9 Major explosion and fire accident involving a tanker truck at Linyi Jinyu Petrochemical Co., Ltd. 10 Beijing Dongfang Chemical Plant Explosion and Fire Accident

[0092] Step 2: Dimension Extraction. Based on reports of chemical-related emergencies collected from the internet, dimensional data of the events were extracted. Partial results of dimensional extraction are shown in Table 3:

[0093] Table 3 Event Dimension Extraction Results

[0094]

[0095]

[0096] Step 3: Use the K-means algorithm to cluster the dimensional data and complete the hazard classification of chemical emergencies;

[0097] According to the national standard "Regulations on Reporting and Handling Production Safety Accidents", accidents are classified into four levels, as shown in Table 4:

[0098] Table 4 National Standards for Accident Level Classification

[0099]

[0100] Referring to the national standard for classifying chemical emergencies, the parameters for the K-means algorithm were set as shown in Table 5:

[0101] Table 5K Mean Algorithm Parameter Settings

[0102]

[0103] The K-means algorithm was used to cluster the dimensional data, and some of the clustering results are shown in Table 6.

[0104] Table 6. Clustering Results of Event Dimension Data

[0105]

[0106]

[0107] Step 4: Analyze the clustering results and label the dimensional data according to the analysis results: label them as 1, 2, 3, 4 according to the severity level of the accident (from severe to mild) to determine the hazard risk level of each chemical emergency.

[0108] Step 5: Create a sample set of hazards from chemical emergencies.

[0109] Step 6: Use the random forest classification algorithm to train the model based on the labeled dimensional data and obtain the parameters.

[0110] Step 7: Complete model training and store it offline.

[0111] Model application.

[0112] Step 1: Based on keyword filtering, collect data on various chemical-related emergencies from the internet. An example of keyword configuration is shown below. Figure 2 As shown:

[0113] Step 2: For example, regarding the "Jiangsu Xiangshui Chemical Plant Explosion Incident", the following public opinion may be collected: "China News Service, Nanjing, March 21 (Reporter Zhong Sheng) On the afternoon of the 21st.

[0114] Step 3: Use a large language model to extract dimensions of the event and merge the data of each dimension. For example, if the dimension of "total number of deaths" is extracted and has the following values: more than 30,000, more than 30,000, more than 30,000, and 32,016, the next step should merge it into: 32,016.

[0115] Step 4: Analyze the accident classification results based on national standards.

[0116] Step 5: Load the chemical emergency hazard prediction model, input event dimension data, perform accident hazard risk prediction, and output a hazard prediction report.

[0117] Effect verification.

[0118] Data sources: ZAKER News, Sina News, Baidu News, NetEase News, Sohu.com, Tencent.com, Toutiao, Ofweek.com, Hot News, Shenzhen Hotline, Sanmen News Network, China Taiwan Network, Lion City News, and other websites.

[0119] Input: Dimensional data and related public opinion data of 20 chemical-related emergencies, such as the "explosion and fire accident at Liaoning Panjin Haoye Chemical Co., Ltd."

[0120] Output: Data on chemical emergencies and hazard risk prediction results, some of which are shown in Table 7:

[0121] Table 7. Dimensional Data and Hazard Risk Prediction Results for Chemical-Related Emergencies

[0122]

[0123]

[0124] The model metrics and validation results are shown in Table 8:

[0125] Table 8 Model Indicators and Validation Results

[0126] index Indicator Requirements Verification results accuracy Greater than 80% 95% Accuracy Greater than 80% 95% Recall rate Greater than 80% 96%

[0127] Finally, a hazard prediction report is generated.

[0128] In summary, the chemical emergency hazard prediction method provided in this application combines unsupervised learning algorithms to assist in accident analysis and generate labeled samples. At the same time, when using supervised learning algorithms, it also adopts the idea of ​​ensemble learning to complete the accident hazard prediction, thereby achieving standardized, scientific and accurate accident analysis and risk level assessment.

[0129] See Figure 3 This application embodiment can also provide a chemical emergency hazard prediction device, such as... Figure 3 As shown, the apparatus for performing the above-described method for predicting the hazards of chemical emergencies may include:

[0130] Data acquisition unit 301 is used to collect and filter open-source data on chemical emergencies based on keywords;

[0131] The event subject extraction unit 302 is used to extract the event subject from the open source data using a large language model and fuse similar subjects to obtain several target event subjects.

[0132] The dimension information extraction unit 303 is used to extract the dimension data of each target event subject and fuse the information extracted from each dimension;

[0133] The accident level classification result calculation unit 304 is used to calculate the accident level classification result of each target event subject under the national standard;

[0134] The hazard prediction unit 305 is used to input the dimension data corresponding to each of the target event subjects into the chemical emergency hazard prediction model, so that the chemical emergency hazard prediction model outputs the hazard prediction result corresponding to each of the target event subjects; the chemical emergency hazard prediction model includes a random forest supervised classification algorithm;

[0135] Display unit 306 is used to display the dimension data corresponding to each target event, the accident level classification results under the national standard, the accident overview, related public opinion, and the hazard prediction results.

[0136] This application embodiment can also provide a chemical emergency hazard prediction device, the device including a processor and a memory:

[0137] The memory is used to store program code and transmit the program code to the processor;

[0138] The processor is used to execute the steps of the above-described chemical emergency hazard prediction method according to the instructions in the program code.

[0139] like Figure 4 As shown in the embodiment of this application, a chemical emergency hazard prediction device may include: a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, memory 11, and communication interface 12 all communicate with each other through the communication bus 13.

[0140] In this embodiment, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic devices.

[0141] The processor 10 can call programs stored in the memory 11. Specifically, the processor 10 can execute operations in the embodiments of the chemical emergency hazard prediction method.

[0142] The memory 11 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment, the memory 11 stores at least a program for implementing the following functions:

[0143] Open-source data on chemical-related emergencies is collected and filtered based on keywords;

[0144] A large language model is used to extract event subjects from the open-source data and fuse similar subjects to obtain several target event subjects;

[0145] Extract the dimensional data of each subject of the target event and fuse the information extracted from each dimension;

[0146] Calculate the accident level classification result of each target event subject under the national standard;

[0147] The dimensional data corresponding to each of the target event subjects are respectively input into the chemical emergency hazard prediction model, so that the chemical emergency hazard prediction model outputs the hazard prediction result corresponding to each of the target event subjects; the chemical emergency hazard prediction model includes a random forest supervised classification algorithm;

[0148] Display the corresponding dimensional data for each target event, the accident level classification results under the national standard, the accident overview, related public opinion, and the hazard prediction results.

[0149] In addition, memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0150] Communication interface 12 can be an interface for the communication module, used to connect with other devices or systems.

[0151] Of course, it should be noted that, Figure 4 The structure shown does not constitute a limitation on the chemical emergency hazard prediction device in the embodiments of this application. In practical applications, the chemical emergency hazard prediction device may include more than Figure 4 More or fewer components as shown, or combinations of certain components.

[0152] This application embodiment may also provide a computer-readable storage medium for storing program code for executing the steps of the above-described chemical emergency hazard prediction method.

[0153] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0154] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0155] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0156] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for predicting the hazards of chemical emergencies, characterized in that, include: Open-source data on chemical-related emergencies is collected and filtered based on keywords; A large language model is used to extract event subjects from the open-source data and fuse similar subjects to obtain several target event subjects; Extract the dimensional data of each subject of the target event and fuse the information extracted from each dimension; Calculate the accident level classification result of each target event subject under the national standard; The dimensional data corresponding to each of the target event subjects are respectively input into the chemical emergency hazard prediction model, so that the chemical emergency hazard prediction model outputs the hazard prediction results corresponding to each of the target event subjects; The chemical emergency hazard prediction model includes a random forest supervised classification algorithm. Display the corresponding dimensional data for each target event, the accident level classification results under the national standard, the accident overview, related public opinion, and the hazard prediction results.

2. The method for predicting the hazards of chemical emergencies according to claim 1, characterized in that, The data acquisition method for training the chemical emergency hazard prediction model includes: Collect various news reports or research materials on several historical chemical-related emergencies through the Internet; Organize and extract the historical dimension data corresponding to each of the aforementioned historical chemical emergencies; The K-means unsupervised clustering algorithm is used to cluster the historical dimension data to complete the classification of the hazards of historical chemical emergencies and obtain the clustering results. The clustering results are analyzed, and the historical dimension data are labeled according to the analysis results in order to determine the hazard risk level data of each historical chemical emergency. Based on the historical dimension data and hazard risk registration data of the aforementioned historical chemical emergencies, a sample set and a test set of chemical emergency hazards are formed; The chemical emergency hazard prediction model is trained using the sample set and the test set.

3. The method for predicting the hazards of chemical emergencies according to claim 2, characterized in that, During multiple training rounds, cross-validation and GridSearch are used simultaneously for parameter optimization.

4. The method for predicting the hazards of chemical emergencies according to claim 2, characterized in that, After training the hazard prediction model for chemical emergencies, it is stored offline to the local file system.

5. The method for predicting the hazards of chemical emergencies according to claim 2, characterized in that, Accidents are classified into four levels according to severity, from most serious to least serious: 1, 2, 3, and 4.

6. The method for predicting the hazards of chemical emergencies according to claim 1, characterized in that, The dimensional data includes at least whether there are residential buildings nearby, whether it is located in the main urban area, whether it affects nearby residential buildings, whether it affects nearby water sources, whether it affects the atmosphere, whether it affects the soil, whether there are dangerous sources nearby, whether toxic substances are released, the total number of deaths, the total number of injuries, and the total economic loss.

7. A device for predicting the hazards of chemical emergencies, characterized in that, The apparatus for performing the chemical emergency hazard prediction method according to any one of claims 1-6, the apparatus comprising: The data acquisition unit is used to collect and filter open-source data on chemical emergencies based on keywords; The event subject extraction unit is used to extract the event subject from the open source data using a large language model and to fuse similar subjects to obtain several target event subjects. The dimensional information extraction unit is used to extract the dimensional data of each target event subject and fuse the information extracted from each dimension; The accident level classification result calculation unit is used to calculate the accident level classification result of each target event subject under the national standard; The hazard prediction unit is used to input the dimensional data corresponding to each of the target event subjects into the chemical emergency hazard prediction model, so that the chemical emergency hazard prediction model outputs the hazard prediction result corresponding to each of the target event subjects; the chemical emergency hazard prediction model includes a random forest supervised classification algorithm; The display unit is used to display the dimensional data corresponding to each target event, the accident level classification results under the national standard, the accident overview, related public opinion, and the hazard prediction results.

8. A device for predicting the hazards of chemical emergencies, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the chemical emergency hazard prediction method according to any one of claims 1-6 according to the instructions in the program code.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the chemical emergency hazard prediction method according to any one of claims 1-6.