# Efficient Multi-Source Anonymity for Aggregated Internet of Vehicles Datasets
## 4 Algorithms
Then, the loop is entered until \(AT=\emptyset\). In the loop, if the number of records is less than \(k\) or the distinct domain value of a QI is less than \(d\), the loop is stopped. Lines 15-18 iterate through the sorted data and obtain record \(r\) from dataset \(AT\). The loop determine whether the set \(Records\) satisfies the condition of anonymity. If this condition is satisfied, the group is anonymized by generalizing the QI values. An anonymized equivalence class is generated. In the last step, anonymized values are incorporated into the set \(AT^{\prime}\). The ultimate output is \(AT^{\prime}\), which encompasses all anonymized records that adhere to anonymity requirements \(k\) and \(d\). The computational overhead of this algorithm is \(O(d)\), which ensures its efficiency. The I/O cost is linear. Algorithm 3 shows the multi-source (\(k\),\(l\),\(d\))-anonymity algorithm. The algorithm inputs the original aggregated dataset \(AT\) and anonymity requirements \(k\), \(l\), and \(t\). First, it defines  
Figure 6: Example of Hilbert curve for postcode and age attributes. Figure 7: Taxonomy tree of country attribute. the EIs, QIs, and SAs. Subsequently, the EIs are deleted to satisfy the requirements of anonymization. The term \(d_{QI}\) denotes the number of QIs. _Domains_ is a set containing domain values of the QIs. Lines 5-7 obtain the domain values. The \(DOMAIN\) function obtains all the domain values of \(QI_{i}\). \(SADomain\) is the domain value of the \(SA\). _Curve_ implements the mapping from \(d_{QI}\)-D to 1-D using the Hilbert transform. The records are sorted according to their SA values and assigned to m domains based on the sensitive attribute value of the \(SA\) domain. Let \(F\) be the set of the first records in each bucket of \(H\). Then, the loop is entered until \(AT=\emptyset\). In the loop, if the number of records is less than \(k\) or the distinct domain value of a QI is less than \(d\), the loop stops. Lines 18-21 iterate through the sorted data and take the record \(r\) from the dataset \(AT\). The loops then determines whether the set _Records_ satisfies the condition of (\(k\),\(d\))-anonymity. In addition, if the distinct \(SA\) values of this group are less than \(l\), another loop continues. Lines 22-35 get records with different \(SA\) values and the minimum \(curvePoint\) in \(F\). After adding records with different \(SA\) values, if the condition of this group is satisfied, the values are anonymized by generalizing the QIs. The anonymized equivalence class is created, and, ultimately, the output \(AT^{\prime}\) includes all anonymized records that meet the anonymity requirements \(k\), \(d\), and \(l\). With a computational overhead of \(O(d)\), the method proves to be efficient. Given that the input dataset \(AT\) is ordered, the proposed approach requires only a single pass through the data. The I/O cost is linear. **Input:**\(AT\), \(k\), \(d\)  
**Output:**\(AT^{\prime}\)  
```
1:\(define\ E1,QI,SA\) attributes
2:delete \(E1\) attributes from \(AT\)
3:\(d_{QI}=number\ of\ Q1\) attribute
4:\(Domains=\{\}\)
5:for\(i=0\)to\(d_{QI}\)do
6:\(domValues=DOMAIN(Q_{l})\)
7:\(Domain_{i}.addAll(domValues)\)
8:endfor
9:\(Curve\gets Hilbert(Domains,d_{QI})\)
10:while\(|AT|\
eq\emptyset\)do
11:if\(|AT|<=k\) or distinct domain value of \(QI<d\)then
12: Break
13:endif
14:\(Records=\{\}\)
15:while\(|Records|<k\) and distinct domain value of \(QI<d\)do
16:\(r=Curve.nextPoint()\)
17:\(Records.add(r)\)
18:endwhile
19:\(anonymized(Records)\)
20:\(AT^{\prime}.addAll(Records)\)
21:endwhile
22:return\(AT^{\prime}\)
```  
**Algorithm 2** The multi-source (\(k\),\(d\))-anonymity algorithm.