# Efficient and Secure Management of Medical Data Sharing Based on Blockchain Technology
## 5 Experiments
### Discussion  
During the data provenance experiments, we did not take into account constraints for provenance. Now, let us qualitatively analyze data provenance with constraints. Due to factors such as network, operators, and latency, medical and operational behaviors data on the blockchain are not stored in a strictly sequential order. Therefore, conducting provenance within a specific block range or time interval may not yield complete results. For example, when conducting provenance for data \(d\) with given constraints \([f,t]\), if data \(d\) is not within the range \([f,t]\) but there are some medical data related to \(d\) within \([f,t]\), tracking or tracing solely within \([f,t]\) will not yield the desired results. Consequently, it is necessary to first obtain the complete provenance results from the entire blockchain and then filter them based on the constraints \([f,t]\). The primary difference between constrained and unconstrained provenance lies in the final filtering step. Compared to the cost of data provenance process, the time taken for filtering based on \([f,t]\) can be negligible. As a result, constrained and unconstrained data provenance have almost similar efficiencies.  
In the above experiments, although the DAG-based methods are much better than the naive method in terms of TPS, the DAG-based methods require additional storage space to store the forward and backward DAG files and need to load the DAG from the file into memory. They also need to store the HASH value of the DAG file as a transaction on the blockchain for anti-tampering verification. Therefore, for applications with low TPS requirements and few forward-tracking queries, the naive method may be more suitable.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Size** & **Method** & **Path 1** & **Path 2** & **Path 3** & **Path 4** & **Path 5** & **Path 6** & **Path \(\geq\) 7** \\ \hline \multirow{3}{*}{200,000} & naive-backward & 537.20 & 508.93 & 443.14 & 312.97 & 223.08 & 124.46 & 50.20 \\  & DAG-forward & 21,099.91 & 20,076.28 & 19,534.87 & 16,343.04 & 10,042.84 & 41,232.02 & 1066.23 \\  & DAG-backward & 21,767.52 & 20,593.08 & 19,829.466 & 16,116.035 & 9953.22 & 4008.06 & 1089.26 \\ \hline \multirow{3}{*}{400,000} & naive-backward & 531.39 & 498.12 & 437.53 & 305.24 & 204.74 & 114.52 & 45.02 \\  & DAG-forward & 21,218.64 & 19,998.81 & 19,589.63 & 15,801.44 & 9001.27 & 3766.84 & 940.39 \\  & DAG-backward & 21,612.27 & 20,165.35 & 19,634.55 & 15,822.13 & 9093.49 & 3733.99 & 947.36 \\ \hline \multirow{3}{*}{600,000} & naive-backward & 528.04 & 495.95 & 430.63 & 298.58 & 217.45 & 108.64 & 47.17 \\  & DAG-forward & 19,896.56 & 19,086.33 & 18,996.92 & 15,323.47 & 8705.18 & 3518.66 & 890.32 \\  & DAG-backward & 20,925.02 & 19,696.81 & 18,889.35 & 15,082.45 & 8654.32 & 3543.23 & 886.29 \\ \hline \multirow{3}{*}{800,000} & naive-backward & 520.78 & 492.86 & 426.29 & 294.68 & 210.71 & 106.74 & 46.12 \\  & DAG-forward & 20,213.68 & 19,754.32 & 18,765.41 & 15,487.98 & 89,612.38 & 3657.28 & 904.36 \\ \cline{1-1}  & DAG-backward & 20,348.64 & 19,801.40 & 18,800.51 & 15,501.67 & 9045.37 & 3701.33 & 919.26 \\ \hline \multirow{3}{*}{1,000,000} & naive-backward & 510.49 & 490.21 & 428.46 & 296.65 & 200.87 & 103.08 & 45.32 \\ \cline{1-1}  & DAG-forward & 20,815.98 & 19,563.42 & 18,654.32 & 15,032.18 & 8643.24 & 3523.60 & 865.47 \\ \cline{1-1}  & DAG-backward & 19,981.06 & 19,032.77 & 18,543.39 & 15,163.24 & 8732.18 & 3543.61 & 870.96 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Experimental results of data tracing with different sizes and path lengths.  
For large-scale data tracing applications, the use of DAG-based methods is necessary to meet performance requirements. In subsequent research, we will improve the data storage and verification methods in the DAG and comprehensively improve the data tracking and tracing methods based on the DAG.