Method and device for determining power accident risk, electronic equipment and storage medium

By extracting textual features and performing sparse feature analysis on power accident textual data, a risk level table is generated, which solves the problem of insufficient identification of sparse risk features in power grid personal accident analysis and improves the comprehensiveness and accuracy of risk identification.

CN123179339APending Publication Date: 2026-11-27HUIZHOU POWER SUPPLY BUREAU OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611375213.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively utilize unstructured text information, especially sparse risk features, in power grid personal accident analysis, resulting in insufficient comprehensiveness and accuracy in risk identification.

Method used

By extracting text features from power accident text data, word vectors and word segmentation weights are generated. The sparsity coefficient is determined by combining the sparsity rate, frequent items are screened, and the correlation between risk features and accident levels is established to generate a risk level table.

Benefits of technology

It improves the comprehensiveness and accuracy of power accident risk identification, enhances the ability to mine sparse risk characteristics, and provides effective risk decision support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179339A_ABST
    Figure CN123179339A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a power accident risk determination method and device, electronic equipment and storage medium. The method comprises: obtaining power accident text data, extracting text features from the power accident text data to obtain word vectors and word weights of each word segmentation; determining a sparsity coefficient according to the sparsity of each word segmentation belonging to a feature item, and determining the importance of each accident record according to the word weight and the sparsity coefficient; screening frequent items according to the importance, determining the association between each risk feature and each accident level, and generating a risk level table according to the association for risk decision support for power accident warning. The method is used to improve the mining ability of text risk information and sparse risk features in power grid personal accident analysis, and to improve the risk identification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power safety risk analysis, and in particular to a method, apparatus, electronic device and storage medium for determining power accident risks. Background Technology

[0002] In the field of power safety production, statistical analysis and association rule mining are typically conducted on power grid personal injury accidents based on historical accident records, accident classification labels and other structured information.

[0003] However, this type of method has limited utilization of unstructured text such as accident descriptions, and often struggles to identify implicit relationships in operational details, environmental conditions, and management factors. At the same time, it lacks sensitivity in identifying relationships for sparse features that occur infrequently but have a significant risk impact, thus limiting the comprehensiveness, accuracy, and adaptability of risk analysis.

[0004] Therefore, how to improve the ability to mine textual risk information and sparse risk features in power grid personal accident analysis in order to improve the accuracy of risk identification has become a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, electronic device, and storage medium for determining power accident risks, in order to improve the ability to mine textual risk information and sparse risk features in power grid personal accident analysis, thereby enhancing the accuracy of risk identification.

[0006] In a first aspect, embodiments of this application provide a method for determining the risk of power accidents, including:

[0007] Acquire text data of power accidents, extract text features from the power accident text data, and obtain word vectors and word weights for each segment;

[0008] The sparsity coefficient is determined based on the sparsity rate of the feature terms to which each word belongs, and the importance of each incident record is determined based on the word weight and the sparsity coefficient.

[0009] Frequent items are filtered based on importance to determine the correlation between each risk characteristic and each accident level, and a risk level table is generated based on the correlation to support risk decision-making for power accident early warning.

[0010] In one possible embodiment, text feature extraction is performed on the power accident text data to obtain the word vectors and word weights of each segment, including:

[0011] The text data of power accidents is segmented into words, and stop words are removed based on a preset stop word list to obtain a segmented sequence.

[0012] The word segmentation sequence is input into the word vector model for training to generate word vectors for each segmentation;

[0013] The weight of each word segment is determined based on the similarity between the word vector of each word segment and each accident level.

[0014] In one possible embodiment, the segmentation weight of each segment is determined based on the similarity between the word vector of each segment and each incident level, including:

[0015] Cluster the word vectors of each word segment to determine the cluster category to which each word segment belongs;

[0016] The similarity between each word segment and each accident level is determined based on the cosine similarity between the word vector of each segment and the word vector corresponding to each accident level.

[0017] The segmentation weight of each word is determined based on the correspondence between similarity and the cluster category to which the word belongs and the accident level.

[0018] In one possible embodiment, the sparsity coefficients are determined based on the sparsity rate of the feature terms to which each word belongs, including:

[0019] The number of accidents with missing features in the accident records is counted, and the sparsity rate of each feature is calculated. The sparsity rate is the ratio of the number of missing accidents to the total number of accidents.

[0020] The average sparsity is determined by the average sparsity of each feature whose sparsity falls within a preset range.

[0021] The sparsity coefficient is determined based on the average sparsity, and the sparsity coefficient is negatively correlated with the average sparsity.

[0022] In one possible embodiment, determining the sparsity coefficients based on the average sparsity rate includes:

[0023] Calculate the complement of the average sparsity to obtain the difference value;

[0024] The reciprocal of the difference value is used as the sparsity coefficient.

[0025] In one possible implementation, the importance of each incident record is determined based on word segmentation weights and sparsity coefficients, including:

[0026] Obtain the word segmentation weights of each word in the accident record;

[0027] Calculate the average weight of each word segmentation to obtain the average word segmentation weight;

[0028] The importance of the incident record is obtained by multiplying the average word segmentation weight by the sparsity coefficient.

[0029] In one possible embodiment, frequent items are filtered according to importance to determine the correlation between each risk characteristic and each accident level, and a risk level table is generated based on the correlation, including:

[0030] Calculate the weighted support of each feature item. The weighted support is the ratio of the sum of the importance of each feature item in each accident record to the sum of the importance of all accident records.

[0031] Feature terms whose weight support reaches a preset support threshold are identified as frequent terms;

[0032] The correlation between each risk characteristic and each accident level is determined based on the frequency of occurrence;

[0033] A risk level table is generated based on the correlation between each risk characteristic and each accident level.

[0034] Secondly, embodiments of this application provide a device for determining the risk of power accidents, comprising:

[0035] The acquisition module is used to acquire text data of power accidents, extract text features from the text data of power accidents, and obtain word vectors and word weights for each segment;

[0036] The first determination module is used to determine the sparsity coefficient based on the sparsity rate of the feature terms to which each word belongs, and to determine the importance of each incident record based on the word weight and the sparsity coefficient.

[0037] The second determination module filters frequent items based on importance, determines the correlation between each risk characteristic and each accident level, and generates a risk level table based on the correlation to support risk decision-making for power accident early warning.

[0038] Thirdly, embodiments of this application provide a device for determining power accident risk, including: a memory and a processor;

[0039] The memory stores instructions that the computer executes;

[0040] The processor executes computer execution instructions stored in memory, causing the processor to perform the methods described above.

[0041] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0042] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0043] The method, apparatus, electronic device, and storage medium for determining power accident risks provided in this application acquire power accident text data and extract text features. By combining word segmentation weights and the sparsity of feature items to which each word belongs, the importance of accident records is determined. This allows for simultaneous consideration of the expressive strength of textual risk information and the impact of sparse risk features during accident analysis. Furthermore, by filtering frequent items based on importance, determining the correlation between each risk feature and each accident level, and generating a risk level table, the comprehensiveness, accuracy, and adaptability of power accident risk identification can be improved, providing effective risk decision support for power accident early warning. Attached Figure Description

[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0045] Figure 1 The flowchart for determining the risk of power accidents provided in this application Figure 1 ;

[0046] Figure 2 A flowchart illustrating the method for determining power accident risk provided in this application. Figure 2 ;

[0047] Figure 3 This is a schematic diagram of the clustering visualization results provided in this application;

[0048] Figure 4 A diagram illustrating the correlation between different risk characteristics and different accident levels provided for this application;

[0049] Figure 5 A diagram illustrating the overall correlation ranking of the risk characteristics provided for this application;

[0050] Figure 6 The risk level table generation and platform deployment diagram provided for this application;

[0051] Figure 7 A schematic diagram of the structure of the device for determining power accident risk provided in this application;

[0052] Figure 8 A schematic diagram of the equipment for determining power accident risk provided in this application.

[0053] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0054] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.

[0055] In the field of power safety production technology, power grid personal injury accident analysis is typically applied to safety supervision platforms, production management systems, or accident database analysis systems. These systems generally extract accident text, accident levels, and risk tags from accident reports, event compilations, and on-site records, and complete risk assessment in data processing and analysis modules.

[0056] Current power grid personal injury accident analyses are mostly based on historical accident records, performing statistical analysis according to structured information such as accident type, accident level, time, location, and responsibility category, or using association rule mining algorithms to identify the correspondence between risk factors and accident outcomes. These methods primarily rely on pre-organized tagged data, with limited depth in processing textual content such as accident details, cause descriptions, and corrective action recommendations.

[0057] When accident texts contain operational procedures, omitted descriptions, environmental conditions, and management failure information, traditional methods often can only extract a small number of explicit terms, making it difficult to identify the implicit risk associations. For features that appear infrequently but have serious consequences, conventional association analysis usually relies on word frequency or fixed weights for filtering, which easily excludes low-frequency, high-risk factors from frequent items, leading to risk identification results that are biased towards common scenarios.

[0058] This approach results in an incomplete correlation between accident levels and risk characteristics, and the generated analysis results are insufficient to support early warning scenarios. When faced with new accident patterns, special operating conditions, or management-related hazards, the accuracy and adaptability of risk assessment will be affected.

[0059] Based on the aforementioned technical issues, and addressing the problems of insufficient utilization of semantic information and insensitivity to sparse risk feature identification in power accident texts, a processing approach combining word segmentation semantic weights and sparse feature weights is introduced. The accident text is first subjected to text feature extraction to obtain word vectors and weights for each segment. Then, the sparsity coefficient is determined by combining the sparsity rate of the feature terms to which each segment belongs, which is used to distinguish between common risk information and low-frequency critical risk information.

[0060] Based on this, word segmentation weights and sparsity coefficients are combined into the importance calculation of accident records. Frequent items are then selected based on importance to establish the correlation between risk characteristics and accident levels, and a risk level table is generated. This processing can be deployed in the data acquisition layer, data processing layer, algorithm calculation layer, and decision support layer of the power industry safety production management platform to support power accident early warning and risk decision support.

[0061] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0062] Figure 1 The flowchart for determining the risk of power accidents provided in this application Figure 1 ,like Figure 1 As shown, the method includes:

[0063] S101: Obtain text data of power accidents, extract text features from the text data of power accidents, and obtain word vectors and word weights for each segment.

[0064] In this application, power accident text data is used as the method input to carry textual descriptions of the accident process, work steps, site environment, personnel behavior, equipment status, management measures, accident causes, and accident results.

[0065] Text feature extraction is used to convert the original text into computable semantic features, word vectors are used to represent the semantic information of each word segment, and word segment weights are used to quantify the strength of the association between each word segment and the accident level.

[0066] In practical implementation, the execution entity can be deployed at the data processing layer or algorithm calculation layer of the power industry safety production management platform. It reads accident text from the accident management platform, historical accident database, accident bulletin documents, investigation report documents, and rectification closure records. It then merges the titles, text, notes, and level identifiers of the same accident record to form a power accident text dataset organized by accident record number. To ensure consistency in subsequent calculations, the text can first undergo standardized encoding, format cleaning, and field regularization.

[0067] In one possible embodiment, the word vectors of each segment can be obtained by semantic processing and vectorization of the power accident text, and the corresponding segment weights can be determined based on the semantic association between the segment and the accident level.

[0068] After this processing, word segments with explicit risk semantics can obtain higher weights, while word segments with weak semantics can obtain lower weights.

[0069] In this embodiment, to convert text that does not conform to input rules into a computable form, text preprocessing is performed first. For the original text corpus and feature item text descriptions, the precise mode of a word segmentation library is used to perform word segmentation processing on the text, converting sentences in the original corpus into context sentences composed of segmented words.

[0070] To improve the quality and efficiency of word segmentation, a dedicated vocabulary (including proper nouns such as power industry terms, equipment names, and operation names) is established for the constructed text corpus, and a dedicated stopword list is established based on the Harbin Institute of Technology Chinese stopword list (expanding common meaningless words in power accident texts, such as "的", "了", "在", etc.). Stopwords are removed based on the preset stopword list to obtain a segmented word sequence that retains core semantic information, which helps focus on the important content of the text.

[0071] Then, the word-segmented sentence list is used to train a word vector model. The word vector model uses a shallow neural network to embed words into a low-dimensional vector space to capture the semantic information of words. Since the dataset constructed in this embodiment is small (373 records), the vocabulary is usually small, and the context information of high-frequency words is relatively sufficient. Therefore, a context-based word prediction model is selected to train the word vector model. The context-based word prediction model has a fast training speed on small datasets and can better utilize context information. An appropriate parameter combination is selected according to the silhouette coefficient (in this embodiment, vector_size is set to 100, and window is set to 5). The segmented word sequence is input into the model for training to generate word vectors for each segmented word, so that segmented words strongly related to accident semantics such as "accidental contact", "live work", and "lack of supervision" can obtain stable vector representations.

[0072] Through stopword filtering, dedicated vocabulary enhancement, and word vector model training, the key semantics in power accident texts are quantitatively expressed, converting the process descriptions and cause descriptions that were originally difficult to directly participate in statistical analysis into computable vector forms, providing input for subsequent semantic weight calculation.

[0073] Based on the above analysis, this step maps the semantic information in the accident text into word vectors and further quantifies them into segmented word weights, so that the process descriptions and cause descriptions that were originally difficult to directly participate in statistical analysis have a unified calculation form, thereby providing a basis for subsequent analysis.

[0074] It should be understood that the above examples are only illustrative and not restrictive. The specific calculation methods of the word vector model and segmented word weights can be adapted according to the scale of the accident text and the deployment environment, as long as the word vectors and segmented word weights of each segmented word can be obtained.

[0075] S102: Determine the sparsity coefficient based on the sparsity rate of the feature terms to which each word belongs, and determine the importance of each accident record based on the word weight and the sparsity coefficient.

[0076] In this application, sparsity rate is used to characterize the sparseness of the distribution of the corresponding feature item in all power accident text data, sparsity coefficient is used to reflect the influence weight of the sparsity on the analysis results, and the importance of accident record is used to comprehensively characterize the contribution of a single accident record in risk analysis.

[0077] To achieve this step, a feature term set is first established based on the word segmentation results obtained in S101. These feature terms can be word segments or combinations of word segments used to characterize accident risk information. The distribution of each feature term across all accident records is statistically analyzed, and the corresponding sparsity rate is determined accordingly. Then, the corresponding sparsity coefficient is determined based on the sparsity rate.

[0078] In one possible embodiment, to prevent low-frequency but accident-oriented features from being overwhelmed by common terms in subsequent analysis, the sparsity rate can be converted into a sparsity coefficient to reflect the differentiated impact of different feature terms on the analysis results.

[0079] Based on this, for each incident record, the segmentation weights and sparse coefficients corresponding to all the segmented words or feature items it contains are extracted and jointly calculated to determine the importance of the incident record. In this way, incident records that contain both highly semantically related segmented words and sparse risk features will receive higher importance.

[0080] In this step, word segmentation weights are used to characterize the strength of semantic associations, and sparsity coefficients are used to characterize risk information that is sparsely distributed but cannot be ignored. The importance of the accident record formed by the combination of the two no longer depends solely on the number of occurrences, but takes into account both text semantics and feature sparsity.

[0081] For infrequent but serious operational conditions, management failure modes, and abnormal environmental states, this processing preserves their analytical contribution at the record level, ensuring that subsequent frequent item screening is not limited to high-frequency, common scenarios. Based on the above analysis, this step solves the problem of easily excluding low-frequency, high-risk factors when screening solely by word frequency or fixed weights, making the importance of accident records more consistent with the comprehensive analysis requirements of severity, implicitness, and sparsity in power accident risk identification scenarios.

[0082] It should be understood that the above examples are for demonstration purposes only and are not limiting. The specific functional forms of sparsity rate, sparsity coefficient and importance can be adjusted according to the accident sample size and risk analysis accuracy requirements, as long as the importance of each accident record can be determined based on word segmentation weight and sparsity information.

[0083] S103: Filter frequent items according to importance, determine the correlation between each risk characteristic and each accident level, and generate a risk level table based on the correlation to support risk decision-making for power accident early warning.

[0084] In this application, frequent terms are used to represent feature terms or feature combinations that are retained with the support of importance, risk features are used to represent risk factors that can participate in early warning judgment, correlation relationships are used to characterize the correspondence between risk features and accident levels, and risk level tables are used to output analysis results that can directly serve power accident early warning.

[0085] In practical implementation, based on the importance of the accident records obtained in S102, frequent items can be filtered for feature items in all accident records, and feature items or feature combinations related to accident risk analysis can be retained.

[0086] In one possible implementation, after screening frequent items, risk characteristics are summarized for these frequent items. The summarization method could be to merge semantically similar frequent items pointing to the same risk category into a unified risk characteristic. Subsequently, a correlation is established between each risk characteristic and each accident level. Specifically, the corresponding correlation strength can be calculated based on the distribution of risk characteristics in samples of different accident levels.

[0087] If a certain risk characteristic is mainly concentrated in samples of higher accident levels, then there is a strong correlation between the risk characteristic and the higher accident level; if a certain risk characteristic is mainly distributed in samples of general accidents, then there is a strong correlation between it and the corresponding level.

[0088] After organizing the correlation strength between each risk characteristic and each accident level, the data is converted into a risk level table according to preset rules. Based on this table, when the platform receives new accident event text, violation record text, or hidden danger investigation text, it can extract the corresponding characteristics, match them with the risk level table, and output the corresponding warning level or handling prompt.

[0089] In this step, the screening of frequent items is not based solely on the number of times they appear on the surface, but rather on the importance of the incident records. Therefore, sparse but critical features can still be included in the analysis if they meet the corresponding screening criteria.

[0090] The establishment of the association links the text risk characteristics with the accident level into a computable mapping result, and the risk level table then solidifies this mapping result into a data object that can be directly called by the business system.

[0091] Based on the above analysis, it can be seen that this application uses a processing route that combines word segmentation semantic weight and sparse feature weight to transform the implicit risks in the accident process, cause description and management failure information into structured results that are related to the accident level. This makes the risk identification results no longer biased towards common situations and enables the early warning scenarios to cover new accident patterns, special operating conditions and management hazards.

[0092] It should be understood that the above examples are for demonstration purposes only and are not limiting. The calculation method of the correlation, the rules for summarizing risk characteristics, and the data structure of the risk level table can all be adapted according to the interface requirements of the power industry business system, as long as they can achieve risk decision support for power accident early warning.

[0093] Based on the above analysis, this application provides a method for determining the risk of power accidents, including acquiring power accident text data, extracting text features from the power accident text data to obtain word vectors and word weights for each segment; determining the sparsity coefficient based on the sparsity rate of the feature items to which each segment belongs, and determining the importance of each accident record based on the word weights and sparsity coefficients; filtering frequent items based on importance, determining the correlation between each risk feature and each accident level, and generating a risk level table based on the correlation for risk decision support for power accident early warning.

[0094] In this application, by semantically vectorizing the accident text and introducing feature sparsity adjustment, the semantic association information of word segmentation and low-frequency key risk information are jointly incorporated into the accident record importance calculation. Then, importance drives frequent item screening and association analysis, enabling the association results between accident level and risk features to cover common risks and sparse high-risk scenarios. The generated risk level table can be directly used for platform-side early warning judgment, risk ranking, and decision support. It should be understood that the above example is merely illustrative and not limiting.

[0095] The method for determining power accident risks provided in this application acquires power accident text data and extracts text features. It then determines the importance of accident records by combining word segmentation weights and the sparsity of the feature items to which each word belongs. This method can simultaneously consider the expressive strength of text risk information and the impact of sparse risk features during accident analysis. Furthermore, by filtering frequent items based on importance, determining the correlation between each risk feature and each accident level, and generating a risk level table, the method can improve the comprehensiveness, accuracy, and adaptability of power accident risk identification, providing effective risk decision support for power accident early warning.

[0096] Figure 2 A flowchart illustrating the method for determining power accident risk provided in this application. Figure 2 ,like Figure 2 As shown, in this embodiment... Figure 1Based on the examples, a method for determining power accident risk is described in detail, which includes:

[0097] S301. Perform word segmentation on the power accident text data, remove stop words based on the preset stop word list to obtain the word segmentation sequence; input the word segmentation sequence into the word vector model for training to generate word vectors for each word segmentation; determine the word segmentation weight of each word segmentation based on the similarity between the word vectors of each word segmentation and each accident level.

[0098] In practical processing, the text in accident reports, event compilations, or on-site records is first segmented into Chinese words. Then, a pre-defined stop word list is used to remove modal particles, prepositions, and words with weak semantic relevance to the accident, resulting in a segmented sequence that retains core semantic information. The word vector model can be trained using context-based prediction. After inputting the segmented sequence into the model, it learns the co-occurrence relationships between words, enabling stable vector representations for words such as "accidental contact," "electrified," and "lack of supervision." In practical applications, the model can also choose other training methods capable of generating word vectors; this application does not limit this choice.

[0099] Subsequently, the word vectors of each segmented word are compared with the accident level vectors corresponding to each accident level. The accident level vectors can be obtained from the accident level name, level description, or sample text associated with the level. Segmented words with higher similarity indicate a stronger semantic association with the corresponding accident level and are therefore assigned a larger segmentation weight; segmented words with lower similarity are assigned a smaller weight. The obtained segmentation weights can be further used for subsequent importance calculations and risk feature screening.

[0100] This processing method uses stop word filtering, word vector training, and level similarity mapping to quantify the key semantics in power accident texts and enable word segmentation weights to reflect the strength of their association with the accident level, thus providing input for subsequent sparse feature recognition and accident level association analysis.

[0101] By adopting this method, key words related to the severity level in the accident text can obtain higher weights, while low-related terms are relatively weakened. The text feature extraction results are closer to the semantic essence of the accident, thereby improving the targeting of risk feature screening and the accuracy of subsequent relation generation.

[0102] In one possible implementation, the segmentation weight of each segment is determined based on the similarity between the word vector of each segment and each accident level, including: performing clustering processing on the word vector of each segment to determine the cluster category to which each segment belongs; determining the similarity between each segment and each accident level based on the cosine similarity between the word vector of each segment and the word vector corresponding to each accident level; and determining the segmentation weight of each segment based on the similarity and the correspondence between the cluster category to which the segment belongs and the accident level.

[0103] In practical implementation, each word segment in the accident text can be input as a word vector representation. K-means clustering, hierarchical clustering, or other vector clustering methods are then used to classify the word vectors, obtaining the cluster category to which each word belongs. Subsequently, the cosine similarity of each word vector with the word vectors corresponding to different accident levels is calculated to obtain the similarity value of each word relative to each accident level.

[0104] Then, based on the preset mapping relationship between the cluster category to which the word belongs and the accident level, the similarity value is matched and judged, and the matching result is used as the basis for forming the word weight, so that the word segments that are semantically close to the accident level and have the same category correspondence receive higher weights.

[0105] Specifically, the word vectors of each segment are first clustered to determine the cluster category to which each segment belongs. This embodiment uses a non-linear dimensionality reduction algorithm to reduce the generated high-dimensional word vectors (100 dimensions) to a two-dimensional plane for visualization and analysis. Then, the K-means clustering algorithm is used to cluster the dimensionality-reduced word vectors. For example... Figure 3 As shown, Figure 3 The diagram below illustrates the clustering visualization results provided in this application. The word vectors in the power accident dataset are effectively clustered into four classes, each corresponding to a different accident level semantic cluster.

[0106] Then, the similarity between each word segment and each accident level is determined based on the cosine similarity between the word vector of each segment and the word vector corresponding to each accident level. The word vector corresponding to each accident level can be obtained by training from the accident level name, level description, or sample text associated with the level.

[0107] Finally, the segmentation weight of each word is determined based on the similarity and the correspondence between the cluster category to which the word belongs and the incident level. If a word has a high cosine similarity to a certain incident level, and the cluster category to which the word belongs has a consistent category mapping relationship with the incident level, then a larger word weight is assigned. The calculation formula is as follows:

[0108]

[0109] in, For the current word segmentation, Accident level, For the current word segmentation and The cosine similarity is used, and the word segmentation belongs to the same cluster category as the accident level; i is set to different values ​​according to the accident level. When the accident level is minor, moderate, major, or serious, the corresponding i is 0, 1, 2, or 3.

[0110] For example, if the word vector of the term "misoperation" has a cosine similarity of 0.85 with the word vector corresponding to the "general" accident level, and the word vector belongs to the same cluster category as the "general" accident level, then its word segmentation weight is 0.85 × 2. 1 =1.7. If the similarity to the "major" accident level is 0.6, then its word segmentation weight is 0.6 × 2. 3 =4.8, reflecting the stronger indicative nature of this word segmentation in major accidents.

[0111] By incorporating both vector similarity and category mapping into the weight calculation, word segments within the same semantic cluster that are more strongly associated with the accident level receive higher weight outputs. Word segments with clear risk semantics (such as "misoperation" and "lack of supervision") receive higher weights, while word segments with weak semantics (such as "perform" and "complete") receive lower weights, thereby improving the accuracy of word segment weights in indicating the accident level.

[0112] This weight determination method incorporates both vector similarity and category mapping into the weight calculation, so that word segments that are more strongly associated with the accident level within the same semantic cluster receive higher weight outputs, which are then used for subsequent importance calculations and frequent item filtering.

[0113] This allows for the joint representation of semantic and hierarchical information in accident texts, improving the accuracy of word segmentation weights in indicating accident levels and enhancing the ability to identify low-frequency but critical risk terms.

[0114] S302. Count the number of accidents with missing features in the accident records, calculate the sparsity rate of each feature, which is the ratio of the number of missing accidents to the total number of accidents; determine the average sparsity rate of each feature whose sparsity rate falls within the preset range; determine the sparsity coefficient based on the average sparsity rate.

[0115] Among them, the sparsity coefficient is negatively correlated with the average sparsity rate.

[0116] In practical processing, each feature item is first retrieved from the accident record database, and the number of samples that do not appear in the accident records is counted. This number is then divided by the total number of accidents to obtain the sparsity rate. A preset range is used to limit the sparsity rate interval for the mean calculation. This interval can be configured according to the overall distribution of the accident records to ensure that the feature items involved in the calculation maintain a similar degree of sparsity. The average sparsity rate is obtained by averaging the sparsity rates falling within this interval. The average sparsity rate is then input into a preset mapping relationship to calculate the sparsity coefficient. The mapping relationship can be set as an inverse function, a piecewise decreasing function, or a lookup table function so that the sparsity coefficient decreases as the average sparsity rate increases.

[0117] In the association analysis processing of this application, the sparsity coefficient is used to compensate for low-frequency but key feature items, so that the importance of the accident record formed by the combination of word segmentation weight and sparsity coefficient can simultaneously reflect explicit high-frequency information and implicit sparse information, thereby providing a computational basis for frequent item screening and risk level table generation.

[0118] In this embodiment, 10 risk factor dimensions are used as feature terms. The study found that there are some relatively sparse feature terms in the accident dataset (such as "command error" and "inadequate dual prevention mechanism for risks and hidden dangers"). Their appearance in accidents often reflects the potential correlation between accident levels. These feature terms appear very infrequently, but may have a strong correlation with the accidents. If only word segmentation weights are used to determine the importance of each accident record, potential correlations may be ignored. Therefore, a sparsity coefficient is designed and added to the importance calculation.

[0119] The number of accidents with missing features in the accident records is counted, and the sparsity rate of each feature is calculated. The sparsity rate is the ratio of the number of missing accidents to the total number of accidents.

[0120] For each feature item Ii, count the number n of accident records that do not appear in all 373 accident records, then calculate the sparsity of that feature item. , where N=373 is the total number of accidents.

[0121] The preset ranges α and β can be configured according to the accident sample distribution (e.g., setting α=0.70, β=0.95), filtering out features whose sparsity falls within this range, and calculating the average of their sparsity:

[0122]

[0123] Where c is the number of feature items falling within the preset range.

[0124] Specifically, the complement of the average sparsity is calculated to obtain the difference value. The reciprocal of the difference value is used as the sparsity coefficient.

[0125]

[0126] If the difference value is too small, the reciprocal result can be limited by using preset correction rules to avoid excessive numerical fluctuations.

[0127] For example, if the feature "command error" appears only 85 times in 373 accident records, with 288 missing entries and a sparsity rate of 0.772; and the feature "inadequate dual prevention mechanism for risks and hidden dangers" has 295 missing entries and a sparsity rate of 0.791; averaging the sparsity rates of features falling within the preset range yields pavg = 0.78, then the sparsity coefficient coef = 1 / (1−0.78) ≈ 4.55. The larger this sparsity coefficient, the sparser the overall feature set, and the stronger the compensation effect for low-frequency but critical features.

[0128] By adopting the above method, the sparsity coefficient can be adaptively adjusted according to the overall sparsity of the feature terms, giving more weight to key features that appear less frequently in the accident sample in a way that is more consistent with the distribution state. This makes the importance calculation results more completely reflect the risk information in the accident text and improves the accuracy and stability of subsequent correlation determination.

[0129] In one possible implementation, the sparsity coefficients are determined based on the average sparsity rate, including: calculating the complement of the average sparsity rate to obtain the difference value; and determining the reciprocal of the difference value as the sparsity coefficient.

[0130] In the specific implementation, the sparsity of each feature item is first statistically analyzed, and the feature items participating in the mean calculation are selected based on a preset range to obtain the average sparsity.

[0131] Subsequently, the average sparsity rate is transformed according to the complement rule to obtain the difference value; the complement can be understood as the intermediate result obtained by subtracting the average sparsity rate from the preset benchmark value. Then, the difference value is reciprocalized to obtain the sparsity coefficient, which is input into the importance calculation process of the accident record, and works together with the word segmentation weight to screen frequent items.

[0132] If the difference value is too small, the reciprocal result can be limited by a preset correction rule to avoid excessive numerical fluctuations. In practical applications, the numerical correction rule can also take other forms, which are not limited in this application.

[0133] By transforming the average sparsity rate with its complement and then taking its reciprocal, the sparsity coefficient can be adjusted inversely with the change in the average sparsity rate, and a corresponding weight relationship can be formed with the sparse risk features in the accident text. This allows the subsequent construction of correlations to retain low-frequency key risk information and improve the matching accuracy and adaptability of the risk level table.

[0134] S303. Obtain the segmentation weight of each word in the accident record; calculate the average segmentation weight of each word to obtain the average segmentation weight; multiply the average segmentation weight by the sparsity coefficient to obtain the importance of the accident record.

[0135] In this scheme, each word segment in a single accident record is first assigned a weight. The weight can be determined by the similarity between the word segment and the word vector corresponding to each accident level, and mapped to a numerical value reflecting the strength of the risk association. Then, the weights of all words in the accident record are arithmetically averaged to obtain the average weight. The averaging process can use a fixed denominator to ensure that the weight representations between accident records of different lengths are comparable.

[0136] The average word segmentation weight is then multiplied by the sparse coefficient determined by the sparsity rate of the feature terms to obtain the importance of the incident record. The sparse coefficient is used to amplify the influence of low-frequency but key sparse features on the record's contribution, so that incident records with both high semantic weight and sparse characteristics correspond to higher importance.

[0137] In actual calculations, the importance of accident records can be used as a weighting basis for subsequent frequent item screening, retaining accident records with higher importance to participate in correlation mining, so that the correlation results between risk characteristics and accident levels can more centrally reflect key text information.

[0138] For different accident records, if the overall weight of the word segmentation is high and the corresponding feature items have a low frequency of occurrence, the importance obtained by averaging and multiplying by the sparsity coefficient is higher, thus obtaining a higher retention probability in the frequent item analysis.

[0139] After obtaining the word segmentation weights and sparsity coefficients, the importance of each incident record is determined based on the word segmentation weights and sparsity coefficients.

[0140] Specifically, obtain the segmentation weight of each word in the accident record; calculate the average segmentation weight of each word to obtain the average segmentation weight:

[0141]

[0142] Where n is the number of words in the incident record.

[0143] Then, the importance of the incident record is obtained by multiplying the average word segmentation weight by the sparsity coefficient:

[0144]

[0145] RI represents the importance of the incident record.

[0146] For example, an accident record contains 5 words with weights of 2.1, 1.8, 0.5, 3.2, and 1.4, respectively, and an average weight of 1.8. If the sparsity coefficient of the corresponding feature term for this record is 4.55, then the importance RI of this accident record is 1.8 × 4.55 = 8.19. If another accident record has an average weight of 1.5, but a corresponding sparsity coefficient of 1.0 (the feature term is not sparse), then its importance is 1.5, lower than the former.

[0147] By using the above method, semantic weight and sparsity information can be introduced at the level of a single accident record. This makes the importance calculation not dependent on the random fluctuations of a single high-weight term, but based on a comprehensive representation of the overall word segmentation weight level, thereby improving the adaptability of subsequent risk feature screening results to low-frequency high-risk accident texts.

[0148] S304. Calculate the weighted support of each feature item. The weighted support is the ratio of the sum of the importance of each feature item in each accident record to the sum of the importance of all accident records. Feature items whose weighted support reaches the preset support threshold are identified as frequent items. Determine the degree of correlation between each risk feature and each accident level based on the frequent items. Generate a risk level table based on the degree of correlation between each risk feature and each accident level.

[0149] In practice, the system summarizes the importance of each feature item in each accident record, and then calculates the ratio between the sum of the importance of each individual feature item and the sum of the importance of all accident records to obtain the weight support of each feature item.

[0150] For feature items whose weighted support reaches the preset support threshold, the system retains them as frequent items and uses these frequent items as the basis to count their frequency of occurrence, proportion, or weighted distribution in different accident levels, thereby determining the degree of correlation between each risk feature and each accident level.

[0151] Subsequently, risk characteristics, weighted support, and correlation levels are grouped and organized according to accident level to form a risk level table. This risk level table can be stored in the accident analysis database and accessed by the power safety supervision platform for accident early warning and risk decision support. The calculation of weighted support and correlation levels can be automatically completed by the calculation module based on historical accident records. In practical applications, the preset support threshold and correlation quantification rules can be adjusted according to the sample size of different power grid scenarios, which is not limited in this application.

[0152] Frequent items are filtered based on their importance to determine the correlation between each risk characteristic and each accident level.

[0153] In practical implementation, based on the importance of accident records, the weighted support of each feature item is calculated. The weighted support is the ratio of the sum of the importance of each feature item in each accident record to the sum of the importance of all accident records.

[0154]

[0155] Where Sup(Ii) is the characteristic term I i Weighted support, I i ∈Rj represents the characteristic term I i Does it exist in the accident record R? j In the expression, if the condition exists, the conditional expression returns 1; otherwise, it returns 0. RI j For accident record R j Importance.

[0156] Feature items whose weighted support reaches a preset support threshold are identified as frequent items. In this embodiment, the support threshold is set to 0.01 to mine as many frequent itemsets as possible and avoid missing low-frequency but critical feature items.

[0157] The correlation between each risk feature and each accident level is determined based on frequent itemsets. After obtaining frequent itemsets and their support using the text-weighted FP-Growth algorithm, the results of frequent 2-itemsets (i.e., combinations of "risk features-accident levels") are statistically analyzed to obtain the correlation between each risk feature and different accident levels.

[0158] like Figure 4 As shown, Figure 4 This diagram illustrates the correlation between different risk characteristics and different accident levels provided in this application. Figure 4 It can be seen that the correlation between general accident levels and various risk characteristics is relatively high, which is consistent with objective laws because general-level accidents account for a large proportion. Among them, "operational error" has the highest correlation with general accident levels, indicating that the weighted support of both in the entire dataset is the highest, demonstrating the importance and high frequency of operational errors in accidents. In the major accident level, eight dimensions have similar correlations, indicating that the occurrence of major accidents is often inseparable from these factors.

[0159] like Figure 5 As shown, Figure 4 The correlation between each risk characteristic and different accident levels is summed and arranged in descending order. Figure 5 A diagram illustrating the overall correlation ranking of the risk characteristics provided in this application. (By...) Figure 5It can be seen that the characteristic "operational error" has the greatest impact on power accidents, with a correlation coefficient of 0.88, followed by the characteristic "insufficient safety production education and training," with a correlation coefficient of 0.83. "Command error" has the lowest impact on accidents, with a correlation coefficient of 0.36. The impact of the other seven risk factors on power accidents is all in the range of 0.4 to 0.8.

[0160] In this embodiment, risk characteristics, weighted support, and correlation are grouped and organized according to accident level to form a risk level table. This risk level table is stored in the accident analysis database and accessed by the power safety supervision platform for accident early warning and risk decision support.

[0161] like Figure 6 As shown, Figure 6 This diagram illustrates the risk level table generation and platform deployment provided in this application. It demonstrates how the FP-Growth-based data mining algorithm is applied to historical personal accident datasets to reveal the correlation between data across various dimensions and the occurrence and development of personal accidents, automatically generating a personal accident risk level table. Finally, the algorithm is deployed to the platform to predict the risk level of the input data.

[0162] In this scheme, frequent items are screened by weighted support, which allows the feature selection process to reflect both the importance and cumulative contribution of the feature in the accident sample. Based on the frequent items, the correlation degree is further determined and a risk level table is generated, which makes the mapping relationship between accident level and risk feature more complete. The output results are more suitable for direct use in risk identification, level determination and early warning query, thereby improving the ability of accident analysis results to support complex samples and low-frequency high-risk features.

[0163] This application provides a method for determining the risk of power accidents. During execution, the method first acquires power accident text data, performs word segmentation on each accident record, and removes stop words based on a preset stop word list to form a corresponding word segmentation sequence.

[0164] The word segmentation sequence is input into the word vector model for training to generate word vectors for each word. Then, the word vectors of each word are clustered to determine the cluster category to which each word belongs. The cosine similarity between the word vector of each word and the word vector corresponding to each accident level is calculated to obtain the similarity between each word and each accident level. Finally, the word weight of each word is determined by combining the correspondence between the cluster category to which each word belongs and the accident level.

[0165] After obtaining the word segmentation weights, the number of missing incidents for each feature item in the incident records is counted, and the sparsity rate of each feature item is calculated as the ratio of the number of missing incidents to the total number of incidents. The average sparsity rate is obtained by averaging the sparsity rates of each feature item that fall within a preset range. The complement of the average sparsity rate is calculated to obtain the difference value, and the reciprocal of the difference value is determined as the sparsity coefficient. For each incident record, the word segmentation weight of each word in the incident record is obtained, the average word segmentation weight is calculated, and the average word segmentation weight is then multiplied by the sparsity coefficient to obtain the importance of the incident record.

[0166] Based on the importance of each accident record, the weighted support of each feature item is calculated. The weighted support is determined by the ratio of the sum of the importance of each feature item in each accident record to the sum of the importance of all accident records. Feature items whose weighted support reaches a preset support threshold are selected as frequent items. Then, based on the frequent items, the correlation between each risk feature and each accident level is determined. A risk level table is generated according to the correlation between each risk feature and each accident level, and this risk level table is used for risk decision support in power accident early warning.

[0167] The method for determining power accident risks provided in this application acquires power accident text data and extracts text features. It then determines the importance of accident records by combining word segmentation weights and the sparsity of the feature items to which each word belongs. This method can simultaneously consider the expressive strength of text risk information and the impact of sparse risk features during accident analysis. Furthermore, by filtering frequent items based on importance, determining the correlation between each risk feature and each accident level, and generating a risk level table, the method can improve the comprehensiveness, accuracy, and adaptability of power accident risk identification, providing effective risk decision support for power accident early warning.

[0168] Figure 7 A schematic diagram of the structure of the device for determining power accident risk provided in this application is shown below. Figure 7 As shown, the power accident risk determination device 40 provided in this embodiment includes:

[0169] The acquisition module 401 is used to acquire power accident text data, extract text features from the power accident text data, and obtain word vectors and word weights for each segment.

[0170] The first determining module 402 is used to determine the sparsity coefficient based on the sparsity rate of the feature terms to which each word belongs, and to determine the importance of each accident record based on the word weight and the sparsity coefficient.

[0171] The second determination module 403 is used to filter frequent items according to their importance, determine the correlation between each risk characteristic and each accident level, and generate a risk level table based on the correlation for risk decision support for power accident early warning.

[0172] In one possible embodiment, the acquisition module 401 is used to perform word segmentation processing on the power accident text data, remove stop words based on a preset stop word list, and obtain a word segmentation sequence;

[0173] The word segmentation sequence is input into the word vector model for training to generate word vectors for each segmentation;

[0174] The weight of each word segment is determined based on the similarity between the word vector of each word segment and each accident level.

[0175] In one possible embodiment, the acquisition module 401 is used to perform clustering processing on the word vectors of each word segment to determine the cluster category to which each word segment belongs;

[0176] The similarity between each word segment and each accident level is determined based on the cosine similarity between the word vector of each segment and the word vector corresponding to each accident level.

[0177] The segmentation weight of each word is determined based on the correspondence between similarity and the cluster category to which the word belongs and the accident level.

[0178] In one possible embodiment, the first determining module 402 is used to count the number of accidents with each feature missing in the accident record and calculate the sparsity rate of each feature, wherein the sparsity rate is the ratio of the number of missing accidents to the total number of accidents.

[0179] The average sparsity is determined by the average sparsity of each feature whose sparsity falls within a preset range.

[0180] The sparsity coefficient is determined based on the average sparsity, and the sparsity coefficient is negatively correlated with the average sparsity.

[0181] In one possible embodiment, the first determining module 402 is used to calculate the complement of the average sparsity to obtain the difference value;

[0182] The reciprocal of the difference value is used as the sparsity coefficient.

[0183] In one possible embodiment, the first determining module 402 is used to obtain the word segmentation weight of each word in the accident record;

[0184] Calculate the average weight of each word segmentation to obtain the average word segmentation weight;

[0185] The importance of the incident record is obtained by multiplying the average word segmentation weight by the sparsity coefficient.

[0186] In one possible embodiment, the second determining module 403 is used to calculate the weight support of each feature item, where the weight support is the ratio of the sum of the importance of each feature item in each accident record to the sum of the importance of all accident records.

[0187] Feature terms whose weight support reaches a preset support threshold are identified as frequent terms;

[0188] The correlation between each risk characteristic and each accident level is determined based on the frequency of occurrence;

[0189] A risk level table is generated based on the correlation between each risk characteristic and each accident level.

[0190] The device for determining power accident risk provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0191] Figure 8 A structural diagram of the device for determining power accident risk provided in this application. (For example...) Figure 8 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.

[0192] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0193] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0194] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0195] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0196] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0197] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0198] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0199] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0200] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0201] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0202] 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0203] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0204] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0205] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0206] Finally, it should be noted that other embodiments of the invention will readily conceive of by those skilled in the art upon consideration of the specification and practice of the invention. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A method for determining the risk of power accidents, characterized in that, include: Acquire text data of power accidents, extract text features from the power accident text data, and obtain word vectors and word weights for each segment; The sparsity coefficient is determined based on the sparsity rate of the feature terms to which each word belongs, and the importance of each accident record is determined based on the word weight and the sparsity coefficient. Frequent items are filtered based on their importance to determine the correlation between each risk characteristic and each accident level. A risk level table is then generated based on the correlation to support risk decision-making for power accident early warning.

2. The method according to claim 1, characterized in that, Text feature extraction is performed on the power accident text data to obtain word vectors and word weights for each segment, including: The power accident text data is segmented into words, and stop words are removed based on a preset stop word list to obtain a segmented sequence. The word segmentation sequence is input into the word vector model for training to generate word vectors for each segmentation; The segmentation weight of each segment is determined based on the similarity between the word vector of each segment and each accident level.

3. The method according to claim 2, characterized in that, The segmentation weight of each word is determined based on the similarity between the word vector of each word and each accident level, including: Clustering is performed on the word vectors of each word segment to determine the cluster category to which each word segment belongs; The similarity between each word segment and each accident level is determined based on the cosine similarity between the word vector of each segment and the word vector corresponding to each accident level. The weight of each word is determined based on the similarity and the correspondence between the cluster category to which the word belongs and the accident level.

4. The method according to claim 1, characterized in that, The sparsity coefficient is determined based on the sparsity rate of the feature terms to which each word belongs, including: The number of accidents with missing features in the accident records is counted, and the sparsity rate of each feature is calculated. The sparsity rate is the ratio of the number of missing accidents to the total number of accidents. The average sparsity is determined by the average sparsity of each feature whose sparsity falls within a preset range. The sparsity coefficient is determined based on the average sparsity rate, wherein the sparsity coefficient is negatively correlated with the average sparsity rate.

5. The method according to claim 4, characterized in that, Determining the sparsity coefficients based on the average sparsity rate includes: Calculate the complement of the average sparsity to obtain the difference value; The reciprocal of the difference value is determined as the sparsity coefficient.

6. The method according to claim 1, characterized in that, The importance of each incident record is determined based on the word segmentation weights and the sparsity coefficients, including: Obtain the word segmentation weights of each word in the accident record; Calculate the average weight of each word segmentation to obtain the average word segmentation weight; The importance of the accident record is obtained by multiplying the average word segmentation weight by the sparse coefficient.

7. The method according to claim 1, characterized in that, Frequent items are filtered based on their importance to determine the correlation between each risk characteristic and each accident level, and a risk level table is generated based on the correlation, including: Calculate the weighted support of each feature item, where the weighted support is the ratio of the sum of the importance of each feature item in each accident record to the sum of the importance of all accident records. Feature terms whose weighted support reaches a preset support threshold are identified as frequent terms; The correlation between each risk characteristic and each accident level is determined based on the frequent items mentioned above; A risk level table is generated based on the degree of correlation between each risk characteristic and each accident level.

8. A device for determining the risk of power accidents, characterized in that, include: The acquisition module is used to acquire power accident text data, extract text features from the power accident text data, and obtain word vectors and word weights for each segment. The first determining module is used to determine the sparsity coefficient based on the sparsity rate of the feature terms to which each word belongs, and to determine the importance of each accident record based on the word weight and the sparsity coefficient. The second determination module is used to filter frequent items according to the importance, determine the correlation between each risk characteristic and each accident level, and generate a risk level table based on the correlation for risk decision support for power accident early warning.

9. A device for determining the risk of power accidents, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.