📜 ⬆️ ⬇️

2ndb - notebook for records, which studies and then improves the person who writes in it

Do you have friends who always write something in a notebook or file in Google Docs? You asked them about why they do it, and what exactly do they write there? If not, then I will answer for them (not for all, but for many):

This is consumed food (including its energy value), expenses, time spent on TV shows (games, work, sports), their plans for the future, their feelings from what they consume (for example, chocolate bars evaluation) and other metrics and information about their lives.

But think about it: if there is so much information, and it is so detailed, then surely you can get something from this data? Using them, you can calculate something else. Find trends, patterns. And then it will be not just a notebook, but a truly valuable and indispensable tool that not only allows you to store information, but also can give advice. He could recommend that a person adjust something in his life in such a way that, according to the results of statistical calculations, is most likely to give the desired result.
')
I would like to describe such a system in more detail: a software product capable of collecting information (in the initial stages it is basically the data that the user provides on his own, regularly entering them into the system) and, analyzing it, find various trends in it , link various aspects of human life for some common parameters (for example, revealing a chronological relationship) and inform the user if the system has any recommendations, tips or cautions for it i

One of the key components of this software package is the automatic trend detection system (abbreviated as SAOT).

Illustration: between two books is a thick notebook with a spring

Software use


Data 2ndb is supposed to be stored and processed on the server side. This ensures the availability of data from all user devices, as well as the possibility of interaction between users.

When building the architecture of this software package, it is necessary to consider in advance the possibility of using it with the help of various client applications. This means that all components that store and process information about the life of users should be implemented as a backend, providing an interface (API) through which client applications can access it.

First of all, it is planned to implement only one client application - browser (site 2ndb). However, later you can add others (working, of course, through the same backend, with the same data). For example, client applications for mobile phones, applications for personal computers that work separately from the browser, and even individual devices.

A client application running on a user's computer can, firstly, allow the user to quickly enter information into the system, and secondly, such an application could collect some information even without user interaction: for example, record how much he plays computer games, like communicates a lot on social networks, and how much he does something related to his work, as well as how many characters he types on the keyboard, how fast he types and so on and so forth.

Special devices can automate the input of data that can not be automatically obtained through the browser or through a separate application. For example, you can release and sell a wrist pulse sensor, which will automatically add readings to our system.

Entering data into the system


In the initial stages, most of the information will be entered manually by users.

Examples of such data:

  1. Wake up time
  2. Bedtime
  3. Stress (including indication of the source of stress, as well as approximate duration and intensity)
  4. Joy
  5. Other emotions
  6. Current growth
  7. Current weight
  8. Physical exercise
  9. Cold, illness
  10. Sex
  11. Masturbation
  12. Monthly
  13. Pregnancy and childbirth
  14. Time spent at work
  15. Time spent on personal activities not related to work
  16. Food
  17. Alcohol
  18. Cigarettes
  19. Other psychoactive substances
  20. Games (e.g. board games)

In the future, it seems that there will be opportunities to enter various information automatically. For example, if a user wakes up on an alarm clock and sets an alarm on the phone, then we could automatically take the time on which he sets the alarm as his probable wake-up time.

And we can also produce devices that stand at the users of the house and automatically enter into our system information about how much CO 2 is in the air that the user breathes (for this you can use modern sensors based on the principle of dispersionless infrared spectroscopy) how bright the light is in the room where it is located (for this you will need to add a selenium photocell to the device, and possibly equip with some other components that usually contain good light meters), and so on .

In this case, having detected any negative tendency in the user input, the system will be able to advise it to air the apartment more often and turn on the light more brightly - if, of course, it detects the corresponding correlations with the CO 2 and light data for the corresponding period of time (and if automatic The analyzers are written in such a way that such a correlation is not considered as an ordinary coincidence - and in some cases it will probably be necessary to do so in order to have less “noise” from useless owls. comrade).

Another example is the determination of the noise level in a room (using the same device, or, by the way, even using the microphone of his computer, if he has our program installed, and the microphone accurately transmits sound). If, judging by the data that the user contributes, he has stress, and we have information that his apartment is noisy, we can advise him on solutions (you never know, maybe he didn’t think it was so important), type of sound insulation and other things. And if this is also after 11 pm, then at the same time we advise you to talk with your neighbors / write a statement.

Data types with additional options

For some data types, you can specify additional options. For example, if information about sex is entered, then you can add sexual partners, indicating various relevant parameters about them. If you specify physical exercise, you can choose the type of exercise (running, pull-ups, push-ups, etc.), and for some types, additional fields may appear (for example, not only the number of repetitions, but also the time spent, or even a subjective impression of physical fatigue).

Making plans

In addition to information about what has already happened or is happening right now, the user can also add what he plans to do. He can, among other things, set up reminders so that the system will inform him in advance about his plans for the near future.

For plans, it is also necessary to enter the implementation parameter. That is, on the day that something was planned for you, the system asks you whether you made it real, because it is very important for statistics and analysis.

Data generators


Some data is entered by the user (or comes from client equipment or software), and some is generated (calculated) automatically, based on other data.

Special modules - data generators - are responsible for this.

Examples of data that can be calculated based on other data:

  1. Duration of sleep (if you know the time of going to bed and waking up)
  2. Body mass index (if body weight and height are known)

In some cases, it is the generated data that will be used by the analyzers. For example, if a person has increased weight - perhaps it just grows (after all, the system will be used by children). But if his BMI has increased, then it’s already a different matter, and then it really makes sense to look for a correlation with other data, advise something, and so on.

If you really get involved in writing generators, you can even make a calorie calculator and take into account the vitamins and minerals contained in the prepared dishes (if the system knows what the user is eating and in what quantities).

“You have not enough phosphorus in your diet, maybe today we will cook fish?”

Reminder about the need to enter information


It is obvious that many people have a busy life, and they may forget to enter the information that is needed for automatic analysis of their lives.

The solution can be automatic reminders - for example, in the form of emails, SMS messages, push alerts on a mobile phone (when we already have a mobile application for working with a systese) and so on.

Correct handling of data gaps


From time to time, people will score to enter data. If there is no way to handle this, then the site will incorrectly build statistics, analyzers will make mistakes, and so on. Automatic detection of spaces is possible, but not always (because for some data types it is not known why the user did not contribute them - because they did not actually change during this time, or because he scored).

Therefore, we need a mechanism that allows a person to indicate that at such a time he scored on data entry - in this case, the system will simply cross out this period and will not use it for building statistics and analysis (and information about the intermediate state will be generated automatically by averaging data before and after the gap).

Analyzers


Analyzers are special program modules (automatic data analysis modules for users) that receive data of a certain type, after which they can compare them with other data, or with the same data over a different period of time, create alerts for users, and so on.

The analyzer, for example, discovers that a person has begun to sleep less or eat more, and at the same time tries to find coinciding chronologically negative trends (for example, he planned 10 meetings with friends, but in fact two times less, only 5), and if they ( according to the criteria used by this analyzer) sufficiently significant, it adds to the alert information that, perhaps, by improving this parameter, the person will also affect such others.

The fact that analyzers can use not only data about past days, but plans, generally speaking, can be very useful for users. For example, if earlier for this user it was observed that often, meeting with friends, he unimaginably drank a lot, and then suddenly there were 4 different meetings in a row in the plans (one each day), then the system should warn him that he recommends refraining from excessive use of alcohol (especially if the previous use of alcohol was very long and there are fears that his body simply will not be ready for such a load).

Another analyzer example is dosage validation. If the user, for example, takes any medication, the system can check whether it is observing the correct intervals and dosage, and if it detects any problems (for example, it knows that this particular medication cannot be taken in such quantities, for example, the dose is normal, but this medicine cannot be combined with alcohol, and the user has information that he drank today, then immediately informs the user (and, if necessary, his doctor).

Of course, the system can also remind the user about the need to take medications at a given time (and at the end of the course, for example, report that you do not need to take them anymore).

Ways to monetize


Global statistics

Having access to the data of all users, you can collect very good statistics for research. For money, you can sell access to general statistics pages or even raw data (that is, raw data — for example, in the form in which we store them in a database).

In the future, scientists will have the opportunity to receive amazingly detailed information about a very large number of people, and use this information in research. And with the ability to filter it by time, city, sex, age, and so on.

Super Targeted Advertising

Advertising on the site (in a mobile application, etc) can be incredibly targeted. So targeted that hardly anyone else can offer something similar to advertisers.

The site discovers that the user has already tried a certain physical training 100,500 times, and each time he fails to achieve the desired result. And then bang - he is given an advertisement that there is a coach in his city, who has a super program for this type of training.

Or, for example, if we know that a particular food will be useful to the user, we can advise him of cafes and restaurants that are located close to him and where such dishes are served.

Expert review

Another interesting way to monetize is the expert assessment of data of a certain type collected about a particular user. For example, there is a certain person who diligently is engaged in some particular sport. However, for a long time he has not been able to achieve the results he needs. In such cases, the system may invite the user to conduct an expert assessment - some of the information about him (in the form of tables, graphs, and so on) will be provided to an expert competent in the relevant field (in this case, it can be a sports trainer), after which he, after analyzing this information (exactly how much the user was engaged, what exercises he did, what interruptions were between occupations, what the user was eating, and so on), will be able to write an expert opinion to the user in which he presents his vision will give advice that can help him.

First of all, it’s convenient for the user: you don’t need to look for an expert yourself, he trusts our system, and he knows that we have good people who are ready to really deal with his particular case professionally, that is, he doesn’t stumble upon charlatans who only claim to understand the topic (in this case, physical education, sports).

Secondly, all the information has already been collected - he does not need to think and remember how the classes were held. Everything is already in the system (unless, of course, he contributed everything). Again, there is no need to worry about the fact that something can be missed - the expert will receive as detailed data as possible (and if the user himself turned to someone, he would either have to remember and he could either omit or go with printouts of data exported, again, from our system).

Thirdly, what is important is that the system can remember the circumstances under which the expert assessment was made. These data can be automatically (or semi-automatically, with the participation of experts) added to the analyzers, and later, if someone else has a similar situation, the system can automatically advise him about the same thing.

From this point of view, it is possible that in some cases expert judgment could also be provided free of charge - if, for example, it is obvious that after entering the results into the system, automatic analysis of this type of data will indeed be improved (and the system, for example, will be able to issue new recommendations for a large number of users).

Providing access to other people, synchronization, export


In some cases, the user may want to share certain types of information with someone else - for example, with his doctor or relatives. Therefore, it makes sense to add the ability to specify other users, for each of which indicate the types of information that should be available to him.

It is possible that at some point data synchronization with external sources will also be required. For example, a hospital where a user is undergoing treatment may want to store the information relating to the health of the user on the servers (and, possibly, also process it in some way) on the servers. Or the reverse case - the user was treated in a hospital, and now is healthy, but the information collected about him (in particular, information about exactly how the treatment took place, what medicines were used, whether any operations were performed, the results of examinations, etc. ), available electronically in a hospital, would be useful in our system. Then, respectively, we could again use the synchronization component that would collect this data and add (import) to our system (so that they can be used for automatic or expert analysis, displayed to the user, transferred to other hospitals, where else it is possible , the user will be treated, and so on).

Data export may be needed either for geeks (if the user can program himself, he may want to write software himself that will perform such data analysis, which, say, we don’t have), or for people who just want to use the information (in in the form of tables, graphs, and so on) somewhere else. For example, they want to show a printout to the doctor, or hang it somewhere in the room on the wall, or try to provide an alibi in court as proof (they say, I could not be at the crime scene, I was engaged in sports at that moment, see for yourself).

In the case of geeks, of course, the format should be convenient for software processing (machine-friendly) - for example, XML or JSON. And in the case of all the others, the format should be the other way around so that the information can be easily viewed and printed on a printer (perhaps, for example, PDF, but in some cases many will also be very happy to export data to Excel).

Expansion options


Automatic decision making based on recommendations from the system

Does the user have signs of depression, but has he recently been sitting in the dark? Turn on the light more brightly (if he lives in such a house, and we can regulate it). We have determined that the user has a lot of stress, and he clearly is not up to talking? Disable incoming calls on a mobile phone. Of course, these are just examples, and in general there are many technical difficulties, but in general such a useful intervention (for the purpose of care) may please some of them. And for the rest, you must leave the option not to include it.

Link Detection in General Statistics

Suppose there are many users in the system, and they, for example, indicate in detail what kind of stress they have: communication with neighbors, taking meter readings in the early morning and so on.

If the system knows that several users live in approximately the same place, and regularly indicate stress of the same type (and even more so with the correlation of the time of day), then who knows, can they even have a common problem?

The system can even connect them with each other (if they specified in the settings that they agree to such jokes). Maybe even help each other with something. :)

Publication in social networks

It may be useful for promotion - the user's friends see that our system publishes data from him (of course, only those for whom he has included such a publication), and may themselves become interested in the system.

We are talking about the publication, for example, in LJ or Twitter. A user, for example, indicates that he did 15 pull-ups on a horizontal bar, and this is immediately placed, for example, on his wall on VKontakte, along with a beautiful schedule (as well as a beautiful picture with the silhouette of a corresponding exercise, and so on).

Analysis of the user's network life

If the system knows where the user lives on the Internet, then it can automatically collect and record information about it. In this case, this information can also be used by analyzers. The user began to read more, and the system found that he now has an average of more likes on social networks? Well, we need to share this great news with him (even if the fact that what he reads more now has a positive effect on people's attitudes towards him is established in his mind).

And aerobatics is a lexical analysis of a text written in natural language (our potential users, most likely, write on social networks and blogs mainly in Russian and English, although you certainly want the system to be used by people from all over of the world - therefore, it is necessary to develop the system initially with the expectation of internationalization). If we can determine the mood (views, preferences) of the user by what he writes, then we immediately get a huge amount of new data that can also be effectively used for analysis.

Gamification

An interesting way to increase user participation is gamification (or gamification, see the Wikipedia article). For example, you can give out badges for everyone who does something cool (for example, systematically starts to plump less).

However, gamification with real game levels (and not boring “achivkas”) is a much steeper gamification, it attracts people, I think, much stronger.

For example, it might look like this. Browser game. Race. View from above. A beautiful trail is displayed - depending on the level it can be a city, a desert, mountains and so on. At the beginning of the game a person gets to the first level, to the start. Its speed is 0 km / h. There is no traditional control - that is, the “up” arrow cannot be accelerated, it is also not necessary to turn. In order to gain speed, it is necessary that the system has any positive information about the user's life. It can even be a specific, randomly generated task - for example, if we know that a person can pull up on the bar three times in a row, then we tell him that now he needs to walk up to 4 times. As soon as this happens, a person receives a speed bonus - for example, +60 km / h. This speed lasts for an hour, and then begins to decrease - for example, at 1 km / h per minute. Thus (with such a bonus to speed and a slowdown speed), after two hours the car will stop. However, if a person enters the game again and performs the next task - the car will not stop, but will go further. Or, if he does it after the stop, the car will accelerate again and continue driving.

As soon as the car reaches the finish line, the person immediately proceeds to the next level, to the start. The speed of the machine is maintained. At the first level, the tasks are very simple, such that almost anyone could perform them (but, at the same time, such that they had a positive effect on health, horizons, and so on). And then the tasks become more difficult, and the person may need to skip the task. But he cannot do it right away - he will have to wait 1 hour after the task appears. Accordingly, if he cannot cope with the second task (it is not suitable for him), then he will have to enter the game in another hour, and so on.

Thus, people have an incentive to enter the game (and perform some task) several times a day so that their car continues to drive. In addition, not only the player’s car is displayed on the track, but other cars as well (these can be “computer players” or user’s friends), that is, you can compete.

Another option is to conduct marathons. People unite in a group and start doing something beautiful (something definite that unites them - for example, they can do stretching). If someone stops moving forward, he is automatically thrown out of the marathon. And in order to stay in it, you need to figure out, without stopping. And you can make it so that people can share their impressions (or, for example, tips) with other participants of the marathon.

Entering data about other people

It may be worth doing so that the data can be entered not only about themselves, but also, for example, about their children - mothers will be happy. Many of them, I believe, would not be in the least prevented by automatic recommendations about what exactly their children lack. And so the system will be able to automatically offer them a lot of everything that they themselves have overlooked: in some way to diversify the diet of the child, play with him in some educational games, and so on.

In addition, it may be worthwhile to do so that you can give other people access to enter data on your behalf. For example, a doctor. And in the case of entering data about children, for example, their teacher or nanny.

Increase the number of data types and analyzers

In the future there should be a lot of different data. So that, for example, it could be indicated that he learned to play such and such a composition at a rate of 140 beats per minute (although it used to reach only 120, and even with small errors).

Or, for example, add read books. The system can check which books preceded this book from other users (but are missing from the list read by this user), and suggest that it might be nice for him to read this.

Generally speaking, the user should always have the impression that the site is cooperating with him. That, generally speaking, he was very lucky - he seemed to have a friend who was very concerned about his health, knowledge and all that jazz. Then he will have an excellent incentive to continue using this system.

It will also be possible to find out that, for example, 54% of people who have read a certain book, have statistically significantly improved a certain parameter in their lives over the next month.

Integration with Internet sites

In school textbooks at the end of the section there are often questions "Check yourself." We could implement a module that could be added to sites with various educational materials (articles, tutorials, and so on). I read the article (section, whatever), at the end I clicked on the button “Secure information” (or “Secure learned”).

After the user presses the button, it changes color (from orange to green, for example), and a tick appears on its left: in the database it is now recorded that this user wants to remember the facts from this article. Then on a special page, the user will be able to choose the answers to these questions (however, you can immediately suggest the user go there) - as many times as necessary. If he often makes mistakes, then he will be asked the same question many, many times, even after a month. And only when he starts to answer correctly each time, does the site get rid of this question.

Here, again, there may be a game component, a competition. , . , .

, . , .

, ( — , , , ), , .

. — . Page Visibility API , . — ( , ), . , , . , , , , ( ), , ( — , , , ).

, , ( , - , ), ( , , — , , ).

, , — : , , . , , , , - ( , ).

What do you think?

— : aruseni.magiku@gmail.com . , . , , , ( ) , .

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


All Articles