A postal industry personnel safety education and training system based on a knowledge graph
By using an improved KGCN model to perform structured representation and link-level reasoning of positions, tasks, and risk nodes in the postal industry security education and training system, the problem of existing systems being unable to generate fine-grained differentiated training content has been solved. This enables the generation of personalized training content and the identification of capability gaps, thereby improving the relevance and effectiveness of training.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 江西省邮政业安全中心
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-12
AI Technical Summary
The existing postal industry safety education and training system is unable to cover the fine-grained risk differences under different operating scenarios, lacks a unified knowledge organization structure, cannot generate differentiated training content based on the actual task chain and risk exposure of personnel, and lacks a domain-specific model structure for safety training scenarios.
An improved KGCN model is used to perform structured representation and link-level reasoning of job nodes, task nodes and risk nodes in the security knowledge graph. Feature aggregation is performed through main graph convolutional branches and counterfactual convolutional branches. In the comparison fusion layer, the link consistency difference fusion method is used to generate counterfactual comparison representations. Combined with user learning behavior vectors, training decision vectors are formed to realize personalized training content generation and capability deficiency location.
It improves the relevance and matching of training content, can identify potential skill gaps in task processes, and generate personalized training content that matches actual operational links, thereby enhancing the interpretability and relevance of training results.
Smart Images

Figure CN122199216A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of safety education and intelligent training technology, and in particular to a knowledge graph-based safety education and training system for postal workers. Background Technology
[0002] The postal industry involves sorting, transportation, delivery, and loading / unloading positions in its daily operations, which present various risks, including mechanical injuries, traffic safety, electrical safety, and operational violations. Existing safety education and training are mostly based on fixed courseware, offline lectures, or simple rule-based online quiz systems. Training content is typically coarse-grained based on job categories, failing to cover the fine-grained risk differences across various work scenarios. Furthermore, existing training systems make limited use of historical accident cases, job process specifications, and personnel behavior records, lacking a unified knowledge organization structure and making it difficult to generate differentiated training content based on personnel's actual task chains and risk exposure.
[0003] Some systems have introduced knowledge graphs for procedure management or process querying, but these are mainly based on static node relationships and do not incorporate the dynamic associations between positions, tasks, and risk links, thus underutilizing the reasoning capabilities of knowledge graphs. Furthermore, existing knowledge graph modeling based on graph neural networks is mostly geared towards recommendation or classification tasks, lacking domain-specific model structures for safety training scenarios and failing to reflect the link offset relationships between positions / tasks and potential risks. While existing counterfactual analysis methods have been applied in intelligent decision-making, they have not yet been used in postal industry safety training to construct counterfactual structures of position-task-risk links, thus failing to identify personnel weaknesses.
[0004] Therefore, how to provide a knowledge graph-based safety education and training system for postal workers is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose a knowledge graph-based safety education and training system for postal workers. This invention employs an improved KGCN model to perform structured representation and link-level reasoning on job nodes, task nodes, and risk nodes in the safety knowledge graph. By setting main graph convolutional branches and counterfactual convolutional branches, feature aggregation is performed on factual and perturbation links respectively. In the comparison fusion layer, a link consistency difference fusion method is used to generate counterfactual comparison representations. These counterfactual comparison representations are combined with user learning behavior vectors to form training decision vectors, enabling personalized training content generation and capability gap location based on the job-task-risk link. This invention has the advantages of transparent training logic, high training content matching, and accurate identification of capability weaknesses.
[0006] A knowledge graph-based safety education and training system for postal workers according to an embodiment of the present invention includes the following steps:
[0007] The graph construction module is used to acquire data on postal industry safety regulations, job operation procedures, accident cases and historical training records, perform entity extraction and relationship identification, and obtain the initial graph data.
[0008] The neighbor sampling module is used to build an improved KGCN model based on the initial graph data and obtain the set of neighbor sampling results through the embedding layer.
[0009] The main branch convolution module is used to input the neighbor sampling result set into the main graph convolution branch, perform graph convolution operation, and obtain the main branch representation result;
[0010] The counterfactual construction module is used to select key nodes from the initial graph data based on the job-task-risk link and obtain the counterfactual construction result according to the link constraint counterfactual rules.
[0011] The counterfactual convolution module is used to input the counterfactual construction result into the counterfactual convolution branch, perform graph convolution operation, and obtain the counterfactual representation result;
[0012] The comparison and fusion module is used to input the main branch representation results and counterfactual representation results into the comparison and fusion layer, perform link consistency difference fusion processing, and obtain the training decision vector;
[0013] The training task generation module is used to generate personalized training content based on the training decision vector and generate capability deficiency prompts based on counterfactual comparison representation, thus forming the training output results.
[0014] Optionally, modules can be integrated using the following methods:
[0015] Data on postal industry safety regulations, job operation procedures, accident cases and historical training records were obtained, and entity extraction and relationship identification were performed to obtain the initial data of the map.
[0016] Based on the initial graph data, an improved KGCN model is constructed. The improved KGCN model includes an embedding layer, a main graph convolutional branch, a counterfactual convolutional branch, and a contrast fusion layer. The set of neighbor sampling results is obtained through the embedding layer.
[0017] The neighbor sampling result set is input into the main graph convolution branch of the improved KGCN model to perform graph convolution operation and obtain the main branch representation result;
[0018] Based on the job-task-risk link, key nodes are selected from the initial graph data, and counterfactual construction results are obtained according to the link constraint counterfactual rules.
[0019] The counterfactual construction results are input into the counterfactual convolution branch of the improved KGCN model, and graph convolution operation is performed to obtain the counterfactual representation results.
[0020] The main branch representation results and counterfactual representation results are input into the comparison and fusion layer of the improved KGCN model, and the link consistency difference fusion processing is performed to obtain the training decision vector.
[0021] The training decision vector is input into the training task generation module, and the training output is obtained based on the main branch representation result and the counterfactual comparison representation.
[0022] Optionally, the step of acquiring data on postal industry safety regulations, job operation procedures, accident cases, and historical training records, and performing entity extraction and relationship identification to obtain initial map data specifically includes:
[0023] Raw text data and structured data were extracted from postal industry safety regulations, job operation process documents, accident case records and historical training records. Sentence segmentation and field partitioning were performed on the raw text data to generate the dataset to be extracted.
[0024] Entity recognition processing is performed on the extracted dataset to identify target entities, including job entities, task entities, risk entities, event entities, and procedure clause entities, forming an entity set, and a graph node set is constructed from the entity set;
[0025] Perform relation extraction processing on the entity set to identify target relations including job-task relations, task-risk relations, risk-event relations and clause-task relations, form a relation set, and construct a graph adjacency structure based on the relation set;
[0026] For each node in the graph node set, an initial node embedding vector is generated, wherein the initial node embedding vector is associated with the job attribute, task description, risk level or case text feature corresponding to the node, and all node embedding vectors form an initial node embedding matrix.
[0027] The graph node set, graph relation set, graph adjacency structure, and initial node embedding matrix are aggregated to form the basic structure of the security knowledge graph. The basic structure of the security knowledge graph is then used as the input data for the graph node set and the initial node embedding to generate the initial graph data.
[0028] Optionally, based on the initial graph data, an improved KGCN model is constructed. This improved KGCN model includes an embedding layer, a main graph convolutional branch, a counterfactual convolutional branch, and a contrastive fusion layer. The neighbor sampling result set obtained through the embedding layer specifically includes:
[0029] Read the graph node set, graph relation set and initial node embedding matrix from the initial graph data, initialize the improved KGCN model, and set the network structure of the embedding layer, main graph convolution branch, counterfactual convolution branch and contrast fusion layer in the improved KGCN model. Determine the number of layers and feature dimensions of each graph convolution layer, and set the graph convolution parameters shared by the main graph convolution branch and the counterfactual convolution branch.
[0030] In the embedding layer of the improved KGCN model, vector transformation processing is performed on the initial node embedding vector based on the initial node embedding matrix. The vector transformation processing includes adjusting the dimension of the vector, linearly combining the values of the vector, and organizing the features of the vector content, thereby generating the first layer of node representations. The generated set of first layer node representations is simultaneously input into the main graph convolution branch and the counterfactual convolution branch.
[0031] Based on the job relationships, task relationships, risk relationships, and knowledge relationships recorded in the graph relationship set, the relationship classification process is performed on each target node in the graph node set to determine the job domain neighbor set, task domain neighbor set, risk domain neighbor set, and knowledge domain neighbor set corresponding to the target node respectively;
[0032] The neighbor sampling unit selects neighbor nodes from the job domain neighbor set, task domain neighbor set, risk domain neighbor set, and knowledge domain neighbor set respectively on each graph convolutional layer according to the preset number of job neighbor samples, task neighbor samples, risk domain neighbor samples, and knowledge domain neighbor samples, forming job domain sampling neighbor set, task domain sampling neighbor set, risk domain sampling neighbor set, and knowledge domain sampling neighbor set.
[0033] Following the link sequence of job-task-risk, the sampling neighbor sets of the job domain, task domain, risk domain, and knowledge domain obtained from each graph convolutional layer are sequentially combined to form a multi-hop neighbor sequence corresponding to each target node. The multi-hop neighbor sequences of all target nodes are then summarized into a neighbor sampling result set, which is used as the unified neighbor input for the main graph convolutional branch and the counterfactual convolutional branch.
[0034] Optionally, the step of inputting the neighbor sampling result set into the main graph convolution branch of the improved KGCN model, performing graph convolution operations, and obtaining the main branch representation result specifically includes:
[0035] The neighbor sampling result set is used as the input data of the main graph convolution branch. The neighbor sampling result is divided into layers according to the number of graph convolution layers. In each graph convolution layer, the job domain sampling neighbor set, task domain sampling neighbor set, risk domain sampling neighbor set and knowledge domain sampling neighbor set corresponding to each target node are determined respectively.
[0036] In the first graph convolutional layer, for each target node, the initial node representation of the target node in the initial node representation set is obtained, and the initial node representation of the neighboring nodes is read from the corresponding job domain sampling neighbor set, task domain sampling neighbor set, risk domain sampling neighbor set and knowledge domain sampling neighbor set. The initial node representation of the neighboring nodes in each domain is weighted and summed and feature combined to obtain the updated node representation of the target node in the first graph convolutional layer.
[0037] During graph convolution operations, for each target node in each graph convolutional layer, the updated node representation of the previous graph convolutional layer is used as the current node representation. The current node representations of neighboring nodes are sequentially read from the neighboring sets of the job domain, task domain, risk domain, and knowledge domain corresponding to the target node. Weighted summation and feature combination processing are performed on the current node representations of the neighboring nodes in each domain, and the processing results are fused with the current node representation of the target node to generate the updated node representation of the target node in the current graph convolutional layer.
[0038] After all graph convolutional layers have been updated, the updated node representations of each target node in the last graph convolutional layer are collected. The set of updated node representations is used as the output of the main graph convolutional branch to form the main branch graph representation, and the main branch graph representation is determined as the main branch representation result.
[0039] Optionally, the step of selecting key nodes from the initial graph data based on the job-task-risk link and obtaining the counterfactual construction result according to the link constraint counterfactual rules specifically includes:
[0040] The relationships between job nodes, task nodes and risk nodes are read from the initial data of the graph. Based on the relationships, the job-task-risk link corresponding to each job is determined, forming a set of job-task-risk links.
[0041] For each job-task-risk link in the job-task-risk link set, key task nodes and key risk nodes are determined from the job-task-risk link according to the link screening conditions, forming a set of key task nodes and a set of key risk nodes. The link screening conditions include determining key risk nodes according to the risk level in the initial node embedding vector, determining key task nodes according to the position of the node in the link, and determining key task nodes and key risk nodes according to the frequency of occurrence of the node in the link.
[0042] According to the link constraint counterfactual rules, the set of key task nodes and the set of key risk nodes are processed in a counterfactual manner. The link constraint counterfactual rules include prioritizing the deletion of key task nodes located at the beginning of the link, disconnecting the relationship of key risk nodes located in the middle of the link, and weight masking the relationship between key task nodes and key risk nodes located at the end of the link.
[0043] Based on the counterfactual rules of link constraints, a counterfactual link of position-task-risk is formed;
[0044] Based on the counterfactualized job-task-risk link, retain the job nodes, task nodes, risk nodes and their relationships that did not participate in the counterfactualization. Merge the processing results of the nodes and relationships that participated in the counterfactualization with the nodes and relationships that did not participate in the counterfactualization to construct the corresponding counterfactual graph structure, and determine the counterfactual graph structure as the counterfactual construction result.
[0045] Optionally, the step of inputting the counterfactual construction result into the counterfactual convolution branch of the improved KGCN model, performing graph convolution operations, and obtaining the counterfactual representation result specifically includes:
[0046] The counterfactual construction results are used as input data for the counterfactual convolution branch. Based on the perturbation link relationship between job nodes, task nodes and risk nodes recorded in the counterfactual construction results, the corresponding perturbation job domain neighbor set, perturbation task domain neighbor set, perturbation risk domain neighbor set and perturbation knowledge domain neighbor set are determined for each target node. Neighbor placeholder processing is performed for the missing neighbors caused by node deletion or relationship breakage to form a complete perturbation neighbor input for counterfactual convolution.
[0047] At the start of the graph convolution operation, for each target node, the initial node representation of the target node in the initial node representation set is obtained, and the initial node representations of the neighbor nodes are obtained from the corresponding perturbation job domain neighbor set, perturbation task domain neighbor set, perturbation risk domain neighbor set and perturbation knowledge domain neighbor set. Feature weakening processing is performed on the neighbor nodes generated by weight masking, and weighted summation and feature combination processing are performed on the unmasked neighbor nodes to generate the counterfactual updated node representation of the target node in the first graph convolution layer.
[0048] During the graph convolution operation, the counterfactual update node representation of the previous graph convolution layer is used as the current node representation. For each target node, the current node representation of the neighboring nodes is obtained sequentially from the neighboring sets of the perturbation job domain, the perturbation task domain, the perturbation risk domain, and the perturbation knowledge domain. Feature suppression processing is performed on the neighboring nodes affected by the perturbation, and weighted summation and feature combination processing is performed on the neighboring nodes that are not affected by the perturbation. The processing result is fused with the current node representation of the target node to generate the counterfactual update node representation of the target node in the graph convolution layer.
[0049] After all graph convolutional layers have completed counterfactual updates, the counterfactual update node representations of each target node in the last graph convolutional layer are collected. The set of counterfactual update node representations is used as the output of the counterfactual convolutional branch to form a counterfactual branch graph representation, and the counterfactual branch graph representation is determined as the counterfactual representation result.
[0050] Optionally, the step of inputting the main branch representation results and counterfactual representation results into the comparison and fusion layer of the improved KGCN model, performing link consistency difference fusion processing, and obtaining the training decision vector specifically includes...
[0051] The main branch representation results and counterfactual representation results are input into the comparison and fusion layer. The main branch representation results and counterfactual representation results are aligned for the same target node to form a set of representation pairs.
[0052] For each pair of main branch representation results and counterfactual representation results in the representation pair set, calculate the absolute value of the difference, whereby the absolute value of the difference between the main branch representation results and the counterfactual representation results is the absolute value of the difference between the main branch representation results and the counterfactual representation results.
[0053] The corresponding position vector is determined based on the link position of the target node in the job-task-risk link, and a consistency score is calculated based on the absolute value of the difference and the position vector.
[0054] The difference vector, absolute difference value, location vector, and consistency score are used together as the link consistency difference features;
[0055] Based on the link consistency difference characteristics, gating fusion processing is performed on the main branch representation results and counterfactual representation results to generate counterfactual comparison representations, and the counterfactual comparison representations of all target nodes are summarized into a counterfactual comparison representation set.
[0056] Obtain the user's learning behavior vector, perform feature processing on the learning behavior vector, and form a processed learning behavior vector;
[0057] According to the feature splicing order, the counterfactual contrast representation set and the sorted learning behavior vector are spliced together to form a training decision vector. The feature splicing order includes arranging the counterfactual contrast representations according to the order of job nodes, task nodes and risk nodes in the job-task-risk link, and splicing the sorted learning behavior vector after the arranged counterfactual contrast representations.
[0058] Optionally, the step of inputting the training decision vector into the training task generation module and obtaining the training output result based on the main branch representation result and the counterfactual comparison representation specifically includes:
[0059] The training decision vector, main branch representation result, and counterfactual comparison representation are obtained. The training decision vector is passed as the input to the training task generation module. In the training task generation module, the training decision vector is parsed to obtain the training decision field set corresponding to job information, task information, risk information, and learning behavior information.
[0060] Based on the fields in the training decision field set that correspond to job information, task information, and risk information, the training resources pre-stored in postal industry safety regulations, job operation process documents, accident case records, and historical training records are retrieved and matched to form a candidate set of training resources associated with the target job-task-risk link.
[0061] Based on the candidate set of training resources and the main branch representation results, a relevance assessment and screening process is performed on each training resource in the candidate set of training resources. The training resources are sorted and selected according to the job-task-risk link representation reflected in the main branch representation results. A personalized training content set for the target postal personnel is generated, and the personalized training content set is determined as the personalized training content.
[0062] Based on counterfactual comparison representation, the process for identifying and addressing the lack of execution capabilities at each target node in the job-task-risk link includes determining the corresponding weak job nodes, weak task nodes, and weak risk nodes based on the differences reflected in the counterfactual comparison representation, generating capability deficiency entries and improvement suggestion entries corresponding to the weak nodes, and forming a capability deficiency prompt set.
[0063] Personalized training content and competency gap suggestions are combined according to a preset presentation structure to generate training output results, which are then used to guide postal workers in carrying out safety education and training.
[0064] The beneficial effects of this invention are:
[0065] This invention constructs a safety knowledge graph and combines it with a dual-branch structure of an improved KGCN model, enabling the related representation of job positions, tasks, and risk information within a unified graph structure. This solves the problem in existing technologies where training content struggles to cover the fine-grained differences across various work scenarios. The job-task-risk link representation formed by the main graph convolutional branches reflects the actual risk exposure in personnel's daily work processes, providing a targeted foundation for training content generation and improving the match between recommended training content and the actual situation of personnel's jobs.
[0066] This invention introduces a counterfactual construction mechanism based on main graph reasoning. It constructs a perturbed job-task-risk link through node deletion, relationship disconnection, and weight masking, and uses counterfactual convolutional branches to generate a representation of the perturbed link. This enables the graph model to identify potential capability gaps in the task flow, adding link offset identification capabilities to the training process. In the comparison and fusion layer, the difference between factual and counterfactual links is quantified through a link consistency difference fusion method, allowing weak capability links to be located at the graph structure level, overcoming the problem that traditional methods cannot accurately identify personnel risk points.
[0067] This invention integrates counterfactual contrast representation with user learning behavior vectors to form a training decision vector, which is then used to generate personalized training content and competency gap alerts. This allows training outputs to simultaneously reflect job requirements, operational risk structures, and personnel behavioral characteristics, achieving dynamic adaptation of training content. The holistic approach proposed in this invention enhances the interpretability and relevance of training effects, making training results more consistent with the safety risk structures in actual operational processes, and contributing to improving the safe operational capabilities and risk response levels of postal personnel. Attached Figure Description
[0068] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0069] Figure 1 This is a flowchart of a knowledge graph-based safety education and training system for postal workers proposed in this invention.
[0070] Figure 2 This is a schematic diagram of the improved KGCN model structure in a knowledge graph-based safety education and training system for postal workers proposed in this invention.
[0071] Figure 3 This is a schematic diagram of the structure of a knowledge graph-based safety education and training system for postal workers proposed in this invention. Detailed Implementation
[0072] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0073] refer to Figures 1-3 A knowledge graph-based safety education and training system for postal workers includes:
[0074] The graph construction module is used to acquire data on postal industry safety regulations, job operation procedures, accident cases and historical training records, perform entity extraction and relationship identification, and obtain the initial graph data.
[0075] The neighbor sampling module is used to build an improved KGCN model based on the initial graph data and obtain the set of neighbor sampling results through the embedding layer.
[0076] The main branch convolution module is used to input the neighbor sampling result set into the main graph convolution branch, perform graph convolution operation, and obtain the main branch representation result;
[0077] The counterfactual construction module is used to select key nodes from the initial graph data based on the job-task-risk link and obtain the counterfactual construction result according to the link constraint counterfactual rules.
[0078] The counterfactual convolution module is used to input the counterfactual construction result into the counterfactual convolution branch, perform graph convolution operation, and obtain the counterfactual representation result;
[0079] The comparison and fusion module is used to input the main branch representation results and counterfactual representation results into the comparison and fusion layer, perform link consistency difference fusion processing, and obtain the training decision vector;
[0080] The training task generation module is used to generate personalized training content based on the training decision vector and generate capability deficiency prompts based on counterfactual comparison representation, thus forming the training output results.
[0081] In this embodiment, the modules are interconnected using the following method:
[0082] Data on postal industry safety regulations, job operation procedures, accident cases and historical training records were obtained, and entity extraction and relationship identification were performed to obtain the initial data of the map.
[0083] Based on the initial graph data, an improved KGCN model is constructed. The improved KGCN model includes an embedding layer, a main graph convolutional branch, a counterfactual convolutional branch, and a contrast fusion layer. The set of neighbor sampling results is obtained through the embedding layer.
[0084] The neighbor sampling result set is input into the main graph convolution branch of the improved KGCN model to perform graph convolution operation and obtain the main branch representation result;
[0085] Based on the job-task-risk link, key nodes are selected from the initial graph data, and counterfactual construction results are obtained according to the link constraint counterfactual rules.
[0086] The counterfactual construction results are input into the counterfactual convolution branch of the improved KGCN model, and graph convolution operation is performed to obtain the counterfactual representation results.
[0087] The main branch representation results and counterfactual representation results are input into the comparison and fusion layer of the improved KGCN model, and the link consistency difference fusion processing is performed to obtain the training decision vector.
[0088] The training decision vector is input into the training task generation module, and the training output is obtained based on the main branch representation result and the counterfactual comparison representation.
[0089] In this embodiment, the process of acquiring data on postal industry safety regulations, job operation procedures, accident cases, and historical training records, and then performing entity extraction and relationship identification to obtain initial map data specifically includes:
[0090] Raw text data and structured data were extracted from postal industry safety regulations, job operation process documents, accident case records and historical training records. Sentence segmentation and field partitioning were performed on the raw text data to generate the dataset to be extracted.
[0091] Entity recognition processing is performed on the extracted dataset to identify target entities, including job entities, task entities, risk entities, event entities, and procedure clause entities, forming an entity set, and a graph node set is constructed from the entity set;
[0092] Perform relation extraction processing on the entity set to identify target relations including job-task relations, task-risk relations, risk-event relations and clause-task relations, form a relation set, and construct a graph adjacency structure based on the relation set;
[0093] For each node in the graph node set, an initial node embedding vector is generated, wherein the initial node embedding vector is associated with the job attribute, task description, risk level or case text feature corresponding to the node, and all node embedding vectors form an initial node embedding matrix.
[0094] The graph node set, graph relation set, graph adjacency structure, and initial node embedding matrix are aggregated to form the basic structure of the security knowledge graph. The basic structure of the security knowledge graph is then used as the input data for the graph node set and the initial node embedding to generate the initial graph data.
[0095] In this embodiment, the construction of an improved KGCN model based on the initial graph data includes an embedding layer, a main graph convolutional branch, a counterfactual convolutional branch, and a contrast fusion layer. The process of obtaining the neighbor sampling result set through the embedding layer specifically includes:
[0096] Read the graph node set, graph relation set and initial node embedding matrix from the initial graph data, initialize the improved KGCN model, and set the network structure of the embedding layer, main graph convolution branch, counterfactual convolution branch and contrast fusion layer in the improved KGCN model. Determine the number of layers and feature dimensions of each graph convolution layer, and set the graph convolution parameters shared by the main graph convolution branch and the counterfactual convolution branch.
[0097] In the embedding layer of the improved KGCN model, vector transformation processing is performed on the initial node embedding vector based on the initial node embedding matrix. The vector transformation processing includes adjusting the dimension of the vector, linearly combining the values of the vector, and organizing the features of the vector content, thereby generating the first layer of node representations. The generated set of first layer node representations is simultaneously input into the main graph convolution branch and the counterfactual convolution branch.
[0098] The adjustment of the vector dimension includes expanding or compressing the number of components of the initial node embedded vector according to the target dimension requirements. During the expansion process, zero-value components are inserted or relevant components are copied to form an expanded vector. During the compression process, redundant components are deleted or multiple components are merged to form a compressed vector. After the dimension adjustment is completed, the processed vector meets the dimension requirements of the graph convolutional network input layer.
[0099] The linear combination of vector values includes weighted summation of the vector components. During the weighting process, each component is multiplied by its corresponding weight and summed to generate a new vector content. The weighted values are then corrected to meet the numerical range requirements of the embedding layer. The corrected vector is then used as the intermediate vector for generating the first-layer node representation.
[0100] The feature processing of the vector content includes performing numerical clipping on the vector components to adjust the components that exceed the threshold range to the specified numerical range, normalizing the vector components to keep the components at a consistent numerical scale, and smoothing the noisy components, including replacing or numerically smoothing obviously abnormal components. After the feature processing is completed, the processing result is used as the final input for the representation of the first layer nodes.
[0101] Based on the job relationships, task relationships, risk relationships, and knowledge relationships recorded in the graph relationship set, the relationship classification process is performed on each target node in the graph node set to determine the job domain neighbor set, task domain neighbor set, risk domain neighbor set, and knowledge domain neighbor set corresponding to the target node respectively;
[0102] The neighbor sampling unit selects neighbor nodes from the job domain neighbor set, task domain neighbor set, risk domain neighbor set, and knowledge domain neighbor set respectively on each graph convolutional layer according to the preset number of job neighbor samples, task neighbor samples, risk domain neighbor samples, and knowledge domain neighbor samples, forming job domain sampling neighbor set, task domain sampling neighbor set, risk domain sampling neighbor set, and knowledge domain sampling neighbor set.
[0103] Following the link sequence of job-task-risk, the sampling neighbor sets of the job domain, task domain, risk domain, and knowledge domain obtained from each graph convolutional layer are sequentially combined to form a multi-hop neighbor sequence corresponding to each target node. The multi-hop neighbor sequences of all target nodes are then summarized into a neighbor sampling result set, which is used as the unified neighbor input for the main graph convolutional branch and the counterfactual convolutional branch.
[0104] In this embodiment, the step of inputting the neighbor sampling result set into the main graph convolution branch of the improved KGCN model, performing graph convolution operations, and obtaining the main branch representation result specifically includes:
[0105] The neighbor sampling result set is used as the input data of the main graph convolution branch. The neighbor sampling result is divided into layers according to the number of graph convolution layers. In each graph convolution layer, the job domain sampling neighbor set, task domain sampling neighbor set, risk domain sampling neighbor set and knowledge domain sampling neighbor set corresponding to each target node are determined respectively.
[0106] In the first graph convolutional layer, for each target node, the initial node representation of the target node in the initial node representation set is obtained, and the initial node representation of the neighboring nodes is read from the corresponding job domain sampling neighbor set, task domain sampling neighbor set, risk domain sampling neighbor set and knowledge domain sampling neighbor set. The initial node representation of the neighboring nodes in each domain is weighted and summed and feature combined to obtain the updated node representation of the target node in the first graph convolutional layer.
[0107] During graph convolution operations, for each target node in each graph convolutional layer, the updated node representation of the previous graph convolutional layer is used as the current node representation. The current node representations of neighboring nodes are sequentially read from the neighboring sets of the job domain, task domain, risk domain, and knowledge domain corresponding to the target node. Weighted summation and feature combination processing are performed on the current node representations of the neighboring nodes in each domain, and the processing results are fused with the current node representation of the target node to generate the updated node representation of the target node in the current graph convolutional layer.
[0108] After all graph convolutional layers have been updated, the updated node representations of each target node in the last graph convolutional layer are collected. The set of updated node representations is used as the output of the main graph convolutional branch to form the main branch graph representation, and the main branch graph representation is determined as the main branch representation result.
[0109] In this embodiment, the step of selecting key nodes from the initial graph data based on the job-task-risk link and obtaining the counterfactual construction result according to the link constraint counterfactual rules specifically includes:
[0110] The relationships between job nodes, task nodes and risk nodes are read from the initial data of the graph. Based on the relationships, the job-task-risk link corresponding to each job is determined, forming a set of job-task-risk links.
[0111] For each job-task-risk link in the job-task-risk link set, key task nodes and key risk nodes are determined from the job-task-risk link according to the link screening conditions, forming a set of key task nodes and a set of key risk nodes. The link screening conditions include determining key risk nodes according to the risk level in the initial node embedding vector, determining key task nodes according to the position of the node in the link, and determining key task nodes and key risk nodes according to the frequency of occurrence of the node in the link.
[0112] According to the link constraint counterfactual rules, the set of key task nodes and the set of key risk nodes are processed in a counterfactual manner. The link constraint counterfactual rules include prioritizing the deletion of key task nodes located at the beginning of the link, disconnecting the relationship of key risk nodes located in the middle of the link, and weight masking the relationship between key task nodes and key risk nodes located at the end of the link.
[0113] Based on the counterfactual rules of link constraints, a counterfactual link of position-task-risk is formed;
[0114] Based on the counterfactualized job-task-risk link, retain the job nodes, task nodes, risk nodes and their relationships that did not participate in the counterfactualization. Merge the processing results of the nodes and relationships that participated in the counterfactualization with the nodes and relationships that did not participate in the counterfactualization to construct the corresponding counterfactual graph structure, and determine the counterfactual graph structure as the counterfactual construction result.
[0115] In this embodiment, the step of inputting the counterfactual construction result into the counterfactual convolution branch of the improved KGCN model, performing graph convolution operations, and obtaining the counterfactual representation result specifically includes:
[0116] The counterfactual construction results are used as input data for the counterfactual convolution branch. Based on the perturbation link relationship between job nodes, task nodes and risk nodes recorded in the counterfactual construction results, the corresponding perturbation job domain neighbor set, perturbation task domain neighbor set, perturbation risk domain neighbor set and perturbation knowledge domain neighbor set are determined for each target node. Neighbor placeholder processing is performed for the missing neighbors caused by node deletion or relationship breakage to form a complete perturbation neighbor input for counterfactual convolution.
[0117] At the start of the graph convolution operation, for each target node, the initial node representation of the target node in the initial node representation set is obtained, and the initial node representations of the neighbor nodes are obtained from the corresponding perturbation job domain neighbor set, perturbation task domain neighbor set, perturbation risk domain neighbor set and perturbation knowledge domain neighbor set. Feature weakening processing is performed on the neighbor nodes generated by weight masking, and weighted summation and feature combination processing are performed on the unmasked neighbor nodes to generate the counterfactual updated node representation of the target node in the first graph convolution layer.
[0118] During the graph convolution operation, the counterfactual update node representation of the previous graph convolution layer is used as the current node representation. For each target node, the current node representation of the neighboring nodes is obtained sequentially from the neighboring sets of the perturbation job domain, the perturbation task domain, the perturbation risk domain, and the perturbation knowledge domain. Feature suppression processing is performed on the neighboring nodes affected by the perturbation, and weighted summation and feature combination processing is performed on the neighboring nodes that are not affected by the perturbation. The processing result is fused with the current node representation of the target node to generate the counterfactual update node representation of the target node in the graph convolution layer.
[0119] After all graph convolutional layers have completed counterfactual updates, the counterfactual update node representations of each target node in the last graph convolutional layer are collected. The set of counterfactual update node representations is used as the output of the counterfactual convolutional branch to form a counterfactual branch graph representation, and the counterfactual branch graph representation is determined as the counterfactual representation result.
[0120] In this embodiment, the step of inputting the main branch representation results and counterfactual representation results into the comparison and fusion layer of the improved KGCN model, performing link consistency difference fusion processing, and obtaining the training decision vector specifically includes:
[0121] The main branch representation results and counterfactual representation results are input into the comparison and fusion layer. The main branch representation results and counterfactual representation results are aligned for the same target node to form a set of representation pairs.
[0122] For each pair of main branch representation results and counterfactual representation results in the representation pair set, calculate the absolute value of the difference, whereby the absolute value of the difference between the main branch representation results and the counterfactual representation results is the absolute value of the difference between the main branch representation results and the counterfactual representation results.
[0123] The corresponding position vector is determined based on the position of the target node in the job-task-risk link, and a consistency score is calculated based on the absolute value of the difference and the position vector.
[0124] ;
[0125] in, This represents the link consistency score generated based on the difference vector and the link location vector. This represents the sigmoid activation function used to perform a nonlinear transformation on the input value. This represents the trainable consistency weight vector used in the contrast fusion layer to generate link consistency difference features. This indicates the first step in the job-task-risk chain. The link location vector of each target node is used to represent the category to which the node belongs among the three types of link locations: job node, task node, or risk node. This represents a trainable position weight vector used to process the link position vector. Indicates the absolute value of the difference;
[0126] The difference vector, absolute difference value, location vector, and consistency score are used together as the link consistency difference features;
[0127] Based on the link consistency difference characteristics, gating fusion processing is performed on the main branch representation results and counterfactual representation results to generate counterfactual comparison representations, and the counterfactual comparison representations of all target nodes are summarized into a counterfactual comparison representation set:
[0128] ;
[0129] in, This represents a counterfactual contrast. This represents the main branch representation result. This represents the result of a counterfactual representation. This indicates that an element-wise multiplication operation is performed on two vectors of the same dimension;
[0130] Obtain the user's learning behavior vector, perform feature processing on the learning behavior vector, and form a processed learning behavior vector;
[0131] According to the feature splicing order, the counterfactual contrast representation set and the sorted learning behavior vector are spliced together to form a training decision vector. The feature splicing order includes arranging the counterfactual contrast representations according to the order of job nodes, task nodes and risk nodes in the job-task-risk link, and splicing the sorted learning behavior vector after the arranged counterfactual contrast representations.
[0132] In this embodiment, the step of inputting the training decision vector into the training task generation module and obtaining the training output result based on the main branch representation result and the counterfactual comparison representation specifically includes:
[0133] The training decision vector, main branch representation result, and counterfactual comparison representation are obtained. The training decision vector is passed as the input to the training task generation module. In the training task generation module, the training decision vector is parsed to obtain the training decision field set corresponding to job information, task information, risk information, and learning behavior information.
[0134] Based on the fields in the training decision field set that correspond to job information, task information, and risk information, the training resources pre-stored in postal industry safety regulations, job operation process documents, accident case records, and historical training records are retrieved and matched to form a candidate set of training resources associated with the target job-task-risk link.
[0135] Based on the candidate set of training resources and the main branch representation results, a relevance assessment and screening process is performed on each training resource in the candidate set of training resources. The training resources are sorted and selected according to the job-task-risk link representation reflected in the main branch representation results. A personalized training content set for the target postal personnel is generated, and the personalized training content set is determined as the personalized training content.
[0136] Based on counterfactual comparison representation, the process for identifying and addressing the lack of execution capabilities at each target node in the job-task-risk link includes determining the corresponding weak job nodes, weak task nodes, and weak risk nodes based on the differences reflected in the counterfactual comparison representation, generating capability deficiency entries and improvement suggestion entries corresponding to the weak nodes, and forming a capability deficiency prompt set.
[0137] Personalized training content and competency gap suggestions are combined according to a preset presentation structure to generate training output results, which are then used to guide postal workers in carrying out safety education and training.
[0138] Example 1:
[0139] To verify the feasibility of this invention in practice, it was applied to the construction of an internal safety training system for a comprehensive postal processing center. This center has multiple operational stages, including mail sorting, handling and loading / unloading, transportation scheduling, and last-mile delivery. The positions are complex, and the number of personnel is large. Historical data records various safety incidents, including injuries from sorting machinery, lower back injuries caused by improper handling posture, accidents caused by accidental triggering of electrical equipment, and traffic risks during vehicle scheduling. The center has been using a traditional training method with fixed courseware and standardized test questions, which fails to generate differentiated training materials for different positions and task chains. This results in some personnel repeatedly violating regulations at key risk points.
[0140] When applying the method of this invention, the center's rules and regulations documents, job operation process descriptions, accident investigation records, on-site inspection records, and training results data from the past three years are first collected. This text content is then input into the graph construction module of this invention to generate a safety knowledge graph containing job nodes, task nodes, risk nodes, and their corresponding relationships. The constructed knowledge graph contains approximately thirty job-related nodes, over eighty task-related nodes, and over sixty risk-related nodes, with over eight hundred edge relationships, covering the center's main production processes. Subsequently, a neighbor sampling module is used to perform multi-hop structure extraction on the job-task-risk link, ensuring that the key task differences between different jobs are preserved.
[0141] To verify whether this invention can improve the relevance of training, personnel with complete work process records were selected as test subjects in a sorting job scenario. Their behavioral data during actual operations were input into the comparison and fusion module. The system automatically generated a training decision vector and output personalized training content in the training task generation module. In one test, the training decision vector of a sorting employee indicated a risk offset in the "high-speed sorting—cross-belt bagging" link. The main branch representation showed that the employee performed normally in terms of process rhythm control, but in the counterfactual convolution branch, the difference score increased significantly after simulating a perturbation link that "removes critical task nodes." The system identified this difference as a weakness, generated a capability deficiency warning, and recommended personalized training content focusing on equipment safety distance, operating rhythm, and item placement standards.
[0142] To evaluate the training effectiveness, this invention was applied to a complete group of operators at the center. The system generated over 8,000 counterfactual representations at the link level, ultimately matching over 3,000 personalized competency deficiency prompts. After applying the method of this invention, comparing on-site operational sampling data over two weeks, the number of violations in the sorting position decreased by approximately 34 percentage points compared to the previous period; repetitive errors in the handling and loading / unloading position decreased by 27 percentage points; and deviations in equipment operation procedures decreased by 36 percentage points. Simultaneously, the average knowledge test scores after training improved by 15 percentage points, while the training completion time was shortened by approximately 40 minutes compared to traditional standardized training methods.
[0143] This embodiment demonstrates that the present invention can identify capability deficiencies at the graph structure level in complex scenarios involving multiple tasks, multiple positions, and multiple risks, and output personalized content closely related to the actual needs of the job chain in the training task generation module, making the training effect more accurate and adaptable to the actual workflow.
[0144] Table 1. Statistical Table of Training Effectiveness for the Job-Task-Risk Link
[0145] Job Category Number of participants Number of personalized training content items generated Number of prompts indicating missing recognition capabilities The percentage of violations decreased after training The percentage of repeated errors decreased after training Average test score improvement Changes in average training duration Sorting operations 120 1850 760 34% 22% 17% -42 minutes Handling and loading / unloading operations 95 1320 610 29% 27% 14% -38 minutes Transportation Dispatch 60 780 340 31% 19% 13% -37 minutes Last-mile delivery 150 2100 930 36% 25% 16% -41 minutes Electric equipment operation 55 620 290 28% 21% 12% -35 minutes
[0146] As can be seen from Table 1 above, this invention demonstrates significant advantages in several core training indicators. Firstly, regarding the ability to generate personalized training content, this invention automatically constructs training resource sets for different job positions based on the main branch representation results and counterfactual comparison representations. This results in 1850, 1320, 780, 2100, and 620 training content items respectively for the five job categories of sorting, handling and loading / unloading, transportation scheduling, last-mile delivery, and electric equipment operation. This covers key operational and risk nodes in the job task chain, significantly outperforming the traditional method of uniformly allocating fixed courseware according to job position. This result indicates that the job-task-risk link reasoning mechanism constructed by this invention can generate differentiated training materials based on the actual work structure of different personnel.
[0147] From the perspective of capability deficiency localization, this invention utilizes counterfactual convolutional branching to identify capability weaknesses caused by link offsets, outputting 760, 610, 340, 930, and 290 capability deficiency prompts respectively for each job type, enabling the system to specifically identify the sources of task execution deviations. Compared to the limitations of traditional methods relying on human experience for judgment, this invention's counterfactual link difference analysis can accurately pinpoint weak nodes at the graph structure level, providing a basis for precise training.
[0148] From the perspective of training effectiveness, this invention significantly reduced the proportion of non-compliant actions and repetitive errors across all positions. Taking the sorting position as an example, non-compliant actions decreased by 34%, and repetitive errors decreased by 22%; repetitive errors decreased by 27% in the handling and loading / unloading position; and non-compliant actions decreased by 36% in the last-mile delivery position. These indicators reflect that after the training content and capability deficiency prompts generated by this invention, personnel's operational behavior in the critical task chain is closer to the expected process, and the level of risk exposure is reduced. Furthermore, in terms of training efficiency, this invention shortens the average training time through training decision vectors, reducing training time by approximately 35 to 42 minutes for all five types of positions, indicating that the personalization and behavior matching mechanism can reduce unnecessary content and improve learning efficiency.
[0149] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A knowledge graph-based safety education and training system for postal workers, characterized in that, include: The graph construction module is used to acquire data on postal industry safety regulations, job operation procedures, accident cases and historical training records, perform entity extraction and relationship identification, and obtain the initial graph data. The neighbor sampling module is used to build an improved KGCN model based on the initial graph data and obtain the set of neighbor sampling results through the embedding layer. The main branch convolution module is used to input the neighbor sampling result set into the main graph convolution branch, perform graph convolution operation, and obtain the main branch representation result; The counterfactual construction module is used to select key nodes from the initial graph data based on the job-task-risk link and obtain the counterfactual construction result according to the link constraint counterfactual rules. The counterfactual convolution module is used to input the counterfactual construction result into the counterfactual convolution branch, perform graph convolution operation, and obtain the counterfactual representation result; The comparison and fusion module is used to input the main branch representation results and counterfactual representation results into the comparison and fusion layer, perform link consistency difference fusion processing, and obtain the training decision vector; The training task generation module is used to generate personalized training content based on the training decision vector and generate capability deficiency prompts based on counterfactual comparison representation, thus forming the training output results.
2. The postal industry personnel safety education and training system based on knowledge graphs according to claim 1, characterized in that, The modules are connected in the following way: Data on postal industry safety regulations, job operation procedures, accident cases and historical training records were obtained, and entity extraction and relationship identification were performed to obtain the initial data of the map. Based on the initial graph data, an improved KGCN model is constructed. The improved KGCN model includes an embedding layer, a main graph convolutional branch, a counterfactual convolutional branch, and a contrast fusion layer. The neighbor sampling result set is obtained through the embedding layer. The neighbor sampling result set is input into the main graph convolution branch of the improved KGCN model to perform graph convolution operation and obtain the main branch representation result; Based on the job-task-risk link, key nodes are selected from the initial graph data, and counterfactual construction results are obtained according to the link constraint counterfactual rules. The counterfactual construction results are input into the counterfactual convolution branch of the improved KGCN model, and graph convolution operation is performed to obtain the counterfactual representation results. The main branch representation results and counterfactual representation results are input into the comparison and fusion layer of the improved KGCN model, and the link consistency difference fusion processing is performed to obtain the training decision vector. The training decision vector is input into the training task generation module, and the training output is obtained based on the main branch representation result and the counterfactual comparison representation.
3. The postal industry personnel safety education and training system based on knowledge graphs according to claim 2, characterized in that, The process of acquiring data on postal industry safety regulations, job operation procedures, accident cases, and historical training records, performing entity extraction and relationship identification to obtain initial map data specifically includes: Raw text data and structured data were extracted from postal industry safety regulations, job operation process documents, accident case records and historical training records. Sentence segmentation and field partitioning were performed on the raw text data to generate the dataset to be extracted. Entity recognition processing is performed on the extracted dataset to form an entity set, and a graph node set is constructed from the entity set. Perform relation extraction processing on the entity set to form a relation set, and construct a graph adjacency structure based on the relation set; For each node in the graph node set, an initial node embedding vector is generated, and all node embedding vectors are combined to form an initial node embedding matrix. The graph node set, graph relationship set, graph adjacency structure, and initial node embedding matrix are aggregated to form the basic structure of the security knowledge graph and generate the initial graph data.
4. The postal industry personnel safety education and training system based on knowledge graphs according to claim 2, characterized in that, The improved KGCN model is constructed based on the initial graph data. This improved KGCN model includes an embedding layer, a main graph convolutional branch, a counterfactual convolutional branch, and a contrast fusion layer. The neighbor sampling result set obtained through the embedding layer specifically includes: Read the graph node set, graph relation set and initial node embedding matrix from the initial graph data, initialize the improved KGCN model, and set the network structure of the embedding layer, main graph convolution branch, counterfactual convolution branch and contrast fusion layer in the improved KGCN model; In the embedding layer of the improved KGCN model, vector transformation is performed on the initial node embedding vector based on the initial node embedding matrix to generate the first layer node representation; Based on the job relationships, task relationships, risk relationships, and knowledge relationships recorded in the graph relationship set, the relationship classification process is performed on each target node in the graph node set to determine the job domain neighbor set, task domain neighbor set, risk domain neighbor set, and knowledge domain neighbor set corresponding to the target node respectively; The neighbor sampling unit selects neighbor nodes from the job domain neighbor set, task domain neighbor set, risk domain neighbor set, and knowledge domain neighbor set respectively on each graph convolutional layer to form the job domain sampling neighbor set, task domain sampling neighbor set, risk domain sampling neighbor set, and knowledge domain sampling neighbor set. Following the link sequence of job position—task—risk, the sampling neighbor sets are combined sequentially to form a multi-hop neighbor sequence, and the multi-hop neighbor sequences of all target nodes are summarized into a neighbor sampling result set.
5. A knowledge graph-based safety education and training system for postal workers according to claim 2, characterized in that, The step of inputting the neighbor sampling result set into the main graph convolution branch of the improved KGCN model, performing graph convolution operations, and obtaining the main branch representation result specifically includes: The neighbor sampling result set is input into the main graph convolution branch of the improved KGCN model. The neighbor sampling result is divided into layers according to the number of graph convolution layers. In each graph convolution layer, the sampling neighbor set corresponding to each target node is determined. In the first graph convolutional layer, for each target node, the initial node representation and the initial node representation of the target node are obtained, and weighted summation and feature combination processing are performed to obtain the updated node representation of the target node in the first graph convolutional layer; During graph convolution operations, for each target node in each graph convolution layer, the updated node representation of the previous graph convolution layer is used as the current node representation; After all graph convolutional layers have been updated, the updated node representations of each target node in the last graph convolutional layer are collected to form the main branch graph representation, and the main branch graph representation is determined as the main branch representation result.
6. A knowledge graph-based safety education and training system for postal workers according to claim 2, characterized in that, The process of selecting key nodes from the initial graph data based on the job-task-risk link and obtaining the counterfactual construction result according to the link constraint counterfactual rules specifically includes: The relationships between job nodes, task nodes, and risk nodes are read from the initial data of the graph. Based on the relationships, the job-task-risk link corresponding to each job is determined, forming a set of job-task-risk links. Based on the link screening criteria, key task nodes and key risk nodes are identified from the job-task-risk link, forming a set of key task nodes and a set of key risk nodes. According to the counterfactual rules of link constraints, the set of key task nodes and the set of key risk nodes are counterfactually processed to form a counterfactualized job-task-risk link. Based on the counterfactualized job-task-risk link, a counterfactual graph structure is constructed, and the counterfactual graph structure is identified as the counterfactual construction result.
7. A knowledge graph-based safety education and training system for postal workers according to claim 2, characterized in that, The step of inputting the counterfactual construction result into the counterfactual convolution branch of the improved KGCN model, performing graph convolution operations, and obtaining the counterfactual representation result specifically includes: The counterfactual construction results are input into the counterfactual convolution branch of the improved KGCN model. Based on the perturbation link relationship between job nodes, task nodes and risk nodes recorded in the counterfactual construction results, the perturbation neighbor set corresponding to each target node is determined. At the start of the graph convolution operation, for each target node, the initial node representation of the target node is obtained, and the initial node representations of the neighbor nodes are obtained from the corresponding perturbed neighbor set, generating the counterfactual updated node representation of the target node in the first graph convolution layer; During graph convolution operations, the counterfactual update node representation of the previous graph convolution layer is used as the current node representation; After all graph convolutional layers have completed the counterfactual update, the counterfactual update node representations of each target node in the last graph convolutional layer are collected to form a counterfactual branch graph representation, and the counterfactual branch graph representation is determined as the counterfactual representation result.
8. A knowledge graph-based safety education and training system for postal workers according to claim 2, characterized in that, The step of inputting the main branch representation results and counterfactual representation results into the comparison and fusion layer of the improved KGCN model, and performing link consistency difference fusion processing to obtain the training decision vector specifically includes: The main branch representation results and counterfactual representation results are input into the comparison and fusion layer. The main branch representation results and counterfactual representation results are aligned for the same target node to form a set of representation pairs. For each pair of main branch representation results and counterfactual representation results in the representation pair set, calculate the absolute value of the difference. The corresponding position vector is determined based on the position of the target node in the job-task-risk link, and the consistency score is calculated based on the absolute value of the difference and the position vector. The difference vector, absolute difference value, location vector, and consistency score are used together as the link consistency difference features; Based on the link consistency difference characteristics, gating fusion processing is performed on the main branch representation results and counterfactual representation results to generate counterfactual comparison representations, and the counterfactual comparison representations of all target nodes are summarized into a counterfactual comparison representation set. Obtain the user's learning behavior vector, perform feature processing on the learning behavior vector, and form a processed learning behavior vector; Following the feature concatenation order, the counterfactual contrastive representation set and the organized learning behavior vector are concatenated to form the training decision vector.
9. A knowledge graph-based safety education and training system for postal workers according to claim 2, characterized in that, The step of inputting the training decision vector into the training task generation module and obtaining the training output result based on the main branch representation result and the counterfactual comparison representation specifically includes: Obtain the training decision vector, the main branch representation result, and the counterfactual comparison representation. Pass the training decision vector as the input to the training task generation module to obtain the training decision field set. Based on the fields in the training decision field set that correspond to job information, task information, and risk information, training resources are retrieved and matched to form a candidate set of training resources; Based on the candidate set of training resources and the main branch representation results, the relevance assessment and screening process is performed on each training resource in the candidate set of training resources to generate personalized training content. Based on counterfactual comparison representation, the lack of execution capability at each target node in the job-task-risk link is located and processed to form a set of capability deficiency prompts; Personalized training content and competency gap suggestions are combined according to a preset presentation structure to generate training output results.