Gas station fire intelligent identification early warning and linkage spraying fire extinguishing method

By building a flame target detection model based on the deep learning network in the gas station and linking it with the fire water spray system, the problem of difficulty in early identification and rapid control of fire accidents in the gas station is solved, and high-accurate fire warning and rapid response are achieved.

CN119888295APending Publication Date: 2025-04-25CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311387975.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Gas station fire accidents are difficult to identify and quickly control early, and the existing technology lacks an intelligent linkage system that integrates fire monitoring and fire protection.

Method used

A gas station flame target detection model is constructed based on the deep learning network, combined with the comprehensive early warning and judgment method, the analysis results are intelligently linked with the fire water spray system to realize the integrated linkage response of early fire identification and monitoring of gas stations, early warning and fire spray.

Benefits of technology

It effectively reduces the false alarm rate of gas station fires, improves the accuracy of fire warnings, and realizes early fire discovery and rapid early warning analysis of gas stations, improving the intelligent monitoring level of fire accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888295A_ABST
    Figure CN119888295A_ABST
Patent Text Reader

Abstract

The invention discloses a gas station fire intelligent identification early warning and linkage spraying fire extinguishing method. The method comprises the steps of firstly establishing a gas station fire data set comprising a training set and a test set, then constructing a gas station flame target detection model based on a deep learning network, training the gas station flame target detection model by using the training set, and then verifying by using the test set. Performing flame identification on gas station video streams by using the verified gas station flame target detection model, determining whether real flames exist in gas station images in combination with a research and judgment algorithm, transmitting obtained flame identification records to a control terminal, and performing alarm confirmation by using a manual research and judgment module in the control terminal. And generating gas station alarm information, transmitting the gas station alarm information to a gas station spraying system, and controlling the gas station spraying system to spray and extinguish fire. According to the invention, integrated linkage response of early fire identification and monitoring, early warning and fire-fighting spraying of the gas station is realized, and the intelligent monitoring level of fire accidents of the gas station is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fire protection and safety engineering, and in particular to a method for intelligent identification, early warning and linkage spraying fire extinguishing of gas station fires. Background Art

[0002] With the rapid development of my country's economy, petroleum and petrochemical products have been widely used in production and life, resulting in an increasing number of various gas stations and integrated energy stations that provide fuel and power support for automobiles. As common components for refueling cars, gas pumps and refueling gun barrels are in direct contact with the outside world. They are prone to fire and combustion at the oil outlet due to improper operation or static electricity and other factors, causing fire and explosion accidents, which bring significant losses to the overall operation of gas stations.

[0003] The identification of early gas station fire accidents is mainly based on on-site operators' discovery, supplemented by monitoring devices such as video surveillance warning or fire alarm systems. Usually, only a certain number of fire hydrants and other fire-fighting equipment are required within the scene covered by the refueling process. The lack of an intelligent linkage system that integrates fire monitoring and firefighting makes it slow to respond to early fires and untimely firefighting, making it difficult to control the development of fire accidents and easy to evolve into explosion accidents.

[0004] With the rapid development of computer hardware performance, deep learning-based target detection technology has been gradually applied to various industries and has become the mainstream technology for image and video recognition, making it possible to link gas station fire intelligent identification and warning with fire protection systems. Therefore, it is urgent to propose a gas station fire intelligent identification and warning and linkage sprinkler fire extinguishing method to effectively solve the problem that early fire accidents in gas stations are difficult to quickly control and provide technical support for gas station smart fire protection systems. Summary of the invention

[0005] In view of the current problem that the intelligent identification and warning of gas station fires and the fire protection system are independent of each other and lack effective linkage, the present invention proposes a method for intelligent identification and warning of gas station fires and linked sprinkler fire extinguishing. A gas station flame target detection model is constructed based on a deep learning network. Combined with a comprehensive early warning analysis method, the analysis results are intelligently linked with the fire water sprinkler system, realizing the integrated linkage response of early fire identification monitoring, early warning alarm and fire sprinkler in gas stations.

[0006] The present invention specifically adopts the following technical solutions:

[0007] A method for intelligent identification, early warning and linkage sprinkler fire extinguishing of gas station fires, specifically comprising the following steps:

[0008] Step 1, establish a gas station fire dataset;

[0009] Step 2: Build a gas station flame target detection model based on a deep learning network;

[0010] Step 3, using the training set to train the gas station flame target detection model to obtain a trained gas station flame target detection model;

[0011] Step 4, using the test set to verify the flame recognition effect of the gas station flame target detection model after training. If the flame recognition effect of the gas station flame target detection model after training has reached the best, proceed to step 5; otherwise, return to step 3 and continue to train the gas station flame target detection model using the training set;

[0012] Step 5: Input the gas station video stream into the verified gas station flame target detection model, use the verified gas station flame target detection model to extract the gas station image from the gas station video stream for flame recognition, combine the analysis and judgment algorithm to determine whether there is a real flame in the gas station image, and obtain the flame recognition record in the gas station image with the real flame;

[0013] Step 6, based on the flame recognition record in the gas station image with real flames, determine the duration of the gas station fire alarm and transmit it to the control terminal;

[0014] Step 7: After the control terminal receives the judgment result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, the artificial analysis module preset in the control terminal is used to confirm the alarm, generate the gas station alarm information and transmit it to the sprinkler system preset in the gas station, and link with the sprinkler system to control the sprinkler system to spray the location where the fire occurred in the gas station.

[0015] Preferably, the step 1 specifically includes the following steps:

[0016] Step 1.1, obtain the gas station fire video and extract the gas station image from the gas station fire video;

[0017] The gas station fire scene video is obtained by downloading through an Internet crawler or by filming a simulated experiment of a gas station fire scene;

[0018] The gas station image includes a gas station flame video image with flame data and a gas station empty scene video image without flame data;

[0019] Step 1.2, based on the Mosaic data enhancement method, the gas station image is amplified, and the flame in the gas station image is annotated using the target detection image annotation tool software, a label file is generated in the gas station flame video image, and an empty label file is generated in the gas station empty scene video image, and the gas station flame video image with the label file and the gas station empty scene video image with the empty label file are used as gas station fire recognition image samples;

[0020] In step 1.3, the gas station fire recognition image samples in the gas station scene fire recognition dataset are randomly assigned to the training set and the test set. The training set and the test set together constitute the gas station scene fire recognition dataset.

[0021] Preferably, the gas station fire identification image samples include at least 10,000 gas station flame video images with label files.

[0022] Preferably, the ratio of the number of gas station fire identification image samples in the training set to that in the test set is 3:1 or 4:1 or 5:1 or 6:1.

[0023] Preferably, the deep learning network selects the target detection network YOLOv7, and uses the target detection network YOLOv7 to build a gas station flame target detection model.

[0024] Preferably, the target detection network YOLOv7 takes into account both recognition speed and accuracy, and includes an input end, a backbone feature extraction network and a detection head;

[0025] The input end is used to perform adaptive image scaling processing, Mosaic data enhancement processing and adaptive anchor frame calculation on the input gas station fire recognition image samples, wherein the adaptive image scaling processing is used to unify the input format of the gas station fire recognition image samples so that the input multiple gas station fire recognition image samples have the same size after scaling processing;

[0026] The Mosaic data enhancement process obtains a spliced ​​gas station fire identification image sample by splicing multiple gas station fire identification image samples in a random scaling, random cropping, and random arrangement manner;

[0027] The adaptive anchor frame calculation is used to automatically obtain the optimal anchor frame value during each training;

[0028] The backbone feature extraction network includes a plurality of CBS modules and a plurality of ELAN modules connected in sequence, and two adjacent ELAN modules are connected via an MP module;

[0029] The detection head includes a connected SPPCSPC structure, an ELAN module, an MP structure and a re-parameterized Rep structure, which are used as a classifier and a regressor of the network;

[0030] The SPPCSPC structure introduces the CSP structure into the SPP structure, and uses the SPP with the CSP structure to expand the receptive field for residual edge-assisted optimization and feature extraction;

[0031] The re-parameterized Rep structure introduces the RepConv structure and the residual structure to assist training, so as to reduce the complexity of the target detection network YOLOv7.

[0032] Preferably, the CBS module includes a convolutional layer, a BN layer and a Silu layer;

[0033] An activation function is set in the Silu layer, and the activation function is set to a sigmoid function.

[0034] Preferably, the ELAN module comprises a shallow feature extraction layer, a deep feature extraction layer and a reconstruction module;

[0035] The shallow feature extraction layer is set to a 3×3 convolutional layer;

[0036] The deep feature extraction layer consists of stacked ELABs and a residual connection;

[0037] The reconstruction module consists of a 3×3 convolution and a PixelShuffle operation layer.

[0038] Preferably, the MP module is provided with a first branch and a second branch for realizing super downsampling of parallel extraction and compression of features;

[0039] The first branch is provided with a maximum pooling layer and a 1×1 convolutional layer connected in sequence;

[0040] The second branch is provided with a 1×1 convolution layer and a 3×3 convolution kernel connected in sequence and a convolution block with a stride of 2;

[0041] The 1×1 convolutional layers set in the first branch and the second branch are both used to change the number of channels;

[0042] A merging layer is provided after the first branch and the second branch, for adding the processing results of the first branch and the second branch and outputting the result of super downsampling.

[0043] Preferably, the step 3 specifically includes the following steps:

[0044] Step 3.1, set the total number of training times, loss value, and recognition accuracy, recall rate, and average recognition accuracy mAP@0.5 values;

[0045] Step 3.2, input the gas station fire recognition image samples in the training set into the gas station flame target detection model constructed in step 2, use the gas station flame target detection model to recognize the flame in the gas station flame video image, and obtain the gas station flame recognition result;

[0046] Step 3.2, optimize the gas station flame target detection model based on the hyperparameter dynamic indicator monitoring method, compare the flame recognition result of the gas station flame target detection model with the label file corresponding to the gas station flame target detection model, calculate the loss value, recognition accuracy, recall rate and mAP@0.5 value of the gas station flame target detection model for flame recognition, and compare them with the preset loss value, recognition accuracy, recall rate and mAP@0.5 value. If the loss value is less than the preset loss value and the recognition accuracy, recall rate and mAP@0.5 value are all greater than the preset recognition accuracy, recall rate and mAP@0.5 value, proceed to step 3.4; otherwise, proceed to step 3.3;

[0047] Step 3.3, update the hyperparameters of the gas station flame target detection model to obtain an updated gas station flame target detection model, continue to randomly select gas station fire recognition image samples in the training set and input them into the updated gas station flame target detection model, use the updated gas station flame target detection model to recognize the gas station fire recognition image samples, and after obtaining the flame recognition results of the gas station fire recognition image samples, return to step 3.2;

[0048] Step 3.4, complete the training of the gas station flame target detection model, and obtain the trained gas station flame target detection model.

[0049] Preferably, the average recognition accuracy mAP@0.5 is the average precision of the image samples when the intersection over union (IoU) is 0.5.

[0050] Preferably, the step 4 specifically includes the following steps:

[0051] Step 4.1, input the gas station fire recognition image samples in the test set into the trained gas station flame target detection model, use the gas station flame target detection model to recognize the gas station fire recognition image samples, and obtain the flame recognition results of the gas station fire recognition image samples;

[0052] Step 4.2, compare the flame recognition results of the gas station fire recognition image samples identified by the gas station flame target detection model with the label files corresponding to the gas station fire recognition image samples, calculate the loss value, recognition accuracy, recall rate and mAP@0.5 value of the gas station flame target detection model for flame recognition, and compare them with the preset loss value, recognition accuracy, recall rate and mAP@0.5 value. If the loss value is less than the preset loss value and the recognition accuracy, recall rate and mAP@0.5 value are all greater than the preset recognition accuracy, recall rate and mAP@0.5 value, it proves that the flame recognition effect of the gas station flame target detection model after training has reached the optimal level, and proceed to step 5; otherwise, proceed to step 3 and continue to use the training set to train the gas station flame target detection model.

[0053] Preferably, the step 5 specifically includes the following steps:

[0054] Step 5.1, input the gas station video stream into the gas station flame target detection model;

[0055] Step 5.2: In the gas station flame target detection model, one frame is extracted from the gas station video stream every second to obtain a gas station image and number it. The gas station flame target detection model is used to perform flame recognition on each frame of the gas station image. If the gas station flame target detection model recognizes that there is a flame in the gas station image, the gas station image is analyzed to determine whether the flame in the gas station image is a real flame. If the flame in the gas station image is a real flame, step 5.3 is entered; otherwise, step 5.1 is returned.

[0056] Step 5.3, obtaining processing parameters of real flames in the gas station image, and obtaining flame recognition records in the gas station image where real flames exist.

[0057] Preferably, the flame recognition record includes the minimum coordinate value Xmin of the maximum flame recognition frame in the gas station image from the x-axis, the maximum coordinate value Xmax of the maximum flame recognition frame in the gas station image from the x-axis, the minimum coordinate value Ymin of the maximum flame recognition frame in the gas station image from the y-axis, the maximum coordinate value Ymax of the maximum flame recognition frame in the gas station image from the y-axis, the current recognition time Time, the number of the currently recognized gas station image Number, the name of the currently recognized gas station image Name, the confidence Confidence of the currently recognized gas station image and the alarm duration SPTime.

[0058] Preferably, in step 5.2, the gas station image analysis process is as follows:

[0059] When the gas station flame target detection model identifies that there is flame in the Fth frame of the gas station image, the gas station flame target detection model is used to continue to perform flame recognition on the F1th frame to the Ftth frame of the gas station image within t seconds after the gas station image;

[0060] If no flame is identified in any of the gas station images from the F1th frame to the Ftth frame, the flame in the gas station image from the Fth frame identified by the gas station flame target detection model is determined to be a misjudgment; otherwise, a differential threshold T1 is set, and the gas station image from the F1th frame to the Ftth frame in which a flame is detected is differentially processed with the Fth frame gas station image. If the differential results between the gas station image from the F1th frame to the Ftth frame in which a flame is detected and the Fth frame gas station image are both less than the differential threshold T1, the flame in the Fth frame gas station image is determined to be a misjudgment; otherwise, the flame detection result of the Fth frame gas station image is used to continue to determine whether the flame in the gas station image is a real flame;

[0061] Calculate the ratio between the number of image frames t1 in which flames are detected in the gas station image within t seconds after the F-th frame of the gas station image and the total number of gas station image frames within t seconds after the F-th frame of the gas station image. If the ratio R is less than 80%, it is a false judgment that there is a flame in the F-th frame of the gas station image. Otherwise, it is judged that the flame in the F-th frame of the gas station image is a real flame.

[0062] Preferably, in step 6, the process of determining the duration of the gas station fire alarm based on the maximum fire area and the confidence probability in the gas station image is:

[0063] Step 6.1, based on the flame recognition record corresponding to the Fth frame of the gas station image with flame, calculate the maximum fire area S in the gas station image, as shown in formula (1):

[0064] S = (Xmax - Xmin) × ( Ymax - Ymin) (1)

[0065] Where S is the maximum fire area in the gas station image, Xmax is the maximum coordinate value of the maximum flame recognition frame in the gas station image from the x-axis, Xmin is the minimum coordinate value of the maximum flame recognition frame in the gas station image from the x-axis, Ymax is the maximum coordinate value of the maximum flame recognition frame in the gas station image from the y-axis, and Ymin is the minimum coordinate value of the maximum flame recognition frame in the gas station image from the y-axis;

[0066] Step 6.2, according to the maximum fire area S in the gas station image and the confidence of the gas station image, set the alarm duration evaluation value D, as shown in formula (2):

[0067] D = S × Confidence (2)

[0068] Where D is the alarm duration evaluation value, Confidence is the confidence of the gas station image;

[0069] Step 6.3, presetting a first threshold value D1 and a second threshold value D2, wherein the first threshold value D1 is smaller than the second threshold value D2, and setting the alarm duration SPTime according to the first threshold value D1, the second threshold value D2 and the alarm duration evaluation value D;

[0070] If the alarm duration evaluation value D is less than the first threshold value D1, the alarm duration SPTime is set to 1min; if the alarm duration evaluation value D is not less than the first threshold value D1 and does not exceed the second threshold value D2, the alarm duration SPTime is set to 2min; if the alarm duration evaluation value D is greater than the second threshold value D2, the alarm duration SPTime is set to 5min.

[0071] Preferably, the step 7 specifically includes the following steps:

[0072] Step 7.1, after receiving the determination result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, the manual judgment module preset in the control terminal updates the gas station flame determination result and the gas station fire alarm duration in the gas station alarm information, and inputs the updated gas station alarm information into the manual judgment module preset in the control terminal;

[0073] Step 7.2: The manual judgment module receives the gas station alarm information and performs manual judgment. The manual judgment time is preset to 30 seconds. If the manual judgment module fails to confirm within 30 seconds, it is deemed that there is no manual confirmation response. The manual judgment module directly outputs an alarm instruction, controls the alarm module to emit an alarm prompt sound, and enters step 7.3;

[0074] Otherwise, if the manual judgment module determines that the flame in the gas station is a real flame, the manual judgment module outputs an alarm instruction, controls the alarm module to emit an alarm prompt sound, and enters step 7.3; if the manual judgment module determines that the flame in the gas station is a false judgment, the manual judgment module immediately clears the gas station alarm information in the current control terminal and suspends receiving the gas station alarm information within 1 minute;

[0075] Step 7.3, the manual judgment module determines the location of the fire at the gas station according to the location of the video stream shooting device, and controls the sprinkler device in the gas station to spray the fire location according to the maximum fire area and the alarm duration in the gas station image. At this time, the spraying time of the sprinkler system is equal to the alarm duration;

[0076] Step 7.4: The sprinkler system has finished spraying, and the linkage task between the control terminal and the sprinkler system is completed.

[0077] The present invention has the following beneficial effects:

[0078] 1. This patent proposes a method for intelligent identification, warning and linkage sprinkler fire extinguishing of gas station fires, which solves the problem of high false alarm rate of fires in gas station scenarios. It uses a gas station flame target detection model based on a deep learning network to identify gas station fires, and combines it with a gas station fire false alarm elimination and judgment strategy to enhance the anti-interference ability of the gas station fire warning process, effectively reduce the false alarm rate of gas station fires, and improve the accuracy of gas station fire warnings.

[0079] 2. The present invention associates the duration of a gas station fire alarm with the flame position and area in the gas station and the area of ​​the largest flame identification frame in the gas station image, and intelligently links with the fire sprinkler system to quantitatively bind the duration of a gas station fire alarm with the fire sprinkler time of the sprinkler system in the gas station, thereby achieving early detection and rapid warning of fires at gas stations, which is beneficial for assisting emergency personnel at gas stations in early warning and fire fighting of fire accidents, and improving the level of intelligent monitoring of gas station fire accidents. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 This is a schematic diagram of the development process of building a gas station flame target detection model based on a deep learning network in the present invention.

[0081] Figure 2 This is a technical flow chart of the gas station fire intelligent identification, early warning and linked sprinkler fire extinguishing method of the present invention. DETAILED DESCRIPTION

[0082] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0083] Example 1

[0084] This embodiment proposes a method for intelligent identification, early warning and linkage sprinkler fire extinguishing of gas station fires, which specifically includes the following steps:

[0085] Step 1: Establish a gas station fire dataset, which includes the following steps:

[0086] Step 1.1, obtain the gas station fire video and extract the gas station image from the gas station fire video.

[0087] The gas station fire scene video is obtained by downloading through an Internet crawler or by filming a simulated experiment of a gas station fire scene;

[0088] The gas station images include gas station flame video images with flame data and gas station empty scene video images without flame data.

[0089] Step 1.2, amplify the gas station image based on the Mosaic data enhancement method, use the target detection image annotation tool software to annotate the flames in the gas station image, generate a label file in the gas station flame video image, generate an empty label file in the gas station empty scene video image, and use the gas station flame video image with label files and the gas station empty scene video image with empty label files as gas station fire recognition image samples.

[0090] In step 1.3, the gas station fire recognition image samples in the gas station scene fire recognition dataset are randomly assigned to the training set and the test set. The training set and the test set together constitute the gas station scene fire recognition dataset.

[0091] Step 2: construct a gas station flame target detection model based on the deep learning network, and train the gas station flame target detection model based on the deep learning network according to steps 3 and 4, such as Figure 1 shown.

[0092] In this embodiment, the deep learning network selects the target detection network YOLOv7, and uses the target detection network YOLOv7 to build a gas station flame target detection model.

[0093] The target detection network YOLOv7 takes into account both recognition speed and accuracy, including an input end, a backbone feature extraction network and a detection head;

[0094] The input end is used to perform adaptive image scaling processing, Mosaic data enhancement processing and adaptive anchor frame calculation on the input gas station fire recognition image samples, wherein the adaptive image scaling processing is used to unify the input format of the gas station fire recognition image samples so that the input multiple gas station fire recognition image samples have the same size after scaling processing;

[0095] The Mosaic data enhancement process obtains a spliced ​​gas station fire identification image sample by splicing multiple gas station fire identification image samples in a random scaling, random cropping, and random arrangement manner;

[0096] The adaptive anchor frame calculation is used to automatically obtain the optimal anchor frame value during each training;

[0097] The backbone feature extraction network includes a plurality of CBS modules and a plurality of ELAN modules connected in sequence, and two adjacent ELAN modules are connected via an MP module;

[0098] The detection head includes a connected SPPCSPC structure, an ELAN module, an MP structure and a re-parameterized Rep structure, which are used as a classifier and a regressor of the network;

[0099] The SPPCSPC structure introduces the CSP structure into the SPP structure, and uses the SPP with the CSP structure to expand the receptive field for residual edge-assisted optimization and feature extraction;

[0100] The re-parameterized Rep structure introduces the RepConv structure and the residual structure to assist training, so as to reduce the complexity of the target detection network YOLOv7.

[0101] The CBS module includes a convolutional layer, a BN layer and a Silu layer.

[0102] An activation function is set in the Silu layer, and the activation function is set to a sigmoid function.

[0103] The ELAN module includes a shallow feature extraction layer, a deep feature extraction layer and a reconstruction module;

[0104] in,

[0105] The shallow feature extraction layer is set to a 3×3 convolutional layer;

[0106] The deep feature extraction layer consists of stacked ELABs and a residual connection;

[0107] The reconstruction module consists of a 3×3 convolution and a PixelShuffle operation layer.

[0108] The MP module is provided with a first branch and a second branch for realizing super downsampling of parallel extraction and compression of features;

[0109] The first branch is provided with a maximum pooling layer and a 1×1 convolutional layer connected in sequence;

[0110] The second branch is provided with a 1×1 convolution layer and a 3×3 convolution kernel connected in sequence and a convolution block with a stride of 2;

[0111] The 1×1 convolutional layers set in the first branch and the second branch are both used to change the number of channels;

[0112] A merging layer is provided after the first branch and the second branch, for adding the processing results of the first branch and the second branch and outputting the result of super downsampling.

[0113] Step 3, using the training set to train the gas station flame target detection model to obtain the trained gas station flame target detection model, specifically including the following steps:

[0114] Step 3.1, set the total number of training times, loss value, recognition accuracy, recall rate and average recognition accuracy mAP@0.5 value, where the average recognition accuracy mAP@0.5 is the average accuracy of the image samples when the intersection over union ratio IoU is 0.5.

[0115] Step 3.2, input the gas station fire recognition image samples in the training set into the gas station flame target detection model constructed in step 2, use the gas station flame target detection model to identify the flames in the gas station flame video image, and obtain the gas station flame recognition result.

[0116] Step 3.2, optimize the gas station flame target detection model based on the hyperparameter dynamic indicator monitoring method, compare the flame recognition results of the gas station flame target detection model with the label file corresponding to the gas station flame target detection model, calculate the loss value, recognition accuracy, recall rate and mAP@0.5 value of the gas station flame target detection model for flame recognition, and compare them with the preset loss value, recognition accuracy, recall rate and mAP@0.5 value. If the loss value is less than the preset loss value and the recognition accuracy, recall rate and mAP@0.5 value are all greater than the preset recognition accuracy, recall rate and mAP@0.5 value, proceed to step 3.4; otherwise, proceed to step 3.3.

[0117] Step 3.3, update the hyperparameters of the gas station flame target detection model to obtain the updated gas station flame target detection model, continue to randomly select gas station fire recognition image samples in the training set and input them into the updated gas station flame target detection model, use the updated gas station flame target detection model to recognize the gas station fire recognition image samples, and after obtaining the flame recognition results of the gas station fire recognition image samples, return to step 3.2.

[0118] Step 3.4, complete the training of the gas station flame target detection model, and obtain the trained gas station flame target detection model.

[0119] Step 4, using the test set to verify the flame recognition effect of the gas station flame target detection model after training. If the flame recognition effect of the gas station flame target detection model after training has reached the best, then proceed to step 5, otherwise, return to step 3 and continue to use the training set to train the gas station flame target detection model, which specifically includes the following steps:

[0120] Step 4.1, input the gas station fire recognition image samples in the test set into the trained gas station flame target detection model, use the gas station flame target detection model to recognize the gas station fire recognition image samples, and obtain the flame recognition results of the gas station fire recognition image samples.

[0121] Step 4.2, compare the flame recognition results of the gas station fire recognition image samples identified by the gas station flame target detection model with the label files corresponding to the gas station fire recognition image samples, calculate the loss value, recognition accuracy, recall rate and mAP@0.5 value of the gas station flame target detection model for flame recognition, and compare them with the preset loss value, recognition accuracy, recall rate and mAP@0.5 value. If the loss value is less than the preset loss value and the recognition accuracy, recall rate and mAP@0.5 value are all greater than the preset recognition accuracy, recall rate and mAP@0.5 value, it proves that the flame recognition effect of the gas station flame target detection model after training has reached the optimal level, and proceed to step 5; otherwise, proceed to step 3 and continue to use the training set to train the gas station flame target detection model.

[0122] Step 5: Input the gas station video stream into the verified gas station flame target detection model, use the verified gas station flame target detection model to extract the gas station image from the gas station video stream for flame recognition, combine the judgment algorithm to determine whether there is a real flame in the gas station image, and obtain the flame recognition record in the gas station image with a real flame, such as Figure 2 As shown, the specific steps include:

[0123] Step 5.1, input the gas station video stream into the gas station flame target detection model.

[0124] Step 5.2: The gas station flame target detection model extracts one frame per second from the gas station video stream to obtain a gas station image and numbers it. The gas station flame target detection model is used to perform flame recognition on each frame of the gas station image. If the gas station flame target detection model recognizes that there is a flame in the gas station image, the gas station image is analyzed to determine whether the flame in the gas station image is a real flame. If the flame in the gas station image is a real flame, proceed to step 5.3; otherwise, return to step 5.1.

[0125] in,

[0126] The gas station image analysis process is as follows:

[0127] When the gas station flame target detection model identifies that there is flame in the Fth frame of the gas station image, the gas station flame target detection model is used to continue to perform flame recognition on the F1th frame to the Ftth frame of the gas station image within t seconds after the gas station image;

[0128] If no flame is identified in any of the gas station images from the F1th frame to the Ftth frame, the flame in the gas station image from the Fth frame identified by the gas station flame target detection model is determined to be a misjudgment; otherwise, a differential threshold T1 is set, and the gas station image from the F1th frame to the Ftth frame in which a flame is detected is differentially processed with the Fth frame gas station image. If the differential results between the gas station image from the F1th frame to the Ftth frame in which a flame is detected and the Fth frame gas station image are both less than the differential threshold T1, the flame in the Fth frame gas station image is determined to be a misjudgment; otherwise, the flame detection result of the Fth frame gas station image is used to continue to determine whether the flame in the gas station image is a real flame;

[0129] Calculate the ratio between the number of image frames t1 in which flames are detected in the gas station image within t seconds after the F-th frame of the gas station image and the total number of gas station image frames within t seconds after the F-th frame of the gas station image. If the ratio R is less than 80%, it is a false judgment that there is a flame in the F-th frame of the gas station image. Otherwise, it is judged that the flame in the F-th frame of the gas station image is a real flame.

[0130] Step 5.3, obtaining processing parameters of real flames in the gas station image, and obtaining flame recognition records in the gas station image with real flames;

[0131] In this embodiment, the flame recognition record includes the minimum coordinate value Xmin of the maximum flame recognition frame in the gas station image from the x-axis, the maximum coordinate value Xmax of the maximum flame recognition frame in the gas station image from the x-axis, the minimum coordinate value Ymin of the maximum flame recognition frame in the gas station image from the y-axis, the maximum coordinate value Ymax of the maximum flame recognition frame in the gas station image from the y-axis, the current recognition time Time, the number of the currently recognized gas station image Number, the name of the currently recognized gas station image Name, the confidence Confidence of the currently recognized gas station image and the alarm duration SPTime.

[0132] In this embodiment, the default value of the alarm duration SPTime is set to 0.

[0133] Step 6: Based on the flame recognition record in the gas station image with real flames, determine the gas station fire alarm duration and transmit it to the control terminal.

[0134] In step 6, the process of determining the duration of the gas station fire alarm based on the maximum fire area and the confidence probability in the gas station image specifically includes the following steps:

[0135] Step 6.1, based on the flame recognition record corresponding to the Fth frame of the gas station image with flame, calculate the maximum fire area S in the gas station image, as shown in formula (1):

[0136] S = (Xmax - Xmin) × ( Ymax - Ymin) (1)

[0137] Where S is the maximum fire area in the gas station image, Xmax is the maximum coordinate value of the maximum flame recognition frame in the gas station image from the x-axis, Xmin is the minimum coordinate value of the maximum flame recognition frame in the gas station image from the x-axis, Ymax is the maximum coordinate value of the maximum flame recognition frame in the gas station image from the y-axis, and Ymin is the minimum coordinate value of the maximum flame recognition frame in the gas station image from the y-axis.

[0138] Step 6.2, according to the maximum fire area S in the gas station image and the confidence of the gas station image, set the alarm duration evaluation value D, as shown in formula (2):

[0139] D = S × Confidence (2)

[0140] Where D is the alarm duration evaluation value, and Confidence is the confidence of the gas station image.

[0141] Step 6.3, presetting a first threshold value D1 and a second threshold value D2, wherein the first threshold value D1 is smaller than the second threshold value D2, and setting the alarm duration SPTime according to the first threshold value D1, the second threshold value D2 and the alarm duration evaluation value D;

[0142] If the alarm duration evaluation value D is less than the first threshold value D1, the alarm duration SPTime is set to 1min; if the alarm duration evaluation value D is not less than the first threshold value D1 and does not exceed the second threshold value D2, the alarm duration SPTime is set to 2min; if the alarm duration evaluation value D is greater than the second threshold value D2, the alarm duration SPTime is set to 5min.

[0143] Step 7: After the control terminal receives the judgment result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, the control terminal uses the manual judgment module preset in the control terminal to confirm the alarm, generate the gas station alarm information and transmit it to the sprinkler system preset in the gas station, and link with the sprinkler system to control the sprinkler system to spray the location where the fire occurred in the gas station, which specifically includes the following steps:

[0144] Step 7.1, after receiving the determination result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, the manual judgment module preset in the control terminal updates the gas station flame determination result and the gas station fire alarm duration in the gas station alarm information, and inputs the updated gas station alarm information into the manual judgment module preset in the control terminal;

[0145] Step 7.2: The manual judgment module receives the gas station alarm information and performs manual judgment. The manual judgment time is preset to 30 seconds. If the manual judgment module fails to confirm within 30 seconds, it is deemed that there is no manual confirmation response. The manual judgment module directly outputs an alarm instruction, controls the alarm module to emit an alarm prompt sound, and enters step 7.3;

[0146] Otherwise, if the manual judgment module determines that the flame in the gas station is a real flame, the manual judgment module outputs an alarm instruction, controls the alarm module to emit an alarm prompt sound, and enters step 7.3; if the manual judgment module determines that the flame in the gas station is a false judgment, the manual judgment module immediately clears the gas station alarm information in the current control terminal and suspends receiving the gas station alarm information within 1 minute;

[0147] Step 7.3, the manual judgment module determines the location of the fire at the gas station according to the location of the video stream shooting device, and controls the sprinkler device in the gas station to spray the fire location according to the maximum fire area and the alarm duration in the gas station image. At this time, the spraying time of the sprinkler system is equal to the alarm duration;

[0148] Step 7.4: The sprinkler system has finished spraying, and the linkage task between the control terminal and the sprinkler system is completed.

[0149] Example 2

[0150] This embodiment uses a certain oil gas station as the on-site scene. An NVIDIA GeForce RTX 3060 Laptop GPU (6144MB) high-performance video analysis server is configured in the background of the oil gas station, and an industrial-grade high-definition explosion-proof camera and a fire sprinkler for fire sprinklers are installed at an appropriate position above each refueling gun. The industrial-grade high-definition explosion-proof camera and the fire sprinkler are respectively connected to the background server, which is a control terminal. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method proposed in Example 1 is used in the oil gas station, which specifically includes the following steps:

[0151] Step 1: Establish a gas station fire dataset, which includes the following steps:

[0152] Step 1.1, download and obtain a gas station fire video with a certain duration and high definition through an Internet crawler, and extract a gas station image from the gas station fire video, wherein the gas station image includes a gas station flame video image with flame data and a gas station empty scene video image without flame data.

[0153] Step 1.2, based on the Mosaic data enhancement method, the gas station image is amplified, and the flames in the gas station image are labeled using the target detection image annotation tool software LabelImg. A label file is generated in the gas station flame video image, and an empty label file is generated in the gas station empty scene video image. The gas station flame video image with the label file and the gas station empty scene video image with the empty label file are used as gas station fire recognition image samples. In this embodiment, a total of 15,000 gas station fire recognition image samples are obtained.

[0154] Step 1.3, randomly distribute the gas station fire recognition image samples in the gas station scene fire recognition dataset into the training set and the test set in a ratio of 4:1. The training set and the test set together constitute the gas station scene fire recognition dataset.

[0155] Step 2: Build a gas station flame target detection model based on the target detection network YOLOv7.

[0156] Step 3: Use the training set to train the gas station flame target detection model to obtain a trained gas station flame target detection model.

[0157] Step 4, use the test set to verify the flame recognition effect of the gas station flame target detection model after training. If the flame recognition effect of the gas station flame target detection model after training has reached the best, proceed to step 5; otherwise, return to step 3 and continue to train the gas station flame target detection model using the training set.

[0158] Step 5, input the gas station video stream into the verified gas station flame target detection model, use the verified gas station flame target detection model to extract the gas station image from the gas station video stream for flame recognition, combine the analysis algorithm to determine whether there is a real flame in the gas station image, and obtain the flame recognition record in the gas station image with a real flame, which specifically includes the following steps:

[0159] Step 5.1, input the gas station video stream into the gas station flame target detection model.

[0160] Step 5.2: The gas station flame target detection model extracts one frame per second from the gas station video stream to obtain a gas station image and numbers it. The gas station flame target detection model is used to perform flame recognition on each frame of the gas station image. If the gas station flame target detection model recognizes that there is a flame in the gas station image, the gas station image is analyzed to determine whether the flame in the gas station image is a real flame. If the flame in the gas station image is a real flame, proceed to step 5.3; otherwise, return to step 5.1.

[0161] The gas station image analysis process in this embodiment is as follows:

[0162] When the gas station flame target detection model identifies that there is flame in the Fth frame of the gas station image, the gas station flame target detection model is used to continue to perform flame recognition on the F1th frame to the Ftth frame of the gas station image within 2 seconds after the gas station image.

[0163] If no flame is identified in any of the gas station images from the F1th frame to the Ftth frame, then the flame in the gas station image from the Fth frame identified by the gas station flame target detection model is determined to be a misjudgment; otherwise, a differential threshold T1 is set. In this embodiment, the differential threshold T1=3, and the gas station image from the F1th frame to the Ftth frame in which a flame is detected is differentially processed with the Fth frame gas station image. If the differential results between the gas station image from the F1th frame to the Ftth frame in which a flame is detected and the Fth frame gas station image are both less than the differential threshold T1, then the flame in the Fth frame gas station image is determined to be a misjudgment; otherwise, the flame detection result of the Fth frame gas station image is used to continue to determine whether the flame in the gas station image is a real flame;

[0164] Calculate the ratio of the number of image frames t1 in which flames are detected in the gas station image within 2 seconds after the F-th frame of the gas station image to the total number of gas station image frames within 2 seconds after the F-th frame of the gas station image. If the ratio R is less than 80%, it is a false judgment that there is a flame in the F-th frame of the gas station image. Otherwise, it is judged that the flame in the F-th frame of the gas station image is a real flame.

[0165] Step 5.3, obtain the processing parameters of the real flame in the gas station image, and obtain the flame recognition record in the gas station image with the real flame, including the minimum coordinate value Xmin of the maximum flame recognition frame in the gas station image from the x-axis, the maximum coordinate value Xmax of the maximum flame recognition frame in the gas station image from the x-axis, the minimum coordinate value Ymin of the maximum flame recognition frame in the gas station image from the y-axis, the maximum coordinate value Ymax of the maximum flame recognition frame in the gas station image from the y-axis, the current recognition time Time, the number of the currently recognized gas station image Number, the name of the currently recognized gas station image Name, and the confidence of the currently recognized gas station image Confidence.

[0166] Step 6, based on the flame recognition record in the gas station image with real flames, determines the gas station fire alarm duration and transmits it to the control terminal, specifically including the following steps:

[0167] Based on the flame recognition record corresponding to the Fth frame of the gas station image with flames, the maximum fire area S in the gas station image is calculated, and then the alarm duration evaluation value D is set according to the maximum fire area S in the gas station image and the confidence of the gas station image.

[0168] A first threshold D1 and a second threshold D2 are preset, wherein the first threshold D1 is less than the second threshold D2, and the alarm duration SPTime is set according to the first threshold D1, the second threshold D2 and the alarm duration evaluation value D. In this embodiment, the alarm duration evaluation value D is not less than the first threshold D1 and does not exceed the second threshold D2, indicating that the current flame area is medium and the recognition confidence is high, and the alarm duration SPTime is set to 2 minutes.

[0169] Step 7: After the terminal receives the judgment result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, the manual judgment module preset in the control terminal is used to confirm the alarm, generate the gas station alarm information and transmit it to the sprinkler system preset in the gas station, and link with the sprinkler system to control the sprinkler system to spray the location where the fire occurred in the gas station, which specifically includes the following steps:

[0170] Step 7.1, after the manual analysis module preset in the control terminal receives the judgment result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, it updates the gas station flame judgment result and the gas station fire alarm duration in the gas station alarm information, and inputs the updated gas station alarm information into the manual analysis module preset in the control terminal.

[0171] In step 7.2, the manual analysis module receives the gas station alarm information and performs manual analysis. The manual analysis time is preset to 30 seconds. If the manual analysis module does not confirm within 30 seconds, it is deemed that there is no manual confirmation response. The manual analysis module directly outputs the alarm instruction, controls the alarm module to emit an alarm prompt sound, and enters step 7.3.

[0172] Otherwise, if the manual analysis module determines that the flame in the gas station is a real flame, the manual analysis module outputs an alarm instruction, controls the alarm module to emit an alarm prompt sound, and enters step 7.3; if the manual analysis module determines that the flame in the gas station is a misjudgment, the manual analysis module immediately clears the gas station alarm information in the current control terminal and suspends receiving the gas station alarm information within 1 minute.

[0173] Step 7.3, the manual analysis module determines the location of the fire at the gas station based on the location of the video stream shooting device. In this embodiment, the location of the fire is shown as the location of camera No. 2. According to the maximum fire area and alarm duration in the gas station image, the No. 2 fire sprinkler gun on the roof of the No. 2 gas station is controlled to spray, and the spraying time of the fire water sprinkler is 2 minutes.

[0174] Step 7.4, after the fire water spraying is completed, the linkage task between the control terminal and the sprinkler system is completed.

[0175] Example 3

[0176] This embodiment uses a certain oil gas station as the on-site scene. Two NVIDIA GeForce RTX 3070 Laptop GPU (6144MB) high-performance video analysis servers are configured in the background of the oil gas station, and industrial-grade high-definition explosion-proof cameras and fire sprinklers for fire water spraying are installed at appropriate positions above each refueling gun. The industrial-grade high-definition explosion-proof camera and the fire sprinkler are respectively connected to the background server, which is a control terminal. The gas station fire intelligent identification, early warning and linkage spray fire extinguishing method proposed in Example 1 is adopted in the oil gas station, which specifically includes the following steps:

[0177] Step 1: Establish a gas station fire dataset, which includes the following steps:

[0178] Step 1.1, obtain a gas station fire video with a certain length and high definition by downloading through an Internet crawler and conducting a fire simulation experiment at an abandoned gas station, and extract a gas station image from the gas station fire video, wherein the gas station image includes a gas station flame video image with flame data and a gas station empty scene video image without flame data.

[0179] Step 1.2, based on the Mosaic data enhancement method, the gas station image is amplified, and the flames in the gas station image are labeled using the target detection image annotation tool software LabelImg. A label file is generated in the gas station flame video image, and an empty label file is generated in the gas station empty scene video image. The gas station flame video image with the label file and the gas station empty scene video image with the empty label file are used as gas station fire recognition image samples. In this embodiment, a total of 70,000 gas station fire recognition image samples are obtained.

[0180] Step 1.3, randomly distribute the gas station fire recognition image samples in the gas station scene fire recognition dataset into the training set and the test set in a ratio of 6:1. The training set and the test set together constitute the gas station scene fire recognition dataset.

[0181] Step 2: Build a gas station flame target detection model based on the target detection network YOLOv7.

[0182] Step 3: Use the training set to train the gas station flame target detection model to obtain a trained gas station flame target detection model.

[0183] Step 4, use the test set to verify the flame recognition effect of the gas station flame target detection model after training. If the flame recognition effect of the gas station flame target detection model after training has reached the best, proceed to step 5; otherwise, return to step 3 and continue to train the gas station flame target detection model using the training set.

[0184] Step 5, input the gas station video stream into the verified gas station flame target detection model, use the verified gas station flame target detection model to extract the gas station image from the gas station video stream for flame recognition, combine the analysis algorithm to determine whether there is a real flame in the gas station image, and obtain the flame recognition record in the gas station image with a real flame, which specifically includes the following steps:

[0185] Step 5.1, input the gas station video stream into the gas station flame target detection model.

[0186] Step 5.2: The gas station flame target detection model extracts one frame per second from the gas station video stream to obtain a gas station image and numbers it. The gas station flame target detection model is used to perform flame recognition on each frame of the gas station image. If the gas station flame target detection model recognizes that there is a flame in the gas station image, the gas station image is analyzed to determine whether the flame in the gas station image is a real flame. If the flame in the gas station image is a real flame, proceed to step 5.3; otherwise, return to step 5.1.

[0187] The gas station image analysis process in this embodiment is as follows:

[0188] When the gas station flame target detection model identifies that there is flame in the Fth frame of the gas station image, the gas station flame target detection model is used to continue to perform flame recognition on the F1th frame to the Ftth frame of the gas station image within 4 seconds after the gas station image;

[0189] If no flame is identified in any of the gas station images of the F1th to Ftth frames, it is determined that the flame in the gas station image of the Fth frame identified by the gas station flame target detection model is a misjudgment; otherwise, a differential threshold T1 is set. In this embodiment, the differential threshold T1=2, and the gas station image in which a flame is detected in the gas station images of the F1th to Ftth frames is subjected to differential processing with the gas station image of the Fth frame. If the differential results between the gas station image in which a flame is detected in the gas station images of the F1th to Ftth frames and the gas station image of the Fth frame are both less than the differential threshold T1, it is determined that the flame in the gas station image of the Fth frame is a misjudgment; otherwise, the flame detection result of the gas station image of the Fth frame is used to continue to determine whether the flame in the gas station image is a real flame;

[0190] Calculate the ratio between the number of image frames t1 in which flames are detected in the gas station image within 4 seconds after the F-th frame of the gas station image and the total number of gas station image frames within 4 seconds after the F-th frame of the gas station image. If the ratio R is less than 80%, it is a false judgment that there is a flame in the F-th frame of the gas station image. Otherwise, it is judged that the flame in the F-th frame of the gas station image is a real flame.

[0191] Step 5.3, obtain the processing parameters of the real flame in the gas station image, and obtain the flame recognition record in the gas station image with the real flame, including the minimum coordinate value Xmin of the maximum flame recognition frame in the gas station image from the x-axis, the maximum coordinate value Xmax of the maximum flame recognition frame in the gas station image from the x-axis, the minimum coordinate value Ymin of the maximum flame recognition frame in the gas station image from the y-axis, the maximum coordinate value Ymax of the maximum flame recognition frame in the gas station image from the y-axis, the current recognition time Time, the number of the currently recognized gas station image Number, the name of the currently recognized gas station image Name, and the confidence of the currently recognized gas station image Confidence.

[0192] Step 6, based on the flame recognition record in the gas station image with real flames, determines the gas station fire alarm duration and transmits it to the control terminal, specifically including the following steps:

[0193] Based on the flame recognition record corresponding to the Fth frame of the gas station image with flames, the maximum fire area S in the gas station image is calculated, and then the alarm duration evaluation value D is set according to the maximum fire area S in the gas station image and the confidence of the gas station image.

[0194] A first threshold D1 and a second threshold D2 are preset, wherein the first threshold D1 is smaller than the second threshold D2. The alarm duration SPTime is set according to the first threshold D1, the second threshold D2 and the alarm duration evaluation value D. In this embodiment, the alarm duration evaluation value D is greater than the second threshold D2, the area of ​​the current maximum fire point is large, and the model recognition confidence is high. The alarm level to be predicted is the highest, and the alarm duration SPTime is set to 5 minutes.

[0195] Step 7: After the control terminal receives the judgment result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, the control terminal uses the manual judgment module preset in the control terminal to confirm the alarm, generate the gas station alarm information and transmit it to the sprinkler system preset in the gas station, and link with the sprinkler system to control the sprinkler system to spray the location where the fire occurred in the gas station, which specifically includes the following steps:

[0196] Step 7.1, after the manual analysis module preset in the control terminal receives the judgment result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, it updates the gas station flame judgment result and the gas station fire alarm duration in the gas station alarm information, and inputs the updated gas station alarm information into the manual analysis module preset in the control terminal.

[0197] In step 7.2, the manual analysis module receives the gas station alarm information and performs manual analysis. The manual analysis time is preset to 30 seconds. If the manual analysis module does not confirm within 30 seconds, it is deemed that there is no manual confirmation response. The manual analysis module directly outputs the alarm instruction, controls the alarm module to emit an alarm prompt sound, and enters step 7.3.

[0198] Otherwise, if the manual analysis module determines that the flame in the gas station is a real flame, the manual analysis module outputs an alarm instruction, controls the alarm module to emit an alarm prompt sound, and enters step 7.3; if the manual analysis module determines that the flame in the gas station is a misjudgment, the manual analysis module immediately clears the gas station alarm information in the current control terminal and suspends receiving the gas station alarm information within 1 minute.

[0199] Step 7.3, the manual analysis module determines the location of the fire at the gas station based on the location of the video stream shooting device. In this embodiment, the location of the fire is shown as the location of camera No. 3. According to the maximum fire area and alarm duration in the gas station image, the No. 3 fire sprinkler gun on the roof of the No. 3 gas station is controlled to spray, and the spraying time of the fire water sprinkler is 5 minutes.

[0200] Step 7.4, after the fire water spraying is completed, the linkage task between the control terminal and the sprinkler system is completed.

[0201] Example 4

[0202] This embodiment uses a certain oil gas station as the on-site scene. Four NVIDIA GeForce RTX 3090 Laptop GPU high-performance video analysis servers are configured in the background of the oil gas station, and industrial-grade high-definition explosion-proof cameras and fire sprinklers for fire water spraying are installed at appropriate positions above each refueling gun. The industrial-grade high-definition explosion-proof camera and the fire sprinkler are respectively connected to the background server, which is a control terminal. The gas station fire intelligent identification, early warning and linkage spray fire extinguishing method proposed in Example 1 is adopted in the oil gas station, which specifically includes the following steps:

[0203] Step 1: Establish a gas station fire dataset, which includes the following steps:

[0204] Step 1.1, obtain a gas station fire video with a certain length and high definition by downloading through an Internet crawler and conducting a fire simulation experiment at an abandoned gas station, and extract a gas station image from the gas station fire video, wherein the gas station image includes a gas station flame video image with flame data and a gas station empty scene video image without flame data.

[0205] Step 1.2, based on the Mosaic data enhancement method, the gas station image is amplified, and the flames in the gas station image are labeled using the target detection image annotation tool software LabelImg. A label file is generated in the gas station flame video image, and an empty label file is generated in the gas station empty scene video image. The gas station flame video image with the label file and the gas station empty scene video image with the empty label file are used as gas station fire recognition image samples. In this embodiment, a total of 50,000 gas station fire recognition image samples are obtained.

[0206] Step 1.3, randomly distribute the gas station fire recognition image samples in the gas station scene fire recognition dataset into the training set and the test set in a ratio of 4:1. The training set and the test set together constitute the gas station scene fire recognition dataset.

[0207] Step 2: Build a gas station flame target detection model based on the target detection network YOLOv8.

[0208] Step 3: Use the training set to train the gas station flame target detection model to obtain a trained gas station flame target detection model.

[0209] Step 4, use the test set to verify the flame recognition effect of the gas station flame target detection model after training. If the flame recognition effect of the gas station flame target detection model after training has reached the best, proceed to step 5; otherwise, return to step 3 and continue to train the gas station flame target detection model using the training set.

[0210] Step 5, input the gas station video stream into the verified gas station flame target detection model, use the verified gas station flame target detection model to extract the gas station image from the gas station video stream for flame recognition, combine the analysis algorithm to determine whether there is a real flame in the gas station image, and obtain the flame recognition record in the gas station image with a real flame, which specifically includes the following steps:

[0211] Step 5.1, input the gas station video stream into the gas station flame target detection model.

[0212] Step 5.2: The gas station flame target detection model extracts one frame per second from the gas station video stream to obtain a gas station image and numbers it. The gas station flame target detection model is used to perform flame recognition on each frame of the gas station image. If the gas station flame target detection model recognizes that there is a flame in the gas station image, the gas station image is analyzed to determine whether the flame in the gas station image is a real flame. If the flame in the gas station image is a real flame, proceed to step 5.3; otherwise, return to step 5.1.

[0213] The gas station image analysis process in this embodiment is as follows:

[0214] When the gas station flame target detection model identifies that there is flame in the Fth frame of the gas station image, the gas station flame target detection model is used to continue to perform flame recognition on the F1th frame to the Ftth frame of the gas station image within 3 seconds after the gas station image;

[0215] If no flame is identified in any of the gas station images from the F1th frame to the Ftth frame, then the flame in the gas station image from the Fth frame identified by the gas station flame target detection model is determined to be a misjudgment; otherwise, a differential threshold T1 is set. In this embodiment, the differential threshold T1=3, and the gas station image from the F1th frame to the Ftth frame in which a flame is detected is differentially processed with the Fth frame gas station image. If the differential results between the gas station image from the F1th frame to the Ftth frame in which a flame is detected and the Fth frame gas station image are both less than the differential threshold T1, then the flame in the Fth frame gas station image is determined to be a misjudgment; otherwise, the flame detection result of the Fth frame gas station image is used to continue to determine whether the flame in the gas station image is a real flame;

[0216] Calculate the ratio of the number of image frames t1 in which flames are detected in the gas station image within 4 seconds after the F-th frame of the gas station image to the total number of gas station image frames within 3 seconds after the F-th frame of the gas station image. If the ratio R is less than 80%, it is a false judgment that there is a flame in the F-th frame of the gas station image. Otherwise, it is judged that the flame in the F-th frame of the gas station image is a real flame.

[0217] Step 5.3, obtain the processing parameters of the real flame in the gas station image, and obtain the flame recognition record in the gas station image with the real flame, including the minimum coordinate value Xmin of the maximum flame recognition frame in the gas station image from the x-axis, the maximum coordinate value Xmax of the maximum flame recognition frame in the gas station image from the x-axis, the minimum coordinate value Ymin of the maximum flame recognition frame in the gas station image from the y-axis, the maximum coordinate value Ymax of the maximum flame recognition frame in the gas station image from the y-axis, the current recognition time Time, the number of the currently recognized gas station image Number, the name of the currently recognized gas station image Name, and the confidence of the currently recognized gas station image Confidence.

[0218] Step 6, based on the flame recognition record in the gas station image with real flames, determines the gas station fire alarm duration and transmits it to the control terminal, specifically including the following steps:

[0219] Based on the flame recognition record corresponding to the Fth frame of the gas station image with flames, the maximum fire area S in the gas station image is calculated, and then the alarm duration evaluation value D is set according to the maximum fire area S in the gas station image and the confidence of the gas station image.

[0220] A first threshold D1 and a second threshold D2 are preset, wherein the first threshold D1 is smaller than the second threshold D2. The alarm duration SPTime is set according to the first threshold D1, the second threshold D2 and the alarm duration evaluation value D. In this embodiment, the alarm duration evaluation value D is greater than the second threshold D2, the area of ​​the current maximum fire point is large, and the model recognition confidence is high. The alarm level to be predicted is the highest, and the alarm duration SPTime is set to 5 minutes.

[0221] Step 7: After the control terminal receives the judgment result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, the control terminal uses the manual judgment module preset in the control terminal to confirm the alarm, generate the gas station alarm information and transmit it to the sprinkler system preset in the gas station, and link with the sprinkler system to control the sprinkler system to spray the location where the fire occurred in the gas station, which specifically includes the following steps:

[0222] Step 7.1, after the manual analysis module preset in the control terminal receives the judgment result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, it updates the gas station flame judgment result and the gas station fire alarm duration in the gas station alarm information, and inputs the updated gas station alarm information into the manual analysis module preset in the control terminal.

[0223] Step 7.2: The manual analysis module receives the gas station alarm information and performs manual analysis. The manual analysis time is preset to 30 seconds.

[0224] In this embodiment, manual analysis determines that it is reflected light at the gas station site at night, that is, the determined gas station flame is a misjudgment, and the determination result in the current gas station alarm information is a misjudgment. At this time, the control terminal is not linked to the sprinkler system, the gas station alarm information is cleared, and the reception of new gas station alarm information is suspended within 1 minute, and monitoring is resumed after 1 minute.

[0225] Example 5

[0226] This embodiment uses a certain oil gas station as the on-site scene. An NVIDIA GeForce RTX 3090 Laptop GPU high-performance video analysis server is configured in the background of the oil gas station, and an industrial-grade high-definition explosion-proof camera and a fire sprinkler for fire water spraying are installed at an appropriate position above each gas pump. The industrial-grade high-definition explosion-proof camera and the fire sprinkler are respectively connected to the background server, which is a control terminal. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method proposed in Example 1 is used in the oil gas station, which specifically includes the following steps:

[0227] Step 1: Establish a gas station fire dataset, which includes the following steps:

[0228] Step 1.1, obtain a gas station fire video with a certain length and high definition by downloading through an Internet crawler and conducting a fire simulation experiment at an abandoned gas station, and extract a gas station image from the gas station fire video, wherein the gas station image includes a gas station flame video image with flame data and a gas station empty scene video image without flame data.

[0229] Step 1.2, based on the Mosaic data enhancement method, the gas station image is amplified, and the flames in the gas station image are labeled using the target detection image annotation tool software LabelImg. A label file is generated in the gas station flame video image, and an empty label file is generated in the gas station empty scene video image. The gas station flame video image with the label file and the gas station empty scene video image with the empty label file are used as gas station fire recognition image samples. In this embodiment, a total of 16,000 gas station fire recognition image samples are obtained.

[0230] Step 1.3, randomly distribute the gas station fire recognition image samples in the gas station scene fire recognition dataset into the training set and the test set in a ratio of 3:1. The training set and the test set together constitute the gas station scene fire recognition dataset.

[0231] Step 2: Build a gas station flame target detection model based on the target detection network Mask R-CNN.

[0232] Step 3: Use the training set to train the gas station flame target detection model to obtain a trained gas station flame target detection model.

[0233] Step 4, use the test set to verify the flame recognition effect of the gas station flame target detection model after training. If the flame recognition effect of the gas station flame target detection model after training has reached the best, proceed to step 5; otherwise, return to step 3 and continue to train the gas station flame target detection model using the training set.

[0234] Step 5, input the gas station video stream into the verified gas station flame target detection model, use the verified gas station flame target detection model to extract the gas station image from the gas station video stream for flame recognition, combine the analysis algorithm to determine whether there is a real flame in the gas station image, and obtain the flame recognition record in the gas station image with a real flame, which specifically includes the following steps:

[0235] Step 5.1, input the gas station video stream into the gas station flame target detection model.

[0236] Step 5.2: The gas station flame target detection model extracts one frame per second from the gas station video stream to obtain a gas station image and numbers it. The gas station flame target detection model is used to perform flame recognition on each frame of the gas station image. If the gas station flame target detection model recognizes that there is a flame in the gas station image, the gas station image is analyzed to determine whether the flame in the gas station image is a real flame. If the flame in the gas station image is a real flame, proceed to step 5.3; otherwise, return to step 5.1.

[0237] The gas station image analysis process in this embodiment is as follows:

[0238] When the gas station flame target detection model identifies that there is flame in the Fth frame of the gas station image, the gas station flame target detection model is used to continue to perform flame recognition on the F1th frame to the Ftth frame of the gas station image within 3 seconds after the gas station image;

[0239] If no flame is identified in any of the gas station images from the F1th frame to the Ftth frame, then the flame in the gas station image from the Fth frame identified by the gas station flame target detection model is determined to be a misjudgment; otherwise, a differential threshold T1 is set. In this embodiment, the differential threshold T1=3, and the gas station image from the F1th frame to the Ftth frame in which a flame is detected is differentially processed with the Fth frame gas station image. If the differential results between the gas station image from the F1th frame to the Ftth frame in which a flame is detected and the Fth frame gas station image are both less than the differential threshold T1, then the flame in the Fth frame gas station image is determined to be a misjudgment; otherwise, the flame detection result of the Fth frame gas station image is used to continue to determine whether the flame in the gas station image is a real flame;

[0240] Calculate the ratio of the number of image frames t1 in which flames are detected in the gas station image within 4 seconds after the F-th frame of the gas station image to the total number of gas station image frames within 3 seconds after the F-th frame of the gas station image. If the ratio R is less than 80%, it is a false judgment that there is a flame in the F-th frame of the gas station image. Otherwise, it is judged that the flame in the F-th frame of the gas station image is a real flame.

[0241] In this embodiment, the calculated ratio R=1 / 3<80%, that is, the flame in the current frame of the gas station image is a misjudgment, and the recognition and judgment of the current frame of the gas station image is ended, and the recognition and judgment of the next frame of the gas station image is continued until all the extracted gas station images are processed.

[0242] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms used herein are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0243] In the present invention, the directions or positional relationships indicated by terms such as "upper", "lower", "bottom", "top", etc. are based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present invention. They do not specifically refer to any part or element in the present invention and cannot be understood as limitations on the present invention.

[0244] In the present invention, terms such as "connected" and "connection" should be understood in a broad sense, indicating that the connection can be fixed, integral or detachable; it can be directly connected or indirectly connected through an intermediate medium. Relevant scientific research or technical personnel in this field can determine the specific meaning of the above terms in the present invention according to specific circumstances, and they should not be understood as limiting the present invention.

[0245] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the protection scope of the present invention.

Claims

1. A method for intelligent identification, early warning and linkage sprinkler fire extinguishing of gas station fires, characterized in that: The specific steps include: Step 1, establish a gas station fire dataset; Step 2: Build a gas station flame target detection model based on a deep learning network; Step 3, using the training set to train the gas station flame target detection model to obtain a trained gas station flame target detection model; Step 4, using the test set to verify the flame recognition effect of the gas station flame target detection model after training. If the flame recognition effect of the gas station flame target detection model after training has reached the best, proceed to step 5; otherwise, return to step 3 and continue to train the gas station flame target detection model using the training set; Step 5: Input the gas station video stream into the verified gas station flame target detection model, use the verified gas station flame target detection model to extract the gas station image from the gas station video stream for flame recognition, combine the analysis and judgment algorithm to determine whether there is a real flame in the gas station image, and obtain the flame recognition record in the gas station image with the real flame; Step 6, based on the flame recognition record in the gas station image with real flames, determine the duration of the gas station fire alarm and transmit it to the control terminal; Step 7: After the control terminal receives the judgment result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, the artificial analysis module preset in the control terminal is used to confirm the alarm, generate the gas station alarm information and transmit it to the sprinkler system preset in the gas station, and link with the sprinkler system to control the sprinkler system to spray the location where the fire occurred in the gas station.

2. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 1 is characterized in that: The step 1 specifically includes the following steps: Step 1.1, obtain the gas station fire video and extract the gas station image from the gas station fire video; The gas station fire scene video is obtained by downloading through an Internet crawler or by filming a simulated experiment of a gas station fire scene; The gas station image includes a gas station flame video image with flame data and a gas station empty scene video image without flame data; Step 1.2, based on the Mosaic data enhancement method, the gas station image is amplified, and the flame in the gas station image is annotated using the target detection image annotation tool software, a label file is generated in the gas station flame video image, and an empty label file is generated in the gas station empty scene video image, and the gas station flame video image with the label file and the gas station empty scene video image with the empty label file are used as gas station fire recognition image samples; In step 1.3, the gas station fire recognition image samples in the gas station scene fire recognition dataset are randomly assigned to the training set and the test set. The training set and the test set together constitute the gas station scene fire recognition dataset.

3. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 2 is characterized in that: Among the gas station fire identification image samples, there are at least 10,000 gas station flame video images with label files.

4. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 2 is characterized in that: The ratio of the number of gas station fire recognition image samples in the training set to that in the test set is 3:1 or 4:1 or 5:1 or 6:

1.

5. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 1 is characterized in that: The deep learning network selects the target detection network YOLOv7, and uses the target detection network YOLOv7 to build a gas station flame target detection model.

6. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 5 is characterized in that: The target detection network YOLOv7 takes into account both recognition speed and accuracy, including an input end, a backbone feature extraction network and a detection head; The input end is used to perform adaptive image scaling processing, Mosaic data enhancement processing and adaptive anchor frame calculation on the input gas station fire recognition image samples, wherein the adaptive image scaling processing is used to unify the input format of the gas station fire recognition image samples so that the input multiple gas station fire recognition image samples have the same size after scaling processing; The Mosaic data enhancement process obtains a spliced ​​gas station fire identification image sample by splicing multiple gas station fire identification image samples in a random scaling, random cropping, and random arrangement manner; The adaptive anchor frame calculation is used to automatically obtain the optimal anchor frame value during each training; The backbone feature extraction network includes a plurality of CBS modules and a plurality of ELAN modules connected in sequence, and two adjacent ELAN modules are connected via an MP module; The detection head includes a connected SPPCSPC structure, an ELAN module, an MP structure and a re-parameterized Rep structure, which are used as a classifier and a regressor of the network; The SPPCSPC structure introduces the CSP structure into the SPP structure, and uses the SPP with the CSP structure to expand the receptive field for residual edge-assisted optimization and feature extraction; The re-parameterized Rep structure introduces the RepConv structure and the residual structure to assist training, so as to reduce the complexity of the target detection network YOLOv7.

7. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 6 is characterized in that: The CBS module includes a convolutional layer, a BN layer and a Silu layer; An activation function is set in the Silu layer, and the activation function is set to a sigmoid function.

8. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 6 is characterized in that: The ELAN module includes a shallow feature extraction layer, a deep feature extraction layer and a reconstruction module; The shallow feature extraction layer is set to a 3×3 convolutional layer; The deep feature extraction layer consists of stacked ELABs and a residual connection; The reconstruction module consists of a 3×3 convolution and a PixelShuffle operation layer.

9. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 6 is characterized in that: The MP module is provided with a first branch and a second branch for realizing super downsampling of parallel extraction and compression of features; The first branch is provided with a maximum pooling layer and a 1×1 convolutional layer connected in sequence; The second branch is provided with a 1×1 convolution layer and a 3×3 convolution kernel connected in sequence and a convolution block with a stride of 2; The 1×1 convolutional layers set in the first branch and the second branch are both used to change the number of channels; A merging layer is provided after the first branch and the second branch, for adding the processing results of the first branch and the second branch and outputting the result of super downsampling.

10. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 1 is characterized in that: The step 3 specifically includes the following steps: Step 3.1, set the total number of training times, loss value, and recognition accuracy, recall rate, and average recognition accuracy mAP@0.5 values; Step 3.2, input the gas station fire recognition image samples in the training set into the gas station flame target detection model constructed in step 2, use the gas station flame target detection model to recognize the flame in the gas station flame video image, and obtain the gas station flame recognition result; Step 3.2, optimize the gas station flame target detection model based on the hyperparameter dynamic indicator monitoring method, compare the flame recognition result of the gas station flame target detection model with the label file corresponding to the gas station flame target detection model, calculate the loss value, recognition accuracy, recall rate and mAP@0.5 value of the gas station flame target detection model for flame recognition, and compare them with the preset loss value, recognition accuracy, recall rate and mAP@0.5 value. If the loss value is less than the preset loss value and the recognition accuracy, recall rate and mAP@0.5 value are all greater than the preset recognition accuracy, recall rate and mAP@0.5 value, proceed to step 3.4; otherwise, proceed to step 3.3; Step 3.3, update the hyperparameters of the gas station flame target detection model to obtain an updated gas station flame target detection model, continue to randomly select gas station fire recognition image samples in the training set and input them into the updated gas station flame target detection model, use the updated gas station flame target detection model to recognize the gas station fire recognition image samples, and after obtaining the flame recognition results of the gas station fire recognition image samples, return to step 3.2; Step 3.4, complete the training of the gas station flame target detection model, and obtain the trained gas station flame target detection model.

11. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 10 is characterized in that: The average recognition accuracy mAP@0.5 is the average accuracy of image samples when the intersection over union (IoU) is 0.

5.

12. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 1 is characterized in that: The step 4 specifically includes the following steps: Step 4.1, input the gas station fire recognition image samples in the test set into the trained gas station flame target detection model, use the gas station flame target detection model to recognize the gas station fire recognition image samples, and obtain the flame recognition results of the gas station fire recognition image samples; Step 4.2, compare the flame recognition results of the gas station fire recognition image samples identified by the gas station flame target detection model with the label files corresponding to the gas station fire recognition image samples, calculate the loss value, recognition accuracy, recall rate and mAP@0.5 value of the gas station flame target detection model for flame recognition, and compare them with the preset loss value, recognition accuracy, recall rate and mAP@0.5 value. If the loss value is less than the preset loss value and the recognition accuracy, recall rate and mAP@0.5 value are all greater than the preset recognition accuracy, recall rate and mAP@0.5 value, it proves that the flame recognition effect of the gas station flame target detection model after training has reached the optimal level, and proceed to step 5; otherwise, proceed to step 3 and continue to use the training set to train the gas station flame target detection model.

13. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 1 is characterized in that: The step 5 specifically includes the following steps: Step 5.1, input the gas station video stream into the gas station flame target detection model; Step 5.2: In the gas station flame target detection model, one frame is extracted from the gas station video stream every second to obtain a gas station image and number it. The gas station flame target detection model is used to perform flame recognition on each frame of the gas station image. If the gas station flame target detection model recognizes that there is a flame in the gas station image, the gas station image is analyzed to determine whether the flame in the gas station image is a real flame. If the flame in the gas station image is a real flame, step 5.3 is entered; otherwise, step 5.1 is returned. Step 5.3, obtaining processing parameters of real flames in the gas station image, and obtaining flame recognition records in the gas station image where real flames exist.

14. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 13, characterized in that: The flame recognition record includes the minimum coordinate value Xmin of the maximum flame recognition frame in the gas station image from the x-axis, the maximum coordinate value Xmax of the maximum flame recognition frame in the gas station image from the x-axis, the minimum coordinate value Ymin of the maximum flame recognition frame in the gas station image from the y-axis, the maximum coordinate value Ymax of the maximum flame recognition frame in the gas station image from the y-axis, the current recognition time Time, the number Number of the currently recognized gas station image, the name Name of the currently recognized gas station image, the confidence Confidence of the currently recognized gas station image and the alarm duration SPTime.

15. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 13, characterized in that: In step 5.2, the gas station image analysis process is as follows: When the gas station flame target detection model identifies that there is flame in the Fth frame of the gas station image, the gas station flame target detection model is used to continue to perform flame recognition on the F1th frame to the Ftth frame of the gas station image within t seconds after the gas station image; If no flame is identified in any of the gas station images from the F1th frame to the Ftth frame, the flame in the gas station image from the Fth frame identified by the gas station flame target detection model is determined to be a misjudgment; otherwise, a differential threshold T1 is set, and the gas station image from the F1th frame to the Ftth frame in which a flame is detected is differentially processed with the Fth frame gas station image. If the differential results between the gas station image from the F1th frame to the Ftth frame in which a flame is detected and the Fth frame gas station image are both less than the differential threshold T1, the flame in the Fth frame gas station image is determined to be a misjudgment; otherwise, the flame detection result of the Fth frame gas station image is used to continue to determine whether the flame in the gas station image is a real flame; Calculate the ratio between the number of image frames t1 in which flames are detected in the gas station image within t seconds after the F-th frame of the gas station image and the total number of gas station image frames within t seconds after the F-th frame of the gas station image. If the ratio R is less than 80%, it is a false judgment that there is a flame in the F-th frame of the gas station image. Otherwise, it is judged that the flame in the F-th frame of the gas station image is a real flame.

16. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 1 is characterized in that: In step 6, the process of determining the duration of the gas station fire alarm based on the maximum fire area and the confidence probability in the gas station image is as follows: Step 6.1, based on the flame recognition record corresponding to the Fth frame of the gas station image with flame, calculate the maximum fire area S in the gas station image, as shown in formula (1): S = (Xmax - Xmin) × ( Ymax - Ymin) (1) Where S is the maximum fire area in the gas station image, Xmax is the maximum coordinate value of the maximum flame recognition frame in the gas station image from the x-axis, Xmin is the minimum coordinate value of the maximum flame recognition frame in the gas station image from the x-axis, Ymax is the maximum coordinate value of the maximum flame recognition frame in the gas station image from the y-axis, and Ymin is the minimum coordinate value of the maximum flame recognition frame in the gas station image from the y-axis; Step 6.2, according to the maximum fire area S in the gas station image and the confidence of the gas station image, set the alarm duration evaluation value D, as shown in formula (2): D = S × Confidence (2) Where D is the alarm duration evaluation value, Confidence is the confidence of the gas station image; Step 6.3, presetting a first threshold value D1 and a second threshold value D2, wherein the first threshold value D1 is smaller than the second threshold value D2, and setting the alarm duration SPTime according to the first threshold value D1, the second threshold value D2 and the alarm duration evaluation value D; If the alarm duration evaluation value D is less than the first threshold value D1, the alarm duration SPTime is set to 1min; if the alarm duration evaluation value D is not less than the first threshold value D1 and does not exceed the second threshold value D2, the alarm duration SPTime is set to 2min; if the alarm duration evaluation value D is greater than the second threshold value D2, the alarm duration SPTime is set to 5min.

17. The gas station fire intelligent identification, early warning and linkage sprinkler fire extinguishing method according to claim 1 is characterized in that: The step 7 specifically includes the following steps: Step 7.1, after receiving the determination result of the gas station flame target detection model on the existence of a real flame in the gas station and the duration of the gas station fire alarm, the manual judgment module preset in the control terminal updates the gas station flame determination result and the gas station fire alarm duration in the gas station alarm information, and inputs the updated gas station alarm information into the manual judgment module preset in the control terminal; Step 7.2: The manual judgment module receives the gas station alarm information and performs manual judgment. The manual judgment time is preset to 30 seconds. If the manual judgment module fails to confirm within 30 seconds, it is deemed that there is no manual confirmation response. The manual judgment module directly outputs an alarm instruction, controls the alarm module to emit an alarm prompt sound, and enters step 7.3; Otherwise, if the manual judgment module determines that the flame in the gas station is a real flame, the manual judgment module outputs an alarm instruction, controls the alarm module to emit an alarm prompt sound, and enters step 7.3; if the manual judgment module determines that the flame in the gas station is a false judgment, the manual judgment module immediately clears the gas station alarm information in the current control terminal and suspends receiving the gas station alarm information within 1 minute; Step 7.3, the manual judgment module determines the location of the fire at the gas station according to the location of the video stream shooting device, and controls the sprinkler device in the gas station to spray the fire location according to the maximum fire area and the alarm duration in the gas station image. At this time, the spraying time of the sprinkler system is equal to the alarm duration; Step 7.4: The sprinkler system has finished spraying, and the linkage task between the control terminal and the sprinkler system is completed.