The method and device of user state information is providedTechnical field
This application involves instant messaging fields, more particularly to the method and device of offer user state information.
Background technique
With the continuous development of network technology and all types of terminal devices it is continuous universal, most person to person itBetween communication be all to be carried out by terminal device.It makes a phone call in addition to traditional, send the modes such as information, various applications (App)Also more richer modes are provided for the communication of people, such as some provides hair the application of communication class for userIt delivers letters the communication modes such as breath, voice communication, video calling, is provided a great convenience for daily life.
But in some cases, this convenient communication modes may also can bother daily life.ExampleSuch as, when certain user is participating in meeting, it is connected to the phone or information of friend suddenly, forgets to close mobile phone in the user muteIn the case of, it may be such that the user is more awkward.For communication system angle, if user is in its contact person inconvenienceIn the case of associate, then possibly can not be replied in time, later may be repeated as many times contact, cause the wave of system resourceTake.
In short, how to make existing communication modes under the premise of bringing advantage to the user, and it is more humanized, it drops as far as possibleIt is low that people's normal life is impacted, the waste of system resource is reduced, the technology for needing those skilled in the art to solve is becomeProblem.
Summary of the invention
It, can be to avoid just existing with certain particular kind of relationship user this application provides the method and device of user state information is providedUser together is disturbed, it is also possible to reduce the waste to Internet resources.
This application provides following schemes:
A method of user state information is provided, comprising:
Server pre-establishes user relationship data library, multiple user's set is preserved in the customer data base, eachIt include two users with particular kind of relationship in user's set;
Collect the current geographic position information of user;
For each target user in same user set, the geographical location information that synchronization is collected into comparesIt is right;
It, will be in user set if the distance between each target user is less than preset threshold value in certain user setThe target user is labeled as preset condition, and the preset condition is for indicating: the target user just uses with its particular kind of relationshipFamily is together.
A method of user state information is provided, comprising:
When client receives the user instruction for opening contacts list, is sent to server and obtain user state informationRequest, so that whether server judges in the contacts list to include the target user in preset condition, if it is, willThe information that the target user is in the preset condition returns;Wherein, the preset condition is for indicating: the target userJust together with its particular kind of relationship user;
According to the information that the server returns, prompt information is provided, the prompt information is for prompting the target to useFamily is in the preset condition.
A method of user state information is provided, comprising:
Server pre-establishes user relationship data library, multiple user's set is preserved in the customer data base, eachIt include two users with particular kind of relationship in user's set;
Receive the request of the User Status for the acquisition designated user that client is sent;
Judge whether the designated user appears in user's set, if it is, determining each in user setThe current geographic position information of a target user;
The geographical location information of each target user is compared;
If the distance between each target user is less than preset threshold value, the designated user is returned to the clientInformation in preset condition, the preset condition is for indicating: the designated user is just together with its particular kind of relationship user.
A method of user state information is provided, comprising:
Client sends to obtain to server and be somebody's turn to do after receiving opening contacts list and selecting the instruction of designated userThe request of the User Status of designated user, so that server judges whether the designated user appears in preset user's setIn, if it is, determining the current geographic position information of each target user in user set, and each target is usedThe geographical location information at family is compared, if the distance between each target user is less than preset threshold value, returns to the fingerDetermine the information that user is in preset condition, the preset condition is for indicating: the designated user just with its particular kind of relationship userTogether;
According to the information that the server returns, prompt information is provided, the prompt information is for prompting the target to useFamily is in the preset condition.
It is a kind of that the device of user state information is provided, it is applied to server, comprising:
Database unit is preserved multiple for pre-establishing user relationship data library in the customer data baseUser gathers, and includes two users with particular kind of relationship in each user's set;
Location information collector unit, for collecting the current geographic position information of user;
Location information comparing unit, for for each target user in same user set, synchronization to be collectedTo geographical location information be compared;
Status information marks unit, if being less than preset threshold for the distance between each target user in certain user setThe target user in user set is then labeled as preset condition by value, and the preset condition is for indicating: the targetUser is just together with its particular kind of relationship user.
It is a kind of that the device of user state information is provided, it is applied to client, comprising:
First request transmitting unit when for receiving the user instruction for opening contacts list, is obtained to server transmissionThe request of user state information is taken, so that server judges in the contacts list whether to include the target in preset conditionUser, if it is, the information that the target user is in the preset condition is returned;Wherein, the preset condition is used forIndicate: the target user is just together with its particular kind of relationship user;
First prompt unit, the information for being returned according to the server provide prompt information, and the prompt information is usedIn prompt, the target user is in the preset condition.
It is a kind of that the device of user state information is provided, it is applied to server, comprising:
Database unit is preserved multiple for pre-establishing user relationship data library in the customer data baseUser gathers, and includes two users with particular kind of relationship in each user's set;
Second request reception unit, the request of the User Status of the acquisition designated user for receiving client transmission;
Second judgment unit, for judging whether the designated user appears in user's set, if it is, reallyThe current geographic position information of each target user in fixed user set;
Comparing unit, for the geographical location information of each target user to be compared;
Return unit is returned if being less than preset threshold value for the distance between each target user to the clientThe information that the designated user is in preset condition is returned, the preset condition is for indicating: the designated user is just specific with itRelational users are together.
It is a kind of that the device of user state information is provided, it is applied to client, comprising:
Second request transmitting unit, for opening contacts list and after selecting the instruction of designated user receiving, toServer sends the request for obtaining the User Status of the designated user, so that server judges whether the designated user appears inIn preset user's set, if it is, determining the current geographic position information of each target user in user set, and willThe geographical location information of each target user is compared, if the distance between each target user is less than preset thresholdValue, then return to the information that the designated user be in preset condition, and the preset condition is used to indicate: the designated user just withIts particular kind of relationship user is together;
Second prompt unit, the information for being returned according to the server provide prompt information, and the prompt information is usedIn prompt, the target user is in the preset condition.
According to specific embodiment provided by the present application, this application discloses following technical effects:
By the embodiment of the present application, its user relationship data library can be pre-established, and according to position geographical where userWhether just together the comparison of confidence breath determines to have the user of particular kind of relationship, if it is, can be to the good of this userThe clients such as friendly user provide relevant notification message, so that client prompts its good friend user, in this way, if whereinWhen the good friend user of one side wants to contact with the user, temporarily may no longer it be contacted due to the presence of the prompt information, fromAnd the user is avoided to be disturbed, it is also possible to reduce the waste to Internet resources.
Certainly, any product for implementing the application does not necessarily require achieving all the advantages described above at the same time.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, below will be to institute in embodimentAttached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the applicationExample, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawingsObtain other attached drawings.
Fig. 1 is the flow chart of first method provided by the embodiments of the present application;
Fig. 2 is the flow chart of second method provided by the embodiments of the present application;
Fig. 3 is the flow chart of third method provided by the embodiments of the present application;
Fig. 4 is the flow chart of fourth method provided by the embodiments of the present application;
Fig. 5 is the schematic diagram of first device provided by the embodiments of the present application;
Fig. 6 is the schematic diagram of second device provided by the embodiments of the present application;
Fig. 7 is the schematic diagram of 3rd device provided by the embodiments of the present application;
Fig. 8 is the schematic diagram of the 4th device provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, completeSite preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based onEmbodiment in the application, those of ordinary skill in the art's every other embodiment obtained belong to the application protectionRange.
Since in practical applications, user often is unwilling to be disturbed when together with certain special people, for example,When with leader together, when together with lovers, etc..Therefore, in the embodiment of the present application, such case can be identifiedCome, and prompted to its good friend, in this way, knowing that its contact person may currently be inconvenient to the letter that receives calls or check in userIt in the case where breath, may not go temporarily to contact, so that other side be avoided to be disturbed, also avoid money caused by repeatedly invalid connectionSource waste.It describes in detail below to concrete implementation mode.
Embodiment one
Referring to Fig. 1, which from the angle of server, provides a kind of side of offer user state information firstMethod characterized by comprising
S101: server pre-establishes user relationship data library, and multiple user's set are preserved in the customer data base,It include two users with particular kind of relationship in each user's set;
So-called particular kind of relationship can there are many, for example, it may be the relationship between superior and subordinate, service provider and client in work are closedSystem, teacher-student relationship, lovers' relationship etc..Data source in database can also there are many, for example, it may be user uploadsOr system collect.Wherein, under the mode that system is collected, it can be and carried out by modes such as big data analysis, exampleSuch as, each user personal information information in systems, chat record information, address list information etc. are counted, Cong ZhongfaThere are particular kind of relationship between which existing user.For example, in the chat record of user A, address user B is " wife ", then can be withDetermine that the user A and user B is lovers' relationship.Or, it is assumed that its telephone number is announced in the personal information of user C is138****, and in the address list of user D, the corresponding contact person of the 138**** number is labeled as boss, then can be determinedWith the relationship between superior and subordinate, etc. in work between the user C and user D.It certainly, may about address list information of user etc.It can be related to the information of privacy of user, can be and be collected again in the case where obtaining user's license.
About the specific implementation for excavating particular kind of relationship between user, due to and be not belonging to the invention of the embodiment of the present applicationEmphasis, therefore, I will not elaborate.In short, no matter using which kind of specific mode, it can be found that multiple users gather, Mei GeyongJust include two users with particular kind of relationship in the set of family, for the ease of subsequent use, can by way of database intoRow saves.It can be as shown in the following Table 1 for example, specifically saving form:
Table 1
| Serial number | User's set | Relation name |
| 1 | (user A, user B) | Lovers' relationship |
| 2 | (user C, user D) | Relationship between superior and subordinate |
| …… | …… | …… |
S102: the current geographic position information of user is collected;
Since existing mobile terminal device is generally fitted provided with positioning function, and the case where obtaining user's licenseUnder, the positioning function can be used in the concrete application (App) installed in terminal device, and in this case, App client can be withThe current geographic position information of equipment is got by the positioning function of mobile terminal device;On the other hand, since user makesIt is logged on to after the account of server registration with the App client on its mobile terminal device, so that it may by account and the shiftingDynamic terminal device is associated.In this way, passing through the communication between App client and server again, so that it may so that server obtainsGet the current geographical location information of each user.
Certainly, in practical applications, the current geographic position information of user, example can also be collected by other meansSuch as, available each if the mobile terminal device of user is to access internet by way of WiFi (Wireless Fidelity)The WiFi title of user's access can be with although the information possibly can not directly represent the absolute location information of the userBy judging whether the other users in same user set by same WiFi carry out this information of networking, both to determineBetween relative position information, and then whether together both judge.
S103: for each target user in same user set, the geographical location information that synchronization is collected intoIt is compared;
Since the current geographic position information of each user can be collected into, it can be by the geographical position between userConfidence breath is compared, and this compare is carried out between each target user of same user set.For example, for table 1In each user set, exactly user A is compared with the geographical location information of user B, by the ground of user C and user DReason location information is compared.When specific implementation, the time interval of comparison can be preset, for example, every every five minutes ratiosTo primary, etc..
S104: if the distance between each target user is less than preset threshold value in certain user set, which is collectedThe target user in conjunction is labeled as preset condition, and the preset condition is for indicating: the target user is just specific with itRelational users are together.
If the comparison by certain moment is found, the distance between each target user is less than preset threshold in certain user setValue, that is to say, that the distance between each target user in user set is closer, then proves that these users may be oneIt rises, accordingly, it is possible to which the target user in user set is labeled as certain preset state, to indicate: target user is justTogether with its particular kind of relationship user.For example, if certain moment determine in table 1 user A in first user's set and useThe distance between family B is closer, then can be labeled to the user A and user B, that is, user A and user B currentState are as follows: just together with its lovers.
It, can be there are many mode, for example, can the data shown in table 1 specifically when the state to user is labeledIncrease by a column in the table of library, for indicating whether each target user is in preset condition in corresponding set, for example, such as 2 institute of tableShow:
Table 2
| Serial number | User's set | Relation name | Whether preset condition is in |
| 1 | (user A, user B) | Lovers' relationship | It is |
| 2 | (user C, user D) | Relationship between superior and subordinate | It is no |
| …… | …… | …… | …… |
Certainly, the mark about the state about each target user in the table 2 may be changed, the example of meetingSuch as, certain moment finds certain two target user together, but the two may separate after a period of time, pass through stepThe continuous collection and comparison of geographical location information, are monitoring each mesh in the preset condition in S102 and S103It marks the distance between user and exceeds the preset threshold value, and after having continue for preset time length, it was demonstrated that target user isThrough together, at this point, the mark about the target user can be deleted, or not being switched to other states.
It should be noted that the pass between each target user according to the difference of specific particular kind of relationship, in identity setBoth system may be equity, it is also possible to and it is not equity, for example, if lovers' relationship between user A and user B,Relationship be reciprocity, and if being relationship between superior and subordinate between user A and user B, both relationship be not equity.It is rightIn the relationship of equity, two target users together when, may be not intended to be disturbed, and for asymmetrical relationship, two meshWhen marking user together, may only wherein a side user is not desired to be disturbed, at this time to be not desired to be disturbed may be for talkThe purpose of talking about the respect of other side.Therefore, in the embodiment of the present application, can be refined in a manner of to concrete implementation.For example,Identify certain user set in two target users together after, can also be only by it for asymmetrical customer relationshipIn the state of a target user be identified.For this purpose, a field can also be increased in user relationship data library, for rememberingThe target user that the needs in each user's set are marked is recorded, for example, can be as shown in table 3:
Table 3
| Serial number | User's set | Relation name | The user for needing to be marked | Whether preset condition is in |
| 1 | (user A, user B) | Lovers' relationship | User A, user B | It is no |
| 2 | (user C, user D) | Relationship between superior and subordinate | User D | It is |
| …… | …… | …… | …… | …… |
In this way, if above-mentioned second user set in user C just together with user D, can be only to user D'sState is labeled, in this way, subsequent needs to provide notification message to the good friend of the user D, to notify the user D just and thereonGrade leader together, not bother him temporarily;And about user C, then its good friend need not be notified, because even user CPhone, information etc. are received, will not generally be caused situations such as other side is disrespected.
In the case where server safeguards above-mentioned user state information, client can be by way of inquiry, from clothesBusiness device obtains required user state information.For example, certain user opens its contacts list, prepare to join with certain contact person thereinSystem, at this point, client can send the request for obtaining user state information to server first, in this way, server can be firstThe contacts list (information can generally be saved in server) of client associate user is first obtained, then, judgement shouldIt whether include the target user in the preset condition in contacts list, if it is, can will be at the target userIt is returned in the information of the preset condition, in this way, client can provide this information to association user.For example, certain moment,The request of certain user client is had received, at this point, the state of each user is as shown in table 3 in database, and user D is lucky at this timeAppear in the contacts list of requesting party user, accordingly, it is possible to should " user D is just together with its leading body at a higher level " thisInformation returns to client, in this way, client can be prompted to requesting party user.Specific prompting mode can there are many,For example, adding words identification, picture identification, etc. in the corresponding entry of contacts list.At this point, if requesting party user is properIt is good to want to contact with the user D, after seeing the prompt information, so that it may not contact temporarily, until the prompt information disappearsRow connection again after mistake can also avoid excessive resource wave so that the talk of user D and leading body at a higher level be avoided to be disturbedTake.
Embodiment two
The embodiment is second is that client implementation corresponding with embodiment one, and referring to fig. 2, the embodiment two is from clientThe angle at end provides a kind of method of offer user state information, and this method can specifically include following steps:
S201: it when client receives the user instruction for opening contacts list, is sent to server and obtains User StatusThe request of information, so that whether server judges in the contacts list to include the target user in preset condition, ifIt is then to return to the information that the target user is in the preset condition;Wherein, the preset condition is for indicating: describedTarget user is just together with its particular kind of relationship user;
S202: the information returned according to the server provides prompt information, and the prompt information is for prompting the meshMark user is in the preset condition.
Due to embodiment two with embodiment first is that corresponding, relevant specific implementation may refer to embodiment oneIn introduction, which is not described herein again.
Embodiment three
It is by server from global angle, in each user set in previous embodiment one and embodiment twoUser Status is detected in advance, in this way, after receiving the request of client, so that it may directly pass through the side of inquiry databaseFormula carrys out returning response.And in the embodiment of the present application three, in order to reduce the workload of server, client can also receivedSpecific inquiry request after, then judge with carrying out purpose, and return to judging result.
As shown in figure 3, the embodiment three provides the method for another offer user state information from the angle of server,This method may comprise steps of:
S301: server pre-establishes user relationship data library, and multiple user's set are preserved in the customer data base,It include two users with particular kind of relationship in each user's set;
The step is identical as the step S101 in embodiment one.
S302: the request of the User Status for the acquisition designated user that client is sent is received;
Under this implementation, for client, it can be and open contacts list in user, and selected itIn a contact person prepare when associating, the above-mentioned request of sending, therefore, so-called designated user can refer to that this is selectedContact person.
S303: judging whether the designated user appears in user's set, if it is, determining user setIn each target user current geographic position information;
S304: the geographical location information of each target user is compared;
S305: if the distance between each target user is less than preset threshold value, the finger is returned to the clientDetermine the information that user is in preset condition, the preset condition is for indicating: the designated user just with its particular kind of relationship userTogether.
Other each steps are similar with embodiment one, and therefore, the introduction in detailed in Example one, which is not described herein again.
Example IV
The example IV is corresponding with embodiment three, namely from the angle of client, provides a kind of offer userThe method of status information, referring to fig. 4, this method may comprise steps of:
S401: client is sent after receiving opening contacts list and selecting the instruction of designated user to serverThe request of the User Status of the designated user is obtained, so that server judges whether the designated user appears in preset userIn set, if it is, determining the current geographic position information of each target user in user set, and by each meshThe geographical location information of mark user is compared, if the distance between each target user is less than preset threshold value, returns to instituteState the information that designated user is in preset condition, the preset condition is for indicating: the designated user just with its particular kind of relationshipUser is together;
S402: the information returned according to the server provides prompt information, and the prompt information is for prompting the meshMark user is in the preset condition.
Since user has selected designated user in the contact list, it is detailed that the designated user thus may be triggeredContact details interface is opened, or the interface to engage in the dialogue with the designated user is opened, and therefore, is providing prompt informationWhen, it can be and prompted in contact details interface or dialog interface.
About specific implementations other in the example IV, the introduction in embodiment one also may refer to, it is no longer superfluous hereIt states.
Corresponding with the offer method of user state information that embodiment one provides, the embodiment of the present application also provides one kindThe device of user state information is provided, is applied to server, referring to Fig. 5, which be can specifically include:
Database unit 501 is preserved more for pre-establishing user relationship data library in the customer data baseA user gathers, and includes two users with particular kind of relationship in each user's set;
Location information collector unit 502, for collecting the current geographic position information of user;
Location information comparing unit 503, for for each target user in same user set, synchronization to be receivedThe geographical location information collected is compared;
Status information marks unit 504, if be less than for the distance between each target user in certain user set pre-Threshold value is set, then the target user in user set is labeled as preset condition, the preset condition is for indicating: describedTarget user is just together with its particular kind of relationship user.
When specific implementation, which can also include:
Markup information deletes unit, for monitoring the distance between each target user in the preset conditionBeyond the preset threshold value, and after lasting preset time length, the markup information about preset condition is deleted.
Wherein, for asymmetrical particular kind of relationship, a wherein side is also saved in the user relationship data library and needs to be markedThe target user of note;The status information mark unit is specifically used for:
The target user that the needs in user set are marked is labeled as preset condition.
In practical applications, which can also include:
First request reception unit, when for receiving the request of acquisition user state information of client, described in acquisitionThe contacts list of client associate user;
First judging unit, for judging in the contacts list whether to include that the target in the preset condition is usedFamily, if it is, the information that the target user is in the preset condition is returned, so that the client proposes the informationSupply the association user.
Corresponding with the offer method of user state information that embodiment two provides, the embodiment of the present application also provides one kindThe device of user state information is provided, is applied to client, referring to Fig. 6, which be can specifically include:
First request transmitting unit 601 is sent when for receiving the user instruction for opening contacts list to serverThe request of user state information is obtained, so that server judges in the contacts list whether to include the mesh in preset conditionUser is marked, if it is, the information that the target user is in the preset condition is returned;Wherein, the preset condition is usedIn expression: the target user is just together with its particular kind of relationship user;
First prompt unit 602, the information for being returned according to the server provide prompt information, the prompt letterBreath is for prompting the target user to be in the preset condition.
Corresponding with the offer method of user state information that embodiment three provides, the embodiment of the present application also provides one kindThe device of user state information is provided, is applied to server, referring to Fig. 7, which be can specifically include:
Database unit 701 is preserved more for pre-establishing user relationship data library in the customer data baseA user gathers, and includes two users with particular kind of relationship in each user's set;
Second request reception unit 702, the request of the User Status of the acquisition designated user for receiving client transmission;
Second judgment unit 703, for judging whether the designated user appears in user's set, if so,Then determine the current geographic position information of each target user in user set;
Comparing unit 704, for the geographical location information of each target user to be compared;
Return unit 705, if being less than preset threshold value for the distance between each target user, to the clientReturn to the information that the designated user is in preset condition, the preset condition is for indicating: the designated user is just special with itDetermine relational users together.
Corresponding with the offer method of user state information that example IV provides, the embodiment of the present application also provides one kindThe device of user state information is provided, is applied to client, referring to Fig. 8, which be can specifically include:
Second request transmitting unit 801, for opening contacts list and after selecting the instruction of designated user receiving,The request for obtaining the User Status of the designated user is sent, to server so that server judges whether the designated user occursIn preset user's set, if it is, determine the current geographic position information of each target user in user set, andThe geographical location information of each target user is compared, if the distance between each target user is less than preset thresholdValue, then return to the information that the designated user be in preset condition, and the preset condition is used to indicate: the designated user just withIts particular kind of relationship user is together;
Second prompt unit 802, the information for being returned according to the server provide prompt information, the prompt letterBreath is for prompting the target user to be in the preset condition.
By the embodiment of the present application, its user relationship data library can be pre-established, and according to position geographical where userWhether just together the comparison of confidence breath determines to have the user of particular kind of relationship, if it is, can be to the good of this userThe clients such as friendly user provide relevant notification message, so that client prompts its good friend user, in this way, if whereinWhen the good friend user of one side wants to contact with the user, temporarily may no longer it be contacted due to the presence of the prompt information, fromAnd the user is avoided to be disturbed, it is also possible to reduce the waste to Internet resources.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application canIt realizes by means of software and necessary general hardware platform.Based on this understanding, the technical solution essence of the applicationOn in other words the part that contributes to existing technology can be embodied in the form of software products, the computer software productIt can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that a computer equipment(can be personal computer, server or the network equipment etc.) executes the certain of each embodiment of the application or embodimentMethod described in part.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodimentDividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system orFor system embodiment, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to methodThe part of embodiment illustrates.System and system embodiment described above is only schematical, wherein the conductThe unit of separate part description may or may not be physically separated, component shown as a unit can be orPerson may not be physical unit, it can and it is in one place, or may be distributed over multiple network units.It can rootAccording to actual need that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Ordinary skillPersonnel can understand and implement without creative efforts.
Above to the method and device of offer user state information provided herein, it is described in detail, hereinIn apply specific case the principle and implementation of this application are described, the explanation of above example is only intended to sidesAssistant solves the present processes and its core concept;At the same time, for those skilled in the art, the think of according to the applicationThink, there will be changes in the specific implementation manner and application range.In conclusion the content of the present specification should not be construed as pairThe limitation of the application.