Plant safety risk early warning method, device and equipment and storage medium
Patent Information
- Application Number
- CN202611134664.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-09
AI Technical Summary
(1)风险预警滞后:现有系统主要依赖预设规则(如迟到、缺勤、未授权进入)触发报警,本质上是事后响应或事中告警,无法在风险事件发生前进行预判
(1)突破静态规则局限,实现从事后响应到事前阻断的预警前置化。本发明通过构建多模态行为序列,利用序列到序列模型预测目标对象在未来时间窗口内的行为轨迹(如预测未来1小时内可能进入的区域),并提前在动态风险图谱中进行虚拟映射与风险评估。
Smart Images

Figure CN122887189A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for early warning of safety risks in factory areas. Background Technology
[0002] Currently, process industry enterprises (such as petrochemicals and energy power) have widely deployed various heterogeneous business systems, such as access control systems, attendance systems, vehicle management systems, material management systems, and video surveillance systems, to achieve basic record keeping and simple process control of personnel, vehicles, and materials. However, the existing plant safety management model has significant shortcomings: (1) Delayed risk warning: The existing system mainly relies on preset rules (such as lateness, absence, and unauthorized entry) to trigger alarms, which is essentially a post-event response or in-event alarm, and cannot predict risk events before they occur. For example, for hidden risks such as frequent entry and exit of outsiders into non-work areas and abnormal stay time in sensitive areas, the existing system can only record after the violation occurs, and cannot provide early warning.
[0003] (2) Data silos lead to one-sided analysis: Data on personnel, vehicles, materials, videos, etc. are scattered in different systems and lack the ability to perform correlation analysis. It is difficult to answer complex risk questions such as "Does the person driving the unregistered vehicle have access to the area?" or "Are vehicles that frequently transport a certain type of material related to recent unplanned maintenance projects?", leading to management loopholes.
[0004] (3) Vague risk identification: Existing systems cannot understand the spatiotemporal semantics and potential intentions of personnel behavior. For example, access control data can only tell that someone has entered the production area, but cannot infer whether they have stayed in the production area for a long time, taken an abnormal route, or left with unknown materials, etc., which may constitute a series of behavioral sequences that pose security risks.
[0005] Current technologies have not yet systematically solved core technical challenges such as deep fusion of multi-source data, accurate prediction of behavioral sequences, and intelligent inference of risk intentions. Therefore, there is an urgent need for a method and system that can integrate multi-source heterogeneous spatiotemporal data, accurately model human behavioral sequences, dynamically infer potential risk intentions, and achieve pre-emptive risk quantification and graded early warning. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention proposes a method, device, equipment, and storage medium for early warning of safety risks in factory areas. By fusing multi-source spatiotemporal data to construct standardized behavioral sequences, and combining dynamic risk maps and time-series attention networks to infer risk intent, adaptive risk quantification and tiered early warning are ultimately achieved.
[0007] The first aspect of this invention provides a method for early warning of safety risks in a factory area, comprising: Acquire multi-source spatiotemporal data of the target object and construct a standardized behavior sequence; Based on the behavioral sequence, predict the behavioral trajectory of the target object within a future time window; The predicted behavioral trajectory is mapped to a dynamic risk map, and a risk intent score is obtained by assessing the risk of the associated paths formed by the behavioral trajectory in the dynamic risk map. Based on the risk intent score, a comprehensive risk score is generated, and an advance warning is triggered according to a dynamic threshold.
[0008] In an optional embodiment, acquiring multi-source spatiotemporal data of the target object and constructing a standardized behavioral sequence includes: Acquire multi-source spatiotemporal data of the target object, wherein the multi-source spatiotemporal data includes at least one of access control records, attendance records, vehicle passage records, and video recognition results; Entity alignment and event generation are performed on the multi-source spatiotemporal data to obtain basic spatiotemporal behavioral events; The basic spatiotemporal behavioral events are transformed into vector representations containing spatiotemporal context semantics and arranged in chronological order to obtain a standardized behavioral sequence.
[0009] In an optional embodiment, the step of converting the basic spatiotemporal behavioral event into a vector representation containing spatiotemporal context semantics includes: Construct a domain-specific vocabulary, which includes personnel identity tags, region tags, behavior types, and time characteristics; Based on the domain-specific vocabulary, the basic spatiotemporal behavioral events are constructed into natural language descriptive text; Using a pre-trained language representation model, the natural language description text is converted into dense vectors, which are then used as vector representations of the underlying spatiotemporal behavioral events.
[0010] In an optional embodiment, predicting the behavioral trajectory of the target object within a future time window based on the behavioral sequence includes: The behavioral sequence is input into the sequence model; The sequence-to-sequence model is used to predict the areas the target object may enter, the vehicles it may use, or the types of materials it may come into contact with within a future time window.
[0011] In one optional embodiment, the dynamic risk map includes personnel nodes, area nodes, vehicle nodes, material nodes, and relationship edges between nodes; the relationship edges include the entry relationship between personnel and area, the driving relationship between personnel and vehicle, and the transportation relationship between vehicle and material, and each relationship edge is timestamped.
[0012] In an optional embodiment, obtaining a risk intent score by assessing the risk of the associated paths formed by the behavioral trajectories in the dynamic risk map includes: Using a temporal graph attention network, the risk probability of the path formed by the hypothetical edge of the behavioral trajectory in the dynamic risk graph and the existing graph structure is evaluated to obtain a risk intention score.
[0013] In an optional embodiment, the personnel safety risk early warning method further includes: Responding to natural language queries entered by the user; Based on the results of the advance warning, information related to the natural language query and the results of the advance warning is retrieved from a vectorized domain knowledge base using retrieval enhancement generation technology. Using a large language model, natural language text containing attribution analysis and action recommendations is generated based on the retrieved information, serving as decision support information.
[0014] A second aspect of the present invention provides a factory area safety risk early warning device, comprising: The module is used to acquire multi-source spatiotemporal data of the target object and construct a standardized behavior sequence; The prediction module is used to predict the behavioral trajectory of the target object within a future time window based on the behavioral sequence. An evaluation module is used to map the predicted behavioral trajectory to a dynamic risk map, and obtain a risk intent score by evaluating the risk of the associated paths formed by the behavioral trajectory in the dynamic risk map. The early warning module is used to generate a comprehensive risk score based on the risk intent score and trigger an early warning according to a dynamic threshold.
[0015] A third aspect of the present invention provides a computer device, the computer device comprising: a memory and at least one processor, the memory storing instructions; the at least one processor calling the instructions in the memory to cause the computer device to execute the factory area safety risk early warning method as described in any of the preceding claims.
[0016] A fourth aspect of the present invention also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the factory area safety risk early warning method as described in any of the preceding claims.
[0017] Compared with the prior art, the technical solution provided by the present invention has the following beneficial technical effects: (1) Breaking through the limitations of static rules, this invention realizes the early warning system from post-event response to pre-event blocking. By constructing a multimodal behavior sequence, this invention uses a sequence-to-sequence model to predict the behavior trajectory of the target object within a future time window (such as predicting the area it may enter within the next hour), and performs virtual mapping and risk assessment in advance in a dynamic risk map.
[0018] (2) Integrating multi-source heterogeneous data with semantic representation to completely break down data silos. This invention uses entity alignment technology to associate multi-source spatiotemporal data scattered across different business systems with "personnel / vehicles" as the core entity, and innovatively employs natural language processing technology to transform discrete behavioral events into dense vectors containing spatiotemporal contextual semantics. This semantic-level data fusion not only preserves "what was done," but also deeply encodes the contextual information of "when it was done, where it was done, and what objects it was associated with," effectively solving the problem of one-sided analysis caused by existing data silos and meeting the deep-seated demands of human-vehicle-cargo linkage management.
[0019] (3) Based on dynamic knowledge graphs and time-series graph reasoning, it can accurately capture hidden and complex risk intentions. This invention constructs a dynamic risk graph containing personnel, regions, vehicles, materials, and time-stamped relationship edges, and introduces a time-series graph attention network. By mapping the predicted behavioral trajectory as a hypothesis edge to the graph, the model can automatically discover abnormal association paths across multi-hop nodes and perform logical conditional reasoning (such as verifying qualification matching degree, project progress requirements, etc.). This mechanism can accurately quantify and deduce potential complex violation intentions, solving the pain point of ambiguous risk identification. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of one embodiment of the factory area safety risk early warning method in this invention; Figure 2 This is a schematic diagram of one embodiment of the factory area safety risk early warning device in this invention; Figure 3 This is a schematic diagram of one embodiment of the computer device in this invention. Detailed Implementation
[0021] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0022] Example 1 This embodiment primarily addresses the operational management scenarios for external personnel (such as contractors) or key internal personnel in large process industry enterprises. Under traditional management models, the operational permissions of external personnel or key personnel are typically granted based on static contracts and access approvals, frequently leading to hidden risks such as operating beyond their permitted scope, regional overstaying, and falsified performance records. This embodiment aims to proactively predict and provide early warnings of operational risks for external personnel or key personnel through deep fusion of multi-source heterogeneous spatiotemporal data, behavioral sequence prediction, and dynamic graph reasoning.
[0023] Please see Figure 1 , Figure 1 This is a schematic diagram of an embodiment of the factory area safety risk early warning method of the present invention. This embodiment specifically includes the following steps: 101. Obtain multi-source spatiotemporal data of the target object and construct a standardized behavior sequence; This step forms the data foundation of the entire early warning system, aiming to transform raw data scattered across different business systems into standardized behavioral sequences that can be understood and computed by artificial intelligence models.
[0024] In one embodiment, step 101 specifically includes the following sub-steps: 1011. Obtain multi-source spatiotemporal data of the target object; In this embodiment, data from multiple heterogeneous systems is subscribed to or polled in real time through a data access adapter deployed in the system.
[0025] The multi-source spatiotemporal data in this embodiment includes at least one of access control records, attendance records, vehicle passage records, and video recognition results.
[0026] In this embodiment, the system acquires data in real time through the PyODBC driver. For example, the MySQL master database stores tables such as visitor ledgers (e.g., contractors), work plans, and early warning records; the SQL Server read-only data source stores access control record tables (e.g., ST_CardRecord) and attendance record tables (e.g., ST_Attendance).
[0027] For example, the system triggers a data synchronization task every 5 minutes, executing an SQL query to retrieve incremental data. For instance, the system retrieves an access control record: {Person_ID: "EMP-001", Card_Time: "2024-05-21 14:05:00", Door_ID: "Gate-01", In_Out_Flag: "IN"}. It also retrieves an attendance record: {Person_ID: "EMP-001", Time: "2024-05-21 08:00:00", Location: "Workshop-A"}, and a video recognition result: {Camera_ID: "Cam-12", Time: "2024-05-21 14:10:00", Person_ID: "EMP-001", Action: "Walking"}.
[0028] Because access control controllers may experience clock drift, the system uses linear interpolation to calibrate Card_Time based on the central server's time to ensure the accuracy of the timeline. For missing values in critical fields, interpolation from previous or subsequent records or default values are used to fill in the missing values.
[0029] 1012. Perform entity alignment and event generation on the multi-source spatiotemporal data to obtain basic spatiotemporal behavioral events; This embodiment uses personnel as the core entity, linking different data sources through unique identifiers (such as employee IDs and face IDs). It combines elements such as timestamps, geographic location information (access control area ID, attendance point number, camera location), and behavioral actions (entry / exit, clocking in, recognition) to generate basic spatiotemporal behavioral events. Entity ID mapping is used to associate the Person_ID in the access control record with the contractor ledger table in the MySQL master database, supplementing the contractor's "job attribute, affiliated unit, and work project number" characteristics. If a link cannot be established, it is marked as "unregistered external personnel," directly triggering a high-risk warning.
[0030] For example, for the access control record retrieved above, the system associates Person_ID: "EMP-001" with the contractor ledger, supplementing the information as follows: {Name: "Zhang San", Role: "Electrician", Project: "Proj-2024-05"}. The resulting basic spatiotemporal behavioral event is: {Personnel ID: "EMP-001", Name: "Zhang San", Position: "Electrician", Time: "2024-05-21 14:05:00", Location: "Gate-01", Behavior: "Enter"}. For unregistered visitors, if an unknown face is detected by video recognition, the event is: {Personnel ID: "Unknown-05", Time: "2024-05-21 14:10:00", Location: "Cam-12", Behavior: "Lingering"}.
[0031] 1013. The basic spatiotemporal behavioral events are transformed into vector representations containing spatiotemporal context semantics and arranged in chronological order to obtain a standardized behavioral sequence.
[0032] This embodiment utilizes natural language processing technology to transform discrete behavioral events into high-dimensional semantic vectors, as detailed below: (1) Construct a domain-specific vocabulary: Construct a vocabulary that includes all personnel identity tags (owners, contractors, key positions), area tags (production core area, hazardous chemical storage area, office building, canteen), behavior types (entering, leaving, staying, clocking in, moving), time characteristics (working hours, late night hours, weekends), and associated objects (vehicle ID, material type).
[0033] For example, the glossary includes entries such as "contractor", "electrician", "hazardous chemical storage area", "late night", and "entry".
[0034] (2) Constructing natural language description text: Based on the domain-specific vocabulary, the basic spatiotemporal behavioral events are constructed into natural language description text.
[0035] For example, for the event {Personnel ID: "EMP-001", Name: "Zhang San", Position: "Electrician", Time: "2024-05-21 14:05:00", Location: "Gate-01", Action: "Enter"}, the system converts it into text: "[Contractor Personnel][Zhang San] generated an [Enter] event at [Factory Gate] on [2024-05-21 14:05]". For attendance records, it is converted into: "[Contractor Personnel] [Zhang San] generated a [Check-in] event at [Work Area Check-in Point] on [2024-05-21 08:00]". This textual processing not only records "what was done", but also encodes the contextual relationships of "when it was done" and "where it was done" in the semantic space.
[0036] (3) Conversion to dense vectors: Using a pre-trained language representation model (such as BERT), the natural language description text is converted into dense vectors, which serve as vector representations of the basic spatiotemporal behavioral events. This embodiment uses the BERT-base-chinese model and performs domain-specific fine-tuning.
[0037] For example, if the above text is input into the BERT model, after word segmentation and word embedding, the CLS vector of the last hidden layer is extracted as the semantic vector V of the action event. i ∈R 768 .
[0038] For example, the text "[Contractor personnel] [Zhang San] generated an [entry] event at [factory gate] on [2024-05-21 14:05]" after BERT encoding results in a 768-dimensional dense vector, such as V1=[0.12, [0.45, 0.88, ..., 0.33]. This vector uniquely represents the behavioral event and its contextual semantics in the high-dimensional space.
[0039] (4) Sequence assembly: For the same person entity, all behavioral event vectors within a time window (such as the past 24 hours) are concatenated in chronological order to form a standardized behavioral sequence of the person within that time period.
[0040] For example, suppose Zhang San generated three behavioral event vectors in the past 24 hours: V1 (entering the factory gate), V2 (clocking in), and V3 (entering the workshop). The system arranges these vectors in chronological order to form a standardized behavioral sequence matrix V. seq =[V1, V2, V3]. To satisfy the model input dimensions, padding or truncation can be performed, with the maximum sequence length set to N.
[0041] 102. Based on the behavioral sequence, predict the behavioral trajectory of the target object within a future time window; This step aims to predict the future behavior of a target object by using a sequence prediction model based on the inertia of historical behavioral patterns.
[0042] Model Selection and Input: A sequence-to-sequence Transformer model or a Long Short-Term Memory (LSTM) network model is used. The input is the historical behavior sequence vector matrix V generated in step 101. seq As input, absolute position encoding is added to the Transformer model, enabling the model to perceive the order in which actions occur.
[0043] For example, the Transformer encoder can capture the dependencies between any two events in a sequence through a multi-head self-attention mechanism. For instance, the model can learn a high degree of correlation between "entering the factory area late at night" and "subsequently entering the hazardous chemical storage area".
[0044] Predictive output (predicting the areas that may be entered, the vehicles that may be used, or the types of materials that may be encountered within a future time window): Using a sequence-to-sequence model, it predicts the sequence of behaviors that a target object may exhibit within a specified future time window (e.g., the next hour). The decoder employs an autoregressive approach, predicting future behavior based on historical sequences.
[0045] Task 1: Next Location Prediction. The model outputs the probability distribution of the Top-3 regions most likely to be entered in the next hour.
[0046] Task 2: Duration Prediction. The model outputs the predicted duration of stay in the current or next region.
[0047] Task 3: Material Contact Prediction. The model outputs the probability of the types of materials that may be encountered.
[0048] For example, the system will use Zhang San's standardized behavioral sequence V seqInput the Transformer model. Model output prediction results: The model output prediction results are as follows: {Within the next 1 hour: [{Area: "Hazardous Chemicals Storage Area", Probability: 0.85}, {Area: "Office Building", Probability: 0.10}, {Area: "Canteen", Probability: 0.05}], Estimated stay duration: "30 minutes", Possible material type: [{Material: "Hazardous Chemical Raw Material A", Probability: 0.60}, {Material: "Ordinary Repair Tools", Probability: 0.30}, {Material: "None", Probability: 0.10}]}. This prediction indicates that Zhang San has an 85% probability of entering the hazardous chemicals storage area within the next 1 hour, and a high probability of coming into contact with "Hazardous Chemical Raw Material A" (this may be due to the model learning that his recent trajectory has repeatedly approached the loading and unloading area of this raw material). This prediction not only reflects the regional anomaly inertia based on its historical trajectory, but also further refines its potential material manipulation intentions within the target area, providing richer risk extrapolation dimensions for subsequent map-based reasoning.
[0049] 103. Map the predicted behavioral trajectory to a dynamic risk map, and obtain a risk intent score by assessing the risk of the associated paths formed by the behavioral trajectory in the dynamic risk map; This step combines the capabilities of knowledge graph reasoning to achieve joint prediction of potential risks to personnel.
[0050] In one embodiment, step 103 specifically includes the following sub-steps: 1031. Constructing and updating dynamic risk maps; In this embodiment, the dynamic risk graph includes personnel nodes, area nodes, vehicle nodes, material nodes, and relationship edges between nodes. These relationship edges include the entry relationship between personnel and areas, the driving relationship between personnel and vehicles, and the transportation relationship between vehicles and materials, and each relationship edge is timestamped. The system uses a stream processing engine (such as Apache Flink) to consume standardized behavioral events generated in step 101 in real time, with each new event triggering an incremental update of the graph.
[0051] (1) The node attributes are defined as follows: Personnel node: Attributes include contractor ID, job type (e.g., welder, electrician), qualification validity period, and risk level.
[0052] Regional nodes: Attributes include regional ID, regional type (such as production core area, hazardous chemical warehouse, office building), and risk level (red / yellow / blue zone).
[0053] Project node: Attributes include project number, task content, planned time period, and associated region.
[0054] (2) The relation edge is defined as follows: [Personnel]-[Access Authorization]-[Area]: Derived from static authorization data.
[0055] [Personnel]-[Actual Entry]-[Area]: Sourced from real-time access control data, the side attributes include entry time and stay duration.
[0056] [Personnel] - [Belong to] - [Project]: Derived from the work plan.
[0057] For example, the graph contains nodes [Personnel: Zhang San (Electrician)] and [Area: Hazardous Chemicals Storage Area (High Risk)]. The system receives a real-time event of Zhang San entering the factory and adds a timestamped edge [Actual Entry] - [Factory Gate] to the Zhang San node in the graph. At this point, there is no direct connection between the Zhang San node and the Hazardous Chemicals Storage Area node, but trajectory prediction shows a very high probability of a connection forming.
[0058] 1032. Assess the risks associated with the path to obtain a risk intent score.
[0059] By utilizing temporal graph attention networks (such as TGAT), the risk probability of paths formed by hypothetical edges in a dynamic risk graph and the existing graph structure is evaluated to obtain a risk intent score. The TGAT model is trained on the constructed dynamic graph, enabling it to learn patterns of edge (relationship) evolution over time. During training, historical security incident reports are used as labeled data to allow the model to learn the distinction between normal and abnormal relationship patterns. The model updates the hidden state of the central node by aggregating neighbor node information and introducing a temporal encoding function, enabling the model to perceive the passage of time.
[0060] In this embodiment, the graph-based reasoning and evaluation process for risk intent is as follows: Hypothetical edge generation: The behavioral trajectory predicted in step 102 is mapped onto the dynamic risk graph to form a series of "hypothetical future edges". For example, if the model predicts that "Zhang San will enter the hazardous chemical storage area within the next 1 hour", then a virtual edge is constructed in the graph: [Personnel: Zhang San] - [Predicted entry (probability 0.85)] -> [Area: Hazardous chemical storage area].
[0061] Path query and attribute verification: The system invokes a rule-based reasoning engine or utilizes the path discovery capabilities of a graph neural network to query the attributes of relevant nodes. For example, querying Zhang San's attributes reveals his job title as a general electrician and his qualification as lacking a hazardous materials operation certificate; querying the area attributes reveals the hazardous materials storage area as a high-risk zone.
[0062] Anomaly Path Identification: The TGAT model automatically identifies abnormal structural paths in the map. One anomaly path was identified: Contractor personnel Zhang San -> [Predicted Entry] -> Hazardous Chemicals Storage Area -> [Not Belonging] -> Current Work Project B. This path indicates that unqualified personnel intended to enter a high-risk area unrelated to their current work project.
[0063] Risk probability calculation: Using the pre-trained TGAT network, the risk probability of these hypothetical edges in the current context is evaluated. Since Zhang San is unqualified and the region is high-risk, the TGAT network aggregates surrounding information through an attention mechanism and outputs that the risk probability of this hypothetical edge is extremely high (e.g., 0.95).
[0064] For example, the system comprehensively predicts probabilities and verifies map attributes to calculate a risk intent score. The deduction conclusion is: "Unqualified personnel intend to enter a high-risk area." The comprehensive risk intent score calculation formula is as follows: Risk = P (predicted entry) × W (area risk coefficient) × (1 S (Qualification Matching Degree) Among them, the predicted probability P=0.85; the regional risk coefficient W (hazardous chemical storage area)=1.0 (highest); and the qualification matching degree S=0 (completely unqualified).
[0065] The final risk intention score was calculated as Risk = 0.85 × 1.0 × (1 0) = 0.85. This score not only reflects the probability of the predicted behavior occurring, but also deeply integrates the risk of logical conflicts implicit in the graph structure.
[0066] 104. Based on the risk intent score, generate a comprehensive risk score and trigger an advance warning according to a dynamic threshold.
[0067] This step aims to transform anticipated risk intentions into quantifiable, actionable alerts and ensure seamless integration with existing business processes.
[0068] (1) Design of dynamic risk quantification scoring function Define a comprehensive risk scoring function R(t,p)=α P seq (t)+β P graph (t)+γ H risk (p).
[0069] P seq (t) is the probability of anomaly in the predicted sequence from step 102 (reflecting the degree to which the behavioral trajectory deviates from the normal pattern); P graph (t) is the risk intention score for graph reasoning in step 1032 (reflecting the degree of logical conflict in the graph structure); Hrisk (p) is the historical violation risk weight of the person (reflecting the individual's historical credit); α, β, γ are adjustable parameters that satisfy α+β+γ=1.
[0070] For example, for Zhang San, let α=0.3, β=0.5, γ=0.2. A check reveals that Zhang San has no historical violations, H... risk (p) = 0.1. Predicted sequence anomaly probability P seq (t) = 0.8 (because a normal electrician should be working in the workshop at this time). Graph reasoning risk intention score P graph (t)=0.85.
[0071] The overall risk score R(t,p) = 0.3 × 0.8 + 0.5 × 0.85 + 0.2 × 0.1 = 0.685.
[0072] (2) Adaptive threshold adjustment mechanism An online learning algorithm is introduced to dynamically adjust the warning threshold based on the distribution of risk scores in historical data (such as daily and weekly score distribution). The threshold adjustment follows the 3σ principle or is based on dynamic interval division of quantiles.
[0073] During peak production periods (weekday daytime), the overall behavior is highly complex, background noise is high, and threshold settings are relatively high (e.g., Threshold). day =μ+2σ), to reduce invalid alarms.
[0074] At night or on holidays, when there are few people around, any unusual movement should be taken seriously, and the threshold will automatically decrease (e.g., Threshold). night =μ+1.5σ), to enhance sensitivity.
[0075] For example, if the current time is 2:00 PM (weekday daytime), the system calculates a mean μ = 0.4 and a standard deviation σ = 0.12 based on historical statistics. Dynamic threshold Threshold day =0.4 + 2 × 0.12 = 0.64. Since Zhang San's comprehensive risk score R(t,p) = 0.685 > Threshold (0.64), the system determines that the threshold has been exceeded and officially triggers the early warning.
[0076] (3) Intelligent closed-loop integration with existing business modules (triggering advance warning) When R(t,p) exceeds the dynamic threshold, the system automatically generates an early warning record of type "predictive risk warning," which includes the predicted behavioral trajectory, the inferred risk intent, the entities involved, and suggested intervention measures. This early warning record is directly pushed to the early warning processing module, triggering its execution of the closed-loop process of "early warning-handling-archiving."
[0077] For example, the system generates an alert record in the following JSON format and writes it to the database: "alert_id": "ALT-20240521-140501", "alert_type": "Predictive risk warning", "level": "High risk", "content": "It is predicted that contractor Zhang San (a general electrician) will enter the hazardous chemicals storage area within the next hour (without matching qualifications), with a comprehensive risk score of 0.685." "related_entity": "Person_ID_EMP-001", "suggestion": "It is recommended to immediately contact the on-site supervisor to verify the work plan and monitor the access control status." "status": "pending" Simultaneously, the system invokes the SMS interface to send a warning SMS to the safety supervisor: "[Risk Warning] It is predicted that contractor Zhang San will illegally enter the hazardous chemicals storage area. Please verify immediately. See the warning processing module for details." Furthermore, the system can automatically send instructions to the access control system to temporarily freeze access permissions for the "hazardous materials storage area." When Zhang San attempts to swipe his card, the on-site gate buzzer sounds an alarm, alerting security personnel to intercept him. After the alarm is triggered, the state machine sets the alarm record status to pending (awaiting manual intervention). The safety supervisor logs into the system on their mobile phone, clicks "Handling," and fills in the verification results. The system automatically records the handling process, forming a closed loop, and uses it as positive / negative samples to feed back to the model for fine-tuning (continuous learning and system self-optimization).
[0078] The target audience in this embodiment primarily refers to personnel operating within an enterprise, particularly external contractors and key personnel. In this scenario, the target audience is a specific natural person. The core objective of the system is to prevent safety incidents caused by personnel entering dangerous areas without proper qualifications, beyond their authorized scope, or in violation of regulations. The system uses a "personnel ID" (such as employee ID, facial ID, or access card number) as a unique primary key, aggregating spatiotemporal data such as access control card swipe records, attendance records, and video surveillance recognition results to construct a unique "behavioral sequence" for that person. This sequence predicts the person's future movement trajectory and operational intentions, and assesses whether their qualifications match the target area within a dynamic risk map.
[0079] For example, target: Zhang San (male, contractor electrician, holds a general electrician's work permit, but no hazardous chemicals operation permit). Data tracking: The system retrieved data showing Zhang San clocking in at the work area at 8:00 AM this morning (attendance data), entering the factory area at 2:05 PM using facial recognition (access control data), and being captured by a camera walking towards the hazardous chemicals storage area at 2:10 PM (video data). Prediction and inference: Based on Zhang San's behavioral sequence, the model predicts that he has an 85% probability of entering the "hazardous chemicals storage area" within the next hour. Graph inference reveals that Zhang San "lacks a hazardous chemicals operation permit," determining that he is "an unqualified person intending to enter a high-risk area," with a comprehensive risk score of 0.685, triggering an early warning.
[0080] The technical solution in this embodiment achieves a leap from "post-event accountability" to "pre-event prevention." Before personnel actually enter the hazardous chemical storage area and cause violations, the system has predicted their intentions and issued an early warning, giving safety management personnel more time to intervene. This truly realizes proactive risk warning, solves the hidden risks of mismatch between personnel and positions, breaks down data silos, and achieves deep semantic fusion of data.
[0081] Example 2 This embodiment focuses on the application scenario of risk prediction in the "people-vehicle-goods" linkage in the enterprise material circulation process. In traditional vehicle and material management, the vehicle management system only focuses on vehicle registration, and the material management system only focuses on the quantity of materials. The two lack deep correlation, making it difficult to detect hidden material loss patterns such as "more in, less out" and "frequent temporary applications". This embodiment achieves intelligent prediction and proactive interception of material transportation risks by constructing a multi-dimensional dynamic risk map of "people-vehicle-goods-time-space".
[0082] 201. Obtain multi-source spatiotemporal data of the target object and construct a standardized behavior sequence; This step aims to integrate unstructured and structured data, such as vehicle trajectories, material requisition forms, and personnel permissions, and transform them into a unified, standardized sequence of behaviors.
[0083] In one embodiment, step 201 specifically includes the following sub-steps: 2011. Obtain multi-source spatiotemporal data of the target object; The system acquires multi-source spatiotemporal data in real time, including not only personnel access control records, but also, and more importantly, vehicle passage records, scanned copies of material requisition forms, GPS trajectory streams of transport vehicles, and project progress data. In terms of data source configuration, the MySQL master database stores vehicle ledgers, material requisition forms, and project progress tables; the SQL Server read-only data source stores vehicle entry and exit records and inventory flow data.
[0084] For example, the system acquires an image of a material requisition form and a corresponding vehicle access record: {Vehicle_ID: "Gan A-12345", Driver_ID: "EMP-002", Time: "2024-05-21 16:00:00", Gate: "Gate-Out-01"}. Meanwhile, the GPS trajectory data of the vehicle is acquired: [{Lat: 28.5, Lon: 115.9, T: "15:30"}, {Lat: 28.52, Lon: 115.92, T: "15:45"}]. In addition, an update record of the project schedule is also acquired: {Project: "Proj-C", Status: "Completed"}.
[0085] 2012, performing entity alignment and event generation on the multi-source spatiotemporal data to obtain basic spatiotemporal behavior events; Since material requisition information often has vague naming (such as "a batch of tools", "some pipe accessories"), in this step, OCR technology is firstly used to extract material names, quantities and specifications from the requisition form. Then semantic normalization is performed: constructing an enterprise material standard thesaurus, using a pre-trained language representation model to calculate the semantic similarity between the requisitioned material name and the standard thesaurus, automatically correcting vague naming and mapping it to a standard material code. On this basis, with "vehicle" and "driver" as core entities, elements such as material attributes and project status are associated to generate basic spatiotemporal behavior events.
[0086] For example, for the text "several meters of scrap copper" on the material requisition form, after being extracted by OCR, the system calculates its semantic similarity with the standard thesaurus, and normalizes it into structured data: {Material Code: "MAT-COPPER-01", Name: "Scrap Copper", Quantity: 500, Unit: "Kilogram"}. Then, the vehicle information, driver information, material information and project schedule information are combined to generate a basic spatiotemporal behavior event: {Vehicle: "Gan A-12345", Driver: "Li Si (Contractor)", Time: "2024-05-21 16:00", Behavior: "Apply for Outbound Shipment", Material: "Scrap Copper (Valuable)", Associated Project: "Proj-C (Completed)", Destination: "Waste Station Outside the Plant Area"}.
[0087] 2013, converting the basic spatiotemporal behavior events into vector representations containing spatiotemporal context semantics, and arranging them in chronological order to obtain a standardized behavior sequence.
[0088] Similar to Embodiment 1, construct a domain-specific vocabulary containing material attribute tags (ordinary / valuable / hazardous), vehicle attribute tags (load capacity, owning unit), and project status tags. Convert the aforementioned basic spatio-temporal behavior events into natural language description texts, and use the BERT model to extract the <[BOS_never_used_51bce0c785ca2f68081bfa7d91973934]> vector. Meanwhile, vectorize the historical GPS trajectory points of the vehicle. Finally, all associated event vectors of the vehicle and the driver within a past time window are arranged in chronological order to form an application snapshot sequence.
[0089] For example: text construction: convert the above event into text: "[Contractor driver] [Li Si] drives [Gan A-12345] and generates a [shipping application] event at [2024-05-21 16:00], the material is [scrap copper (valuable)], associated with project [Proj-C (completed)]". Vectorization encoding: the BERT model converts the text into a 768-dimensional dense vector V1. Historical sequence splicing: the system retrieves the behavior events of Li Si and the vehicle in the past 7 days, and finds that he made a similar application three days ago (shipping scrap aluminum), splices its vector V0 with the current V1 to construct a standardized behavior sequence Vseq =[ V0, V1]. This sequence not only contains the snapshot of the current application, but also contains the historical spatio-temporal context of high-frequency temporary applications.
[0090] 202. Based on the behavior sequence, predicting the behavior trajectory of the target object within a future time window; This step combines historical spatio-temporal data to predict the rationality of the vehicle's future driving trajectory and material flow.
[0091] The standardized behavior sequence V generated in step 201 seq is input into a sequence-to-sequence model. In this embodiment, for vehicle trajectory intention prediction, an LSTM (Long Short-Term Memory) model is adopted, which inputs the 7-day entry and exit time of the vehicle in the past, GPS driving routes, and dwell time sequences. For prediction on rationality of material flow, a time series prediction model (such as Prophet) is adopted to predict the natural consumption trend based on historical inventory flow data.
[0092] Prediction output: the model outputs the behavior trajectory prediction result within the future time window, including the expected activity range of the vehicle, whether there is an abnormal detour intention, and the risk of excessive material transportation.
[0093] For example: Trajectory prediction: The LSTM model predicts the expected activity trajectory of vehicle Gan A-12345 during the application period (16:00-18:00). The model found that this vehicle frequently exhibits a "detour to unmonitored area B" behavior pattern during similar historical time periods, therefore predicting a probability of it detouring to unmonitored area B this time as 0.8. Material rationality prediction: The Prophet model, based on historical data, predicts that the current natural consumption of scrap copper should be 100 kg per week. However, this single application involves transporting 500 kg, far exceeding the predicted consumption. The model determines the probability of "over-transportation risk" to be 0.9. Finally, the comprehensive sequence model outputs: {Vehicle trajectory anomaly probability: 0.8, Material over-transportation probability: 0.9}. This prediction reflects the "inertia of abnormal behavior trajectories" based on historical habits.
[0094] 203. Map the predicted behavioral trajectory to a dynamic risk map, and obtain a risk intent score by assessing the risk of the associated paths formed by the behavioral trajectory in the dynamic risk map; This step focuses on constructing implicit risk-related paths between entities to address the problem of insufficient data linkage between "people, vehicles, and goods".
[0095] In one embodiment, step 203 specifically includes the following sub-steps: 2031. Construct and update dynamic risk maps; Building upon Example 1, the graph nodes and edges are expanded. Nodes are expanded to include: personnel (driver) nodes, vehicle nodes, material nodes, and project nodes. Relationship edges are expanded to include: [Driver] - [Routine Driving] - [Vehicle] (based on historical statistics, with weights reflecting driving frequency), [Vehicle] - [Frequently Transported] - [Material Type] (e.g., a truck frequently transports steel), and [Project Progress] - [Requirements] - [Material]. Each edge carries a timestamp, reflecting the time-varying nature of the relationships.
[0096] For example, the graph contains nodes [Vehicle: Gan A-12345], [Materials: Scrap Copper (Valuable)], and [Project: Proj-C (Completed)]. Based on historical records, the system constructs a normal edge: [Vehicle: Gan A-12345] - [Frequent Transport (Low Frequency)] -> [Materials: Steel]. This indicates that this vehicle does not frequently transport scrap copper.
[0097] 2032. Assess the risks associated with the path to obtain a risk intent score.
[0098] Temporal Graph Attention Network (TGAT) is used to evaluate the risk probability of paths formed by hypothetical edges and existing structures in the graph for predicted trajectories. TGAT can automatically discover anomalous subgraph structures in the graph through neighbor sampling and aggregation.
[0099] The abnormal path discovery and evaluation process in this embodiment is as follows: (1) Hypothesis edge generation: Map the prediction results of step 202 to the graph. Generate hypothesis edges: [Vehicle: Gan A-12345] - [Predicted shipment (probability 0.9)] -> [Materials: Scrap copper (valuable)], and [Vehicle: Gan A-12345] - [Predicted detour (probability 0.8)] -> [Area: Unmonitored area B].
[0100] (2) Path discovery: The TGAT model starts from the [Vehicle: Gan A-12345] node and performs breadth-first neighbor aggregation, discovering a complete association path: [Vehicle: Gan A-12345 (historical high-frequency temporary application)] -> [predicted shipment] -> [Materials: scrap copper (valuable, low inventory)] -> [related project: Proj-C (completed, no demand)].
[0101] (3) Risk probability assessment: There is a serious conflict in the timing and logic of this path (the project has been completed and there is no demand, but valuable materials are transported out frequently). The TGAT model scores this path and outputs a risk probability of extremely high (0.95). Because the vehicle "usually transports steel" but "transports scrap copper" this time, and the related project "has been completed", multiple attention heads are given extremely high abnormal weights.
[0102] For example, based on the output of TGAT, the system deduced a risk intent score of 0.95, with the intent described as: "In the absence of demand after project completion, high-frequency abnormal vehicles attempt to transport valuable materials, and it is predicted that they intend to detour through unmonitored areas." This score accurately characterizes the complex and hidden risks of material loss.
[0103] 204. Based on the risk intent score, generate a comprehensive risk score and trigger an advance warning according to the dynamic threshold.
[0104] This step achieves closed-loop control from risk prediction to physical interception.
[0105] (1) Design of dynamic risk quantification scoring function Define the comprehensive risk scoring function Rvehicle=ω1 R graph +ω2 R intent +ω3 R history .
[0106] Among them, R graph R is the score for abnormal paths in the graph (i.e., risk intent score); intent For trajectory and material surplus prediction anomaly scores; R history Weighting based on historical violations.
[0107] For example, let ω1=0.5, ω2=0.3, ω3=0.2. R graph =0.95, R intent =0.85 (Probability of combined trajectory and material prediction), R history =0.6 (This vehicle has one record of not wearing a helmet). Calculate the overall score R. vehicle =0.5×0.95+0.3×0.85+0.2×0.6=0.85.
[0108] (2) Adaptive threshold adjustment and intelligent interception mechanism The system dynamically adjusts thresholds based on the sensitivity of the materials. For valuable materials, the threshold is automatically lowered (e.g., set to 0.7) to increase sensitivity; for ordinary materials, the threshold is raised (e.g., set to 0.9). When the score exceeds the threshold, advance warning and physical interception actions are executed. For extremely high risk (R>0.9), the system automatically rejects the application and issues a blacklist instruction to the access control system; for medium risk (0.6-0.9), the system calls a large model to generate auxiliary review opinions for manual review.
[0109] For example, if the transported goods are "scrap copper (valuable)," the dynamic threshold is set to 0.7. Because R... vehicle =0.85>0.7, triggering an early warning.
[0110] Automatic rejection and interception: Due to a score of 0.85 (which is considered medium to high risk), the system automatically rejected Li Si's application for material removal during the application stage and generated the rejection reason on the front end: "The system detected an anomaly in the historical trajectory prediction of this vehicle, and the quantity of valuable materials requested to be transported does not match the current progress of the completed project. Please verify manually." Access Control Circuit Breaker: The system sends a command to the access control gate control system through the middleware layer to temporarily freeze the exit access of vehicle Gan A-12345. When the vehicle arrives at the gate, the gate refuses to open, an alarm sounds, and security personnel are forced to intervene.
[0111] AI-assisted review opinion generation: The system calls the locally deployed Ollama large model. Inputting the prompt: "You are a materials review expert. Vehicle Gan A-12345 has applied to transport 500 kg of scrap copper. According to graph analysis, this vehicle has applied to transport similar materials three times this month, and the current project does not involve large-scale demolition work. Please generate review suggestions." The large model generates the opinion: "It is recommended to verify the source of the materials. The vehicle's recent transport frequency is abnormal (+200%), posing a risk of material loss. It is recommended to open the containers for inspection and verify the scrap production certificate." The reviewer can directly adopt this opinion, greatly improving review efficiency.
[0112] The target object in this embodiment mainly refers to a vehicle and its bound driver (that is, the transportation complex composed of "person-vehicle-cargo"). In this scenario, the target object is expanded from a single natural person to a vehicle-centered transportation unit. The core purpose of the system is to prevent the loss of valuable materials, illegal transportation or illegal entry of vehicles. The system takes "vehicle ID" (such as license plate number) and "driver ID" as composite primary keys, and aggregates data such as vehicle GPS trajectory streams, vehicle entry and exit records, OCR results of material requisitions, and drivers' historical behaviors. The behavior sequence includes not only human actions, but also the movement trajectory of the vehicle and the loading and unloading application actions of materials. The prediction targets are the future driving range of the vehicle and the rationality of material carrying.
[0113] For example, Target object: the transportation vehicle with license plate number "Gan A-12345" and its driver Li Si (contractor driver). Data tracking: the system obtains the material requisition for 500 kg of scrap copper submitted by Li Si, as well as the 7-day GPS driving trajectory of "Gan A-12345" (it is found that the vehicle once detoured to non-monitoring area B) and access control entry and exit records. Prediction and reasoning: the LSTM model predicts that there is an 80% probability that the vehicle will have an abnormal trajectory of "detouring to non-monitoring area B" during the current application period (16:00-18:00); meanwhile, graph reasoning finds that the associated project "Proj-C" has been completed and there is no demand for shipping out scrap copper. Through comprehensive assessment, the vehicle has a loss risk of "high-frequency abnormal vehicles attempting to ship out valuable materials", with a risk score of 0.85, which triggers the rejection of the application and physical interception by the access gate.
[0114] Through this embodiment, the data barriers among people, vehicles and materials are broken, and the four-dimensional integrated linked risk control of "driver behavior-vehicle trajectory-material attribute-project progress" is realized, which intercepts risks outside the factory gate and physically eliminates the possibility of illegal transportation.
[0115] Embodiment 3 This embodiment focuses on solving the problem that the predicted risk data generated in Embodiment 1 and Embodiment 2 is difficult to be efficiently utilized by management. Traditional data presentation methods have high query thresholds and difficult data interpretation. In this embodiment, large language model (LLM) and retrieval-augmented generation (RAG) technology are used to construct a conversational decision assistant, thereby converting complex prediction data into decision-making suggestions that management can understand and apply.
[0116] 301. In response to a natural language query input by a user; The system provides an interactive interface, through which management users input natural language queries via voice or text. The system deploys an intent recognition engine to perform intent classification (such as data query, cause analysis, disposal suggestion, trend prediction) and slot filling (extracting entities such as time, target objects, indicators) on user input.
[0117] For example, a safety supervisor might enter a natural language query on the front-end interface: "Please check the performance of the contractors this week, especially the team with the highest risk. Why is it high-risk, and what should I do?" Intent identification: The intent classification model analyzes that the query contains three intents: "data query", "cause analysis" and "action suggestion".
[0118] Slot Fill: Extract Entity Slot: Time: "This Week", Target: "Contractor", Metric: "Performance Status", Filter: "Highest Risk".
[0119] Instruction generation: The system converts the above natural language into a structured query instruction: QueryIntent ={Action: "Get_Contractor_Risk", Sort: "Risk_Score DESC", Limit: 1, Need_Reason: True, Need_Suggestion: True}.
[0120] 302. Based on the results of the advance warning, information related to the natural language query and the results of the advance warning is retrieved from a vectorized domain knowledge base using retrieval enhancement generation technology; This embodiment uses RAG technology to fuse and retrieve static institutional information with dynamic predictive intelligence.
[0121] (1) Construction of a vectorized knowledge base for the security domain To enable large models to understand enterprise-specific business terminology and risk logic, the system pre-builds a vectorized domain knowledge base. For example, the system segments unstructured documents such as the enterprise's safety production management system and contractor management specifications into text fragments of 512 tokens, calls the embedding model to convert them into 1024-dimensional vectors, and stores them in a vector database (such as Milvus).
[0122] For example, there is a rule in the policy document: "Confined space operations require a special operation certificate and must include gas detection." The system segments this rule and stores it as a knowledge fragment K1.
[0123] (2) Real-time indexing of dynamic data based on early warning results Traditional RAGs can only retrieve static documents. This embodiment generates summary text in real time from the early warning results (i.e., predictive risk events) generated in embodiments 1 and 2 above, and also converts them into vectors for storage in the knowledge base. This enables the large model to retrieve not only static regulations, but also real-time early warning information based on dynamic predictions, achieving minute-level dynamic evolution of the knowledge base.
[0124] For example, in Example 1, a pre-warning record was generated: {Person: "Zhang San", Risk_Score:0.85, Intention: "Entering the hazardous chemicals storage area without a license", Time: "2024-05-21 14:05"}. The system automatically converted it into text: "On May 21, 2024, the system predicts that contractor Zhang San (ordinary electrician) will enter the hazardous chemicals storage area without a license within the next hour, with a comprehensive risk score of 0.85." This text was then vectorized and stored in the knowledge base as a dynamic knowledge fragment K2.
[0125] (3) Retrieve relevant information The system uses the user's natural language query and structured query commands as keys to perform similarity retrieval (such as calculating cosine similarity) in the vector database, and recalls the Top-K most relevant static institutional fragments and dynamic predicted intelligence fragments.
[0126] For example, in response to a supervisor's query "Why is the risk high?", the system searches the vector library. It retrieves dynamic intelligence fragment K2 (an early warning of Zhang San entering a hazardous chemical storage area without a permit), static regulatory fragment K1 (regulations requiring special operation permits for confined spaces or hazardous chemical areas), and historical case fragment K3 (an accident report of a factory where a fire was caused by unlicensed personnel entering a hazardous chemical storage area). This information will serve as the factual basis for the large-scale model's reasoning.
[0127] 303. Utilize large language models to generate natural language text containing attribution analysis and treatment suggestions based on retrieved information, as decision support information.
[0128] This step aims to integrate structured data with unstructured knowledge to generate easily understandable decision recommendations.
[0129] (1) Precise data acquisition based on Text-to-SQL For queries that require precise numerical values, such as "performance status," the system uses a large model to convert natural language into SQL statements and extract precise data from the database.
[0130] For example, the large model generates an SQL query prediction result table based on the database schema and obtains the data: {Name: "Zhang San", Team: "Special Operations Team", Risk_Score: 0.92, Intention: "Unlicensed Entry into Restricted Space", Attendance_Rate: "60%"}.
[0131] (2) Attribution analysis and treatment recommendations The system builds enhanced prompts to retrieve precise data (D) from Text-to-SQL. sql), knowledge fragments retrieved by RAG (K rag The system combines user questions with a large language model for input. The large model performs logical reasoning to generate natural language text with a structure of "data statement - cause analysis - remedial suggestions".
[0132] For example, the system inputs the following prompt word into the Ollama large model: "You are an enterprise security decision-making assistant. Please answer user questions based on the following information."
[0133] User question: Please help me check the performance of the contractors this week, especially the team with the highest risk. Why is the risk so high, and what should I do? Database query results: The team with the highest risk this week is the special operations team. Personnel Zhang San has a risk score as high as 0.92, and the predicted intention is "entering a restricted space without a license". Their attendance rate this week is only 60%.
[0134] The regulations found state that confined space operations require a special operations permit and must include gas detection.
[0135] Accident case found: In 2022, a fire broke out in a factory area due to unlicensed personnel entering a hazardous chemical warehouse.
[0136] Please generate attribution analysis and action recommendations. The final decision support information generated by the large model is as follows: "According to the system's prediction, the contractor team with the highest risk this week is the 'Special Operations Team,' among which the risk score of personnel 'Zhang San' is as high as 0.92 (extremely high risk), and his attendance rate this week is only 60%."
[0137] Attribution Analysis: The system detected that Zhang San holds a general electrician's certificate, but recent trajectory and sequence model predictions show that he frequently moves within confined space work areas, indicating that he will be working without specialized qualifications. This seriously violates the "Safety Production Management System" regulation that "confined space operations require a special operation certificate." Based on historical cases, such behavior is highly likely to cause safety accidents. A performance rate of only 60% suggests that he may be engaging in "performance fraud," such as clocking in and leaving the site.
[0138] Recommendations for handling: 1. Immediately notify the person in charge of the special operations team to verify Zhang San's work qualifications. If he is indeed working without a certificate, his work should be stopped immediately.
[0139] 2. Initiate the process of interviewing those who violated safety regulations and punish them for falsifying their performance record.
[0140] 3. Temporarily restrict Zhang San's access to the restricted space area in the access control system.
[0141] 4. It is recommended that the on-site safety officer conduct random checks on the qualifications of other members of the team. (3) Dynamic generation of visual reports If the user's intent includes "view reports" or "trends", the system calls the visualization interface, dynamically renders a chart based on the query data, and embeds it into the dialogue response.
[0142] For example, a user might then ask, "Show me this week's risk trends." The system backend calls the Echarts library to generate a line chart based on the daily risk score data for the week, and displays the chart directly in the dialog window as an image stream, visually demonstrating risk fluctuations.
[0143] In this embodiment, the target object simply refers to any business entity (such as personnel, vehicles, teams, or projects) specified by the user's natural language query. In this scenario, the "target object" is not actively monitored by the system, but passively specified by the management (user) through a natural language query. The system extracts the target object from the user's question using intent recognition and slot filling techniques, then retrieves the "predictive warning results" generated for that object in embodiments 1 and 2 from the database, and combines this with the institutional knowledge retrieved by RAG to generate a decision support report for that object using a large language model.
[0144] For example, the target object is the user-described "team with the highest risk this week" and the specific person "Zhang San". Query analysis: The safety supervisor inputs: "Please check the contractors' performance this week, especially the team with the highest risk." The system, through intent recognition, identifies the target object as the person with the highest Risk_Score in the database and their team. Retrieval and generation: The system retrieves the target object as "Zhang San of the special operations team" and retrieves the prediction and warning record generated in Example 1 (risk score 0.92, predicting unlicensed entry into a confined space). The large model, combined with the retrieved "Confined Space Operation Specifications," generates an attribution analysis report and handling recommendations for this target object.
[0145] This embodiment achieves zero-threshold decision support. Management does not need to write SQL or view complex backend data tables; they can complete the entire query chain, from macro-statistics to micro-cases, using natural language. More importantly, by introducing dynamic predictive data indexes through RAG technology, the transformation from technical prediction (Examples 1 and 2) to management decision-making is realized, enabling early warning results to be truly transformed into actionable management actions, greatly improving the intelligence level of enterprise security management.
[0146] Please see Figure 2 One embodiment of the factory area safety risk early warning device in this invention includes: Module 10 is used to acquire multi-source spatiotemporal data of the target object and construct a standardized behavior sequence; Prediction module 20 is used to predict the behavioral trajectory of the target object within a future time window based on the behavioral sequence; Evaluation module 30 is used to map the predicted behavioral trajectory to a dynamic risk map, and obtain a risk intent score by evaluating the risk of the associated path formed by the behavioral trajectory in the dynamic risk map; The early warning module 40 is used to generate a comprehensive risk score based on the risk intent score and trigger an early warning according to a dynamic threshold.
[0147] In an optional embodiment, the building module is specifically used for: Acquire multi-source spatiotemporal data of the target object, wherein the multi-source spatiotemporal data includes at least one of access control records, attendance records, vehicle passage records, and video recognition results; Entity alignment and event generation are performed on the multi-source spatiotemporal data to obtain basic spatiotemporal behavioral events; The basic spatiotemporal behavioral events are transformed into vector representations containing spatiotemporal context semantics and arranged in chronological order to obtain a standardized behavioral sequence.
[0148] In an optional embodiment, the building module is further configured to: Construct a domain-specific vocabulary, which includes personnel identity tags, region tags, behavior types, and time characteristics; Based on the domain-specific vocabulary, the basic spatiotemporal behavioral events are constructed into natural language descriptive text; Using a pre-trained language representation model, the natural language description text is converted into dense vectors, which are then used as vector representations of the underlying spatiotemporal behavioral events.
[0149] In an optional embodiment, the prediction module 20 is specifically used for: The behavioral sequence is input into the sequence model; The sequence-to-sequence model is used to predict the areas the target object may enter, the vehicles it may use, or the types of materials it may come into contact with within a future time window.
[0150] In one optional embodiment, the dynamic risk map includes personnel nodes, area nodes, vehicle nodes, material nodes, and relationship edges between nodes; the relationship edges include the entry relationship between personnel and area, the driving relationship between personnel and vehicle, and the transportation relationship between vehicle and material, and each relationship edge is timestamped.
[0151] In an optional embodiment, the evaluation module 30 is specifically used for: Using a temporal graph attention network, the risk probability of the path formed by the hypothetical edge of the behavioral trajectory in the dynamic risk graph and the existing graph structure is evaluated to obtain a risk intention score.
[0152] In an optional embodiment, the personnel safety risk warning device further includes: The retrieval module 50 is used to respond to a natural language query input by the user; based on the result of the advance warning, it uses retrieval enhancement generation technology to retrieve information related to the natural language query and the result of the advance warning from a vectorized domain knowledge base; and uses a large language model to generate natural language text containing attribution analysis and treatment suggestions based on the retrieved information as decision support information.
[0153] Since the embodiments of the device part correspond to the embodiments of the above method, please refer to the above method embodiments for the introduction of the factory area safety risk early warning device provided by the present invention. The present invention will not be described again here, but it has the same beneficial effects as the above factory area safety risk early warning method.
[0154] Figure 3 This is a schematic diagram of the structure of a computer device 500 provided in an embodiment of the present invention. The computer device 500 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing application programs 533 or data 532. The memory 520 and storage media 530 can be temporary or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the computer device 500. Furthermore, the processor 510 may be configured to communicate with the storage media 530 and execute the series of instruction operations in the storage media 530 on the computer device 500.
[0155] Computer device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0156] The present invention also provides a computer device, the computer device including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor performs the steps of the factory safety risk early warning method described in the above embodiments. The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer performs the steps of the factory safety risk early warning method described in the above embodiments.
[0157] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0158] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0159] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for early warning of safety risks in factory areas, characterized in that, include: Acquire multi-source spatiotemporal data of the target object and construct a standardized behavior sequence; Based on the behavioral sequence, predict the behavioral trajectory of the target object within a future time window; The predicted behavioral trajectory is mapped to a dynamic risk map, and a risk intent score is obtained by assessing the risk of the associated paths formed by the behavioral trajectory in the dynamic risk map. Based on the risk intent score, a comprehensive risk score is generated, and an advance warning is triggered according to a dynamic threshold.
2. The factory area safety risk early warning method according to claim 1, characterized in that, The process of acquiring multi-source spatiotemporal data of the target object and constructing a standardized behavioral sequence includes: Acquire multi-source spatiotemporal data of the target object, wherein the multi-source spatiotemporal data includes at least one of access control records, attendance records, vehicle passage records, and video recognition results; Entity alignment and event generation are performed on the multi-source spatiotemporal data to obtain basic spatiotemporal behavioral events; The basic spatiotemporal behavioral events are transformed into vector representations containing spatiotemporal context semantics and arranged in chronological order to obtain a standardized behavioral sequence.
3. The factory area safety risk early warning method according to claim 2, characterized in that, The process of transforming the basic spatiotemporal behavioral events into vector representations containing spatiotemporal context semantics includes: Construct a domain-specific vocabulary, which includes personnel identity tags, region tags, behavior types, and time characteristics; Based on the domain-specific vocabulary, the basic spatiotemporal behavioral events are constructed into natural language descriptive text; Using a pre-trained language representation model, the natural language description text is converted into dense vectors, which are then used as vector representations of the underlying spatiotemporal behavioral events.
4. The factory area safety risk early warning method according to any one of claims 1-3, characterized in that, The prediction of the target object's behavioral trajectory within a future time window based on the behavioral sequence includes: The behavioral sequence is input into the sequence model; The sequence-to-sequence model is used to predict the areas the target object may enter, the vehicles it may use, or the types of materials it may come into contact with within a future time window.
5. The factory area safety risk early warning method according to claim 1, characterized in that, The dynamic risk map includes personnel nodes, area nodes, vehicle nodes, material nodes, and relationship edges between nodes; the relationship edges include the entry relationship between personnel and area, the driving relationship between personnel and vehicle, and the transportation relationship between vehicle and material, and each relationship edge is timestamped.
6. The factory area safety risk early warning method according to claim 1 or 5, characterized in that, The risk intent score obtained by assessing the risk of the associated paths formed by the behavioral trajectories in the dynamic risk map includes: Using a temporal graph attention network, the risk probability of the path formed by the hypothetical edge of the behavioral trajectory in the dynamic risk graph and the existing graph structure is evaluated to obtain a risk intention score.
7. The factory area safety risk early warning method according to claim 1, characterized in that, Also includes: Responding to natural language queries entered by the user; Based on the results of the advance warning, information related to the natural language query and the results of the advance warning is retrieved from a vectorized domain knowledge base using retrieval enhancement generation technology. Using a large language model, natural language text containing attribution analysis and action recommendations is generated based on the retrieved information, serving as decision support information.
8. A factory area safety risk early warning device, characterized in that, include: The module is used to acquire multi-source spatiotemporal data of the target object and construct a standardized behavior sequence; The prediction module is used to predict the behavioral trajectory of the target object within a future time window based on the behavioral sequence. An evaluation module is used to map the predicted behavioral trajectory to a dynamic risk map, and obtain a risk intent score by evaluating the risk of the associated paths formed by the behavioral trajectory in the dynamic risk map. The early warning module is used to generate a comprehensive risk score based on the risk intent score and trigger an early warning according to a dynamic threshold.
9. A computer device, characterized in that, The computer device includes: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the computer device to execute the factory area safety risk early warning method as described in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instruction is executed by the processor, it implements the factory area safety risk early warning method as described in any one of claims 1-7.