incognito
Class Incognito_L

java.lang.Object
  extended by anonymizer.Anonymizer
      extended by incognito.Incognito_L

public class Incognito_L
extends Anonymizer

Implementation of the l-diversity privacy principle based on the Incognito anonymization algorithm. For details on l-diversity, please refer to the following paper:

 @inproceedings{lDiversity,
 author = {Daniel Kifer and Johannes Gehrke},
 title = {l-Diversity: Privacy Beyond k-Anonymity},
 booktitle = {In ICDE},
 year = {2006},
 pages = {24}
 }
 
The paper discusses anonymization through generalization (as opposed to generalization with suppression). That's why, unlike our Incognito implementation which allows suppression, this implementation of Incognito disallows suppression.

Apart from this minor change, the only difference with the original Incognito algorithm is the different privacy definition (i.e., various l-diversity instantiations).


Field Summary
private  LatticeManager man
          Lattice manager that controls how the generalization lattice is traversed
 
Fields inherited from class anonymizer.Anonymizer
anonTable, conf, eqTable, sqlwrapper, suppressionThreshold
 
Constructor Summary
Incognito_L(Configuration conf)
          Class constructor
 
Method Summary
 void anonymize()
          Anonymizing the input.
 void changeLDiversityRequirement(double newLvalue)
          Overwrites the privacy parameter l
 void changeLDiversityRequirement(double newLvalue, double newCvalue)
          Overwrites the privacy parameter l
protected  AnonRecordTable createAnonRecordsTable(java.lang.String tableName)
          Create anonRecords table
protected  EquivalenceTable createEquivalenceTable(java.lang.String tableName)
          Create equivalence table
private  void generalize(LatticeEntry root)
          Generalizes the original table according to a lattice entry and sets the result for the generated table as anonymous or not.
protected  void insertTupleToAnonTable(java.lang.String[] vals, long eid)
          Insert a tuple to the anonRecords table
protected  long insertTupleToEquivalenceTable(java.lang.String[] vals)
          Insert a tuple to the equivalence table
 boolean satisfiesPrivacyDef(AnonRecordTable table)
          Checks whether the parameter table satisfies the privacy definition (in this case, some l-diversity instantiation)
private  void selectAnonymization(java.util.LinkedList<LatticeEntry> anons)
          Simply select the anonymization that yields the maximum number of distinct equivalences
 
Methods inherited from class anonymizer.Anonymizer
anonymizeDataset, anonymizeDataset, isReadyForSuppression, main, outputResults_Anatomy, outputResults_GenVals, outputResults_GenValsDist, outputResults, readData, suppressEquivalences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

man

private LatticeManager man
Lattice manager that controls how the generalization lattice is traversed

Constructor Detail

Incognito_L

public Incognito_L(Configuration conf)
            throws java.lang.Exception
Class constructor

Parameters:
conf - Configuration instance
Throws:
java.lang.Exception
Method Detail

changeLDiversityRequirement

public void changeLDiversityRequirement(double newLvalue)
Overwrites the privacy parameter l

Parameters:
newLvalue - New value of l

changeLDiversityRequirement

public void changeLDiversityRequirement(double newLvalue,
                                        double newCvalue)
Overwrites the privacy parameter l

Parameters:
newLvalue - New value of l
newCvalue - New value of c

createEquivalenceTable

protected EquivalenceTable createEquivalenceTable(java.lang.String tableName)
Create equivalence table

Specified by:
createEquivalenceTable in class Anonymizer
Parameters:
tableName - Name of the table
Returns:
A new equivalence table

createAnonRecordsTable

protected AnonRecordTable createAnonRecordsTable(java.lang.String tableName)
Create anonRecords table

Specified by:
createAnonRecordsTable in class Anonymizer
Parameters:
tableName - Name of the table
Returns:
A new anonymization records table

insertTupleToEquivalenceTable

protected long insertTupleToEquivalenceTable(java.lang.String[] vals)
                                      throws java.lang.Exception
Insert a tuple to the equivalence table

Specified by:
insertTupleToEquivalenceTable in class Anonymizer
Parameters:
vals - All values of the tuple to be inserted (as read from the source, i.e., before any generalization)
Returns:
Equivalence id of the equivalence to which the tuple belongs
Throws:
java.lang.Exception

insertTupleToAnonTable

protected void insertTupleToAnonTable(java.lang.String[] vals,
                                      long eid)
                               throws java.lang.Exception
Insert a tuple to the anonRecords table

Specified by:
insertTupleToAnonTable in class Anonymizer
Parameters:
vals - All values of the tuple to be inserted (as read from the source, i.e., before any generalization)
eid - Equivalence id of the equivalence to which the tuple belongs
Throws:
java.lang.Exception

anonymize

public void anonymize()
               throws java.lang.Exception
Anonymizing the input. This function can be reused (with new l maybe), as long as eqTable and anonTable objects are fresh and the configuration has not changed.

Specified by:
anonymize in class Anonymizer
Throws:
java.lang.Exception

satisfiesPrivacyDef

public boolean satisfiesPrivacyDef(AnonRecordTable table)
                            throws java.lang.Exception
Checks whether the parameter table satisfies the privacy definition (in this case, some l-diversity instantiation)

Parameters:
table - Table to be checked for anonymity
Returns:
true if the privacy definition is satisfied
Throws:
java.lang.Exception

generalize

private void generalize(LatticeEntry root)
                 throws java.lang.Exception
Generalizes the original table according to a lattice entry and sets the result for the generated table as anonymous or not. If not, the corresponding table will be dropped from the database. If too, this root will be added to the set of successful anonymizations.

Parameters:
root - An entry of the generalization lattice that specifies how many times each qi-attribute will be generalized
Throws:
java.lang.Exception

selectAnonymization

private void selectAnonymization(java.util.LinkedList<LatticeEntry> anons)
                          throws java.lang.Exception
Simply select the anonymization that yields the maximum number of distinct equivalences

Parameters:
anons - List of lattice entries that correspond to anonymized tables
Throws:
java.lang.Exception