Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method and the device that add good friend, can complete the interpolation of good friend simply and easily.
For solving the problems of the technologies described above, a kind of method of adding good friend of the application, comprising:
Obtain the user profile of home;
The user profile of the home of acquisition is modulated into acoustic signals;
Play described acoustic signals to the other user, pass through to gather described acoustic signals to make the other user and obtain the user profile of described home and carry out adding the operation of good friend according to the user profile obtained.
Further, the described user profile by the home of acquisition is modulated into acoustic signals, comprising:
The user profile of described home is packaged into message;
Described message is encoded, obtains the binary signal of message;
The binary signal of described message is modulated into acoustic signals.
Further, a kind of method of adding good friend, comprising:
Gather the acoustic signals that the other user plays;
Convert the acoustic signals of collection to data-signal, from described data-signal, obtain the user profile of described the other user;
User profile according to described the other user sends interpolation good friend request to the other user.
Further, describedly convert described acoustic signals to data-signal, from described data-signal, obtain the user profile of described the other user, comprising:
Described acoustic signals is converted to binary signal;
Described binary signal is decoded, obtains message;
The user profile that decapsulation obtains described the other user is carried out to described message.
Further, the acoustic signals that described collection the other user plays, comprising:
By the acoustic signals that microphone continuous collecting the other user plays.
Further, a kind of device adding good friend, comprising: user profile acquiring unit, sound wave converting unit and broadcast unit, wherein:
Described user profile acquiring unit, for obtaining the user profile of home;
Described sound wave converting unit, the user profile for the home obtained by described user profile acquiring unit is modulated into acoustic signals;
Described broadcast unit, for playing described acoustic signals to the other user, passing through to gather described acoustic signals and obtains the user profile of described home and carry out adding the operation of good friend according to the user profile obtained to make the other user.
Further, described sound wave converting unit comprises: message encapsulation subelement, coded sub-units and modulation subunit, wherein:
Described message encapsulation subelement, for being packaged into message by the user profile of described home;
Described coded sub-units, for encoding to described message, obtains the binary signal of message;
Described modulation subunit, for being modulated into acoustic signals by the binary signal of described message.
Further, a kind of device adding good friend, comprising: collecting unit, user profile extraction unit and request unit, wherein:
Described collecting unit, for gathering the acoustic signals that the other user plays;
Described user profile extraction unit, converts data-signal to for the acoustic signals gathered by described collecting unit, obtains the user profile of described the other user from described data-signal;
Described request unit, sends interpolation good friend request for the user profile according to described the other user to the other user.
Further, described user profile extraction unit comprises: Date Conversion Unit, decoding unit and decapsulation unit, wherein:
Described Date Conversion Unit, for being converted to binary signal by described acoustic signals;
Described decoding unit, for decoding to described binary signal, obtains message;
Described decapsulation unit, for carrying out to described message the user profile that decapsulation obtains described the other user.
Further, described collecting unit gathers the acoustic signals that the other user plays, and comprising:
The acoustic signals that described collecting unit is play by microphone continuous collecting the other user.
In sum, the acoustic signals that the application is modulated into by playing user profile, the other user is made to obtain the user profile of we, thus carry out the operation adding good friend, decrease the complicated processes that user carries out inputting, simply, easily and fast and effectively can complete the interpolation of good friend, and add the playability of application.
Embodiment
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
As shown in Figure 1, the method for the interpolation good friend of the application comprises at transmitting terminal:
Step 101: the user profile obtaining home;
Can increase a user profile in the application and send button in APP, user profile sends button as start button.After user clicks user profile transmission button, start the operation performing the user profile obtaining home.
User profile can be the user ID (ID) that user uses APP.
Step 102: the user profile of the home of acquisition is modulated into acoustic signals;
In the application after getting the user profile of home, user profile is modulated into acoustic signals, thus by playing acoustic signals to the other user with the user profile making the other user obtain home.
In the application, the user profile of the home of acquisition is modulated into acoustic signals, comprises:
Step a: the user profile of home is packaged into message;
Such as, message can comprise three parts: (1) message length; (2) type of message, identifies the message that this message is the user profile of carrying for adding good friend; (3) user ID.
Step b: encode to message, obtains the binary signal of message;
Step c: the binary signal of message is modulated into acoustic signals.
Step 103: play described acoustic signals to the other user, passes through to make the other user to receive the user profile that described acoustic signals obtains described home, carries out according to the user profile obtained the operation adding good friend.
The acoustic signals of user profile can be play in the application by loud speaker to the other user, make the other user collect acoustic signals by microphone, therefrom extract the user of home to carry out adding the operation of good friend.
In order to ensure that the other user can collect acoustic signals, can repeated multiple times broadcasting acoustic signals.
As shown in Figure 2, the method for the interpolation good friend of the application comprises at receiving terminal:
Step 201: gather the acoustic signals that the other user plays;
Can increase a user profile in the application and receive button in APP, user profile receives button as the start button gathering sound wave.After user clicks user profile reception button, start to gather acoustic signals, until stop after obtaining the user profile of the other user.
In the application after user clicks user profile reception button, the acoustic signals play by microphone continuous collecting the other user.
Step 202: the acoustic signals of collection is converted to data-signal, obtains the user profile of the other user from data-signal;
Convert acoustic signals to data-signal in the application, from data-signal, obtain the user profile of the other user, comprising:
Step 1: the acoustic signals of collection is converted to binary signal;
In the application, the acoustic signals of collection is converted to binary signal, comprise: the acoustic signals of collection is converted to digital signal, the corresponding relation of time domain and frequency domain is calculated again by fast fourier transform (FFT) and Hanning window, the frequency being loaded with data is intercepted out, fall noise by frequency filter, obtain binary signal.
Step 2: the binary signal that acoustic signals is converted to is decoded, obtains message;
Step 3: the message obtained decoding carries out the user profile of the other user that decapsulation obtains carrying in message.
Step 203: the user profile according to the other user sends interpolation good friend request to the other user.
Can be set user information in the application sending function and user profile receiving function in the client simultaneously.When adding good friend, both sides can send our user profile simultaneously and gather the user profile of the other side, directly can complete the interpolation of good friend like this, eliminate the step of search and application.
As shown in Figure 3, present invention also provides a kind of device adding good friend, comprising: user profile acquiring unit, sound wave converting unit and broadcast unit, wherein:
User profile acquiring unit, for obtaining the user profile of home;
Sound wave converting unit, the user profile for the home obtained by user profile acquiring unit is modulated into acoustic signals;
Broadcast unit, for playing acoustic signals to the other user, obtaining the user profile of home to make the other user by gathering acoustic signals and carrying out adding the operation of good friend according to the user profile obtained.
The sound wave converting unit of the application comprises: message encapsulation subelement, coded sub-units and modulation subunit, wherein:
Message encapsulation subelement, for being packaged into message by the user profile of home;
Coded sub-units, for encoding to message, obtains the binary signal of message;
Modulation subunit, for being modulated into acoustic signals by the binary signal of message.
As shown in Figure 4, the another kind of the application adds the device of good friend, comprising: collecting unit, user profile extraction unit and request unit, wherein:
Collecting unit, for gathering the acoustic signals that the other user plays;
User profile extraction unit, for converting the acoustic signals of collecting unit collection to data-signal, obtains the user profile of the other user from data-signal;
Request unit, sends interpolation good friend request for the user profile according to the other user to the other user.
The user profile extraction unit of the application comprises: Date Conversion Unit, decoding unit and decapsulation unit, wherein:
Date Conversion Unit, for being converted to binary signal by acoustic signals;
Decoding unit, for decoding to binary signal, obtains message;
Decapsulation unit, for carrying out to message the user profile that decapsulation obtains the other user.
The collecting unit of the application gathers the acoustic signals of the other user's broadcasting, comprising: the acoustic signals that collecting unit is play by microphone continuous collecting the other user.
Those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, and in some cases, step shown or described by can performing with the order be different from herein, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Although above to invention has been detailed description, the present invention is not limited thereto, those skilled in the art of the present technique can carry out various amendment according to principle of the present invention.Therefore, all amendments done according to the principle of the invention, all should be understood to fall into protection scope of the present invention.