# Cloud Computing Based on Computational Characteristics for Disaster Monitoring
## 3 Cloud Computing Model for Disaster Monitoring
### Application of MapReduce for Disaster-Monitoring Model
In the process of transforming remote-sensing data into information, many processing modules are reused. According to the requirements of the disaster-monitoring application, data processing can be combined by multiple processing modules, which provides the possibility for rapid social customization of disaster-monitoring applications. To write an effective distributed parallel program for remote-sensing image-processing algorithms, several necessary steps should be followed: determine the algorithm type; analyze which algorithms can use distributed computing with Map jobs and which need aggregation jobs using Reduce jobs; determine the key/value pairs mapping of the input and output; and finally generate the corresponding distributed computing model. Taking a vegetation drought monitoring model as an example, when writing its MapReduce code, we first determine that it can consist of several steps. Vegetable drought monitoring could be performed by first extracting band data of the image, computing the index, detecting drought conditions, and finally clustering the segments. Analyzing the computational characteristics of these algorithms (see Figure 1), we can see that Map functions carry out distributed index calculations and detect drought conditions, and Reduce functions merge the distributed data and provide visualization. For example, when writing cloud computing code for calculating anomaly water index (AWI) values, the appropriate cloud computing template for calculation is first selected. As shown in Figure 1, AWI calculations are characterized by purely numerical calculations. The calculation of each pixel does not depend on pixels in other spectral bands, so we choose the \"numerical calculation\" computing model here for processing and determining the key/value pairs of the algorithm as shown in Algorithm 6. Therefore, the key to MapReduce computing in parallel lies in how the algorithm is mapped to simple Map and Reduce phases. Finally, the distributed parallel program is compiled and run. ```
0: the serialized remote sensing data. 0: Intermediate results for the next job input. /* key1 = Filename; value1 = NDWI(x,y) */
1:functionMapper(key1, value1)
2:deserializevalues1 into metadata and f(x, y);
3:for all itemf(x, y)do
4:AWI(x,y) = NDWI(x,y) - AvgNDWI(x,y);
5:endfor
6: key2 = key1; value2 = serialize(metadata, AWI(x,y));
7:output(key2, value2);
8:endfunction
```

**Algorithm 6** The cloud computing model for anomaly water index (AWI)In this section, based on the method proposed in this paper, five typical disaster-monitoring models--aerosol optical thickness inversion (AOT) model, dust storm monitoring model, and vegetation drought monitoring model, Moderate-resolution Imaging Spectroradiometer (MODIS) flood-monitoring model and synthetic aperture radar (SAR) flood-monitoring model--are implemented in this paper as use cases, as shown in Table 1. The algorithms involved in these five disaster-monitoring models are also shown in Table 1. These represent the five types of computing model, which are simple arithmetic, iterative equation, and multi-step complex calculations. Table 2 shows the computational types corresponding to these algorithms. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Typical Disaster-Monitoring Models** & **Model Description** & **Algorithm Involved** & **Computational Complexity** \\ \hline \hline \multirow{6}{*}{Vegetation drought monitoring model} & & Band data extraction & \\  & & NDWI & \\  & It was established based & AWI & \\  & on the anomaly water & AvgNDWI & \\  & index (AWI model) [43]. & Mosaic & \\  & & Colorization & \\  & & Visualization & \\  & & Format conversion & \\ \hline \hline \multirow{6}{*}{MODIS flood-monitoring model} & Water information & Mosaic & \\  & extracted from optical & Image segmentation & \\  & images of MODIS data & Geometric correction & \\  & using NDVI (normalized & NDVI & \\  & difference vegetation & Colorization & \\  & index) [44]. & Visualization & \\  & & Format conversion & \\ \hline \hline \end{tabular}
\end{table}