A method for constructing a dynamic question bank for safety training based on big data analysis
By constructing a dynamic question bank method for safety training based on big data analysis, the problem of missing causal relationships and scenario nesting structures of risk factors in existing technologies is solved. This method achieves standardized expression of the risk factor quadruple structure and improves the semantic integrity and adaptability of safety training content.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUANENG (DALIAN) THERMAL POWER CO LTD
- Filing Date
- 2026-02-24
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies, when constructing industrial safety training question banks, cannot fully characterize the causal relationships and scenario nesting structures among risk factors, resulting in semantic fragmentation and information loss in the extracted results. Furthermore, the generated question stems lack a unified risk expression benchmark, failing to dynamically reflect the common characteristics and evolutionary patterns of risk factors in different industry scenarios. This limits the question bank's ability to adapt to multiple scenarios and expand semantic comparability.
By acquiring textual data of safety incidents and contextual tag data of accidents, we construct syntactic dependency graphs and temporal logic graphs, generate nested event structure graphs, extract semantic chains of role behaviors, and generate standardized vectors of risk factors based on the difference between the risk factor quadruple structure and the industry knowledge graph's embedding vectors, thus constructing a dynamic question bank.
It enables the risk factor quadruple structure to stably reflect the intrinsic relationship between work objects, behaviors, environmental conditions and risk consequences without relying on manual rule setting, thereby improving the coverage consistency and update adaptability of safety training content and enhancing the ability of the training question bank to express real and complex safety scenarios.
Smart Images

Figure CN122133779A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of security data processing technology, specifically to a method for constructing a dynamic question bank for security training based on big data analysis. Background Technology
[0002] In industrial production and safety management scenarios, building training question banks based on big data analysis has become an important means to improve the quality of safety education and the level of accident prevention. Especially in industries involving high-risk and high-complexity operations, a structured understanding of safety accident record texts and related contextual information has become a prerequisite for generating usable training content. In particular, by modeling the collaborative behavior of multiple roles at the work site, accident triggering mechanisms, and environmental influencing factors, and extracting event element information with contextual integrity and temporal logical correlation, more scenario-relevant question-and-answer training content can be provided for safety education, and the need for continuous construction of dynamic question banks can be supported. Currently, in the process of building training question banks based on industrial safety incident data, the risk factor extraction of text information is usually carried out by manually defined extraction rules or fixed field templates. However, when faced with the cross-behavior of multiple roles and complex accident evolution paths, the above methods cannot fully depict the causal relationship and scenario nesting structure between risk factors, which can easily lead to semantic fragmentation and information loss in the extraction results. It is difficult to guarantee the contextual integrity and semantic logic consistency of the generated content, which further affects the ability of subsequent training content to restore the real safety context. Secondly, current question-and-answer generation methods mostly generate data through keyword replacement, sentence templates, or statically preset question stems. They lack a collaborative modeling mechanism with industry knowledge graphs or semantic vector spaces, resulting in a lack of unified risk expression benchmarks for generated question stems. This makes it impossible to dynamically reflect the common characteristics and evolutionary patterns of risk factors in different industry scenarios, and it is also prone to semantic repetition and ambiguous targeting, which limits the expansion capabilities of dynamic question banks in terms of multi-scenario adaptation and semantic comparability. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention provides a method for constructing a dynamic question bank for security training based on big data analysis.
[0004] A method for constructing a dynamic security training question bank based on big data analysis, the method comprising: S11: Obtain safety incident text data and accident context label data. Safety incident text data includes multi-role composite behavior narrative text and implicit causal sentence chain text. Accident context label data includes role category labels, spatial scene labels and consequence risk labels. S12: Based on safety event text data and accident context tag data, construct syntactic dependency graph and temporal logic graph, generate nested event structure graph, and extract role behavior semantic chain from nested event structure graph; S13: Based on the semantic chain of role behavior, construct a causal path diagram, and obtain a risk factor quadruple structure of work object, behavior action, environmental conditions and risk consequences through hierarchical aggregation of upper and lower role nodes; S14: Based on the difference between the embedding vectors of nodes in the industry knowledge graph and the risk factor quadruple structure, generate standardized risk factor vectors, generate question stem text based on the standardized risk factor vectors, and select question stem content with semantic integrity scores higher than the set score value according to the question stem text to build a dynamic question bank.
[0005] Furthermore, the step of obtaining the security event text and incident context tags includes: S111, Perform multi-role recognition processing on the pre-screened industrial operation event text in the accident reporting system to extract composite behavioral narrative text containing descriptions of multiple roles' behaviors; S112, based on the causal verb phrases in the compound behavioral narrative text, perform inter-sentence causal order sorting to obtain the implicit causal sentence chain text containing clues to the evolution of events; S113, semantic mapping and matching of the original accident record text is performed through an expert rule corpus to extract role category tags corresponding to the identity of the work object; S114, Based on the location information corresponding to the role category label and the task context statement, perform geographic word recognition operation to obtain spatial scene labels describing the environment in which the accident occurred; S115, combine the phrase components representing the result event in the spatial scene label, mark the phrases with the meaning of operation result or negative consequence, and generate accident risk consequence label; S116 organizes the composite behavioral narrative text, implicit causal sentence chain text, role category tags, spatial scene tags, and consequence risk tags into a structured format, and outputs safety event text and accident context tags.
[0006] Furthermore, the steps for performing causal ordering between sentences include: S112.1 Extract all subject-verb-object sentence units from the compound behavior narrative text and construct a set of event behavior clauses; S112.2, Based on the verb timing markers in the event action clause set, perform time sequence judgment between clauses to generate an initial event timing arrangement; S112.3, based on the causal trigger keywords between verbs in the initial event sequence, filter out clause pairs without causal relationship to obtain a set of event causal fragments; S112.4, perform sentence chain splicing processing according to the triggering direction in the event causal fragment set to construct a continuous causal sentence chain sequence.
[0007] Furthermore, the steps for constructing syntactic dependency graphs and temporal logic graphs include: S121, Based on the multi-role composite behavior narrative text in each segment of the safety incident text data and the role category labels in the accident context label data, identify the explicit role entities in the text and generate role identification results; S122, Based on the role recognition results, perform position location of role words in the sentence, and combine spatial scene label and consequence risk label information to construct role position association pairs; S123, based on the role position association pairs, combined with the implicit causal sentence chain text in the security event text data, perform intra-sentence logical sorting processing to construct a syntactic dependency graph; S124. By comparing the order of roles in the role position association pair and the narrative sequence of the causal sentence chain text, an event occurrence time index is established, and a time sequence logic diagram is generated.
[0008] Furthermore, the steps for performing intra-sentence logical sorting include: S123.1 Based on the dependency relationship paths of each role entity in the syntactic dependency graph, extract the subject-verb-object semantic combination information between roles and generate a dependency path structure set; S123.2, Based on the role position of the same role in multiple events in the dependency path structure set, construct a set of event nodes centered on the role; S123.3, mark the time tags in the event node set by the event occurrence time index in the timing logic diagram; S123.4 integrates the set of event nodes and their timestamps into a nested event structure diagram with the role as the core and the event time as the axis.
[0009] Furthermore, the steps for extracting the semantic chain of role behavior from the nested event structure graph include: S125, Based on the event node corresponding to each role in the nested event structure diagram, extract the subject-verb-object combination information with the subject as the role, and generate role behavior action pairs; S126, Connect multiple action pairs under the same role sequentially according to the event time index to form an initial action chain set; S127. By comparing the semantic repetition of action pairs in the initial action chain set, duplicate or semantically consistent chain segments are eliminated to obtain a simplified action chain set. The role, action, and timeline information in the simplified action chain set are assembled into a role action semantic chain.
[0010] Furthermore, the step of constructing a causal path graph based on the semantic chain of role behavior includes: S131, Based on the role consistency relationship of continuous actions in each chain of the role behavior semantic chain, perform causal transformation analysis between action pairs to generate a set of causal action pairs; S132, by using the temporal sequence of each verb action pair in the causal action pair set and the contextual risk event sequence markers, a risk causal path segment set is generated; S133, Based on the starting point and ending point of each action in the risk causal path segment set, connect adjacent path segments to form a complete causal path diagram; S134. For each path in the causal path graph, mark its starting role and ending role, and generate a causal path graph containing a sequence of role-behavior-action nodes.
[0011] Furthermore, the steps to obtain the risk factor quadruple structure through hierarchical aggregation of upper and lower role nodes include: S135, Based on the role hierarchy relationship of the role-behavior-action node sequence in the causal path diagram, filter the upper-level role control nodes and lower-level role execution nodes to generate a role hierarchy annotation diagram; S136, By using the behavior nodes corresponding to the upper and lower roles in the role hierarchy annotation diagram, task grouping is performed on the downstream action nodes to construct a job behavior distribution diagram; S137, Based on the verb type of each task node in the operation behavior distribution diagram and the consequence node pointing to the risk event, mark the behavior action and risk consequence mapping pair; S138: Extract the nouns of the task object, the execution verb, the nouns of the physical environment in the context, and the nouns of the consequence events corresponding to each task node in the task behavior distribution map, and output the four-tuple of task object, behavior action, environmental conditions and risk consequences as the risk factor four-tuple structure.
[0012] Furthermore, the steps for generating standardized risk factor vectors based on the difference between the embedding vectors of nodes in the industry knowledge graph and the risk factor quadruple structure include: S141. Based on the work object nodes, behavior action nodes, environmental condition nodes and risk consequence nodes recorded in the industry knowledge graph, extract their embedded vector data and construct an embedded vector matrix. S142, based on the entity nouns corresponding to each element in the risk factor quadruple structure, match the nodes with the same name in the industry knowledge graph and extract their embedding vectors. S143, based on the difference in the embedding vector between each risk factor quadruple element and its corresponding knowledge graph node, perform difference vector normalization to obtain a standardized difference vector set; S144 concatenates and merges the four vectors of each quadruple in the standardized difference vector set to generate the corresponding standardized risk factor vector.
[0013] Furthermore, the generation logic of the standardized difference vector set is as follows: S143.1, for each risk factor quadruple element vector and its corresponding knowledge graph node vector, perform element difference calculation dimension by dimension to generate a set of risk factor dimension difference vectors; S143.2, Perform maximum and minimum value normalization on each vector in the set of difference vectors of risk factor dimensions to obtain a preliminary set of normalized vectors; S143.3, based on the norm values of each vector in the initial set of normalized vectors, perform amplitude unification processing to obtain a normalized vector set after amplitude standardization; S143.4 indexes the normalized vector set after amplitude standardization in the order of risk factor quadruples and outputs a set of standardized difference vectors.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention constructs a semantic structure in complex safety scenarios by jointly modeling safety event text data and accident context tag data. This structure can simultaneously preserve the event evolution logic and the role behavior context, allowing risk factors to be extracted from the original accident records in a structured form while maintaining semantic continuity. Without the need for manual rule setting, the risk factor quadruple structure can stably reflect the intrinsic relationship between the work object, behavior, environmental conditions, and risk consequences, thereby avoiding semantic breaks and information loss caused by missing or rigid rules, and providing a consistent data foundation for subsequent risk analysis and training content generation. Furthermore, this invention standardizes the difference between the embedding vectors of risk factor quadruples and nodes in the industry knowledge graph, enabling risk factors extracted from different safety events to have an alignable representation in the same vector space. The question stem text generated based on the standardized risk factor vectors has comparability and completeness at the semantic level. The dynamic question bank constructed in conjunction with the semantic completeness scoring and screening mechanism can continuously reflect the risk evolution characteristics in actual accident scenarios, thereby improving the coverage consistency and update adaptability of safety training content without sacrificing the depth of semantic expression, and enhancing the ability of the training question bank to express real and complex safety scenarios.
[0015] In summary, this invention achieves the coordinated and unified structured extraction of multi-dimensional risk elements and dynamic question bank construction in complex security scenarios without relying on manual rule setting and while maintaining semantic integrity, by constructing a standardized expression system for risk factors. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0017] Figure 1 A flowchart illustrating a method for constructing a dynamic question bank for security training based on big data analysis, provided as an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figure 1 As shown in the figure, this embodiment discloses a method for constructing a dynamic question bank for security training based on big data analysis. The method includes: S11: Obtain safety incident text data and accident context label data. Safety incident text data includes multi-role composite behavior narrative text and implicit causal sentence chain text. Accident context label data includes role category labels, spatial scene labels and consequence risk labels. In a specific embodiment, the process of acquiring safety incident text data and accident context tag data is as follows: First, the original accident record text that has been manually reviewed and annotated is retrieved from the industrial safety accident management platform and input into the event corpus parsing module. The extraction of multi-role composite behavior narrative text and the construction of implicit causal sentence chain text are completed sequentially. At the same time, role category tags, spatial scene tags, and consequence risk tags are identified from the original accident record text through rule mapping and semantic analysis methods. Finally, the above text content and tag content are organized into safety incident text data and accident context tag data, respectively.
[0020] Specifically, the steps for obtaining the security event text and incident context tags include: S111, Perform multi-role recognition processing on the pre-screened industrial operation event text in the accident reporting system to extract composite behavioral narrative text containing descriptions of multiple roles' behaviors; In one specific embodiment, the event text in the structured record format is exported from the accident reporting system. After initial screening to exclude record texts with missing key fields or excessively short descriptions, it is input into a multi-role recognition model. This model uses a combination of Named Entity Recognition (NER) and Semantic Role Labeling (SRL) to complete the processing. The NER module is responsible for labeling identifiable role entities such as "operators," "equipment," and "managers," while the SRL module is used to identify the corresponding action verbs and their objects in the text for each role. Through the above processing, text containing action paragraphs of two or more roles is extracted as multi-role composite action description text.
[0021] It should be noted that sentences containing only a single action subject are not identified as multi-role composite action narrative texts, thus ensuring the multidimensionality of the corpus and the accuracy of subsequent structure diagram construction.
[0022] S112, based on the causal verb phrases in the compound behavioral narrative text, perform inter-sentence causal order sorting to obtain the implicit causal sentence chain text containing clues to the evolution of events; In a specific embodiment, for each multi-role composite behavior narrative text, firstly, all subject-verb-object structure sentence units are extracted to construct an event behavior clause set; then, based on the time adverbs, voice structures, and temporal conjunctions of the verbs in the sentences, a temporal sequence relationship is constructed, and sentence pairs with causal semantic features are selected to form a causal trigger relationship, thereby constructing an implicit causal sentence chain text.
[0023] Specifically, the steps for performing causal ordering between sentences include: S112.1 Extract all subject-verb-object sentence units from the compound behavior narrative text and construct a set of event behavior clauses; In a specific embodiment, dependency parsing is used to process the complex action narrative text, extract semantic units that satisfy the subject-verb-object structure, and output them as structured triples <subject, verb, object>. For example, "the operator opens the valve" and "the pressure rises and causes an explosion" are extracted as event action clauses. All the extracted sentences constitute the event action clause set.
[0024] S112.2, Based on the verb timing markers in the event action clause set, perform time sequence judgment between clauses to generate an initial event timing arrangement; In a specific embodiment, each event action clause is marked with a time semantic tag, including verb-guided words such as "first," "then," "immediately after," and "finally." The order of events between sentences is calculated based on these tags. For example, if clause A is "the operator opens the valve" and clause B is "then, the liquid sprays out," then B is in the order of A, and the initial event time sequence is obtained.
[0025] S112.3, based on the causal trigger keywords between verbs in the initial event sequence, filter out clause pairs without causal relationship to obtain a set of event causal fragments; In a specific embodiment, based on the causal trigger keyword list provided by the existing industrial safety accident causal corpus, such as "cause", "trigger", "results", etc., keyword matching is performed on each clause pair in the initial event time sequence, and only clause pairs with causal connectors are retained as valid event causal fragments, thus forming a set of event causal fragments.
[0026] S112.4, perform sentence chain splicing according to the triggering direction in the event causal fragment set to construct a continuous causal sentence chain sequence; The steps for constructing a continuous causal sentence chain sequence include: S112.4.1, for each pair of clauses in the set of event causal fragments, mark its triggering direction according to the causal triggering keyword; In a specific embodiment, for each pair of clauses in the event causal fragment set, the causal triggering keyword connecting the two clauses is extracted. If the keyword belongs to the type indicating a consequential relationship such as "leads to", "therefore", "furthermore", or "results in", it is marked as "positive triggering". If the keyword belongs to the type indicating a pre-causal relationship such as "due to", "originating from", "because", or "originating from", it is marked as "reverse triggering". This directional information is then appended to the structural record of the clause pair.
[0027] It should be noted that the set of causal trigger keywords can be provided by a trained causal semantic recognition model, or it can be constructed by a keyword list preset by domain experts.
[0028] S112.4.2, arrange sentence pairs with common triggering direction and consistent subject in sequence to form a set of sentence chain fragments; In a specific embodiment, clause pairs marked as "positive triggering" are filtered from the event causal fragment set, and it is determined whether their subject entities are the same. If they are the same, the clause pairs are considered to belong to the event evolution chain under the same subject. Subsequently, these clause pairs are sorted according to the original sentence order in the text and connected in sequence to form a set of sentence chain fragments with common triggering direction and consistent subject.
[0029] S112.4.3, perform structural splicing and adjustment on the parts of the sentence chain fragment set that are interrupted due to the triggering of subject change, and construct logically coherent sentence chain groups; In a specific embodiment, for the breakpoint in the sentence chain fragment set caused by the change of subject, it is determined whether there is a referential relationship, passive behavior dependency or hierarchical role nesting structure between the preceding and following subjects. If the above relationship exists, an intermediary bridging word is inserted at the position or the order of the clauses is adjusted to make the preceding and following sentence chains connect reasonably, and the omitted causal logic chain is supplemented in the structure, and finally a sentence chain group with consistent subject continuity is constructed.
[0030] It should be noted that the above structural splicing and adjustment is completed in collaboration with the syntactic analysis tree and the role reference parsing mechanism to ensure that no ambiguous dependencies are generated in the adjusted sentence chain.
[0031] S112.4.4, output the sequence of sentence groups that satisfy subject coherence and trigger consistency, as a continuous causal sentence chain sequence. In a specific embodiment, a consistency verification operation is performed on all constructed sentence chain groups. Sentence chain sequences in which the subject has not changed or the subject is reasonably connected after structural splicing and the causal triggering direction is consistent are retained as the output results of continuous causal sentence chain sequences, which are then called by the subsequent nested event structure generation module.
[0032] S112.5 preserves the subject-predicate structure of each group of adjacent clauses in the causal sentence chain sequence to maintain coherence, and outputs the implicit causal sentence chain text.
[0033] In one specific embodiment, a subject-verb consistency criterion is set to determine whether the subjects of adjacent sentences are consistent. If they are consistent, a "coherent" label is added to the structural annotation; otherwise, a "broken" label is added. Only sentence chains with coherent structural labels are retained to generate implicit causal sentence chain text.
[0034] S113, semantic mapping and matching of the original accident record text is performed through an expert rule corpus to extract role category tags corresponding to the identity of the work object; In a specific embodiment, the industrial operation role label rule corpus is invoked, and semantic mapping is performed based on the noun phrases in the original accident record text. If the word is successfully mapped to role words such as "maintenance worker", "inspector", "manager" and "hydraulic equipment", it is labeled as a role category label, and the contextual location information of its appearance is recorded for subsequent role behavior path extraction.
[0035] S114, Based on the location information corresponding to the role category label and the task context statement, perform geographic word recognition operation to obtain spatial scene labels describing the environment in which the accident occurred; In one specific embodiment, sentences containing location information are extracted from the context paragraphs of the role category tags, and a geographic entity recognition model based on dictionary + rule matching is used to identify geographic words such as "tank farm", "control room" and "transportation pipeline" as spatial scene tags.
[0036] S115, combine the phrase components representing the result event in the spatial scene label, mark the phrases with the meaning of operation result or negative consequence, and generate accident risk consequence label; In a specific embodiment, verb phrases and noun phrases related to the outcome of the event in the sentences corresponding to the spatial scene labels are analyzed, and phrases with negative semantic color such as "causing damage", "causing downtime" and "causing explosion" are labeled as risk consequence phrases, and the final output is the accident risk consequence label.
[0037] S116 organizes the composite behavioral narrative text, implicit causal sentence chain text, role category tags, spatial scene tags and consequence risk tags into a structured output of safety event text and accident context tags. In a specific embodiment, the text data structuring module is invoked to organize the composite behavioral narrative text, implicit causal sentence chain text, role category tags, spatial scene tags, and consequence risk tags into a unified event data object structure, and output it as safety event text data and accident context tag data for subsequent structure diagram construction and semantic chain extraction modules to call.
[0038] S12: Based on safety event text data and accident context tag data, construct syntactic dependency graph and temporal logic graph, generate nested event structure graph, and extract role behavior semantic chain from nested event structure graph; In a specific embodiment, the composite behavioral narrative text, implicit causal sentence chain text, role category tags, spatial scene tags, and consequence risk tags recorded in the safety event text data and accident context tag data are first called as input content; the syntactic dependency graph construction module and the temporal logic graph generation module are executed to construct a nested event structure graph; then, through the role behavior extraction module, the event chain structure with consistent subject, coherent time, and clear action meaning is identified from the nested event structure graph and assembled into a role behavior semantic chain.
[0039] Specifically, the steps for constructing syntactic dependency graphs and temporal logic graphs include: S121, Based on the multi-role composite behavior narrative text in each segment of the safety incident text data and the role category labels in the accident context label data, identify the explicit role entities in the text and generate role identification results; In a specific embodiment, firstly, dependency parsing is performed on the multi-role composite behavior narrative text to extract all noun phrase units in the text that contain personal pronouns, job titles, and equipment names; then, the role category label list in the accident context label data is called to perform dictionary matching recognition. If the noun phrase is consistent with the entries in the role category label or has a nested synonym path (e.g., "pump operator" can be mapped to "operator"), then the noun phrase is marked as an explicit role entity; all successfully identified role entities are marked as role recognition results.
[0040] S122, Based on the role recognition results, perform position location of role words in the sentence, and combine spatial scene label and consequence risk label information to construct role position association pairs; In a specific embodiment, the syntactic analyzer is invoked to obtain the character index position of each role recognition result in the original composite behavior narrative text, and its position range in the sentence is recorded; combined with the spatial scene label and consequence risk label recorded in the accident context label data, if the spatial scene word or consequence risk word appears in the same sentence or adjacent sentences, it is determined that it has an association relationship with the role entity, and finally the role position association pair is constructed with the coordinate pair of "role word position + scene word / consequence word position".
[0041] It should be noted that only pairings with a sentence-to-sentence distance of no more than 2 are retained in the role position association pairs to ensure the relevance of the semantic context.
[0042] S123, based on the role position association pairs, combined with the implicit causal sentence chain text in the security event text data, perform intra-sentence logical sorting processing to construct a syntactic dependency graph; In a specific embodiment, the sentence fragments corresponding to each set of role position associations are taken as sub-text units and input into the syntactic structure parsing module. Based on the role entity as the central node, the dependency path structure of the predicate verb and object phrase in the sentence is extracted to obtain the initial draft of the syntactic dependency graph. At the same time, the subject-predicate structure consistency markers marked in the implicit causal sentence chain text are called to adjust the semantic ranking weight of the nodes in the dependency graph, rearrange the dependency relationships between actions in the sentence, and output the structurally complete syntactic dependency graph.
[0043] Specifically, the steps for performing intra-sentence logical sorting include: S123.1 Based on the dependency relationship paths of each role entity in the syntactic dependency graph, extract the subject-verb-object semantic combination information between roles and generate a dependency path structure set; In a specific implementation, all paths in the syntactic dependency graph with the role entity as the root node are traversed, and their subordinate verb nodes and object nodes are extracted and concatenated into subject-verb-object triples in the form of <role subject, action verb, operation object>. Each triple represents an event action unit, and all triples are summarized into a dependency path structure set for subsequent behavior merging processing.
[0044] For example, in the sentences "the repairman turns on the power" and "the power triggers a short circuit", the terms <repairman, turn on, power> and <power, trigger, short circuit> will be extracted as dependency path structures respectively.
[0045] S123.2, Based on the role position of the same role in multiple events in the dependency path structure set, construct a set of event nodes centered on the role; In one specific embodiment, the dependency path structure set is aggregated, all triples whose subject field is the same role are filtered, and they are marked as node numbers according to their order of appearance in the original text. The event node set corresponding to the role is then constructed.
[0046] It should be noted that if the same role appears with different titles in multiple events (such as "maintenance worker" or "operator"), they will be uniformly identified based on the role category tag to ensure consistency.
[0047] S123.3, mark the time tags in the event node set by the event occurrence time index in the timing logic diagram; In one specific embodiment, the inter-sentence temporal information provided in the causal sentence chain text is called, and each event node is labeled according to the temporal index of its corresponding sentence. For example, the first event node is labeled as T1, the second event node is labeled as T2, and so on. Finally, a time tag field is added to each set of event nodes for each role.
[0048] S123.4 integrates the set of event nodes and their timestamps into a nested event structure diagram with the role as the core and the event time as the axis.
[0049] In a specific embodiment, each role is taken as the master node of the graph structure, and its corresponding event node set is arranged in ascending order of time label and connected to form a unidirectional event chain; if multiple role event nodes have a causal triggering relationship (such as "role A triggers role B's behavior"), cross-role connection edges are added to the graph structure to form a nested structure, and the output is a nested event structure graph.
[0050] S124. By comparing the order of roles in the role position association pair and the narrative sequence of the causal sentence chain text, an event occurrence time index is established, and a time sequence logic diagram is generated.
[0051] In a specific embodiment, by obtaining role position association pairs from the syntactic dependency graph and combining them with the temporal sequence description information of each sentence in the causal sentence chain text, an event occurrence time index is established. The specific operation process is as follows: First, extract each pair of characters and their corresponding intra-sentence position index values from the character position association pairs to construct an initial character pair sequence mapping table. Then, parse the narrative time information of each sentence in the causal sentence chain text, and establish the chronological relationship of events by comparing the event narrative positions of the same character's subject. Finally, merge the character pair sequence mapping table and the chronological relationship of events to generate a directed graph structure with characters as nodes and event time as edge weights, which is output as a temporal logic graph.
[0052] It should be noted that the event time index is based on the natural paragraph numbering of the causal sentence chain text. When time adverbs (such as "subsequently" or "afterwards") are present, the time adverb is used to determine the order of events. If there is no explicit time description, the text order is used as the sorting basis by default.
[0053] Specifically, the steps for extracting the semantic chain of character behavior from the nested event structure diagram include: S125, Based on the event node corresponding to each role in the nested event structure diagram, extract the subject-verb-object combination information with the subject as the role, and generate role behavior action pairs; In a specific embodiment, by traversing each event node built around a role in the nested event structure graph, the statement nodes whose subject is the current role are selected, and the subject-verb-object combination in the node is extracted and assembled into a role behavior action pair.
[0054] Specifically, an action pair consists of a three-part structure: "subject role + verb action + object object". When an event node is missing an object or action predicate, the node is marked as incomplete and will not be included in the subsequent action chain construction process.
[0055] S126, Connect multiple action pairs under the same role sequentially according to the event time index to form an initial action chain set; In a specific embodiment, the action pairs extracted in S125 are arranged in chronological order according to the timing logic diagram generated in S124; for each role, all its corresponding action pairs are connected in chronological order to construct the initial action chain set of the role.
[0056] For example, if "Role A" performs actions such as "opening the valve", "connecting the power supply", and "starting the equipment" at time indices t1, t2, and t3 respectively, then its initial set of action chains is: A → Open the valve → Connect the power supply → Start the equipment; It should be noted that if a character performs the same action repeatedly under multiple time indices (e.g., "start the device" twice in a row), such repetitions will be removed in subsequent steps.
[0057] S127. By comparing the semantic redundancy of action pairs in the initial action chain set, duplicate or semantically consistent chain segments are removed to obtain a simplified action chain set. The role, action, and timeline information in the simplified action chain set are assembled into a role action semantic chain. In a specific embodiment, the semantic similarity of consecutive action pairs in each action chain is first calculated. The semantic similarity is evaluated by calculating the cosine similarity between verb phrase vectors based on a pre-trained embedding model. When the semantic similarity of two action pairs is higher than the set semantic repetition threshold, they are judged as semantically consistent segments, and only one representative segment is retained. Preferably, the semantic repetition threshold can be set based on the actual situation, such as 0.95.
[0058] After the removal is complete, the remaining action pairs will be rearranged in chronological order, outputting a simplified action chain set. Finally, the subject, action verb, and corresponding time tag of each character in the simplified action chain set will be structurally encapsulated to form: The structure [character]—[action1@time1, action2@time2,…] outputs a semantic chain of character behaviors.
[0059] It should be noted that the generated semantic chain of character behavior serves as the basis for subsequent causal path analysis. Each action segment retained in the chain has semantic distinctiveness and temporal independence, avoiding semantic redundancy and causal interference.
[0060] S13: Based on the semantic chain of role behavior, construct a causal path diagram, and obtain a risk factor quadruple structure of work object, behavior action, environmental conditions and risk consequences through hierarchical aggregation of upper and lower role nodes; Specifically, the step of constructing a causal path graph based on the semantic chain of role behavior includes: S131, Based on the role consistency relationship of continuous actions in each chain of the role behavior semantic chain, perform causal transformation analysis between action pairs to generate a set of causal action pairs; In a specific embodiment, based on multiple action information sequences arranged chronologically in the semantic chain of role behavior, it is determined whether the subject roles between consecutive actions are the same. If they are the same, it is determined that the pair of verbs are likely to be related. Then, combined with the semantic directionality annotation information of verbs in the risk causal sentence chain text, it is determined whether the preceding verb is the preceding action or the inducing action of the following verb. If it is true, it is recorded as a set of causal action pairs. Finally, all true action pairs are output as a set of causal action pairs.
[0061] It should be noted that role consistency is used to avoid misjudging sequential actions between different subjects as causal relationships, while the causal judgment between actions depends on the event triggering direction information in the existing sentence chain text.
[0062] S132, by using the temporal sequence of each verb action pair in the causal action pair set and the contextual risk event sequence markers, a risk causal path segment set is generated; In a specific embodiment, for each pair of verbs in the causal action pair set, the sequence information is obtained by finding the time stamp position of the verbs in the implicit causal sentence chain text. Combined with the risk event sequence marked in the consequence risk label in the accident context label data, it is confirmed whether the action pair points to the evolutionary main line of the risk event. If they are the same main line, the action pair is taken as a valid path segment and output to the risk causal path segment set.
[0063] S133, Based on the starting point and ending point of each action in the risk causal path segment set, connect adjacent path segments to form a complete causal path diagram; In a specific embodiment, the process of constructing a causal path graph includes: traversing the set of risk causal path segments; if the ending verb of the current path segment is the same as the starting verb of the next path segment, then connecting the two paths into a longer path segment; repeating this connection operation until no connection is possible; and outputting the set of all connected path segments as a complete causal path graph node sequence.
[0064] S134. For each path in the causal path graph, mark its starting role and ending role, and generate a causal path graph containing a sequence of role-behavior-action nodes.
[0065] In a specific embodiment, for each path segment in the generated causal path graph, the role labels corresponding to its first and last actions are read as the starting and ending role information, and combined with the verb sequence in the middle of the path to form a node sequence of "role-behavior-action", and thus a causal path graph with closed loop features of contextual behavior chain is generated.
[0066] Specifically, the steps to obtain the risk factor quadruple structure through hierarchical aggregation of hierarchical role nodes include: S135, Based on the role hierarchy relationship of the role-behavior-action node sequence in the causal path diagram, filter the upper-level role control nodes and lower-level role execution nodes to generate a role hierarchy annotation diagram; In a specific embodiment, each role-behavior-action node sequence is first extracted from the causal path graph, the first and last roles of the sequence and the middle action verbs are identified, and the command and control relationship of each role in the actual operation scenario is determined based on the role category labels in the accident context label data. For example, "manager" is the superior role of "operator".
[0067] Specifically, by constructing a role control relationship dictionary, role names are mapped to hierarchical numbers, with smaller numbers representing higher hierarchical levels. For example, if "dispatcher" is at level 1 and "operator" is at level 2, then if the starting role in a certain path sequence is the dispatcher and the ending role is the operator, then the action chain in that path is classified as a "top-down" control path.
[0068] Finally, the role hierarchy pairs in all paths are summarized and labeled to construct a role hierarchy labeling diagram, which is used to represent the control and execution relationship between superior and subordinate roles in the causal path diagram.
[0069] S136, By using the behavior nodes corresponding to the upper and lower roles in the role hierarchy annotation diagram, task grouping is performed on the downstream action nodes to construct a job behavior distribution diagram; In a specific embodiment, for each pair of upper and lower roles in the role hierarchy annotation diagram, the behavior node information involved in the controlling role and the controlled role is extracted.
[0070] Specifically, for each instruction action node issued by the control role node, the execution node of the controlled role connected to it in the causal path graph is traced. If multiple path segments all point to the same consequence node or environmental condition, they are considered to have consistent operation scenarios, and thus they are classified into a set of tasks.
[0071] Finally, all action nodes that match the role pairing relationship and have common task semantics are grouped according to their controlling initiating role and task execution target, and a task behavior distribution map is output. Each subgraph in the map represents the behavior and action layout of a role pair under specific task conditions.
[0072] S137, Based on the verb type of each task node in the operation behavior distribution diagram and the consequence node pointing to the risk event, mark the behavior action and risk consequence mapping pair; In a specific embodiment, each group of task nodes in the job behavior distribution graph is traversed, the set of verbs for their execution actions is extracted, and the terminal risk consequence nodes connected to each verb node in the causal path graph are counted.
[0073] Specifically, for a certain action verb (such as "cut off the power"), if it points to the consequence node "electrical fault" in multiple paths, then a mapping pair between the action "cut off the power → electrical fault" and the risk consequence is established.
[0074] All verb-consequence pairs will be uniformly numbered and stored, serving as input items for subsequent construction of risk factor structures, ensuring that each action node has a corresponding risk trigger meaning.
[0075] It should be noted that if there is a one-to-many relationship in the mapping pair, that is, a certain verb may cause multiple risk consequences, then the consequence with the greatest risk impact is selected as the main mapping node according to the semantic weight priority, and the rest are used as auxiliary annotation items.
[0076] S138: Extract the nouns of the task object, the execution verb, the nouns of the physical environment in the context, and the nouns of the consequence events corresponding to each task node in the task behavior distribution map, and output the four-tuple of task object, behavior action, environmental conditions and risk consequences as the risk factor four-tuple structure.
[0077] In a specific embodiment, for each group of task subgraphs in the job behavior distribution map, the following extraction operations are performed sequentially: Extract the affected nouns associated with the subject role from the action nodes and use them as the task objects; Extract the instruction or the actual execution verb as the action; Retrieve spatial scene label content corresponding to the task subgraph from the accident context label data, and extract physical nouns from the environmental description phrases as environmental conditions; Extract the consequence event nouns from the verb-consequence mapping pairs already established in S137 as risk consequences; Finally, the above four types of semantic elements are combined into a risk factor quadruple: [task object, action, environmental conditions, risk consequences], which serves as the input structure for the subsequent question generation module.
[0078] For example, when the following pairing information exists in the job behavior distribution map: Action node: "Shut down main power"; Subjective noun: "main power supply"; Extract "outdoor high-temperature power distribution cabinet" from the spatial tags; Consequence point: "Abnormal equipment voltage"; The corresponding quadruple is: [Main power supply off; outdoor high-temperature distribution cabinet; equipment voltage abnormality]; It should be noted that each item in the quadruple structure must satisfy semantic independence and event traceability to ensure contextual consistency and a closed loop of risk causality logic when generating the question stem text.
[0079] S14: Based on the difference between the embedding vectors between nodes in the risk factor quadruple structure and the industry knowledge graph, generate standardized risk factor vectors, generate question stem text based on the standardized risk factor vectors, and select question stem content with semantic integrity scores higher than the set score value according to the question stem text to build a dynamic question bank. Specifically, the steps for generating standardized risk factor vectors based on the difference between the embedding vectors of nodes in the industry knowledge graph and the risk factor quadruple structure include: S141. Based on the work object nodes, behavior action nodes, environmental condition nodes and risk consequence nodes recorded in the industry knowledge graph, extract their embedded vector data and construct an embedded vector matrix. In one specific embodiment, the industry knowledge graph API interface is called to obtain the set of annotated semantic nodes therein, and semantic nodes with annotation types of "job object", "behavioral action", "environmental conditions" and "risk consequences" are extracted respectively, and embedding encoding operation is performed on each node.
[0080] The embedding encoding operation uses a pre-trained text vector model (such as the BERT embedding model) to perform vector transformation on the node terms, obtaining a set of embedding vectors of uniform dimension. The four types of nodes are then constructed into matrices: Job object embedding matrix; Behavior embedding matrix; Environmental condition embedding matrix; Risk consequences embedding matrix.
[0081] The four types of matrices together form the industry knowledge graph embedding vector matrix, which serves as the benchmark for subsequent matching and difference calculation.
[0082] S142, based on the entity nouns corresponding to each element in the risk factor quadruple structure, match the nodes with the same name in the industry knowledge graph and extract their embedding vectors. In one specific embodiment, for each risk factor quadruple, the four element fields—the noun of the task object, the verb of the action, the phrase of the environmental condition, and the noun of the risk consequence—are matched with the four types of node sets in the industry knowledge graph.
[0083] Upon discovering a node with the same name, its embedding vector is retrieved from the embedding vector matrix and used as the representation of that risk factor element in the industry standard space. If an element has multiple meanings, the meaning with the highest co-occurrence frequency with other elements in its accident context is selected first to ensure semantic consistency.
[0084] S143, based on the difference in the embedding vector between each risk factor quadruple element and its corresponding knowledge graph node, perform difference vector normalization to obtain a standardized difference vector set; Specifically, the logic for generating the standardized difference vector set is as follows: S143.1, for each risk factor quadruple element vector and its corresponding knowledge graph node vector, perform element difference calculation dimension by dimension to generate a set of risk factor dimension difference vectors; In one specific embodiment, let the embedding vector of a certain four-tuple's action element be... The embedding vector of this action node in the industry knowledge graph is Then the difference vector for: ; Based on this method, the vector difference between each element in the quadruple and its corresponding item in the knowledge graph is calculated to obtain the task object difference vector, behavior action difference vector, environmental condition difference vector, and risk consequence difference vector.
[0085] S143.2, Perform maximum and minimum value normalization on each vector in the set of difference vectors of risk factor dimensions to obtain a preliminary set of normalized vectors; In one specific embodiment, for each dimension of each difference vector, a max-min normalization process is used to map the values to the [0,1] interval to eliminate the influence of dimensions between different dimensions.
[0086] S143.3, based on the norm values of each vector in the initial set of normalized vectors, perform amplitude unification processing to obtain a normalized vector set after amplitude standardization; In one specific embodiment, for the normalized set of difference vectors, the L2 norm of each vector is calculated and each vector is divided by its norm value to achieve amplitude normalization that maintains the direction and length, thereby avoiding an imbalanced input effect of a vector of a certain dimension on the question generation model.
[0087] S143.4 indexes the normalized vector set after amplitude standardization in the order of risk factor quadruples and outputs a set of standardized difference vectors.
[0088] In one specific embodiment, the original order of the quadruple [task object, action, environmental conditions, risk consequences] is preserved, and the corresponding standardized vectors are combined in this order to form a structured mapping table. This mapping table is used to subsequently generate the concatenated vector input structure, ensuring the consistency between semantic components and vector positions.
[0089] S144: Concatenate and merge the four vectors of each quadruple in the standardized difference vector set to generate the corresponding standardized risk factor vector. In one specific embodiment, for each set of four-tuple standardized difference vectors, a vector concatenation operation is performed sequentially, that is, the four normalized vectors are concatenated along their dimensions into a complete input vector, which serves as the comprehensive vector representation of the risk factor. The dimension of the concatenated vector is four times that of the original vector. The resulting standardized risk factor vector is used as an input feature vector in the question stem generation module. It has the ability to fully reflect semantic bias, standard gap and semantic triggering direction features, and supports the subsequent training text generator to fit and abstract the risk language structure.
[0090] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A method for constructing a dynamic question bank for security training based on big data analysis, characterized in that, The method includes: S11: Obtain safety incident text data and accident context label data. Safety incident text data includes multi-role composite behavior narrative text and implicit causal sentence chain text. Accident context label data includes role category labels, spatial scene labels and consequence risk labels. S12: Based on safety event text data and accident context tag data, construct syntactic dependency graph and temporal logic graph, generate nested event structure graph, and extract role behavior semantic chain from nested event structure graph; S13: Based on the semantic chain of role behavior, construct a causal path diagram, and obtain a risk factor quadruple structure of work object, behavior action, environmental conditions and risk consequences through hierarchical aggregation of upper and lower role nodes; S14: Based on the difference between the embedding vectors of nodes in the industry knowledge graph and the risk factor quadruple structure, generate standardized risk factor vectors, generate question stem text based on the standardized risk factor vectors, and select question stem content with semantic integrity scores higher than the set score value according to the question stem text to build a dynamic question bank.
2. The method for constructing a dynamic security training question bank based on big data analysis according to claim 1, characterized in that, The steps for obtaining security event text and incident context tags include: S111, Perform multi-role recognition processing on the pre-screened industrial operation event text in the accident reporting system to extract composite behavioral narrative text containing descriptions of multiple roles' behaviors; S112, based on the causal verb phrases in the compound behavioral narrative text, perform inter-sentence causal order sorting to obtain the implicit causal sentence chain text containing clues to the evolution of events; S113, semantic mapping and matching of the original accident record text is performed through an expert rule corpus to extract role category tags corresponding to the identity of the work object; S114, Based on the location information corresponding to the role category label and the task context statement, perform geographic word recognition operation to obtain spatial scene labels describing the environment in which the accident occurred; S115, combine the phrase components representing the result event in the spatial scene label, mark the phrases with the meaning of operation result or negative consequence, and generate accident risk consequence label; S116 organizes the composite behavioral narrative text, implicit causal sentence chain text, role category tags, spatial scene tags, and consequence risk tags into a structured format, and outputs safety event text and accident context tags.
3. The method for constructing a dynamic security training question bank based on big data analysis according to claim 2, characterized in that, The steps for performing causal ordering between sentences include: S112.1 Extract all subject-verb-object sentence units from the compound behavior narrative text and construct a set of event behavior clauses; S112.2, Based on the verb timing markers in the event action clause set, perform time sequence judgment between clauses to generate an initial event timing arrangement; S112.3, based on the causal trigger keywords between verbs in the initial event sequence, filter out clause pairs without causal relationship to obtain a set of event causal fragments; S112.4, perform sentence chain splicing processing according to the triggering direction in the event causal fragment set to construct a continuous causal sentence chain sequence.
4. The method for constructing a dynamic security training question bank based on big data analysis according to claim 3, characterized in that, The steps for constructing syntactic dependency graphs and temporal logic graphs include: S121, Based on the multi-role composite behavior narrative text in each segment of the safety incident text data and the role category labels in the accident context label data, identify the explicit role entities in the text and generate role identification results; S122, Based on the role recognition results, perform position location of role words in the sentence, and combine spatial scene label and consequence risk label information to construct role position association pairs; S123, based on the role position association pairs, combined with the implicit causal sentence chain text in the security event text data, perform intra-sentence logical sorting processing to construct a syntactic dependency graph; S124. By comparing the order of roles in the role position association pair and the narrative sequence of the causal sentence chain text, an event occurrence time index is established, and a time sequence logic diagram is generated.
5. The method for constructing a dynamic security training question bank based on big data analysis according to claim 4, characterized in that, The steps for performing intra-sentence logical sorting include: S123.1 Based on the dependency relationship paths of each role entity in the syntactic dependency graph, extract the subject-verb-object semantic combination information between roles and generate a dependency path structure set; S123.2, Based on the role position of the same role in multiple events in the dependency path structure set, construct a set of event nodes centered on the role; S123.3, mark the time tags in the event node set by the event occurrence time index in the timing logic diagram; S123.4 integrates the set of event nodes and their timestamps into a nested event structure diagram with the role as the core and the event time as the axis.
6. The method for constructing a dynamic security training question bank based on big data analysis according to claim 5, characterized in that, The steps to extract the semantic chain of character behavior from a nested event structure diagram include: S125, Based on the event node corresponding to each role in the nested event structure diagram, extract the subject-verb-object combination information with the subject as the role, and generate role behavior action pairs; S126, Connect multiple action pairs under the same role sequentially according to the event time index to form an initial action chain set; S127. By comparing the semantic repetition of action pairs in the initial action chain set, duplicate or semantically consistent chain segments are eliminated to obtain a simplified action chain set. The role, action, and timeline information in the simplified action chain set are assembled into a role action semantic chain.
7. The method for constructing a dynamic security training question bank based on big data analysis according to claim 6, characterized in that, The steps for constructing a causal path graph based on the semantic chain of role behavior include: S131, Based on the role consistency relationship of continuous actions in each chain of the role behavior semantic chain, perform causal transformation analysis between action pairs to generate a set of causal action pairs; S132, by using the temporal sequence of each verb action pair in the causal action pair set and the contextual risk event sequence markers, a risk causal path segment set is generated; S133, Based on the starting point and ending point of each action in the risk causal path segment set, connect adjacent path segments to form a complete causal path diagram; S134. For each path in the causal path graph, mark its starting role and ending role, and generate a causal path graph containing a sequence of role-behavior-action nodes.
8. The method for constructing a dynamic security training question bank based on big data analysis according to claim 7, characterized in that, The steps to obtain the risk factor quadruple structure through hierarchical aggregation of hierarchical role nodes include: S135, Based on the role hierarchy relationship of the role-behavior-action node sequence in the causal path diagram, filter the upper-level role control nodes and lower-level role execution nodes to generate a role hierarchy annotation diagram; S136, By using the behavior nodes corresponding to the upper and lower roles in the role hierarchy annotation diagram, task grouping is performed on the downstream action nodes to construct a job behavior distribution diagram; S137, Based on the verb type of each task node in the operation behavior distribution diagram and the consequence node pointing to the risk event, mark the behavior action and risk consequence mapping pair; S138: Extract the nouns of the task object, the execution verb, the nouns of the physical environment in the context, and the nouns of the consequence events corresponding to each task node in the task behavior distribution map, and output the four-tuple of task object, behavior action, environmental conditions and risk consequences as the risk factor four-tuple structure.
9. The method for constructing a dynamic security training question bank based on big data analysis according to claim 8, characterized in that, The steps for generating standardized risk factor vectors based on the difference between the embedding vectors of nodes in the industry knowledge graph and the risk factor quadruple structure include: S141. Based on the work object nodes, behavior action nodes, environmental condition nodes and risk consequence nodes recorded in the industry knowledge graph, extract their embedded vector data and construct an embedded vector matrix. S142, based on the entity nouns corresponding to each element in the risk factor quadruple structure, match the nodes with the same name in the industry knowledge graph and extract their embedding vectors. S143, based on the difference in the embedding vector between each risk factor quadruple element and its corresponding knowledge graph node, perform difference vector normalization to obtain a standardized difference vector set; S144 concatenates and merges the four vectors of each quadruple in the standardized difference vector set to generate the corresponding standardized risk factor vector.
10. The method for constructing a dynamic security training question bank based on big data analysis according to claim 9, characterized in that, The logic for generating the standardized difference vector set is as follows: S143.1, for each risk factor quadruple element vector and its corresponding knowledge graph node vector, perform element difference calculation dimension by dimension to generate a set of risk factor dimension difference vectors; S143.2, Perform maximum and minimum value normalization on each vector in the set of difference vectors of risk factor dimensions to obtain a preliminary set of normalized vectors; S143.3, based on the norm values of each vector in the initial set of normalized vectors, perform amplitude unification processing to obtain a normalized vector set after amplitude standardization; S143.4 indexes the normalized vector set after amplitude standardization in the order of risk factor quadruples and outputs a set of standardized difference vectors.