Fire warning device and air conditioning system

By using hyperspectral image data acquisition and an unsupervised anomaly detection model, along with a collaborative convolutional attention module and a Transformer encoder-decoder, the problem of insufficient latent information capture in existing fire detection methods is solved, achieving efficient and accurate fire early warning.

CN122116546APending Publication Date: 2026-05-29QINGDAO HISENSE HITACHI AIR CONDITIONING SYST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO HISENSE HITACHI AIR CONDITIONING SYST
Filing Date
2024-11-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing fire detection methods rely on explicit information, making it difficult to capture implicit information, leading to missed detections and false alarms. Furthermore, multi-sensor data acquisition increases costs and introduces noise interference, resulting in a lack of accurate early warning capabilities.

Method used

A hyperspectral image data acquisition and unsupervised anomaly detection model is adopted. Through the collaborative work of convolutional attention module, Transformer encoder and decoder, fire hazards are detected and predicted. Combined with an anomaly post-processing model, time-series prediction is performed to generate fire alarm requests.

Benefits of technology

It has achieved efficient and accurate fire hazard detection, reduced false alarms, and improved the generalizability, timeliness, and accuracy of fire early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122116546A_ABST
    Figure CN122116546A_ABST
Patent Text Reader

Abstract

The application discloses a fire warning device, comprising: a collection unit configured to collect hyperspectral image data of a target indoor scene; a processing unit configured with: an anomaly detection model configured to reconstruct background image data based on the hyperspectral image data; residual processing of the reconstructed background image data and the original hyperspectral image data to determine whether there is an abnormal area; when there is an abnormal area, determining that the original hyperspectral image data is an abnormal image, and establishing an abnormal image time sequence; and an anomaly post-processing model configured to perform time series prediction based on the abnormal image time sequence to generate a predicted image sequence; comparing the abnormal image time sequence and the predicted image sequence to calculate similarity; when the similarity meets a pre-set similarity determination condition, determining that the target indoor scene has a fire hazard, and generating a fire alarm request; and an air conditioning system. The present application is designed based on a double-model unsupervised method, which can be conveniently deployed and applied.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of air conditioning technology, and more particularly to a fire warning device and an air conditioning system. Background Technology

[0002] In today's society, environmental monitoring has become a major public concern, especially in public places such as conference rooms and offices, where the monitoring and early warning of safety hazards are particularly important. For example, an abnormal rise in indoor temperature may indicate a fire risk, and if it is not detected and controlled in time, it may lead to serious casualties and property damage.

[0003] Currently, supervised learning-based fire detection models often rely too heavily on training data. This can lead to insufficient or missing samples, especially for detecting sudden disasters like fires, resulting in missed detections. Therefore, traditional fire detection methods often rely on explicit information for training but struggle to capture implicit information such as changes in the temperature of objects within a room, thus failing to effectively provide early fire warnings.

[0004] To address these issues, the industry has adopted technologies such as data augmentation to enhance the generalization capabilities of networks, but it still lacks the ability to accurately warn of potential fire hazards. Furthermore, while multi-sensor data acquisition and processing can provide more information, it also increases the cost of model deployment, and the complexity of the environment and the fusion of multi-source information often introduce noise interference, leading to excessive false alarms.

[0005] The information disclosed in this background section is only intended to enhance the understanding of the background technology of this application, and therefore may include prior art that is not known to those skilled in the art. Summary of the Invention

[0006] The first aspect of this application provides a fire warning device. In some embodiments of this application, the fire warning device includes: a data acquisition unit configured to acquire hyperspectral image data of a target indoor scene; and a processing unit configured with: an anomaly detection model configured to reconstruct background image data based on the hyperspectral image data; perform residual processing on the reconstructed background image data and the original hyperspectral image data to determine whether an abnormal region exists; when an abnormal region exists, determine that the original hyperspectral image data is an abnormal image and establish an abnormal image time series; and an anomaly post-processing model configured to perform time series prediction based on the abnormal image time series to generate a predicted image sequence; compare the abnormal image time series and the predicted image sequence to calculate similarity; and when the similarity meets a pre-set similarity determination condition, determine that there is a fire hazard in the target indoor scene and generate a fire alarm request.

[0007] The above technical solution has the following advantages or beneficial effects: the anomaly detection model and the anomaly post-processing model work together to detect and predict fire hazards through hyperspectral image data. It adopts an unsupervised detection method, eliminating the cumbersome data processing and training processes. By analyzing the test data and reasoning the detection results, it can be easily deployed and applied. Based on the unsupervised detection process, there are no sample limitations, which can adapt to more emergencies and show good generalization.

[0008] In some embodiments of this application, the anomaly detection model includes: a convolutional attention module, which is used to downsample and perform attention mechanism processing in the spatial and spectral dimensions to extract and fuse multidimensional features in hyperspectral image data; a Transformer encoder, which is configured to capture the correlation between sub-blocks based on hyperspectral image segmentation based on self-attention mechanism and masking, and suppress the reconstruction of anomalous features; and a Transformer decoder, which is configured to generate output sub-blocks based on the output of the Transformer encoder through layer-by-layer feature extraction and Agent attention mechanism, and reconstruct background image data based on the output sub-blocks.

[0009] The above technical solutions offer the following advantages or beneficial effects: In the convolutional attention module, a series of operations compress hyperspectral image data from high-dimensional space to low-dimensional space while preserving key features. The attention mechanism allows the anomaly detection model to focus on the most important parts of the hyperspectral image data, ignoring irrelevant information, thereby improving the efficiency and accuracy of feature extraction. The self-attention mechanism in the Transformer encoder allows the model to consider information from all other sub-blocks when processing each sub-block, thus better understanding and processing complex relationships in the image. The masking technique, by obscuring some information, forces the model to focus more on the uncovered parts, thereby improving the sensitivity to anomalous features. Furthermore, the Agent attention mechanism in the Transformer decoder further optimizes the feature extraction process, enabling the anomaly detection model to generate output sub-blocks more accurately, ensuring that the reconstructed background image data accurately reflects the normal parts of the original image, thus better highlighting anomalous regions. Through the collaborative work of these three modules, the anomaly detection model can effectively detect and process anomalies in hyperspectral image data, improving detection accuracy and reliability.

[0010] In some embodiments of this application, the convolutional attention module is configured to: perform downsampling operations through depthwise separable convolution to generate an input feature map; and process the input feature map in the spatial and spectral dimensions through a multidimensional fusion attention mechanism to obtain an output feature map.

[0011] The above technical solution has the following advantages or beneficial effects: depthwise separable convolution greatly reduces the amount of computation while preserving key features, ensuring that spatial and spectral information in hyperspectral image data can be extracted efficiently in subsequent processing, while the multidimensional fusion attention mechanism enables the anomaly detection model to pay more attention to the key parts in hyperspectral image data and ignore irrelevant information, thereby improving the efficiency of feature extraction.

[0012] In some embodiments of this application, the Transformer encoder is configured to perform the following steps when capturing the correlation between sub-blocks segmented from a hyperspectral image based on a self-attention mechanism and a mask, and suppressing the reconstruction of anomalous features: inputting input sub-blocks segmented based on the output feature map; applying a linear transformation to extract the query matrix, key matrix, and value matrix; in a first stage, calculating the dot product of all sub-blocks using a preset mask to obtain a similarity matrix and calculating attention weights; multiplying the calculated attention weights by the value matrix and summing them to reconstruct each input sub-block; comparing the similarity between the reconstructed sub-blocks and the input sub-blocks, and determining that the corresponding sub-block is an anomalous sub-block when the similarity meets a preset sub-block similarity setting condition; after identifying the anomalous sub-blocks, proceeding to the second stage, where the anomalous sub-blocks undergo anomaly suppression using a mask, and the background sub-block set of the non-anomalous sub-blocks undergoes background enhancement operation with itself and neighborhood information.

[0013] The above technical solution has the following advantages or beneficial effects: Through the above steps, the Transformer encoder can effectively capture the correlation between sub-blocks, identify and suppress anomalous features, thereby improving the accuracy and reliability of hyperspectral image data processing.

[0014] In some embodiments of this application, the Transformer decoder is configured to perform the following steps when applying the Agent attention mechanism: applying a linear transformation to extract the query matrix, key matrix, and value matrix; performing a pooling operation on the query matrix to generate a query token, and using the query token as a proxy for the query matrix; and calculating attention based on the query matrix, key matrix, value matrix, and query token.

[0015] The above technical solution has the following advantages or beneficial effects: By calculating the dot product between the query token and the key matrix, and the dot product between the query token and the query matrix, the similarity between sub-blocks is obtained, thereby determining the attention weights. Then, these attention weights are multiplied with the value matrix and summed to reconstruct each input sub-block, that is, global information from the key matrix and value matrix is ​​aggregated and subsequently broadcast back to the query matrix. This process allows the anomaly detection model to focus on more critical parts, improving the accuracy of feature reconstruction.

[0016] In some embodiments of this application, the anomaly detection model is trained using mean squared error loss optimization, including: calculating the reconstruction error based on the pixel vectors of the hyperspectral image data and the pixel vectors of the reconstructed hyperspectral image data based on the spatial location; combining the reconstruction errors to obtain a reconstruction error map; calculating adaptive weight values ​​based on the maximum value in the reconstruction error map and the difference between the reconstruction errors; combining the adaptive weights to obtain an adaptive weight map; and calculating the mean squared error loss based on the adaptive weight map.

[0017] The above technical solution has the following advantages or beneficial effects: by introducing adaptive weights into the mean square error loss, pixel-level anomaly suppression is achieved, reducing the impact of stacking effect on the abnormal parts.

[0018] In some embodiments of this application, after the acquisition unit acquires hyperspectral image data of the target indoor scene, it uses spectral band clustering, including: stretching the matrix representation of the spectral channels into a vector representation; constructing a feature matrix using the vector representation of the spectral channels; using a clustering algorithm to group the spectral channels together to form several clusters; selecting a representative channel in each cluster; restoring the selected representative channel into an image; presenting the restored image of the representative channel as input image data, and inputting the input image data into the processing unit.

[0019] The above technical solution has the following advantages or beneficial effects: the acquisition unit can effectively perform spectral band clustering processing on hyperspectral image data through the above method, reduce data redundancy, and improve processing efficiency.

[0020] In some embodiments of this application, the anomaly post-processing model is built based on a convolutional gated recurrent unit network; the anomaly post-processing model is configured to take an anomaly binary image sequence as input, and the anomaly binary image sequence is generated based on the anomaly image output by the anomaly detection model; the anomaly post-processing model is further configured to perform the following steps: perform temporal prediction on the input anomaly binary image sequence to generate a predicted binary image sequence; compare the input anomaly binary image sequence with the temporal prediction output of the anomaly post-processing model and calculate the similarity; if the similarity between several consecutive hyperspectral image data and the temporal prediction output of the anomaly post-processing model is less than a preset threshold, then it is determined that there is a fire hazard in the target indoor scene.

[0021] The above technical solution has the following advantages or beneficial effects: Through the above method, the anomaly post-processing model can further analyze the time evolution trend of the abnormal area based on the output results of the anomaly detection model, accurately judge fire hazards, and improve the timeliness and accuracy of fire early warning.

[0022] A second aspect of this application provides an air conditioning system, comprising: at least one air conditioning device capable of guiding the flow of air in a target indoor scene or guiding outdoor air into the target indoor scene; further comprising: a fire alarm device; and a control device configured to, upon receiving a fire alarm request, trigger the air conditioning device to start or stop guiding the flow of air in the target indoor scene or guiding outdoor air into the target indoor scene.

[0023] The above-mentioned technical solution has the following advantages or beneficial effects: By integrating air conditioning devices, fire warning devices, and control devices, the air conditioning system can automatically trigger corresponding air conditioning operations upon receiving a fire alarm request. For example, it can shut down the air conditioning device to prevent the spread of fire, or enter a specific ventilation mode to quickly remove smoke, thereby effectively mitigating the impact of fire on the indoor environment, increasing escape time, and ensuring personnel safety. Furthermore, after the fire alarm is cleared, the system can automatically activate the air purification function to help remove residual smoke and harmful gases, quickly restoring the indoor environment to a healthy state, thus providing an intelligent emergency response; and it provides an environmental restoration mechanism when the alarm is cleared.

[0024] In some embodiments of this application, the air conditioning system further includes: a communication device that is communicatively connected to at least one smart terminal; configured to send a fire warning signal to the smart terminal when the control device receives a fire alarm request.

[0025] The above technical solution has the following advantages or beneficial effects: through the communication device, it can ensure that users and relevant agencies can take measures quickly and effectively reduce the losses caused by the fire.

[0026] Other features and advantages of the present invention will become clearer after reading the detailed embodiments of the invention in conjunction with the accompanying drawings. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a structural diagram of a fire warning device according to some embodiments of the present disclosure;

[0029] Figure 2 This is a structural diagram of a fire warning device according to some embodiments of the present disclosure;

[0030] Figure 3A flowchart of a fire warning device according to some embodiments of the present disclosure;

[0031] Figure 4 A flowchart of a fire warning device according to some embodiments of the present disclosure;

[0032] Figure 5 A flowchart of a fire warning device according to some embodiments of the present disclosure;

[0033] Figure 6 A flowchart of a fire warning device according to some embodiments of the present disclosure;

[0034] Figure 7 A flowchart of a fire warning device according to some embodiments of the present disclosure;

[0035] Figure 8 A flowchart of a fire warning device according to some embodiments of the present disclosure;

[0036] Figure 9 This is a structural diagram of a fire warning device according to some embodiments of the present disclosure;

[0037] Figure 10 This is a structural diagram of a fire warning device according to some embodiments of the present disclosure;

[0038] Figure 11 This is a structural diagram of a fire warning device according to some embodiments of the present disclosure;

[0039] Figure 12 This is a structural diagram of a fire warning device according to some embodiments of the present disclosure;

[0040] Figure 13 This is a structural diagram of a fire warning device according to some embodiments of the present disclosure;

[0041] Figure 14 This is a structural diagram of a fire warning device according to some embodiments of the present disclosure;

[0042] Figure 15 This is a structural diagram of an air conditioning system according to some embodiments of the present disclosure;

[0043] Figure 16 This is a structural diagram of an air conditioning system according to some embodiments of the present disclosure. Detailed Implementation

[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0045] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0046] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "multiple" means two or more.

[0047] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0048] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.

[0049] The following disclosure provides many different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. In addition, examples of various specific processes and materials are provided in this invention, but those skilled in the art will recognize the application of other processes and / or the use of other materials.

[0050] The first aspect of this application is the design and provision of a fire warning device 10.

[0051] In one or more embodiments of this application, such as Figure 1 As shown, the fire alarm device 10 includes a data acquisition unit 101 and a processing unit 102.

[0052] The acquisition unit 101 is configured to acquire hyperspectral image data of the target indoor scene.

[0053] In one or more embodiments of this application, a hyperspectral image of a target indoor scene refers to an image with high spectral resolution acquired in an indoor environment. Hyperspectral images can capture spectral information reflected from an object's surface, covering continuous spectral data from visible light to near-infrared and even wider bands. Unlike traditional RGB images, hyperspectral images can provide spectral information for each pixel across multiple bands, thus enabling a detailed description of the object's properties.

[0054] In one or more embodiments of this application, hyperspectral images are acquired by a hyperspectral camera. The hyperspectral camera can acquire images simultaneously in multiple spectral bands.

[0055] To ensure the accuracy and consistency of hyperspectral images, spectral calibration is required before acquisition to compensate for the optical response of the hyperspectral camera and environmental influences, ensuring that the acquired images reflect true spectral information.

[0056] In one or more embodiments of this application, the installation position of the hyperspectral camera ensures uniform coverage of the target indoor scene. At this installation position, the hyperspectral images acquired by the hyperspectral camera are within the allowable lens distortion range.

[0057] In one or more embodiments of this application, spectral calibration includes white balance calibration.

[0058] White balance calibration is used to ensure that hyperspectral cameras respond consistently to light under different lighting conditions, thereby ensuring accurate color reproduction in images. Hyperspectral cameras need to compensate for different light sources (such as natural light, indoor lighting, etc.) to eliminate the influence of the light source's color temperature.

[0059] Black baseline calibration is used to determine the response value at zero light intensity in a hyperspectral image, that is, to ensure that the hyperspectral camera responds to a signal of zero or near zero in areas with no light or complete light absorption (black areas), in order to compensate for the inherent noise or bias of the hyperspectral camera and ensure that the response of the hyperspectral camera is zero when there is no light.

[0060] The white balance calibration and black reference calibration can be implemented using mature algorithms from existing technologies.

[0061] White balance calibration and black reference calibration address the issues of illumination variation and hyperspectral camera noise, respectively, ensuring the data quality of hyperspectral images, reducing interference from external environmental factors and the hyperspectral camera itself, and enabling hyperspectral images to accurately reflect the spectral information of objects.

[0062] Hyperspectral images are stored in the form of three-dimensional data, i.e., hyperspectral image data.

[0063] In one or more embodiments of this application, the processing unit 102 includes two models: an anomaly detection model 201 and an anomaly post-processing model 202.

[0064] Among them, the anomaly detection model 201 is configured to reconstruct background image data based on hyperspectral image data; perform residual processing on the reconstructed background image data and the original hyperspectral image data to determine whether there is an abnormal region; when there is an abnormal region, the original hyperspectral image data is determined to be an abnormal image, and an abnormal image time series is established.

[0065] The anomaly post-processing model 202 is configured to perform time-series prediction based on the time series of the anomaly images to generate a predicted image sequence; compare the time series of the anomaly images and the predicted image sequence to calculate the similarity; when the similarity meets the pre-set similarity judgment conditions, it is determined that there is a fire hazard in the target indoor scene and a fire alarm request is generated.

[0066] In one or more embodiments of this application, the pre-set similarity determination criteria can be based on the intersection-union ratio (CIU). The higher the CIU, the higher the similarity. A threshold condition can be designed based on the CIU, and the similarity can be judged sequentially to determine whether it meets the pre-set similarity determination criteria.

[0067] Anomaly detection model 201 and anomaly post-processing model 202 work together to detect and predict fire hazards using hyperspectral image data. They employ an unsupervised detection method, eliminating cumbersome data processing and training processes. By analyzing the test data and inferring the detection results, they can be easily deployed and applied. Based on the unsupervised detection process, there are no sample limitations, which can adapt to more emergencies and demonstrate good generalization.

[0068] In one or more embodiments of this application, such as Figure 2 As shown, the anomaly detection model 201 includes a convolutional attention module 301, a Transformer encoder 302, and a Transformer decoder 303.

[0069] In one or more embodiments of this application, the convolutional attention module 301 performs downsampling and attention mechanism processing in the spatial and spectral dimensions to extract and fuse multidimensional features in hyperspectral image data.

[0070] In the convolutional attention module 301, a series of operations are used to compress the hyperspectral image data from a high-dimensional space to a low-dimensional space while retaining key features. The attention mechanism enables the anomaly detection model 201 to focus on the most important parts of the hyperspectral image data and ignore irrelevant information, thereby improving the efficiency and accuracy of feature extraction.

[0071] In one or more embodiments of this application, the Transformer encoder 302 is configured to capture the correlation between sub-blocks based on hyperspectral image segmentation based on a self-attention mechanism and a mask, and to suppress the reconstruction of anomalous features.

[0072] Furthermore, the self-attention mechanism in the Transformer encoder 302 allows the model to consider information from all other sub-blocks when processing each sub-block, thereby better understanding and processing complex relationships in the image. Masking techniques, on the other hand, force the model to focus more on the uncovered parts by obscuring some information, thus improving its sensitivity to anomalous features.

[0073] In one or more embodiments of this application, the Transformer decoder 303 is configured to generate output sub-blocks based on the output of the Transformer encoder 302 through layer-by-layer feature extraction and Agent attention mechanism, and reconstruct background image data based on the output sub-blocks.

[0074] The Agent attention mechanism in the Transformer decoder 303 further optimizes the feature extraction process, enabling the anomaly detection model 201 to generate output sub-blocks more accurately. This ensures that the reconstructed background image data accurately reflects the normal parts of the original image, thereby better highlighting the abnormal areas.

[0075] Through the collaborative work of these three modules, the anomaly detection model 201 can effectively detect and process anomalies in hyperspectral image data, improving the accuracy and reliability of detection.

[0076] In one or more embodiments of this application, the convolutional attention module 301 is configured to perform as follows: Figure 3 The steps shown are as follows:

[0077] Step S101: Perform downsampling operation through depthwise separable convolution to generate input feature map.

[0078] Step S102: Process the input feature map in the spatial and spectral dimensions using a multi-dimensional fusion attention mechanism to obtain the output feature map.

[0079] Depthwise separable convolution significantly reduces computation while preserving key features, ensuring efficient extraction of spatial and spectral information from hyperspectral image data in subsequent processing. Meanwhile, the multidimensional fusion attention mechanism enables the anomaly detection model 201 to focus more on key parts of hyperspectral image data and ignore irrelevant information, thereby improving the efficiency of feature extraction.

[0080] In one or more embodiments of this application, the Transformer encoder 302 is configured to perform, while capturing correlations between sub-blocks segmented from a hyperspectral image based on a self-attention mechanism and a mask, and suppressing the reconstruction of anomalous features, as follows: Figure 4 The following steps are shown:

[0081] Step S201: Input the input sub-blocks based on the segmentation of the output feature map.

[0082] Step S202: Apply linear transformation to extract the query matrix, key matrix, and value matrix.

[0083] Step S203: In the first stage, the dot product is calculated for all sub-blocks using a preset mask to obtain the similarity matrix and the attention weights are calculated; the attention weights are multiplied by the value matrix and summed to reconstruct each input sub-block.

[0084] Step S204: Compare the similarity between the reconstructed sub-block and the input sub-block. When the similarity meets the preset sub-block similarity setting conditions, determine that the corresponding sub-block is an abnormal sub-block.

[0085] Step S205: After identifying the abnormal sub-block, proceed to the second stage. The abnormal sub-block uses a mask to perform anomaly suppression operation, and the background sub-block of the non-abnormal sub-block performs background enhancement operation by combining its own and neighborhood information.

[0086] Through the above steps, the Transformer encoder 302 can effectively capture the correlation between sub-blocks, identify and suppress anomalous features, thereby improving the accuracy and reliability of hyperspectral image data processing.

[0087] In one or more embodiments of this application, the Transformer decoder 303 is configured to perform, when applying the Agent attention mechanism, as follows: Figure 5 The following steps are shown:

[0088] Step S301: Apply linear transformation to extract the query matrix, key matrix, and value matrix;

[0089] Step S302: Perform a pooling operation on the query matrix to generate a query token, and use the query token as a proxy for the query matrix;

[0090] Step S303: Calculate attention based on the query matrix, key matrix, value matrix, and query token.

[0091] First, a linear transformation is applied to extract the query matrix, key matrix, and value matrix. These three matrices are the core components of the self-attention mechanism, used for querying, matching, and reconstructing features, respectively. The query matrix is ​​used to find other sub-blocks related to the current sub-block, the key matrix is ​​used for matching queries, and the value matrix is ​​used for reconstructing features. The query matrix is ​​then pooled to generate a query token, which serves as a proxy for the query matrix. Pooling achieves downsampling; by pooling the query matrix, computation is reduced and key features are extracted, ultimately generating the query token. This query token, acting as a proxy for the query matrix, enables more efficient subsequent attention calculations. Finally, attention is calculated based on the query matrix, key matrix, value matrix, and query token. Specifically, the similarity between sub-blocks is obtained by calculating the dot product of the query token and the key matrix, and the dot product of the query token and the query matrix, thus determining the attention weights. These attention weights are then multiplied and summed with the value matrix to reconstruct each input sub-block, i.e., aggregating global information from the key matrix K and the value matrix V, and subsequently broadcast back to the query matrix Q. This process allows the anomaly detection model 201 to focus on more critical parts, improving the accuracy of feature reconstruction.

[0092] In one or more embodiments of this application, the anomaly detection model 201 is trained using mean squared error loss optimization, including as follows: Figure 6 The following steps are shown:

[0093] Step S401: Calculate the reconstruction error based on the pixel vectors of the hyperspectral image data and the pixel vectors of the reconstructed hyperspectral image data. The reconstruction error reflects the inaccuracies in the reconstruction process and forms the basis for subsequent optimization.

[0094] Step S402: Combine the reconstruction errors to obtain the reconstruction error mapping.

[0095] Step S403: Calculate the adaptive weight value based on the maximum value in the reconstruction error mapping and the difference between the reconstruction error.

[0096] The adaptive weight values ​​take into account the difference between the maximum value in the reconstruction error map and the reconstruction error, thereby dynamically adjusting the weight of each pixel so that areas with larger errors receive more attention.

[0097] Step S404: Combine adaptive weights to obtain adaptive weight mapping.

[0098] Step S405: Calculate the mean squared error loss based on adaptive weight mapping.

[0099] By introducing adaptive weights into the mean squared error loss, pixel-level anomaly suppression is achieved, reducing the impact of stacking effects on the abnormal parts.

[0100] In one or more embodiments of this application, the acquisition unit 101 acquires hyperspectral image data of the target indoor scene and then performs spectral band clustering, the spectral band clustering including, Figure 7 The following steps are shown:

[0101] Step S 501: Stretch the matrix representation of the spectral channels into a vector representation.

[0102] Step S502: Construct the feature matrix using the vector representation of the spectral channels.

[0103] Step S503: Use a clustering algorithm to group the spectral channels together to form several clusters.

[0104] Step S 504: Select a representative channel in each cluster.

[0105] Step S505: Restore the selected representative channel to the image.

[0106] Step S506: Present the restored image representing the channel as input image data, and input the input image data into the processing unit 102.

[0107] Through these steps, the acquisition unit 101 can effectively perform spectral band clustering processing on hyperspectral image data, reduce data redundancy, and improve processing efficiency.

[0108] In one or more embodiments of this application, the anomaly post-processing model 202 is built based on a convolutional gated recurrent unit network.

[0109] In one or more embodiments of this application, the anomaly post-processing model 202 is configured to take an anomaly binary image sequence as input, the anomaly binary image sequence being generated based on the anomaly image output by the anomaly detection model 201.

[0110] Exception post-processing model 202 is also configured to perform, such as Figure 8 The following steps are shown:

[0111] Step S601: Perform time-series prediction on the input abnormal binary image sequence to generate the predicted binary image sequence.

[0112] Step S602: Compare the input abnormal binary image sequence with the temporal prediction output of the abnormal post-processing model 202 and calculate the similarity.

[0113] Step S603: If the similarity between several consecutive hyperspectral image data and the temporal prediction output of the anomaly post-processing model 202 is less than the preset threshold, then it is determined that there is a fire hazard in the target indoor scene.

[0114] Using the above methods, the anomaly post-processing model 202 can further analyze the temporal evolution trend of the abnormal area based on the output of the anomaly detection model 201, accurately judge fire hazards, and improve the timeliness and accuracy of fire early warning.

[0115] In one or more embodiments of this application, the following describes the network architecture of a complete fire alarm device (e.g., Figure 9 As shown in the figure, the introduction can be divided into three stages from a chronological perspective.

[0116] Phase 1: Acquiring and preprocessing hyperspectral image data of the target indoor scene.

[0117] Hyperspectral image data can be affected by various noise sources during the acquisition process. Noise may affect the visual effect of hyperspectral image data and interfere with subsequent analysis, especially the extraction of details from hyperspectral image data, particularly in low reflectivity regions or bands with weak spectral intensity.

[0118] In one or more embodiments of this application, the hyperspectral image data acquired by the hyperspectral camera is denoised to reduce random noise in the hyperspectral image data.

[0119] In one or more embodiments of this application, noise reduction is achieved using the neighborhood pixel averaging method.

[0120] Specifically, for each pixel in the hyperspectral image data, the average value of its neighboring pixels is calculated, and this average value is used to replace the original pixel value. In one or more embodiments of this application, the neighborhood can be set as a 3×3 window; in one or more embodiments of this application, the neighborhood can be set as a 5×5 window. The neighborhood pixel averaging method can effectively reduce random noise, especially high-frequency noise. High-frequency components manifest as rapidly changing pixel values ​​in the spatial domain. When calculating the average value of neighboring pixels, these rapidly changing pixel values ​​are smoothed because the average value approaches the median value of all pixels in the neighborhood. The neighborhood pixel averaging method can be approximated as a low-pass filter that suppresses high-frequency components.

[0121] In one or more embodiments of this application, a smoothing operation is performed on the hyperspectral image data acquired by the hyperspectral camera to reduce high-frequency details in the hyperspectral image data and reduce unnecessary fluctuations in the hyperspectral image data. In particular, when the spectral changes between bands are relatively gentle, the smoothing operation can help highlight the main spectral trends and avoid excessive details and noise.

[0122] In one or more embodiments of this application, Gaussian kernel smoothing is utilized.

[0123] Specifically, a Gaussian kernel is a smoothing filter whose weight distribution conforms to a Gaussian distribution. When performing Gaussian kernel smoothing, a Gaussian kernel size and standard deviation are selected. For each data point in the spectral curve, a weighted average is calculated using the Gaussian kernel, and the calculated weighted average replaces the original data point. The spectral curve is the spectral curve of the hyperspectral image data. At each pixel location, it is a curve composed of spectral information at different wavelengths. The horizontal axis represents different wavelengths, and the vertical axis represents the reflectance or absorptivity at each wavelength. Reflectance refers to the proportion of light reflected by an object's surface, and absorptivity refers to the proportion of light absorbed. Gaussian kernel smoothing smooths the spectral curve. The standard deviation of the Gaussian kernel determines the degree of smoothing; the larger the standard deviation, the more pronounced the smoothing effect.

[0124] Hyperspectral image data contains a large amount of band information. This high-dimensional data increases computational complexity and prolongs training time. Moreover, the bands in hyperspectral image data are dense and highly correlated with adjacent bands, resulting in data redundancy. In view of these two characteristics of hyperspectral image data, in one or more embodiments of this application, spectral band clustering is used to accelerate the training process and reduce data redundancy.

[0125] Specifically, spectral band clustering is an unsupervised learning method that groups similar bands together.

[0126] In one or more embodiments of this application, spectral band clustering includes the following steps:

[0127] Acquire hyperspectral image data.

[0128] In one or more embodiments of this application, the hyperspectral image data is a three-dimensional array; the size of the hyperspectral image data is:

[0129] H×W×C

[0130] Where H represents the height of the hyperspectral image data, W represents the width of the hyperspectral image data, and C represents the number of spectral channels.

[0131] In one or more embodiments of this application, each spectral channel B i (where i represents the i-th spectral channel) can be represented by a matrix of size H×W.

[0132] Spectral channel B i The matrix representation is stretched into a vector of size 1×(H×W).

[0133] Use all spectral channels B i The feature matrix is ​​constructed from the vectors, where the size of the feature matrix is:

[0134] C×(H×W)

[0135] The K-Means clustering algorithm is used to group similar spectral channels together to form several clusters.

[0136] In each cluster, the channel closest to the cluster center is selected as the representative channel.

[0137] Restore the selected representative channel to an H×W image;

[0138] The H×W restored images representing the channels are stitched together into a c×H×W three-dimensional array to obtain the input image data; where represents the number of cluster centers.

[0139] Through this process, the original H×W×C three-dimensional array is compressed and converted into a c×H×W three-dimensional array as input image data, similar bands are grouped together, redundant data is removed, and the spatial information of the image is preserved, which effectively improves the efficiency of subsequent analysis and processing.

[0140] The second stage involves building an anomaly detection model.

[0141] The anomaly detection model is a Transformer-based hyperspectral anomaly detection model, which specifically includes a convolutional attention module, a Transformer encoder, and a Transformer decoder.

[0142] In one or more embodiments of this application, the input image data is first spatially reduced before processing by the convolutional attention module.

[0143] In one or more embodiments of this application, the input image data is spatially reduced by a discount rate.

[0144] Specifically, a discount rate can be set, multiplying each spatial dimension (height H and width W) of the input image data by the discount rate, while keeping the number of spectral channels in the input image data unchanged; the scaled-down image still contains all spectral information, but the spatial resolution is reduced.

[0145] In one or more embodiments of this application, input image data is processed by continuous downsampling operations to reduce the spatial size of the input image data while preserving and extracting important local region features.

[0146] Specifically, downsampling operations are performed using depthwise separable convolution.

[0147] Depthwise separable convolution breaks down the standard convolution operation into depthwise convolution and pointwise convolution. Depthwise convolution performs a convolution operation on each input channel individually, without crossing channels. A depthwise convolution kernel is designed to slide on one channel to generate the same number of output channels, thus reducing the number of convolution kernels and the amount of computation. Pointwise convolution performs a 1×1 convolution operation on the result of depthwise convolution, linearly combining all input channels at each position to finally generate the required number of output channels.

[0148] In one or more embodiments of this application, the kernel size of the depthwise separable convolution is 5×5. A larger kernel can capture a wider range of local features, thus allowing each pixel to represent richer local region features.

[0149] In one or more embodiments of this application, the input image data can be spatially reduced by a discount rate, and then a downsampling operation can be performed by depthwise separable convolution to obtain the input feature map.

[0150] In one or more embodiments of this application, the spatial size of the input feature map is within 100×100, while retaining rich local region features, thereby accelerating the network training process and improving the richness and diversity of feature representation.

[0151] Hyperspectral image data not only contains rich spatial information, but also provides rich spectral information through multidimensional spectral features. To further integrate multidimensional features, a multidimensional fusion attention mechanism is used to calculate the fusion attention of the spatial (width, height) and spectral dimensions, and then added to the feature map.

[0152] In one or more embodiments of this application, the input to the multidimensional fusion attention mechanism is an input feature map, the size of which can be expressed as c×h×w, where h is the height of the input feature map and w is the width of the input feature map.

[0153] In one or more embodiments of this application, such as Figure 10 As shown, the multidimensional fusion attention mechanism includes a first branch, a second branch, and a third branch; the first branch is used to handle attention in the height dimension, the second branch is used to handle attention in the width dimension, and the third branch is used to handle attention in the spectral dimension.

[0154] The first branch first performs a dimensionality transformation, converting the input feature map from c×h×w to a height-dimensional original feature map h×c×w. Then, it performs global pooling on the transformed feature map, obtaining a feature map of size h×1×1. Further dimensionality transformation converts the globally pooled feature map to 1×1×h. A 1×k convolution operation is then performed on the transformed feature map, resulting in a feature map of size 1×1×h. Further dimensionality transformation converts the convolutional feature map to h×1×1. The Sig moid activation function is applied to the transformed feature map to obtain height-dimensional attention weights. These height-dimensional attention weights are then multiplied by the height-dimensional original feature map h×c×w. Finally, dimensionality transformation converts the multiplied feature map back to c×h×w, resulting in the output feature map of the first branch.

[0155] The second branch first performs a dimensionality transformation, converting the input feature map from c×h×w to the original feature map w×h×c in the width dimension. Then, it performs global pooling on the transformed feature map, obtaining a feature map of size w×1×1. Further dimensionality transformation converts the globally pooled feature map to 1×1×w. A 1×k convolution operation is then performed on the transformed feature map, resulting in a feature map of size 1×1×w. This convolution is further transformed to w×1×1. A Sigmoid activation function is applied to the transformed feature map to obtain the attention weights in the width dimension. The attention weights in the width dimension are then multiplied by the original feature map w×h×c in the width dimension. Finally, through dimensionality transformation, the multiplied feature map is converted back to c×h×w, yielding the output feature map of the second branch.

[0156] The third branch first performs global pooling on the input feature map c×h×w to obtain a feature map of size c×1×1; then, through dimension transformation, it converts the globally pooled feature map to 1×1×c; it performs a 1×k convolution operation on the converted feature map to obtain a feature map of size 1×1×c; it then performs another dimension transformation to convert the convolutional feature map to c×1×1; it applies the Sigmoid activation function to the converted feature map to obtain the attention weights in the spectral dimension; and finally, it performs a dot product between the attention weights in the spectral dimension and the input feature map c×h×w to obtain the output feature map of the third branch.

[0157] The output feature maps of the three branches are superimposed, and the average of the superimposed feature maps is calculated to obtain the output feature map of the multidimensional fusion attention mechanism, which is the "small-size feature map" shown in the figure.

[0158] By processing attention across the three dimensions of height, width, and spectrum, multi-dimensional feature information can be captured and fused more comprehensively, ultimately resulting in a holistic feature representation. This accelerates the network training process while improving the quality of the feature representation and thus enhancing model performance.

[0159] In hyperspectral image data, anomalies often exhibit a sparse yet relatively clustered spatial distribution. This means that anomalous regions occupy a small area within the image, but they tend to cluster together. This gives a unique spatial distribution pattern to the anomalous regions, creating a striking contrast with the widely distributed background areas. Therefore, anomaly detection can be achieved by analyzing the presence of anomalies in local image feature detection regions. Furthermore, the output feature map from multidimensional fusion attention can be segmented into non-overlapping sub-patches. The anomaly detection model, through a self-attention mechanism, can capture the correlations between these sub-patches to understand both the background and anomalous features, thereby improving the accuracy of anomaly detection.

[0160] In hyperspectral image data containing anomalies, the background is widely distributed. When using the Transformer encoder to reconstruct hyperspectral image data, the background is relatively easy to reconstruct by learning adjacent features because there is a high correlation between adjacent background features.

[0161] Furthermore, the Transformer encoder suppresses the reconstruction of anomalous features by avoiding learning the self-attention weights of anomalous sub-blocks, thus making the reconstruction results closer to pure background features.

[0162] Because sequence operations are required, the output feature map of the multi-dimensional fusion attention mechanism is further segmented. For example, it is divided into 3×3 non-overlapping input sub-blocks, i.e., input slices (e.g., ...). Figure 9 x1, x i and x NAs shown). Each sub-block is flattened into a vector (e.g. Figure 9 (as shown in Flatten) to compute the attention between these vectors.

[0163] The flattened vector is then fed into the Transformer encoder. The process and network structure of the Transformer encoder are as follows: Figure 9 and Figure 11 As shown.

[0164] The flattened input vector is standardized.

[0165] The standardized vector is transformed by passing it through a linear layer (Linear). The linear layer maps the input vector to a new feature space and is typically used to extract higher-level features.

[0166] An anomaly elimination attention mechanism is applied to process the output of the linear layer.

[0167] The anomaly removal attention mechanism is based on self-attention and masking, and specifically includes the following steps, such as... Figure 12 As shown.

[0168] A linear transformation is applied to the output vector of the linear layer to extract the query matrix (Q), key matrix (K), and value matrix (V).

[0169] In the initial training phase (i.e., the first phase), the Transformer encoder uses masks to calculate the dot product of all sub-blocks to obtain a similarity matrix. Then, the Softmax function is applied to calculate the attention weights; the attention weights are multiplied by the value matrix and summed to reconstruct each sub-block.

[0170] The mask M is a matrix used to adjust certain elements in the similarity matrix, thereby suppressing the attention weights of anomalous sub-blocks. The mask value is typically 0 or negative infinity (-∞) to completely suppress certain similarities. During the initial training phase, each feature block is occluded during computation and needs to be reconstructed using its neighboring feature blocks. Because anomalous sub-blocks (i.e., anomalous parts) have low similarity to their neighboring background sub-blocks, they are difficult to reconstruct using neighboring blocks; while background sub-blocks (i.e., normal parts) are easier to reconstruct from their neighborhood due to their high similarity to surrounding background sub-blocks.

[0171] The similarity between the reconstructed sub-block and the input sub-block is compared. If the reconstructed sub-block has a low similarity to the input block but a high similarity to other sub-blocks, it is considered an anomalous sub-block. The comparison can be performed using mean squared error or cosine similarity methods.

[0172] For the identified anomalous sub-blocks, the anomaly suppression process is continued using a mask.

[0173]

[0174] Attention ano This indicates attention to the abnormal sub-block.

[0175] That is, the mask matrix M is continued to be applied to the calculation of the similarity matrix to suppress the influence of abnormal sub-blocks, so that the attention weights at these positions approach zero, thereby suppressing the influence of abnormal sub-blocks.

[0176] For background sub-blocks, background enhancement is achieved by combining their own information with that of their neighbors.

[0177]

[0178] Attention bg This represents the attention to the background sub-block. A second normalization is performed on the final stable input. This second normalization helps stabilize the training process and improves the model's generalization ability.

[0179] The output of the second normalization is then fed into a multilayer perceptron (MLP). A multilayer perceptron consists of multiple fully connected layers.

[0180] The output of MLP is superimposed with the output that has reached the iteration condition, i.e., residual connection is performed to alleviate the gradient vanishing problem and improve the training effect of the model.

[0181] Figure 13 This is the network architecture of the Transformer decoder. The Transformer decoder can gradually recover the detailed information of hyperspectral image data through layer-by-layer feature extraction. Each layer of processing enhances the expressive power of the features, making the final output image closer to the original image.

[0182] First, the output of the Transformer encoder is used as the input of the Transformer decoder. The output of the Transformer encoder is standardized to ensure stability and consistency.

[0183] The standardized output is fed into the Agent attention network for attention calculation.

[0184] The output of the Agent attention network is superimposed with the output of the Transformer encoder to fuse more feature information.

[0185] The superimposed results are then standardized again.

[0186] The result after re-standardization is fed into a multilayer perceptron (MLP) for nonlinear transformation.

[0187] The output of the MLP is then superimposed with the previous superposition result to further fuse feature information.

[0188] During the encoding process of the Transformer encoder, each part of the reconstructed image is reconstructed based on sub-blocks. The similarity between sub-blocks may lead to a relatively blurry reconstructed image, which is not conducive to the pixel-level hyperspectral anomaly detection process. Therefore, in one or more embodiments of this application, by introducing an Agent attention network, the Transformer decoder is helped to focus on important regions in the image and better recover the details of these regions. The Agent attention network reduces computational complexity by introducing Agent tokens while maintaining efficient attention computation.

[0189] Figure 14 A network framework for Agent Attention Networks.

[0190] A linear transformation is applied to the standardized output to extract the query matrix (Q), key matrix (K), and value matrix (V). The query matrix Q is then pooled to generate a query token A. For example, as shown in the figure, the query matrix Q has a dimension of N×d, the key matrix K has a dimension of N×d, the value matrix V has a dimension of N×d, and the query token A has a dimension of n×d.

[0191] A is an agent token obtained from the query matrix Q through a pooling strategy, which essentially acts as a proxy for the query matrix Q.

[0192] Figure 14 The attention calculation process shown can be represented as:

[0193] Attention(Q,A,K,V)=softmax(QA T softmax(AK) T V

[0194] =φq(Q)φk(K) T V

[0195] Where φq(Q)=softmax(QA) T ), φk(K)=softmax(AK) T ) T MatMul is a matrix dot product that aggregates global information from the key matrix K and the value matrix V, and then broadcasts it back to the query matrix Q.

[0196] The output of the Transformer decoder is further subjected to convolution and sigmoid operations to generate output sub-blocks, such as... Figure 9 The output slice shown

[0197] By outputting slices, a reconstructed background image can be created, that is, an image without anomalies.

[0198] In anomaly detection tasks using hyperspectral image data, the goal is to achieve pixel-level anomaly detection through a network model. To achieve this, mean squared error (MSE) loss is used to optimize network training. Since the input consists of overlapping hyperspectral image data patches, when restoring the original size, the stacking effect may cause anomalies to be difficult to distinguish from the background. Therefore, adaptive weights are introduced to achieve pixel-level anomaly suppression on the hyperspectral image data patches.

[0199] The calculation process for reconstruction error is as follows:

[0200]

[0201] Where x i,j , Let e ​​represent the pixel vector of the input hyperspectral image data at spatial location (i, j) (e.g., the input sub-block of the Transformer encoder) and the pixel vector reconstructed by the network (e.g., the output sub-block of the Transformer decoder), respectively. i,j This indicates the reconstruction error.

[0202] The reconstruction errors are combined to obtain the reconstruction error mapping E:

[0203] E = [e 1,1 , ...e 1,w ;e 2,1 , ...e 2,w ;…;e h,1 , ...e h,w ]

[0204] The calculation process for adaptive weights is as follows:

[0205] w i,j =max(E)-e i,j

[0206] W = [w 1,1 , ...w 1,w ;w 2,1 , ...w 2,w ;…;w h,1 , ...w h,w ]

[0207] Where max(E) represents the maximum value in the reconstruction error E; w i,j This represents the maximum value of the reconstruction error E minus e. i,j The calculated adaptive weight values, W, represent the adaptive weight mapping obtained by combining the adaptive weight values. The adaptive weight mapping is then applied to the MSE loss.

[0208]

[0209] Since the anomaly detection model's network is end-to-end, the input hyperspectral image data is iterated through multiple rounds to output reconstructed pure background hyperspectral image data (in which anomalies have been removed). Finally, the pure background hyperspectral image data and the input hyperspectral image data are subjected to residual processing to obtain the anomaly detection result. For example, when the residual exceeds a preset threshold, an anomaly can be considered to exist.

[0210] In practice, when the temperature in an area with fire hazards changes abruptly, obvious abnormal areas will appear in the residual results. At this time, the input hyperspectral image data is judged as an abnormal image and output.

[0211] When detecting fire hazards, it is not only necessary to detect abnormal images, but also to post-process the abnormal images to determine whether an alarm should be triggered or other corresponding controls should be executed.

[0212] The Transformer-based hyperspectral anomaly detection method provided in this application also includes a third stage, namely the anomaly post-processing stage.

[0213] In the third stage, an anomaly post-processing model based on a Convolutional Gated Recurrent Unit (ConvGRU) network is constructed.

[0214] The Convolutional Gated Recurrent Unit (CGRU) network is a neural network that combines convolution operations and gated recurrent units. It consists of multiple consecutive ConvGRU units. Each unit processes one time step, capturing the spatiotemporal features of anomalous regions frame by frame.

[0215] The training data for the anomaly post-processing model consists of a continuously changing sequence of binary fire images. This sequence is formed by arranging images in chronological order; the images are binary representations of the fire scene converted using image processing techniques. The fire binary image sequence is used to train the anomaly post-processing model, which learns how to predict changes in the images.

[0216] The abnormal images output by the anomaly detection model are binarized to obtain a sequence of abnormal binary images.

[0217] An abnormal binary image sequence is input into a trained anomaly post-processing model. After convolution, standardization, and ReLU activation function operations, the anomaly post-processing model performs temporal prediction on the input abnormal binary image sequence and generates a predicted binary image sequence.

[0218] The similarity is calculated by comparing the input sequence of anomalous binary images with the time-series prediction output of the anomalous post-processing model.

[0219] If the similarity between several consecutive images (e.g., 5 or more) and the temporal prediction output of the anomaly post-processing model is less than a preset threshold, then it is determined that there is a fire hazard in the target indoor scene.

[0220] When a fire hazard is detected in the target indoor scene, a fire alarm request is generated.

[0221] The second aspect of this application provides an air conditioning system 1, such as Figure 15 As shown, the air conditioning system 1 includes an air conditioning device 40, which can guide the flow of air in the target indoor scene or guide outdoor air into the target indoor scene.

[0222] The air conditioning system 1 also includes a fire warning device 10, which is described in detail in the instruction manual and accompanying drawings, and will not be repeated here.

[0223] The air conditioning system 1 also includes a control device 50, which is configured to trigger the air conditioning device 40 to start or stop guiding the flow of air in the target indoor scene, or to guide outdoor air into the target indoor scene, when a fire alarm request is received.

[0224] For example, upon receiving a fire alarm request, the air conditioning unit 40 is triggered to shut off to prevent the fire from spreading further or to accelerate the spread of smoke to other rooms, endangering personnel safety; or after a fire occurs, it enters a specific ventilation mode, such as automatically guiding airflow under controllable fire conditions to help quickly expel smoke from the room, reduce the impact of smoke on indoor air quality, and increase escape time.

[0225] In one or more embodiments of this application, when a fire alarm request is cleared, an air purification function can be automatically activated to help remove residual smoke and harmful gases from the air and restore the indoor environment to a healthy state.

[0226] The air conditioning system 1, by integrating an air conditioning unit 40, a fire alarm device 10, and a control device 50, can automatically trigger corresponding air conditioning operations upon receiving a fire alarm request. These operations may include shutting down the air conditioning unit 40 to prevent the spread of fire, or entering a specific ventilation mode to quickly remove smoke, thereby effectively mitigating the impact of the fire on the indoor environment, increasing escape time, and ensuring personnel safety. Furthermore, after the fire alarm is cleared, the system can automatically activate its air purification function to help remove residual smoke and harmful gases, quickly restoring the indoor environment to a healthy state, thus providing an intelligent emergency response; and providing an environmental restoration mechanism upon alarm clearance.

[0227] like Figure 16 As shown, the air conditioning system 1 also includes a communication device 60, which is communicatively connected to at least one smart terminal; it is configured to send a fire warning signal to the smart terminal when the control device 50 receives a fire alarm request.

[0228] For example, upon receiving a fire alarm request, a fire warning signal is sent to a smart terminal (such as a mobile phone). The communication device 60 can also connect to the smart terminals of public service institutions such as communities, property management companies, and fire departments, and send fire warning signals to the smart terminals of these public service institutions to request support.

[0229] The communication device 60 ensures that users and relevant organizations can take swift action to effectively reduce losses caused by the fire.

[0230] The control device 50 and / or communication device 60 can be implemented by the central controller of the central air conditioning system.

[0231] In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.

[0232] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A fire warning device, characterized in that, include: The acquisition unit is configured to acquire hyperspectral image data of the target indoor scene. Its characteristic is that it further includes: The processing unit is equipped with: An anomaly detection model is configured to reconstruct background image data based on the hyperspectral image data; perform residual processing on the reconstructed background image data and the original hyperspectral image data to determine whether anomaly regions exist; if anomaly regions exist, determine that the original hyperspectral image data is an anomalous image, and establish an anomalous image time series; and An anomaly post-processing model is configured to perform time-series prediction based on the anomaly image time series to generate a predicted image sequence; compare the anomaly image time series and the predicted image sequence to calculate similarity; and when the similarity meets a pre-set similarity judgment condition, determine that there is a fire hazard in the target indoor scene and generate a fire alarm request.

2. The fire warning device according to claim 1, characterized in that, The anomaly detection model includes: The convolutional attention module is used to downsample and perform attention mechanism processing in the spatial and spectral dimensions to extract and fuse multidimensional features in hyperspectral image data; The Transformer encoder is configured to capture the correlation between sub-blocks based on hyperspectral image segmentation and masking, and to suppress the reconstruction of anomalous features. The Transformer decoder is configured to generate output sub-blocks based on the output of the Transformer encoder through layer-by-layer feature extraction and Agent attention mechanism, and reconstruct background image data based on the output sub-blocks.

3. The fire warning device according to claim 2, characterized in that, The convolutional attention module is configured as follows: The input feature map is generated by downsampling through depthwise separable convolution. The input feature map is processed in both spatial and spectral dimensions using a multidimensional fusion attention mechanism to obtain the output feature map.

4. The fire warning device according to claim 3, characterized in that, The Transformer encoder is configured to perform the following steps when capturing correlations between sub-blocks derived from hyperspectral image segmentation based on a self-attention mechanism and masking, and suppressing the reconstruction of anomalous features: The input is a sub-block segmented based on the output feature map; Apply linear transformations to extract the query matrix, key matrix, and value matrix; In the first stage, the dot product is calculated for all sub-blocks using a preset mask to obtain the similarity matrix and calculate the attention weights; Each input sub-block is reconstructed by multiplying the calculated attention weights by the value matrix and summing the results. Compare the similarity between the reconstructed sub-block and the input sub-block. If the similarity meets the preset sub-block similarity setting conditions, the corresponding sub-block is determined to be an abnormal sub-block. After identifying the abnormal sub-blocks, the process enters the second stage. The abnormal sub-blocks use masks to suppress anomalies, while the background sub-blocks of the non-abnormal sub-blocks combine their own and neighboring information to enhance the background.

5. The fire warning device according to claim 4, characterized in that, The Transformer decoder is configured to perform the following steps when the Agent attention mechanism is applied: Apply linear transformations to extract the query matrix, key matrix, and value matrix; The query matrix is ​​pooled to generate query tokens, and the query tokens are used as proxies for the query matrix. Attention is calculated based on the query matrix, key matrix, value matrix, and query token.

6. The fire warning device according to claim 5, characterized in that, The anomaly detection model is trained using mean squared error loss optimization, including: The reconstruction error is calculated based on the pixel vectors of the hyperspectral image data with spatial location and the pixel vectors of the reconstructed hyperspectral image data. The reconstruction errors are combined to obtain the reconstruction error mapping; The adaptive weight value is calculated based on the maximum value in the reconstruction error mapping and the difference between the reconstruction error; The adaptive weights are combined to obtain the adaptive weight mapping; The mean squared error loss is calculated based on the adaptive weight mapping.

7. The fire warning device according to any one of claims 1 to 6, characterized in that, After acquiring hyperspectral image data of the target indoor scene, the acquisition unit performs spectral band clustering, including: Stretch the matrix representation of the spectral channels into a vector representation; A feature matrix is ​​constructed using the vector representation of the spectral channels; Clustering algorithms are used to group spectral channels together to form several clusters; Select a representative channel within each cluster; Restore the selected representative channel to the image; The restored image representing the channel is presented as input image data, and the input image data is input to the processing unit.

8. The fire warning device according to claim 7, characterized in that, The anomaly post-processing model is built on a convolutional gated recurrent unit network. The anomaly post-processing model is configured to take an anomaly binary image sequence as input, and the anomaly binary image sequence is generated based on the anomaly image output by the anomaly detection model; The anomaly post-processing model is also configured to perform the following steps: Perform temporal prediction on the input abnormal binary image sequence to generate the predicted binary image sequence; The similarity is calculated by comparing the input sequence of anomalous binary images with the time-series prediction output of the anomalous post-processing model. If the similarity between several consecutive hyperspectral image data and the temporal prediction output of the anomaly post-processing model is less than a preset threshold, then it is determined that there is a fire hazard in the target indoor scene.

9. Air conditioning system, include: At least one air conditioning device, which can guide the flow of air in the target indoor scene or guide outdoor air into the target indoor scene; Its features are, Also includes: The fire warning device as described in any one of claims 1 to 7; Also includes: A control device configured to, upon receiving the fire alarm request, trigger the air conditioning device to start or stop guiding the flow of air in the target indoor scene, or to guide outdoor air into the target indoor scene.

10. The air conditioning system according to claim 9, characterized in that: Also includes: A communication device, which is communicatively connected to at least one smart terminal; configured to send a fire warning signal to the smart terminal when the control device receives the fire alarm request.