Accident potential rectification measure recommendation method and device based on KGAT algorithm

Through the recommended method of accident hazard rectification measures based on the KGAT algorithm, text similarity matching and knowledge reasoning are used to solve the problem of lack of targeted and practicality of rectification measures in the investigation and control of accident hazards, and efficient and accurate recommendations of rectification measures are achieved.

CN120144744APending Publication Date: 2025-06-13QINGHAI NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510183401.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the investigation and control of accident hazards, the rectification measures of enterprises lack targeted and practicality, and cannot solve accident hazards scientifically, reasonably and effectively, and the historical hidden danger data and information have not been fully utilized.

Method used

The recommended method for accident hazard rectification measures based on the KGAT algorithm is adopted. By collecting the current hazard description text and historical hazard description text, similarity matching and knowledge reasoning are carried out, and rectification measures are recommended. Specific steps include text preprocessing, feature vectorization, similarity calculation, knowledge reasoning and rectification measures output.

Benefits of technology

It improves the accuracy and comprehensiveness of rectification measures, reduces manual intervention, improves work efficiency, and improves the intelligence level of the system, helping users to quickly and effectively solve potential accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144744A_ABST
    Figure CN120144744A_ABST
Patent Text Reader

Abstract

The invention relates to an accident potential rectification measure recommendation method and device based on a KGAT algorithm. The method comprises the steps that a current potential risk description text and a historical potential risk description text are collected; performing similarity matching calculation on the current hidden danger description text and the historical hidden danger description text to obtain a first matching text of which the similarity is higher than a preset threshold value and a second matching text of which the similarity is lower than the preset threshold value; based on a knowledge graph, performing knowledge reasoning on the second matching text to obtain a reasoning result; and outputting the rectification measure corresponding to the first matching text and the rectification measure corresponding to the reasoning result to obtain a recommendation result. According to the invention, the efficiency and accuracy of matching between hidden danger description and rectification measures can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text recommendation, and in particular, to a method and device for recommending accident hidden danger rectification measures based on the KGAT algorithm. Background Art

[0002] In the process of continuous improvement of the work safety supervision system, increasingly strict work safety regulations, and continuous improvement of the self-management level of enterprises, enterprises have accumulated rich experience in accident hidden danger investigation and treatment. However, enterprises still have deficiencies in aspects such as hidden danger information analysis capabilities and hidden danger rectification measure formulation models, resulting in the lack of pertinence and practicality of the formulated rectification measures and being unable to scientifically, reasonably, and effectively solve on-site coal mine accident hidden dangers.

[0003] When formulating measures, the person responsible for rectifying accident hidden dangers still needs to manually search or rely on experience. This traditional method not only has low efficiency and lacks accuracy, but also is prone to problems such as imperfect rectification measures and missing items. More importantly, the value of historical hidden danger data information has not been fully utilized, resulting in the lag of the intelligent level of the enterprise's hidden danger investigation and treatment.

[0004] Therefore, there is an urgent need in this field to construct a method for recommending accident hidden danger rectification measures that integrates historical information. Summary of the Invention

[0005] The present invention provides a method and device for recommending accident hidden danger rectification measures based on the KGAT algorithm to solve the defects of the prior art.

[0006] The present invention provides a method for recommending accident hidden danger rectification measures based on the KGAT algorithm, including:

[0007] S1: Collect the current hidden danger description text and historical hidden danger description texts;

[0008] S2: Perform similarity matching calculations on the current hidden danger description text and the historical hidden danger description texts to obtain first matching texts with similarity higher than a preset threshold and second matching texts with similarity lower than the preset threshold;

[0009] S3: Based on the knowledge graph, perform knowledge reasoning on the second matching texts to obtain reasoning results;

[0010] S4: Output the rectification measures corresponding to the first matching texts and the rectification measures corresponding to the reasoning results to obtain a recommended result.

[0011] According to the method for recommending accident hidden danger rectification measures based on the KGAT algorithm provided by the present invention, step S2 further includes:

[0012] S21: Preprocess the current potential hazard description text and the historical potential hazard description text to obtain the preprocessed current potential hazard description text and the preprocessed historical potential hazard description text;

[0013] S22: Map the preprocessed current potential hazard description text and the preprocessed historical potential hazard description text into vectors respectively through the TF-IDF algorithm to obtain the current potential hazard feature vector and the historical potential hazard feature vector;

[0014] S23: Calculate the similarity between the current potential hazard feature vector and the historical potential hazard feature vector through the cosine similarity method to obtain the matching similarity.

[0015] According to a method for recommending accident potential hazard rectification measures based on the KGAT algorithm provided by the present invention, the preprocessing performed in step S21 specifically includes:

[0016] Text granularity refinement;

[0017] Remove irrelevant stop words.

[0018] According to a method for recommending accident potential hazard rectification measures based on the KGAT algorithm provided by the present invention, the text granularity refinement is implemented through a word segmentation tool, and the word segmentation tool is the Jieba word segmentation tool.

[0019] According to a method for recommending accident potential hazard rectification measures based on the KGAT algorithm provided by the present invention, the expression of the matching similarity in step S23 is:

[0020]

[0021] where cosθ is the calculated matching similarity value, is the current potential hazard feature vector, is the historical potential hazard feature vector.

[0022] According to a method for recommending accident potential hazard rectification measures based on the KGAT algorithm provided by the present invention, the preset threshold in step S2 is 0.98.

[0023] According to a method for recommending accident potential hazard rectification measures based on the KGAT algorithm provided by the present invention, step S3 further includes:

[0024] S31: Extract entities from the second matching text and convert them into embedding representations;

[0025] S32: Based on the knowledge graph, perform knowledge reasoning on the embedding representation to obtain multiple predicted entities;

[0026] S33: Evaluate the relationship between multiple predicted entities and the input entity corresponding to the embedding representation to obtain entity scores;

[0027] S34: Select the predicted entity output as the inference result according to the entity score.

[0028] The present invention also provides an accident hidden danger rectification measure recommendation device based on the KGAT algorithm, including:

[0029] A collection module, configured to collect the current hidden danger description text and the historical hidden danger description text;

[0030] A matching module, configured to perform a similarity matching calculation on the current hidden danger description text and the historical hidden danger description text, to obtain a first matching text with a similarity higher than a preset threshold and a second matching text with a similarity lower than the preset threshold;

[0031] An inference module, configured as a KGAT-CL model, for performing knowledge inference on the second matching text based on a knowledge graph to obtain an inference result;

[0032] An output module, configured to output the rectification measures corresponding to the first matching text and the rectification measures corresponding to the inference result, to obtain a recommendation result.

[0033] The present invention also provides an accident hidden danger rectification measure recommendation device based on the KGAT algorithm, including:

[0034] A memory and at least one processor, wherein instructions are stored in the memory;

[0035] At least one of the processors invokes the instructions in the memory, so that an accident hidden danger rectification measure recommendation device based on the KGAT algorithm executes an accident hidden danger rectification measure recommendation method as described in any one of the above.

[0036] The present invention also provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, an accident hidden danger rectification measure recommendation method as described in any one of the above is implemented.

[0037] The present invention provides a method and device for recommending accident hazard rectification measures based on the KGAT algorithm. By collecting current hazard description texts and historical hazard description texts and performing similarity matching calculations, the present invention can accurately find historical cases similar to the current hazard. For the first matching text with high similarity, the corresponding rectification measures are directly adopted, which greatly improves the accuracy of the recommendation. For the second matching text with low similarity, the present invention uses the knowledge graph to perform knowledge reasoning and mine potential related information, so as to obtain reasonable rectification measures. This dual strategy ensures the comprehensiveness and accuracy of the recommendation. Secondly, the present invention uses the TF-IDF algorithm and the cosine similarity method to perform text vectorization and similarity calculation, thereby realizing automatic matching and screening of texts, reducing manual intervention, and improving work efficiency. Knowledge graph and embedded representation technology, the present invention can automatically perform knowledge reasoning and entity evaluation, further improving the intelligence level of the system; secondly, the user only needs to input the current hidden danger description text, and the system can quickly output recommended corrective measures without the user having to perform tedious search and comparison, which greatly optimizes the user experience, and the recommended corrective measures are based on the reasoning of historical cases and knowledge graphs, with high pertinence and practicality, which helps users to quickly and effectively solve accident hidden dangers. In addition, the present invention provides an efficient and accurate recommendation method for accident hidden danger management, which helps enterprises to promptly discover and rectify accident hidden dangers, reduce the probability and risk of accidents, and by continuously optimizing and updating the knowledge graph, the present invention can continuously improve the performance and effect of the recommendation system, and provide more powerful support for accident hidden danger management. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A flowchart of a method for recommending accident hazard rectification measures based on a KGAT algorithm provided in an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of the structure of a device for recommending accident hazard rectification measures based on a KGAT algorithm provided in an embodiment of the present invention.

[0041] Figure numerals: 100, collection module; 200, matching module; 300, reasoning module; 400, output module. DETAILED DESCRIPTION

[0042] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them, and they should not be construed as limiting the present invention. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for the purpose of description and cannot be construed as indicating or implying relative importance.

[0043] As Figure 1 shown, the present invention provides a method for recommending accident hidden danger rectification measures based on the KGAT algorithm, including:

[0044] S1: Collect the current hidden danger description text and historical hidden danger description text.

[0045] The present invention aims to construct a method for recommending accident hidden danger rectification measures in coal mines by extracting knowledge entities from unstructured historical hidden danger text data and uniformly standardizing the expression of knowledge in the field of coal mine accident hidden dangers, so as to realize the intelligent recommendation of coal mine accident hidden danger rectification measures. Therefore, in step S1, first collect the current hidden danger description text provided by the staff and the historical hidden danger description text. In addition, the rectification measures corresponding to the historical hidden danger description text are also required for recommendation after matching.

[0046] S2: Perform a similarity matching calculation on the current hidden danger description text and the historical hidden danger description text to obtain a first matching text with a similarity higher than a preset threshold and a second matching text with a similarity lower than the preset threshold.

[0047] The purpose of step S2 is to evaluate the similarity between texts. The key point is to correctly match the key information in the sentences. Because if the similarity of the complete sentences is directly evaluated, it may be affected by the word order and language habits. Therefore, in this stage, the whole sentences are split, and then an appropriate text granularity is selected for matching. The text similarity matching in this stage mainly includes three steps: text preprocessing, text feature vectorization, and similarity calculation, which are specifically as follows.

[0048] Among them, the preset threshold in step S2 is 0.98.

[0049] Among them, step S2 further includes:

[0050] S21: Preprocess the current hidden danger description text and the historical hidden danger description text to obtain a preprocessed current hidden danger description text and a preprocessed historical hidden danger description text.

[0051] Among them, the preprocessing carried out in step S21 specifically includes:

[0052] Text granularity refinement; removal of irrelevant stop words.

[0053] Furthermore, the purpose of text granularity refinement is to split the text into smaller units (such as words or phrases) for more detailed analysis of the text content; and to remove irrelevant words in the text, such as modal particles "le", "de", etc. These words usually do not help substantially in understanding the text content but increase the complexity of text processing. Therefore, according to the stop word list, all matching stop words in the text need to be deleted, and the stop word list can be customized according to specific application scenarios.

[0054] Among them, text granularity refinement is achieved through a word segmentation tool, and the word segmentation tool is the Jieba word segmentation tool.

[0055] Furthermore, in step S21, the Jieba word segmentation tool is used to segment the text. Jieba is a commonly used Chinese word segmentation tool, and using the Jieba word segmentation tool can obtain the most accurate word segmentation results.

[0056] S22: Respectively map the preprocessed current hidden danger description text and the preprocessed historical hidden danger description text into vectors through the TF-IDF algorithm to obtain the current hidden danger feature vector and the historical hidden danger feature vector.

[0057] In step S22, the preprocessed text is mainly converted into vector form for subsequent similarity calculation. The specific steps are to map the preprocessed current hidden danger description text and the historical hidden danger description text into vectors respectively using the TF-IDF algorithm. Among them, TF represents term frequency, that is, it measures the frequency of a word appearing in the text, and IDF represents inverse document frequency, that is, it measures the general importance of a word. If a word appears in many texts, then its IDF value will be lower, and vice versa. Specifically, TF-IDF combines TF and IDF to calculate a weight value for each word in the text, and then these weight values are used as elements of the vector. Each text is converted into a high-dimensional vector, and each dimension of the vector corresponds to the weight of a word.

[0058] S23: Calculate the similarity between the current hidden danger feature vector and the historical hidden danger feature vector through the cosine similarity method to obtain the matching similarity.

[0059] In step S23, the similarity between the current hidden danger feature vector and the historical hidden danger feature vector is mainly calculated to find the historical case most similar to the current hidden danger. The present invention uses the cosine similarity method to calculate the similarity between two vectors, that is, by first calculating the dot product of the two vectors and then dividing by the product of their magnitudes. The specific expression is as follows.

[0060] Among them, the expression for the matching similarity in step S23 is as follows:

[0061]

[0062] Among them, cosθ is the calculated matching similarity value, is the current hidden danger feature vector, is the historical hidden danger feature vector.

[0063] In the overall steps S21 to S23, first, text preprocessing is performed on the hidden danger description text. The Jieba word segmentation tool is used to refine the granularity of the hidden danger description text to more accurately capture key information. At the same time, by removing stop words, the interference of irrelevant information on text similarity calculation is further reduced. Secondly, the feature vector of the text is established. The TF-IDF algorithm performs excellently in extracting sentence features and has advantages such as simplicity, efficiency, and no need for labeled data. In addition, this algorithm can map the text into a vector, automatically filter out common terms, and retain key terms. Thirdly, the similarity between the input hidden danger description text and the historical hidden danger description text is calculated. When the text similarity value exceeds the set threshold (set to 0.98 in this embodiment), the system outputs the historical hidden danger text with the highest similarity and finds the associated rectification measures. In the similarity calculation, cosine similarity is used, and the larger the value, the more similar the two vectors are.

[0064] S3: Based on the knowledge graph, perform knowledge reasoning on the second matching text to obtain the reasoning result.

[0065] In step S3, when the similarity between the input hidden danger description text and the historical hidden danger description text is lower than the set threshold, the KGAT-CL algorithm knowledge reasoning matching method is started, aiming to improve the accuracy of the model in matching hidden danger rectification measures. The main steps include entity extraction and embedding, knowledge reasoning based on the KGAT-CL algorithm, and output recommendation.

[0066] Among them, step S3 further includes:

[0067] S31: Extract entities from the second matching text and convert them into embedding representations.

[0068] The purpose of step S31 is to extract key entities from the second matching text, that is, the historical hidden danger description text with a similarity lower than the preset threshold, and convert these entities into embedding representations. The embedding representation is a numerical vector that can reflect the semantic information of the entity and helps in knowledge reasoning and relationship evaluation in subsequent steps.

[0069] Entity extraction uses natural language processing techniques (such as named entity recognition) to extract key entities from text. The obtained entities may be noun phrases or words with specific meanings, such as device names, hazard types, locations, etc.; while the embedding representation is to convert the extracted entities into embedding vectors, specifically achieved through pre-trained embedding models (such as Word2Vec, BERT, etc.). The model can map words or phrases into a high-dimensional vector space, making entities with similar semantics closer in the vector space.

[0070] S32: Based on the knowledge graph, perform knowledge reasoning on the embedding representation to obtain multiple predicted entities.

[0071] The purpose of step S32 is to perform knowledge reasoning on the embedding representation based on the knowledge graph to discover other entities or concepts related to the input entity. The knowledge graph is a graph-structured database containing a large number of entities, attributes, and relationships. It provides rich background knowledge and context information; knowledge graph query is to find other entities and relationships related to the input entity (i.e., the entity corresponding to the embedding representation) in the knowledge graph, which can be achieved through graph traversal algorithms (such as depth-first search, breadth-first search) or graph-based query languages (such as SPARQL); the reasoning process is to use the relationships and attributes in the knowledge graph to reason about the input entity, including rule-based reasoning, such as if A is of type B, then A may have certain attributes of B, and statistical reasoning, such as inferring the correlation between A and B based on historical data, etc.; finally, the generation of predicted entities, that is, according to the reasoning process, generate multiple predicted entities related to the input entity, and the obtained predicted entities may be potential hazard rectification measures.

[0072] S33: Evaluate the relationship between multiple predicted entities and the input entity corresponding to the embedding representation to obtain entity scores.

[0073] In steps S33 to S34, evaluate the relationship between multiple predicted entities and the input entity to determine which predicted entities are most relevant to the input entity or most likely to become effective rectification measures. First, extract the relationship features between the predicted entities and the input entity, including the path length between them, the number of common neighbors, the type of relationship, etc., and then use a pre-trained scoring model to score these relationship features. The purpose is to evaluate the relevance between the predicted entity and the input entity according to the similarity of the relationship features.

[0074] S34: Select the predicted entity as the output of the reasoning result according to the entity score.

[0075] In step S34, a score value is generated for each predicted entity according to the output of the scoring model. This value reflects the degree of correlation between the predicted entity and the input entity. According to the entity scores, the predicted entity with the highest score is selected as the inference result for output. The obtained inference result may be potential rectification measures or suggestions for the current hidden danger.

[0076] In steps S31 to S34, first, the knowledge extraction model proposed in the foregoing steps is used to identify and extract the key entities in the input hidden danger description text, and obtain their corresponding embedding representations, so as to capture the semantic information of the entities and their relative positions in the knowledge graph of coal mine accident hidden dangers, and then use them as the input of the knowledge reasoning model.

[0077] Secondly, the trained KGAT-CL model (Knowledge Graph Attention Network based on Contrastive Learning, KGAT-CL) is used to take the extracted and embedded entities as input for knowledge reasoning to predict the potential hidden danger rectification measure entities that may be associated. In the KGAT-CL algorithm model, the model is capable of identifying possible relevant rectification measure entities by deeply learning and understanding the context environment of the input entities in the knowledge graph, mainly by analyzing the adjacent entities of the input entities in the knowledge graph and their mutual relationships.

[0078] Finally, according to the knowledge reasoning prediction results of the KGAT-CL algorithm, the model scores and ranks all possible hidden danger rectification measures, and outputs the top K hidden danger rectification measures with the highest scores for recommendation.

[0079] S4: Output the rectification measures corresponding to the first matching text and the rectification measures corresponding to the inference result to obtain the recommendation result.

[0080] In step S4, first, the rectification measures of the first matching text are obtained. Specifically, in step S2, the system has performed similarity matching on the current hidden danger description text and the historical hidden danger description text, and found the first matching text with a similarity higher than the preset threshold. Since the first matching text is very similar to the current hidden danger, the rectification measures corresponding to them are very likely to be applicable to the current hidden danger. The system will extract the rectification measures corresponding to these first matching texts as part of the recommendation result.

[0081] Next, obtain the rectification measures for the inference results. Specifically, for the historical hidden danger description texts with a similarity lower than the preset threshold (i.e., the second matching texts), their rectification measures cannot be directly adopted. Therefore, in step S3, the system will perform knowledge inference on these second matching texts to discover other potential rectification measures related to the current hidden danger. In step S4, these inference results (i.e., the rectification measures corresponding to the predicted entities) are extracted as another part of the recommended results.

[0082] Finally, integrate the recommended results, that is, integrate the rectification measures of the first matching texts and the rectification measures of the inference results to form a complete list of recommended results, and then output this integrated list of recommended results to the user or relevant staff. The staff can select the most appropriate rectification measures according to this list to deal with the current hidden danger.

[0083] As Figure 2 shown, the present invention also provides an accident hidden danger rectification measure recommendation device based on the KGAT algorithm, including:

[0084] A collection module 100 for collecting the current hidden danger description text and historical hidden danger description texts;

[0085] A matching module 200 for performing similarity matching calculations on the current hidden danger description text and the historical hidden danger description texts to obtain first matching texts with a similarity higher than the preset threshold and second matching texts with a similarity lower than the preset threshold;

[0086] An inference module 300, where the inference module 300 is configured as a KGAT-CL model for performing knowledge inference on the second matching texts based on a knowledge graph to obtain inference results;

[0087] An output module 400 for outputting the rectification measures corresponding to the first matching texts and the rectification measures corresponding to the inference results to obtain recommended results.

[0088] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.

[0089] The third aspect of the present invention provides an accident hidden danger rectification measure recommendation device based on the KGAT algorithm, including:

[0090] A memory and at least one processor, where instructions are stored in the memory;

[0091] At least one of the processors invokes the instructions in the memory to cause an accident hidden danger rectification measure recommendation device based on the KGAT algorithm to execute a method for recommending accident hidden danger rectification measures based on the KGAT algorithm as described in any one of the above.

[0092] The fourth aspect of the present invention provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, a method for recommending accident hidden danger rectification measures based on the KGAT algorithm as described in any one of the above is implemented.

[0093] Furthermore, the accident hidden danger rectification measure recommendation device based on the KGAT algorithm provided by the present invention may vary greatly due to configuration or performance differences, and may include one or more processors (central processing units, CPUs). For example, one or more processors and memories, one or more storage media for storing application programs or data, such as one or more mass storage devices. Among them, the memory and the storage media may be transient storage or persistent storage. The program stored in the storage media may include one or more modules, and each module may include a series of instruction operations on the accident hidden danger rectification measure recommendation device based on the KGAT algorithm. Further, the processor may be set to communicate with the storage media and execute a series of instruction operations in the storage media on the accident hidden danger rectification measure recommendation device based on the KGAT algorithm.

[0094] It may also include one or more power supplies, one or more wired or wireless network interfaces, one or more input / output interfaces, and one or more operating systems, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, and so on. Those skilled in the art can understand that the structure of the accident hidden danger rectification measure recommendation device based on the KGAT algorithm provided by the present invention does not constitute a limitation on the device, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0095] A method, device, equipment and storage medium for recommending accident hidden danger rectification measures based on the KGAT algorithm provided by the present invention integrates the KGAT-CL model of U-CL+UI-CL hierarchical contrast learning, that is, a model that integrates the user-user (U-CL) hierarchical contrast learning and the user-item (UI-CL) hierarchical contrast learning. It has excellent performance in the task of recommending coal mine accident hidden danger rectification measures. Compared with other baseline models, this model shows significant superiority in multiple key indicators, laying a solid foundation for its practical application in the field.

[0096] In the actual operation scenario of a coal mine, when the "hidden danger description" text is input, the system will first judge the similarity between the text and historical data. If the input text information highly matches the historical text, the system will start text matching and directly recommend highly relevant rectification measures; otherwise, if the input similarity is lower than the threshold, the system will start the knowledge reasoning of KGAT-CL to recommend the top 5 most relevant rectification measures to safety management personnel, ensuring that the matching between the hidden danger description and the rectification measures is both fast and accurate, providing strong support for the recommendation of coal mine accident hidden danger rectification measures.

[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for recommending corrective measures for potential accident hazards based on the KGAT algorithm, characterized in that: include: S1: Collect the current hidden danger description text and the historical hidden danger description text; S2: performing similarity matching calculation on the current hidden danger description text and the historical hidden danger description text to obtain a first matching text with a similarity higher than a preset threshold and a second matching text with a similarity lower than a preset threshold; S3: Based on the knowledge graph, perform knowledge reasoning on the second matching text to obtain a reasoning result; S4: Output the rectification measures corresponding to the first matching text and the rectification measures corresponding to the inference result to obtain a recommendation result.

2. The method for recommending accident hazard rectification measures based on the KGAT algorithm according to claim 1, characterized in that: Step S2 further comprises: S21: preprocessing the current hidden danger description text and the historical hidden danger description text to obtain a preprocessed current hidden danger description text and a preprocessed historical hidden danger description text; S22: Mapping the preprocessed current hidden danger description text and the preprocessed historical hidden danger description text into vectors respectively through the TF-IDF algorithm to obtain a current hidden danger feature vector and a historical hidden danger feature vector; S23: Calculate the similarity between the current hidden danger feature vector and the historical hidden danger feature vector by using a cosine similarity method to obtain matching similarity.

3. The method for recommending accident hazard rectification measures based on the KGAT algorithm according to claim 1, characterized in that: The preprocessing performed in step S21 specifically includes: Text granularity refinement; Remove irrelevant stop words.

4. The method for recommending accident hazard rectification measures based on the KGAT algorithm according to claim 3, characterized in that: The text granularity refinement is achieved through a word segmentation tool, and the word segmentation tool is the Jieba word segmentation tool.

5. The method for recommending accident hazard rectification measures based on the KGAT algorithm according to claim 2, characterized in that: The expression of the matching similarity in step S23 is: Among them, cosθ is the calculated matching similarity value, is the current hidden danger feature vector, is the historical hidden danger feature vector.

6. The method for recommending accident hazard rectification measures based on the KGAT algorithm according to claim 1, characterized in that: The preset threshold in step S2 is 0.

98.

7. The method for recommending accident hazard rectification measures based on the KGAT algorithm according to claim 1, characterized in that: Step S3 further comprises: S31: extracting entities from the second matching text and converting them into embedded representations; S32: Based on the knowledge graph, perform knowledge reasoning on the embedded representation to obtain multiple predicted entities; S33: performing relationship evaluation between the multiple predicted entities and the input entities corresponding to the embedded representation to obtain entity scores; S34: According to the entity score, select a predicted entity to output as an inference result.

8. A device for recommending corrective measures for potential accidents based on the KGAT algorithm, characterized in that: include: A collection module is used to collect current hidden danger description texts and historical hidden danger description texts; A matching module, used for performing similarity matching calculation on the current hidden danger description text and the historical hidden danger description text to obtain a first matching text with a similarity higher than a preset threshold and a second matching text with a similarity lower than the preset threshold; A reasoning module, wherein the reasoning module is configured as a KGAT-CL model, and is used to perform knowledge reasoning on the second matching text based on a knowledge graph to obtain a reasoning result; An output module is used to output the rectification measures corresponding to the first matching text and the rectification measures corresponding to the inference result to obtain a recommendation result.

9. A device for recommending corrective measures for potential accidents based on the KGAT algorithm, characterized in that: include: A memory and at least one processor, wherein instructions are stored in the memory; At least one of the processors calls the instructions in the memory to enable a device for recommending accident hazard rectification measures based on the KGAT algorithm to execute a method for recommending accident hazard rectification measures based on the KGAT algorithm as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed by the processor, a method for recommending accident hazard rectification measures based on the KGAT algorithm as described in any one of claims 1 to 7 is implemented.