A fire tracing method based on deep reinforcement learning

By synchronously collecting multimodal data and using deep reinforcement learning, the real-time and robustness issues of vehicle fire source tracing technology have been resolved, enabling rapid and accurate source tracing in the early stages of a fire, reducing false alarm rates, and making it applicable to vehicles with ordinary cameras.

CN123158355APending Publication Date: 2026-11-24CHONGQING VEHICLE TEST & RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610905879.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing vehicle fire source tracing technologies suffer from poor real-time performance, limited perception modes, insufficient robustness, and a lack of proactive interactive decision-making capabilities, resulting in a high false alarm rate and an inability to dynamically track the evolution of the fire source during a fire.

Method used

A fire source tracing method based on deep reinforcement learning is adopted. Real-time source tracing is performed through multimodal data, including the synchronous acquisition and preprocessing of sensor data and image data. The FTN model is used for dual-stream heterogeneous feature encoding and attention fusion. A greedy strategy is combined for active search and decision-making to generate the probability distribution of fire source area and cause of fire.

Benefits of technology

It enables rapid source tracing in the early stages of a fire, improves the system's robustness and proactive interactive decision-making capabilities, reduces false alarm rates, is applicable to vehicles with ordinary cameras, and enhances the accuracy and stability of fire source tracing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123158355A_ABST
    Figure CN123158355A_ABST
Patent Text Reader

Abstract

This invention relates to the field of fire source tracing and analysis technology, specifically a fire source tracing method based on deep reinforcement learning. It collects multi-source data through a sliding window and processes the data to eliminate the influence of missing and faulty data, generating input time series and image sequences. By constructing an FTN model, it obtains the Q-value and auxiliary classification probability, selecting the action with the highest Q-value. If the action is a decision output action, the source tracing result is obtained and output based on the auxiliary classification probability; otherwise, the action is executed, and multi-source data is collected again through the sliding window. The FTN model employs temporal and spatial flow, attention fusion mechanisms, and a deep reinforcement learning decision network to model fire source tracing as a Markov decision process, where the agent actively searches and confirms actions based on information. This solution uses multimodal data for real-time fire source tracing, improving robustness and proactive interactive decision-making capabilities while reducing false alarm rates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fire source tracing and analysis technology, specifically a fire source tracing method based on deep reinforcement learning. Background Technology

[0002] Vehicle fires, especially those caused by thermal runaway of electric vehicle batteries, are characterized by their suddenness, rapid spread, and complex causes, posing a serious threat to the safety of occupants and vehicle property. Accurately and quickly tracing the source of a fire (including its location and cause) is crucial for fire response, accident liability determination, and vehicle design improvements.

[0003] Currently, vehicle fire source tracing technologies are mainly divided into the following categories: Post-fire debris analysis: Traditional methods rely on on-site investigation of the burned vehicle debris, observing static characteristics such as battery pack damage marks, wiring harness molten beads, and smoke color, and combining this with experience to determine the cause of the fire. This method is a manual qualitative analysis, which is time-consuming, highly subjective, and heavily dependent on the investigators' experience level.

[0004] Single-sensor threshold warning method: Some vehicles are equipped with smoke sensors, temperature sensors or thermal imaging cameras. When a certain physical quantity exceeds a preset threshold, an alarm is triggered. This method can only indicate that a fire may occur, but it cannot locate the fire source or distinguish the cause of the fire. Moreover, fixed thresholds are prone to false alarms or missed alarms due to environmental interference.

[0005] Source tracing methods based on fuzzy logic and tabular Q-learning: In recent years, some studies have proposed treating static features after a fire (such as battery pack damage, molten beads, smoke color, etc.) as states and possible causes of fire as actions. They use trapezoidal membership functions to fuzzify feature variables and utilize tabular Q-learning algorithms to learn the mapping relationship between features and causes. This method avoids complete reliance on expert experience to some extent, but it is still limited to post-event static data, cannot process real-time sensor streams, and has a very small state space and action space (usually only a dozen or so discrete features and a few causes), lacking dynamic interaction capabilities.

[0006] Fire identification methods based on deep learning: using convolutional neural networks (CNNs) to identify flames or smoke from vehicle camera images, or using recurrent neural networks (RNNs) to process temperature and voltage time-series data; these methods usually treat fire warning as a static classification or regression problem, taking fixed-dimensional features as input and outputting whether a fire has occurred or the probability of a fire; they lack the ability to actively acquire information and cannot adapt to the failure of sensors (including image sensors).

[0007] While the existing technologies described above can be used to trace the source of vehicle fires, some problems still exist: Poor real-time performance and reliance on post-fire data: Most methods (such as debris analysis and fuzzy Q-learning) can only infer the cause based on the burned debris after the fire has ended. They cannot dynamically track the evolution of the fire source during the fire, thus delaying the opportunity for emergency response. Limited sensing modality and insufficient robustness: Single-sensor or few-sensor solutions are insufficient to fully capture the multidimensional characteristics of a fire (temperature field changes, smoke diffusion, abnormal electrical parameters, etc.), and the system often fails directly when a sensor malfunctions or data is missing, lacking fault tolerance; in addition, it is highly dependent on visual sensors, resulting in high costs. High-precision fire source tracing often requires infrared thermal imaging cameras to obtain temperature field distribution, but these devices are expensive and difficult to popularize in low- and mid-range vehicles. Although ordinary RGB cameras are low in cost, they cannot directly provide temperature information. Lack of proactive interactive decision-making ability: Most existing deep learning models are "end-to-end" black box classifiers, which output the result after a single forward computation. They cannot proactively request higher-precision data (such as increasing the sampling frequency or obtaining detailed BMS parameters) based on the uncertainty of the current information, resulting in a high false positive rate in ambiguous scenarios. Therefore, there is an urgent need for a fire source tracing method based on deep reinforcement learning, which can perform real-time fire source tracing using multimodal data, improve robustness and proactive interactive decision-making capabilities, and reduce false alarm rates, thereby solving the problems existing in the above-mentioned technologies. Summary of the Invention

[0008] The present invention aims to provide a fire source tracing method based on deep reinforcement learning, which can improve robustness and proactive interactive decision-making capabilities and reduce false alarm rate by performing real-time fire source tracing through multimodal data.

[0009] This invention provides the following basic solution: a fire source tracing method based on deep reinforcement learning, comprising: S1. Acquire multimodal data from the sliding window and synchronize the data; the multimodal data includes: sensor data and image data; synchronously acquire the health status of the sensors and generate a sensor health status vector; S2. Based on the sensor health status, preprocess the multimodal data to generate input time series and image sequences, including: Based on the sensor health status, temporal feature derivation and missing adaptive processing are performed on the sensor data to generate a temporal input tensor; The image data is transformed and / or normalized, and modal signatures and image missing data are processed to generate image sequences and modal signatures; where the modal signatures represent the camera type and health status of the camera that acquired the image data. The modal flags are extended to the time dimension and concatenated with the temporal input tensor to generate the input temporal sequence. S3. Based on the input time series and image sequence, the Q-value and auxiliary classification probability are obtained through the FTN model. The FTN model uses temporal and spatial streams to perform dual-stream heterogeneous feature encoding, extracting features from the input time series and image sequence respectively. Then, the fused features are generated through an attention fusion mechanism. Through a deep reinforcement learning decision network, the fire source tracing is modeled as a Markov decision process. The agent obtains the Q-value and auxiliary classification probability through active search and information confirmation actions. S4. Using a greedy strategy, select the action with the largest Q value, including: space search, data request, information confirmation, and decision output; if the action is a decision output action, then execute S5; otherwise, execute the action and then execute S1. S5. Obtain the source tracing result based on the auxiliary classification probability and output it.

[0010] Beneficial effects: This solution uses a sliding window to collect multimodal data for fire source tracing. The diverse data types enable comprehensive analysis of fire source tracing, breaking the limitation of single data. Furthermore, the sliding window dynamically collects data streams, allowing for rapid fire source tracing in the early stages of a fire, rather than post-fire analysis. In the specific analysis process, firstly, the collected multimodal data is synchronized to ensure that the multimodal data is aligned in time, providing high-quality input for subsequent feature extraction; the health status of the sensors is collected simultaneously to generate sensor health status vectors. Secondly, based on the sensor health status, the multimodal data is preprocessed to generate input time series and image sequences. In cases of missing or faulty sensor or image data, this solution performs temporal feature derivation and adaptive missing data processing based on the sensor health status, ensuring the integrity of the input dataset. Simultaneously, image data undergoes transformation and / or normalization processing, as well as modal flag and image missing data processing, generating image sequences and modal flags. The modal flags represent the camera type and health status of the acquired image data, maintaining the uniformity of the spatial flow encoder. Even if the image data is not a thermal image, it can be transformed, reducing reliance on high-end sensors (infrared thermal imaging cameras). This allows vehicles equipped only with ordinary cameras to obtain image sequences (similar to thermal imaging input), significantly improving the source tracing accuracy under purely visual conditions. The modal flags are extended to the time dimension and concatenated with the temporal input tensor to generate the input time series, enabling the FTN model to perceive the presence or absence of image modalities and automatically switch to pure temporal inference mode when images are missing. This improves the system's robustness in harsh environments and achieves smooth degradation. Secondly, based on the input time series and image sequence, the Q-value and auxiliary classification probability are obtained through the FTN model. The FTN model is FireTraceNet, a deep reinforcement learning fire tracing model that uses temporal and spatial streams for dual-stream heterogeneous feature encoding. It extracts features from the input time series and image sequence separately, improving the richness of feature representation and providing higher-quality basic features for subsequent attention fusion. At the same time, the natural sequence processing capability of LSTM adapts to the input format of sensor missing masks. Then, through the attention fusion mechanism, fused features are generated, which can learn the importance of different modalities in different fire scenarios. For example, temperature changes are more important in the early stage, and flame morphology is more important in the later stage, thereby improving the fusion quality. Through a deep reinforcement learning decision network, fire tracing is modeled as a Markov decision process. The agent obtains the Q-value and auxiliary classification probability, including the probability distribution of the fire source area and the probability distribution of the cause of the fire, through active search and information confirmation actions. Multi-step interaction reduces false positives, improves learning efficiency and decision stability, and thus makes accurate decisions within a limited number of steps. Finally, a greedy strategy is adopted to select the action with the highest Q value. If the action is a decision output action, the source tracing result is obtained based on the auxiliary classification probability and output. Otherwise, the corresponding hardware operation is performed according to the action to obtain the next step (sliding window sliding) multimodal data. The actions include: spatial search, data request, information confirmation and decision output, forming a multi-step action space. A deep reinforcement learning framework is adopted to enable the agent to actively obtain key information and reduce the false alarm rate. When running in real time on actual vehicles, the fire source tracing result is actively and interactively output.

[0011] In summary, this solution uses multimodal data for real-time fire source tracing, which can improve robustness and proactive interactive decision-making capabilities, and reduce false alarm rate. Attached Figure Description

[0012] Figure 1 This is a flowchart illustrating an embodiment of a fire source tracing method based on deep reinforcement learning according to the present invention. Detailed Implementation

[0013] The following detailed description illustrates the specific implementation method: Example 1

[0014] This embodiment provides a fire source tracing method based on deep reinforcement learning, as shown in the attached figure. Figure 1 As shown, it includes the following: S1. Collect multimodal data from the sliding window and synchronize the data; the multimodal data includes: sensor data and image data; synchronously collect the health status of the sensors and generate a sensor health status vector, where 1 indicates valid and 0 indicates invalid; The sensor data is collected through the onboard sensors and BMS (Battery Management System); the onboard sensors include: temperature sensor, laser smoke sensor, CO gas sensor, and vibration sensor; Sensor data includes: temperature, smoke concentration, CO concentration, vibration acceleration, SOC, individual cell voltage, and insulation resistance; among which, temperature, smoke concentration, CO concentration, and vibration acceleration are collected by corresponding vehicle-mounted sensors, while SOC, individual cell voltage, and insulation resistance are collected by BMS. Image data is acquired through cameras. Depending on the type of camera (infrared thermal imaging camera and ordinary camera), the acquired image data is different and is divided into infrared thermal imaging images and color images. After performing time synchronization, interpolation resampling, and sliding window packaging on sensor data and image data, the original time-series data matrix is ​​output. and image sequences ;in , ;in The batch size is the number of data samples processed at one time. It is usually 32 or 64 during training and usually 1 during online inference. The set of real numbers indicates that the elements in the tensor are real numbers (continuous values). For time step; The spatial resolution of the image (image height and image width); is the number of channels in the image, where This represents a grayscale image, used to indicate whether an image is an infrared thermal imaging image or a pseudo-thermal image. This represents an RGB color image, used to indicate that an image is a color image; Specifically, the timestamps of each sensor are aligned according to the vehicle's GPS clock (PTP protocol) with an accuracy of ≤1ms; cubic spline interpolation is performed on the non-equal interval sampling data (sensor data), and the data is uniformly resampled to 10Hz; in this embodiment, 6 temperature sensors, 4 laser smoke sensors, 2 CO gas sensors, and 4 vibration sensors are set; the fixed window length T=5 seconds (50 frames) of the sliding window and the sliding step size of 1 second are used to generate continuous data blocks; the raw image data acquired by the camera is bilinearly interpolated to 64×64 resolution to obtain the time-series raw data matrix. and image sequences This ensures that multi-source data is strictly aligned in time and space, providing high-quality input for subsequent feature extraction. It solves the problem of spatiotemporal inaccuracy of multimodal data caused by inconsistent sampling frequencies of different sensors and clock drift, improves the accuracy of multimodal fusion, avoids false associations caused by time misalignment, and lays the foundation for real-time traceability.

[0015] S2. Based on the sensor health status, preprocess the multimodal data to generate input time series and image sequences; The specific process is as follows: Based on the sensor health status, temporal feature derivation and missing adaptive processing are performed on the sensor data to generate a temporal input tensor; Specifically, for sensor data, i.e., the time-series raw data matrix The physical model is transformed into fire features, i.e., derived features, forming a derived feature matrix. This embodiment includes: average temperature, temperature change rate, maximum temperature gradient, average smoke concentration, smoke concentration change rate, CO concentration, CO change rate, SOC, minimum unit voltage, voltage change rate, insulation resistance, and vibration energy; the physical model used is a conventional physical model, which will not be described in detail in this embodiment. Generate a binary mask based on the sensor health status vector. If any of the original sensors on which a certain fire characteristic depends fails, the corresponding position is 0. According to binary mask For the derived feature matrix Missing positions are filled and zeroed out to generate the observed feature matrix. : ,in This is for element-wise multiplication; By concatenating the observed feature matrix and the binary mask, a temporal input tensor is generated. ,Right now: Compared to traditional methods that directly discard samples or cause system failure when sensors malfunction, this scheme achieves robustness to partial sensor loss through a masking mechanism and random loss during training. This enhances the system's fault tolerance and can still provide usable traceability results with reduced reliability even when multiple sensors fail, thus ensuring basic safety functions.

[0016] The image data is transformed and / or normalized, and modality markers and image missing data are processed to generate image sequences and modality markers. Specifically, if the image data is a color image, that is Then the image data ( Input generator, convert color image into pseudo-heatmap , regarded as a normalized image This embodiment uses a pre-trained cGAN generator. Input a color image, i.e., an RGB image (3 channels), output a pseudo-heatmap (single channel): The shape is (64,64,1), and the output range has been aligned to the normalized range of real thermal imaging during generator training, so it is also located in [0,1]. If the image data is an infrared thermal imaging image, then normalization processing is performed to obtain a normalized image: ;in The lower limit of temperature, For measurement range; If image data is missing, generate an image with all zeros. ; Acquire the normalized image within the sliding window, along with the camera type and health status, and generate an image sequence. and modal flags; where modal flags A value of 0 indicates that the camera type is an infrared thermal imaging camera and its health status is normal operation; a value of 1 indicates that the camera type is a regular camera and its health status is normal operation; a value of 2 indicates that the camera type is arbitrary and its health status is faulty or has no image. At the start of the sliding window, this flag is set according to the system configuration and real-time diagnostic results. If the image data within the entire sliding window is valid, it is set according to the configuration; if several consecutive frames (e.g., 10 frames) are detected as invalid (e.g., communication timeout, completely black image, etc.), it is forcibly set to 2. This processing enables vehicles equipped only with regular cameras to obtain input similar to thermal imaging, significantly improving the source tracing accuracy under purely visual conditions. It solves the problem of not being able to obtain temperature field information due to the lack of infrared thermal imaging in low-cost solutions; it expands the applicability of the solution, reduces the dependence on high-end sensors, and maintains the uniformity of the spatial flow encoder, facilitating model reuse.

[0017] The modal signature is extended to the time dimension and concatenated with the temporal input tensor to generate the input temporal sequence. ; Specifically, modal signatures are extended to the time dimension. That is, from Expand to The same flag value is repeated at each time step; it is concatenated with the time series input tensor to generate the input time series. ,Right now In this embodiment, the shape of the result is 24 represents the number of bits for the fire characteristics and the binary mask. This represents the last dimension of the tensor. The above processing enables the FTN model to perceive the presence or absence of image modalities and automatically switch to pure temporal inference mode when images are missing. This solves the problem of unusable visual information in situations such as camera damage, occlusion, or lack of supplemental lighting at night, improves the system's robustness in harsh environments, and achieves smooth degradation.

[0018] S3. Based on the input time series and image sequence, obtain the Q value and auxiliary classification probability through the FTN model; The FTN model employs temporal and spatial streams for dual-stream heterogeneous feature encoding, extracting features from the input temporal sequence and image sequence respectively. Then, it generates fused features through an attention fusion mechanism. Through a deep reinforcement learning decision network (Dueling Double DQN), fire source tracing is modeled as a Markov decision process. The agent obtains Q-values ​​and auxiliary classification probabilities through active search and information confirmation actions. Specifically, the FTN model includes: an LSTM encoder, a 3D-ResNet18 encoder, a multi-head self-attention fusion module, and a deep reinforcement learning decision network; An LSTM encoder is a timing stream used to determine the input timing sequence. It captures the dynamic trends and temporal dependencies of sensor data, uses masks to ignore failed channels, and generates and outputs temporal features. ; Specifically, in this embodiment, the LSTM encoder uses a four-layer stacked LSTM, with 64 hidden units per layer and dropout=0.2 (inter-layer only). It outputs temporal features through a fully connected layer. In other embodiments, a bidirectional LSTM can be used, and the forward and reverse hidden states are concatenated to output the timing features; the input timing... Input the data sequentially into the LSTM encoder at each time step, and extract the LSTM cell output at the last time step (t=50). (shape ×64), fully connected layer (input 64 → output 64) to compress Features, output time series features .

[0019] The 3D-ResNet18 encoder is a spatial stream encoder used to extract the spatiotemporal evolution pattern of the temperature field (or pseudo-thermograph) from the input image sequence, capture the fire source diffusion path and flame morphology, and generate and output spatial features. ; Specifically, the 3D-ResNet18 encoder includes a series of 3D convolutional layers, several 3D residual blocks, a global average pooling layer, and a fully connected layer connected in sequence. The 3D convolutional layer is used as the input image sequence. After processing with Conv 3D (3×3×3), BN, ReLU and MaxPool3d (2×2×2), the output is input to the 3D residual block; In this embodiment, four 3D residual blocks are set, each containing two convolutional sub-layers with skip connections. The output is fed into a global average pooling layer for average pooling, and then into a fully connected layer for compression, outputting spatial features. The 3D-ResNet18 encoder performs end-to-end forward propagation.

[0020] Compared to traditional methods that simply splice or manually fuse temporal and spatial features, ignoring the characteristics of heterogeneous data, this scheme preserves the high-dimensional abstract information of each feature through independent encoding, thereby enhancing the richness of feature representation and providing higher-quality basic features for subsequent attention fusion. At the same time, the natural sequence processing capability of LSTM adapts to the input format of sensor missing mask.

[0021] The multi-head self-attention fusion module is used to dynamically weight and fuse temporal and spatial features to generate fused features; Specifically, time series characteristics and spatial features Stacked as ,shape ×2×64; right Linear transformation yields the query (Query matrix), key (Key matrix), Values (Each head dimension is 8):

[0022]

[0023]

[0024] in This is the weight matrix, which consists of parameters automatically learned during model training. Calculate attention weights: ;in For the transpose of, The dimension of each attention head is 8 in this embodiment; This is a scaling factor used to stabilize the gradient; Normalize by row (the last dimension) so that the sum of the attention weights for each row is 1; right Perform a weighted summation to obtain the weighted summation result. For each token (position), the output is the result of weighting the values ​​of other tokens according to the attention weights. By concatenating the weighted sum of the outputs of all attention heads, we obtain the concatenated result, which is the three-dimensional tensor obtained by concatenating the outputs of all attention heads along the feature dimension: ,Right now ; The stitched result is expanded and passed through a fully connected layer and LayerNorm to obtain the fusion features. In this embodiment, the expansion involves rearranging the three-dimensional tensor into a one-dimensional vector. Specifically, the batch dimension is retained, and all other dimensions are stretched into a long vector. A fully connected layer further mixes the long vector with multi-head attention information to enhance its expressive power. Layer normalization is performed on all dimensions (128 in this embodiment) of features for each sample to obtain fused features. This helps stabilize training and accelerate convergence. The fusion feature can adaptively integrate temporal dynamic information and spatial thermal field information, providing a more comprehensive feature representation for subsequent decision-making. The multi-head self-attention fusion module dynamically weights and fuses temporal and spatial features, suppresses noisy modes, and enhances discriminative information. This enables the FTN model to learn the importance of different modes in different fire scenarios, such as the importance of temperature changes in the early stage and the importance of flame morphology in the later stage, thereby improving the fusion quality.

[0025] A deep reinforcement learning decision network is used to model fire source tracing as a Markov decision process based on fused features. The agent obtains the Q-value and auxiliary classification probability through active search and information confirmation actions. Reinforcement learning in deep reinforcement learning decision networks models fire source tracing as a Markov decision process (MDP), which includes: state, action, reward, discount factor, and policy. Specifically, state Fusion characteristics at the current moment ; action This includes several discrete actions, which in this embodiment are 12 discrete actions (0~11, including search, request, and decision), as shown in Table 1 below; Table 1: Action Space Definition Table

[0026] Actions 10 and 11 are executed simultaneously, but are considered two independent terminating actions in the MDP. When the agent selects 10 or 11, it immediately outputs the corresponding decision and terminates the current episode. If 10 is selected, a cause header is automatically output; if 11 is selected, a position header is automatically output. award Scalar values ​​calculated based on action effects and environmental feedback; Discount factor ∈[0,1], used to balance current and future rewards, and is set to 0.95 in this embodiment; Strategy In state Select action The probability distribution.

[0027] The Dueling architecture of deep reinforcement learning decision networks decomposes the action value function into a state value function and an advantage function:

[0028] in, The state value represents the state being in. The expected cumulative reward (independent of specific actions); Let be the dominance function, representing the state . Next action Advantages relative to the average level; among which For the action space, The size of the action space is the total number of selectable discrete actions, which is 12 in this embodiment; For the next moment (next state) Subtracting the mean ensures that the advantage function is centered along the action dimension, improving training stability.

[0029] Double DQN, a deep reinforcement learning decision network, uses two neural networks, including: the current network... and target network Decouple action selection from action evaluation, and reduce The value was overestimated; The current network selects the optimal action: The target network evaluates this action. value: .

[0030] Specifically, the deep reinforcement learning decision network includes: a sharing layer, a value stream, a dominance stream, a Q-value output, an auxiliary position classifier head, and an auxiliary cause classifier head; The shared layer is responsible for the current state of the input. That is, the fusion characteristics of real-time computing Processed through a fully connected layer (expanding from 128 dimensions to 256 dimensions), the output is... ; The output of the shared layer is input to the value stream and the advantage stream, respectively. It is then processed by a fully connected layer (which compresses 256 dimensions to 1 dimension and 12 dimensions) to obtain the output state value. and dominance function ; Q-value output, based on the output state value and dominance function Perform Dueling aggregation to obtain the value of the action value function:

[0031] The output of the shared layer is input to the auxiliary location classification head and the auxiliary cause classification head, respectively. After processing by a fully connected layer (compressing the 256 dimensions to 8 and 5 dimensions) and a classification function (softmax), the probability distribution of the fire source region is obtained. Probability distribution of causes of fire In this embodiment The output shape is 8 represents 8 discrete fire source areas, including: battery compartment, cockpit, engine compartment, wiring harness area, and chassis area; the battery compartment includes battery pack modules 1 to 4. The output shape is The number 5 indicates five types of fire causes, including: water ingress into the battery pack, thermal runaway of the battery cells, low-voltage circuit faults, engine overheating, and external ignition.

[0032] In this embodiment, the specific process is as follows: Enter the current state (128 dimensions); Forward propagation is performed, and the Q-values ​​of all actions are calculated using a deep reinforcement learning decision network.

[0033]

[0034] .

[0035] Compared to traditional deep learning models that are static classification / regression and cannot actively acquire additional information, and expert systems that rely on fixed rules and lack adaptability, this solution uses a deep reinforcement learning decision network to model fire source tracing as a Markov decision process. The agent makes accurate decisions within a limited number of steps through active search and information confirmation actions. DRL enables the model to have the ability to ask questions and verify, reduces false positives through multi-step interaction, and the Dueling Double structure improves learning efficiency and decision stability.

[0036] Furthermore, the network parameters of the constructed FTN model are updated by training in a digital twin simulation environment, enabling it to learn to make optimal source tracing decisions under different fire scenarios. In this embodiment, the simulation environment is based on a Fire Dynamics Simulator (FDS) to construct a digital twin of a vehicle fire, setting the vehicle geometry model, material properties, fire source location, cause of fire, ventilation conditions, sensor model, sensor failure modes (randomly setting some sensors to failure with a preset probability), camera type, simulation time step, scene duration (each episode (segment) can simulate for a maximum of 60 seconds (600 steps), or terminate early when the fire spreads to the entire vehicle), etc. The environment outputs at each time step: raw sensor readings (sensor data), image frames (image data), sensor health status vector, real fire source location label, real fire cause label, and termination flag "done" (whether the final decision has been output or the maximum number of steps has been reached). Each episode corresponds to a randomly generated fire scenario. The specific training process is as follows: Reset the environment and initialize parameters: Set the random selection of fire location, cause of fire, ventilation conditions, sensor failure mode, and camera type; reset the environmental state and generate the initial observation window (sliding window, data for the first 5 seconds); initialize the experience replay pool (priority experience replay, PER), capacity N=100000; initialize the current network parameters. and target network parameters .

[0037] Interacting with the environment (at each time step): Obtain the current state, obtain the input sequence and image sequence through S1-S2, input them into the FTN model, and obtain the fused features as the current state after processing. Use a greedy strategy (ε-greedy) to select actions. :

[0038] in It decreased linearly from 0.9 to 0.05; Actions Passed to the simulation environment, the environment executes and returns: Instant reward (Calculated based on the reward function), Next State Termination mark (Whether the current source tracing has ended or timed out); The reward function is:

[0039] in As a reward for positioning accuracy, if no decision is output in this step (the action is not a decision output), then... If the output decision is... ,in To predict the intersection / union of the fire source area and the actual area; If the cause is correct, a reward will be given; if no decision is output in this step, then... If the output decision and the reason are correct, then... ,otherwise ; As a time-sensitive reward, , This represents the number of action steps that have been executed in the current episode. As a penalty for false positives, if the output decision is not... ,but Otherwise, it is 0; As a penalty for missed detection, if a real fire source occurs but the agent never focuses on that area and ultimately fails to output a decision or outputs an error, then... It is only calculated at the end of the episode.

[0040] Storage experience: will be stored in the Priority Experience Replay Pool (PER) and the sample priority will be updated according to the current TD error.

[0041] Learning Update (per step or per multiple steps): Sample a batch from PER (size ); Calculate the loss function :

[0042] in This is the Q-loss (mean squared error). To assist in classification loss (cross-entropy loss); Specifically, for a batch sampled from PER ; The target Q value is:

[0043] In this embodiment, the discount factor is 0.95; The loss is:

[0044] Auxiliary classification loss, only when action When the decision output is action 10 or 11, and it has a real label. :

[0045] in The number of samples of decision actions in the batch. The cross-entropy loss function; Update current network parameters using the Adam optimizer ; Every few steps (in this embodiment, it is...) Step), soft update target network: ; Termination of judgment: If If the current episode ends, the current episode will end; otherwise, the interaction with the environment will continue.

[0046] Evaluation and saving: After training a certain number of episodes (500 in this example), evaluate the performance of the FTN model (fire source localization IoU, cause classification accuracy, average source tracing steps) on a fixed validation set, and save the parameters of the FTN model with the best performance.

[0047] S4. Adopt a greedy strategy ( ), select the action with the largest Q value If the action is a decision output action, then execute S5; otherwise, execute the corresponding hardware operation according to the action, execute S1, and obtain the next multimodal data. S5. Based on the auxiliary classification probability, obtain and output the source tracing results, including: fire source area and cause of fire; at the same time, record the action trajectory and time consumption for interpretability, and end this source tracing. The fire source area Confidence level is ; Cause of fire Confidence level is .

[0048] In summary, this solution uses multimodal data for real-time fire source tracing, which can improve robustness and proactive interactive decision-making capabilities, and reduce false alarm rate.

[0049] Example 2

[0050] This embodiment is basically the same as the above embodiment, except that: if a new sample is obtained, the new sample is added to the online experience replay pool; when the cumulative number of new samples exceeds a preset number, fine-tuning is triggered: the low-level convolutional layers of LSTM and 3D-ResNet are frozen (preserving general features), only the fully connected layers of the attention module and decision network are fine-tuned, the learning rate is reduced to 1 / 10 of the original, and the model is trained for 5 epochs. The performance of the fine-tuned model on the retained test set is evaluated. If the parameters decrease, the model is rolled back and updated. This allows the FTN model to be continuously optimized using real data, adapting to different vehicle models, climates, and driving behaviors, forming a data closed loop. The more the FTN model is used, the more accurate it becomes, and the cost of fine-tuning is low, making it suitable for in-vehicle edge devices.

[0051] The above descriptions are merely embodiments of the present invention. Commonly known structures and characteristics are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are aware of all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. A fire source tracing method based on deep reinforcement learning, characterized in that, include: S1. Collect multimodal data from the sliding window and synchronize the data; The multimodal data includes: sensor data and image data; the health status of the sensors is collected synchronously to generate a sensor health status vector; S2. Based on the sensor health status, preprocess the multimodal data to generate input time series and image sequences, including: Based on the sensor health status, temporal feature derivation and missing adaptive processing are performed on the sensor data to generate a temporal input tensor; The image data is transformed and / or normalized, and modal signatures and image missing data are processed to generate image sequences and modal signatures; where the modal signatures represent the camera type and health status of the camera that acquired the image data. The modal flags are extended to the time dimension and concatenated with the temporal input tensor to generate the input temporal sequence. S3. Based on the input time series and image sequence, the Q-value and auxiliary classification probability are obtained through the FTN model. The FTN model uses temporal and spatial streams to perform dual-stream heterogeneous feature encoding, extracting features from the input time series and image sequence respectively. Then, the fused features are generated through an attention fusion mechanism. Through a deep reinforcement learning decision network, the fire source tracing is modeled as a Markov decision process. The agent obtains the Q-value and auxiliary classification probability through active search and information confirmation actions. S4. Using a greedy strategy, select the action with the largest Q value, including: space search, data request, information confirmation, and decision output; if the action is a decision output action, then execute S5; otherwise, execute the action and then execute S1. S5. Obtain the source tracing result based on the auxiliary classification probability and output it.

2. The fire source tracing method based on deep reinforcement learning according to claim 1, characterized in that, The sensor data includes: temperature, smoke concentration, CO concentration, vibration acceleration, SOC, unit voltage, and insulation resistance. Image data is acquired through cameras. Depending on the type of camera, the data types of the acquired images are different, and they are divided into infrared thermal imaging images acquired by infrared thermal imaging cameras and color images acquired by ordinary cameras. After performing time synchronization, interpolation resampling, and sliding window packaging on sensor data and image data, the original time-series data matrix is ​​output. and image sequences .

3. The fire source tracing method based on deep reinforcement learning according to claim 2, characterized in that, The step of generating a time-series input tensor by performing temporal feature derivation and missing feature adaptive processing on sensor data based on sensor health status includes: The time-series raw data matrix generated from sensor data The physical model is transformed into fire characteristics, forming a derived feature matrix. ; Generate a binary mask based on the sensor health status vector. If any of the original sensors on which a certain fire characteristic depends fails, the corresponding position is 0. According to binary mask For the derived feature matrix Missing positions are filled and zeroed out to generate the observed feature matrix. : ,in This is for element-wise multiplication; By concatenating the observed feature matrix and the binary mask, a temporal input tensor is generated. : .

4. The fire source tracing method based on deep reinforcement learning according to claim 2, characterized in that, The process of transforming and / or normalizing the image data, as well as handling modality markers and image missing data to generate image sequences and modality markers, includes: If the image data is a color image, then the image data... Input generator, convert color image into pseudo-heatmap , regarded as a normalized image ; If the image data is an infrared thermal imaging image, then normalization processing is performed to obtain a normalized image: ;in The lower limit of temperature, For measurement range; If image data is missing, generate an image with all zeros; Acquire the normalized image within the sliding window, along with the camera type and health status, and generate an image sequence. and modal flags; where modal flags A value of 0 indicates that the camera type is an infrared thermal imaging camera and the health status is normal; a value of 1 indicates that the camera type is a regular camera and the health status is normal; a value of 2 indicates that the camera type is any type and the health status is faulty or has no image; if several consecutive invalid frames are detected, it will be forcibly set to 2.

5. The fire source tracing method based on deep reinforcement learning according to claim 3, characterized in that, The step of extending the modal flag to the time dimension and concatenating it with the temporal input tensor to generate the input temporal sequence includes: Extend modal signatures to the time dimension The same flag value is repeated at each time step; it is concatenated with the time series input tensor to generate the input time series. .

6. The fire source tracing method based on deep reinforcement learning according to claim 5, characterized in that, The FTN model includes: an LSTM encoder, a 3D-ResNet18 encoder, a multi-head self-attention fusion module, and a deep reinforcement learning decision network; An LSTM encoder is a timing stream used to determine the input timing sequence. It captures the dynamic trends and temporal dependencies of sensor data, uses masks to ignore failed channels, and generates and outputs temporal features. ; The 3D-ResNet18 encoder is a spatial stream encoder used to extract the spatiotemporal evolution patterns of temperature fields or pseudo-thermal maps from an input image sequence, capture fire source diffusion paths and flame morphology, and generate and output spatial features. ; The multi-head self-attention fusion module is used to dynamically weight and fuse temporal and spatial features to generate fused features. ; Deep reinforcement learning decision networks are used to base decisions on fused features. The fire source tracing is modeled as a Markov decision process. The agent obtains the Q value and auxiliary classification probability through active search and information confirmation actions, including the probability distribution of the fire source area and the probability distribution of the cause of the fire.

7. The fire source tracing method based on deep reinforcement learning according to claim 6, characterized in that, The dynamic weighted fusion of temporal and spatial features generates fused features. ,include: Time series features and spatial features Stacked as ; right Linear transformation yields the query ,key ,value : in, , , These are the query matrix, key matrix, and value matrix, respectively. This is the weight matrix; Calculate attention weights: ;in For the transpose of, Dimensions for each attention head; This is a scaling factor used to stabilize the gradient; Normalize by row so that the sum of the attention weights for each row is 1; right Perform a weighted summation to obtain the weighted summation result. ; Concatenate the weighted sum of all attention head outputs to obtain the concatenated result. ; The stitched result is expanded and passed through a fully connected layer and LayerNorm to obtain the fusion features. .

8. The fire source tracing method based on deep reinforcement learning according to claim 6, characterized in that, The fire source tracing model is a Markov decision process, which includes: state, action, reward, discount factor and strategy; state Fusion characteristics at the current moment ; action This includes: several discrete actions; award Scalar values ​​calculated based on action effects and environmental feedback; Discount factor ∈[0,1], used to balance current and future rewards; Strategy In state Select action The probability distribution.

9. The fire source tracing method based on deep reinforcement learning according to claim 8, characterized in that, The deep reinforcement learning decision network includes: a shared layer, a value stream, a dominance stream, a Q-value output, an auxiliary position classifier head, and an auxiliary cause classifier head; The shared layer is responsible for the current state of the input. fusion features for real-time computing Processed through a fully connected layer, the output is... ; The output of the shared layer is input to the value stream and the advantage stream, respectively, and processed by the fully connected layer to obtain the output state value. and dominance function ; Q-value output, based on the output state value and dominance function Perform Dueling aggregation to obtain the value of the action value function: The output of the shared layer is input to the auxiliary location classification head and the auxiliary cause classification head, respectively. After processing by a fully connected layer and a classification function, the probability distribution of the fire source region is obtained. Probability distribution of causes of fire .

10. The fire source tracing method based on deep reinforcement learning according to claim 9, characterized in that, The action of selecting the maximum Q value: ; The source tracing results include: the area of ​​the fire source and the cause of the fire; The fire source area ; The cause of the fire .