Safety education and training knowledge graph and data management method and system based on AI

Through the AI-based safety education and training knowledge map and data management method, the problem of lack of personalized learning paths and dynamic updates in the existing technology is solved, the generation of customized learning paths for students is realized, and the learning effect and resource utilization efficiency are improved.

CN118585658BActive Publication Date: 2024-10-08LONGYUTIANXIA (BEIJING) CULTURE MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411068608.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-10-08
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

Existing safety education and training methods lack personalized learning path planning and recommendation mechanisms for different students. The knowledge graph lacks a dynamic update mechanism and cannot adapt to rapid iterations. It also lacks a tracking evaluation and feedback mechanism for students' learning process, resulting in training that is not targeted and Insufficient effectiveness.

Method used

Using AI-based safety education and training knowledge graph and data management method, by acquiring unstructured data for multi-modal feature extraction and entity relationship semantic alignment, a heterogeneous attribute graph is constructed, combining attention to multiple relationship paths and relationship path similarities. Power aggregation to generate a safety education knowledge graph, and use multi-task knowledge distillation and soft edge matching reasoning methods to generate customized learning paths for students.

Benefits of technology

It achieves personalized, efficient, accurate and coherent learning path recommendations, improves students' learning effects and learning experience, optimizes the use of educational resources, and enhances the interactivity and pertinence of learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585658B_ABST
    Figure CN118585658B_ABST
Patent Text Reader

Abstract

The present invention provides an AI-based safety education and training knowledge graph and data management method and system, which relate to the field of artificial intelligence technology, including combining the multi-level semantic features, multi-granularity image features and multi-dimensional time series features into structured multimodal features, inputting the structured multimodal features into a pre-trained multi-task knowledge extraction model, extracting a safety education and training ontology knowledge base by performing entity relationship semantic alignment based on a contrastive learning paradigm; based on the safety education and training ontology knowledge base, by constructing a heterogeneous attribute graph including multi-type nodes and multi-relationship edges, combining an attention aggregation process of multiple relationship paths and relationship path similarities, capturing the semantic associations between multi-type nodes, and generating a safety education knowledge graph; performing a connected subgraph search in the safety education knowledge graph, determining the learning path and knowledge fragments with the highest matching degree with the student portrait, and generating a student customized learning path sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an AI-based safety education and training knowledge graph and data management method and system. Background Art

[0002] In order to improve the safety awareness and prevention ability of personnel, it is very important to carry out safety education and training. Traditional safety education and training usually adopts unified course content and learning paths. By constructing a safety education knowledge graph and using knowledge reasoning and data mining technology, intelligent organization and recommendation of training content can be achieved.

[0003] In the existing methods, the main focus is on the organization of knowledge itself, and insufficient consideration is given to the characteristics of trainees, ignoring the individual differences and actual needs of trainees. The pertinence and effectiveness of training need to be improved. At present, there are deficiencies in the field of safety education and training: the training content is universal, lacking personalized learning path planning and recommendation mechanisms for different trainees; the knowledge organization form is single, and the knowledge graph lacks a dynamic update mechanism, making it difficult to adapt to rapid iteration; there is a lack of tracking, evaluation and feedback mechanisms for the trainees' learning process, and it is impossible to dynamically optimize the learning path and content recommendation strategy.

[0004] To sum up, there is an urgent need to integrate student characteristics and safety knowledge, establish a dynamically updated knowledge graph, realize intelligent organization, personalized recommendation and precise matching of training resources, and provide an interactive and diverse learning experience. The present invention can solve the problems in the prior art. Summary of the invention

[0005] The embodiments of the present invention provide an AI-based safety education and training knowledge graph and data management method and system, which can solve the problems in the prior art.

[0006] According to a first aspect of the embodiments of the present invention,

[0007] Provide AI-based safety education and training knowledge graph and data management methods, including:

[0008] Obtain unstructured data related to safety education and training, the unstructured data including text data, image data and video data, perform hierarchical semantic encoding on the text data based on the attention hierarchical encoder, extract multi-level semantic features, perform pyramid hierarchical processing on the image data based on the multi-scale convolutional neural network, extract multi-granular image features, perform temporal semantic modeling on the video data based on the spatiotemporal attention network, extract multi-dimensional temporal features, combine the multi-level semantic features, multi-granular image features and multi-dimensional temporal features into structured multimodal features, input the structured multimodal features into a pre-trained multi-task knowledge extraction model, extract the safety education and training ontology knowledge base by performing entity relationship semantic alignment based on the contrastive learning paradigm;

[0009] Based on the safety education and training ontology knowledge base, by constructing a heterogeneous attribute graph containing multiple types of nodes and multiple relationship edges, combining the attention aggregation process of multiple relationship paths and relationship path similarities, the semantic associations between multiple types of nodes are captured to generate a safety education knowledge graph;

[0010] The basic information and historical learning information of the safety education training students acquired in advance are mapped to the semantic space where the safety education knowledge graph is located for fusion, and a student portrait is constructed through a multi-task knowledge distillation method. A connected subgraph search is performed in the safety education knowledge graph through an inference method based on soft edge matching to determine the learning path and knowledge fragments that have the highest match with the student portrait, and generate a student-customized learning path sequence.

[0011] In an optional embodiment,

[0012] The multi-level semantic features, multi-granularity image features and multi-dimensional temporal features are combined into structured multimodal features, and the structured multimodal features are input into a pre-trained multi-task knowledge extraction model. By performing entity relationship semantic alignment based on a contrastive learning paradigm, a safety education and training ontology knowledge base is extracted, including:

[0013] Inputting the structured multimodal features into a pre-trained multi-task knowledge extraction model to extract entity pairs of the structured multimodal features, the multi-task knowledge extraction model adopts a Transformer-based encoder-decoder architecture, models the correlation between tasks through a multi-head attention mechanism, and uses a gating mechanism to control information interaction between different tasks; the multi-task knowledge extraction model performs entity recognition through a conditional random field layer, performs relationship classification through a classification layer, and performs attribute extraction through a sequence annotation layer;

[0014] Based on the entity pairs, positive sample feature pairs are constructed based on the contrastive learning paradigm, and negative sample feature pairs are constructed by randomly replacing the entities in the entity pairs. The cosine distance between the positive sample feature pairs is minimized, and the cosine distance between the positive and negative sample feature pairs is maximized to achieve relational semantic alignment and extract the safety education and training ontology knowledge base.

[0015] In an optional embodiment,

[0016] Based on the safety education and training ontology knowledge base, by constructing a heterogeneous attribute graph containing multiple types of nodes and multiple relationship edges, combining the attention aggregation process of multiple relationship paths and relationship path similarities, capturing the semantic associations between multiple types of nodes, and generating a safety education knowledge graph including:

[0017] The knowledge elements of concepts, instances, and attribute values ​​in the safety education and training ontology knowledge base are mapped into multi-type nodes in a heterogeneous attribute graph, the upper and lower relationships between concept nodes are mapped into a first relationship edge, the subordinate relationship from concept to instance is mapped into a second relationship edge, the description relationship from instance to attribute value is mapped into a third relationship edge, and the relationship triple from head entity to tail entity is mapped into a fourth relationship edge between instance nodes;

[0018] Determine multiple relationship paths based on the multiple types of nodes and the multiple relationship edges, the relationship paths include a first relationship path reflecting semantic connections between concepts, a second relationship path reflecting concept-instance semantic connections, and a third relationship path reflecting semantic connections between instances;

[0019] Taking the cosine similarity of two relationship paths as the path similarity, constructing a path similarity matrix corresponding to multiple relationship paths, constructing a two-layer attention network, wherein the first layer of the attention network generates a first attention weight according to the relationship path itself, and the second layer of the attention network generates a second attention weight according to the path similarity matrix, and the first attention weight and the second attention weight are weighted to obtain a comprehensive attention weight;

[0020] Multiple relationship paths passing through the same type of node are aggregated through comprehensive attention weights to obtain a comprehensive semantic representation of this type of node. The semantic associations of different types of nodes are determined through the comprehensive semantic representation to generate a safety education knowledge graph.

[0021] In an optional embodiment,

[0022] The first layer of attention network generates a first attention weight according to the relationship path itself, and the second layer of attention network generates a second attention weight according to the path similarity matrix, including:

[0023] The first-layer attention weights are used to do a dot product between a learnable parameter vector and the semantic translation vector of each relationship path of a node connection. All dot product results are indexed and normalized. The first-layer attention weights are generated by measuring the importance of each relationship path based on its own semantics.

[0024] By calculating the cosine similarity of the semantic Translation vectors of two relational paths, determining the matrix elements, and constructing a relational path similarity matrix, for each relational path, taking the weighted sum of the similarities between the relational path and all other paths, performing dot product of the summation result and the learnable parameter vector, exponentializing and normalizing the results of all dot products, determining the similarity between each relational path and other paths, and generating the second-layer attention weights.

[0025] In an optional embodiment,

[0026] The basic information and historical learning information of the safety education training trainees acquired in advance are mapped to the semantic space where the safety education knowledge graph is located for fusion. Through the multi-task knowledge distillation method, the trainee portrait is constructed, including:

[0027] Map the basic information and historical learning information of the students to the semantic space where the safety education knowledge graph is located for fusion, and construct an initial student portrait;

[0028] Based on a multi-stage feature extraction strategy, each feature layer corresponds to a feature dimension, and the corresponding features in the initial student portrait are divided into a demographic feature layer, a learning behavior feature layer, a knowledge mastery feature layer, and a safety awareness feature layer. In the demographic feature layer, a static feature extraction module is set to extract the student's static attribute features through a predetermined multi-layer perceptron. In the learning behavior feature layer, a dynamic feature extraction module is set to extract the student's dynamic behavior sequence features through a predetermined long short-term memory network. In the knowledge mastery feature layer, a knowledge mastery feature extraction module is set to extract the mastery degree features of each knowledge point through a pre-built convolutional neural network. In the safety awareness feature layer, a safety awareness feature extraction module is set to extract the student's safety awareness features through an attention mechanism, and extract layer by layer from bottom to top according to the preset order of the feature layer;

[0029] Based on the progressive knowledge distillation strategy, a global distillation module is constructed, which receives the output results corresponding to each feature layer, fuses the output results through the attention mechanism, and determines the characteristics of the students;

[0030] During the training process of the global distillation module, one or more extraction modules from the static feature extraction module, the dynamic feature extraction module, the knowledge mastery feature extraction module and the safety awareness feature extraction module are selected each time to participate in the training process. Based on the number of training iterations, the extraction modules are added in sequence, combined with the adversarial regularization mechanism, to obtain the final student portrait.

[0031] In an optional embodiment,

[0032] Through the reasoning method based on soft edge matching, a connected subgraph search is performed in the safety education knowledge graph to determine the learning path and knowledge fragments that have the highest matching degree with the student profile, and a student customized learning path sequence is generated, including:

[0033] Map the student portrait to the semantic space of the safety education knowledge graph, calculate the matching degree between the student portrait and the nodes in the safety education knowledge graph, and obtain the student-node matching degree matrix;

[0034] Combined with the semantic type of the edge in the safety education knowledge graph, the matching degree between the student portrait and the edge is calculated to obtain the student-edge matching matrix;

[0035] Taking the node corresponding to the maximum value in the student-node matching matrix as the starting point and the student-edge matching matrix as the transition probability, the connected subgraph is searched on the safety education knowledge graph through the soft edge random walk strategy until all the knowledge points required for learning are covered, and the learning knowledge subgraph that best matches the student profile is obtained;

[0036] Based on the learning knowledge subgraph, determining the semantic dependency between nodes in the learning knowledge subgraph and the knowledge mastery of the trainees, calculating the learning priority between nodes, and generating an optimal learning node sequence through priority sorting;

[0037] Match each node in the optimal learning node sequence with the student portrait, obtain student customized knowledge fragments, and generate learning content recommendation results;

[0038] According to the optimal learning node sequence and the learning content recommendation results, multi-modal learning resources corresponding to the nodes are matched and obtained, and finally a student customized learning path sequence is generated.

[0039] According to a second aspect of the embodiments of the present invention,

[0040] Provides AI-based safety education and training knowledge graph and data management system, including:

[0041] The first unit is used to obtain unstructured data related to safety education and training, wherein the unstructured data includes text data, image data and video data, hierarchical semantic encoding is performed on the text data based on the attention hierarchical encoder, and multi-level semantic features are extracted, pyramid hierarchical processing is performed on the image data based on the multi-scale convolutional neural network, and multi-granular image features are extracted, and temporal semantic modeling is performed on the video data based on the spatiotemporal attention network, and multi-dimensional temporal features are extracted, and the multi-level semantic features, multi-granular image features and multi-dimensional temporal features are combined into structured multimodal features, and the structured multimodal features are input into a pre-trained multi-task knowledge extraction model, and the safety education and training ontology knowledge base is extracted by performing entity relationship semantic alignment based on the contrastive learning paradigm;

[0042] The second unit is used to capture the semantic associations between multiple types of nodes and generate a safety education knowledge graph based on the safety education training ontology knowledge base by constructing a heterogeneous attribute graph containing multiple types of nodes and multiple relationship edges, combining the attention aggregation process of multiple relationship paths and relationship path similarities;

[0043] The third unit is used to map the pre-acquired basic information and historical learning information of the safety education training students to the semantic space where the safety education knowledge graph is located for fusion, construct a student portrait through a multi-task knowledge distillation method, and perform a connected subgraph search in the safety education knowledge graph through an inference method based on soft edge matching to determine the learning path and knowledge fragments that best match the student portrait, and generate a student customized learning path sequence.

[0044] According to a third aspect of the embodiments of the present invention,

[0045] An electronic device is provided, comprising:

[0046] processor;

[0047] a memory for storing processor-executable instructions;

[0048] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0049] According to a fourth aspect of the embodiments of the present invention,

[0050] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0051] In the embodiments of the present invention, text, image and video data are integrated to comprehensively cover the various information sources required for safety education and training; hierarchical encoders and attention mechanisms are used to perform multi-level semantic representation of text to accurately capture information of different granularities; multi-scale convolutional neural networks and feature pyramid networks are used to extract details and global features of images to provide rich image semantic information; a pre-trained multi-task knowledge extraction model is used and fine-tuned to adapt to the security field to achieve accurate named entity recognition and relationship extraction; a structured safety education and training ontology knowledge base is constructed based on the extracted knowledge to facilitate systematic safety education and management; and complex language relationships between multiple types of nodes are comprehensively captured through the construction of heterogeneous attribute graphs and multi-relation paths. By combining the semantic association of students and improving the expressive power of knowledge graph, the attention aggregation of relationship path similarity can be used to accurately aggregate relevant information and improve the quality and accuracy of knowledge graph. The generated safety education knowledge graph can support complex query and reasoning tasks and provide more intelligent and accurate retrieval results. By integrating student information with the safety education knowledge graph and using multi-task knowledge distillation and soft edge matching reasoning methods, personalized, efficient, accurate and coherent learning path recommendations can be achieved, thereby improving students' learning effect and learning experience, and optimizing the use of educational resources. This not only improves students' learning efficiency, but also enhances the interactivity and pertinence of learning, bringing significant beneficial effects to educational institutions and students. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is a flow chart of a safety education and training knowledge graph and data management method based on AI in an embodiment of the present invention;

[0053] Figure 2 This is a structural diagram of the AI-based safety education and training knowledge graph and data management system in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0056] Figure 1 Schematic diagram of the process of the AI-based safety education and training knowledge graph and data management method in an embodiment of the present invention. Figure 1 As shown, the method includes:

[0057] S101. Obtain unstructured data related to safety education and training, wherein the unstructured data includes text data, image data and video data, perform hierarchical semantic encoding on the text data based on an attention hierarchical encoder, extract multi-level semantic features, perform pyramid hierarchical processing on the image data based on a multi-scale convolutional neural network, extract multi-granular image features, perform temporal semantic modeling on the video data based on a spatiotemporal attention network, extract multi-dimensional temporal features, combine the multi-level semantic features, multi-granular image features and multi-dimensional temporal features into structured multimodal features, input the structured multimodal features into a pre-trained multi-task knowledge extraction model, and extract a safety education and training ontology knowledge base by performing entity relationship semantic alignment based on a contrastive learning paradigm;

[0058] Obtain unstructured data related to safety education and training, including three types: text, images, and videos. Text data can come from relevant articles, reports, training materials, etc.; image data can be charts and diagrams related to safety training; video data can be training videos, accident videos, etc.

[0059] The acquired text data is semantically encoded using a hierarchical encoder based on an attention mechanism. Specifically, the text is first divided into sentences and words, and the words are mapped into low-dimensional dense vectors through word embedding. A multi-layer bidirectional LSTM is used to learn semantic representations of different granularities, including, for example, semantic vectors at the word level, sentence level, and paragraph level. The attention mechanism is incorporated into the encoding process to adaptively aggregate semantic information at different levels to obtain a hierarchical text semantic representation.

[0060] For the acquired image data, a multi-scale convolutional neural network is used for feature extraction. The image is normalized and scaled to a fixed size, and then sent to the convolutional neural network for feature extraction. A pyramid structure based on a feature pyramid network is used to output multi-scale feature maps at different convolutional layers. Low-level feature maps retain more local details, while high-level feature maps contain more global and semantic information. Finally, the feature maps of each layer are spliced ​​together to form a hierarchical and multi-granular representation of the image content.

[0061] The acquired video data is modeled using a spatiotemporal attention network. The video is deframed into a series of images, and features are first extracted from each frame to obtain a temporal feature sequence. The spatiotemporal features are learned using the SlowFast network, where the Slow branch processes low-frame rate videos and extracts long-time scale semantic information, and the Fast branch processes high-frame rate videos and extracts short-time scale detail information. The spatiotemporal features are learned by using 3D convolutions at different time scales. At the same time, the attention mechanism is introduced to calculate the correlation in the time and space dimensions, adaptively aggregate the global context, and model the temporal semantic evolution of the video. Finally, a multi-dimensional temporal feature representation of the video is obtained.

[0062] The features of the three modalities of text, image, and video are combined to obtain a structured multimodal feature representation. Specifically, the features of different modalities are first transformed and mapped to the same semantic space. The features of different modalities are spliced ​​in the feature dimension, and the attention mechanism is optionally used for weighted summation to form a unified multimodal vector. The feature fusion process not only retains the unique information of each modality, but also learns the semantic alignment and complementarity between modalities.

[0063] Input the structured multimodal features into the pre-trained multi-task knowledge extraction model to extract the ontology knowledge of safety education and training. The multi-task knowledge extraction model is pre-trained on a large-scale multimodal corpus and can simultaneously complete tasks such as named entity recognition and relationship extraction. In order to better adapt to the security field, on the basis of pre-training, fine-tuning is performed using in-domain data to learn semantic patterns that are closer to safety education. Introducing entity and relationship alignment tasks based on contrastive learning enables the model to more accurately extract and match domain ontology knowledge.

[0064] Based on the extracted entities and relationships, an ontology knowledge base for safety education and training is constructed. Entities are organized into hierarchical concept trees according to type and connected with relationships to form a structured knowledge graph. Each entity and relationship is linked to the original text, image, and video clip for easy traceability. Through the highly structured organization of the ontology, safety knowledge is made more systematic and easy to use, providing a foundation for safety education and training. At the same time, the knowledge base can also be further applied to scenarios such as intelligent question and answer, case recommendation, and risk warning to assist safety management.

[0065] In this embodiment, text, image and video data are integrated to comprehensively cover the various information sources required for safety education and training; hierarchical encoders and attention mechanisms are used to perform multi-level semantic representation of text to accurately capture information of different granularities; multi-scale convolutional neural networks and feature pyramid networks are used to extract details and global features of images to provide rich image semantic information; SlowFast networks and attention mechanisms are used to model video spatiotemporal features to effectively capture dynamic changes and semantic evolution in videos; the features of text, images and videos are combined in the same semantic space, and weighted fusion is performed using the attention mechanism to achieve semantic alignment and complementarity between modalities; a pre-trained multi-task knowledge extraction model is used and fine-tuned to adapt to the security field to achieve accurate named entity recognition and relationship extraction; a structured safety education and training ontology knowledge base is constructed based on the extracted knowledge to facilitate systematic safety education and management; the knowledge base can be further used for intelligent question and answer, case recommendation, risk warning, etc., to improve the intelligence level of safety management; each knowledge entity and relationship is linked to the original data to ensure traceability and transparency, which is convenient for review and verification.

[0066] In an optional embodiment, the multi-level semantic features, multi-granularity image features and multi-dimensional temporal features are combined into structured multimodal features, the structured multimodal features are input into a pre-trained multi-task knowledge extraction model, and entity relationship semantic alignment is performed based on a contrastive learning paradigm to extract a safety education and training ontology knowledge base, including:

[0067] Inputting the structured multimodal features into a pre-trained multi-task knowledge extraction model to extract entity pairs of the structured multimodal features, the multi-task knowledge extraction model adopts a Transformer-based encoder-decoder architecture, models the correlation between tasks through a multi-head attention mechanism, and uses a gating mechanism to control information interaction between different tasks; the multi-task knowledge extraction model performs entity recognition through a conditional random field layer, performs relationship classification through a classification layer, and performs attribute extraction through a sequence annotation layer;

[0068] Based on the entity pairs, positive sample feature pairs are constructed based on the contrastive learning paradigm, and negative sample feature pairs are constructed by randomly replacing the entities in the entity pairs. The cosine distance between the positive sample feature pairs is minimized, and the cosine distance between the positive and negative sample feature pairs is maximized to achieve relational semantic alignment and extract the safety education and training ontology knowledge base.

[0069] The structured multimodal features are input into the pre-trained multi-task knowledge extraction model to complete entity recognition, relationship classification and attribute extraction tasks at the same time. The multi-task knowledge extraction model adopts a Transformer-based encoder-decoder architecture and models the long-distance dependencies between features through the self-attention mechanism. On the encoder side, the multi-head attention mechanism is used to learn the correlation between different tasks and capture the common and differential features between tasks. On the decoder side, the gating mechanism is used to control the information interaction between different tasks, so that each task can promote each other while maintaining a certain degree of independence.

[0070] The entity recognition task of the multi-task model is completed through the conditional random field layer. The multimodal features are input into the conditional random field layer, and the BIO sequence is annotated for each feature position to identify the boundary and type of the entity. The conditional random field layer takes into account the transition probability between labels, which can effectively solve the label bias problem and improve the accuracy of entity recognition. Through entity recognition, key entities related to safety education and training are extracted from unstructured data to prepare for subsequent relationship extraction.

[0071] The relationship classification task is implemented using the classification layer. For each pair of identified entities, the entity features are concatenated and input into the classification layer to predict whether there is a relationship between the two entities and the specific type of the relationship. The classification layer can use the attention mechanism to aggregate the contextual information of the entity pair. Through relationship classification, the semantic connection between entities can be discovered and key information such as safety incidents and protective measures can be extracted.

[0072] The attribute extraction task is completed using the sequence annotation layer. For each identified entity, the entity feature sequence is input into the annotation layer to predict the attribute label for each word of the entity. The attribute label can be a variety of attribute categories such as accident type, degree of hazard, protection method, etc. The sequence annotation layer accurately extracts the attribute information of the entity by modeling the internal dependency relationship of the entity.

[0073] After extracting entity pairs, the contrastive learning paradigm is used to perform relational semantic alignment to optimize the model's relational extraction effect. For each entity pair, the entity pair is regarded as a positive sample, and a negative sample is constructed by randomly replacing the entity. Cosine similarity is used to measure the distance between entity pair features, and a contrastive loss function is designed to minimize the distance between positive samples and maximize the distance between positive and negative samples, thereby strengthening the semantic consistency of relation extraction and enabling the model to accurately determine whether there is a semantic association between entity pairs.

[0074] Based on the extracted entities, relationships, and attributes, an ontology knowledge base in the field of safety education and training is constructed. Entities are organized into a conceptual hierarchy and connected through relationships such as "is-a" to form a complete knowledge ontology. Each entity node contains its identified attribute information and its relationship with other entities. The ontology knowledge base organizes security domain knowledge in a structured way to provide support for intelligent retrieval, reasoning, and decision-making.

[0075] The constructed multi-task knowledge extraction model is continuously optimized to make it better adapt to safety education and training data. The recognition effect of key entities and relationships can be improved by introducing prior knowledge such as domain dictionaries and rules. Active learning strategies can also be used to specifically annotate key data and improve the generalization performance of the model. The optimized model can be applied to scenarios such as intelligent question and answer of safety knowledge, accident case recommendation, and risk warning to provide auxiliary decision support for safety managers.

[0076] In this embodiment, entity recognition, relationship classification and attribute extraction are completed simultaneously through a multi-task model, thereby improving the efficiency and accuracy of knowledge extraction; the conditional random field layer is used for entity recognition, and the label bias problem is solved by considering BIO sequence annotation and label transfer probability, thereby improving the accuracy of entity recognition; the relationship classification task is implemented through the classification layer, and combined with the attention mechanism, the relationship type between entities is accurately predicted, and the semantic connection between entities is discovered; the attributes of each entity are annotated using the sequence annotation layer, and various attribute information such as accident type, degree of hazard, and protection method are accurately extracted; relational semantic alignment is performed through the comparative learning paradigm, the relationship extraction effect of the model is optimized, the semantic consistency is enhanced, and the semantic association between entity pairs is accurately judged; unstructured data is effectively processed and utilized, and converted into structured knowledge to improve the utilization value of data; the extracted knowledge is linked to the original data to ensure the traceability and transparency of knowledge, which is convenient for verification and tracing.

[0077] S102. Based on the safety education and training ontology knowledge base, by constructing a heterogeneous attribute graph containing multiple types of nodes and multiple relationship edges, combining the attention aggregation process of multiple relationship paths and relationship path similarities, capturing the semantic associations between multiple types of nodes, and generating a safety education knowledge graph;

[0078] The heterogeneous attribute graph specifically refers to a graph structure, which contains multiple types of nodes, such as accidents, preventive measures, equipment, etc., and multiple types of edges, such as occurred in, caused by, etc. It is used to capture different types of objects and their relationships; the relationship path specifically refers to the path from one node to another in the graph, which contains multiple nodes and edges, representing complex relationships and associations; the relationship path similarity is used to measure the semantic similarity of different relationship paths and help aggregate related path information.

[0079] In this embodiment, by constructing heterogeneous attribute graphs and multi-relationship paths, the complex semantic associations between multi-type nodes are fully captured, thereby improving the expressive power of the knowledge graph; by utilizing attention aggregation of relationship path similarity, relevant information is accurately aggregated, thereby improving the quality and accuracy of the knowledge graph; the generated safety education knowledge graph can support complex query and reasoning tasks, and provide more intelligent and accurate retrieval results; the heterogeneous attribute graph structure enables the knowledge base to systematically manage and retrieve various types of safety knowledge, thereby improving safety management efficiency; through intelligent knowledge graphs, safety managers can obtain required information faster and more accurately, assist in decision-making, and improve the efficiency and effectiveness of safety management.

[0080] In an optional embodiment, based on the safety education and training ontology knowledge base, by constructing a heterogeneous attribute graph containing multiple types of nodes and multiple relationship edges, combining the attention aggregation process of multiple relationship paths and relationship path similarities, capturing the semantic associations between multiple types of nodes, and generating a safety education knowledge graph includes:

[0081] The knowledge elements of concepts, instances, and attribute values ​​in the safety education and training ontology knowledge base are mapped into multi-type nodes in a heterogeneous attribute graph, the upper and lower relationships between concept nodes are mapped into a first relationship edge, the subordinate relationship from concept to instance is mapped into a second relationship edge, the description relationship from instance to attribute value is mapped into a third relationship edge, and the relationship triple from head entity to tail entity is mapped into a fourth relationship edge between instance nodes;

[0082] Determine multiple relationship paths based on the multiple types of nodes and the multiple relationship edges, the relationship paths include a first relationship path reflecting semantic connections between concepts, a second relationship path reflecting concept-instance semantic connections, and a third relationship path reflecting semantic connections between instances;

[0083] Taking the cosine similarity of two relationship paths as the path similarity, constructing a path similarity matrix corresponding to multiple relationship paths, constructing a two-layer attention network, wherein the first layer of the attention network generates a first attention weight according to the relationship path itself, and the second layer of the attention network generates a second attention weight according to the path similarity matrix, and the first attention weight and the second attention weight are weighted to obtain a comprehensive attention weight;

[0084] Multiple relationship paths passing through the same type of node are aggregated through comprehensive attention weights to obtain a comprehensive semantic representation of this type of node. The semantic associations of different types of nodes are determined through the comprehensive semantic representation to generate a safety education knowledge graph.

[0085] The safety education and training ontology knowledge base is mapped into a heterogeneous attribute graph. The knowledge elements such as concepts, instances, and attribute values ​​in the knowledge base are converted into multi-type nodes in the graph. Concept nodes represent abstract concepts in the safety field, such as "accidents" and "protective measures"; instance nodes represent specific accident cases, protective equipment, etc.; attribute value nodes represent the attribute description information of instances.

[0086] The relationship between nodes of different types is mapped to multiple relationship edges in the graph. The hierarchical relationship between concept nodes forms the first relationship edge, for example, "fire" is a subordinate concept of "accident". The subordinate relationship from concept to instance forms the second relationship edge, for example, "factory fire in city A" is an instance of the concept of "fire". The descriptive relationship from instance to attribute value forms the third relationship edge, which describes the attribute characteristics of the instance. The relationship triple from the head entity to the tail entity is mapped to the fourth relationship edge between instance nodes, indicating the semantic connection between instances, such as the relationship between "safety helmet" and "protection". Through the above mapping, the ontology knowledge base is converted into a heterogeneous attribute graph containing multiple types of nodes and multiple relationship edges, providing a basis for subsequent semantic association calculations.

[0087] On the heterogeneous attribute graph, based on multi-type nodes and relationship edges, relation paths reflecting different semantic connections are constructed. The first relationship path consists of concept nodes and first relationship edges, reflecting the upper and lower semantic connections between concepts, such as "accident"-"fire"-"explosion". The second relationship path consists of concept nodes, instance nodes and second relationship edges, depicting the subordinate semantic connection between concepts and instances, such as "protective measures"-"safety helmet". The third relationship path consists of instance nodes and fourth relationship edges, representing the relational semantic connection between instances, such as "safety helmet"-"protection"-"head protection". Through these relationship paths, different types of nodes in the heterogeneous graph are connected to form rich semantic associations. The shorter the relationship path, the tighter the semantic connection between nodes; the higher the diversity of the relationship path, the more complex the semantic connection between nodes. Mining these relationship paths is the key to building a knowledge graph.

[0088] In order to measure the similarity between different relationship paths, the concept of path similarity is introduced. For two relationship paths, cosine similarity is used to calculate the similarity between their feature vectors as path similarity. Feature vectors can use methods such as word embedding to map nodes and edges in the path to a low-dimensional space, and then perform representation learning. By calculating the similarity between all relationship paths, a path similarity matrix can be constructed. The path similarity matrix reflects the correlation between different semantic paths in a heterogeneous graph, providing a basis for subsequent attention weight calculation.

[0089] In order to effectively aggregate the semantic information of nodes from numerous relationship paths, a two-layer attention network is designed. The first-layer attention network takes the relationship path itself as input and generates the first attention weight through the self-attention mechanism. The first attention weight reflects the importance of different relationship paths themselves. The second-layer attention network takes the path similarity matrix as input and generates the second attention weight through the attention mechanism. The second attention weight considers the correlation between different relationship paths, gives higher weights to similar paths, and highlights the interaction between paths. Finally, the first and second weights are weighted and summed to obtain the comprehensive attention weight. The comprehensive attention weight considers both the importance of the relationship path itself and the mutual influence between paths, and can more accurately reflect the semantic association between nodes.

[0090] Using the comprehensive attention weight, a comprehensive semantic representation vector is generated for each node in the heterogeneous graph. Specifically, for each type of node, all relationship paths passing through the node are collected, and these paths are weighted summed using the comprehensive attention weight to obtain the semantic representation of the node. The comprehensive semantic representation vector of the node integrates the semantic information of all relationship paths involved in the node, and comprehensively describes the semantic role of the node in the graph. Nodes with similar semantics will have similar representation vectors, and the representation vectors between semantically related nodes will also be closer.

[0091] Based on the comprehensive semantic representation of nodes, a safety education knowledge graph is constructed. By calculating the similarity between the representation vectors of different nodes, the semantic associations between nodes can be discovered, revealing the intrinsic connections between concepts, instances, and attributes. By connecting nodes with high semantic relevance, a knowledge graph with wide coverage and strong relevance is formed. In the safety education knowledge graph, concept nodes reflect the core concept system in the safety field, instance nodes reflect specific accident cases and protective measures, and attribute nodes provide detailed descriptions of instances. Through relationship edge connections, these nodes form an organic whole, which comprehensively depicts the knowledge system in the field of safety education and training, and provides support for intelligent retrieval, reasoning, and decision-making.

[0092] In this embodiment, by mapping the safety education and training ontology knowledge base into a heterogeneous attribute graph, a comprehensive representation of multiple types of nodes such as concepts, instances and attribute values ​​and their relationships is provided to provide a richer knowledge representation; by constructing multiple relationship paths and path similarity matrices, complex semantic associations are captured to reveal the deep connections between concepts, instances and attributes; using a double-layer attention network, the relationship paths are weighted and summed to generate a comprehensive attention weight to ensure the precise aggregation of semantic information and improve the accuracy of node semantic representation; based on the comprehensive attention weight and node comprehensive semantic representation, a safety education knowledge graph is constructed to ensure the high relevance and coverage of the knowledge graph Extensive; the generated knowledge graph can support intelligent retrieval, reasoning and decision-making, improve the efficiency and accuracy of information retrieval, and assist safety managers in making more accurate decisions; the comprehensive semantic representation vector comprehensively describes the semantic role of each node in the graph, so that nodes with similar semantics have similar representation vectors, which is convenient for identifying and analyzing semantic relevance; through the path similarity matrix and comprehensive attention weights, high-quality semantic similarity calculation is provided to reveal the deep semantic associations between nodes; the introduction of heterogeneous attribute graphs and attention mechanisms enables the knowledge graph to be dynamically updated, maintain the timeliness and accuracy of knowledge, and adapt to the ever-changing needs of safety education and training.

[0093] In an optional embodiment, the first layer of attention network generates a first attention weight according to the relationship path itself, and the second layer of attention network generates a second attention weight according to the path similarity matrix, including:

[0094] The first-layer attention weights are used to do a dot product between a learnable parameter vector and the semantic translation vector of each relationship path of a node connection. All dot product results are indexed and normalized. The first-layer attention weights are generated by measuring the importance of each relationship path based on its own semantics.

[0095] By calculating the cosine similarity of the semantic Translation vectors of two relational paths, determining the matrix elements, and constructing a relational path similarity matrix, for each relational path, taking the weighted sum of the similarities between the relational path and all other paths, performing dot product of the summation result and the learnable parameter vector, exponentializing and normalizing the results of all dot products, determining the similarity between each relational path and other paths, and generating the second-layer attention weights.

[0096] The calculation process of the first layer of attention weights, for each relational path connecting nodes, first uses a learnable parameter vector to perform a dot product operation with the semantic Translation vector of the relational path. The purpose of this step is to capture the importance of each relational path through a learnable parameter vector. Next, the dot product results of all relational paths are indexed and normalized. The purpose of indexation is to amplify the weights of important paths, while the purpose of normalization is to ensure that the sum of all weights is 1. The first layer of attention weights is generated to measure the importance of each relational path based on its own semantics.

[0097] The calculation process of the second-layer attention weights calculates the semantic similarity between every two relationship paths. The specific method is to calculate the cosine similarity of their semantic translation vectors. Based on the calculated similarity, a relationship path similarity matrix is ​​constructed. Then, for each relationship path, its similarity with all other paths is weighted summed. The purpose is to comprehensively consider the similarity between a path and all other paths. The result of the weighted summation is dot-producted with another learnable parameter vector, and the dot product results of all paths are indexed and normalized. The second-layer attention weights are generated to measure the similarity of each relationship path with other paths.

[0098] In an alternative embodiment,

[0099] The calculation formula for the first layer of attention weight is as follows:

[0100] ;

[0101] in, e i (1) Represents the first layer of attention i Relation path dot product, v (1) represents the learnable parameter vector of the first layer of attention, tanh(·) represents the hyperbolic tangent activation function, and W (1) represents the linear transformation parameter matrix of the semantic vector in the first layer of attention, h i represents the semantic vector, U (1) represents the linear transformation parameter matrix of the feature vector in the first layer of attention, x represents the feature vector, b (1) represents the bias vector in the first layer of attention, a i (1) represents the first layer attention weight, n represents the relationship path ordinal number, N represents the total number of relationship paths, e n (1) Represents the first layer of attention n Relation path dot product, ε represents the smoothness term, λ 1 represents the first regularization term coefficient;

[0102] The calculation formula for the second layer attention weight is as follows:

[0103] ;

[0104] in, s i represents the sum of the weighted cosine similarities between the i-th relationship path and other paths, m express M The ordinal number of the relationship path under the total number, M Indicates the total number of relationship paths involved in the current calculation. a m (1) represents the first layer attention weight corresponding to the m relationship path, h m Represents the semantic vectors of other paths, e i (2) Represents the second level of attention i Relation path dot product, v (2) represents the learnable parameter vector of the second layer of attention, ReLU(·) represents the ReLU activation function, and W (2) represents the linear transformation parameter matrix of the concatenated vector in the second layer of attention, b (2) represents the bias vector in the second layer of attention, a i (2) represents the first layer attention weight, j express J The ordinal number of the relationship path under the total number, J Indicates the total number of relationship paths involved in the current calculation. e j (2) Represents the second level of attention j Relation path dot product, λ 2 represents the second regularization term coefficient, k Indicates the parameter ordinal number, K Represents the matrix W (2) The total number of parameters, W k (2) W (2) The k parameters.

[0105] In this embodiment, by using the first layer of attention weights, the model can accurately identify and weight important paths according to the semantic importance of the relationship paths, ensuring that when processing node connections, the model focuses on the paths that are most critical to semantic understanding; the second layer of attention weights can effectively capture the semantic associations between different paths by calculating the cosine similarity between paths, not only considering the semantics of a single path, but also integrating the information of similar paths to more comprehensively understand the relationship between nodes; introducing nonlinear transformations and regularization terms to enhance the expressiveness of the model while preventing overfitting helps to improve the generalization ability of the model, so that it performs better when processing unseen data.

[0106] S103. Map the pre-acquired basic information and historical learning information of the safety education training students to the semantic space where the safety education knowledge graph is located for fusion, construct a student portrait through a multi-task knowledge distillation method, and perform a connected subgraph search in the safety education knowledge graph through a reasoning method based on soft edge matching to determine the learning path and knowledge fragments that best match the student portrait, and generate a student-customized learning path sequence.

[0107] In this embodiment, by integrating student information with the safety education knowledge graph and utilizing multi-task knowledge distillation and soft-edge matching reasoning methods, personalized, efficient, accurate, and coherent learning path recommendations can be achieved, thereby improving students' learning outcomes and learning experience, and optimizing the utilization of educational resources. This not only improves students' learning efficiency, but also enhances the interactivity and pertinence of learning, bringing significant beneficial effects to educational institutions and students.

[0108] In an optional embodiment, the basic information and historical learning information of the safety education training trainees acquired in advance are mapped to the semantic space where the safety education knowledge graph is located for fusion, and the trainee portrait is constructed through a multi-task knowledge distillation method, including:

[0109] Map the basic information and historical learning information of the students to the semantic space where the safety education knowledge graph is located for fusion, and construct an initial student portrait;

[0110] Based on a multi-stage feature extraction strategy, each feature layer corresponds to a feature dimension, and the corresponding features in the initial student portrait are divided into a demographic feature layer, a learning behavior feature layer, a knowledge mastery feature layer, and a safety awareness feature layer. In the demographic feature layer, a static feature extraction module is set to extract the student's static attribute features through a predetermined multi-layer perceptron. In the learning behavior feature layer, a dynamic feature extraction module is set to extract the student's dynamic behavior sequence features through a predetermined long short-term memory network. In the knowledge mastery feature layer, a knowledge mastery feature extraction module is set to extract the mastery degree features of each knowledge point through a pre-built convolutional neural network. In the safety awareness feature layer, a safety awareness feature extraction module is set to extract the student's safety awareness features through an attention mechanism, and extract layer by layer from bottom to top according to the preset order of the feature layer;

[0111] Based on the progressive knowledge distillation strategy, a global distillation module is constructed, which receives the output results corresponding to each feature layer, fuses the output results through the attention mechanism, and determines the characteristics of the students;

[0112] During the training process of the global distillation module, one or more extraction modules from the static feature extraction module, the dynamic feature extraction module, the knowledge mastery feature extraction module and the safety awareness feature extraction module are selected each time to participate in the training process. Based on the number of training iterations, the extraction modules are added in sequence, combined with the adversarial regularization mechanism, to obtain the final student portrait.

[0113] Map the basic information and historical learning information of the students to the semantic space where the safety education knowledge graph is located to construct the initial student portrait. First, it is necessary to collect the basic information and historical learning information of the students, including the demographic information of the students, such as age, gender, occupation, etc., learning behavior data, such as learning time, learning frequency, learning activity, etc., knowledge mastery, such as test scores, knowledge point mastery, etc., and safety awareness-related data, such as safety questionnaire filling, safety incident response, etc. Then, map the collected information to the semantic space where the pre-constructed safety education knowledge graph is located. By semantically associating student information with entities and relationships in the knowledge graph, the fusion of student information and safety knowledge can be achieved, and an initial student portrait can be constructed. The scattered student information can be integrated into a unified semantic framework, laying the foundation for subsequent feature extraction and student modeling.

[0114] Based on the multi-stage feature extraction strategy, multi-level student features are extracted from the initial student portrait. The initial student portrait is divided into four feature layers, namely, the demographic feature layer, the learning behavior feature layer, the knowledge mastery feature layer, and the safety awareness feature layer, each layer corresponding to a feature dimension. In the demographic feature layer, a static feature extraction module is set up to extract the static attribute features of the students, such as age, gender, occupation, etc., through the pre-trained multi-layer perceptron network. The multi-layer perceptron can transform the original demographic information into a high-level abstract feature representation through multiple nonlinear transformations. In the learning behavior feature layer, a dynamic feature extraction module is set up to extract the dynamic behavior sequence features of the students, such as learning time, learning frequency, learning activity, etc., through the pre-trained long and short-term memory network. The long and short-term memory network can effectively capture the temporal dependency in the student behavior data and explore the dynamic change law of the student behavior pattern. In the knowledge mastery feature layer, a knowledge mastery feature extraction module is set up to extract the characteristics of the students' mastery of each knowledge point through the pre-built convolutional neural network. Through the local receptive field and weight sharing mechanism, the convolutional neural network can efficiently process the students' knowledge mastery data and judge the students' understanding and mastery of different knowledge points. In the safety awareness feature layer, a safety awareness feature extraction module is set up to extract the students' safety awareness features through the attention mechanism. The attention mechanism can adaptively assign the importance weights of different safety awareness indicators and dynamically focus on the key factors that have a greater impact on the students' safety awareness. The four feature extraction modules extract features in order from the bottom to the top, forming a multi-stage feature extraction strategy that can comprehensively and systematically characterize all aspects of the students' characteristics.

[0115] Based on the progressive knowledge distillation strategy, a global distillation module is constructed to fuse the output results of multiple feature layers to generate a comprehensive feature representation of the students. A global distillation module is constructed to receive the output results from the demographic feature layer, learning behavior feature layer, knowledge mastery feature layer, and safety awareness feature layer. The global distillation module uses the attention mechanism to adaptively fuse the output information of different feature layers. Specifically, the global distillation module dynamically calculates the importance weight of the output of each feature layer, and then performs weighted summation of the outputs of different feature layers according to the weight size to obtain the comprehensive feature representation of the students. Through the introduction of the attention mechanism, the global distillation module can flexibly adjust the contribution of different feature layers according to the characteristics of different students, thereby obtaining more accurate and comprehensive student characteristics. At the same time, the global distillation module also plays the role of knowledge distillation, compressing and refining the knowledge learned by multiple feature extraction modules, so that the final student feature representation is more concise and efficient.

[0116] In the training process of the global distillation module, a progressive training strategy and an adversarial regularization mechanism are adopted to obtain the final student portrait. In the process of training the global distillation module, a progressive training strategy is preferably adopted. Specifically, in the initial stage of training, only some feature extraction modules are selected to participate in the training, and the number of feature extraction modules participating in the training is gradually increased until all feature extraction modules are added to the training. The progressive training strategy enables the global distillation module to gradually adapt to the output of different feature layers, avoiding the training difficulties and instability caused by adding all feature layers at one time. At the same time, an adversarial regularization mechanism is introduced during the training process. Specifically, an adversarial discriminator is constructed to determine whether the student features output by the global distillation module are authentic and credible. The global distillation module needs to generate realistic student features as much as possible to deceive the adversarial discriminator, and the adversarial discriminator needs to distinguish the differences between the student features generated by the global distillation module and the real student features as much as possible. Through this adversarial training mechanism, the global distillation module is prompted to generate more realistic and credible student features, thereby improving the quality of the student portrait. After progressive training and adversarial regularization, the student portrait finally obtained can comprehensively and accurately reflect the characteristics of all aspects of the student.

[0117] In this embodiment, a multi-stage feature extraction strategy is used to refine the feature hierarchy. The multi-level feature extraction can comprehensively and systematically characterize various aspects of the students, and improve the understanding and modeling capabilities of the students' characteristics. Each module targets a specific feature dimension to ensure the accuracy and personalization of feature extraction, and improve the accuracy of the student portrait. The global distillation module uses the attention mechanism to adaptively fuse the outputs of different feature layers to generate a comprehensive feature representation of the students. The contribution of the feature layer is dynamically adjusted to ensure the comprehensiveness and accuracy of the student portrait. A progressive training strategy is adopted to gradually increase the number of feature extraction modules involved in training to avoid training difficulties and instability problems. An adversarial regularization mechanism is introduced to improve the authenticity and credibility of the student portrait through adversarial training, and enhance the generalization ability of the model.

[0118] In an optional embodiment, a connected subgraph search is performed in the safety education knowledge graph through a reasoning method based on soft edge matching to determine the learning path and knowledge fragments that have the highest matching degree with the student profile, and generating a student customized learning path sequence includes:

[0119] Map the student portrait to the semantic space of the safety education knowledge graph, calculate the matching degree between the student portrait and the nodes in the safety education knowledge graph, and obtain the student-node matching degree matrix;

[0120] Combined with the semantic type of the edge in the safety education knowledge graph, the matching degree between the student portrait and the edge is calculated to obtain the student-edge matching matrix;

[0121] Taking the node corresponding to the maximum value in the student-node matching matrix as the starting point and the student-edge matching matrix as the transition probability, the connected subgraph is searched on the safety education knowledge graph through the soft edge random walk strategy until all the knowledge points required for learning are covered, and the learning knowledge subgraph that best matches the student profile is obtained;

[0122] Based on the learning knowledge subgraph, determining the semantic dependency between nodes in the learning knowledge subgraph and the knowledge mastery of the trainees, calculating the learning priority between nodes, and generating an optimal learning node sequence through priority sorting;

[0123] Match each node in the optimal learning node sequence with the student portrait, obtain student customized knowledge fragments, and generate learning content recommendation results;

[0124] According to the optimal learning node sequence and the learning content recommendation results, multi-modal learning resources corresponding to the nodes are matched and obtained, and finally a student customized learning path sequence is generated.

[0125] Map the student portrait to the semantic space of the safety education knowledge graph, and calculate the matching degree between the student portrait and the nodes and edges of the knowledge graph. First, the student portrait obtained in the previous step needs to be mapped to the semantic space where the safety education knowledge graph is located. This is achieved through semantic embedding technology, that is, the feature vector in the student portrait is converted into a representation in the same semantic space as the feature vector of the knowledge graph node and edge through methods such as neural networks. Calculate the semantic similarity between the student portrait and each node in the knowledge graph to obtain the student-node matching matrix. Semantic similarity can be measured by methods such as cosine similarity and Euclidean distance. Considering that the edges between nodes in the knowledge graph also contain important semantic information, it is also necessary to calculate the matching degree between the student portrait and the edge. Specifically, the semantic similarity between the student portrait and the edge can be calculated based on the matching degree of the node connected by the edge to the student portrait, as well as the semantic type of the edge itself, such as "pre-relationship" and "inclusion relationship", to obtain the student-edge matching matrix. Through this step, the semantic association degree between the student portrait and each element of the knowledge graph can be comprehensively characterized, laying the foundation for the subsequent generation of personalized learning paths.

[0126] Taking the node corresponding to the maximum value in the student-node matching matrix as the starting point, the connected subgraph is searched on the knowledge graph through the soft edge random walk strategy to obtain the learning knowledge subgraph that best matches the student profile. Specifically, after obtaining the student-node matching matrix, the node with the largest matching degree is selected as the starting point of the learning path. The starting node represents the knowledge point that is most relevant to the student's current state and should be learned first. Taking the student-edge matching matrix as the transition probability matrix, the soft edge random walk strategy is used to search on the knowledge graph to find other nodes connected to the starting node and with a high matching degree with the student profile, and add other nodes to the learning knowledge subgraph. The soft edge random walk strategy is a random walk algorithm based on the graph structure. It considers the influence of the semantic type of the edge on the importance of the node and can more accurately mine the semantic association between nodes. Specifically, in each step of the walk, we determine which node to walk to next based on the matching degree between the current node and the student profile and the value of the edge between the current node and other nodes in the student-edge matching matrix. Repeat the walk process until the learning knowledge subgraph covers all the core knowledge points required for learning. The final learning knowledge subgraph represents the knowledge structure that best matches the student portrait and is most suitable for the student's current learning needs.

[0127] Based on the learning knowledge subgraph, the learning priority of the node is calculated through the semantic dependency between nodes and the knowledge mastery of the students, and the optimal learning node sequence is generated. After obtaining the learning knowledge subgraph, the learning order of the nodes in the subgraph is determined. The semantic dependency between the nodes in the subgraph is analyzed, and the semantic dependency between each pair of nodes is calculated. The semantic dependency reflects whether the learning of one node to another node is necessary, and the order of learning. For example, if node A is the pre-knowledge of node B, node A must be learned before learning node B, and the semantic dependency between node A and node B is relatively high. The semantic dependency can be calculated by analyzing the semantic type of the edge between nodes and the logical relationship between the corresponding knowledge points of the nodes. In addition to the semantic dependency, it is also necessary to consider the student's mastery of the knowledge points represented by each node. For example, if the student has mastered the knowledge points of a certain node well, the learning priority of the node can be reduced. The student's knowledge mastery can be estimated by analyzing the knowledge mastery features in the student portrait and the student's historical learning data. Taking into account the semantic dependency between nodes and the knowledge mastery of students, the learning priority score of each node is calculated, and the nodes are sorted according to the priority score to obtain the optimal learning node sequence. The optimal learning node sequence represents the best learning path for students when learning knowledge subgraphs, which can maximize the learning needs and cognitive laws of students.

[0128] Match each node in the optimal learning node sequence with the student portrait to obtain personalized knowledge fragments and generate learning content recommendation results. According to the optimal learning node sequence, each node is deeply matched with the student portrait in turn to dig out the knowledge fragments that are most relevant to the student's characteristics and are easiest to understand and accept. Specifically, starting from the knowledge point corresponding to the node, combined with the demographic characteristics, learning behavior characteristics, knowledge mastery characteristics and safety awareness characteristics in the student portrait, through semantic analysis, keyword extraction, text summarization and other technologies, the knowledge fragments that best match the student's characteristics are screened from the knowledge base. Knowledge fragments can be in various forms such as text, images, videos, cases, etc., presenting the core knowledge content contained in the node in a way that is closest to the student's cognitive and comprehension ability. Through this personalized knowledge fragment matching, customized learning content recommendation results are generated for each node to ensure that the student can master each knowledge point in the most appropriate and effective way. On the basis of the learning path, further personalized and precise learning content support is provided to maximize the student's learning motivation, learning experience and learning effect.

[0129] According to the optimal learning node sequence and learning content recommendation results, multi-modal learning resources are matched to generate customized learning paths for students. In the previous steps, the optimal learning node sequence and the personalized learning content recommendation results for each node were obtained. Further, multi-modal learning resources are matched for each node to build a complete customized learning path for students. Specifically, we retrieve various types of learning resources that match the characteristics of the learning content recommendation results from the massive learning resource library, such as text materials, pictures, animations, videos, audios, cases, test questions, etc. These learning resources explain and present the knowledge points corresponding to the nodes from multiple perspectives in different forms and media, which can meet the learning preferences and cognitive styles of different students. When matching learning resources, not only the content relevance of the resources is considered, but also the quality, difficulty, duration and other factors of the resources are considered to ensure that the best and most suitable resource combination for the current learning level of the students is selected. Through this step, we have integrated the learning path, learning content and learning resources to form a comprehensive, three-dimensional and personalized customized learning plan for students. Students can follow the optimal learning node sequence, learn the recommended content of each node in turn, and use the matching multi-modal resources for in-depth learning and consolidation, ultimately completing the entire learning process efficiently and with high quality, truly achieving teaching in accordance with students' aptitude and targeted learning.

[0130] In this embodiment, the student portrait is mapped to the semantic space of the safety education knowledge graph through semantic embedding technology, and the matching degree between the student and the nodes and edges of the knowledge graph is accurately calculated to achieve accurate positioning of the student's needs; the semantic information of the nodes and edges in the knowledge graph is comprehensively considered, and the relationship between the student portrait and the elements of the knowledge graph is comprehensively characterized to ensure the personalization and matching degree of the subsequent learning path; a soft-edge random walk strategy is adopted to search for connected subgraphs on the knowledge graph to generate a learning knowledge subgraph that best matches the student portrait, ensuring the personalization and pertinence of the learning path; by analyzing the semantic dependency of the nodes in the learning knowledge subgraph and the student's knowledge mastery, the learning priority of the node is calculated, the optimal learning node sequence is generated, the learning order is optimized, and the learning efficiency is improved; according to the optimal learning node sequence, each node is deeply matched with the student portrait to obtain personalized knowledge fragments, generate learning content recommendation results, and improve the student's learning motivation and experience.

[0131] Figure 2 Schematic diagram of the structure of the AI-based safety education and training knowledge graph and data management system in an embodiment of the present invention. Figure 2 As shown, the system comprises:

[0132] The first unit is used to obtain unstructured data related to safety education and training, wherein the unstructured data includes text data, image data and video data, hierarchical semantic encoding is performed on the text data based on the attention hierarchical encoder, and multi-level semantic features are extracted, pyramid hierarchical processing is performed on the image data based on the multi-scale convolutional neural network, and multi-granular image features are extracted, and temporal semantic modeling is performed on the video data based on the spatiotemporal attention network, and multi-dimensional temporal features are extracted, and the multi-level semantic features, multi-granular image features and multi-dimensional temporal features are combined into structured multimodal features, and the structured multimodal features are input into a pre-trained multi-task knowledge extraction model, and the safety education and training ontology knowledge base is extracted by performing entity relationship semantic alignment based on the contrastive learning paradigm;

[0133] The second unit is used to capture the semantic associations between multiple types of nodes and generate a safety education knowledge graph based on the safety education training ontology knowledge base by constructing a heterogeneous attribute graph containing multiple types of nodes and multiple relationship edges, combining the attention aggregation process of multiple relationship paths and relationship path similarities;

[0134] The third unit is used to map the pre-acquired basic information and historical learning information of the safety education training students to the semantic space where the safety education knowledge graph is located for fusion, construct a student portrait through a multi-task knowledge distillation method, and perform a connected subgraph search in the safety education knowledge graph through an inference method based on soft edge matching to determine the learning path and knowledge fragments that best match the student portrait, and generate a student customized learning path sequence.

[0135] According to a third aspect of the embodiments of the present invention,

[0136] An electronic device is provided, comprising:

[0137] processor;

[0138] a memory for storing processor-executable instructions;

[0139] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0140] According to a fourth aspect of the embodiments of the present invention,

[0141] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0142] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. The AI-based safety education and training knowledge graph and data management method is characterized by: include: Obtain unstructured data related to safety education and training, the unstructured data including text data, image data and video data, perform hierarchical semantic encoding on the text data based on the attention hierarchical encoder, extract multi-level semantic features, perform pyramid hierarchical processing on the image data based on the multi-scale convolutional neural network, extract multi-granular image features, perform temporal semantic modeling on the video data based on the spatiotemporal attention network, extract multi-dimensional temporal features, combine the multi-level semantic features, multi-granular image features and multi-dimensional temporal features into structured multimodal features, input the structured multimodal features into a pre-trained multi-task knowledge extraction model, extract the safety education and training ontology knowledge base by performing entity relationship semantic alignment based on the contrastive learning paradigm; Based on the safety education and training ontology knowledge base, by constructing a heterogeneous attribute graph containing multiple types of nodes and multiple relationship edges, combining the attention aggregation process of multiple relationship paths and relationship path similarities, the semantic associations between multiple types of nodes are captured to generate a safety education knowledge graph; The basic information and historical learning information of the safety education training students acquired in advance are mapped to the semantic space where the safety education knowledge graph is located for fusion, and a student portrait is constructed through a multi-task knowledge distillation method. A connected subgraph search is performed in the safety education knowledge graph through a reasoning method based on soft edge matching to determine the learning path and knowledge fragments with the highest matching degree with the student portrait, and generate a student customized learning path sequence; Through the reasoning method based on soft edge matching, a connected subgraph search is performed in the safety education knowledge graph to determine the learning path and knowledge fragments that have the highest matching degree with the student profile, and a student customized learning path sequence is generated, including: Map the student portrait to the semantic space of the safety education knowledge graph, calculate the matching degree between the student portrait and the nodes in the safety education knowledge graph, and obtain the student-node matching degree matrix; Combined with the semantic type of the edge in the safety education knowledge graph, the matching degree between the student portrait and the edge is calculated to obtain the student-edge matching matrix; Taking the node corresponding to the maximum value in the student-node matching matrix as the starting point and the student-edge matching matrix as the transition probability, the connected subgraph is searched on the safety education knowledge graph through the soft edge random walk strategy until all the knowledge points required for learning are covered, and the learning knowledge subgraph that best matches the student profile is obtained; Based on the learning knowledge subgraph, determining the semantic dependency between nodes in the learning knowledge subgraph and the knowledge mastery of the trainees, calculating the learning priority between nodes, and generating an optimal learning node sequence through priority sorting; Match each node in the optimal learning node sequence with the student portrait, obtain student customized knowledge fragments, and generate learning content recommendation results; According to the optimal learning node sequence and the learning content recommendation results, multi-modal learning resources corresponding to the nodes are matched and obtained, and finally a student customized learning path sequence is generated.

2. The method according to claim 1, characterized in that The multi-level semantic features, multi-granularity image features and multi-dimensional temporal features are combined into structured multimodal features, and the structured multimodal features are input into a pre-trained multi-task knowledge extraction model. By performing entity relationship semantic alignment based on a contrastive learning paradigm, a safety education and training ontology knowledge base is extracted, including: Inputting the structured multimodal features into a pre-trained multi-task knowledge extraction model to extract entity pairs of the structured multimodal features, the multi-task knowledge extraction model adopts a Transformer-based encoder-decoder architecture, models the correlation between tasks through a multi-head attention mechanism, and uses a gating mechanism to control information interaction between different tasks; the multi-task knowledge extraction model performs entity recognition through a conditional random field layer, performs relationship classification through a classification layer, and performs attribute extraction through a sequence annotation layer; Based on the entity pairs, positive sample feature pairs are constructed based on the contrastive learning paradigm, and negative sample feature pairs are constructed by randomly replacing the entities in the entity pairs. The cosine distance between the positive sample feature pairs is minimized, and the cosine distance between the positive and negative sample feature pairs is maximized to achieve relational semantic alignment and extract the safety education and training ontology knowledge base.

3. The method according to claim 1, characterized in that Based on the safety education and training ontology knowledge base, by constructing a heterogeneous attribute graph containing multiple types of nodes and multiple relationship edges, combining the attention aggregation process of multiple relationship paths and relationship path similarities, capturing the semantic associations between multiple types of nodes, and generating a safety education knowledge graph including: The knowledge elements of concepts, instances, and attribute values ​​in the safety education and training ontology knowledge base are mapped into multi-type nodes in a heterogeneous attribute graph, the upper and lower relationships between concept nodes are mapped into a first relationship edge, the subordinate relationship from concept to instance is mapped into a second relationship edge, the description relationship from instance to attribute value is mapped into a third relationship edge, and the relationship triple from head entity to tail entity is mapped into a fourth relationship edge between instance nodes; Determine multiple relationship paths based on the multiple types of nodes and the multiple relationship edges, the relationship paths include a first relationship path reflecting semantic connections between concepts, a second relationship path reflecting concept-instance semantic connections, and a third relationship path reflecting semantic connections between instances; Taking the cosine similarity of two relationship paths as the path similarity, constructing a path similarity matrix corresponding to multiple relationship paths, constructing a two-layer attention network, wherein the first layer of the attention network generates a first attention weight according to the relationship path itself, and the second layer of the attention network generates a second attention weight according to the path similarity matrix, and the first attention weight and the second attention weight are weighted to obtain a comprehensive attention weight; Multiple relationship paths passing through the same type of node are aggregated through comprehensive attention weights to obtain a comprehensive semantic representation of this type of node. The semantic associations of different types of nodes are determined through the comprehensive semantic representation to generate a safety education knowledge graph.

4. The method according to claim 3, characterized in that The first layer of attention network generates a first attention weight according to the relationship path itself, and the second layer of attention network generates a second attention weight according to the path similarity matrix, including: The first-layer attention weights are used to do a dot product between a learnable parameter vector and the semantic translation vector of each relationship path of a node connection. All dot product results are indexed and normalized. The first-layer attention weights are generated by measuring the importance of each relationship path based on its own semantics. By calculating the cosine similarity of the semantic Translation vectors of two relational paths, determining the matrix elements, and constructing a relational path similarity matrix, for each relational path, taking the weighted sum of the similarities between the relational path and all other paths, performing dot product of the summation result and the learnable parameter vector, exponentializing and normalizing the results of all dot products, determining the similarity between each relational path and other paths, and generating the second-layer attention weights.

5. The method according to claim 1, characterized in that The basic information and historical learning information of the safety education training trainees acquired in advance are mapped to the semantic space where the safety education knowledge graph is located for fusion. Through the multi-task knowledge distillation method, the trainee portrait is constructed, including: Map the basic information and historical learning information of the students to the semantic space where the safety education knowledge graph is located for fusion, and construct an initial student portrait; Based on a multi-stage feature extraction strategy, each feature layer corresponds to a feature dimension, and the corresponding features in the initial student portrait are divided into a demographic feature layer, a learning behavior feature layer, a knowledge mastery feature layer, and a safety awareness feature layer. In the demographic feature layer, a static feature extraction module is set to extract the student's static attribute features through a predetermined multi-layer perceptron. In the learning behavior feature layer, a dynamic feature extraction module is set to extract the student's dynamic behavior sequence features through a predetermined long short-term memory network. In the knowledge mastery feature layer, a knowledge mastery feature extraction module is set to extract the mastery degree features of each knowledge point through a pre-built convolutional neural network. In the safety awareness feature layer, a safety awareness feature extraction module is set to extract the student's safety awareness features through an attention mechanism, and extract layer by layer from bottom to top according to the preset order of the feature layer; Based on the progressive knowledge distillation strategy, a global distillation module is constructed, which receives the output results corresponding to each feature layer, fuses the output results through the attention mechanism, and determines the characteristics of the students; During the training process of the global distillation module, one or more extraction modules from the static feature extraction module, the dynamic feature extraction module, the knowledge mastery feature extraction module and the safety awareness feature extraction module are selected each time to participate in the training process. Based on the number of training iterations, the extraction modules are added in sequence, combined with the adversarial regularization mechanism, to obtain the final student portrait.

6. A safety education and training knowledge graph and data management system based on AI, used to implement the method described in any one of claims 1 to 5, characterized in that: include: The first unit is used to obtain unstructured data related to safety education and training, wherein the unstructured data includes text data, image data and video data, hierarchical semantic encoding is performed on the text data based on the attention hierarchical encoder, and multi-level semantic features are extracted, pyramid hierarchical processing is performed on the image data based on the multi-scale convolutional neural network, and multi-granular image features are extracted, and temporal semantic modeling is performed on the video data based on the spatiotemporal attention network, and multi-dimensional temporal features are extracted, and the multi-level semantic features, multi-granular image features and multi-dimensional temporal features are combined into structured multimodal features, and the structured multimodal features are input into a pre-trained multi-task knowledge extraction model, and the safety education and training ontology knowledge base is extracted by performing entity relationship semantic alignment based on the contrastive learning paradigm; The second unit is used to capture the semantic associations between multiple types of nodes and generate a safety education knowledge graph based on the safety education training ontology knowledge base by constructing a heterogeneous attribute graph containing multiple types of nodes and multiple relationship edges, combining the attention aggregation process of multiple relationship paths and relationship path similarities; The third unit is used to map the pre-acquired basic information and historical learning information of the safety education training students to the semantic space where the safety education knowledge graph is located for fusion, construct a student portrait through a multi-task knowledge distillation method, and perform a connected subgraph search in the safety education knowledge graph through an inference method based on soft edge matching to determine the learning path and knowledge fragments that best match the student portrait, and generate a student customized learning path sequence.

7. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 5.

8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.