2. 2
2017
The Workshop
What do we do in The Workshop
Device tracking
Fraud screening for ecommerce
Duplicate account concept
Go-live and performance
Q & A
agenda
3. 3
2017
The Workshop
What do we do in The Workshop
Device tracking
Fraud screening for ecommerce
Duplicate account concept
Go-live and performance
Q & A
agenda
4. 4
2017
The Workshop
• Build software
Device Tracking in Practice: From Idea to Production
What do we do in The Workshop?
• IT intelligence
• Analytics
5. 5
2017
The Workshop
Our clients
Device Tracking in Practice: From Idea to Production
What do we do in The Workshop?
have customers
that make online purchases
on our clients’ websites
24/7from all over the world
6. 6
2017
The Workshop
Fraud costs GBP 193 bln per year in the UK alone
Device Tracking in Practice: From Idea to Production
Fraud is expensive
Card fraud hits more and more card holders
33% of cardholders have been victims of card fraud
7. 7
2017
The Workshop
• IP blacklisting
• Card blacklisting
• KYC verification
• Geo-location validation
Device Tracking in Practice: From Idea to Production
Anti-fraud tools we use
8. 8
2017
The Workshop
What do we do in The Workshop
Device tracking
Fraud screening for ecommerce
Duplicate account concept
Go-live and performance
Q & A
agenda
11. 11
2017
The Workshop
We can get information about the browser
Device Tracking in Practice: From Idea to Production
What’s a device?
12. 12
2017
The Workshop
We can get information about the browser
Device Tracking in Practice: From Idea to Production
What’s a device?
• HSTS
• IndexedDB
• Local storage
• Web SQL database
• HTTP cookie
13. 13
2017
The Workshop
We can get information about the browser
Device Tracking in Practice: From Idea to Production
What’s a device?
14. 14
2017
The Workshop
We can get information about the browser
Device Tracking in Practice: From Idea to Production
What’s a device?
15. 15
2017
The Workshop
We can get information about the browser
Device Tracking in Practice: From Idea to Production
What’s a device?
• user agent
• pixel ratio
• resolution
• do no track
• plugins
• js fonts…
16. 16
2017
The Workshop
We can get information about the browser
Device Tracking in Practice: From Idea to Production
What’s a device?
17. 17
2017
The Workshop
We can get information about the browser
Device Tracking in Practice: From Idea to Production
What’s a device?
22. 22
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it? And query?
Relational model
- Customers with same device?
CID SC FP BL BT
23. 23
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it? And query?
Relational model
- Customers with same device?
SELECT D1.CID, D2.CID FROM DEVICES D1, DEVICES D2
WHERE D1.SC = D2.SC AND D1.FP=D2.SC ...
AND C1.CID <> C2.CID
CID SC FP BL BT
24. 24
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it? And query?
Relational model
- Customers that share device of customers with same device?
CID SC FP BL BT
25. 25
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it? And query?
Relational model
- Customers that share device of customers with same device? 2 hops
CID SC FP BL BT
26. 26
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it? And query?
Relational model
- Customers that share device of customers with same device? 2 hops
SELECT D1.CID, D3.CID
FROM DEVICES D1, DEVICES D2, DEVICES D3
WHERE D1.SC = D2.SC AND D1.FP=D2.SC [...]
AND D2.SC = D3.SC AND D2.FP=D3.FP [...]
AND C1.CID <> C2.CID AND C1.CID <> C3.CID
CID SC FP BL BT
27. 27
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it?
Relational model
CID SC FP BL BT
- 3 hops?
- Credit cards in common?
- What data points do the devices have in common?
These ones are real cases that would require lot of joins, big
indexes, complex and hard to maintain queries …
31. 31
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it? And query?
Graph-based model
- Customers with same device?
32. 32
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it? And query?
Graph-based model
- Customers with same device?
MATCH (c1:Customer)-[:USED_DEVICE]->(:Device)<-
[:USED_DEVICE]-(c2:Customer)
RETURN c1, c2
33. 33
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it? And query?
Graph-based model
- Customers with same device?
MATCH (c1:Customer)-[:USED_DEVICE]->(:Device)<-
[:USED_DEVICE]-(c2:Customer)
RETURN c1, c2
- OR *
MATCH (c1:Customer)-[:USED_DEVICE*2]-(c2:Customer)
RETURN c1, c2
34. 34
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it? And query?
Graph-based model
- 3 hops?
MATCH (c1:Customer)-[:USED_DEVICE*6]-(c2:Customer)
RETURN c1, c2
35. 35
2017
The Workshop
Device Tracking in Practice: From Idea to Production
How to model it? And query?
Graph-based model
- 3 hops?
MATCH (c1:Customer)-[:USED_DEVICE*6]-(c2:Customer)
RETURN c1, c2
- Credit cards in common?
MATCH (c1:Customer)-[:USED_DEVICE*6]-(c2:Customer)
MATCH (c1)-->(cc:CreditCard)<--(c2)
RETURN cc
36. 36
2017
The Workshop
What do we do in The Workshop
Device tracking
Fraud screening for ecommerce
Duplicate account concept
Go-live and performance
Q & A
agenda
40. 40
2017
The Workshop
What do we do in The Workshop
Device tracking
Fraud screening for ecommerce
Duplicate account concept
Go-live and performance
Q & A
agenda
41. 41
2017
The Workshop
We collect various pieces of
information from the customers:
Device Tracking in Practice: From Idea to Production
Duplicate accounts detection
• Device info
• Date of birth
• ZIP/Postal code
• Phone number
• Name
• Email address
45. 45
2017
The Workshop
Device Tracking in Practice: From Idea to Production
Duplicate accounts detection
duplicate
When customers match the duplicate account detection criteria we mark them in the
graph as duplicates.
53. 53
2017
The Workshop
What do we do in The Workshop
Device tracking
Fraud screening for ecommerce
Duplicate account concept
Go-live and performance
Q & A
agenda
54. 54
2017
The Workshop
This is the theory
Device Tracking in Practice: From Idea to Production
Go live & Performance
*
55. 55
2017
The Workshop
And this is reality
Device Tracking in Practice: From Idea to Production
Go live & Performance
*
56. 56
2017
The Workshop
And this is reality
Device Tracking in Practice: From Idea to Production
Go live & Performance
*
*
57. 57
2017
The Workshop
And this is reality, dense nodes with unknown distribution
Device Tracking in Practice: From Idea to Production
Go live & Performance
60. 60
2017
The Workshop
And this is reality
Device Tracking in Practice: From Idea to Production
Go live & Performance
- Connected customers:
MATCH (c1:Customer-->(n)<--(c2:Customer)
[...]
RETURN c1, c2
61. 61
2017
The Workshop
And this is reality
Device Tracking in Practice: From Idea to Production
Go live & Performance
- Connected customers:
MATCH (c1:Customer-->(n)<--(c2:Customer)
[...]
RETURN c1, c2
What if there are millions of customers?
What if there are a lot of transactions per second?
64. 64
2017
The Workshop
Traversal API to the rescue!
Device Tracking in Practice: From Idea to Production
Go live & Performance
- Navigate ‘n’ levels of depth
- Navigate through these relationships
- Apply custom criteria like
· Stop traversing on a fraudulent customer
· Ignore specific paths …
- “smart” traversing:
· Identify candidate nodes where start (clearly non
dense nodes)
· Run several iterations instead of “all at once”
65. 65
2017
The Workshop
Traversal API to the rescue!
Device Tracking in Practice: From Idea to Production
Go live & Performance
GraphDb.traversalDescription()
.uniqueness(uniqueness).depthFirst()
.evaluator(Evaluators.toDepth(depth))
.evaluator(new Evaluator() {
@Override
public Evaluation evaluate(Path path) {
if (isIgnoredPath(path)) {
return Evaluation.EXCLUDE_AND_PRUNE;
}
if (path.length() > 0 && path.endNode() != null
&& path.endNode().hasLabel(EVIDENCE_LABEL)) {
return Evaluation.INCLUDE_AND_PRUNE;
}
return Evaluation.EXCLUDE_AND_CONTINUE;
}
}).traverse(sourceNodes)