# Deduplication-Aware Healthcare Data Distribution in IoMT
## 4 Proposed Solution
The identification of the gathered data enables the recognition of the source device, and then the values are stored according to the patients or users for further evaluation. This procedure also aids in maintaining records and in the appropriate generation of alarms in the event of an emergency. Doctors and nurses can utilize this history to evaluate patients' health. In this case, a cost-effective method is employed at the sink node, utilizing the CDC procedure for data deduplication. The procedure starts by discovering a breakpoint or pivot to establish a window of a fixed size. Subsequently, a window of variable size is created by adding another breakpoint, a threshold-sized window; ultimately, this results in a large data chunk that increases the deduplication performance. The usefulness of this procedure relies on maintaining a satisfactory size of window _win_s_ and on incremental chunking (IC). We consider IC to limit the chunk size in which the IC value is greater than w. Conversely, if IC1 is lower than w, the system checks a second-level delimiter \(R_{B}\) to capture extra bits and generate a larger IC2, thereby expanding the total length of the variable size of the window. The Delimiter-Based Incremental Chunking Algorithm (DICA) presents a chunking mechanism that involves fixed-size and variable-sized chunks, as elaborated in Algorithm 1. It provides the step-by-step details of the cut-point procedure. It initiates with an iteration starting from index k and ends when the string length ends. The fixed-length chunk is denoted as \(List_{Chunk}[i][0]=k+1\), where \(List_{Chunk}\) denotes the lists of both types of chunks \begin{table}
\begin{tabular}{l l} \hline \hline
**Symbol** & **Explanation** \\ \hline _win\_s_ & Length of window \\ \(K\) & Breakpoint \\ Readings & Input string \\ _sLen_ & Length of string \\ \(p\), \(q\) & Data values at instance of loop \\ ON HH & Incremental chunking \\ \(R_{A}\) & Delimiters used for integration of information received by sensors \\ \(R_{B}\) & Delimiters used between joined data of many patients \\ \( readings\_{br\_{s\_len}}[]\) & Break string by \(R_{A}\) \\ \( readings\_{br\_{s\_len}}[]\) & Break string by \(R_{B}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: List of symbols used. incremented by index I, and index 0 indicates the starting index of the chunk, whereas 1 represents the ending index, which is calculated by adding the fixed-length chunk size FLC_size. The starting index of IC is only one index after the fixed chunk. The ending index of IC is obtained as per the function Data_Chunking_BreakPoint (\(k\), \(sLen\)), which takes index \(k\) and string length \(sLen\) as input. The function returns the ending index of the IC. At the start of the function, it extracts a substring (\(k\), \(sLen\), readings), where k is the starting index and \(sLen\) is the ending index, to choose from the main string readings. The s_readings is split into two string tokens, and they are saved into an array named \(readings\_brs\_len1\)]. Afterward, the algorithm checks the size of the initial token to determine whether it is less than or equal to the max_sized_chunk. If this condition is met, it further checks whether the data size is larger than or identical to \(win\_s\). If this holds true, the algorithm returns the size of the chunk. If the chunk is smaller in size than \(win\_s\), a large data chunk will be created by finding the next value index of \(R_{A}\) and allotting this index to k. In this way, it continues to increase the chunk size until it exceeds \(win\_s\). ```
Input: Input string: readings, data length: \(sLen\) Output: List of chunks \(List_{Chunk}\) as per appropriate breakpoint \(k\)  Presumed information: size of window \(win\_s\), max_sized_chunk
1. Set \(k\) as \(-1\)
2. While\(k\) <\(sLen\)do
3. \(List_{Chunk}[i][0]=k+1\)
4. \(List_{Chunk}[i][1]=k=k+FLC\_size\)
5. \(List_{Chunk}[i+1][0]=k+1\)
6. \(k\) = Function Data_Chunking_BreakPoint (\(k\), \(sLen\))
7. \(List_{Chunk}[i+1][1]=k\)
8. End While
9.