1 / 31

Securing and Personalizing Commerce Using Identity Data Mining

As we are witnessing our society becoming increasingly more reliant on mobile technology, so are we seeing the mobilization of money. In this new realm of commerce, online identity is becoming significantly more important. As a payment is processed, it becomes incredibly important to not only understand who a person is, but also to understand what their broader interests and preferences are so that personalized experiences, suggesting new content and merchandise, may be delivered on an individual level.

jcleblanc
Télécharger la présentation

Securing and Personalizing Commerce Using Identity Data Mining

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Securing & Personalizing Commerce Using Identity Data Mining Jonathan LeBlanc Developer Evangelist (PayPal) Github: http://github.com/jcleblanc Twitter: @jcleblanc

  2. The Problem Commerce Relies on Static Data Contributions

  3. Premise You can determine the personality profile of a person based on their usage habits Personalization == Security

  4. Technology was the Solution!

  5. Then I Read This… Us & Them The Science of Identity By David Berreby

  6. The Different States of Knowledge What a person knows What a person knows they don’t know What a person doesn’t know they don’t know

  7. Technology was NOT the Solution Identity and discovery are NOT a technology solution

  8. Our Subject Material

  9. Our Subject Material HTML content is poorly structured You can’t trust that anything semantically valid will be present There are some pretty bad web practices on the interwebz

  10. How We’ll Capture This Data Start with base linguistics Extend with available extras

  11. The Basic Pieces Keywords Without all the fluff Weighting Word diets FTW Page Data Scrapey Scrapey

  12. Capture Raw Page Data Semantic data on the web is sucktastic Assume 5 year olds built the sites Language is the key

  13. Extract Keywords We now have a big jumble of words. Let’s extract Why is “and” a top word? Stop words = sad panda

  14. Weight Keywords All content is not created equal Meta and headers and semantics oh my! This is where we leech off the work of others

  15. Questions to Keep in Mind Should I use regex to parse web content? How do users interact with page content? What key identifiers can be monitored to detect interest?

  16. Fetching the Data: The Request The Simple Way $html = file_get_contents('URL'); The Controlled Way $c = curl_init('URL');

  17. Fetching the Data: cURL $req = curl_init($url); $options = array( CURLOPT_URL => $url, CURLOPT_HEADER => $header, CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_AUTOREFERER => true, CURLOPT_TIMEOUT => 15, CURLOPT_MAXREDIRS => 10 ); curl_setopt_array($req, $options);

  18. //list of findable / replaceable string characters $find = array('/\r/', '/\n/', '/\s\s+/'); $replace = array(' ', ' ', ' '); //perform page content modification $mod_content = script>#is', '', $page_content); $mod_content = preg_replace('#<style(.*?)>(.*?)</ style>#is', '', $mod_content); preg_replace('#<script(.*?)>(.*?)</ $mod_content = strip_tags($mod_content); $mod_content = strtolower($mod_content); $mod_content = preg_replace($find, $replace, $mod_content); $mod_content = trim($mod_content); $mod_content = explode(' ', $mod_content); natcasesort($mod_content);

  19. //set up list of stop words and the final found stopped list $common_words = array('a', ..., 'zero'); $searched_words = array(); //extract list of keywords with number of occurrences foreach($mod_content as $word) { $word = trim($word); if (preg_match('/[^a-zA-Z]/', $word) == 1){ $word = ''; } if(strlen($word) > 2 && !in_array($word, $common_words)){ $searched_words[$word]++; } } arsort($searched_words, SORT_NUMERIC);

  20. Scraping Site Meta Data //load scraped page data as a valid DOM document $dom = new DOMDocument(); @$dom->loadHTML($page_content); //scrape title $title = $dom->getElementsByTagName("title"); $title = $title->item(0)->nodeValue;

  21. //loop through all found meta tags $metas = $dom->getElementsByTagName("meta"); for ($i = 0; $i < $metas->length; $i++){ $meta = $metas->item($i); if($meta->getAttribute("property")){ if ($meta->getAttribute("property") == "og:description"){ $dataReturn["description"] = $meta->getAttribute("content"); } } else { if($meta->getAttribute("name") == "description"){ $dataReturn["description"] = $meta->getAttribute("content"); } else if($meta->getAttribute("name") == "keywords”){ $dataReturn[”keywords"] = $meta->getAttribute("content"); } } }

  22. Weighting Important Data Tags you should care about: meta (include OG), title, description, h1+, header Bonus points for adding in content location modifiers

  23. Weighting Important Tags //our keyword weights $weights = array("keywords" => "3.0", "meta" "header1" "header2" => "2.0", => "1.5", => "1.2"); //add modifier here if(strlen($word) > 2 && !in_array($word, $common_words)){ $searched_words[$word]++; }

  24. Expanding to Phrases 2-3 adjacent words, making up a direct relevant callout Seems easy right? Just like single words Language gets wonky without stop words

  25. Working with Unknown Users The majority of users won’t be immediately targetable Use HTML5 LocalStorage & Cookie backup

  26. Adding in Time Interactions Interaction with a site does not necessarily mean interest in it Time needs to also include an interaction component Gift buying seasons see interest variations

  27. Grouping Using Commonality Common Interests Interests User A Interests User B

  28. Thank You! Questions? www.slideshare.com/jcleblanc Jonathan LeBlanc Developer Evangelist (PayPal) Github: http://github.com/jcleblanc Twitter: @jcleblanc

More Related