A method and system for extinguishing fires based on electrical equipment
By combining the mapping function model and the temporal convolutional network, the problem of data distortion caused by signal drift of sensors in high-temperature environments is solved, and the accurate assessment and identification of fire risks of electrical equipment is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MSG TECH DEV CORP INC
- Filing Date
- 2026-05-07
- Publication Date
- 2026-07-24
AI Technical Summary
In existing technologies, the output signal of sensors undergoes nonlinear drift under interference environments such as high temperatures, which leads to distortion of electrical equipment fire monitoring data and may cause false alarms or missed alarms.
A mapping function model was trained using machine learning and combined with the LightGBM regressor algorithm to establish a complex mapping relationship between sensor data and concentration. A temporal convolutional network was used to identify abnormal patterns and calculate a comprehensive risk index to generate fire extinguishing instructions.
Dynamically assessing the reliability of sensor data and accurately identifying pre-fire anomalies improves the accuracy of fire risk assessment for electrical equipment, avoiding false alarms or missed alarms.
Smart Images

Figure CN122441031A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical equipment safety protection technology, specifically a fire extinguishing method and system based on electrical equipment. Background Technology
[0002] This invention relates to the field of electrical equipment safety protection technology, specifically to an intelligent fire extinguishing control system and method for enclosed or semi-enclosed electrical equipment compartments such as distribution cabinets and switch cabinets. As fire prevention and control of electrical equipment evolves from traditional passive fire extinguishing to proactive early warning based on real-time monitoring, the internal operating environment of electrical equipment becomes increasingly harsh. Especially under conditions of equipment overload, rapid local temperature increases, and complex operating conditions with high temperatures and strong electromagnetic interference, the monitoring performance of sensors is significantly affected. Their output signals exhibit nonlinear drift with ambient temperature, a phenomenon known as the thermo-sensitive coupling effect. This results in severe data distortion during the heating phase, when accurate data is most needed.
[0003] To address the issue of high-temperature data distortion in sensors, Chinese patent document CN121819235A discloses an intelligent control system and method for an active fire extinguishing device in a high-voltage switchgear, employing a dynamic thermal drift compensation mechanism based on the Arrhenius model. This method establishes a theoretical physical model relating sensor response to temperature, and uses this model to perform zero-point drift correction and sensitivity compensation on the acquired raw data, reconstructing high-fidelity monitoring values.
[0004] However, this method heavily relies on a pre-defined physical compensation model, making corrections based on a pre-set, static formula, lacking the ability to evaluate and adaptively adjust the compensation effect itself. When sensor characteristics drift due to aging, or encounter interference types not covered by the model, the system cannot detect compensation failure and may continuously output erroneous "corrected" data, leading to false alarms or missed alarms. Therefore, a new method is urgently needed that can adaptively learn sensor drift patterns and integrate multi-source information for accurate fire risk assessment. Summary of the Invention
[0005] The purpose of this application is to provide a fire extinguishing method and system based on electrical equipment to solve the problems mentioned in the background art.
[0006] In a first aspect, one embodiment of this application provides a fire extinguishing method based on electrical equipment. The method includes: acquiring raw data about the operating environment of the electrical equipment collected by multiple sensors; inputting the raw data into a preset mapping function model for processing to obtain a concentration prediction value after compensation processing by the mapping function model; wherein the mapping function model is obtained through machine learning training based on data calibrated by corresponding sensors under various temperature and standard substance concentration combinations; calculating the confidence level of the corresponding concentration prediction value based on the raw data, the performance index of the mapping function model, and the current ambient temperature; combining the concentration prediction value and the corresponding confidence level into a time-series feature and inputting it into a temporal convolutional network for processing to obtain an anomaly score representing the deviation of the data from the normal pattern at the current moment; calculating a comprehensive risk index based on the concentration prediction value, confidence level, and anomaly score; and generating a fire extinguishing command when the comprehensive risk index exceeds a preset risk threshold; wherein the comprehensive risk index is used to characterize the magnitude of the fire risk in the electrical equipment's cabin.
[0007] In conjunction with the first aspect, in some implementations of the first aspect, the pre-defined mapping function model training process includes: obtaining a feature matrix composed of calibration temperature points and the original output signal based on the original data, and obtaining a label vector composed of standard substance concentration values; performing a training loop using the LightGBM regressor algorithm based on the feature matrix and the label vector to obtain a new decision tree; based on the new decision tree, when the preset maximum number of iterations is reached, the loop ends, and the mapping function is calculated, which is used to characterize the mapping relationship from the original data to the concentration prediction value; applying the mapping function to a validation dataset, and calculating the performance index of the mapping function model, which includes the mean absolute error and the coefficient of determination; if the mean absolute error is less than the first judgment condition and the coefficient of determination is greater than the second judgment condition, the model training is successful; if the mean absolute error is greater than or equal to the first judgment condition, and / or the coefficient of determination is less than or equal to the second judgment condition, the model training fails, and the model is retrained.
[0008] In conjunction with the first aspect, in some implementations of the first aspect, a new decision tree is obtained by using the LightGBM regressor algorithm for training loops based on the feature matrix and label vectors. This includes: randomly setting the splitting feature type of the splitting nodes in the decision tree based on the feature matrix, and setting the decision tree in the LightGBM regressor algorithm; setting up a training loop, comparing the feature matrix with the splitting threshold of the splitting nodes to obtain the output value of the corresponding leaf node, and performing a weighted summation of the leaf node output values to obtain the concentration prediction value; calculating the loss function of the current loop based on the concentration prediction value and the label vector; calculating the gradient of the loss function relative to the concentration prediction value based on the loss function; and fitting the gradient to the feature matrix to obtain the new decision tree.
[0009] In conjunction with the first aspect, in some implementations of the first aspect, the confidence level of the corresponding concentration prediction value is calculated based on the original data, the performance index of the mapping function model, and the current ambient temperature. This includes: calculating the temperature deviation factor based on the allowable error of the temperature reading between the calibration temperature point and the current ambient temperature; calculating the signal stability factor based on the standard deviation of the original output signal within a time window; calculating the historical health factor based on the mean absolute error; and calculating the confidence level by weighted fusion of the temperature deviation factor, the signal stability factor, and the historical health factor.
[0010] In conjunction with the first aspect, in certain implementations of the first aspect, the data is input into a temporal convolutional network for processing to obtain an anomaly score representing the deviation of the data from the normal pattern at the current moment. This includes: inputting the temporal features into the first layer of the temporal convolutional network and performing weighted summation to obtain a feature tensor; inputting the feature tensor into the core layer of the temporal convolutional network and performing dilated causal convolution and nonlinear activation processing to obtain a high-level feature tensor; calculating the average value of each feature channel of the high-level feature tensor to obtain a one-dimensional feature vector; and inputting the one-dimensional feature vector into the output layer of the temporal convolutional network and obtaining the anomaly score through linear transformation.
[0011] In conjunction with the first aspect, in some implementations of the first aspect, the feature tensor is input into the core layer of the temporal convolutional network, and dilated causal convolution and nonlinear activation are performed to obtain a high-level feature tensor. This includes: the core layer pre-setting a dilation rate; using the dilation rate, skipping input points at fixed intervals for each element in the feature tensor; using left-padding to fill the skipped input points with zeros to obtain the processed feature tensor; applying a nonlinear activation function to the processed feature tensor to obtain the first-layer output feature tensor of the core layer; inputting the first-layer output feature tensor into the second layer of the core layer, setting the same dilation rate, and repeating the dilated causal convolution and nonlinear activation process to obtain the second-layer output feature tensor of the core layer; adding the second-layer output feature tensor element-wise to the first-layer output feature tensor to obtain the final second-layer output feature tensor, which will be used as the input feature tensor of the next layer; after traversing the core layers, using the output feature tensor of the last layer as the final output to obtain the high-level feature tensor.
[0012] In conjunction with the first aspect, in some implementations of the first aspect, a comprehensive risk index is calculated based on the concentration prediction value, confidence level, and anomaly score, including: performing weighted fusion based on the anomaly score and confidence level, and normalizing the weighted score to obtain the time-series anomaly score; calculating the dynamic weight of each sensor based on the time-series anomaly score and confidence level; and calculating the comprehensive risk index based on the confidence level, dynamic weight, concentration prediction value, and time-series anomaly score.
[0013] Secondly, this application provides a fire extinguishing system based on electrical equipment, comprising: a data acquisition module for acquiring raw data about the operating environment of the electrical equipment collected by multiple sensors; a data compensation module for inputting the raw data into a preset mapping function model for processing to obtain a concentration prediction value after compensation by the mapping function model; wherein, the mapping function model is obtained by machine learning training based on data calibrated by the corresponding sensors under various combinations of temperature and standard substance concentrations; a confidence calculation module for calculating the confidence level of the corresponding concentration prediction value based on the raw data, the performance index of the mapping function model, and the current ambient temperature; an anomaly analysis module for combining the concentration prediction value and the corresponding confidence level into a time-series feature and inputting it into a temporal convolutional network for processing to obtain an anomaly score representing the deviation of the data from the normal pattern at the current moment; and a risk decision module for calculating a comprehensive risk index based on the concentration prediction value, confidence level, and anomaly score, and generating a fire extinguishing command when the comprehensive risk index exceeds a preset risk threshold; wherein, the comprehensive risk index is used to characterize the magnitude of the fire risk of the electrical equipment compartment.
[0014] Thirdly, this application provides an electronic device, including: a processor; and a memory storing computer program instructions, which, when executed by the processor, implement the steps of the fire extinguishing method based on electrical equipment mentioned in the first aspect.
[0015] Fourthly, this application provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, cause the processor to perform the steps in the fire extinguishing method based on electrical equipment mentioned in the first aspect.
[0016] The fire extinguishing method based on electrical equipment provided in this application compensates the original sensor data through a mapping function model, calculates confidence levels by combining multi-dimensional information to quantify the data, and uses a temporal convolutional network to identify abnormal patterns in the temporal characteristics of concentration and confidence levels, and fuses concentration, confidence levels and abnormal scores to calculate a comprehensive risk index. This solves the problem in the prior art where nonlinear drift of sensor output signals under interference environments such as high temperatures leads to data distortion, resulting in false alarms or missed alarms. It achieves dynamic assessment of data credibility and accurately identifies fire precursor anomalies from a temporal perspective, thereby improving the accuracy of fire risk assessment for electrical equipment. Attached Figure Description
[0017] Figure 1 The diagram shown is a schematic flowchart of a fire extinguishing method based on electrical equipment provided in an exemplary embodiment of this application.
[0018] Figure 2The diagram shown is a flowchart illustrating a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application.
[0019] Figure 3 The diagram shown is a schematic flowchart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application.
[0020] Figure 4 The diagram shown is a schematic flowchart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application.
[0021] Figure 5 The diagram shown is a schematic flowchart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application.
[0022] Figure 6 The diagram shown is a schematic flowchart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application.
[0023] Figure 7 The diagram shown is a schematic flowchart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application.
[0024] Figure 8 The diagram shown is a structural schematic of a fire extinguishing system based on electrical equipment provided in an exemplary embodiment of this application.
[0025] Figure 9 The diagram shown is a structural schematic of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] The following is combined with Figures 1 to 7 This application provides a detailed description of a fire extinguishing method based on electrical equipment.
[0028] Figure 1 The diagram shown is a schematic flowchart of a fire extinguishing method based on electrical equipment provided in an exemplary embodiment of this application. Figure 1 As shown in the embodiments of this application, the fire extinguishing method based on electrical equipment includes the following steps.
[0029] Step 100: Obtain raw data about the operating environment of electrical equipment collected by multiple sensors.
[0030] For example, the operating environment of electrical equipment refers to the enclosed or semi-enclosed electrical equipment enclosure such as a distribution cabinet or switch cabinet.
[0031] For example, raw data refers to the raw electrical signals directly collected and output by various sensors deployed in the electrical equipment compartment without any compensation or calibration. It is the initial data source for the entire system to make fire risk assessments.
[0032] Step 102: Input the raw data into the preset mapping function model for processing to obtain the concentration prediction value after compensation processing by the mapping function model.
[0033] For example, a mapping function model refers to a mathematical model trained using machine learning algorithms to establish a complex mapping relationship between raw sensor data, ambient temperature, and actual substance concentration. Specifically, this model takes the raw readings of a specific sensor and the current ambient temperature as input, performs internal calculations, and outputs a compensated concentration prediction value.
[0034] For example, the concentration prediction value refers to a value calculated and output by the model after the raw data from the sensor and the current ambient temperature are input into the mapping function model.
[0035] Step 104: Calculate the confidence level of the corresponding concentration prediction value based on the original data, the performance index of the mapping function model, and the current ambient temperature.
[0036] For example, performance metrics include mean absolute error and coefficient of determination, which are used to determine whether the training accuracy of the mapping function model meets the requirements and to calculate historical health factors.
[0037] For example, confidence level is an indicator used to quantify the reliability of the concentration prediction value of the corresponding sensor at the current moment, and its value ranges from 0 to 1.
[0038] Step 108: Combine the concentration prediction value with the corresponding confidence level into a time-series feature, and input it into a temporal convolutional network for processing to obtain an anomaly score that represents the deviation of the data from the normal pattern at the current time.
[0039] For example, time-series features refer to two-dimensional input features obtained by recombining data pairs consisting of concentration prediction values and confidence levels.
[0040] Step 110: Calculate the comprehensive risk index based on the concentration prediction value, confidence level, and anomaly score. When the comprehensive risk index exceeds the preset risk threshold, generate a fire extinguishing command.
[0041] For example, the comprehensive risk index is a single quantitative value obtained by fusing concentration predictions, confidence levels, and time-series anomaly scores from all relevant sensors and then weighting them.
[0042] The fire extinguishing method based on electrical equipment provided in this application compensates the original sensor data through a mapping function model, calculates confidence levels by combining multi-dimensional information to quantify the data, and uses a temporal convolutional network to identify abnormal patterns in the temporal characteristics of concentration and confidence levels, and fuses concentration, confidence levels and abnormal scores to calculate a comprehensive risk index. This solves the problem in the prior art where nonlinear drift of sensor output signals under interference environments such as high temperatures leads to data distortion, resulting in false alarms or missed alarms. It achieves dynamic assessment of data credibility and accurately identifies fire precursor anomalies from a temporal perspective, thereby improving the accuracy of fire risk assessment for electrical equipment.
[0043] Figure 2 The diagram shown is a schematic flow chart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application. Figure 1 This application extends from the embodiments shown. Figure 2 The illustrated embodiment will be described in detail below. Figure 2 The illustrated embodiments and Figure 1 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0044] like Figure 2 As shown in the embodiment of this application, the fire extinguishing method based on electrical equipment includes the following steps in the preset mapping function model training process.
[0045] Step 200: Based on the original data, obtain the feature matrix composed of the calibration temperature point and the original output signal, and obtain the standard substance concentration value to form the label vector.
[0046] Specifically, first, the three-dimensional data matrix D of the i-th sensor is read from the calibration data buffer. i Learn a mapping function F through a machine learning model i The ambient temperature T and the sensor's raw reading R raw Using the input, predict the true concentration C. est Specifically, it includes the following steps.
[0047] Next, based on the three-dimensional data matrix D of the i-th sensor... i The calibration temperature point T in the N triplet is... j and the original output signal R' raw [i](T j C k ) combined into a two-dimensional feature vector x(j, k)=[T j , R' raw [i]], all eigenvectors x(j, k) form the feature matrix X.
[0048] X = {[T1, R' raw [i](T1, C1)], [T1, R' raw [i](T1, C2)], ..., [T1, R' raw [i](T1,C N )], [T2, R' raw [i](T1, C1)], [T2, R' raw [i](T1, C2)], ..., [T2, R' raw [i](T2,C N )], ... [T n , R' raw [i](T n [, C1)], [T n , R' raw [i](T1, C2)], ..., [T n , R' raw [i](T n C N )]}; Finally, the N triples E i The known and true concentration value of the standard substance C k As the target output, it forms the label vector Y.
[0049] Y = [C1, C2, ..., C N ]; For example, physical calibration data is transformed into the format required for a supervised learning problem. X is the input feature of the machine learning model, describing "at what temperature point T, what raw reading R did the sensor output?" raw "; Y is the desired output (label), that is, "the actual quasi-substance concentration value C at this time". standard "What should it be?" (Mapping function F) i Used to learn complex mappings from X to Y.
[0050] Step 202: Based on the feature matrix and label vector, the LightGBM regressor algorithm is used for training loop to obtain a new decision tree.
[0051] Specifically, based on the feature matrix X and the label vector Y, the LightGBM regressor algorithm is used as the sensor calibration mapping function F. i Based on the basic model architecture, sensor type, and data volume, a set of hyperparameters is set. These hyperparameters include the number of decision trees, L. n The maximum depth L of the treemax Learning rate L rate .
[0052] It should be understood that the number of decision trees is used to control the overall complexity and learning ability of the model. A larger number of trees allows the model to combine more simple rules to fit the complex nonlinear mapping relationship between ambient temperature and raw sensor readings to the true concentration. The maximum depth of the trees is used to limit the complexity of a single decision tree and its ability to capture feature interactions. In this embodiment, L is set... max =3; The learning rate ranges from [0, 1] and is used to control the contribution of each new decision tree to the final model, preventing overfitting.
[0053] For example, the basic model architecture refers to approximating arbitrarily complex nonlinear functions by combining multiple decision trees without pre-setting the mathematical relationship between input and output; in addition to the LightGBM regressor algorithm, the basic model architecture can also be other non-parametric, tree-based ensemble learning algorithms.
[0054] Step 204: Based on the new decision tree, when the preset maximum number of iterations is reached, the loop ends, and the mapping function is calculated.
[0055] Specifically, according to the new decision tree h m (x), when the preset maximum number of iterations Z is reached. Max When the loop ends, the update mapping function F is calculated. i .
[0056] ; Where F0 represents the initial mapping function, which is set as the mean of the standard substance concentration values in the label vector Y.
[0057] Step 206: Apply the mapping function to a validation dataset and calculate the performance metrics of the mapping function model.
[0058] Specifically, after the loop ends, the updated mapping function F will be... i Applied to an unused validation dataset, the mean absolute error (MAE) and coefficient of determination (R²) are calculated. 2 .
[0059] ; ; Where P represents the number of samples in the validation dataset; C k_P This represents the standard substance concentration values input to the validation dataset; C est_P This represents the concentration prediction value of the validation dataset.
[0060] Step 208: If the mean absolute error is less than the first criterion and the coefficient of determination is greater than the second criterion, the model training is successful; if the mean absolute error is greater than or equal to the first criterion and / or the coefficient of determination is less than or equal to the second criterion, the model training fails and the model is retrained.
[0061] Specifically, firstly, if the mean absolute error (MAE) < the first criterion and the coefficient of determination R0 2 The second criterion indicates that the updated mapping function F i The model training was successful and the accuracy requirements were met; if the mean absolute error (MAE) ≥ the first criterion, and / or the coefficient of determination (R²) is met, the accuracy requirements are met. 2 If the second condition is met, it indicates that the updated mapping function F i The model's accuracy was not up to standard, so the model was retrained.
[0062] The first criterion is that the value is between 2% and 5% of the full scale, and the second criterion is a fixed constant with a value range of [0.95, 0.99].
[0063] Next, the splitting features x(f) of each decision tree in the model are... i ), splitting threshold δ i Leaf node output value C est_i The hyperparameters are encapsulated and serialized to form a decision tree structure data set. The sensor ID, decision tree structure data set, mean absolute error (MAE), and coefficient of determination (R²) are then combined. 2 These constitute the sensor feature package.
[0064] The fire extinguishing method based on electrical equipment provided in this application constructs a feature matrix and label vector by acquiring calibration data of sensors in the full temperature range and full measurement range, and uses the LightGBM regressor algorithm for iterative training and verification. This solves the problem that relying on a single, fixed physical model cannot accurately fit the complex nonlinear temperature drift characteristics of the sensor, and cannot guarantee the generalization ability of the model. It establishes a high-precision calibration model for various sensors, realizes accurate temperature drift compensation for sensor output signals, and provides quantitative indicators for evaluating model performance.
[0065] Figure 3 The diagram shown is a schematic flow chart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application. Figure 1 This application extends from the embodiments shown. Figure 3 The illustrated embodiment will be described in detail below. Figure 3 The illustrated embodiments and Figure 1 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0066] like Figure 3As shown in the embodiment of this application, the fire extinguishing method based on electrical equipment uses the LightGBM regressor algorithm to perform training loops based on the feature matrix and label vector to obtain a new decision tree, including the following steps.
[0067] Step 300: Based on the feature matrix, randomly set the splitting feature type of the splitting node in the decision tree.
[0068] Specifically, based on the ambient temperature T and the sensor's raw reading R raw The splitting characteristics of each splitting node in the decision tree are randomly set to ambient temperature T and the original sensor reading R. raw .
[0069] It should be understood that each decision tree consists of multiple nodes, including split nodes and leaf nodes, and the depth of each decision tree does not exceed the maximum depth L of the tree. max The split node includes a split condition, which takes the form: determining whether feature x(f) ≤ split threshold δ. When an input sample [T, R]... raw When the sample reaches the split node, the model checks whether the value of the f-th feature (f = 1, 2) of the sample is less than or equal to the split threshold δ. Based on the judgment result, the sample will be assigned to the left child node or the right child node.
[0070] Step 302: Set up a training loop, compare the feature matrix with the splitting threshold of the splitting node to obtain the output value of the corresponding leaf node, and perform a weighted summation of the output values of the leaf nodes to obtain the concentration prediction value.
[0071] Specifically, the training loop is started, and in each iteration, the feature matrix X is input into the current mapping function F. current The current mapping function F current For each input feature vector x(j, k), based on the temperature point T and the raw reading R raw The value of the splitting threshold δ of the splitting node in the basic model architecture i Perform a "yes / no" judgment until you reach the leaf node. Where δ i Let represent the splitting threshold of the i-th decision tree, where i = {1, 2, ..., L}. n}, L n The number of decision trees.
[0072] Then, based on the number L of decision trees n The basic model architecture outputs the values C of all leaf nodes of the decision tree. est_i We perform a weighted summation to obtain the concentration prediction value C for the current iteration. est .
[0073] C est =C est_1× w1+ C est_2 ×w2 + ... +C est_Ln × w Ln ; Where w1 represents the weight of the first decision tree.
[0074] Step 304: Calculate the loss function for the current iteration based on the concentration prediction value and the label vector.
[0075] Specifically, let's set the current iteration to the m-th iteration, meaning m-1 trees have been trained. The mapping function of the model after the m-th iteration update is F. m (x).
[0076] ; Where x represents the input feature vector, i.e., the calibration temperature point T. j and the original output signal R' raw [i](T j C k );F m-1 (x) represents the concentration prediction of the input feature vector by the model after the (m-1)th iteration; h m (x) represents the decision tree model newly trained in the m-th round, used to fit the negative gradient of the current model.
[0077] Then, receive N concentration prediction values C est and the corresponding standard substance concentration value C k Calculate the mean squared error of the current model prediction and use the mean squared error as the loss function L(y, F(x)).
[0078] ; Where y represents the concentration value C of the standard substance. k F(x) represents the predicted concentration C. est .
[0079] For example, the concentration prediction value C is obtained through the feature matrix X and the label vector Y. est The process is the mapping function F i The learning process, based on the input [T] j , R' raw [i]] Guess the concentration C est Then, the loss function L is calculated by comparing it with the true value. The loss function L is used to quantify the current inaccuracy of the model and drive the model parameter update.
[0080] Step 306: Calculate the gradient of the loss function relative to the concentration prediction value based on the loss function.
[0081] Specifically, based on the i-th sample (x) in the training dataseti , y i ), calculate the loss function L(y) i , F(x i )) Relative to the current concentration prediction value F m-1 The gradient r of (x) i,m .
[0082] ; Among them, y i This represents the true label value of the i-th sample, i.e., the concentration value of the standard substance, C. i ;F m-1 (x) represents the concentration prediction of the input feature vector by the model after the (m-1)th iteration.
[0083] Step 308: Based on the gradient and the feature matrix, fit the gradient through the feature matrix to obtain a new decision tree.
[0084] Specifically, according to gradient r i,m Through the input feature vector x i Fit the gradient r calculated in the current iteration i,m A new decision tree h is obtained. m (x).
[0085] ; Where N represents the total number of training samples, i.e., N triples; arg min h (z) represents the search for the function h that minimizes the value of the expression (z).
[0086] The fire extinguishing method based on electrical equipment provided in this application solves the problem that traditional models cannot automatically optimize and are difficult to approximate complex functional relationships by calculating the gradient of the loss function in the training loop and fitting a new decision tree based on the gradient to iteratively update the model. This enables the model to automatically and efficiently learn the complex nonlinear mapping relationship from ambient temperature and original sensor readings to the true concentration through gradient descent, continuously reducing prediction errors and improving the accuracy of concentration prediction values.
[0087] Figure 4 The diagram shown is a schematic flow chart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application. Figure 1 This application extends from the embodiments shown. Figure 4 The illustrated embodiment will be described in detail below. Figure 4 The illustrated embodiments and Figure 1 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0088] like Figure 4As shown in the embodiment of this application, the fire extinguishing method based on electrical equipment calculates the confidence level of the corresponding concentration prediction value according to the original data, the performance index of the mapping function model and the current ambient temperature, including the following steps.
[0089] Step 400: Calculate the temperature deviation factor based on the allowable error of the temperature reading between the calibrated temperature point and the current ambient temperature.
[0090] Specifically, firstly, the calibration data packets S for each sensor are obtained from the calibration data buffer. For the calibration data packet S of the i-th sensor... i Read the ambient temperature T and the sensor's raw reading R. raw And input the updated mapping function F i The model.
[0091] Next, based on the updated mapping function F i The concentration prediction value V was calculated. i (t).
[0092] V i (t) = F i (T(t), R' raw [i](t)); Among them, V i (t) represents the compensated concentration prediction value of sensor i at time t; T(t) represents the ambient temperature at time t; R' raw [i](t) represents the preprocessed original output signal of sensor i at time t.
[0093] Finally, based on the ambient temperature T(t) and the calibration temperature point T... t The allowable error ΔT between temperature readings is used to calculate the temperature deviation factor f. temp (t).
[0094] f temp (t) = 1 / (1+α×|ΔT|); Wherein, α represents the attenuation coefficient, and in this embodiment, the value range of α is set to [0.5, 1].
[0095] For example, the temperature deviation factor f temp The range of f(t) is (0, 1]. The smaller |ΔT| is, the closer the ambient temperature measured by the sensor is to the calibration temperature point. temp The closer (t) is to 1, the higher the confidence level.
[0096] Step 402: Calculate the signal stability factor based on the standard deviation of the original output signal within a time window.
[0097] Specifically, based on the raw output signal R' of sensor i after preprocessing raw The standard deviation σ of [i](t) within a time window. i Calculate the signal stability factor f stab (R' raw [i]).
[0098] f stab (R' raw [i])=1 / (1+β×σ i ); Wherein, β represents the stability coefficient, and in this embodiment, the value range of β is set to [0, 1].
[0099] For example, the signal stability factor f stab (R' raw The range of [i] is (0, 1], and the standard deviation σ i The larger the value, the more unstable the signal and the lower the confidence level. The time window can be set to the most recent 30 seconds of data acquisition, i.e., from time (t-30s) to time t, or the most recent 60 seconds, i.e., from time (t-60s) to time t.
[0100] Step 404: Calculate the historical health factors based on the mean absolute error.
[0101] Specifically, the historical health factor f is calculated based on the mean absolute error (MAE). Hi .
[0102] f Hi = 1 / (1+γ×MAE); Wherein, γ represents the health coefficient, and in this embodiment, the value range of γ is set to [0, 1].
[0103] For example, historical health factor f Hi The range of the value is (0, 1]. The larger the mean absolute error (MAE), the more unstable the model prediction is and the lower the confidence level.
[0104] Step 406: Based on the temperature deviation factor, signal stability factor, and historical health factor, a weighted fusion is performed to calculate the confidence level.
[0105] Specifically, according to the temperature deviation factor f temp (t), signal stability factor f stab (R' raw [i]) and historical health factors f Hi Through weighted fusion, the confidence level C of sensor i at time t is calculated. i (t).
[0106] Ci (t)=a1×f temp (t)+a2×f stab (R' raw [i])+a3×f Hi ; Where a1, a2, and a3 represent weighting coefficients, and satisfy a1+a2+a3=1, which are adjusted according to the sensor type and practical experience.
[0107] For example, under extreme high-temperature conditions, even after passing through the mapping function F i Whether the reliability of the sensor data is sufficient for decision-making is unknown, and this application uses confidence level to quantify this uncertainty.
[0108] The fire extinguishing method based on electrical equipment provided in this application overcomes the problem of not being able to dynamically perceive and quantify the reliability of sensor data after model compensation under the current operating conditions by fusing temperature deviation factor, signal stability factor and model historical health factor, and by calculating confidence level through weighted calculation. It comprehensively evaluates the credibility of real-time data of each sensor from three dimensions: environmental matching degree, signal quality and model performance, and provides key weight basis for subsequent multi-sensor information fusion and risk decision-making.
[0109] Figure 5 The diagram shown is a schematic flow chart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application. Figure 1 This application extends from the embodiments shown. Figure 5 The illustrated embodiment will be described in detail below. Figure 5 The illustrated embodiments and Figure 1 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0110] like Figure 5 As shown in the embodiment of this application, the fire extinguishing method based on electrical equipment is processed by a temporal convolutional network to obtain an anomaly score that represents the deviation of the data from the normal pattern at the current moment, including the following steps.
[0111] Step 500: Input the temporal features into the first layer of the temporal convolutional network, perform weighted summation, and obtain the feature tensor.
[0112] Specifically, firstly, based on the concentration prediction value V i (t) and confidence level C i (t), extract the predicted concentration V of sensor i from the most recent L time intervals. i (t) and confidence level C i (t), forming data pairs D ate_i =[(V i (t-L+1), Ci (t-L+1)), (V i (t-L+2), C i (t-L+2)), ..., (V i (t-1), C i (t-)), (V i (t), C i (t))].
[0113] For example, the value of L should be between 30 and 120, and should not be too large or too small, to prevent the computation time from being consumed by too large a data volume, or the calculation result from being too erroneous by too small a data volume.
[0114] Then, the data is compared with D. ate_i Reorganized into two-dimensional input features X i =(V i C i Input to a Temporal Convolutional Network (TCN), for X i For each feature dimension f (f = 1, 2), calculate the mean μ of that feature over the entire sequence of length L. f and standard deviation σ f .
[0115] ; ; Wherein, input feature X i The dimension is (L, F), where L is the sequence length (i.e., the number of time steps) and F is the feature dimension. In this embodiment, F=2, i.e., V. i and C i ;X i [l, f] represents the input feature X i The characteristic value corresponding to the element in the l-th row and f-th column.
[0116] Next, based on the mean μ f and standard deviation σ f For input feature X i Each element in the input is normalized to obtain the normalized input feature X. i '.
[0117] X i '[l, f]=(X i [l, f]-μ f ) / (σ f +ε); Among them, X i [l, f] represents the normalized input feature X. iThe characteristic value corresponding to the element in the l-th row and f-th column of '; ε represents a fixed constant used to prevent division by zero errors. In this embodiment, ε is set to 0.00000001.
[0118] Finally, the normalized input features X i 'Input the first layer of the TCN network, for X i The d-th channel (d=1, ..., D) is weighted and summed to obtain the feature tensor H0. The feature tensor H0 has dimensions (L, D).
[0119] ; Where H0[l, d] represents the d-th eigenvalue at time l after the first layer of calculation; w d b represents the weight matrix of the d-th channel; d This represents the bias vector of the d-th channel.
[0120] For example, the first layer of the TCN network is a convolutional layer, which includes D convolutional kernels, each with a size set to (1, F). In this embodiment, D=32. Each convolutional kernel simultaneously examines F features (V... i C i (), but not across time steps.
[0121] For example, the original 2D features (V) are transformed by a linear projection. i C i This maps to a higher-dimensional (D-dimensional) latent space, providing a feature representation basis for subsequent nonlinear transformations.
[0122] Step 502: Input the feature tensor into the core layer of the temporal convolutional network, perform dilated causal convolution and nonlinear activation processing to obtain the high-level feature tensor.
[0123] Specifically, the feature tensor H0 is input into the core layer, which consists of N residual blocks with identical structures connected in series. Each residual block n (n = 1, ..., N) is related to the feature tensor H0. n-1 Perform dilated causal convolution and nonlinear activation processing.
[0124] Step 504: Calculate the average value for each feature channel of the high-level feature tensor to obtain a one-dimensional feature vector.
[0125] Specifically, based on the high-level feature tensor H N For the high-level feature tensor H N For each of the D feature channels d, calculate its average value h over all L time points. d This yields a one-dimensional eigenvector h. global=[h1, h2, ..., h d , ...,h D ].
[0126] ; For example, the variable-length high-level feature tensor H N Compressed into a fixed-length one-dimensional feature vector h global h global The fingerprint information characterizes the entire sequence, preserving the key pattern features of the sequence as a whole by losing details at specific time points.
[0127] Step 506: Based on the one-dimensional feature vector, input it into the output layer of the temporal convolutional network, and obtain the anomaly score through linear transformation.
[0128] Specifically, based on the one-dimensional eigenvector h global The input to the output layer of the TCN network is transformed into a one-dimensional feature vector h through a linear transformation. global Mapping to a scalar, we obtain the anomaly score A of the final output of the TCN network. raw_i (t).
[0129] A raw_i (t)=w a T ×h global +b a ; Among them, w a T b represents the transpose of a D-dimensional weight vector; a The bias term representing the output layer of the TCN network is a scalar. For example, the abnormal score A raw_i (t) represents the degree of deviation between the predicted concentration and confidence level sequence and the actual sensor data measured during a normal fire and the measured data under a standard scenario.
[0130] The fire extinguishing method based on electrical equipment provided in this application solves the problem that relying solely on a single-point concentration threshold to judge fire risk can easily overlook slowly developing abnormal trends or instantaneous fluctuations caused by noise, leading to misjudgment. This method effectively captures the dynamic patterns and long-term dependencies of concentration and confidence over time, accurately identifies the true pre-fire abnormal patterns, and filters out instantaneous interference.
[0131] Figure 6 The diagram shown is a schematic flow chart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application. Figure 1This application extends from the embodiments shown. Figure 6 The illustrated embodiment will be described in detail below. Figure 6 The illustrated embodiments and Figure 1 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0132] like Figure 6 As shown in the embodiment of this application, the fire extinguishing method based on electrical equipment involves inputting a feature tensor into the core layer of a temporal convolutional network, performing dilated causal convolution and nonlinear activation processing to obtain a high-level feature tensor, including the following steps.
[0133] Step 600: The core layer pre-sets the expansion rate. By using the expansion rate, each element in the feature tensor skips input points at fixed intervals. The left-side padding method is used to fill the skipped input points with zeros to obtain the processed feature tensor.
[0134] Specifically, the feature tensor H0 is input into the first layer of the core layer, with a preset expansion rate D. r = 2 n-1 Through the expansion rate D r For each element in the feature tensor H0, skip (D) r -1) input points are used to fill the skipped input points with 0 using the left-side padding method, resulting in the processed feature tensor H0'.
[0135] For example, the first layer of the core layer is the first residual block (n=1), also known as the dilated causal convolutional layer, when D r =2 1 -1 When the value is 2, the convolution kernel samples once every other point in the time dimension.
[0136] Step 602: Apply a nonlinear activation function to the processed feature tensor to obtain the first layer output feature tensor of the core layer.
[0137] Specifically, the nonlinear activation function ReLU is applied to the processed feature tensor H0' to obtain the first layer output feature tensor H0'' of the core layer.
[0138] H0''[l, d] = ReLU(H0'[l, d]) = max(0, H0'[l, d]); Step 604: Input the first layer output feature tensor into the second layer of the core layer, set the same dilation rate, and repeat the dilation causal convolution and nonlinear activation process to obtain the second layer output feature tensor of the core layer.
[0139] Specifically, the first layer output feature tensor H0'' of the core layer is used as the feature tensor H. n-1 Input the second layer of the core layer and set the same expansion rate D.r = 2 n-1 Repeated dilation of causal convolution and nonlinear activation processes yield the second-layer output feature tensor H of the core layer. n-1 ''.
[0140] For example, the second layer of the core layer is input, where n=2, therefore the expansion rate D r = 2 2-1 =2.
[0141] Step 606: Add the second-layer output feature tensor to the first-layer output feature tensor element by element to obtain the second-layer final output feature tensor. The second-layer final output feature tensor will be used as the input feature tensor of the next layer.
[0142] Specifically, the second layer output feature tensor H n-1 ''The input feature tensor H of the current residual block n-1 By performing element-wise addition, we obtain the feature tensor H. n Feature tensor H n It will be used as the input feature tensor for the next layer.
[0143] H n =Activation(Conv2(Activation(Conv1(H n-1 ))) + H n-1 ''); Step 608: After traversing the core layers, take the output feature tensor of the last layer as the final output to obtain the high-level feature tensor.
[0144] Specifically, after processing through N residual blocks, the output feature tensor H of the last layer is... N-1 As the final output, we obtain the high-level feature tensor H. N .
[0145] The fire extinguishing method based on electrical equipment provided in this application solves the problem that convolutional networks have difficulty capturing long sequence dependencies and the gradient vanishing or exploding problem that may occur in deep network training by using dilated causal convolution with a specific dilation rate combined with nonlinear activation and residual connection in the core layer of the temporal convolutional network. Without increasing the number of parameters, it expands the network's perception range of historical information, stabilizes the training process, and effectively extracts deep abnormal features from time series data, thereby improving the accuracy of abnormal score calculation.
[0146] Figure 7 The diagram shown is a schematic flow chart of a fire extinguishing method based on electrical equipment provided in another exemplary embodiment of this application. Figure 1 This application extends from the embodiments shown. Figure 7The illustrated embodiment will be described in detail below. Figure 7 The illustrated embodiments and Figure 1 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0147] like Figure 7 As shown in the embodiments of this application, the fire extinguishing method based on electrical equipment calculates a comprehensive risk index based on the concentration prediction value, confidence level, and anomaly score, including the following steps.
[0148] Step 700: Perform weighted fusion based on the anomaly score and confidence level, and normalize the weighted score to obtain the time series anomaly score.
[0149] Specifically, based on the abnormal score A raw_i (t) and confidence level C i (t) is weighted and fused, and the weighted score is normalized by a Sigmoid function to obtain the time series anomaly score A. i (t).
[0150] ; Here, τ represents the temperature parameter, used to control the steepness of the sigmoid function. A larger τ value results in a smoother output change; a smaller τ value results in a larger output change, closer to a step function. Step 702: Calculate the dynamic weight of each sensor based on the time-series anomaly score and confidence level.
[0151] Specifically, based on the time series anomaly score A i (t) and confidence level C i (t), calculate the dynamic weight W of sensor i at time t. i (t).
[0152] W i (t) = W base_i × C i (t) × (1 + θ * |A i (t) - 0.5|); Among them, W base_i Represents the preset basic weights of sensor i; |A i (t) - 0.5| indicates that the abnormal (close to 1) or normal (close to 0) cases are emphasized to ignore intermediate states; θ represents the adjustment factor used to characterize the dynamic increase in the weight of the sensor in the current decision when the confidence level is high and the time series abnormality score deviates further from the normal value (0.5).
[0153] Step 704: Calculate the comprehensive risk index based on confidence level, dynamic weight, concentration prediction value, and time series anomaly score.
[0154] Specifically, firstly, based on the confidence level C i (t), dynamic weight W i (t), Predicted concentration value V i (t) and the time series outlier score A i (t), calculate the overall risk index R(t) for the whole.
[0155] ; Among them, V th_i (t) represents the preset alarm threshold of sensor i, used to adjust the concentration prediction value V. i (t) is normalized; M represents the total number of sensors.
[0156] Then, based on the comprehensive risk index R(t), if the comprehensive risk index R(t) is greater than or equal to the preset risk threshold θ, R If the fire alarm is triggered, a fire extinguishing command is sent to the fire extinguishing actuator to carry out fire extinguishing actions; if the comprehensive risk index R(t) is less than the preset risk threshold θ, the fire alarm will be triggered. R If not, a fire alarm will not be triggered.
[0157] Among them, the risk threshold θ R This indicates the boundary delineation of the fire risk level. In this embodiment, the value range is set to [0.5, 2].
[0158] The fire extinguishing method based on electrical equipment provided in this application addresses the problem of decreased decision-making accuracy in multi-sensor systems when making fire decisions by simply averaging or fusion of sensor data with different anomalies using time-series anomaly scores and confidence levels. This method achieves adaptive fusion of multi-source information, enabling the final comprehensive risk index to accurately reflect the true fire risk level and improve the accuracy of fire extinguishing decisions.
[0159] In another embodiment, acquiring raw data about the operating environment of electrical equipment collected by multiple sensors includes the following steps.
[0160] Specifically, first, the system receives a pre-configured calibration command, which includes a preset temperature point sequence T of the sensor list to be calibrated. set = [T1, T2, ..., T n And the standard substance concentration value C corresponding to each temperature point. standard = [C1, C2, ..., C m ].
[0161] For example, a standard substance refers to the type of gas at each temperature point when a fire occurs inside a closed or semi-closed electrical equipment compartment such as a power distribution cabinet or switch cabinet.
[0162] Next, according to the calibration command, the calibration command is sent to the control interface of the constant temperature chamber to set the ambient temperature to the temperature point sequence T. set The first temperature point T1 is set, and the temperature reading from the constant temperature chamber is allowed to stabilize within T1 ± ΔT. Here, ΔT represents the allowable error of the temperature reading, with an error range of (0, 0.01).
[0163] For example, the calibration command prepares for the calibration experiment. Based on a preset calibration plan, such as taking a point every 25°C from -20°C to 150°C, the experimental environment is automatically and systematically set up; the temperature point sequence T... set and the concentration value of standard substance C standard It is a calibrated experimental environment used to ensure the systematic and comprehensive nature of experimental data.
[0164] It should be understood that the constant temperature chamber is used to simulate the enclosure of closed or semi-closed electrical equipment such as power distribution cabinets and switch cabinets, and is made of high temperature resistant materials; the temperature measuring device of the constant temperature chamber does not deviate within the temperature range set in the experiment or the temperature reading is within the allowable error range.
[0165] Next, after the temperature in the constant temperature chamber confirms that the ambient temperature has stabilized at T1, standard substances are injected into the chamber, with the first standard substance having a concentration of C1. After injection is complete and the temperature stabilizes, a synchronous acquisition command is sent to the sensor module. Based on the acquisition command received by the sensor module, it simultaneously reads the raw output signals R from all sensors in the Sensors list at temperature T1 and standard concentration C1 through the multi-channel data interface. raw [i](T1, C1). Where i represents the index of the i-th sensor.
[0166] It should be understood that sensor modules refer to various sensors that detect the concentration of standard substances and voltage and current signals in experimental scenarios, including gas sensors, smoke sensors, voltage sensors, and current sensors.
[0167] For example, the raw signal refers to the digital quantity of an electrical signal converted from the information detected by the sensor.
[0168] Secondly, based on the original output signal R raw [i](T1, C1) performs analog-to-digital conversion (ADC) and preliminary filtering on the original signal to obtain the preprocessed original output signal R'. raw [i](T1, C1). Based on temperature T1, standard concentration C1, and the preprocessed original output signal R' raw[i](T1, C1), add timestamps and sensor IDs to form a calibration data packet S, and send it to the calibration data buffer.
[0169] It should be understood that preliminary filtering refers to removing or weakening useless or misleading data through filtering algorithms such as moving average or Kalman filtering to suppress noise and remove outliers.
[0170] For example, under specific temperature and concentration stimuli, each sensor outputs a raw, uncalibrated reading R. raw [i] is equivalent to taking a picture of each sensor under specific (T, C) conditions to record its raw performance. Multi-channel synchronous acquisition is used to align the data read by different sensors in time, which facilitates subsequent correlation analysis.
[0171] Finally, based on the standard substance concentration value C standard The sequence is switched to the next concentration C2, and the process of data acquisition to form a calibration data package is repeated; the concentration values of all standard substances at the current temperature point T1 are traversed. standard After the test, switch to the next temperature point T2 and repeat the cycle of standard substance concentration values C. standard The sequence; when traversing all temperature point sequences T set and the concentration values of all standard substances C standard Upon completion of the loop, all calibration data packets are sent to the calibration data buffer. Based on the calibration data buffer, a three-dimensional data matrix D is formed for each sensor i. i The rows of the three-dimensional data matrix D correspond to the indexes of different temperature points; for each sensor i, its data can be represented as multiple triples E. i The set of: E i ={(T j C k , R' raw [i](T j C k )) | j=1, ..., n, k=1, ..., m}. Where j represents the index of different temperature points, n is the total number of temperature point sequences; k represents the index of different standard substance concentration values, and m is the total number of standard substance concentration value sequences.
[0172] For example, a dense input-output response data table covering the sensor's expected operating range is constructed through full-temperature-range, full-scale calibration data acquisition. The three-dimensional data matrix D serves as the foundation dataset for training individualized calibration models.
[0173] Figure 8 The diagram shown is a structural schematic of a fire extinguishing system based on electrical equipment provided in an exemplary embodiment of this application. Figure 8As shown, the fire extinguishing system based on electrical equipment provided in this application embodiment includes: a data acquisition module 800, a data compensation module 802, a confidence calculation module 804, an anomaly analysis module 806, and a risk decision module 808.
[0174] The data acquisition module 800 is used to acquire raw data about the operating environment of electrical equipment collected by multiple sensors; the data compensation module 802 is used to input the raw data into a preset mapping function model for processing, and obtain the concentration prediction value after compensation by the mapping function model; wherein, the mapping function model is obtained by machine learning training based on the data calibrated by the corresponding sensor under various temperature and standard substance concentration combinations; the confidence calculation module 804 is used to calculate the confidence level of the corresponding concentration prediction value according to the raw data, the performance index of the mapping function model and the current ambient temperature; the anomaly analysis module 806 is used to combine the concentration prediction value and the corresponding confidence level into a time series feature, and input it into a temporal convolutional network for processing, and obtain an anomaly score representing the deviation of the data from the normal pattern at the current moment; the risk decision module 808 is used to calculate the comprehensive risk index according to the concentration prediction value, confidence level and anomaly score, and generate a fire extinguishing command when the comprehensive risk index exceeds a preset risk threshold; wherein, the comprehensive risk index is used to characterize the magnitude of the fire risk of the electrical equipment compartment.
[0175] It should be understood that the operation and functions of the relevant modules mentioned in the fire extinguishing system based on electrical equipment can be referenced above. Figures 1 to 7 The fire extinguishing methods based on electrical equipment provided will not be described again here to avoid repetition.
[0176] Figure 9 The diagram shown is a structural schematic of an electronic device provided in an exemplary embodiment of this application. Figure 9 As shown, the electronic device 90 includes one or more processors 901 and memory 902.
[0177] The processor 901 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 90 to perform desired functions.
[0178] The memory 902 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 901 may execute the program instructions to implement the confidence level, anomaly score, and / or other desired functions of the various embodiments of this application described above. Various contents such as comprehensive risk indicators and concentration prediction values may also be stored in the computer-readable storage medium.
[0179] In one example, the electronic device 90 may also include an input device 903 and an output device 904, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0180] The input device 903 may include, for example, a keyboard, a mouse, etc.
[0181] The output device 904 can output various information to the outside, including fire extinguishing instructions. The output device 904 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0182] Of course, for the sake of simplicity, Figure 9 Only some of the components of the electronic device 90 relevant to this application are shown in this illustration; components such as buses, input / output interfaces, etc., are omitted. In addition, the electronic device 90 may include any other suitable components depending on the specific application.
[0183] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the fire extinguishing methods based on electrical equipment according to the various embodiments of this application described above.
[0184] Computer program products can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0185] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps of the fire extinguishing methods based on electrical equipment according to the various embodiments of this application described above.
[0186] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0187] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0188] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0189] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.
[0190] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0191] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A fire extinguishing method based on electrical equipment, characterized in that, include: Acquire raw data about the operating environment of electrical equipment collected by multiple sensors; The raw data is input into a preset mapping function model for processing to obtain the concentration prediction value after compensation processing by the mapping function model; wherein, the mapping function model is obtained by machine learning training based on data calibrated by the corresponding sensor under various combinations of temperature and standard substance concentrations; Based on the original data, the performance index of the mapping function model, and the current ambient temperature, the confidence level of the corresponding concentration prediction value is calculated. The concentration prediction value and the corresponding confidence level are combined into a time-series feature and input into a temporal convolutional network for processing to obtain an anomaly score that represents the deviation of the data from the normal pattern at the current time. Based on the concentration prediction value, the confidence level, and the anomaly score, a comprehensive risk index is calculated. When the comprehensive risk index exceeds a preset risk threshold, a fire extinguishing command is generated. The comprehensive risk index is used to characterize the magnitude of the fire risk in the cabin of the electrical equipment.
2. The fire extinguishing method based on electrical equipment according to claim 1, characterized in that, The training process of the preset mapping function model includes: Based on the original data, a feature matrix is obtained by combining the calibration temperature point and the original output signal, and a label vector is obtained by combining the standard substance concentration values. Based on the feature matrix and the label vector, the LightGBM regressor algorithm is used for training loops to obtain a new decision tree; According to the new decision tree, when the preset maximum number of iterations is reached, the loop ends and a mapping function is calculated. The mapping function is used to characterize the mapping relationship from the original data to the concentration prediction value. The mapping function is applied to a validation dataset, and the performance metrics of the mapping function model are calculated, including the mean absolute error and the coefficient of determination. If the mean absolute error is less than the first criterion and the coefficient of determination is greater than the second criterion, the model training is successful; if the mean absolute error is greater than or equal to the first criterion and / or the coefficient of determination is less than or equal to the second criterion, the model training fails and the model is retrained.
3. A fire extinguishing method based on electrical equipment according to claim 2, characterized in that, The step of training a new decision tree using the LightGBM regressor algorithm based on the feature matrix and the label vector includes: Based on the feature matrix, the splitting feature type of the splitting node in the decision tree is randomly set, and the decision tree is set in the LightGBM regressor algorithm; A training loop is set up, and the corresponding leaf node output value is obtained by comparing the feature matrix with the splitting threshold of the splitting node. The leaf node output values are then weighted and summed to obtain the concentration prediction value. Calculate the loss function for the current iteration based on the predicted concentration value and the label vector; Calculate the gradient of the loss function relative to the concentration prediction value based on the loss function; The new decision tree is obtained by fitting the gradient with the feature matrix and the feature matrix.
4. A fire extinguishing method based on electrical equipment according to claim 2, characterized in that, The step of calculating the confidence level corresponding to the concentration prediction value based on the original data, the performance index of the mapping function model, and the current ambient temperature includes: Calculate the temperature deviation factor based on the allowable error of the temperature reading between the calibration temperature point and the current ambient temperature. Calculate the signal stability factor based on the standard deviation of the original output signal within a time window. Calculate the historical health factor based on the mean absolute error; The confidence level is calculated by weighting and fusing the temperature deviation factor, the signal stability factor, and the historical health factor.
5. A fire extinguishing method based on electrical equipment according to any one of claims 1-3, characterized in that, The input is processed by a temporal convolutional network to obtain an anomaly score representing the deviation of the data from the normal pattern at the current time, including: The temporal features are input into the first layer of the temporal convolutional network and weighted summation is performed to obtain the feature tensor. The feature tensor is input into the core layer of the temporal convolutional network and subjected to dilated causal convolution and nonlinear activation to obtain a high-level feature tensor. Based on the high-level feature tensor, the average value of each feature channel of the high-level feature tensor is calculated to obtain a one-dimensional feature vector; Based on the one-dimensional feature vector, the output layer of the temporal convolutional network is input, and the anomaly score is obtained through linear transformation.
6. A fire extinguishing method based on electrical equipment according to claim 5, characterized in that, The process of inputting the feature tensor into the core layer of the temporal convolutional network, performing dilated causal convolution and nonlinear activation processing to obtain a high-level feature tensor includes: The core layer is pre-set with an expansion rate. By using the expansion rate, each element in the feature tensor skips input points at fixed intervals and uses a left-filling method to fill the skipped input points with zeros to obtain the processed feature tensor. Applying a nonlinear activation function to the processed feature tensor yields the first layer output feature tensor of the core layer. The output feature tensor of the first layer is input into the second layer of the core layer. The same dilation rate is set, and the causal convolution and nonlinear activation process are repeated to obtain the output feature tensor of the second layer of the core layer. The second layer output feature tensor is added element by element to the first layer output feature tensor to obtain the second layer final output feature tensor, which will be used as the input feature tensor of the next layer. After traversing the core layers, the output feature tensor of the last layer is used as the final output to obtain the high-level feature tensor.
7. A fire extinguishing method based on electrical equipment according to any one of claims 1-3, characterized in that, The comprehensive risk index is calculated based on the predicted concentration, the confidence level, and the anomaly score, including: Based on the anomaly score and the confidence level, a weighted fusion is performed, and the weighted score is normalized to obtain the time-series anomaly score; The dynamic weights of each sensor are calculated based on the time-series anomaly scores and the confidence levels. The comprehensive risk index is calculated based on the confidence level, the dynamic weight, the concentration prediction value, and the time-series anomaly score.
8. A fire extinguishing system based on electrical equipment, characterized in that, include: The data acquisition module is used to acquire raw data about the operating environment of electrical equipment collected by multiple sensors; The data compensation module is used to input the raw data into a preset mapping function model for processing, and obtain the concentration prediction value after compensation by the mapping function model; wherein, the mapping function model is obtained by machine learning training based on data calibrated by the corresponding sensor under various combinations of temperature and standard substance concentrations; The confidence calculation module is used to calculate the confidence level of the corresponding concentration prediction value based on the original data, the performance index of the mapping function model, and the current ambient temperature. An anomaly analysis module is used to combine the concentration prediction value with the corresponding confidence level into a time-series feature, and input it into a temporal convolutional network for processing to obtain an anomaly score that represents the deviation of the data from the normal pattern at the current time. The risk decision module is used to calculate a comprehensive risk index based on the concentration prediction value, the confidence level, and the anomaly score. When the comprehensive risk index exceeds a preset risk threshold, a fire extinguishing command is generated. The comprehensive risk index is used to characterize the magnitude of the fire risk in the cabin of the electrical equipment.
9. An electronic device, characterized in that, include: Processor; and A memory that stores computer program instructions, which, when executed by a processor, cause the processor to perform the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores computer program instructions that, when executed by a processor, cause the processor to perform the steps of the method as described in any one of claims 1 to 7.