AI-based station building automatic early warning and control method and gateway

By using edge gateways and AI preliminary judgment models in the station, combined with the information gain-cost ratio objective function and secondary observation, an evidence chain is generated, which solves the problems of high false alarms and invalid linkages in the station, and achieves the effects of reducing false alarm rate, reducing invalid linkages and equipment wear.

CN122116544APending Publication Date: 2026-05-29TIANJIN HAOYUAN HUINENG TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN HAOYUAN HUINENG TECH CO LTD
Filing Date
2026-04-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies in stations suffer from high false alarm rates, numerous invalid linkages, increased equipment wear and energy consumption, and a lack of explainable evidence chains. In particular, in unattended scenarios, existing AI recognition methods cannot effectively reduce false alarm rates and invalid linkages.

Method used

An AI-based automatic early warning and control method for railway stations is adopted. Video streams are accessed through an edge gateway, and an AI preliminary judgment model is used for initial event identification. Verification actions are selected and secondary observations are performed to generate an evidence chain, reducing false alarm rates and invalid linkages. This method includes selecting verification actions using an information gain-cost ratio objective function, and generating an evidence chain by combining re-judgment probability and consistency evidence.

Benefits of technology

Significantly reduces false alarm rate, minimizes invalid linkage, provides a traceable chain of evidence, reduces equipment wear and energy consumption, is suitable for gateway deployment and easy to implement in engineering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122116544A_ABST
    Figure CN122116544A_ABST
Patent Text Reader

Abstract

The application provides an AI-based station building automatic early warning and control method and gateway. The gateway side performs AI preliminary judgment on station building video stream and station building state data to obtain a candidate event and a preliminary judgment probability. When a verification trigger condition is met, a verification action is adaptively selected from a verification action library and executed to change an observation condition and obtain secondary observation data. The verification action selection adopts an information gain-cost ratio objective function, the expected information gain and cost of each candidate verification action are calculated, and the action with the maximum information gain-cost ratio is selected for execution. Then, the gain and consistency evidence of the probabilities before and after the verification in the logarithmic ratio space are subjected to secondary judgment, the early warning and linkage control are triggered only when the verification is passed, and an explainable evidence chain is generated and reported. The application has the beneficial effects of significantly reducing false alarms and invalid linkages, and improving the early warning credibility and disposal efficiency in the station building unattended scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of intelligent operation and maintenance of power substations and intelligent video analysis and computing technology, and in particular relates to an AI-based automatic early warning and control method and gateway for power substations. Background Technology

[0002] Cameras inside station buildings (such as power distribution rooms, switching stations, and substation auxiliary buildings) face complex operating conditions including low light, reflections, steam and dust, insect interference, lens shake, and obstruction. Existing technologies mostly adopt a direct-pass processing approach of "AI recognition for alarm / linkage" or a fixed verification action strategy, resulting in high false alarm rates, numerous invalid linkages, increased equipment wear and energy consumption, and a lack of explainable evidence chains.

[0003] In unmanned station scenarios, a technical solution is needed that can reduce false alarms and invalid linkages and provide a traceable chain of evidence. Summary of the Invention

[0004] In view of this, the present invention aims to propose an AI-based automatic early warning and control method and gateway for station buildings, in order to solve the problems of high false alarms, many invalid linkages, increased equipment wear and energy consumption, and lack of interpretable evidence chains in the existing technology.

[0005] To achieve the above objectives, the technical solution of the present invention is implemented as follows: In a first aspect, the present invention provides an AI-based automatic early warning and control method for railway stations, comprising the following steps: S1. Utilize the edge gateway to access the station's video stream and collect station status data; based on the station's video stream and station status data, use an AI preliminary judgment model to perform AI preliminary judgment and obtain a list of candidate event objects; S2. Based on the candidate event object, determine whether the preset verification trigger condition is met. If so, use the information gain-cost ratio objective function to select a verification action from the verification action library and execute the verification action. S3. For candidate event objects that meet the verification triggering conditions and have performed verification actions in step S2, perform secondary observation and obtain secondary observation data. S4. Based on secondary observation data, obtain the re-judgment probability, log odds gain, and consistency evidence. Based on the re-judgment probability, log odds gain, and consistency evidence, determine whether the judgment conditions are met. If so, trigger an alarm, execute linkage control, and report the evidence chain.

[0006] Furthermore, in step S1, the attributes of the candidate event object include event identifier, event type, spatial location, initial judgment timestamp, and initial judgment probability.

[0007] Furthermore, in step S2, the expression for selecting the verification action is as follows: ; In the formula, The selected optimal verification action; To verify the action library; The information gain-cost ratio is expressed as follows: ; In the formula, To verify the expected information gain of the action, To verify the cost of the action, It is a constant; The expression is as follows: ; In the formula, The predicted probability after candidate verification action a is executed; This is the initial probability; The logarithmic probability function is expressed as follows: ; In the formula, Let be the probability value to be mapped to the log-odds space; The expression is as follows: ; In the formula, For the cost of time, For the cost of energy consumption, As a result of wear and tear, To incur the risk of disruption, , , and These are preset weights for time, energy consumption, wear and tear, and disturbance risk, respectively.

[0008] Furthermore, in step S2, the verification actions in the verification action library include supplementary lighting verification, viewing angle verification, ventilation pulse verification, door magnetic point inspection verification, audio-visual short prompt verification, and empty action; The supplemental lighting verification includes controlling the lighting equipment to turn on and adjusting the brightness; Viewpoint verification includes controlling the gimbal to perform preset angle deflection and zoom.

[0009] Furthermore, in step S3, a second observation is performed, and the second observation data is obtained, including: S31, Waiting for stabilization time; S32. Secondary sampling: Set an observation window, collect the station video stream based on the observation window, then extract a set number of frames from the video stream, and simultaneously collect one or more sensor snapshots. S33. Select keyframes from the observation window and generate a summary.

[0010] Furthermore, in step S4, the expression for the logarithmic probability gain is as follows: ; In the formula, For logarithmic probability gain, For the probability of re-judgment, This is the initial probability; The expression for consistency evidence is as follows: ; In the formula, As evidence of consistency, Evidence of temporal consistency Evidence for trajectory continuity Evidence of sensor correlation .

[0011] Furthermore, in step S4, the re-judgment probability is obtained, including: The preprocessed secondary observation images are input into the re-judgment model to obtain frame-level probabilities. By using a weighted average or log-odds average, the frame-level probabilities are aggregated into window-level re-decision probabilities.

[0012] Furthermore, in step S4, the expression for the determination condition is as follows: ; In the formula, For the probability of re-judgment, For logarithmic probability gain, As evidence of consistency, The threshold for the re-judgment probability. For gain threshold, This is the threshold for consistent evidence.

[0013] Furthermore, in step S4, the chain of evidence includes candidate events, verification actions, keyframe summaries before and after verification, log odds gain, and consistency evidence.

[0014] Secondly, based on the same concept, the present invention also provides an AI-based automatic early warning and control gateway for railway stations, comprising: The video access module is used to access the station's video stream and obtain video frames before and after verification. The status acquisition module is used to collect station status data; The AI ​​preliminary judgment module is used to output a list of candidate event objects and their corresponding preliminary judgment probabilities based on the pre-verification video frames and station status data. The verification action library module is used to store the set of candidate verification actions and the parameters of each verification action; The verification action impact prediction module outputs the predicted probability after the verification action is executed, based on the initial judgment probability, station context features, and candidate verification actions. The information gain calculation module is used to calculate the expected information gain for each candidate verification action; The cost calculation module is used to calculate the action cost for each candidate verification action; The action selection module is used to select the optimal verification action based on the scoring function; The secondary observation and acquisition module is used to acquire secondary observation data after performing the optimal verification action; The secondary judgment module obtains the re-judgment probability based on secondary observation data and calculates the log odds gain and consistency evidence. The evidence chain generation module is used to generate evidence chain data corresponding to the secondary judgment result; The linkage control module is used to execute station linkage control when the secondary judgment result meets the judgment conditions; The reporting module is used to report the secondary judgment results and evidence chain data to the platform.

[0015] Compared with existing technologies, the AI-based automatic early warning and control method and gateway for railway stations described in this invention have the following advantages: Significantly reduced false alarms: Adaptive selection of the most effective verification actions and filtering of interference such as low light, reflection, and vapor in secondary judgments. Reduced invalid linkages: High-perturbation actions are naturally suppressed due to their high cost and are only selected when the information gain is sufficiently large. Stronger evidence chain: Recording verification actions and log-probability gain / consistency indicators facilitates review and auditing. Easy engineering implementation: The predicted probability after the execution of verification actions can be implemented using rule lookup tables or lightweight models, making it suitable for gateway deployment. Attached Figure Description

[0016] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the overall architecture as described in an embodiment of the present invention; Figure 2 This is a schematic diagram of the overall process described in an embodiment of the present invention; Figure 3 This is a schematic diagram of the information gain-cost ratio calculation process according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the secondary judgment and evidence chain structure described in an embodiment of the present invention. Detailed Implementation

[0017] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0018] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0019] like Figures 1 to 4 As shown, the AI-based automatic early warning and control method for railway stations includes the following steps: S1. Utilize an edge gateway to access the station's video stream and collect station status data; based on the station's video stream and status data, use an AI preliminary judgment model to perform AI preliminary judgment and obtain a list of candidate event objects. Each candidate event object includes at least an event identifier, event type, spatial location, preliminary judgment timestamp, and preliminary judgment probability. It should be noted that the gateway or edge gateway referred to in this invention refers to an intelligent gateway device with edge computing capabilities. S2. Based on the candidate event object, determine whether the preset verification trigger condition is met. If so, use the information gain-cost ratio objective function to select a verification action from the verification action library and execute the verification action. It should be noted that in the following description, the candidate event is equivalent to the candidate event object in the candidate event object list. S3. For candidate event objects that meet the verification triggering conditions and have performed verification actions in step S2, perform secondary observation and obtain secondary observation data. S4. Based on secondary observation data, obtain the re-judgment probability, log odds gain, and consistency evidence. Based on the re-judgment probability, log odds gain, and consistency evidence, determine whether the judgment conditions are met. If so, trigger an alarm, execute linkage control, and report the evidence chain.

[0020] In practical use, the verification trigger probability threshold of the initial judgment probability can be used. And the threshold for the re-judgment probability. Dynamic calibration is performed. Specifically, based on the results of historical candidate events in steps S2 and S4, as well as the results of long-window verification, multi-sensor consistency, and / or manual sampling, weakly labeled samples are generated. Based on these weakly labeled samples, the relevant verification thresholds (verification trigger probability thresholds) are updated periodically. And the threshold for the re-judgment probability. Among them, historical candidate events are candidate events that have run in previous cycles.

[0021] This invention also proposes an AI-based automatic early warning and control gateway for railway stations, including a video access module, a status acquisition module, an AI preliminary judgment module, a verification action library module, a verification action impact prediction module, an information gain calculation module, a cost calculation module, an action selection module, a secondary observation and acquisition module, a secondary judgment module, an evidence chain generation module, a linkage control module, and a reporting module.

[0022] In a preferred embodiment of the present invention, a video access module is used to access the station video stream and acquire video frames before and after verification; a status acquisition module is used to collect station status data; and an AI preliminary judgment module is used to output a list of candidate event objects and corresponding preliminary judgment probabilities based on the video frames before verification and the station status data. The system comprises the following modules: a verification action library module for storing candidate verification action sets and parameters for each action; a verification action impact prediction module for outputting the predicted probability after execution of a verification action based on the initial judgment probability, station context features, and candidate verification actions; an information gain calculation module for calculating the expected information gain for each candidate verification action; a cost calculation module for calculating the action cost for each candidate verification action; an action selection module for selecting the optimal verification action based on a scoring function; a secondary observation acquisition module for acquiring secondary observation data after executing the optimal verification action; a secondary judgment module for obtaining the re-judgment probability based on the secondary observation data and calculating the log-odds gain and consistency evidence; an evidence chain generation module for generating evidence chain data corresponding to the secondary judgment result; a linkage control module for executing station linkage control when the secondary judgment result meets the judgment conditions; and a reporting module for reporting the secondary judgment result and evidence chain data to the platform.

[0023] In a preferred embodiment of the present invention, in step S1, the station video stream can be a compressed bitstream accessed via a session control protocol, such as RTSP or SIP. The media data can be encapsulated using RTP / RTCP and transmitted via UDP or TCP. For example, after establishing a session via RTSP, the media data is transmitted via RTP; or after completing session negotiation via SIP / SDP, the media data is transmitted via RTP. In another embodiment, if SIP is used as the session control, the media data is encapsulated using RTP / RTCP and transmitted via UDP or TCP. SIP is used for session establishment and parameter negotiation, and RTP / RTCP is used for media transmission. The encoding format of the compressed bitstream can be H.264 or H.265. The gateway demultiplexes or unpacks and decodes the bitstream to obtain pixel frames. The gateway appends or inherits video timestamps to the video frames of the station video stream. (Can be from RTP timestamp, PTS / DTS or local reception time).

[0024] In a preferred embodiment of the present invention, in step S1, the station status data consists of multi-source sensor / switch data collected by the gateway and station context features. The station status data includes at least one or more of the following: door magnetic status, smoke / temperature sensor status, water immersion status, temperature and humidity, illuminance, and equipment switch inputs. The acquisition period can be 0.2s to 2s (preferably 0.5s to 1s), and each status data entry has a status timestamp. To achieve spatiotemporal alignment between the video stream and state data, the gateway selects the state vector that is temporally closest to each inference video frame as the synchronization input, satisfying... ,in, The timestamp representing the inference video frame, i.e., the video timestamp. The timestamp representing the selected state data, i.e., the state timestamp. It can be configured from 0.5s to 2s; when in When there is no matching status data, the missing fields are marked with default values ​​and a mask to avoid mismatch.

[0025] In a preferred embodiment of the present invention, in step S1, the candidate event is a structured object output by the gateway after performing AI preliminary judgment on the station video stream and / or station status data. Its attributes include at least the following parallel fields: event identifier (eventId), event type (eventType), spatial location (spatialLocation), and preliminary judgment timestamp. and initial probability .

[0026] The event identifier (eventId) is generated by the gateway after receiving the model output. It is used to uniquely identify candidate events and can be determined by cameraId, etc. The hash is obtained by combining eventType and spatialLocation.

[0027] Event types include intrusion, smoke / flame, water accumulation / leakage, access control anomaly, equipment appearance / indicator light anomaly, etc., and are bound to the linkage strategy table (e.g.: intrusion prioritizes supplementary lighting / pan-tilt verification, smoke prioritizes supplementary lighting / fan pulse verification, access control anomaly prioritizes door magnetic inspection verification).

[0028] Spatial location (region of interest (ROI) in a video frame) is used to characterize the spatial extent of a candidate event within the station's video surveillance footage, and can take any of the following forms: (1) Bounding Box: The parameters of the bounding box are given in the image coordinate system. (x,y,w,h), optionally using normalized coordinates to [0,1]; (2) Polygon / Mask: The event region is represented by a number of vertex coordinates or pixel masks, which is suitable for segmentation events such as water accumulation / smoke; (3) When the candidate event comes from multiple cameras / multiple preset positions, the spatial location (region of interest ROI in the video frame) can also be accompanied by camera ID (cameraId), preset ID (presetId) or ROIId to uniquely determine the viewpoint and area of ​​the screen corresponding to the event.

[0029] Among them, the initial probability It is an attribute field of the candidate event object, used to represent the probability that the candidate event is true at the initial judgment time.

[0030] In a preferred embodiment of the present invention, in step S1, to measure the "change in the strength of evidence", the initial probability of the candidate event is mapped to the log-odds space, as shown in the following expression: ; Log odds is often used in statistical discrimination to express the strength of evidence supporting true / false, and it can avoid the problem of inconsistent meanings when the probability changes in different intervals.

[0031] In a preferred embodiment of the present invention, in step S1, the AI ​​preliminary judgment is used to output a list of candidate event objects. Depending on the type of candidate event, the AI ​​preliminary judgment model can select any of the following types or combinations thereof: (1) Target detection model: used for events such as personnel intrusion and abnormal opening of access control, outputting target boxes and confidence scores; (2) Semantic segmentation model: used for events such as water accumulation / leakage and smoke diffusion, outputting region masks and region confidence scores; (3) Image classification / multi-classification model: used for events such as flames and abnormal equipment appearance, outputting category probabilities; (4) Multimodal fusion model: outputting event probabilities after fusing video features and state data features, wherein video features are extracted by convolutional networks / visual Transformers, and state data features are extracted by multilayer perceptrons or rule encodings, and the two are concatenated in the fusion layer to output candidate event probabilities. It should be noted that the state vector Represented as: , in, In door sensor state, In smoke / temperature sensing mode, It is in a state of water immersion. For temperature, For humidity, For illuminance, For device switch input, This refers to the contextual features of the station building.

[0032] In this embodiment, the AI ​​preliminary judgment model is deployed on the edge gateway side, and the input and output interfaces of the AI ​​preliminary judgment model are defined as follows: F:( , , )→{ }; in, For the inference video frame corresponding to timestamp t, To infer video frames Time-aligned state vectors State vector Mask of missing fields; candidate This is the m-th candidate event object.

[0033] Specifically, the gateway infers video frames. Video timestamp and status timestamp Choose to satisfy | - Construct a state vector from the state data that is ≤Δt and whose time is closest. When no matching status data exists within the time tolerance Δt, the missing fields are filled with default values, and then... Mark missing fields.

[0034] The field structure is consistent with the aforementioned candidate event object, including at least the event identifier (eventId), event type (eventType), spatial location (spatialLocation), and initial judgment timestamp. and initial probability .

[0035] When the AI ​​initially identifies the task as object detection, it can output multiple bounding boxes and their confidence scores in a single frame. The gateway will initially determine the probability of candidate events. Defined as the maximum confidence or aggregate confidence that satisfies the threshold condition, for example: When the AI ​​initially identifies it as a segmentation task, It can be obtained by mapping the average confidence score of the mask to the area ratio; when it is a classification task, Output the sigmoid / softmax probabilities for the corresponding category. The gateway deduplicates and merges candidate events within the same time window based on the event type and spatial location fields, forming the final candidate event object output.

[0036] In a preferred embodiment of the present invention, in step S2, the expression for selecting the verification action is as follows: ; In the formula, The selected optimal verification action; To verify the action library; This represents the information gain-cost ratio. The meaning of this expression is: actions that yield the greatest "deterministic improvement" per unit cost are prioritized, avoiding frequent execution of high-disturbance actions unnecessarily. The verification action library includes supplementary lighting verification, viewing angle verification, ventilation pulse verification, door magnetic check verification, short audio-visual cue verification, and no-action actions; among them, no-action actions are used to perform secondary sampling without changing observation conditions; supplementary lighting verification includes controlling the lighting equipment to turn on and adjust brightness; viewing angle verification includes controlling the pan / tilt unit to perform preset angle deflection and zoom.

[0037] Among them, the information gain-cost ratio The expression is as follows: ; In the formula, To verify the expected information gain of the action, To verify the cost of the action, Use a constant (pre-set positive number) to avoid =0 results in a denominator of 0 and suppresses extreme amplification.

[0038] Among them, the expected information gain of the verification action The expression is as follows: ; In the formula, The predicted probability after the execution of candidate verification action a is given. It should be noted that the predicted probability after the execution of verification action is output by the action prediction module. The action prediction module retrieves the prediction gain corresponding to the candidate verification action from the pre-built action effect table based on the event type, initial judgment probability, station context features and candidate verification action of the candidate event, and obtains the predicted probability after the execution of verification action accordingly. This is the initial probability; This is a log-odds function. The meaning of this expression is: candidate verification action 'a' is expected to reduce the current strength of evidence from... Driven to The greater the amplitude, the more the action can clarify the truth.

[0039] The expression for the logarithmic probability function is as follows: ; In the formula, Let be the probability values ​​to be mapped to log-odds space. To avoid divergence in log-odds calculations, the probability values ​​to be mapped to log-odds space are truncated to ensure that they satisfy the following conditions: ,in , is a preset very small constant, for example .

[0040] Among them, regarding the cost of the verification action , considering the constraints of the station building project, the cost is split into four categories and weighted, The expression of is as follows: ; In the formula, is the time consumed for action execution and secondary sampling (affecting the response delay), representing the time cost; represents the energy consumption cost (such as lighting, fans, etc.); represents the wear cost (affecting the lifespan of the pan-tilt, relay, access control actuator); represents the disturbance / risk cost (such as disturbing the residents with sound and light, accidentally triggering the operation safety process, etc.); the weight is set based on the project objectives (for example, "strong reduction of false alarms" can increase ).

[0041] In a preferred embodiment of the present invention, in step S2, in order to make the preliminary judgment probability have the same probability meaning as the subsequent threshold judgment, the gateway can perform probability calibration on the original output of the model. The calibration method can be temperature scaling or Platt scaling, etc. The calibration parameters are fitted offline on historical samples, and the original output is mapped during online inference to obtain the calibrated preliminary judgment probability . The verification trigger condition is jointly determined based on the calibrated preliminary judgment probability and the duration; let the verification trigger probability threshold be , and the duration threshold be d.

[0042] When and the duration for which the candidate event continuously satisfies this probability condition ≥ d, it is determined that the verification trigger condition is satisfied, and the verification action selection process is entered; When but the duration for which the candidate event continuously satisfies this probability condition < d, the candidate event is set to the pending observation state, and the monitoring continues and the duration is accumulated, and the verification action is not executed temporarily; if during the accumulation process drops to less than , the pending observation state is cancelled and the normal monitoring continues.

[0043] When , it is determined that the verification trigger condition is not satisfied, the verification action is not executed, the alarm is not triggered, and the normal monitoring continues.

[0044] It should be noted that the verification trigger condition is only used to determine whether to enter the verification process, and whether the alarm is triggered is determined by the secondary determination condition in step S4.

[0045] In a preferred embodiment of the present invention, weakly labeled samples are used to set a verification trigger probability threshold. Re-judgment probability threshold Perform adaptive updates; the results can be determined first based on the statistical results of weakly labeled samples. Then determine based on the recall target or experience ratio. The gateway generates weakly labeled tags for each candidate event. The possible values ​​are {1, 0, unknown}. Its generation rule is: (1) Long window review: a longer window after the candidate event occurs. If the event persists on the video side and / or the re-judgment probability remains high for a long period of time (e.g., within 10s to 120s), then it is marked. If the event disappears quickly and in If it does not reappear, then mark it. ; (2) Multi-sensor consistency: If the status data of smoke detectors / door magnets / water immersion sensors are in... If the internal event triggers in line with the candidate event, then mark it. If a clear contradiction is found (e.g., the door sensor remains closed for an extended period without any continuous evidence of human detection), then mark it as such. ; (3) Manual sampling / work order closed loop: If the manual review or work order processing result confirms the actual event, then mark it. If a false alarm is confirmed, mark it. If no conclusion has been reached, then it is "unknown".

[0046] Threshold updates can be performed periodically (e.g., weekly / monthly) on buckets (timeBucket, illumBucket, disturbBucket) for the same event type and scenario. The distribution, and to meet the target accuracy. (e.g., 0.95) method selection ; It can be set according to the recall target or experience ratio (e.g.) To avoid threshold jitter, exponential smoothing can be applied to the update results, as shown in the following expression: ,in, The updated verification trigger probability threshold. The verification trigger probability threshold before the update. The threshold value for verification triggering probability is estimated based on the statistical analysis of weakly labeled samples within the current update cycle. μ is a smoothing coefficient, ranging from 0.05 to 0.3. , , For Update; It can be determined individually based on the accuracy target or updated periodically.

[0047] Specifically, It can be obtained by statistically analyzing weakly labeled samples under the same event type, same time, same illuminance, and same interference bin.

[0048] In a preferred embodiment of the present invention, the secondary observation step in step S3 is as follows: (1) Performing actions: Control the actuator to complete the action according to the action type; (2) Stable waiting: Set the stable waiting time It is used to stabilize lighting brightness, ensure pan-tilt positioning, and stabilize fan airflow. (3) Secondary sampling: The sampling time is after stabilization. The observation window extracts N frames from the video stream and simultaneously captures one or more sensor snapshots. (4) Keyframe / Summary Generation: Select keyframes from the sampling window and generate summaries.

[0049] In a preferred embodiment of the present invention, in step S4, the re-judgment probability is obtained based on the secondary observation data. The steps are as follows: (1) For each frame of image Perform preprocessing such as resolution scaling, normalization, and ROI clipping to obtain the model input. .

[0050] (2) Input the data into the re-judgment model to obtain frame-level output. Determine the frame-level probability based on the AI ​​task type (binary / multi-class classification, object detection, or segmentation). .

[0051] (3) To reduce the impact of single-frame noise and occasional false detections, the frame-level probability within the secondary sampling window is adjusted. Aggregate into re-judgment probability Aggregation methods include weighted average aggregation and log-odds average aggregation.

[0052] It should be noted that in this invention, the reasoning process based on the artificial intelligence model includes AI preliminary judgment reasoning and AI secondary judgment reasoning. AI preliminary judgment reasoning refers to the process by which the preliminary judgment model (first AI model) infers from normally sampled video frames (and / or aligned station status data) and outputs candidate event objects. AI secondary judgment reasoning refers to the process by which the secondary judgment model (second AI model) infers from the secondary observation data after the verification action is performed, obtains frame-level probabilities, and aggregates them to obtain secondary judgment probabilities. The secondary judgment model and the preliminary judgment model can be the same or different. When they are the same, the secondary judgment reasoning and the preliminary judgment reasoning use the same model but different input sampling strategies (e.g., higher frame rate / more focused ROI / increased status data) and / or different post-processing and aggregation strategies. When they are different, the secondary judgment model can be a lightweight model or a refined model optimized for the verification stage.

[0053] Based on the initial and subsequent probabilities, the log-odds gain is obtained, and its expression is as follows: ; In the formula, For logarithmic probability gain, For the probability of re-judgment, This represents the initial probability.

[0054] The expression for calculating the evidence of consistency is as follows: ; In the formula, As evidence of consistency, Evidence of temporal consistency Evidence for trajectory continuity Evidence of sensor correlation .

[0055] A secondary judgment is made by combining consistency evidence (stable continuous frames, continuous trajectory, consistency across multiple perspectives, sensor correlation evidence, etc.) to meet the requirements. , An alarm is triggered when the consistency threshold is met (it should be noted that the consistency threshold refers to the threshold κ of the consistency evidence C, where κ is used to characterize the stability threshold of the secondary observation results; when C≥κ, the secondary observation results are considered to meet the preset consistency requirements, and κ can be preset or updated based on historical sample statistical results, event types, and scene binning results), linkage control is executed, and the evidence chain is reported. The evidence chain includes at least candidate events, verification actions, keyframe summaries before and after verification, log odds gain, and consistency evidence, where: "verification action" = field a_star, "log odds gain" = field deltaL, "consistency evidence" = field consistency.C or consistency object, "candidate event" = field candidateEvent, and "keyframe summary" = keyFrameBefore / keyFrameAfter.

[0056] The expression for the decision condition is as follows: ; In the formula, For the probability of re-judgment, For logarithmic probability gain, Evidence of consistency; To set a threshold for the re-judgment probability, ensuring that "the re-judgment probability is high enough"; The gain threshold is set to ensure that the action truly brings a "deterministic boost" and suppress accidental high scores; The consistency evidence threshold (stability threshold) ensures that the conclusions are stable and consistent within the secondary window, and suppresses false alarms caused by reflection, steam, insect disturbance, and shaking.

[0057] Example 1: Station Configuration and System Composition This implementation method is applicable to scenarios such as power distribution substations, switching stations, prefabricated substations, and ring main unit rooms. The substation must include at least video acquisition equipment and a gateway, with various optional status acquisition sensors and actuators. Video acquisition equipment: At least one camera (bullet or PTZ), outputting a main stream (H.264 / H.265) for monitoring events such as personnel intrusion, smoke / flame, water accumulation, and abnormal equipment status. PTZ cameras support pan / tilt rotation / zoom, while bullet cameras support fixed-view monitoring. Substation status acquisition equipment: Door sensors, water immersion sensors, smoke / temperature sensors, temperature and humidity sensors, illuminance sensors, equipment switch inputs, etc. Actuators: Supplemental lighting / illumination, pan / tilt control, fans, audible and visual alarms, access control / electric locks, power failure / relay control outputs, etc.

[0058] The station building AI automatic early warning and control gateway includes a video access module, a status acquisition module, an AI preliminary judgment module, a verification action library module, a verification action impact prediction module, an information gain calculation module, a cost calculation module, an action selection module, a secondary observation and acquisition module, a secondary judgment module, an evidence chain generation module, a linkage control module, and a reporting module.

[0059] Example 2: Step 1: Utilize an edge gateway to access the station's video stream, collect station status data, and perform video decoding and frame extraction on the station's video stream. The video access module receives video streams from cameras, which can be in RTSP, RTP / RTCP, or other formats. The gateway demultiplexes or unpacks and decodes the video streams to obtain pixel frames, and uses a frame extraction strategy to obtain frame sequences for AI analysis.

[0060] The frame extraction strategy is to perform low-frequency frame extraction as a normal process: for example, 2–10 fps, for continuous inspection; and high-frequency frame extraction during the verification phase: when the verification process is triggered, the frame extraction is increased to 10–25 fps (or N frames are extracted at a fixed rate) within the sampling window to improve the stability of the secondary judgment.

[0061] Video decoding and frame extraction implementation: The gateway obtains the compressed bitstream (e.g., H.264 / H.265) from the video access module. This bitstream can establish a session via SIP, and the media data is encapsulated using RTP / RTCP and transmitted via UDP or TCP. The SIP session control complies with RFC3261, and the RTP / RTCP media transmission complies with RFC3550 and related specifications. The payload encapsulation of H.264 and H.265 in RTP can be found in RFC6184 and RFC7798, respectively. If the media encapsulates the H.264 bitstream in RTP, the NALU can be reassembled and unpacked according to the RTP payload format; a general multimedia decoding library (such as FFmpeg) is used for decoding: the application sends compressed data packets to the decoder and receives the decoded image frames, which can be implemented through the "send_packet / receive_frame" interface process; or a streaming media pipeline framework (such as GStreamer) can be used, where the bitstream is decoded by the decoding component and the video frames are output to the application side for AI inference by the appsink; frame extraction can be performed at a fixed frame rate (such as 2–10fps), or it can be switched to high-frequency sampling (such as 10–25fps) after a candidate event is triggered to improve the stability of secondary judgment.

[0062] In this embodiment, when using FFmpeg for decoding, compressed data packets are input to the decoder via `avcodec_send_packet()`, and decoded image frames are obtained via `avcodec_receive_frame()`; this interface process belongs to FFmpeg's official send / receive decoding API. When using the GStreamer pipeline, the raw frames are output through the decoding component, and the frames are delivered to the application side by the appsink for AI inference. Frame extraction can be performed at a fixed frame rate (e.g., 2–10 fps), or switched to a higher frame rate to support secondary judgment when a candidate event triggers the verification process.

[0063] Step 2: Determine the event type, contextual characteristics, and action library. Event types include: personnel intrusion / loitering; smoke / flame; water accumulation / leakage; access control malfunction (abnormal opening of door magnetic sensor); equipment appearance / indicator light malfunction.

[0064] Contextual features are used to describe the station's environment and equipment status at that time, including: Time period: Day / Night; Illumination level: High / Medium / Low (from illuminance sensor or image brightness statistics); Interference level: Low / Medium / High (e.g., rain, snow, fog, reflection, insect disturbance, shaking, etc.); Camera type: Bullet camera / PTZ camera (whether it supports pan / tilt); Station operation status: Manned / Unmanned.

[0065] To facilitate rule lookup, the gateway can discretize continuous values ​​into buckets, such as timeBucket, imumBucket, and disturbBucket.

[0066] The verification action library module stores a set of candidate actions. The actions include: Supplemental lighting: Turn on / increase supplemental lighting brightness (including brightness level and duration); Gimbal movement: Rotate / zoom / preset position (including angle, focal length, and waiting for positioning); Fan pulse: Briefly start the fan (including pulse duration); Short audio-visual alert: Short audio-visual alert (including volume / duration, high disturbance, usually used as a last resort); Door magnetic sensor check: Read door magnetic sensor / access control status (particularly effective for access control events); No-load operation: Perform secondary sampling without changing observation conditions.

[0067] The action library stores both action parameters and safety constraints: cooldown time t_cool, maximum frequency, actions disabled at night, etc.

[0068] Step 3: Based on the station's video stream and status data, use an AI preliminary judgment model to perform an AI preliminary judgment and obtain a list of candidate event objects. For candidate events that meet the verification triggering conditions, select the optimal verification action from the verification action library: The AI ​​preliminary judgment model infers from the video frames (and / or station status data) extracted before verification and outputs the preliminary judgment probability of the candidate events. .

[0069] For binary / multi-class classification tasks: the model outputs probabilities via sigmoid / softmax mapping. For object detection tasks: the model outputs multiple candidate boxes and confidence scores. , frame-level probability Defined as (or other aggregation methods), and then aggregate multiple frames to obtain For segmentation tasks: frame-level probabilities are obtained by mapping mask confidence to area proportion, and then aggregated to obtain... .

[0070] To prevent the subsequent logit calculation from diverging, the probability is truncated, as shown in the following expression: ; in, For example, a very small preset constant. .

[0071] The candidate events include the following event types: personnel intrusion / loitering; smoke / flame; water accumulation / leakage; access control malfunction (abnormal opening of door magnetic sensor); and abnormal equipment appearance / indicator light.

[0072] Station building status data: Station building context features are used to describe the current environment and equipment status of the station building, including: Time period: Day / Night; Illumination level: High / Medium / Low (from illuminance sensor or image brightness statistics); Interference level: Low / Medium / High (e.g., rain, snow, fog, reflection, insect disturbance, shaking, etc.); Camera type: Bullet camera / PTZ camera (whether it supports pan / tilt); Station operation status: Manned / Unmanned.

[0073] To facilitate rule lookup, the gateway can discretize continuous values ​​into buckets, such as timeBucket, imumBucket, and disturbBucket.

[0074] Step 4: Verify the impact of the action on the prediction, and output the prediction probability after the verification action is executed. : The verification action impact prediction module estimates "how much the re-judgment probability will be improved if a candidate verification action a is executed", and outputs the predicted probability after the candidate verification action a is executed. .

[0075] Two tables for rule-based lookup: (1) ActionEffectTable Key: eventType, timeBucket, illumBucket, disturbBucket, cameraType, actionType, actionLevel.

[0076] Value: ΔL_mean, n_samples, successRate, ci95Low, ci95High.

[0077] Where ΔL_mean represents the average log-odds increment resulting from performing candidate validation action a under the corresponding conditions; n_samples represents the number of historical samples used when statistically analyzing this entry; successRate represents the proportion of events that advance to a decisionable state after performing the corresponding candidate validation action; ci95Low and ci95High represent the lower and upper limits of the 95% confidence interval for the average log-odds increment ΔL_mean, respectively.

[0078] The expression for calculating the predicted probability after the verification action is performed is as follows: First, let's assess the initial probability. Perform truncation: ; in, Let be the probability cutoff constant, satisfying Preferred selection , used to avoid An equal value of 0 or 1 causes the logit calculation to diverge.

[0079] Then, based on the mean log-odds increment ΔL_mean in the action effect table, the predicted log-odds after the execution of candidate validation action a is calculated: ; Then map the predicted log odds to the predicted probabilities: ; in, , This is the query key for the ActionEffectTable, which consists of event type, time bucket, illumination bucket, interference bucket, camera type, action type, and action level. Note: ActionEffectTable can be obtained offline from historical alarm samples: for similar conditions, before verification... →After verification The logarithmic probability increment of "" is statistically analyzed, and its mean, sample size, effective improvement rate, and confidence interval are calculated as ΔL_mean, n_samples, successRate, ci95Low, and ci95High, and can be updated weekly / monthly.

[0080] (2) ActionCostTable Key: actionType, deviceModel, actionLevel.

[0081] Value: t_act, t_settle, t_win, P_watt, wearUnit, riskBase.

[0082] Used for subsequent calculations of T(a), E(a), W(a), and R(a).

[0083] Engineering constraints (debouncing / hysteresis / cooling): To prevent actions from being triggered too frequently, the gateway adds constraints to action selection: The same camera and similar actions must meet the cooldown time requirement. ; High-instance disturbance alerts can be disabled at night. Set maximum frequency and manual confirmation strategies for high-risk actions.

[0084] The information gain-cost ratio objective function is calculated as follows: The gateway calculates a score (Score(a)) for each candidate verification action a in action library A, which is the information gain-cost ratio, and selects the verification action based on the expression: The action with the highest score is selected as the optimal verification action. ; First, the expression for the logarithmic probability function is as follows: ; Expand separately: ; ; To obtain the expected information gain The expression is as follows: ; The meaning of the expression: how much the action is expected to advance the "strength of evidence" (more linear and stable in the logit domain).

[0085] Secondly, the cost function (weighted after normalization): to unify the dimensions, time, energy consumption, wear and tear, and disturbance risk are normalized to [0, 1] respectively: Then, the cost of time The expression is as follows: ; ; in, For action trigger delay; This refers to the settling time after the action is completed, during which the image / environment is allowed to reach a stable state. The length of the secondary observation sampling window is the time period during which frames are continuously collected / sampled for re-judgment after the action has stabilized. The total verification delay caused by candidate verification action 'a'; This serves as a reference upper limit for time cost normalization (maximum acceptable verification latency). To be The time cost of normalizing to [0, 1].

[0086] Then, energy consumption cost The expression is as follows: ; in, The typical power of the relevant actuator / equipment when performing candidate verification action a is obtained through equipment specifications / nameplate parameters or actual measurement by a field power meter. The duration during which the relevant actuator / device is in an on or power-consuming state when performing candidate verification action a; Energy consumption (in watt-hours) for candidate verification action a; This serves as a reference upper limit for normalized energy consumption costs (acceptable energy consumption for a single verification action). To normalize energy consumption to The energy cost.

[0087] Then, the cost of wear and tear The expression for (estimated by lifespan) is as follows: ; in, The rated lifespan (or equivalent number of usable cycles) of the component associated with candidate verification action a is obtained through the equipment specification or the lifespan index provided by the manufacturer. If it cannot be obtained, an engineering estimate can be used and recorded in the configuration. The wearUnit field in the corresponding action cost table represents the number of lifetime consumption units that are equivalent to executing one candidate verification action a. The percentage of lifetime consumption for candidate verification action a is normalized to... .

[0088] Then, the cost of disturbance risk The expression for (rule-based or statistical estimation) is as follows: ; Then, the overall cost The expression is as follows: ; in, , , and Preset weights for time, energy consumption, wear and tear, and disturbance risk are respectively used to meet the requirements. .

[0089] Then, the score The expression for (i.e., the information gain-cost ratio) is as follows: ; Therefore, the expression for selecting the verification action is as follows: ; in, The information gain-cost ratio is used as the final score. To prevent constants with a denominator of zero, for example .

[0090] It should be noted that the score refers to the score function Score(a), which is the information gain-cost ratio score function. It is used to quantitatively compare the merits of candidate verification action a. The higher the score, the higher the information gain per unit cost.

[0091] Step 5: Based on the results of historical candidate events in the verification process, combined with long window review, multi-sensor consistency and / or manual sampling results, generate weakly labeled samples and update the relevant verification thresholds periodically.

[0092] Step Six: For candidate event objects that meet the verification triggering conditions and have performed verification actions in Step S2, perform secondary observation and obtain secondary observation data. Based on the secondary observation data, obtain the re-judgment probability. (Secondary observation acquisition and re-judgment probability are then discussed.) The acquisition process is as follows: Secondary observation and data acquisition: (1) Performing actions: Control the actuator (such as lighting, fan, pan-tilt unit, door magnetic inspection, etc.) to complete the action according to the action type; (2) Stable waiting: Set the stable waiting time (e.g., 0.3–2s) is used to stabilize lighting brightness, pan-tilt position, and fan airflow. (3) Secondary sampling: The sampling time is after stabilization. The observation window (e.g., 0.5–3s) is used to extract N frames (e.g., 5–30 frames) from the video stream and simultaneously collect one or more sensor snapshots (e.g., smoke / temperature and humidity / door magnetic status). (4) Keyframe / Summary Generation: Select keyframes (such as maximum confidence frame / maximum change frame / median frame) from the sampling window and generate summaries (thumbnail, ROI cropping, feature vector, sensor snapshot, action execution timestamp); Secondary observation data is used for re-judgment reasoning and consistency evidence calculation, and for solidifying the chain of evidence.

[0093] The re-judgment probability is obtained based on the secondary observation data. : (1) For each frame of image Perform preprocessing such as resolution scaling, normalization, and ROI clipping to obtain the model input. .

[0094] (2) Input the data into the re-judgment model to obtain frame-level output. The frame-level probability is determined based on the AI ​​task type. It can be determined in one of the following ways: a) Binary or multi-class classification tasks (e.g., "smoke / non-smoke"): For the i-th frame of the second observation image, the re-judgment model outputs the unnormalized classification score of the event category corresponding to that frame. , The logit value output by the model before normalization probability mapping represents the original confidence level of the target event in frame i. For binary classification tasks, frame-level probabilities... The expression is as follows: ; in, This is the sigmoid function.

[0095] For multi-class classification tasks, frame-level probability The class probability can be obtained by mapping the corresponding event category using softmax.

[0096] b) Target detection task (e.g., intruder detection): The model outputs several detection boxes and their confidence scores. The "event is true" is defined as the existence of a target that satisfies a threshold (e.g., ...). ), and frame-level probability Take the maximum confidence score or its aggregate value that satisfies the objective condition, as shown in the following expression: ; c) Segmentation tasks (e.g., water accumulation region segmentation): The model outputs a segmentation mask. and pixel confidence. Based on the proportion of mask area. With average confidence level Get frame-level probability The expression is as follows: ; in, This is an area normalization mapping.

[0097] (3) To reduce the impact of single-frame noise and occasional false detections, the frame-level probability within the secondary sampling window is adjusted. Aggregate into re-judgment probability Aggregation methods include: a) Weighted average aggregation: ; in, The frame weights can be determined by image quality (sharpness / exposure), ROI validity, target bounding box area, etc.

[0098] b) Log-odds average aggregation: First to Cut off The expression for calculating the window logarithmic odds is as follows: ; Mapping back to probability, the expression is as follows: ; Step 7: Obtain the logarithmic probability gain based on the secondary observation data. Consistency Evidence Log-probability gain Consistency Evidence The calculation process is as follows: (1) The expression for the logarithmic probability gain is as follows: ; Significance: How much the strength of evidence increases after the action is verified.

[0099] (2) Evidence of consistency: a) Temporal stability: Within a quadratic window of N frames, the number of frames that satisfy the "event is true" condition is... Then, evidence of temporal consistency The expression is as follows: ; b) Evidence of trajectory continuity The proportion of consecutive IoU between adjacent frame detection boxes is expressed as follows: ; in, Evidence of trajectory continuity (the proportion of spatial continuity of the target in adjacent frames); This represents the number of frames within the secondary sampling window; For the first The bounding box of the same target within the frame (the selected box used for continuity calculation); The intersection-union ratio (IU / U) of the two bounding boxes. ; This is the IoU continuity threshold (the minimum overlap requirement for determining whether a connection is possible). This is an indicator function: it takes 1 if the condition is true, and 0 otherwise.

[0100] c) Consistency across multiple perspectives The percentage of the target area that still holds true in the new viewpoint / ROI after a viewpoint change is expressed as follows: ; in, For multi-view consistency, it is used to indicate the proportion of the same candidate event that is still determined to be valid in different views or different ROIs after performing view switching, gimbal rotation, zooming, or preset position switching.

[0101] When the secondary observation does not involve multi-view sampling, no calculation is performed. , It is not involved in the calculation of the consistency evidence C; when the secondary observation involves multi-view sampling, It can be used as a supplementary record of consistent evidence in the chain of evidence.

[0102] d) Evidence of sensor correlation : Whether the video conclusions are consistent with those of door magnets / smoke detectors / water immersion detectors, etc.

[0103] (3) Evidence of consistency: ; in, It can be dynamically selected according to event type (e.g., smoke events are given more weight). ).

[0104] Step 8: Based on the re-judgment probability, log-odds gain, and consistency evidence, determine whether the judgment condition is met in a secondary judgment. The physical meaning and function of the secondary judgment and threshold are as follows: The criteria for the secondary judgment module include: ; Then, output the decision (ALARM / REJECT).

[0105] The re-judgment probability threshold ensures that "the re-judgment probability is high enough". Gain threshold: ensures that the action truly brings a "deterministic boost" and suppresses accidental high scores; Consistency evidence threshold (stability threshold) ensures that conclusions are stable and consistent within the secondary window, and suppresses false alarms caused by reflection, steam, insect disturbance, and shaking.

[0106] Step 9: If the secondary judgment meets the judgment conditions, an alarm is triggered, linkage control is executed, and the evidence chain is reported. The evidence chain generation, linkage control, and reporting process are as follows: (1) Generation of the chain of evidence: The evidence chain generation module generates structured evidence chain data, which may include: eventId / eventType, cameraId / siteId; (Initial judgment timestamp) ; selectedAction, t_action; (Time stamp of the retrial) ; Consistency evidence ; keyFrameBefore / keyFrameAfter(or summary); sensorSnapshot, costBreakdown, hash / sign (anti-tampering).

[0107] The candidate event information corresponds to the following fields: {eventId, eventType, cameraId, siteId, spatialLocation, ...} , }; The fields corresponding to the verification action information are: {selectedAction, t_action}; The fields corresponding to the keyframe summaries before and after verification are: {keyFrameBefore, keyFrameAfter}; The field corresponding to the log odds gain is: {ΔL (which can be denoted as deltaL in the chain of evidence)}; The field corresponding to consistency evidence is: {C (which can be denoted as consistency.C or a consistency object in the evidence chain)}.

[0108] Wherein, selectedAction is the structured action information corresponding to the optimal verification action a*. selectedAction includes action identifier actionId, action type actionType, and action parameters actionParams, and its expression can be: selectedAction={actionId,actionType,actionParams}; actionId is used to uniquely identify the verification action, actionType is used to indicate the action type, and actionParams is used to indicate the set of action parameters.

[0109] For example, the verification action for fill light level 2 can be represented as: selectedAction={actionId:"light_level_2",actionType:"fill light",actionParams:{level:2,duration:2.0s}}.

[0110] (2) Linkage control: When decision=ALARM, the linkage control module executes linkage based on the event type: Intrusion methods: sound and light, locking, notification monitoring / platform pop-ups; Smoke / Flame: Sound and light, linked fan / power outage (requires policy constraints); Water accumulation: trigger the drainage pump / alarm notification; and record the trigger action receipt into the evidence chain.

[0111] (3) Reporting module: The reporting module reports the secondary judgment results and evidence chain to the platform (HTTP / MQTT / GB platform, etc.), which can be used for auditing, tracing and review.

[0112] Example 3: This example refers to the action effect table and action cost table in Tables 3 to 8, taking a personnel intrusion event in an unattended power distribution room at night as an example. The specific content is as follows: The station is equipped with a PTZ camera supporting pan-tilt-zoom, a set of adjustable fill lights, a door magnetic sensor, an illuminance sensor, and an edge gateway. The PTZ camera outputs an H.264 video stream, which is decoded and frame-by-frame processed by the edge gateway. During routine inspections, the frame-by-frame frequency is 5fps, while during verification, it increases to 25fps within the sampling window. The station status data acquisition cycle is 1 second.

[0113] At any moment For inference video frames The edge gateway selects the state data closest to its time to construct a state vector. ,in, Represents inference video frames Video timestamps The selected state data's state timestamp must satisfy... When no matching state data exists within the time tolerance, the missing fields are filled with default values, and this is done through the state vector. Mask of missing fields Mark the missing fields. The status vector at least includes the door magnetic status, illuminance, temperature and humidity, and the operation status of the station house.

[0114] The edge gateway infers the video frame and the corresponding status vector are input into the AI preliminary judgment model, and a list of candidate event objects is output. Each candidate event object at least includes: event identifier eventId, event type eventType, spatial location spatialLocation, preliminary judgment timestamp and the preliminary judgment probability .

[0115] In this embodiment, the preliminary judgment model detects a candidate event, whose event type is "intrusion", the spatial location is the target box [x1, y1, x2, y2] in the video picture, and the preliminary judgment timestamp is , the preliminary judgment probability . The duration of this candidate event reaches 2s, meeting the verification trigger condition and the duration ≥ d, where = 0.55, d = 2s.

[0116] The edge gateway determines the look-up key value according to the current candidate event and the station house context features.

[0117] In this embodiment, the current context features are: timeBucket = night; illumBucket = dark; disturbBucket = medium; cameraType = dome camera.

[0118] Therefore, the look-up key value of the action effect table consists of eventType, timeBucket, illumBucket, disturbBucket, cameraType, actionType and actionLevel.

[0119] The verification action library at least includes the light supplement action, the pan-tilt zoom action, the fan pulse action, the door magnetic spot check action, the sound and light short prompt action, and the null action . The edge gateway filters to obtain the current executable candidate verification action set A according to the night disable rule, the action cooling time, and the maximum frequency constraint. In this embodiment, the executable actions include light supplement at level 2 and pan-tilt zoom at 2 times.

[0120] For each candidate verification action a in the candidate action set A, the edge gateway obtains the corresponding average log odds increment ΔL_mean from the action effect table, and calculates the predicted probability after the candidate verification action a is executed. .

[0121] In this embodiment: For the candidate verification action of the supplementary lighting level 2, the ΔL_mean was found to be 0.90 from the action effect table; For the candidate verification action of 2x zoom of the gimbal, ΔL_mean=0.40 is found from the action effect table.

[0122] The logarithmic probability function is defined as: ; Known ,but ; For the candidate verification action with two levels of supplementary lighting, the action effect table gives ΔL_mean = 0.90, therefore the predicted log odds after execution are... Then, the sigmoid function is used to map the predicted log odds to the predicted probabilities. ; For the candidate verification action of 2x gimbal zoom, the action effect table gives ΔL_mean=0.40, therefore the predicted log odds after execution are... Then, through mapping using the sigmoid function, we obtain: .

[0123] The edge gateway further calculates the comprehensive cost of each candidate verification action based on the action cost table. The action cost includes time cost T(a), energy consumption cost E(a), wear cost W(a), and disturbance risk cost R(a), and the comprehensive cost satisfies: ; In this embodiment, let , , , , , , .

[0124] For the two candidate verification actions of the supplementary lighting, the parameter table is obtained based on the action cost table, as shown in Table 1: Table 1 Therefore, we can conclude that: T(a)=min((0.10+0.5+1.5) / 5,1)=0.42; E(a)=min((8×2 / 3600) / 0.05,1)=0.0889; Since the wearUnit of the candidate verification action for fill light level 2 in the action cost table is 1, that is... , ,therefore: W(a)=min(1 / 200000,1)=0.000005; R(a) = 0.05; Cost(a)=0.4×0.42+0.2×0.0889+0.1×0.000005+0.3×0.05≈0.2008.

[0125] For the candidate verification action of 2x gimbal zoom, the parameter table is obtained based on the action cost table, as shown in Table 2: Table 2 Therefore, we can conclude that: T(a)=min((0.15+0.8+2.0) / 5,1)=0.59; E(a)=min((5×1.6 / 3600) / 0.05,1)=0.0444; W(a)=min(1 / 120000,1)=0.00000833; R(a) = 0.07; Cost(a)=0.4×0.59+0.2×0.0444+0.1×0.00000833+0.3×0.07≈0.2659.

[0126] The edge gateway calculates the scoring function using the following formula: , in .

[0127] Therefore, we can conclude that: Verification actions for two candidate levels of supplementary lighting. , ; Verification of candidate actions for 2x zoom using gimbal. , .

[0128] Therefore, the edge gateway selects 2 levels of supplementary light as the optimal verification action a*.

[0129] The edge gateway sends a two-level supplemental lighting command to the supplemental lighting controller and records the action execution time t_action. After the supplemental lighting action is completed, the edge gateway waits for t_settle=0.5s to allow the illuminance to reach a stable state; then, within the observation window of t_win=1.5s, it acquires 20 frames of verified images and simultaneously acquires snapshots of the door magnetic state and illuminance state as secondary observation data.

[0130] The edge gateway performs normalization, resolution scaling, and ROI cropping on each verified image frame, and then inputs the processed image into the AI ​​re-judgment model to obtain the frame-level probability of each frame. To reduce the impact of occasional noise in a single frame, a weighted average method is used to aggregate all frame-level probabilities into a window-level re-decision probability. .

[0131] In this embodiment, we obtain .

[0132] Subsequently, the edge gateway calculates the log-odds gain: .

[0133] Depend on , We can obtain: .

[0134] The edge gateway further calculates the consistency evidence C.

[0135] In this embodiment, there are N=20 frames in the secondary sampling window, of which K=16 frames satisfy the "event is true" condition. Therefore, the temporal consistency evidence is as follows: .

[0136] Evidence of trajectory continuity The Intersection over Union (IoU) of the bounding boxes of the same target in adjacent frames is not lower than a threshold. As a criterion for judgment, the proportion of adjacent frames that satisfy continuity is statistically analyzed; in this embodiment, we take... =0.78.

[0137] Evidence of sensor correlation The calculation is based on the degree of matching between the door sensor status, illumination status, and video conclusions; in this embodiment, the door sensor status does not contradict the nighttime intrusion event, therefore, it is taken as... =0.80.

[0138] When α=0.4, β=0.3, and λ=0.3, we obtain: C=α +β + =0.4×0.8+0.3×0.78+0.3×0.80 =0.794.

[0139] The edge gateway performs a secondary determination based on the following criteria: when , and When necessary, output an alarm decision.

[0140] In this embodiment, , , .

[0141] because , , Therefore, the edge gateway outputs an alarm decision ALARM.

[0142] After issuing an alarm decision, the edge gateway generates evidence chain data and reports it to the platform. The evidence chain includes at least: CandidateEvent object; optimal verification action a* and its action parameters; keyframeBefore (before verification); keyframeAfter (after verification); re-judgment probability. Logarithmic probability gain ΔL; Consistency evidence C; Linkage control feedback information.

[0143] 1. ActionCostTable: The Key field of the Action Cost table is composed as shown in Table 3: Table 3 The composition of the Value field in the Action Cost table is shown in Table 4: Table 4 The values ​​of the action cost table are shown in Table 5: Table 5 2. ActionEffectTable: The Key field of the Action Effects table is composed as shown in Table 6: Table 6 The composition of the Value field in the Action Effects table is shown in Table 7: Table 7 The values ​​in the motion effect table are shown in Table 8: Table 8 This embodiment illustrates how the gateway side completes the verification action selection through the "ActionCostTable" and "ActionEffectTable," and generates evidence chain data after secondary judgment. This embodiment does not limit the specific AI model structure, but only limits the input / output and table-driven action selection and evidence chain fields.

[0144] In this embodiment, after receiving the evidence chain, the platform can use it for subsequent manual review, work order closure, and threshold update.

[0145] Through the above process, this embodiment realizes that in low-light nighttime scenarios, it first uses AI to initially identify candidate events, then actively changes the observation conditions through supplementary lighting, and then performs a re-judgment based on secondary observations. Alarms are triggered only when the re-judgment probability, log odds gain, and consistency evidence all meet the conditions, thereby reducing false alarms and invalid linkages, and improving the interpretability and traceability of alarm results.

[0146] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An AI-based automatic early warning and control method for railway stations, characterized by: Includes the following steps: S1. Utilize the edge gateway to access the station's video stream and collect station status data; based on the station's video stream and station status data, use an AI preliminary judgment model to perform AI preliminary judgment and obtain a list of candidate event objects; S2. Based on the candidate event object, determine whether the preset verification trigger condition is met. If so, use the information gain-cost ratio objective function to select a verification action from the verification action library and execute the verification action. S3. For candidate event objects that meet the verification triggering conditions and have performed verification actions in step S2, perform secondary observation and obtain secondary observation data. S4. Based on secondary observation data, obtain the re-judgment probability, log odds gain, and consistency evidence. Based on the re-judgment probability, log odds gain, and consistency evidence, determine whether the judgment conditions are met. If so, trigger an alarm, execute linkage control, and report the evidence chain.

2. The AI-based automatic early warning and control method for railway stations according to claim 1, characterized in that: In step S1, the attributes of the candidate event object include event identifier, event type, spatial location, initial judgment timestamp, and initial judgment probability.

3. The AI-based automatic early warning and control method for railway stations according to claim 1, characterized in that: In step S2, the expression for selecting the verification action is as follows: ; In the formula, The selected optimal verification action; To verify the action library; The information gain-cost ratio is expressed as follows: ; In the formula, To verify the expected information gain of the action, To verify the cost of the action, It is a constant; The expression is as follows: ; In the formula, The predicted probability after candidate verification action a is executed; This is the initial probability; The logarithmic probability function is expressed as follows: ; In the formula, Let be the probability value to be mapped to the log-odds space; The expression is as follows: ; In the formula, For the cost of time, For the cost of energy consumption, As a result of wear and tear, To incur the risk of disruption, , , and These are preset weights for time, energy consumption, wear and tear, and disturbance risk, respectively.

4. The AI-based automatic early warning and control method for railway stations according to claim 1, characterized in that: In step S2, the verification actions in the verification action library include supplementary lighting verification, viewing angle verification, ventilation pulse verification, door magnetic point inspection verification, audio-visual short prompt verification, and empty action; The supplemental lighting verification includes controlling the lighting equipment to turn on and adjusting the brightness; Viewpoint verification includes controlling the gimbal to perform preset angle deflection and zoom.

5. The AI-based automatic early warning and control method for railway stations according to claim 1, characterized in that: In step S3, a second observation is performed, and the second observation data is obtained, including: S31, Waiting for stabilization time; S32. Secondary sampling: Set an observation window, collect the station video stream based on the observation window, then extract a set number of frames from the video stream, and simultaneously collect one or more sensor snapshots. S33. Select keyframes from the observation window and generate a summary.

6. The AI-based automatic early warning and control method for railway stations according to claim 1, characterized in that: In step S4, the expression for the logarithmic odds gain is as follows: ; In the formula, For logarithmic probability gain, For the probability of re-judgment, This is the initial probability; The expression for consistency evidence is as follows: ; In the formula, As evidence of consistency, Evidence of temporal consistency Evidence for trajectory continuity Evidence of sensor correlation .

7. The AI-based automatic early warning and control method for railway stations according to claim 1, characterized in that: In step S4, the re-judgment probability is obtained, including: The preprocessed secondary observation images are input into the re-judgment model to obtain frame-level probabilities. By using a weighted average or log-odds average, the frame-level probabilities are aggregated into window-level re-decision probabilities.

8. The AI-based automatic early warning and control method for railway stations according to claim 1, characterized in that: In step S4, the expression for the decision condition is as follows: ; In the formula, For the probability of re-judgment, For logarithmic probability gain, As evidence of consistency, The threshold for the re-judgment probability. For gain threshold, This is the threshold for consistent evidence.

9. The AI-based automatic early warning and control method for railway stations according to claim 1, characterized in that: In step S4, the chain of evidence includes candidate events, verification actions, keyframe summaries before and after verification, log odds gain, and consistency evidence.

10. An AI-based automatic early warning and control gateway for railway stations, applied to the AI-based automatic early warning and control method for railway stations as described in any one of claims 1-9, characterized in that: include: The video access module is used to access the station's video stream and obtain video frames before and after verification. The status acquisition module is used to collect station status data; The AI ​​preliminary judgment module is used to output a list of candidate event objects and their corresponding preliminary judgment probabilities based on the pre-verification video frames and station status data. The verification action library module is used to store the set of candidate verification actions and the parameters of each verification action; The verification action impact prediction module outputs the predicted probability after the verification action is executed, based on the initial judgment probability, station context features, and candidate verification actions. The information gain calculation module is used to calculate the expected information gain for each candidate verification action; The cost calculation module is used to calculate the action cost for each candidate verification action; The action selection module is used to select the optimal verification action based on the scoring function; The secondary observation and acquisition module is used to acquire secondary observation data after performing the optimal verification action; The secondary judgment module obtains the re-judgment probability based on secondary observation data and calculates the log odds gain and consistency evidence. The evidence chain generation module is used to generate evidence chain data corresponding to the secondary judgment result; The linkage control module is used to execute station linkage control when the secondary judgment result meets the judgment conditions; The reporting module is used to report the secondary judgment results and evidence chain data to the platform.