Safety early warning method and early warning terminal based on safety accident potential report text
Through machine learning and natural language processing technology, the automatic analysis of safety accident hazard reports is solved, and the problem of time-consuming and inaccurate evaluation of safety accident hazard reports in the existing technology is solved, achieving high-precision and high-efficiency safety warning.
Patent Information
- Application Number
- CN202311330696.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-04-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the evaluation of safety accident hazard reports needs to be carried out manually, which is time-consuming and susceptible to subjectivity, resulting in inaccurate evaluation results.
Using machine learning and natural language processing technology, we conduct in-depth analysis of safety accident potential hazard reports, build machine learning algorithm models, and realize automated analysis and early warning of new safety accident potential hazard reports through training and processing of historical data.
It improves the accuracy and real-time nature of safety warnings, reduces human resources investment, improves processing efficiency, and effectively prevents and reduces the occurrence of safety accidents.
Smart Images

Figure CN119830910A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of safe production, and in particular relates to a safety early warning method, an early warning terminal, an electronic device and a storage medium based on a safety accident potential hazard report text. Background Art
[0002] Safety incident potential reports have always been a key tool for assessing and preventing safety risks. At present, professionals need to manually evaluate these reports and take preventive measures after discovering potential safety hazards. However, this approach has some inherent limitations: first, manually evaluating a large number of safety incident potential reports is very time-consuming; second, human judgment may be affected by subjectivity, resulting in inaccurate assessment results. Therefore, it is necessary to find a technology that can automatically and accurately analyze and predict safety incident potentials. Summary of the invention
[0003] In order to solve the above-mentioned problems existing in the prior art, the purpose of the present invention is to provide a safety warning method, warning terminal, electronic device and storage medium based on the safety accident potential risk report text, and to conduct in-depth analysis of the safety accident potential risk report through machine learning and natural language processing technology, so as to effectively carry out safety warning, prevent and reduce the occurrence of safety accidents in advance.
[0004] The technical solution adopted by the present invention is:
[0005] The safety early warning method based on the safety accident hidden danger report text includes the following steps:
[0006] Acquire historical data of safety accident hidden danger reports, and obtain a data set after data processing the historical data of safety accident hidden danger reports;
[0007] Divide the dataset into training and testing sets;
[0008] Using safety accident potential reports as input and safety accident warnings as output, we build a machine learning algorithm model and train the machine learning algorithm model through data sets;
[0009] Obtain new safety accident hazard reports, process their data, and input them into the machine learning algorithm model, which then outputs prediction information.
[0010] As a preferred embodiment of the present invention, the safety accident hidden danger historical report data includes hidden danger reports before the safety accident occurred and hidden danger reports that had safety hidden dangers but were eliminated after investigation.
[0011] As a preferred solution of the present invention, the specific method of data processing includes:
[0012] The M safety accident potential reports are constructed into a text set P = {P1, P2, ..., P M}, M is the number of all safety accident potential hazard reports within T time before the accident time point, and the accident time point is the time when the safety accident occurred or the time when the safety hazard existed but was eliminated;
[0013] Perform text cleaning and text standardization on all elements in the text set P to obtain text samples;
[0014] All text samples are segmented using the ICTCLAS Chinese lexical analysis system to obtain the word set corresponding to each text sample;
[0015] Use the TF-IDF algorithm to calculate the TF-IDF value of each word in the word set;
[0016] Vectorize all text samples and output text samples P t Corresponding text vector set Among them, P t is the tth text in the text set P, M is the total number of texts, For text P t The word vector of
[0017] Perform feature extraction on the text vector set to obtain the feature vector.
[0018] As a preferred solution of the present invention, the method for vectorizing all text samples includes:
[0019] Initialize the parameter sliding window width ω so that the sliding window passes through the text sample P t For the corresponding word set, the co-occurrence relationship is used to construct the edge between any two points and build the text keyword graph;
[0020] Establish a node weight score model for the text keyword graph:
[0021] Among them, S(V i ) is the node weight score of the i-th node, V i and V j are the i-th node and the j-th node in the text keyword graph, respectively, W(V i ) is V i TF-IDF value, d is the damping factor of the text set, I(V j ) is P t All connections to V i The set of other nodes of O(V j ) is P t Midpoint V i The set of other nodes it is connected to;
[0022] Iterate the i and j values until the difference between the two node weight scores is less than the set iteration stop threshold;
[0023] Arrange the weight scores of each node in the text keyword graph in descending order and extract the top M key The words corresponding to each node constitute the keyword set K;
[0024] Calculate the text sample P t The word vector Among them, V k is the word vector of the kth keyword in the keyword set K, W(V k ) is V k The corresponding TF-IDF value.
[0025] Safety warning terminal based on safety accident hidden danger report text:
[0026] It includes a data set acquisition unit: acquiring historical data of safety accident hidden danger reports, and obtaining a data set after performing data processing on the historical data of safety accident hidden danger reports;
[0027] Dataset division unit: divide the data set into training set and test set;
[0028] Machine learning algorithm model training unit: takes safety accident potential report as input and safety accident warning as output, builds machine learning algorithm model, and trains the machine learning algorithm model through data set;
[0029] Prediction information output unit: obtain new safety accident hazard reports, process the data and input them into the machine learning algorithm model, and output prediction information through the machine learning algorithm model.
[0030] As a preferred embodiment of the present invention, the safety accident hidden danger historical report data includes hidden danger reports before the safety accident occurred and hidden danger reports that had safety hidden dangers but were eliminated after investigation.
[0031] As a preferred solution of the present invention, the data set acquisition unit and the prediction information output unit both include a data processing module;
[0032] The data processing module constructs M safety accident potential reports into a text set P = {P1, P2, ..., P M}, M is the number of all safety accident potential hazard reports within T time before the accident time point, and the accident time point is the time when the safety accident occurred or the time when the safety hazard existed but was eliminated;
[0033] Perform text cleaning and text standardization on all elements in the text set P to obtain text samples;
[0034] All text samples are segmented using the ICTCLAS Chinese lexical analysis system to obtain the word set corresponding to each text sample;
[0035] Use the TF-IDF algorithm to calculate the TF-IDF value of each word in the word set;
[0036] Vectorize all text samples and output text samples P t Corresponding text vector set Among them, P t is the tth text in the text set P, M is the total number of texts, For text P t The word vector of
[0037] Perform feature extraction on the text vector set to obtain the feature vector.
[0038] As a preferred solution of the present invention, all text samples are vectorized by a text sample vectorization module;
[0039] The method by which the text sample vectorization module vectorizes all text samples includes:
[0040] Initialize the parameter sliding window width ω so that the sliding window passes through the text sample P t For the corresponding word set, the co-occurrence relationship is used to construct the edge between any two points and build the text keyword graph;
[0041] Establish a node weight score model for the text keyword graph:
[0042] Among them, S(V i ) is the node weight score of the i-th node, V i and V j are the i-th node and the j-th node in the text keyword graph, respectively, W(V i ) is V i TF-IDF value, d is the damping factor of the text set, I(V j ) is P t All connections to V i The set of other nodes of O(V j ) is P t Midpoint V i The set of other nodes it is connected to;
[0043] Iterate the i and j values until the difference between the two node weight scores is less than the set iteration stop threshold;
[0044] Arrange the weight scores of each node in the text keyword graph in descending order and extract the top M keyThe words corresponding to each node constitute the keyword set K;
[0045] Calculate the text sample P t The word vector Among them, V k is the word vector of the kth keyword in the keyword set K, W(V k ) is V k The corresponding TF-IDF value.
[0046] An electronic device comprises at least one processor and at least one memory communicatively connected to the processor; wherein the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the above-mentioned safety warning method based on the safety accident hazard report text.
[0047] A non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the above-mentioned safety early warning method based on the safety accident potential hazard report text.
[0048] The beneficial effects of the present invention are:
[0049] 1. Improve the accuracy and real-time performance of early warning: Through machine learning algorithm models, we can analyze and predict new safety accident hazard reports in real time, thereby discovering possible safety hazards in advance, greatly improving the real-time performance and accuracy of early warning.
[0050] 2. Utilize historical data: By utilizing historical safety accident hazard reports, we can learn from past experience and improve future early warning effects.
[0051] 3. Automated processing: By processing safety accident hazard reports in an automated manner, we can greatly reduce human resource investment and improve processing efficiency.
[0052] 4. Improve safety: By early warning of potential safety hazards, we can take timely measures to avoid or reduce the occurrence of safety accidents, thereby improving the safety of the entire system.
[0053] 5. Easy to expand: The method of the present invention can be easily expanded to other occasions where early warning is required, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0056] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present invention. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0057] Embodiment 1:
[0058] like Figure 1 As shown, the safety early warning method based on the safety accident potential hazard report text of this embodiment includes the following steps:
[0059] Obtaining historical data of safety accident hidden danger reports, and obtaining a data set after data processing of the historical data of safety accident hidden danger reports; the historical data of safety accident hidden danger reports include hidden danger reports before the safety accident occurred and hidden danger reports with safety hidden dangers but eliminated after investigation;
[0060] Divide the dataset into training and testing sets;
[0061] Using safety accident potential reports as input and safety accident warnings as output, we build a machine learning algorithm model and train the machine learning algorithm model through data sets;
[0062] Obtain new safety accident hazard reports, process their data, and input them into the machine learning algorithm model, which then outputs prediction information.
[0063] Specifically, the specific methods of data processing include:
[0064] The M safety accident potential reports are constructed into a text set P = {P1, P2, ..., P M}, M is the number of all safety accident potential hazard reports within T time before the accident time point, and the accident time point is the time when the safety accident occurred or the time when the safety hazard existed but was eliminated;
[0065] Perform text cleaning and text standardization on all elements in the text set P to obtain text samples;
[0066] All text samples are segmented using the ICTCLAS Chinese lexical analysis system to obtain the word set corresponding to each text sample;
[0067] Use the TF-IDF algorithm to calculate the TF-IDF value of each word in the word set;
[0068] Vectorize all text samples and output text samples P t Corresponding text vector set Among them, P t is the tth text in the text set P, M is the total number of texts, For text P t The word vector of
[0069] Perform feature extraction on the text vector set to obtain the feature vector.
[0070] Specifically, the method of vectorizing all text samples includes:
[0071] Initialize the parameter sliding window width ω so that the sliding window passes through the text sample P t For the corresponding word set, the co-occurrence relationship is used to construct the edge between any two points and build the text keyword graph;
[0072] Establish a node weight score model for the text keyword graph:
[0073] Among them, S(V i ) is the node weight score of the i-th node, V i and V j are the i-th node and the j-th node in the text keyword graph, respectively, W(V i ) is V i TF-IDF value, d is the damping factor of the text set, I(V j ) is P t All connections to V i The set of other nodes of O(V j ) is P t Midpoint V i The set of other nodes it is connected to;
[0074] Iterate the i and j values until the difference between the two node weight scores is less than the set iteration stop threshold;
[0075] Arrange the weight scores of each node in the text keyword graph in descending order and extract the top M key The words corresponding to each node constitute the keyword set K;
[0076] Calculate the text sample P t The word vector Among them, V k is the word vector of the kth keyword in the keyword set K, W(V k ) is V k The corresponding TF-IDF value.
[0077] Embodiment 2:
[0078] Safety warning terminal based on safety accident hidden danger report text:
[0079] It includes a data set acquisition unit: acquiring historical data of safety accident hidden danger reports, and obtaining a data set after data processing of the historical data of safety accident hidden danger reports; the historical data of safety accident hidden danger reports include hidden danger reports before the safety accident occurred and hidden danger reports with safety hidden dangers but eliminated after investigation;
[0080] Dataset division unit: divide the dataset into training set and test set;
[0081] Machine learning algorithm model training unit: takes safety accident potential report as input and safety accident warning as output, builds machine learning algorithm model, and trains the machine learning algorithm model through data set;
[0082] Prediction information output unit: obtain new safety accident hazard reports, process the data and input them into the machine learning algorithm model, and output prediction information through the machine learning algorithm model.
[0083] Wherein, the data set acquisition unit and the prediction information output unit both include a data processing module;
[0084] The data processing module constructs M safety accident potential reports into a text set P = {P1, P2, ..., P M}, M is the number of all safety accident potential hazard reports within T time before the accident time point, and the accident time point is the time when the safety accident occurred or the time when the safety hazard existed but was eliminated;
[0085] Perform text cleaning and text standardization on all elements in the text set P to obtain text samples;
[0086] All text samples are segmented using the ICTCLAS Chinese lexical analysis system to obtain the word set corresponding to each text sample;
[0087] Use the TF-IDF algorithm to calculate the TF-IDF value of each word in the word set;
[0088] Vectorize all text samples and output text samples P t Corresponding text vector set Among them, P t is the tth text in the text set P, M is the total number of texts, For text P t The word vector of
[0089] Perform feature extraction on the text vector set to obtain the feature vector.
[0090] Vectorize all text samples through the text sample vectorization module;
[0091] The method by which the text sample vectorization module vectorizes all text samples includes:
[0092] Initialize the parameter sliding window width ω so that the sliding window passes through the text sample P t For the corresponding word set, the co-occurrence relationship is used to construct the edge between any two points and build the text keyword graph;
[0093] Establish a node weight score model for the text keyword graph:
[0094] Among them, S(V i ) is the node weight score of the i-th node, V i and V j are the i-th node and the j-th node in the text keyword graph, respectively, W(V i ) is V i TF-IDF value, d is the damping factor of the text set, I(V j ) is P t All connections to V i The set of other nodes of O(V j ) is P t Midpoint V i The set of other nodes it is connected to;
[0095] Iterate the i and j values until the difference between the two node weight scores is less than the set iteration stop threshold;
[0096] Arrange the weight scores of each node in the text keyword graph in descending order and extract the top M key The words corresponding to each node constitute the keyword set K;
[0097] Calculate the text sample P t The word vector Among them, V k is the word vector of the kth keyword in the keyword set K, W(V k ) is V k The corresponding TF-IDF value.
[0098] Embodiment 3:
[0099] The electronic device of this embodiment includes at least one processor and at least one memory communicatively connected to the processor; wherein the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method described in Example 1.
[0100] The electronic device comprises a processor, a memory and a bus, wherein the processor and the memory communicate with each other via the bus. The processor is used to call program instructions in the memory to execute the method provided in the first embodiment.
[0101] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the embodiment of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0102] Embodiment 4:
[0103] The non-transitory computer-readable storage medium of this embodiment stores computer instructions, and the computer instructions enable the computer to execute the method described in Example 1. The non-transitory computer-readable storage medium of the present invention can store computer instructions, and the computer instructions enable the computer to execute the method of the present invention, facilitating automatic control.
[0104] An embodiment of the present invention further provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method provided in Embodiment 1 is implemented.
[0105] The present invention is not limited to the above-mentioned optional implementation modes. Anyone can derive other various forms of products under the inspiration of the present invention. However, no matter what changes are made in the shape or structure, all technical solutions that fall within the scope defined by the claims of the present invention fall within the protection scope of the present invention.
Claims
1. A safety early warning method based on a safety accident hidden danger report text, characterized in that: The following steps are involved: Acquire historical data of safety accident hidden danger reports, and obtain a data set after data processing the historical data of safety accident hidden danger reports; Divide the dataset into training and testing sets; Using safety accident potential reports as input and safety accident warnings as output, we build a machine learning algorithm model and train the machine learning algorithm model through data sets; Obtain new safety accident hazard reports, process their data, and input them into the machine learning algorithm model, which then outputs prediction information.
2. The safety early warning method and early warning terminal based on the safety accident potential risk report text according to claim 1 are characterized by: The safety accident hidden danger historical report data includes hidden danger reports before the safety accident occurred and hidden danger reports that had safety hidden dangers but had been checked and eliminated.
3. The safety early warning method and early warning terminal based on the safety accident potential hazard report text according to claim 1 are characterized by: The specific methods of data processing include: The M safety accident potential reports are constructed into a text set P = {P1, P2, ..., P M }, M is the number of all safety accident potential hazard reports within T time before the accident time point, and the accident time point is the time when the safety accident occurred or the time when the safety hazard existed but was eliminated; Perform text cleaning and text standardization on all elements in the text set P to obtain text samples; All text samples are segmented using the ICTCLAS Chinese lexical analysis system to obtain the word set corresponding to each text sample; Use the TF-IDF algorithm to calculate the TF-IDF value of each word in the word set; Vectorize all text samples and output text samples P t Corresponding text vector set Among them, P t is the tth text in the text set P, M is the total number of texts, For text P t The word vector of Perform feature extraction on the text vector set to obtain the feature vector.
4. The safety early warning method and early warning terminal based on the safety accident potential risk report text according to claim 3 are characterized by: The methods for vectorizing all text samples include: Initialize the parameter sliding window width ω so that the sliding window passes through the text sample P t For the corresponding word set, the co-occurrence relationship is used to construct the edge between any two points and build the text keyword graph; Establish a node weight score model for the text keyword graph: Among them, S(V i ) is the node weight score of the i-th node, V i and V j are the i-th node and the j-th node in the text keyword graph, respectively, W(V i ) is V i TF-IDF value, d is the damping factor of the text set, I(V j ) is P t All connections to V i The set of other nodes of O(V j ) is P t Midpoint V i The set of other nodes it is connected to; Iterate the i and j values until the difference between the two node weight scores is less than the set iteration stop threshold; Arrange the weight scores of each node in the text keyword graph in descending order and extract the top M key The words corresponding to each node constitute the keyword set K; Calculate the text sample P t The word vector Among them, V k is the word vector of the kth keyword in the keyword set K, W(V k ) is V k The corresponding TF-IDF value.
5. A safety warning terminal based on a safety accident potential risk report text, used in a safety warning method based on a safety accident potential risk report text as claimed in any one of claims 1 to 4, characterized in that: It includes a data set acquisition unit: acquiring historical data of safety accident hidden danger reports, and obtaining a data set after performing data processing on the historical data of safety accident hidden danger reports; Dataset division unit: divide the data set into training set and test set; Machine learning algorithm model training unit: takes safety accident potential report as input and safety accident warning as output, builds machine learning algorithm model, and trains the machine learning algorithm model through data set; Prediction information output unit: obtain new safety accident hazard reports, process the data and input them into the machine learning algorithm model, and output prediction information through the machine learning algorithm model.
6. The safety early warning terminal based on the safety accident potential hazard report text according to claim 5 is characterized by: The safety accident hidden danger historical report data includes hidden danger reports before the safety accident occurred and hidden danger reports that had safety hidden dangers but had been checked and eliminated.
7. The safety early warning terminal based on the safety accident potential hazard report text according to claim 5 is characterized by: The data set acquisition unit and the prediction information output unit both include a data processing module; The data processing module constructs M safety accident potential reports into a text set P = {P1, P2, ..., P M }, M is the number of all safety accident potential hazard reports within T time before the accident time point, and the accident time point is the time when the safety accident occurred or the time when the safety hazard existed but was eliminated; Perform text cleaning and text standardization on all elements in the text set P to obtain text samples; All text samples are segmented using the ICTCLAS Chinese lexical analysis system to obtain the word set corresponding to each text sample; Use the TF-IDF algorithm to calculate the TF-IDF value of each word in the word set; Vectorize all text samples and output text samples P t Corresponding text vector set Among them, P t is the tth text in the text set P, M is the total number of texts, For text P t The word vector of Perform feature extraction on the text vector set to obtain the feature vector.
8. The safety early warning terminal based on the safety accident potential hazard report text according to claim 7 is characterized by: Vectorize all text samples through the text sample vectorization module; The method by which the text sample vectorization module vectorizes all text samples includes: Initialize the parameter sliding window width ω so that the sliding window passes through the text sample P t For the corresponding word set, the co-occurrence relationship is used to construct the edge between any two points and build the text keyword graph; Establish a node weight score model for the text keyword graph: Among them, S(V i ) is the node weight score of the i-th node, V i and V j are the i-th node and the j-th node in the text keyword graph, respectively, W(V i ) is V i TF-IDF value, d is the damping factor of the text set, I(V j ) is P t All connections to V i The set of other nodes of O(V j ) is P t Midpoint V i The set of other nodes it is connected to; Iterate the i and j values until the difference between the two node weight scores is less than the set iteration stop threshold; Arrange the weight scores of each node in the text keyword graph in descending order and extract the top M key The words corresponding to each node constitute the keyword set K; Calculate the text sample P t The word vector Among them, V k is the word vector of the kth keyword in the keyword set K, W(V k ) is V k The corresponding TF-IDF value.
9. An electronic device, characterized in that: The method comprises at least one processor and at least one memory in communication with the processor; wherein the memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 4 by calling the program instructions.
10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Production-enterprise-oriented potential safety hazard quantitative assessment and early warning system
CN103559551A
Intelligent identification method and device for potential safety hazards and storage medium
CN110069773A
Production safety accident potential early warning method and system based on text mining
CN114757452A