Mobile Push Notification Targeting Generation Using Genetic Algorithm in Classifieds

Ramzi Alqrainy
4 min readMay 8, 2020

Acquiring users takes time and money, we are working hard for them. However, push notifications are the follow-up to user acquisition, to make sure that the marketing dollars stretch as far as possible. The idea comes from specifying a system that will enable the OpenSooq to profile users, segment them and target them with different parts of our platform based on a lightweight implementation.

The system is centered around the idea of generating a DNA fingerprint of each user based on his past interactions on OpenSooq, this DNA fingerprint is then transmitted to the client-side, that use it to identify to all services in OS and based on this profile the service can reply in a different way.

The upsides of this method is that:

  • A DNA fingerprint is a binary code that OS can keep adding to it as many traits as the company need, with a small impact.
  • Once the DNA fingerprint generated and communicated to the client-side, the server has no need to verify/gather any other info on the connected user to guess his profile, he can use this to personalize the service.
  • It’s easy to do a script to update the DNA fingerprints during low times.
  • A service can match one or more profiles by doing a mask of DNA fingerprints for each customization.

When the marketing team decides to send a campaign, they will think about the audience to target. The system is using a new methodology to tackle this issue using one of the evolutionary algorithms which is the Genetic Algorithm.

Now, every person in OpenSooq has a personalized profile formed as DNA (sets of 0s and 1s). Every slot called Gene and sequence of Genes called Chromosome. A population is a group of DNAs as demonstrated below.

DNA Definition

Every Gene is an encoding of readable factor-like below.

DNA Encoding

The evaluation (fitness) function determines how fit a chromosome is. It gives a fitness score to each chromosome. In business words, it’s a count of unique audience.

Evaluation Function = New Audience Count

Example of DNA

Generating a New Audience

The next step is to generate a population of solutions from those selected through a combination of genetic operators: crossover like below.

DNA Crossover

With a new solution (chromosome) we count the evaluation function which is audience count and based on count we choose new parents.

Algorithm

The next step is to generate a population of solutions from those selected through a combination of genetic operators: crossover like below.

Generating New Target algorithm can be summarized as follows:

Optimal Campaign Automatic Targeting Generation Analysis

Genetic algorithms tend to work better than traditional optimization algorithms. So, we illustrate 3 cases of genetic algorithm best, average, and worst.

Best Case

The best case of GA is getting an optimum solution in the first generation and when we go to the next generation, the algorithm stops because it will be in stable mode. So,

The time complexity for the best case is Ω (1).

Average Case

we calculate the average case technically and theoretically.

According to our experiments, the average case for this algorithm tends like Θ(√n).

Worst Case

Unfortunately, this algorithm in the worst case tends as a brute-force algorithm. It will visit all populations. So,

The time complexity for the worst case is O(n)

Conclusion

Building DNA can help the company to personalize their users and start building personalization experience that will increase the engagement. Optimization methods can help you to the user to create personalized and contextually relevant mobile push messages and they are widely used in marketing, but the limitation is the “better” solution is only in comparison to other solutions. As a result, the stop criterion is not clear in every problem.

--

--

Ramzi Alqrainy

Apache Solr Contributor | Slack Contributor | Speaker | Chief Technology Officer at The Chefz| Technical Reviewer for Big Data Books