## 4 Methodology
### Re-Ddpm  
During on-site data processing, it was found that the information of the feed-inlet and furnace-wall parts does not play a key role in combustion state recognition. In the training of the recognition network, the identical feed inlet and furnace wall reduce the network's focus, thereby making the network pay more attention to the important flame combustion area and improving recognition accuracy. Moreover, generating diversity in non-critical parts such as the feed inlet and furnace wall may lead to significant deviations between the generated data and actual on-site data, resulting in decreased combustion state recognition accuracy. Therefore, the data generation method needs to be optimized, allowing the DDPM to achieve partial redrawing so that the generated data better match the actual situation. The existing local redrawing method [28] adds a mask to the areas of the initial image that need to be redrawn, allowing the DDPM to generate only within the masked area while keeping the rest of the image unchanged. This local redrawing method focuses solely on the feature distribution within the redrawn area, without considering the feature distribution relationship between the redrawn area and other regions. This results in a very noticeable disconnection at the boundaries between the redrawn area and other regions, causing the redrawn image to significantly deviate from the real data. Therefore, this paper redesigns the local redrawing method and modifies the network's input to achieve local redrawing that better aligns with real data. First, the image mask is also used as input. Then, the noise level of the initial image is increased to the required noise level, and the denoising diffusion process is manipulated as follows (the algorithm is shown in Figure 6):  
* In each step, the denoising step is first perorfmed to obtain a less noisy foreground, which is denoted as \(Z_{t-1,fg}\).
* Simultaneously, add noise (\(Z_{init}\)) is added to the current noise level to obtain a noisy background (\(Z_{t-1,bg}\)).
* Then, the adjusted mask (\(m\)) is used to blend \(Z_{t-1,fg}\) and \(Z_{t-1,bg}\), denoted as \(Z_{t-1,fg}\odot m+Z_{t-1,bg}\odot(1-m)\), to produce the image for the next denoising step.  
Figure 5: Combustion state detection method for cement rotary kilns.  
Figure 6: RE-DDPM.  
The method proposed in this article blends masked and unmasked regions with the same noise level during the training process. Therefore, the network focuses on the distribution of data in the entire image. In contrast, existing local redrawing methods only train the masked redrawn parts, thereby neglecting the relationship between the redrawn and non-redrawn parts in the data distribution. Compared with existing methods (such as variational autoencoders and generative adversarial networks), the images generated by the proposed method are more realistic and more in line with human perception.  
Additionally, this paper improves the network's attention mechanism by adding self-attention mechanisms to the 32 \(\times\) 32, 16 \(\times\) 16, and 8 \(\times\) 8 layers, not just the 16 \(\times\) 16 layer. This allows the network to focus on deeper features of the image, such as flame textures and color gradients. As a result, the quality of data generation is improved.