The present disclosure relates to computer and communication technology and, more particularly, to a method and device for establishing a label library, and a method and device for searching for a user.
With the development of the social networking service (SNS), Internet has been extended from an application platform for research institutes, schools, governments, and businesses to a social communication tool for ordinary people to meet their social demands, taking the place of traditional social interaction. The SNS, based on the principle of “low substitute cost,” reduces time and costs in social interaction, i.e., reduces costs in information management and transfer. With the SNS, it has become possible to send and receive emails to and from friends thousands of miles away, complete a project with them and enjoy entertainments together. In addition to that, a user can search for other users in the SNS and add them to a contact list. As such, the user can make new friends and expand his/her personal relationship and social communication circle.
At present, when searching for a contact according to a specific condition in the SNS, a user normally searches in his direct contact list or in the whole social network.
In accordance with the present disclosure, there is provided a method for establishing a label library. The method includes receiving label information made by a labeling user regarding a labeled user in a social network, storing the labeling user, the labeled user, and the label information as a relationship, and establishing a label library based on the relationship.
Also in accordance with the present disclosure, there is provided a method for searching for a user. The method includes receiving a search request sent to a label library. The search request includes a search initiator and a search keyword, and the label library includes at least one relationship. Each of the at least one relationship includes a labeling user, a labeled user, and label information made by the labeling user regarding the labeled user. The method further includes determining at least one contact of a predetermined level of the search initiator, searching for matched label information matching the search keyword among label information in the label library that has the at least one contact as a labeling user, and returning the matched label information.
Also in accordance with the present disclosure, there is provided a device for establishing a label library. The device includes a processor and a non-transitory computer-readable storage medium storing instructions. The instructions, when executed by the processor, cause the processor to receive label information made by a labeling user regarding a labeled user in a social network, store the labeling user, the labeled user, and the label information as a relationship, and establish a label library based on the relationship.
Also in accordance with the present disclosure, there is provided a device for searching for a user. The device includes a processor and a non-transitory computer-readable storage medium storing instructions. The instructions, when executed by the processor, cause the processor to receive a search request sent to a label library. The search request includes a search initiator and a search keyword, and the label library includes at least one relationship. Each of the at least one relationship includes a labeling user, a labeled user, and label information made by the labeling user regarding the labeled user. The instructions further cause the processor to determine at least one contact of a predetermined level of the search initiator based on the at least one relationship, search for matched label information matching the search keyword among label information in the label library that has the at least one contact as a labeling user, and return the matched label information.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Hereinafter, a further detailed description will be given to the technical solutions of the embodiments of the disclosure with reference to the accompanied drawings and the embodiments.
The accompanying drawings, for further understanding of the embodiments of the present disclosure, constitute a part of this specification, together with the embodiments of the disclosure, serve to explain the present disclosure, and should not constitute limitation to the embodiments of the disclosure. In the drawings:
Through the above accompany drawings, the specific embodiments of the present disclosure have been shown, for which a more detailed description will be given below. These drawings and textual description are not intended to limit the scope of the concept of the present disclosure in any manner, but to explain the concept of the present disclosure to those skilled in the art through particular embodiments.
Embodiments of the present disclosure are described below with reference to the attached drawings. However, it should be understood that the embodiments described herein are merely for explaining and illustrating the present disclosure, but are not intended to limit the scope of the present disclosure. Methods for establishing a label library and for searching for a user according to the embodiments of the present disclosure can be implemented, for example, in a server that provides social networking services.
At S102, the labeling user, the labeled user, and the label information are stored as a user relationship, and the label library is established based on at least one user relationship in the social network. In some embodiments, a validity period of the label information may also be acquired. The labeling user, the labeled user, the label information, and the validity period of the label information are stored as a user relationship. When the label information expires at the end of the validity period, the labeling user, the labeled user, and the label information related to the validity period are deleted from the label library. The validity period can be defined by the labeling user, by the labeled user, or by a system implementing the method of the present disclosure.
According to the present disclosure, a search for a contact is based on both the label information and the user relationship, where the user that is located has an indirect relationship with the searching user. Therefore, the user that is located is more reliable, and the success rate of the search can be improved.
At S202, it is judged whether the labeled user permits labeling. If the labeled user permits labeling, the process proceeds to S203. Otherwise, the process proceeds to S204.
For example, whether the labeled user permits labeling can be judged by reading a value of a field “Whether permit labeling” defined by the labeled user in data regarding the labeled user. A value of “Yes” in this field indicates that the labeled user permits labeling. On the other hand, a value of “No” in this field indicates that the labeled user does not permit labeling.
At S203, the labeling user, the labeled user, and the label information are stored as a user relationship, and the label library is established based on at least one user relationship in the social network.
At S204, a message indicating that the labeled user does not permit labeling is sent to the labeling user.
At S302, the label information is sent to the labeled user for confirmation.
At S303, it is judged whether a message indicating that the labeled user accepts the label information is received. If such a message is received, the process proceeds to S304. If no such a message is received, the process proceeds to S305.
At S304, the labeling user, the labeled user, and the label information are stored as a user relationship, and the label library is established based on at least one user relationship in the social network.
At S305, a message indicating that the labeled user denies the label information is sent to the labeling user.
At S402, the label information made by the labeling user to the labeled user is sent to the labeled user for supplementation. For example, if the labeling user has labeled the labeled user as a software engineer in the label information, then the labeled the user can supplement the label information to add programming languages that the labeled user knows and related development skills.
At S403, the supplemented label information sent from the labeled user is received.
At S404, the labeling user, the labeled user, and the supplemented label information are stored as a user relationship, and the label library is established based on at least one user relationship in the social network.
At S502, a request for labeling the labeled user is sent to each of the at least one labeling user.
At S503, label information made by at least one of the at least one labeling user regarding the labeled user is received.
At S504, the label information is sent to the labeled user for confirmation.
At S505, it is judged whether a message indicating that the labeled user accepts the label information is received. If such a message is received, the process proceeds to S506. If no such message is received, the process proceeds to S507.
At S506, the labeling user, the labeled user, and the label information are stored as a user relationship, and a label library is established based on at least one user relationship in the social network.
At S507, a message indicating that the labeled user denies the label information is sent to the labeling user.
At S602, a request for labeling the labeled user is sent to each of the at least one labeling user. The request includes the first label information.
At S603, second label information made by the labeling user regarding the labeled user is received. In some embodiments, if the labeling user makes no changes, the first label information is identical to the second label information.
At S604, the labeling user, the labeled user, and the second label information are stored as a user relationship, and a label library is established based on at least one user relationship in the social network.
At S702, based on the at least one user relationship in the label library, at least one contact of a predetermined level of the search initiator is determined. Each of the at least one contact of the predetermined level is a contact having a user relationship with the search initiator within the predetermined level based on the at least one user relationship. For example, User B is User A's friend and thus is a first-level contact of User A. User C is not a first-level contact of User A but is a friend of User B, so that User C is a second-level contact of User A. User D is neither a first-level contact nor a second-level contact of User A, but is a friend of User C, so that User D is a third-level contact of User A. The predetermined level can be set by the search initiator or by the system.
At S703, label information in the label library that has the at least one contact as a labeling user is searched to determine the label information matching the search keyword.
At S704, the matched label information that is located by the searching is returned.
In some embodiments, based on the at least one user relationship in the label library, a user relationship among the search initiator, a labeling user associated with the matched label information, and a labeled user associated with the matched label information can be acquired. The acquired user relationship is sent to the search initiator and/or the labeled user associated with the matched label information. For example, User A finds User C, who is a second-level contact u of User A, by searching for the label made by User B, who is a first-level contact of User A. Hence the user relationship among User A, User B, and User C is that User A finds User C, who is a labeled user, via User B.
At S802, at least one contact of a predetermined level of User A is determined based on the at least one user relationship in the label library.
At S803, label information in the label library that has the at least one contact as a labeling user is searched for label information matching the search keyword “art designer.”
At S804, information of User C as the labeled user that is related to the matched label information is sent to User A.
For example, User B is a first-level contact of User A. The label information made by User B regarding User C is “art designer.” Assume User A needs an art designer, but does not know User C. User A can find User C with the label “art designer” made by User B.
At S902, at least one contact of a predetermined level of User A is determined based on the at least one user relationship in the label library.
At S903, label information in the label library that has the at least one contact as a labeling user is searched to determine the label information matching the search keyword “software engineer needed.” For example, labels matching the keyword “software engineer needed” may be “I am a software engineer,” “Engaged in software engineering,” “Software engineer,” “IT worker,” or the like.
At S904, information of the labeled user, e.g., User C, which is associated with the matched label information, is sent to User A, and information of User A is sent to User C. In some embodiments, only information of User C is sent to User A, or only information of User A is sent to User C.
At S1002, at least one contact of a predetermined level of User A is determined based on the at least one user relationship in the label library.
At S1003, label information in the library that has the at least one contact as a labeling user is searched to determine the label information matching the search keyword “software engineer needed.”
At S1004, information of the labeled user, e.g., User C, which is associated with the matched label information, and a user relationship between User C and User A are sent to User A. In some embodiments, the user relationship between User C and User A can also be sent to User C to ensure that User C timely becomes aware of other users whose label information matches User C's label information.
At S1005, a request to add User C as a contact of User A sent from User A to User B in the user relationship of User A is received.
At S1006, the request is sent to User B.
At S1007, it is judged whether a message indicating that User B allows User A to add User C as a contact is received. If such a message is received, the process proceeds to S1008. If no such message is received, the process proceeds to S1011.
At S1008, a message indicating that User A requests to add User C as a contact via user B is sent to User C.
At S1009, it is judged whether a message indicating that User C allows User A to add User C as a contact is received. If such a message is received, the process proceeds to S1010. If no such message is received, the process proceeds to S1011.
At S1010, User C and User A are set as contact of each other.
At S1011, a message indicating that the request is denied is sent to User A.
In some embodiments, the request sent from the labeled user for inviting the at least one labeling user to label the labeled user includes label information made by the labeled user regarding himself or herself. The request for labeling the labeled user sent to each of the at least one labeling user also includes the label information made by the labeled user regarding himself or herself.
In some embodiments, the search request is sent by the search initiator to the label library and the returning module 1704 is further configured to send information of a labeled user associated with the matched label information to the search initiator.
In some embodiments, the search request is a search request in which the search initiator is a labeled user associated with a piece of label information in the label library, and the search keyword is acquired from the piece of label information. In this scenario, the returning module 1704 is further configured to send the matched label information to the search initiator and/or a labeled user associated with the matched label information.
In some embodiments, the predetermined level is set by the search initiator or in default.
Other features and advantages of embodiments of the present disclosure will be set forth in the following description. Moreover, it will become apparent from the present disclosure, or be understood by implementing the present disclosure. Advantages of the present disclosure may be realized and achieved by structures specially specified in the description, the claims, and the accompanied drawings.
It should be understood by those skilled in the art that the embodiments of the present disclosure may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present disclosure may take forms of embodiments of mere hardware, mere software, or a combination of software and hardware. Furthermore, the present disclosure may take forms of computer program products executed on one or more non-transitory computer-readable storage media (including but not limited to disk storage, CD-ROM and optical storage, etc.) containing computer-readable program codes.
The present disclosure is described with reference to flowcharts and/or block diagrams of the method, the mobile device (system) and a computer program product according to the embodiments of the present disclosure. It should be understood that each process and/or block in the flowcharts and/or block diagrams, and combinations of processes and/or blocks in the flowcharts and/or block diagrams, may be realized by computer program instructions. These computer program instructions may be supplied to a general-purpose computer, a special-purpose computer, an embedded processor, or processors of other programmable data processing devices, to create a machine, such that a device for realizing functions designated in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams, may be produced by instructions performed by a computer or processors of other programmable data processing devices.
These computer program instructions may also be stored in a computer readable storage that can boot a computer or other programmable data processing devices to operate in a specific way, such that a manufactured articles including an instruction device may be produced by the instructions stored in said computer readable storage, and said instruction device realizes the functions designated in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.
These computer program instructions may further be loaded into a computer or other programmable data processing devices, such that a series of operating steps may be performed on the computer or other programmable data processing devices, so as to generate processes realized by the computer, such that steps for realizing the functions designated in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams may be provided by the instructions executed on the computer or other programmable data processing devices.
For example,
In some embodiments, as shown in
Those skilled in the art may make various modifications and variations to the present disclosure without departing from the spirit and scope of the disclosure. Thus, the disclosure intends to include those modifications and variations as long as they are consistent with the scope of the claims of the present disclosure and the equivalent technology thereof.
Number | Date | Country | Kind |
---|---|---|---|
201310334335.2 | Aug 2013 | CN | national |
This application is a continuation of International Application No. PCT/CN2014/076042, filed Apr. 23, 2014, which is based upon and claims priority to Chinese Patent Application No. CN201310334335.2, filed Aug. 2, 2013, the entire contents of both of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2014/076042 | Apr 2014 | US |
Child | 14886267 | US |