Water affair operation plan safety video generation method
By analyzing municipal waterworks construction operation plans, matching them with accident case databases to generate personalized safety warning videos, and optimizing the content based on viewing feedback, the problem of insufficient correlation between safety education content and operation plans in existing technologies has been solved, achieving personalized and closed-loop optimization of training.
Patent Information
- Application Number
- CN202611297596.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-27
AI Technical Summary
Existing safety education methods cannot generate personalized safety warning videos based on work plans and job differences in municipal waterworks construction, and the training effect is difficult to optimize in a closed loop.
By analyzing work plan information and matching target accident cases in the municipal waterworks construction accident case database, personalized safety warning education videos are generated. The case matching parameters are optimized by the completion rate of viewing and the accuracy rate of answering questions, forming a closed loop of safety education content generation, delivery and feedback.
This ensures that the safety education content is highly relevant to the current construction tasks, improves the relevance and effectiveness of the training, and guarantees that the video content matches the actual work plan and job risks.
Smart Images

Figure CN123180730A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of planned safety video generation, and in particular to a method for generating planned safety videos for water operations. Background Technology
[0002] Municipal waterworks construction involves various operations such as sewage pipe dredging, pump station maintenance, confined space work, temporary power supply, mechanical excavation, and pipeline inspection. These operations are typically characterized by limited space, rapidly changing working environments, complex underground pipelines, and diverse personnel roles. Different types of work and different personnel positions face varying risks. For example, confined space work may involve the accumulation of toxic and harmful gases, oxygen deficiency, and flammable and explosive hazards; equipment maintenance and temporary power supply work may involve risks of electric shock, mechanical injury, and misoperation. Current pre-shift training typically uses fixed videos, paper-based briefings, or general courseware, making it difficult to tailor to the day's work plan and the specific roles of the personnel.
[0003] Existing technology CN119849918A discloses a special operation safety risk analysis and warning system based on an accident case database. This system identifies operational risks and outputs safety prevention plans and early warning information through historical accident cases, risk chain analysis, and comparison with current operations. However, this system primarily focuses on operational risk assessment and early warning, and does not automatically generate safety warning videos for municipal waterworks operation permits or work schedules, nor does it establish a mechanism for optimizing video content generation and training effectiveness feedback based on job differences.
[0004] Existing technology CN121908078A discloses a method and system for generating engineering safety videos based on a generative large model. This method generates script text, images, audio, and engineering safety videos by requiring users to input application areas and topic requirements, combined with a multimodal knowledge base. However, this solution requires users to actively set topics and does not automatically trigger responses based on real-time work plans, personnel positions, and plan changes at municipal waterworks sites. Furthermore, it does not continuously optimize the accident case matching results based on viewing completion rates and quiz accuracy.
[0005] Therefore, existing safety education methods still suffer from problems such as insufficient correlation between warning content and actual work plans, weak job adaptability, inadequate utilization of accident cases, untimely updates of video content, and difficulty in achieving closed-loop optimization of training effectiveness. Summary of the Invention
[0006] The main objective of this invention is to provide a method for generating safety videos for waterworks operations. The technical problem this application solves is: how to automatically generate and continuously optimize personalized safety warning and education videos that match the current operation based on the work plan and job risk differences at the municipal waterworks construction site.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for generating safety videos for waterworks operations, comprising the following steps: S1, obtain the current work plan information, parse the current work plan information to obtain the work type, work scenario keywords and work personnel job information; S2, based on the job type, job scenario keywords and job information of the workers, matches target accident cases from the municipal waterworks construction accident case database; S3, generate warning education scripts based on target accident cases and operator job information; S4. Based on the warning education script, generate accident reconstruction scene video and narration audio, and synchronously synthesize the accident reconstruction scene video, narration audio and subtitle warning information to obtain personalized safety warning education video; S5 sends personalized safety warning education videos to terminal devices associated with the current work plan, collects video viewing completion rate and safety knowledge quiz accuracy rate, and updates accident case matching parameters based on the video viewing completion rate and safety knowledge quiz accuracy rate.
[0008] In the preferred scheme, the municipal waterworks construction accident case database includes accident case text data, accident site image data, and accident video material data; for each accident case, an accident feature tuple is established, including operation type tags, operation scenario tags, job position tags, causative factor tags, accident consequence tags, and preventive measure tags; tags with causal relationships are connected to form an accident risk chain diagram, which includes operation object nodes, causative factor nodes, risk event nodes, accident consequence nodes, and preventive measure nodes in sequence.
[0009] 3. The method for generating safety videos for waterworks operation plans according to claim 2, characterized in that: S1 includes: The field names and values in the work ticket text or shift schedule text are used to form a field anchor sequence. The field anchor sequence and the work plan text sequence are then input into a dual-channel semantic extraction network anchored to the ticket fields. Generate field constraint masks according to the semantic categories corresponding to the field names, and use the field constraint masks to limit the cross-attention range between the field anchor sequence and the job plan text sequence; The fused features output by cross-attention are input into the entity boundary labeling layer to obtain the job type, job scenario keywords, job personnel job information, job location, and job time. Based on the job type, job scenario keywords, and job information of the workers, a job risk query map is constructed. The job risk query map includes job object nodes, job node, risk source node, and prevention and control requirement node.
[0010] In the preferred scheme, S2 employs a confidence-adaptive risk chain gating matching algorithm, including: Regarding the first Calculate the semantic similarity of job types for each accident case. Semantic similarity of work scenarios Job relevance Consistency with risk chain topology ; Based on the confidence levels extracted from fields such as job type, job scenario keywords, operator job information, and risk source information, the weight of job type is determined. Job scenario weight Job weight and risk chain weight ,in, ; according to Calculate the first The overall matching value of each accident case ; in, For the first The key risk threshold coefficient corresponding to each accident case, when the operation risk query chart is related to the first... When the accident risk chain diagram corresponding to a single accident case shows inconsistencies in key nodes regarding the work object, causative factors, or accident consequences, the risk level is reduced. ; According to the overall matching value The accident cases are sorted to obtain a set of candidate accident cases.
[0011] In the preferred embodiment, S2 further includes: The work objects, harmful factors and accident consequences in the accident risk chain diagram are combined into risk path segments, and path identifiers and path vector indexes are established for the risk path segments. High-risk path segments are extracted from the operation risk query map, and initial candidate accident cases are recalled from the path vector index based on path similarity. Regarding the first Each accident case, according to Calculate the differential risk coverage value ; in, This is the redundancy suppression coefficient. This is a collection of selected accident cases. For the first The first accident case and the first Risk path vector similarity between individual accident cases; Based on differentiated risk coverage values Select target accident cases in sequence, ensuring that each target accident case differs from the others in at least one of the causative factors, accident consequences, or preventive measures.
[0012] In the preferred embodiment, S3 includes: The job type, job scenario keywords, job information of the workers, accident details, causative factors, accident consequences and preventive measures are combined into a job-risk-handling fact anchoring matrix. Based on the job-risk-handling fact anchoring matrix, structured constraint prompts are generated. The structured constraint prompts include the accident process, cause analysis, lessons learned, and preventive measures. Multiple candidate warning education scripts are generated based on structured constraint prompts using a large language model; Regarding the first Calculate the coverage rate of accident facts for each candidate warning education script. Coverage rate of preventive measures in the workplace and risk contradiction rate and in accordance with Receive script consistency score ; Select script consistency score Highest risk and contradiction rate Candidate warning education scripts that fall below a preset threshold will be considered as warning education scripts. , and For scoring weights.
[0013] In the preferred embodiment, S4 includes: The warning education script is divided into multiple shot description units, each of which includes the work location, work equipment, worker position, work actions, protective status, risk source and accident status. For each shot description unit, a continuous shot state vector is constructed. The continuous shot state vector is used to represent the work location, equipment status, personnel protection status, and risk source status. Based on the continuous state vector of the previous shot description unit and the current shot description unit, generate shot transition constraint information; A text-to-video generation model is used to generate multiple video clips based on shot description units and shot transition constraints. Compare the state of the last frame of adjacent shot video segments with the state of the first frame. When the state difference exceeds a preset threshold, regenerate the corresponding shot video segment. The text-to-speech synthesis model is used to generate narration audio, and the video clips, subtitle warning information and narration audio are synthesized synchronously based on the phoneme timestamps and shot transition times in the narration audio.
[0014] In the preferred embodiment, S5 includes: The video push trigger time is determined based on the start time of the task, the duration of the personalized safety warning education video, and the historical average viewing time. according to Calculate video push trigger time ; in, The start time of the assignment. To personalize the length of safety awareness education videos, This is the historical average viewing time. This is a safety buffer period; When the job type, job scenario keywords, or job position information of the operator in the work plan changes, the personalized safety warning education video associated with the work plan before the change is discarded, and S2 to S4 are re-executed. If the terminal device does not return a viewing completion message before the preset deadline, the video push task will be written into the pending push queue, and the push will be executed again based on the terminal's online status and the personnel's job priority.
[0015] In the preferred scheme, the updated accident case matching parameters in S5 include: The video completion rate and the accuracy rate of answering safety knowledge questions were grouped and normalized according to the type of work, the work scenario, and the job position of the workers to obtain the normalized completion rate. and normalized answer accuracy ; according to Calculate the first The educational feedback benefit of each accident case ,in, The revenue weight corresponding to the completion rate of viewing; Average educational feedback benefit based on the same job type, job scenario, and job position of the operator ,according to Update # Case weight of each accident case ; in, For the updated case weights, The case weights before the update For learning rate, The confidence coefficient is the sample confidence coefficient. An index for job groups determined by job type, job scenario, and job position of the personnel; Calculate the sample confidence coefficient based on the sample size and the variance of the educational feedback benefit values. and in the sample confidence coefficient Update job-related parameters and key risk thresholds when the preset threshold is reached. .
[0016] In the preferred solution, the actual deployment includes: PostgreSQL is used to store job ticket information, accident case metadata, video push records and effect feedback data; Milvus is used to store the vector indexes corresponding to the job risk query graph and the accident risk chain graph; and MinIO is used to store accident scene image data, accident video material data, accident reconstruction scene video and narration audio. Docker is used to encapsulate the job plan parsing service, case matching service, script copy generation service, video generation service, audio generation service, media compositing service, and feedback optimization service respectively. Kubernetes is used to deploy the images of each service to CPU processing nodes and GPU inference nodes. RabbitMQ is used to transmit job plan change events, case matching tasks, video generation tasks, video push tasks, and effect feedback tasks. FastAPI is used to provide access interfaces for job tickets, video acquisition interfaces, and effect feedback submission interfaces. Nginx is used to forward interface requests and distribute load. The inference process of the job plan parsing model, vector embedding model, case matching model, text-to-speech model and effect feedback optimization model is executed using ONNX Runtime or TensorRT. The text-to-video generation task is scheduled to the GPU inference node, the generated personalized safety warning education video is written to MinIO, and the video is pushed through the terminal device access interface.
[0017] This invention provides a method for generating safety videos for waterworks operation plans. This application automatically parses the operation type, operation scenario keywords, and operator job information in the operation plan, and combines them with accident risk chain diagrams and operation risk query diagrams for case matching, so that warning education content can be automatically generated as the operation plan changes, thereby improving the correspondence between safety education content and current construction tasks.
[0018] This application uses a fact-anchoring matrix of job position, risk, and handling to constrain script document generation, and uses accident fact coverage, job prevention measure coverage, and risk contradiction rate to filter script documents, so that the generated content can revolve around the accident process, risk causes, job protection requirements, and prevention measures, thereby improving the factual consistency and job relevance of the script documents.
[0019] This application generates accident reconstruction scene videos by using continuous state vectors of the camera and camera transition constraint information, and completes the synchronous processing of video, audio and subtitle warning information based on the timestamp of the narration audio, so that the video can express the operation scene, risk status and protection requirements more coherently.
[0020] This application determines the timing of video push based on the start time of the task, and regenerates the video when the task type, task scenario keywords, or task personnel job information change; at the same time, it updates the case weight, job-related parameters, and risk chain gating parameters based on the completion rate and the correctness of safety knowledge quizzes, forming a closed loop of safety education content generation, push, feedback, and optimization. Attached Figure Description
[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a flowchart illustrating the overall process of generating safety videos for waterworks operation plans according to the present invention. Figure 2 This is a flowchart of the operation plan analysis and operation risk query diagram construction process of the present invention; Figure 3 This is a flowchart of the accident case matching and target case screening process of the present invention; Figure 4 This is a flowchart of the script text generation and video synthesis process of this invention; Figure 5 This is a flowchart of the video push effect feedback and system deployment process of the present invention. Detailed Implementation
[0022] Example 1 like Figure 1-5 As shown, a method for generating a safety video for waterworks operations includes the following steps: S1, obtain the current work plan information, parse the current work plan information to obtain the work type, work scenario keywords and work personnel job information; S2, based on the type of work, keywords of the work scenario, and job information of the workers, matches target accident cases from the municipal waterworks construction accident case database; S3, generate warning education scripts based on target accident cases and operator job information; S4. Based on the warning education script, generate accident reconstruction scene video and narration audio, and synchronously synthesize the accident reconstruction scene video, narration audio and subtitle warning information to obtain personalized safety warning education video; S5 sends personalized safety warning education videos to terminal devices associated with the current work plan, collects video viewing completion rate and safety knowledge quiz accuracy rate, and updates accident case matching parameters based on the video viewing completion rate and safety knowledge quiz accuracy rate.
[0023] In the preferred scheme, the municipal waterworks construction accident case database includes accident case text data, accident site image data, and accident video material data; for each accident case, an accident feature tuple is established, including operation type tags, operation scenario tags, job position tags, causative factor tags, accident consequence tags, and preventive measure tags; tags with causal relationships are connected to form an accident risk chain diagram, which includes operation object nodes, causative factor nodes, risk event nodes, accident consequence nodes, and preventive measure nodes in sequence.
[0024] 3. The method for generating safety videos for waterworks operation plans according to claim 2, characterized in that: S1 includes: The field names and values in the work ticket text or shift schedule text are used to form a field anchor sequence. The field anchor sequence and the work plan text sequence are then input into a dual-channel semantic extraction network anchored to the ticket fields. Generate field constraint masks according to the semantic categories corresponding to the field names, and use the field constraint masks to limit the cross-attention range between the field anchor sequence and the job plan text sequence; The fused features output by cross-attention are input into the entity boundary labeling layer to obtain the job type, job scenario keywords, job personnel job information, job location, and job time. Based on the job type, job scenario keywords, and job information of the workers, a job risk query map is constructed. The job risk query map includes job object nodes, job node, risk source node, and prevention and control requirement node.
[0025] In the preferred scheme, S2 employs a confidence-adaptive risk chain gating matching algorithm, including: Regarding the first Calculate the semantic similarity of job types for each accident case. Semantic similarity of work scenarios Job relevance Consistency with risk chain topology ; Based on the confidence levels extracted from fields such as job type, job scenario keywords, operator job information, and risk source information, the weight of job type is determined. Job scenario weighting Job weight and risk chain weight ,in, ; according to Calculate the first The overall matching value of each accident case ; in, For the first The key risk threshold coefficient corresponding to each accident case, when the operation risk query chart is related to the first... When the accident risk chain diagram corresponding to a single accident case shows inconsistencies in key nodes regarding the work object, causative factors, or accident consequences, the risk level is reduced. ; According to the overall matching value The accident cases are sorted to obtain a set of candidate accident cases.
[0026] In the preferred embodiment, S2 further includes: The work objects, harmful factors and accident consequences in the accident risk chain diagram are combined into risk path segments, and path identifiers and path vector indexes are established for the risk path segments. High-risk path segments are extracted from the operation risk query map, and initial candidate accident cases are recalled from the path vector index based on path similarity. Regarding the first Each accident case, according to Calculate the differential risk coverage value ; in, This is the redundancy suppression coefficient. This is a collection of selected accident cases. For the first The first accident case and the first Risk path vector similarity between individual accident cases; Based on differentiated risk coverage values Select target accident cases in sequence, ensuring that each target accident case differs from the others in at least one of the causative factors, accident consequences, or preventive measures.
[0027] In the preferred embodiment, S3 includes: The job type, job scenario keywords, job information of the workers, accident details, causative factors, accident consequences and preventive measures are combined into a job-risk-handling fact anchoring matrix. Based on the job-risk-handling fact anchoring matrix, structured constraint prompts are generated. The structured constraint prompts include the accident process, cause analysis, lessons learned, and preventive measures. Multiple candidate warning education scripts are generated based on structured constraint prompts using a large language model; Regarding the first Calculate the coverage rate of accident facts for each candidate warning education script. Coverage rate of preventive measures in the workplace and risk contradiction rate and in accordance with Receive script consistency score ; Select script consistency score Highest risk and contradiction rate Candidate warning education scripts that fall below a preset threshold will be considered as warning education scripts. , and For scoring weights.
[0028] In the preferred embodiment, S4 includes: The warning education script is divided into multiple shot description units, each of which includes the work location, work equipment, worker position, work actions, protective status, risk source and accident status. For each shot description unit, a continuous shot state vector is constructed. The continuous shot state vector is used to represent the work location, equipment status, personnel protection status, and risk source status. Based on the continuous state vector of the previous shot description unit and the current shot description unit, generate shot transition constraint information; A text-to-video generation model is used to generate multiple video clips based on shot description units and shot transition constraints. Compare the state of the last frame of adjacent shot video segments with the state of the first frame. When the state difference exceeds a preset threshold, regenerate the corresponding shot video segment. The text-to-speech synthesis model is used to generate narration audio, and the video clips, subtitle warning information and narration audio are synthesized synchronously based on the phoneme timestamps and shot transition times in the narration audio.
[0029] In the preferred embodiment, S5 includes: The video push trigger time is determined based on the start time of the task, the duration of the personalized safety warning education video, and the historical average viewing time. according to Calculate video push trigger time ; in, The start time of the assignment. To personalize the length of safety awareness education videos, This is the historical average viewing time. This is a safety buffer period; When the job type, job scenario keywords, or job position information of the operator in the work plan changes, the personalized safety warning education video associated with the work plan before the change is discarded, and S2 to S4 are re-executed. If the terminal device does not return a viewing completion message before the preset deadline, the video push task will be written into the pending push queue, and the push will be executed again based on the terminal's online status and the personnel's job priority.
[0030] In the preferred scheme, the updated accident case matching parameters in S5 include: The video completion rate and the accuracy rate of answering safety knowledge questions were grouped and normalized according to the type of work, the work scenario, and the job position of the workers to obtain the normalized completion rate. and normalized answer accuracy ; according to Calculate the first The educational feedback benefit of each accident case ,in, The revenue weight corresponding to the completion rate of viewing; Average educational feedback benefit based on the same job type, job scenario, and job position of the operator ,according to Update # Case weight of each accident case ; in, For the updated case weights, The case weights before the update For learning rate, The confidence coefficient is the sample confidence coefficient. An index for job groups determined by job type, job scenario, and job position of the personnel; Calculate the sample confidence coefficient based on the sample size and the variance of the educational feedback benefit values. and in the sample confidence coefficient Update job-related parameters and key risk thresholds when the preset threshold is reached. .
[0031] In the preferred solution, the actual deployment includes: PostgreSQL is used to store job ticket information, accident case metadata, video push records and effect feedback data; Milvus is used to store the vector indexes corresponding to the job risk query graph and the accident risk chain graph; and MinIO is used to store accident scene image data, accident video material data, accident reconstruction scene video and narration audio. Docker is used to encapsulate the job plan parsing service, case matching service, script copy generation service, video generation service, audio generation service, media compositing service, and feedback optimization service respectively. Kubernetes is used to deploy the images of each service to CPU processing nodes and GPU inference nodes. RabbitMQ is used to transmit job plan change events, case matching tasks, video generation tasks, video push tasks, and effect feedback tasks. FastAPI is used to provide access interfaces for job tickets, video acquisition interfaces, and effect feedback submission interfaces. Nginx is used to forward interface requests and distribute load. The inference process of the job plan parsing model, vector embedding model, case matching model, text-to-speech model and effect feedback optimization model is executed using ONNX Runtime or TensorRT. The text-to-video generation task is scheduled to the GPU inference node, the generated personalized safety warning education video is written to MinIO, and the video is pushed through the terminal device access interface.
[0032] Example 2 Further explanation in conjunction with Example 1, such as Figure 1-5 As shown, the method for generating safety videos for waterworks operation plans uses the current operation plan information at the municipal waterworks construction site as the triggering basis.
[0033] Current work plan information can be sent to the work plan parsing service from the work ticketing system, scheduling system, or construction management platform. Work plan information must include at least the work name, work content, work location, work time, participating personnel, work supervisor, and risk warning information. After receiving the work plan information, the system performs unified conversion on data fields from different sources, grouping work items with similar meanings into a unified work type, extracting text content reflecting the site environment, equipment objects, spatial location, and hazardous conditions as work scenario keywords, and extracting worker responsibility information as worker position information. The work type, work scenario keywords, and worker position information together constitute the core work characteristic data corresponding to the current work.
[0034] In S2, the system matches target accident cases from the municipal waterworks construction accident case database based on core operational characteristic data. The accident case database reflects typical risks in operations such as confined space work, sewage pipe dredging, pump station maintenance, pipeline inspection, temporary power supply, mechanical excavation, and high-altitude maintenance. The case matching process considers not only the type and scenario of the operation but also the correlation between the operator's position and the positions of the personnel involved, protective personnel, and monitoring personnel in the accident case. This ensures that the matching results highlight the hazardous factors and preventative measures that personnel in their current positions should be aware of during the operation.
[0035] In S3, the system uses the accident process, causative factors, consequences, and preventative measures from a target accident case as a factual basis, and combines this with the current job information of the workers to generate a warning and educational script. The script explains to workers the potential risk formation process, incorrect work behaviors, lack of protection, and correct handling requirements for the current work. When generating the script, the system retains the core risk facts from the accident case and incorporates the protective requirements corresponding to the current job position, ensuring that the warning content received by personnel in different positions is differentiated.
[0036] In S4, the system converts the warning education script into accident reconstruction video, narrated audio, and subtitled warning messages. The accident reconstruction video demonstrates the changes in the work location, equipment, personnel, protective equipment, hazard sources, and accident status. The narrated audio provides a voice explanation of the accident's course, the causes of the risk, and preventative measures. The subtitled warning messages reinforce key risk points and operational requirements that require special attention during the operation. The system synchronizes the accident reconstruction video, narrated audio, and subtitled warning messages according to a unified timeline, ensuring consistency in timing between the video footage, narration, and subtitles.
[0037] In S5, the system sends generated personalized safety awareness videos to terminal devices associated with the current work plan and collects data on video completion rate and safety knowledge quiz accuracy rate. The video completion rate reflects the workers' viewing of the safety education videos, while the safety knowledge quiz accuracy rate reflects their understanding of accident risks, preventative measures, and job requirements. The system correlates the feedback results with work type, work scenario, worker position, and target accident case to update case weights, job-related parameters, and key risk gating coefficients in subsequent case matching processes, forming a closed-loop processing flow of work plan analysis, accident case matching, video generation, video delivery, effect feedback, and parameter optimization.
[0038] The municipal waterworks construction accident case database includes accident case text data, accident scene image data, and accident video footage data. Accident case text data records the time, location, work tasks, participating positions, accident process, causative factors, consequences, emergency response process, and preventative measures. Accident scene image data displays the work area, equipment status, protective equipment status, hazard source status, and work environment status. Accident video footage data records the work process, risk emergence process, accident formation process, and correct protective measures. All data types are linked through accident case identifiers, enabling accident cases to provide both textual factual evidence and video footage evidence.
[0039] Each accident case establishes an accident characteristic tuple. The accident characteristic tuple includes operation type tags, operation scenario tags, job position tags, hazard factor tags, accident consequence tags, and preventative measure tags. The operation type tag distinguishes between confined space operations, dredging operations, pump station maintenance operations, temporary power supply operations, and mechanical excavation operations. The operation scenario tag characterizes environments such as pump stations, sewage pipelines, inspection wells, valve wells, foundation pits, equipment rooms, and construction roads. The job position tag characterizes dredging personnel, electricians, machinery operators, safety supervisors, maintenance personnel, and site management personnel. The hazard factor tag characterizes hazardous conditions such as toxic and harmful gases, oxygen deficiency, electrical leakage, mechanical crushing, equipment failure, collapse, falls, and violations of operating procedures. The accident consequence tag characterizes results such as personal injury, equipment damage, environmental pollution, and work interruption. The preventative measure tag characterizes measures such as detection, ventilation, isolation, power outage, monitoring, protection, inspection, and emergency rescue.
[0040] The system connects causally related tags into an accident risk chain diagram. The accident risk chain diagram sequentially includes nodes for the work object, causative factors, risk events, accident consequences, and preventative measures. The work object node represents the personnel, equipment, pipelines, wells, pumping stations, or construction areas involved in the work. The causative factor node represents the hazardous conditions that may induce an accident. The risk event node represents poisoning, asphyxiation, electric shock, mechanical injury, collapse, falls from height, or other accident events. The accident consequence node represents the actual impact of the accident. The preventative measures node represents the measures taken to prevent accidents, mitigate their consequences, or control the spread of risks. The node connections in the accident risk chain diagram reflect the propagation path of risk from the work object and causative factors to the accident consequences, and are used for subsequent case matching and risk path screening.
[0041] The field anchor sequence consists of field names and values from the work ticket text or schedule text. Field names can include the work name, work location, work time, personnel, work supervisor, work content, and risk warnings. Field values record the specific information corresponding to the field name. The system writes the field names and values into the field anchor sequence according to their order in the original work plan, giving the field anchor sequence a clear semantic positioning function.
[0042] The system simultaneously constructs a sequence of work plan texts. This sequence retains natural language descriptions from work ticket texts or shift schedules, enabling work content, equipment names, risk descriptions, on-site requirements, and ad-hoc arrangements to participate in semantic analysis. The field anchor sequence and the work plan text sequence are input into a dual-channel semantic extraction network anchored to the ticket fields. This dual-channel semantic extraction network includes a field anchor processing channel and a work text processing channel. The field anchor processing channel identifies the correspondence between field names and field values, while the work text processing channel identifies work entities, scenario entities, job entities, and risk entities in the natural language descriptions.
[0043] The system generates field constraint masks based on the semantic categories corresponding to the field names. These masks limit the cross-attention range between the field anchor sequence and the work plan text sequence, prioritizing the location field to the location entity, the personnel field to the job position entity, the work type field to the work category entity, and the risk warning field to the risk source entity. By using field constraint masks, semantic interference between different fields can be reduced, improving the accuracy of the work plan parsing results.
[0044] After the fusion features from the cross-attention output are input into the entity boundary annotation layer, the entity boundary annotation layer determines the start and end positions of the job type, job scenario keywords, operator job information, job location, and job time in the job plan text. The system constructs a job risk query graph based on the job type, job scenario keywords, and operator job information. The job risk query graph includes job object nodes, job node, risk source node, and prevention and control requirement node. The job object node represents the equipment, pipelines, wells, pump stations, or construction areas that need to be addressed. The job node represents the responsibilities of the personnel currently performing the work. The risk source node represents the potentially hazardous conditions in the current work environment. The prevention and control requirement node represents the detection, ventilation, isolation, monitoring, protection, and emergency response requirements that the current operation must meet.
[0045] The confidence-adaptive risk chain gating matching algorithm is used to calculate the current job plan and the first... The degree of overall matching between the accident cases. In the accident cases This serves as an index for accident cases, used to distinguish different accident cases within the accident case database. The system targets the first... Calculate the semantic similarity of job types for each accident case. Semantic similarity of work scenarios Job relevance Consistency with risk chain topology .
[0046] Semantic similarity of assignment types Used to indicate the type of task in the current work plan and the number The semantic similarity between the current task type and the task type corresponding to each accident case. The higher the semantic similarity of the work scenarios. Used to indicate the keywords of the current work scenario and the first The semantic similarity between the accident cases and the corresponding work scenarios. The closer the current work location, spatial state, equipment objects, and work environment are to the accident cases, the better. The higher the relevance, the better. Used to indicate the current worker's position and the... The degree of correlation between the positions involved, the monitoring positions, and the protective positions in each accident case. The closer the current position is to the risk-bearing position in the accident case, the better. The higher the risk chain topological consistency. Used to represent the job risk query chart and the first The consistency of node connections between accident risk chain diagrams corresponding to each accident case. The closer the correlation paths between the work object, risk source, risk event, and preventative measures, the better. The higher.
[0047] The system extracts confidence scores based on fields such as job type, job scenario keywords, operator job information, and risk source information to determine the job type weight. Job scenario weighting Job weight and risk chain weight Job type weighting Used to characterize the degree of influence of job type on the overall matching result. Job scenario weight. Used to characterize the degree of influence of the job scenario on the overall matching result. Job weight Used to characterize the degree of influence of job information on the overall matching result. Risk chain weight This is used to characterize the degree of influence of the consistency of the risk chain structure on the overall matching result. Each weight satisfies... This ensures that different matching dimensions have a stable proportional relationship in the comprehensive evaluation.
[0048] No. The overall matching value of each accident case is based on Calculation. Among them, Indicates the first The overall matching value between the accident case and the current work plan. Indicates the first Key risk gating coefficients corresponding to each accident case. This is used to identify whether there are significant conflicts between key nodes such as the work object, the hazard factor, and the accident consequences. When the work risk query diagram and the accident risk chain diagram are consistent at the key nodes... Maintain a high level. When inconsistencies arise between the two at critical junctures, reduce... This lowers the priority of accident cases that are not applicable to the current operation in the comprehensive matching ranking. The system ranks them according to the comprehensive matching value. The accident cases are sorted to obtain a set of candidate accident cases.
[0049] A risk path segment consists of the work object, the hazard, and the accident consequence in the accident risk chain diagram. A risk path segment describes the path of accident risk, starting from the work object, propagating through the hazard, and ultimately leading to the accident consequence. The system establishes a path identifier and a path vector index for each risk path segment. The path identifier distinguishes risk paths in different accident cases, and the path vector index represents the feature location of the risk path segment in semantic space.
[0050] The system extracts high-risk path segments from the job risk query graph and recalls initial candidate accident cases from the path vector index based on path similarity. The initial candidate accident cases include those highly correlated with the current job type, job scenario, personnel position, and risk source. The system first selects a comprehensive matching value. More frequent accident cases are added to the selected accident case set. Selected accident case collection Used to save accident cases that have been identified as target accident cases.
[0051] Regarding the first Each accident case, the system according to Calculate the differential risk coverage value .in, Indicates the first Each accident case, while maintaining the current operational matching level, is used to refine the selected accident case set. Risk replenishment capabilities. Indicates the first The overall matching value of each accident case. This represents the redundancy suppression coefficient, which is used to control the degree of suppression of repeated inclusion of similar accident cases. This indicates the set of selected accident cases. The accident case index. Indicates the first The first accident case and the first Risk path vector similarity between accident cases. Indicates the first Individual accident cases and a collection of selected accident cases The maximum risk path vector similarity between the most similar accident cases.
[0052] When the When the risk path similarity between an accident case and a selected accident case is high Increase, make The decrease indicates that the first There is a high degree of redundancy between the selected accident cases and the first selected accident cases. When individual accident cases can cover different causative factors, different accident consequences, or different preventive measures. Relatively low, making Maintain a high level. The system is based on differentiated risk coverage values. Target accident cases are selected sequentially so that the final target accident cases entering the video generation process can cover the main risks in the current operation from different angles.
[0053] The Job-Risk-Response Fact Anchoring Matrix consists of job type, job scenario keywords, operator job information, accident details, causative factors, accident consequences, and preventative measures. Job information defines the responsibilities of the operators the video targets. Risk information defines the hazardous factors that need to be highlighted in the video. Response information defines the preventative measures and emergency requirements that should be presented in the video. Accident fact information defines the accident details and consequences that the script must adhere to. This Job-Risk-Response Fact Anchoring Matrix ensures that the script generation process has clear factual and job boundaries.
[0054] The system generates structured constraint prompts based on a job-risk-handling fact-anchoring matrix. These prompts include the accident description, cause analysis, lessons learned, and preventative measures. The accident description explains how the risk event occurred. The cause analysis explains the relationship between the causative factors, violations, and lack of protection. The lessons learned explain the impact of the accident. Preventative measures describe the detection, ventilation, monitoring, protection, isolation, and emergency response requirements that the current job position should implement during the current operation. The system uses a large language model to generate multiple candidate warning and educational scripts based on these structured constraint prompts.
[0055] Regarding the first A list of candidate cautionary education scripts, and a system calculation of the accident fact coverage rate. Coverage rate of preventive measures in the workplace and risk contradiction rate .in, This section indicates an index of candidate cautionary education scripts. Accident fact coverage rate. Used to indicate the first The extent to which each candidate warning education script covers key facts such as the accident's course, causative factors, consequences, and preventative measures. Coverage rate of job-specific preventative measures. Used to indicate the first The extent to which the candidate warning education scripts cover the corresponding preventative measures for the current position. Risk and conflict rate. Used to indicate the first The proportion of information in each candidate warning education script that conflicts with the facts of the accident case, job responsibilities, or protection requirements.
[0056] Script consistency scoring according to Calculation. Among them, Indicates the first The consistency score of each candidate warning education script. Indicates the coverage rate of accident facts The corresponding scoring weights. Indicates the coverage rate of preventive measures for the job position. The corresponding scoring weights. Indicates the risk-conflict rate The corresponding deduction weight. The system selects script consistency score. High risk and conflict rate Candidate warning education scripts that are below a preset threshold will be used as the final warning education scripts. This ensures that the scripts reflect the actual risk formation process in the accident case and highlight the preventive measures that current personnel should implement.
[0057] The warning education script in section 7 is divided into multiple scene description units. Each scene description unit includes the work location, work equipment, worker positions, work actions, protective status, risk source, and accident status. The work location is used to define the pumping station, sewage pipeline, inspection well, valve well, foundation pit, equipment room, or construction area shown in the scene. The work equipment is used to define the pumps, ventilation equipment, testing equipment, electrical equipment, hoisting equipment, and dredging equipment in the scene. The worker positions are used to define the responsibilities of the personnel in the scene. The work actions are used to define the actions performed by personnel, such as testing, ventilation, power outage, dredging, maintenance, monitoring, evacuation, or emergency rescue. The protective status is used to define the usage status of protective equipment, ventilation equipment, testing equipment, and isolation facilities. The risk source is used to define dangerous conditions such as toxic and harmful gases, oxygen deficiency, electrical leakage, equipment failure, mechanical injury, and collapse. The accident status is used to define the state after the risk is formed, the accident occurs, and the risk is eliminated.
[0058] The system constructs a continuous state vector for each shot description unit. This vector records the current work location status, equipment status, personnel protective equipment status, and risk source status within the shot. Based on the continuous state vector of the previous shot description unit and the current shot description unit, the system generates shot transition constraint information. This constraint information limits the direction of changes in equipment position, personnel movement, protective equipment, and risk sources between adjacent shots, preventing sudden changes in work location, discontinuous equipment status, missing personnel protective equipment, or contradictory risk source states between shots.
[0059] The text-to-video generation model generates multiple video clips based on shot description units and shot transition constraints. The system compares the last frame state and the first frame state of adjacent video clips. When the difference between the work location, equipment status, personnel protection status, or risk source status exceeds a preset threshold, the system regenerates the corresponding video clip until adjacent video clips meet the shot continuity requirements. The text-to-speech synthesis model generates narration audio and outputs phoneme timestamps. Phoneme timestamps are used to determine the start and end times of each narration segment in the narration audio. The system synchronously synthesizes the video clips, subtitle warning information, and narration audio based on the phoneme timestamps and shot transition timestamps.
[0060] The video push trigger time is determined based on the start time of the task, the duration of the personalized safety warning education video, and the historical average viewing time. The video push trigger time is determined according to... Calculation. Among them, This indicates the time when the video push is triggered. This indicates the start time of the task corresponding to the current task plan. This indicates the duration of the personalized safety awareness and educational video. This indicates the historical average viewing time corresponding to the current job type, job scenario, and job position of the operator. This indicates the safety buffer time.
[0061] Used to select the duration of personalized safety awareness education videos and historical average viewing time The larger value in the range causes the video to be pushed earlier than the job start time. Safety buffer time This allows time for terminal network transmission, video loading, personnel viewing, and question submission. Through the above calculation method, the system can push safety warning and educational videos that match the current work plan to the operators before the work begins.
[0062] When the job type, job scenario keywords, or operator job information in the work plan changes, the system determines that the original personalized safety warning education video is no longer fully applicable to the changed job task. The system discards the personalized safety warning education video associated with the previous work plan and re-executes S2 to S4 to ensure that the new target accident case, warning education script, and personalized safety warning education video are consistent with the updated work plan. The discarded video can be retained in the history for subsequent training traceability and feedback analysis, but it will no longer be pushed as content in the changed work plan.
[0063] If the terminal device does not return a viewing completion message before the preset deadline, the system adds the video push task to the pending push queue. The pending push queue records the terminal device identifier, operator identifier, work plan identifier, video identifier, push status, and push count. The system performs a second push based on the terminal's online status and the personnel's job priority. Personnel directly responsible for on-site operation, confined space entry, on-site monitoring, or temporary power supply operations have higher push priority, ensuring that relevant personnel receive safety warning education videos before the work begins.
[0064] The video completion rate and the accuracy rate of answering safety knowledge questions were grouped and normalized according to job type, job scenario, and job position to obtain the normalized completion rate. and normalized answer accuracy .in, Indicates the first Normalized completion rate of video viewing for each accident case within the same task group. Indicates the first The normalized answer accuracy rate for each accident case video within the same task group. Normalization is used to reduce the impact of different task times, number of employees in different positions, different terminal conditions, and different video lengths on the original feedback data.
[0065] The system follows Calculate the first The educational feedback benefit of each accident case .in, Indicates the first The educational feedback benefit value of each accident case in the current task group. Indicates normalized view completion rate The corresponding profit weight. This represents the normalized answer accuracy rate. The corresponding revenue weight. When security management focuses on improving video completion rates, the weight is increased. The value of . When safety management focuses on improving workers' understanding of safety knowledge and preventive measures, reducing . The value of is used to normalize the answer accuracy rate. In educational feedback benefit value It has a greater influence in China.
[0066] The system calculates the average educational feedback benefit based on the same job type, job scenario, and employee position. Update # Case weight of each accident case The case weight update relationship is as follows: .in, Indicates the first The updated case weights for each accident case. Indicates the first The case weights of each accident case before the update. This represents the learning rate, which is used to limit the impact of a single feedback on the magnitude of the case weight adjustment. The sample confidence coefficient represents the confidence level of the first sample. The reliability of the feedback data corresponding to each accident case. Indicates the first The average educational feedback benefit of each assignment group. This represents a task grouping index determined by the task type, task scenario, and task personnel position.
[0067] when Higher than At that time, the updated case weights Improvement indicates the first Videos generated from individual accident cases generally have good viewing and knowledge delivery effects within the same task group. When Below At that time, the updated case weights The confidence coefficient decreases when the sample size is large and the dispersion of educational feedback benefits is small. Improvement. When the sample size is small or the educational feedback benefits are highly dispersed, the sample confidence coefficient is improved. Decrease. Sample confidence coefficient Once the preset threshold is reached, the system updates the job-related parameters and key risk gating coefficients. This will increase the relevance of subsequent job positions. and comprehensive matching value It can be adjusted based on real training feedback.
[0068] PostgreSQL is used to store structured data with clearly defined relationships. It stores job ticket information, accident case metadata, video push records, and feedback data. Job ticket information includes job plan identifier, job type, job location, job time, operator position information, and job plan version information. Accident case metadata includes accident case identifier, accident type tag, job scenario tag, position tag, hazard factor tag, accident consequence tag, and preventative measure tag. Video push records include video identifier, terminal device identifier, push time, viewing status, re-push status, and viewing completion time. Feedback data includes quiz results, quiz accuracy rate, case weight update records, and position-related parameter update records.
[0069] Milvus stores the vector indexes corresponding to the job risk query graph and the accident risk chain graph. The job risk query graph vector represents the job object, position, risk source, and prevention and control requirements in the current job plan. The accident risk chain graph vector represents the job object, causative factors, risk events, accident consequences, and preventive measures in historical accident cases. Milvus recalls candidate accident cases based on vector similarity, resulting in a comprehensive matching value. Calculation and Differentiated Risk Coverage Value The computation provides candidate data. MinIO is used to store accident scene image data, accident video footage, accident reconstruction video, and narration audio, enabling the association of multimedia files with accident case metadata and video push records in PostgreSQL.
[0070] Docker is used to encapsulate the job plan parsing service, case matching service, script generation service, video generation service, audio generation service, media compositing service, and feedback optimization service. The job plan parsing service is used to construct field anchor sequence, generate field constraint masks, and annotate entity boundaries. The case matching service is used to construct a job risk query graph, retrieve accident risk chain graphs, and calculate comprehensive matching values. and differentiated risk coverage value The script generation service is used to generate candidate warning and educational scripts and calculate script consistency scores. The video generation service generates accident scene reconstruction videos based on shot description units and shot transition constraints. The audio generation service generates narration audio and phoneme timestamps. The media compositing service synchronizes video, audio, and subtitle warning information. The feedback optimization service optimizes the video based on educational feedback benefits. Update case weights Job-related parameters and key risk threshold coefficients .
[0071] Kubernetes deploys service images across CPU processing nodes and GPU inference nodes. CPU processing nodes execute tasks such as job plan parsing, vector retrieval, case matching, database access, message processing, and video push. GPU inference nodes execute tasks such as large language model inference, text-to-video generation, text-to-speech synthesis, and video quality verification. Kubernetes schedules service instances based on task type and computing resource usage, prioritizing text-to-video generation tasks for GPU inference nodes and job plan parsing and case matching tasks for CPU processing nodes.
[0072] RabbitMQ is used to transmit job plan change events, case matching tasks, video generation tasks, video push tasks, and feedback tasks. When a job plan changes, the job plan parsing service publishes a job plan change event. The case matching service receives the job plan change event and regenerates the target incident case. The script copy generation service, video generation service, and media compositing service sequentially receive the task message and complete the generation of personalized safety awareness education videos. The video push service sends the video push task to the terminal device. The feedback optimization service receives the viewing completion information and quiz results returned by the terminal device and updates the case weight $\theta_i$, job-related parameters, and key risk gating coefficient $\phi_i$.
[0073] FastAPI provides interfaces for job ticket access, video retrieval, and feedback submission. The job ticket access interface receives job plan information from the job ticketing system and scheduling system. The video retrieval interface provides the terminal device with the video playback address, subtitle file, and answer content. The feedback submission interface receives viewing completion information, answer results, and terminal status information uploaded by the terminal device. Nginx forwards and distributes interface requests, enabling multiple service instances to jointly handle job plan access, video access, and feedback submission requests.
[0074] ONNX Runtime or TensorRT is used to execute the inference process of the job plan parsing model, vector embedding model, case matching model, text-to-speech model, and effect feedback optimization model. After the text-to-video generation task is scheduled to the GPU inference node, the generated personalized safety warning education video is written to MinIO. The video push service obtains the video access address from MinIO and completes the video push through the terminal device access interface, enabling operators to receive safety warning education videos that match the current job plan and job risks before the start of the job.
[0075] Example 3 Further explanation is provided in conjunction with Examples 1-2, such as Figure 1-5As shown, this embodiment is applied to a municipal water pumping station sump cleaning operation scenario. Before the operation begins, the construction management platform receives the work permit information. The work permit specifies the operation name as sump cleaning, the operation type as confined space operation, the operation location as the pumping station sump, and the personnel as sump cleaning personnel, safety supervisors, and on-site supervisors. The operation content includes turning on ventilation equipment, conducting gas detection, carrying out sump cleaning, and site restoration after the operation. The system uses this work permit information as the trigger condition for generating a personalized safety warning education video.
[0076] like Figure 1 As shown, the system first executes S1, receiving and parsing the current work plan information to obtain the work type, work scenario keywords, and personnel job information. Work scenario keywords include water collection wells, confined spaces, sewage accumulation, toxic and harmful gases, ventilation equipment, gas detection, and well dredging. Personnel job information includes dredging personnel, safety supervisors, and on-site supervisors. The system writes the parsing results to PostgreSQL and generates a unique work plan identifier for the current work plan, which can then be linked to accident cases, scripts, video files, push notifications, and training feedback data.
[0077] like Figure 2 As shown, the work plan parsing service constructs a field anchor sequence from the field names and values in the work ticket text, and constructs a work plan text sequence from the natural language description in the work ticket. The field anchor sequence includes fields such as work type, work location, work time, workers, work content, and risk warnings. Both the field anchor sequence and the work plan text sequence are fed into a dual-channel semantic extraction network anchored to the ticket fields. The system generates field constraint masks based on the semantic categories of the field names, prioritizing the association of the work location field with entities such as water collection wells and pumping stations, prioritizing the association of the workers field with entities such as dredging personnel and safety supervisors, and prioritizing the association of the risk warning field with entities such as toxic and harmful gases, oxygen deficiency, and sewage siltation.
[0078] The entity boundary annotation layer annotates the fusion features, extracts confined space operations as the operation type, extracts pump station sump wells, sewage siltation, and underground dredging as operation scenario keywords, and extracts dredging personnel, safety supervisors, and on-site supervisors as operator job information. Based on this, the system constructs an operation risk query map. The operation risk query map includes operation object nodes corresponding to sump wells and ventilation equipment, job node nodes corresponding to dredging personnel and safety supervisors, risk source nodes corresponding to toxic and harmful gases, oxygen deficiency, and insufficient ventilation, and prevention and control requirement nodes corresponding to pre-operation inspection, continuous ventilation, external monitoring, wearing protective equipment, and emergency rescue preparation.
[0079] like Figure 3As shown, the case matching service retrieves accident cases similar to the current operation risk query map from the municipal waterworks construction accident case database. The accident case database pre-stores cases such as confined space poisoning and asphyxiation accidents, sewage pipeline dredging accidents, pump station maintenance accidents, and pipeline inspection accidents. Each accident case has an established accident feature tuple, and an accident risk chain diagram is constructed based on the operation object, causative factors, risk events, accident consequences, and preventative measures. Accident case text data, accident scene image data, and accident video footage data are associated using accident case identifiers.
[0080] Regarding the first In one accident case, the system calculates the semantic similarity of the job type. Semantic similarity of work scenarios Job relevance Consistency with risk chain topology .in, Indicates the current finite space operation and the first The degree of similarity between the types of operations in each accident case This indicates information related to scenarios such as water collection wells, sewage accumulation, and underground dredging. The degree of similarity between the work scenarios of each accident case This indicates that the current dredging personnel and safety monitoring personnel are in contact with the first... The degree of correlation between the positions involved in the accidents and the supervisory positions. The operation risk query chart and the first The consistency of node connections between the accident risk chain diagrams corresponding to each accident case.
[0081] The system extracts confidence scores based on fields such as job type, job scenario keywords, operator job information, and risk source information to determine the job type weight. Job scenario weighting Job weight and risk chain weight Each weight satisfies .in, Used to reflect the degree of influence of job type on accident case matching. Used to reflect the degree of influence of the work scenario on the matching of accident cases. Used to reflect the degree to which job information affects the matching of accident cases. This is used to reflect the degree to which the risk chain structure affects the matching of accident cases.
[0082] No. The overall matching value of each accident case is based on Calculation. Among them, Indicates the first The overall matching value between individual accident cases and the current work plan Indicates the first The key risk gating coefficient for each accident case. When the... When the work object, causative factors, and accident consequences in an accident case match the corresponding node in the current work risk query map. Maintain a high level of vigilance. When there are significant differences between accident cases and current operations at key risk points, reduce [the risk level]. This is to reduce the overall matching value of mismatched accident cases.
[0083] The system selects accident cases with high comprehensive matching values as candidate accident cases and further performs differentiated screening based on risk path segments. A risk path segment consists of the work object, the causative factor, and the accident consequences. In this embodiment, the system prioritizes recalling accident cases related to water collection well operations, accumulation of toxic and harmful gases, oxygen-deficient environments, personnel entering the well, and poisoning / asphyxiation consequences. Regarding the first... Each accident case, the system according to Calculate the differential risk coverage value .in, Represents the redundancy suppression coefficient. This indicates the set of selected accident cases. Indicates the first The first accident case and the first Risk path vector similarity between accident cases. Used to indicate the first While maintaining a high degree of matching, the system's accident case studies enhance the risk supplementation capabilities of the selected accident case set. The system selects target accident cases covering different risk paths, such as insufficient ventilation, lack of gas detection, and monitoring failure, avoiding repetitive focus on the same risk factor in video content.
[0084] like Figure 4 As shown, the script generation service constructs a job-risk-response fact-anchoring matrix based on the target accident case and the current personnel's job information. In this matrix, dredging personnel are assigned tasks such as underground dredging, wearing protective equipment, and performing testing and verification; safety supervisors are assigned tasks such as external monitoring, maintaining communication, observing personnel status, and initiating emergency response; and the on-site supervisor is assigned tasks such as confirming working conditions, checking ventilation records, and organizing emergency support. The accident details, causative factors, consequences, and preventative measures are written into the job-risk-response fact-anchoring matrix as factual constraint information.
[0085] The system generates structured constraint prompts based on a fact-anchoring matrix of job position, risk, and handling. These prompts include the accident description, cause analysis, lessons learned, and preventative measures. The large language model then generates multiple candidate warning and educational scripts based on these prompts. Each candidate script includes pre-operation risk warnings, the accident's occurrence process, an explanation of the accident's causes, job-specific preventative requirements, and emergency response reminders.
[0086] Regarding the first A list of candidate cautionary education scripts, and a system calculation of the accident fact coverage rate. Coverage rate of preventive measures in the workplace and risk contradiction rate and in accordance with Calculate script consistency score .in, Indicates the first The script consistency score of each candidate warning education script. This indicates the extent to which the candidate warning education script covers the facts of the accident, including the accident's course, causative factors, consequences, and preventative measures. This indicates the extent to which the candidate warning and educational scripts cover the corresponding preventative measures for dredging personnel, safety supervisors, and on-site managers. This indicates the proportion of information in the candidate warning education script that conflicts with the facts of the accident, job responsibilities, or protection requirements. This indicates the scoring weight corresponding to the coverage rate of accident facts. This indicates the scoring weight corresponding to the coverage rate of preventive measures for each position. This indicates the deduction weight corresponding to the risk conflict rate. The system selects... highest and Candidate warning education scripts that are below a preset threshold will be used as the final warning education scripts.
[0087] Subsequently, the system divided the final warning education script into multiple scene description units. The first scene description unit shows the scene of dredging personnel arriving at the pump station's sump work area. The second scene description unit shows the scene of ventilation equipment operation and inspection personnel checking the gas inside the well. The third scene description unit shows the risky scenario of entering the well without completing the inspection and confirmation. The fourth scene description unit shows the emergency evacuation after personnel feel unwell and the scene of external monitoring personnel initiating emergency response. The fifth scene description unit shows the safe work scenario after correctly implementing continuous ventilation, external monitoring, and wearing protective equipment.
[0088] Each shot description unit includes the work location, work equipment, worker position, work action, protective status, risk source, and accident status. The system constructs a continuous shot state vector based on each shot description unit and generates shot transition constraint information based on the previous and current shot description units. This shot transition constraint information restricts the direction of change in the location of the water collection well, the status of ventilation equipment, the status of protective equipment, personnel actions, and the status of risk sources in adjacent shots, preventing inconsistencies in equipment status, sudden loss of personal protective equipment, or inconsistencies in risk source status.
[0089] The text-to-video generation model generates multiple video clips based on shot description units and shot transition constraints. The system compares the last frame state with the first frame state of adjacent video clips. When the differences in the operating status of ventilation equipment, personnel protection status, work site status, or risk source status in adjacent shots exceed a preset threshold, the corresponding video clip is regenerated. The text-to-speech synthesis model converts the warning education script into narration audio and outputs phoneme timestamps. The system synchronously synthesizes the video clips, narration audio, and subtitle warning information based on the phoneme timestamps and shot transition timestamps to obtain a personalized safety warning education video that matches the current sludge removal operation in the collection well.
[0090] like Figure 5 As shown, the system determines the video push trigger time based on the task start time, the duration of the personalized safety warning education video, and the historical average viewing time. The video push trigger time is determined according to... Calculation. Among them, Indicates the video push trigger time. Indicates the start time of the dredging operation in the water collection well. Indicates the duration of personalized safety awareness education videos. This indicates the historical average viewing time corresponding to dredging operations in confined spaces. Indicates the safety buffer time. The system in... Personalized safety warning and education videos will be pushed to the terminal devices of dredging personnel, safety supervisors, and on-site supervisors at the corresponding times.
[0091] After the terminal device plays the video, the system collects the video completion rate and the correct answer rate for safety knowledge questions. The video completion rate and the correct answer rate for safety knowledge questions are then grouped and normalized according to job type, job scenario, and worker position to obtain the normalized completion rate. and normalized answer accuracy The system follows Calculate the first The educational feedback benefit of each accident case .in, Indicates the first The educational feedback benefit value of the video corresponding to each accident case in the current task group. Indicates normalized view completion rate The corresponding return weights, This represents the normalized answer accuracy rate. The corresponding profit weight.
[0092] The system calculates the average educational feedback benefit based on the same job type, job scenario, and employee position. Update # The case weights are assigned to each accident case. Case weights are determined according to... An update will be performed. Among other things, This indicates the updated case weights. This indicates the case weights before the update. Indicates the learning rate. Represents the sample confidence coefficient. Indicates the first The average educational feedback benefit of each assignment group. This represents a job grouping index determined by job type, job scenario, and employee position. When Higher than At that time, improve the first The case weight of each accident case. When Below At that time, reduce the first Case weights for each accident case. Sample confidence coefficients. Once the preset threshold is reached, the system synchronously updates the job-related parameters and key risk threshold coefficients. .
[0093] In actual deployment, PostgreSQL is used to store job ticket information, accident case metadata, video push records, and feedback data. Milvus is used to store the vector indexes corresponding to the job risk query graph and the accident risk chain graph. MinIO is used to store accident scene image data, accident video material data, accident reconstruction scene videos, and narration audio. Docker encapsulates the job plan parsing service, case matching service, script copy generation service, video generation service, audio generation service, media synthesis service, and feedback optimization service. Kubernetes schedules and deploys each service image to CPU processing nodes and GPU inference nodes. RabbitMQ is used to transmit job plan change events, case matching tasks, video generation tasks, video push tasks, and feedback tasks. FastAPI provides job ticket access interfaces, video acquisition interfaces, and feedback submission interfaces. Nginx is used to forward interface requests and distribute load. ONNX Runtime or TensorRT is used to execute the inference process of the job plan parsing model, vector embedding model, case matching model, text-to-speech model, and feedback optimization model.
[0094] When the location, type, or personnel position of the sludge removal operation in the collection well changes, the system discards the personalized safety warning education video associated with the previous work plan and re-executes the accident case matching, warning education script generation, accident reconstruction scene video generation, and video push process to ensure that the new personalized safety warning education video corresponds to the changed work plan.
[0095] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A method for generating safety videos for waterworks operations plans, characterized by: Includes the following steps: S1, obtain the current work plan information, parse the current work plan information to obtain the work type, work scenario keywords and work personnel job information; S2, based on the type of work, keywords of the work scenario, and job information of the workers, matches target accident cases from the municipal waterworks construction accident case database; S3, generate warning education scripts based on target accident cases and operator job information; S4. Based on the warning education script, generate accident reconstruction scene video and narration audio, and synchronously synthesize the accident reconstruction scene video, narration audio and subtitle warning information to obtain personalized safety warning education video; S5 sends personalized safety warning education videos to terminal devices associated with the current work plan, collects video viewing completion rate and safety knowledge quiz accuracy rate, and updates accident case matching parameters based on the video viewing completion rate and safety knowledge quiz accuracy rate.
2. The method for generating safety videos for waterworks operation plans according to claim 1, characterized in that: The municipal waterworks construction accident case database includes accident case text data, accident scene image data, and accident video material data; for each accident case, an accident feature tuple is established, including operation type tag, operation scene tag, job tag, causative factor tag, accident consequence tag, and preventive measure tag; The labels with causal relationships are connected to form an accident risk chain diagram, which includes, in sequence, the work object node, the causative factor node, the risk event node, the accident consequence node, and the preventive measure node.
3. The method for generating safety videos for waterworks operation plans according to claim 2, characterized in that: S1 include: The field names and values in the work ticket text or shift schedule text are used to form a field anchor sequence. The field anchor sequence and the work plan text sequence are then input into a dual-channel semantic extraction network anchored to the ticket fields. Generate field constraint masks according to the semantic categories corresponding to the field names, and use the field constraint masks to limit the cross-attention range between the field anchor sequence and the job plan text sequence; The fused features output by cross-attention are input into the entity boundary labeling layer to obtain the job type, job scenario keywords, job personnel job information, job location, and job time. Based on the job type, job scenario keywords, and job information of the workers, a job risk query map is constructed. The job risk query map includes job object nodes, job node, risk source node, and prevention and control requirement node.
4. The method for generating safety videos for waterworks operation plans according to claim 3, characterized in that: S2 A risk chain gating matching algorithm with adaptive confidence level is adopted, including: Regarding the first Calculate the semantic similarity of job types for each accident case. Semantic similarity of work scenarios Job relevance Consistency with risk chain topology ; Based on the confidence levels extracted from fields such as job type, job scenario keywords, operator job information, and risk source information, the weight of job type is determined. Job scenario weighting Job weight and risk chain weight ,in, ; according to Calculate the first The overall matching value of each accident case ; in, For the first The key risk threshold coefficient corresponding to each accident case, when the operation risk query chart is related to the first... When the accident risk chain diagram corresponding to a single accident case shows inconsistencies in key nodes regarding the work object, causative factors, or accident consequences, the risk level is reduced. ; According to the overall matching value The accident cases are sorted to obtain a set of candidate accident cases.
5. The method for generating safety videos for waterworks operation plans according to claim 4, characterized in that: S2 Also includes: The work objects, harmful factors and accident consequences in the accident risk chain diagram are combined into risk path segments, and path identifiers and path vector indexes are established for the risk path segments. High-risk path segments are extracted from the operation risk query map, and initial candidate accident cases are recalled from the path vector index based on path similarity. Regarding the first Each accident case, according to Calculate the differential risk coverage value ; in, This is the redundancy suppression coefficient. This is a collection of selected accident cases. For the first The first accident case and the first Risk path vector similarity between individual accident cases; Based on differentiated risk coverage values Select target accident cases in sequence, ensuring that each target accident case differs from the others in at least one of the causative factors, accident consequences, or preventive measures.
6. The method for generating safety videos for waterworks operation plans according to claim 5, characterized in that: S3 include: The job type, job scenario keywords, job information of the workers, accident details, causative factors, accident consequences and preventive measures are combined into a job-risk-handling fact anchoring matrix. Based on the job-risk-handling fact anchoring matrix, structured constraint prompts are generated. The structured constraint prompts include the accident process, cause analysis, lessons learned, and preventive measures. Multiple candidate warning education scripts are generated based on structured constraint prompts using a large language model; Regarding the first Calculate the coverage rate of accident facts for each candidate warning education script. Coverage rate of preventive measures in the workplace and risk contradiction rate and in accordance with Receive script consistency score ; Select script consistency score Highest risk and contradiction rate Candidate warning education scripts that fall below a preset threshold will be considered as warning education scripts. , and For scoring weights.
7. The method for generating safety videos for waterworks operation plans according to claim 6, characterized in that: S4 include: The warning education script is divided into multiple shot description units, each of which includes the work location, work equipment, worker position, work actions, protective status, risk source and accident status. For each shot description unit, a continuous shot state vector is constructed. The continuous shot state vector is used to represent the work location, equipment status, personnel protection status, and risk source status. Based on the continuous state vector of the previous shot description unit and the current shot description unit, generate shot transition constraint information; A text-to-video generation model is used to generate multiple video clips based on shot description units and shot transition constraints. Compare the state of the last frame of adjacent shot video segments with the state of the first frame. When the state difference exceeds a preset threshold, regenerate the corresponding shot video segment. The text-to-speech synthesis model is used to generate narration audio, and the video clips, subtitle warning information and narration audio are synthesized synchronously based on the phoneme timestamps and shot transition times in the narration audio.
8. The method for generating safety videos for waterworks operation plans according to claim 7, characterized in that: S5 include: The video push trigger time is determined based on the start time of the task, the duration of the personalized safety warning education video, and the historical average viewing time. according to Calculate video push trigger time ; in, The start time of the assignment. To personalize the length of safety awareness education videos, This represents the historical average viewing time. For safety buffer time; When the job type, job scenario keywords, or job position information of the operator in the work plan changes, the personalized safety warning education video associated with the work plan before the change is discarded, and S2 to S4 are re-executed. If the terminal device does not return a viewing completion message before the preset deadline, the video push task will be written into the pending push queue, and the push will be executed again based on the terminal's online status and the personnel's job priority.
9. The method for generating safety videos for waterworks operation plans according to claim 8, characterized in that: S5 The updated accident case matching parameters include: The video completion rate and the accuracy rate of answering safety knowledge questions were grouped and normalized according to the type of work, the work scenario, and the job position of the workers to obtain the normalized completion rate. and normalized answer accuracy ; according to Calculate the first The educational feedback benefit of each accident case ,in, The revenue weight corresponding to the completion rate of viewing; Average educational feedback benefit based on the same job type, job scenario, and job position of the operator ,according to Update # Case weight of each accident case ; in, For the updated case weights, The case weights before the update For learning rate, The confidence coefficient is the sample confidence coefficient. An index for job groups determined by job type, job scenario, and job position of the personnel; Calculate the sample confidence coefficient based on the sample size and the variance of the educational feedback benefit values. and in the sample confidence coefficient Update job-related parameters and key risk thresholds when the preset threshold is reached. .
10. The method for generating safety videos for waterworks operation plans according to claim 9, characterized in that: in practice... Deployment includes: PostgreSQL is used to store job ticket information, accident case metadata, video push records and effect feedback data; Milvus is used to store the vector indexes corresponding to the job risk query graph and the accident risk chain graph; and MinIO is used to store accident scene image data, accident video material data, accident reconstruction scene video and narration audio. Docker is used to encapsulate the job plan parsing service, case matching service, script copy generation service, video generation service, audio generation service, media compositing service, and feedback optimization service respectively. Kubernetes is used to deploy the images of each service to CPU processing nodes and GPU inference nodes. RabbitMQ is used to transmit job plan change events, case matching tasks, video generation tasks, video push tasks, and effect feedback tasks. FastAPI is used to provide access interfaces for job tickets, video acquisition interfaces, and effect feedback submission interfaces. Nginx is used to forward interface requests and distribute load. The inference process of the job plan parsing model, vector embedding model, case matching model, text-to-speech model and effect feedback optimization model is executed using ONNX Runtime or TensorRT. The text-to-video generation task is scheduled to the GPU inference node, the generated personalized safety warning education video is written to MinIO, and the video is pushed through the terminal device access interface.
Citation Information
Patent Citations
Special operation safety risk analysis and warning system based on accident case library
CN119849918A
Engineering safety video generation method and system based on generative large model
CN121908078A
