📜 ⬆️ ⬇️

Why do you need to navigate the shopping center in Vkontakte, Telegram and Facebook



It is still difficult to say why I went with a girl to Ikea on March 6. Before the holiday there was a bunch of people inside. The girl needed some trifle, in my opinion, a candlestick. In order not to push in the queues, I decided to install the Ikea application, saying “right now we will find this damn thing like clockwork.”


Heavy application through the local wifi was installed slowly. Vayfay himself constantly lost. I was sweating and swearing, but it was not put. We found this trifle, but spent too much nerves.


The company in which I work, just made navigation terminals for Ikea in Khimki. Therefore, after the holidays, the developers came and complained to this difficult and unpleasant situation. Hoped that there is some simple way to search.
The developers explained that indoor mobile navigation (indoor navigation) is developing towards iBeacon beacons, which do not work without an application. So, the application will need to download anyway.


I have nothing against applications, but it's silly to put them for the sake of any nonsense. Well, if suddenly my hand disappears from the mall, then I can install the application to immediately find a pharmacy. But for the candlestick - it is unlikely.


The idea stalled until we noticed the noise around the chatbot. And it seemed to us that here it is - a great decision! The bot does not need to be installed, and it works like one big search field. In general, eat coconuts - chew bananas, enter requests - get answers.


There was a small question - how to connect, known from Yandex.Maps and 2Gis, navigation interface with a text bot. All of us use navigators: I opened the application, determined my location by GPS, poked into the right house and follow the route. If you make a mistake somewhere, the program will correct you and tell you where to turn to return to the route. Everything is thoughtful and convenient. And in the bot there is nothing of this.


Messengers that the bot is currently working on

Vkontakt seemed to us the most obvious base for the bot - it has the largest audience in Russia and the overwhelming majority have its application in the phone. And the fact that VKontakte rolled out the Callback API was very helpful. At this API, we made the first bot (now the bot is working in the Telegram and is doing the Facebook version with might and main).


How to understand where a person is, if the bot can not use the sensors of the phone?


Familiar navigation interfaces quite accurately know where the phone is (and its owner), thanks to the satellites. Inside the premises, the satellites do not work, but there are beacons iBeacon, which determine the coordinates of the phone. In order for the beacons to work, you need a prepared application and Bluetooth 4.0. But popular messengers do not work with iBeacon and are unlikely to ever be.


Therefore, we don't know a damn thing about the coordinates of the user.


And to know where the user is, you need to build routes. That is, if a person asks us where “Nike” is, then we will show him where Nike is on the map, but we won’t tell you how to get there. And without a route, indor navigation is not really a very useful thing.


The letter "A" bot showed me the place that I was looking for. I have a smartphone with a large screen and all the inscriptions read well. But, if I am standing somewhere far from anchor tenants, I still can’t navigate - you need a route


Then we presented how a person would ask the route from his friend in the same messenger. A friend also does not have access to the sensors, so you have to somehow explain without coordinates. Most likely, a person would say what shops are around him. A friend would say: “Face the% brand_name%. Go left up the escalator and climb on it. There you will see on the left. "


We did the same thing - that is, we build routes not between the user and the object, but between the objects. Of course, the bot cannot explain the route indefinitely (“You will see there on the left”), but it can neatly navigate past the shops with clues he knows.



I stand at Auchan and I need to go to Chalcedony (I wonder why?). In the request, I use a comma to make the bot understand that these are different shops


Such a system of route formation, by the way, also speeds up the process - the coordinates of the stores are already in memory and there is no need to calculate the coordinates of the phone (for ordinary systems, such as Yandex.Card, it takes a few seconds). Plus, the last time I checked, the beacons could sometimes give an error of 10 meters. For a mall this is essential


How to show a few suitable premises for a request? For example, what to show on the query "toilet"?


Toilet - Alpha and Omega Indore-Navigation. In any shopping center where our navigators stand, the toilet is in the top 2 search queries. Because:


  1. They all need. And need, usually, quickly and abruptly.
  2. They are made in the darkest hole of the shopping center, behind an iron door with a long corridor.
  3. They forget to hang the navigation signs.
  4. They do not change their location, unlike ATMs, which are also super popular.

Searching for a toilet is a great task for the bot. And by all indications, the bot will handle the application better. At least, because in case of extreme need, I don’t want to install the application at all. As a maximum, because in the dark holes of the shopping center may not be beacons.


Are navigation applications and bot competitors?

If you look at the tasks, then everything looks as if the applications and the bot really compete. There and there navigation. There and there is a shopping search, a route and tips. It all looks about the same.


But we believe that the bot still does not compete with the application, because the input conditions are different. Applications (we are talking about applications like Navigine) are simply created for thoughtful shopping, and the bot is for spontaneous and quick search.


If you are going to have a good shopping, buy clothes for the whole family or participate in some bonus programs, put the application. If you went to the mall for the first time to buy socks, then it is better to go to the bot. As a result, the application should work with a loyal audience, and the bot with the rest.


Usually in a shopping center there is not one toilet and on the map they are all called the same. It is also impossible to poke into the map and choose the one you need - the bot sends ordinary pictures. Then how to explain to a person where the object he needs is? Now we fully list all the relevant objects, and mark the first five with large icons on the map.



Such a sheet is now sent by the bot to the request “Clothing”. It is clear that in any shopping center there will be such a sheet, not only in Peter Raduga - the SEC for which we did the search


The solution raises questions and when there are many floors in the room - many pictures come. And if Facebook has a “carousel” built in for these cases, then Vkontakte and Telegram send sheets:



The same request "Clothing", only in the high-rise shopping mall "Family." Such answers will come to 4 floors


Opinions in the team were divided. Some say that this is necessary, let users write requests more precisely, others say that it is not necessary and let the answer come compactly. If you have thoughts on this subject, then tell us in the comments.


Further, how do we guide a person to the desired object from the category? It seems to be obvious that the request should be like to other stores. You write “Auchan, toilet”, and the bot leads you to the bathroom closest to Auchan.


But there are toilets for men, women, for the disabled and children. Sometimes different types of toilets are on different floors (yes, yes). Then we need not just to lead the person to the nearest toilet, but also to determine his gender, children and disability.


Sometimes under one category combines several not very similar premises. The category “eat” unites all restaurants, cafes and coffee houses of the shopping center, how can we find out what the user likes and wants.


Vkontakte allows us to determine the gender, but Telegram does not. About children and disability, in the context of the toilet, taste preferences, dreams and desires of the user, we can only guess at all.


How to teach all this man?


In the bot, everything works wrong, this is not a cozy Yandex.Maps. And all this we need to teach the user. We pushed off from what our bot can do:


  1. Show one point for a specific query.
  2. Show route between points with hints.
  3. Show a bunch of points on a categorical request.

Right on these points we conduct training:



The main problem of the tutorial in the text interface is that it is long and people do not always reach the end. On the other hand, if you do not give a tutorial, the user will leave even faster. In general, standard tutorial problems. It is difficult to come up with any tricks here, and we could not find suitable examples for the bot.


What difficulties did we encounter?


Difficulty 1

People write the names of the stores, as God put them in his head, with errors and errors. In addition, there are well-established names of some brands (McDuck, Sber), transliterated names (Zara, Insiti) and incomprehensible names (L'occitane is read loxitan).


As decided:
We took the algorithm for calculating the distance Damerau - Levenshteyn. Who does not know, it allows you to calculate how much you need to do operations to turn one word (phrase, sentence) into another.


We modified the algorithm and added a search for a substring and a search for subsequences from the FuzzyString library. Completed the search for transliteration of words using the library . The result is a fuzzy search algorithm.


It is clear that no fuzzy search will combine L'Occitane and Loxitan. For this we use a dictionary of synonyms. He keeps folklore names: "Mac", "McDuck" for McDonald's and the like. Add to the database, search by keyword, in order to find McDonalds by BigTasties.


In general, it looks like this:


  1. A person enters a query, for example, "Lapsitan" (apparently heard with the edge of his ear).
  2. Next, the bot is looking for a modified algorithm Damerau - Levenshteyna.
    a. By name.
    b. By synonyms.
    c. By keywords.
  3. In case of failure, a search is performed for a substring and / or a subsequence.
    a. By name.
    b. By synonyms.
    c. By keywords.
    In our case, the bot will find L'Occitane already at step 2-b, you can check.

Difficulty 2

We had problems with restrictions on the number of requests to the API. Vkontakte has 3 requests per second. Quite seriously, considering that even to pretend that the bot read the message is also a request to the API.


As decided:


Vkontakt itself proposes to circumvent this restriction by the execute method, which allows you to pack 25 requests into one.


So we did, but so far the Vkontakte bot does not pass the load test. Therefore, we are now implementing the request processing queue, which should help.


Difficulty 3

Vkontakte user received the text of the route, but the picture did not come. Vkontakte explained to us: "It looks like you just stumbled upon a problem server."


As decided:


Tech support offered us “next time, add the https = 1 parameter to the request or transfer the latest version of the API”. The next time was not yet, but I hope someone will blow on the water.


How to support us?


Use a bot and subscribe to our group in Vkontakte or to our bot in Telegram. Moreover, the New Year holidays on the nose, come in handy.


So far there are three shopping centers: Columbus in Moscow, Peter Rainbow in St. Petersburg and Family in Perm. Be sure to write to the shopping centers that you want to see directly in the bot (in the choice of shopping centers). So we will quickly agree with these shopping centers and add them to the database.


')

Source: https://habr.com/ru/post/399897/


All Articles