CN110033388B - Social relationship establishing method and device and server - Google Patents
Social relationship establishing method and device and server Download PDFInfo
- Publication number
- CN110033388B CN110033388B CN201910166329.8A CN201910166329A CN110033388B CN 110033388 B CN110033388 B CN 110033388B CN 201910166329 A CN201910166329 A CN 201910166329A CN 110033388 B CN110033388 B CN 110033388B
- Authority
- CN
- China
- Prior art keywords
- user
- identifier
- group photo
- users
- social relationship
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 238000001514 detection method Methods 0.000 claims description 9
- 238000005065 mining Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 8
- 238000000605 extraction Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 2
- 238000000513 principal component analysis Methods 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/01—Social networking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Landscapes
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Marketing (AREA)
- Economics (AREA)
- Human Resources & Organizations (AREA)
- Computing Systems (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention provides a method, a device and a server for establishing a social relationship, wherein the server acquires a first group photo and an identifier of a first user, which are sent by a first terminal corresponding to the first user, performs face recognition on each user in the first group photo according to the identifier of the first user and a first database, acquires at least one identifier of a second user, determines at least one identifier of a third user according to the identifier of each second user and the current social relationship of the first user, and sends the identifier of each third user to the first terminal so that the first terminal establishes the social relationship between the first user and each third user; because the first group photo of the first user comprises the strong connection and/or weak connection relation of the first user, the mining of the social relation of the first user according to the first group photo is realized by identifying each user in the first group photo by using the first database, and the social circle of the first user is fully expanded.
Description
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to a method, a device and a server for establishing a social relationship.
Background
The social network greatly enriches the social circle of people, and people can share more information and resources through the social network. Each user can own friends in the social network, the friends in the social network are a kind of personal resources for the user, and the user can obtain more resources through the friends in the social network, so that the user wants to fully mine the number of the friends in the social network.
In the existing social network, a user pays attention to an opposite party by searching for an account number or a name of another person, so that the user needs to know what the account number or the name of the other person is to pay attention to the user.
However, in the internet era, social relationships between people fall into two categories: strong connections and weak connections. For strongly connected social relationships, for example: friends and relatives can easily know their accounts or names, so that a strong social relationship can be easily established in the existing social network; while for weakly connected social relationships, for example: people who are not familiar with the social network cannot easily know their account numbers or names, and therefore, the social circle of the user cannot be enlarged by fully utilizing the social relationship of weak connection in the conventional social network.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a server for establishing a social relationship.
In a first aspect, an embodiment of the present invention provides a method for establishing a social relationship, which is applied to a server, and includes:
acquiring a first group photo sent by a first terminal corresponding to a first user and an identifier of the first user;
according to the identification of the first user and a first database, carrying out face recognition on each user in the first group photo to obtain the identification of at least one second user, wherein the identification of different users and the head portraits of different users are stored in the first database;
determining an identifier of at least one third user according to the identifiers of the second users and the current social relationship of the first user, wherein the third user is a user which does not establish the social relationship with the first user in the second users;
and sending the identification of each third user to the first terminal, so that the first terminal establishes a social relationship between the first user and each third user.
Optionally, the performing face recognition on each user in the first group photo according to the identifier of the first user and the first database to obtain the identifier of at least one second user includes:
determining the head portrait of the first user according to the identification of the first user and the first database;
carrying out face detection on the first group photo to obtain a face corresponding to each user;
determining the faces of other users except the face of the first user in the faces corresponding to the users according to the head portrait of the first user;
and for the face of each of the other users, obtaining the similarity between the faces of the other users and the head portraits of the users in the first database, and taking the user identification corresponding to the head portraits with the similarity meeting the preset conditions as the identification of the second user.
Optionally, after obtaining the identifier of the at least one second user, the method further includes:
determining the identification of a fourth user in the identifications of the second users, wherein the fourth user is at least part of the second users;
acquiring an identifier of a fifth user having a social relationship with the fourth user;
and sending the identifier of the fifth user to the first terminal, so that the first terminal establishes a social relationship between the first user and the fifth user.
Optionally, a preset area is marked in the first group photo, where the preset area includes one or more of the second users;
the determining, in the identifiers of the second users, an identifier of a fourth user includes:
and determining the identifier of a fourth user according to the identifiers of the second users in the preset area.
Optionally, the obtaining an identifier of a fifth user having a social relationship with the fourth user includes:
acquiring at least one second group photo in a second database according to the identifier of the fourth user, wherein the second group photo is a group photo of the fourth user and a fifth user;
and for each second group photo, performing face recognition on each user in the second group photo according to the identifier of the fourth user and the first database to obtain the identifier of the fifth user.
Optionally, after determining the identifier of the at least one third user, the method further includes:
and sending the identifier of the first user to a second terminal corresponding to each third user so that the second terminal establishes a social relationship between the third user and the first user.
Optionally, after obtaining the identifier of the fifth user having a social relationship with the fourth user, the method further includes:
and sending the identifier of the first user to a third terminal corresponding to each fifth user, so that the third terminal establishes a social relationship between the fifth user and the first user.
In a second aspect, an embodiment of the present invention provides an apparatus for establishing a social relationship, which is applied to a server, and includes:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a first group photo sent by a first terminal corresponding to a first user and an identifier of the first user;
the second obtaining module is used for carrying out face recognition on each user in the first group photo according to the identification of the first user and a first database to obtain at least one identification of a second user, wherein the first database stores identifications of different users and head portraits of different users;
the second obtaining module is further configured to determine an identifier of at least one third user according to the identifiers of the second users and the current social relationship of the first user, where the third user is a user of the second users who does not establish a social relationship with the first user;
and the sending module is used for sending the identification of each third user to the first terminal so that the first terminal establishes the social relationship between the first user and each third user.
Optionally, the second obtaining module is specifically configured to:
determining the head portrait of the first user according to the identification of the first user and the first database;
carrying out face detection on the first group photo to obtain a face corresponding to each user;
determining the faces of other users except the face of the first user in the faces corresponding to the users according to the head portrait of the first user;
and for the face of each of the other users, obtaining the similarity between the faces of the other users and the head portraits of the users in the first database, and taking the user identification corresponding to the head portraits with the similarity meeting the preset conditions as the identification of the second user.
Optionally, the apparatus further comprises: a third obtaining module configured to:
determining the identification of a fourth user in the identifications of the second users, wherein the fourth user is at least part of the second users;
acquiring an identifier of a fifth user having a social relationship with the fourth user;
and sending the identifier of the fifth user to the first terminal, so that the first terminal establishes a social relationship between the first user and the fifth user.
Optionally, a preset area is marked in the first group photo, where the preset area includes one or more of the second users;
the third obtaining module is specifically configured to:
and determining the identifier of a fourth user according to the identifiers of the second users in the preset area.
Optionally, the third obtaining module is specifically configured to:
acquiring at least one second group photo in a second database according to the identifier of the fourth user, wherein the second group photo is a group photo of the fourth user and a fifth user;
and for each second group photo, performing face recognition on each user in the second group photo according to the identifier of the fourth user and the first database to obtain the identifier of the fifth user.
Optionally, the sending module is further configured to:
and sending the identifier of the first user to a second terminal corresponding to each third user so that the second terminal establishes a social relationship between the third user and the first user.
Optionally, the sending module is further configured to:
and sending the identifier of the first user to a third terminal corresponding to each fifth user, so that the third terminal establishes a social relationship between the fifth user and the first user.
In a third aspect, an embodiment of the present invention provides a server, including: at least one processor and a memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any one of the first aspects.
In a fourth aspect, the embodiments of the present invention also provide a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method according to any one of the first aspect is implemented.
According to the method, the device and the server for establishing the social relationship, provided by the embodiment of the invention, the server acquires the first group photo sent by the first terminal corresponding to the first user and the identification of the first user, carries out face recognition on each user in the first group photo according to the identification of the first user and the first database, acquires the identification of at least one second user, determines the identification of at least one third user according to the identification of each second user and the current social relationship of the first user, and sends the identification of each third user to the first terminal, so that the first terminal establishes the social relationship between the three-purpose first user and each third user; because the first group photo of the first user includes the relationship of the strong connection and/or the weak connection of the first user, the social relationship of the first user is mined according to the first group photo by identifying each user in the first group photo by using the first database, so that the social circle of the first user is fully enlarged.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram illustrating a scenario in which an embodiment of the present invention is applied;
fig. 2 is a schematic flowchart of an embodiment of a method for establishing a social relationship according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for establishing a social relationship according to another embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for obtaining an identifier of a fifth user having a social relationship with a fourth user according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a method for establishing a social relationship according to yet another embodiment of the present invention;
fig. 6 is a schematic interface diagram of uploading a group photo by a terminal according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an embodiment of an apparatus for establishing a social relationship according to the present invention;
fig. 8 is a schematic structural diagram of an apparatus for establishing a social relationship according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As described above, in the existing social network, a user pays attention to another party by searching for an account number or a name of another person, which requires the user to know what the account number or the name of another person is. However, in the internet era, social relationships between people are divided into two categories: strong connections and weak connections. For strongly connected social relationships, for example: friends and relatives can easily know their accounts or names, so that a strong social relationship can be easily established in the existing social network; while for weakly connected social relationships, for example: people who are not familiar with the social network cannot easily know their account numbers or names, so that the social circle of the user cannot be enlarged by fully utilizing the social relationship of weak connection in the conventional social network.
The inventor finds that the relationship of the user relationship is usually hidden in the group photo, and specifically, when a first user and at least one second user perform group photo, the social relationship between the first user and each second user is divided into two types, the first type is: the first user and the second user have a strong connection relationship, for example: the first user and the second user are friends and relatives, and the first user is very familiar with the second user; the second method is as follows: the first user has a weak connection relationship with the second user, i.e., the first user is not familiar to the second user.
Therefore, the embodiment of the invention provides a method, a device and a server for establishing a social network, which are used for mining the social relationship of a first user according to a first group photo by performing face recognition on each user in the first group photo of the first user, so that the social circle of the first user is fully expanded.
Fig. 1 is a schematic view of a scenario in which the embodiment of the present invention is applied, and as shown in fig. 1, the scenario includes: a server and at least one terminal. The server is connected with each terminal through the Internet or the mobile Internet. In one possible scenario, the server is a server of a social network, the server runs a server of the social network in the server, and the terminal runs a client of the social network in the terminal. The user can interact with the server through the client side, and the establishment of the social relationship is achieved.
The social network in this embodiment refers to a network that is used to manage relationships between people in a broad sense, and the method for establishing a social relationship provided in this embodiment is applicable to any existing social network and is also applicable to social networks that may appear in the future.
The method for establishing the social network provided by this embodiment may be executed by the server in fig. 1, and specifically, may be arranged in the server in fig. 1 in the form of software and/or hardware.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a flowchart illustrating an embodiment of a method for establishing a social relationship according to an embodiment of the present invention, where the method of the present embodiment may be executed by the server in fig. 1. As shown in fig. 2, the method of the present embodiment includes:
s201: the method comprises the steps of obtaining a first group photo sent by a first terminal corresponding to a first user and an identification of the first user.
Specifically, a client of the social network is operated on the first terminal, and a server of the social network is operated in the server. The first user uploads the first group photo of the first user and other people to the client, and then the client sends the identification of the first user and the first group photo to the server.
The format of the first group photo is not particularly limited in the embodiment of the present invention, and the first group photo may be a group photo in any format. In addition, the group photo may be a group photo of two users, or a group photo of multiple users, and the number of users in the group photo is not specifically limited in the embodiment of the present invention.
S202: and performing face recognition on each user in the first group photo according to the identification of the first user and a first database to obtain the identification of at least one second user, wherein the first database stores the identifications of different users and the head portraits of different users.
Specifically, in this embodiment, the face of each user in the first group photo is matched with the first database, so as to obtain the identifier of each second user. The user identifier may be any identifier for characterizing the user, including but not limited to: name, account number, nickname, etc.
The first database stores the identities of different users and the head portraits of different users. For example: the first database may be a database of registered users of the social network for storing registration information of all registered users, including but not limited to: name, nickname, account number, avatar, etc.
It will be appreciated that when the first database is a database of registered users of a social network, there may be situations where: some users in the first group photo are registered in the social network, and some users are not registered in the social network, so that the users registered in the social network can be identified when face recognition is performed by using the first database, and the users not registered in the social network cannot be identified.
In this embodiment, for convenience of description, a user that can be identified from the first database is referred to as a second user. That is, the second user is part or all of the remaining users of the first group photo except the first user.
In a specific implementation process, there may be a plurality of implementation manners in the process of performing face recognition on each user in the first group photo according to the first database, and the following detailed description will be given by taking only one optional implementation manner as an example.
Determining the head portrait of the first user according to the identification of the first user and the first database; carrying out face detection on the first group photo to obtain a face corresponding to each user; determining the faces of other users except the face of the first user in the faces corresponding to the users according to the head portrait of the first user; and for the face of each of the other users, obtaining the similarity between the faces of the other users and the head portraits of the users in the first database, and taking the user identification corresponding to the head portraits with the similarity meeting the preset conditions as the identification of the second user.
Various existing algorithms and models can be adopted to realize the process of face detection on the first group photo. For example, the existing face detection may use a template matching Model, a skin color Model, an Active Appearance Model (AAM), a Support Vector Machine (SVM) Model, an Adaboost Model, etc., which have different detection accuracy and speed. The face detection in the present embodiment is not limited to the above-described technique, and may be implemented using various other algorithms and models as needed.
In addition, the process of recognizing the human face is a process of extracting features of the human face and calculating similarity of the extracted features, and the features of the human face are matched through a machine learning algorithm. The extraction of the face feature data comprises feature extraction based on a template, feature extraction based on an algebraic method, feature extraction based on an elastic matching method, feature extraction based on a neural network, feature extraction based on wavelet multiresolution and the like. There are also many descriptions of face feature data, such as: principal Component Analysis (PCA), and the like. The face feature extraction in the present embodiment is not limited to the above-mentioned technology, and may be implemented by using various algorithms and models according to actual needs.
S203: and determining the identifier of at least one third user according to the identifiers of the second users and the current social relationship of the first user, wherein the third user is a user which does not establish the social relationship with the first user in the second users.
Specifically, after the identification of each second user that can be identified in the first group photo is obtained, which users have established a social relationship with the first user and which users have not established a social relationship with the first user in each second user can be determined according to the current social relationship of the first user. In this embodiment, for convenience of description, a second user who does not establish a social relationship with the first user is referred to as a third user.
S204: and sending the identification of each third user to the first terminal so that the first terminal establishes a social relationship between the first user and each third user.
Specifically, after acquiring the identifiers of the third users, the server sends the identifiers of the third users to the first terminal corresponding to the first user, and the first terminal establishes the social relationship between the first user and the third users. When the first terminal establishes the social relationship between the first user and each third user, the first terminal can provide a list including all the third users for the first user, and the user selects part or all of the third users to establish the social relationship according to the requirement and the will of the user.
It should be noted that, a manner in which the first terminal establishes the social relationship between the first user and the third user may be to add the third user as a friend of the first user for the first terminal, add the third user to the concerned user list of the first user for the first terminal, and of course, may also be other social relationships, which is not specifically limited in this embodiment of the present invention. Regardless of the social relationship in any way, after the first user establishes the social relationship with the third user, the first user can timely acquire information such as the state of the third user, information shared by the third user and the like.
Optionally, on the basis of the above steps, the method of this embodiment may further include:
and sending the identifier of the first user to a second terminal corresponding to each third user so that the second terminal establishes a social relationship between the third user and the first user.
Specifically, while the identifier of the third user is sent to the first terminal, the identifier of the first user may also be sent to a second terminal corresponding to the third user, so that the second terminal establishes the social relationship between the third user and the first user.
In the following, with reference to the implementation process of the example embodiment, assuming that the first user is user a, user a sends the first group photo to the server through the first terminal, where the first group photo is a group photo of user a, user B, user C, and user D, and it is assumed that all the users are registered in the social network. After face recognition is performed on each user in the first group photo according to the first database, the identifier of the second user (user B, user C, or user D) can be obtained. Assuming that the social relationship between the user a and the user D is established, the identifier of the third user determined through S203 is the identifiers of the user B and the user C. Therefore, the server sends the identifications of the user B and the user C to the first terminal, and the first terminal establishes the social relationship between the user a and the user B and the social relationship between the user a and the user C. In addition, the server can also respectively send the identifier of the user a to the terminal corresponding to the user B and the terminal corresponding to the user C, so that the terminal corresponding to the user B establishes the social relationship between the user B and the user a, and the terminal corresponding to the user C establishes the social relationship between the user C and the user a.
In the method for establishing a social relationship provided in the embodiment of the present invention, a server obtains a first group photo and an identifier of a first user, which are sent by a first terminal corresponding to the first user, performs face recognition on each user in the first group photo according to the identifier of the first user and a first database, obtains an identifier of at least one second user, determines an identifier of at least one third user according to the identifier of each second user and a current social relationship of the first user, and sends the identifier of each third user to the first terminal, so that the first terminal establishes a social relationship between the first user and each third user; because the first group photo of the first user comprises the relationship of strong connection and/or weak connection of the first user, the mining of the social relationship of the first user according to the first group photo is realized by identifying each user in the first group photo by using the first database, so that the social circle of the first user is fully expanded.
In the embodiment shown in fig. 2, the face recognition is performed on each user in the first group photo according to the first database, the second user that can be recognized is obtained, a third user that does not establish a social relationship with the first user is determined among the second users, and the social circle of the first user is enlarged by establishing the social relationship between the first user and the third user. On the basis of the embodiment shown in fig. 2, after the second user is identified, the social relationship of the first user may be further mined according to the social relationship of the second user.
For convenience of understanding, the following description is continued with reference to an example, where a first user is a user a, the user a sends a first group photo to a server through a first terminal, where the first group photo is a group photo of the user a, the user B, the user C, and the user D, and after acquiring an identifier of a second user (the user B, the user C, and the user D) according to the embodiment shown in fig. 2, the embodiment may further mine the social relationship of the user a according to all or part of the social relationships among the user B, the user C, and the user D.
The following is a detailed description in conjunction with two specific embodiments.
Fig. 3 is a flowchart illustrating a method for establishing a social relationship according to another embodiment of the present invention, as shown in fig. 3, the method according to the present embodiment includes:
s301: and determining the identification of a fourth user in the identifications of the second users, wherein the fourth user is at least one part of the second users.
It should be noted that the method according to the embodiment of the present invention may be executed at any position after S202 in the embodiment shown in fig. 2, and the embodiment of the present invention is not limited in particular.
It is to be appreciated that in an alternative embodiment, the social relationships of the first user are further mined according to the social relationships of all the second users in the first group photo; in another optional implementation, the social relationship of the first user is further mined according to the social relationship of a part of the second users in the first group photo. For convenience of description, in this embodiment, a second user, on which the social relationship of the first user is further mined, is referred to as a fourth user, that is, the fourth user is all or part of the second user.
In an application scenario corresponding to this embodiment, the server performs face recognition on each user in the first group photo, and after the identifiers of the second users are obtained, the server automatically determines the identifier of the fourth user according to the identifier of each second user.
S302: and acquiring the identification of a fifth user having a social relation with the fourth user.
In an alternative embodiment, the identification of the fifth user may be obtained according to the current social relationship of the fourth user, for example: and acquiring a friend list or a concerned user list of the fourth user, and taking the friend or the concerned user of the fourth user as a fifth user.
In another alternative embodiment, the user who has been group-filmed with the fourth user may be used as the fifth user by performing face recognition on the group-filmed photograph containing the fourth user. Fig. 4 is a flowchart of a method for acquiring an identifier of a fifth user having a social relationship with a fourth user according to an embodiment of the present invention, as shown in fig. 4, including:
s3021: and acquiring at least one second group photo in a second database according to the identifier of the fourth user, wherein the second group photo is a group photo of the fourth user and a fifth user.
The second database may be a group photo database on the server side, in which all group photo uploaded by different users are stored. Specifically, the second database stores different group photo photos and the user identifiers included in the group photo photos.
The storage process of each group photo in the second database is briefly described below in connection with the embodiment shown in fig. 2. In the embodiment shown in fig. 2, after the server performs face recognition on each user in the first group photo according to the first database and acquires the identifier of the second user, the server establishes an association relationship between the first group photo and the identifier of the first user and the identifiers of each second user, and then stores the first group photo in the second database.
In this embodiment, at least one second group photo is obtained in the second database according to the identifier of the fourth user, where the second group photo is a group photo including the fourth user, and for convenience of description, other users except the fourth user in the second group photo are set as fifth users.
S3022: and for each second group photo, performing face recognition on each user in the second group photo according to the identifier of the fourth user and the first database to obtain the identifier of the fifth user.
In this embodiment, each second group photo is identified to obtain an identifier of a fifth user in the second group photo. It is understood that the specific implementation is similar to S202 in the embodiment shown in fig. 2, and is not described herein again.
S303: and sending the identifier of the fifth user to the first terminal, so that the first terminal establishes a social relationship between the first user and the fifth user.
Specifically, the specific implementation of S303 is similar to S204, and is not described herein again.
Optionally, in this embodiment, after sending the identifier of the fifth user to the first terminal, so that the first terminal establishes a social relationship between the first user and the fifth user, the method may further include:
s304: and sending the identifier of the first user to a third terminal corresponding to each fifth user, so that the third terminal establishes a social relationship between the fifth user and the first user.
That is to say, the first user can also be recommended to a third terminal corresponding to the fifth user, so that the third terminal establishes a social relationship between the fifth user and the first user, thereby implementing expansion of the social relationship of the fifth user.
Fig. 5 is a flowchart illustrating a method for establishing a social relationship according to another embodiment of the present invention, which is similar to the embodiment shown in fig. 3, and the social relationship of the first user is further mined according to part or all of the social relationships of the second user in this embodiment. An application scenario corresponding to this embodiment is as follows: when the first user uploads the first group photo to the client side of the social network through the first terminal, a preset area is further designated in the first group photo, wherein the preset area comprises one or more of the second users. The preset area is used for indicating that the social relationship of the first user is mined according to the social relationship of each user in the preset area.
As shown in fig. 5, the method of this embodiment includes:
s501: and determining an identifier of a fourth user according to the identifiers of the second users in a preset area, wherein the preset area is the identifier area in the first group photo, and the preset area comprises one or more second users.
It should be noted that the method according to the embodiment of the present invention may be executed at any position after S202 in the embodiment shown in fig. 2, and the embodiment of the present invention is not limited in particular.
S502: and acquiring the identification of a fifth user having a social relation with the fourth user.
S503: and sending the identifier of the fifth user to the first terminal, so that the first terminal establishes a social relationship between the first user and the fifth user.
S504: and sending the identifier of the first user to a third terminal corresponding to each fifth user, so that the third terminal establishes a social relationship between the fifth user and the first user.
The specific implementation of this embodiment is similar to the embodiment shown in fig. 3, and is not described here in detail. The difference is that when the fourth user is determined among the second users, the fourth user is determined according to the second user included in the preset area designated by the user.
Fig. 6 is a schematic view of an interface for uploading a group photo by a terminal according to an embodiment of the present invention, and as shown in fig. 6, in this embodiment, a user may select a preset group photo from a first terminal and upload the group photo to a client. Specifically, when uploading the group photo, the user may mark a preset area of the group photo, as shown by a dashed box in fig. 6. It should be noted that, the labeling method of the preset region is not particularly limited, the preset region may be labeled in any shape, and one or more preset regions may be provided. Fig. 6 is only an optional example, in fig. 6, the preset area is a rectangular frame, and the user may drag the rectangular frame to move the position of the rectangular frame, and may also modify the size of the rectangular frame by dragging the border line of the rectangular frame.
When the user uploads the group photo, if the preset area is marked, the terminal sends the first group photo to the server, and simultaneously sends the preset area to the server, so that the server executes the method shown in fig. 5; if the user does not mark the preset area, the server executes the method shown in fig. 3.
Fig. 7 is a schematic structural diagram of an embodiment of an apparatus for establishing a social relationship according to an embodiment of the present invention, and as shown in fig. 7, an apparatus 700 for establishing a social relationship according to this embodiment includes: a first obtaining module 701, a second obtaining module 702 and a sending module 703.
The first obtaining module 701 is configured to obtain a first group photo sent by a first terminal corresponding to a first user and an identifier of the first user;
a second obtaining module 702, configured to perform face recognition on each user in the first group photo according to the identifier of the first user and a first database, and obtain an identifier of at least one second user, where the first database stores identifiers of different users and head portraits of different users;
the second obtaining module 702 is further configured to determine, according to the identifiers of the second users and the current social relationship of the first user, an identifier of at least one third user, where the third user is a user that does not establish a social relationship with the first user in the second users;
a sending module 703 is configured to send the identifier of each third user to the first terminal, so that the first terminal establishes a social relationship between the first user and each third user.
The apparatus provided in this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of another embodiment of an apparatus for establishing a social relationship according to an embodiment of the present invention, and based on the embodiment shown in fig. 7, the apparatus 700 for establishing a social relationship according to this embodiment may further include: a third obtaining module 704.
Optionally, the second obtaining module 702 is specifically configured to:
determining the head portrait of the first user according to the identification of the first user and the first database;
carrying out face detection on the first group photo to obtain a face corresponding to each user;
determining the faces of other users except the face of the first user in the faces corresponding to the users according to the head portrait of the first user;
and for the face of each of the other users, obtaining the similarity between the faces of the other users and the head portraits of the users in the first database, and taking the user identification corresponding to the head portraits with the similarity meeting the preset conditions as the identification of the second user.
Optionally, the third obtaining module 704 is configured to:
determining the identification of a fourth user in the identifications of the second users, wherein the fourth user is at least part of the second users;
acquiring an identifier of a fifth user having a social relationship with the fourth user;
and sending the identifier of the fifth user to the first terminal, so that the first terminal establishes a social relationship between the first user and the fifth user.
Optionally, a preset area is marked in the first group photo, where the preset area includes one or more of the second users;
the third obtaining module 704 is specifically configured to:
and determining the identifier of a fourth user according to the identifiers of the second users in the preset area.
Optionally, the third obtaining module 704 is specifically configured to:
acquiring at least one second group photo in a second database according to the identifier of the fourth user, wherein the second group photo is a group photo of the fourth user and a fifth user;
and for each second group photo, performing face recognition on each user in the second group photo according to the identifier of the fourth user and the first database to obtain the identifier of the fifth user.
Optionally, the sending module 703 is further configured to:
and sending the identifier of the first user to a second terminal corresponding to each third user so that the second terminal establishes a social relationship between the third user and the first user.
Optionally, the sending module 703 is further configured to:
and sending the identifier of the first user to a third terminal corresponding to each fifth user, so that the third terminal establishes a social relationship between the fifth user and the first user.
The apparatus provided in this embodiment may be used to implement the technical solutions of any of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
Fig. 9 is a schematic structural diagram of a server according to an embodiment of the present invention, and as shown in fig. 9, a server 900 according to the embodiment includes: at least one processor 901 and memory 902. The processor 901 and the memory 902 are connected via a bus 903.
In a specific implementation process, the at least one processor 901 executes computer-executable instructions stored in the memory 902, so that the at least one processor 901 performs the method for establishing a social relationship in any one of the above method embodiments.
For a specific implementation process of the processor 901, reference may be made to the above method embodiments, which implement principles and technical effects are similar, and details are not described herein again.
In the embodiment shown in fig. 9, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise high speed RAM memory and may also include non-volatile storage NVM, such as at least one disk memory.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer execution instruction is stored in the computer-readable storage medium, and when a processor executes the computer execution instruction, the method for establishing a social relationship in any of the above method embodiments is implemented.
The computer-readable storage medium may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the apparatus.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (8)
1. A method for establishing a social relationship is applied to a server and comprises the following steps:
acquiring a first group photo sent by a first terminal corresponding to a first user and an identifier of the first user;
according to the identification of the first user and a first database, carrying out face recognition on each user in the first group photo to obtain the identification of at least one second user, wherein the identification of different users and the head portraits of different users are stored in the first database; the second user is different from the first user; a preset area is marked in the first group photo, and the preset area comprises one or more second users;
determining an identifier of a fourth user according to the identifiers of the second users in the preset area;
acquiring at least one second group photo in a second database according to the identifier of the fourth user, wherein the second group photo is a group photo of the fourth user and a fifth user;
for each second group photo, according to the identifier of the fourth user and the first database, performing face recognition on each user in the second group photo to obtain the identifier of the fifth user;
and sending the identifier of the fifth user to the first terminal, so that the first terminal establishes a social relationship between the first user and the fifth user.
2. The method of claim 1, wherein the performing face recognition on each user in the first group photo according to the identifier of the first user and a first database to obtain the identifier of at least one second user comprises:
determining the head portrait of the first user according to the identification of the first user and the first database;
carrying out face detection on the first group photo to obtain a face corresponding to each user;
determining the faces of other users except the face of the first user in the faces corresponding to the users according to the head portrait of the first user;
and for the face of each of the other users, acquiring similarity between the faces of the other users and the head portraits of the users in the first database, and taking the identification of the user corresponding to the head portraits with the similarity meeting preset conditions as the identification of the second user.
3. The method of claim 1, wherein after obtaining the identity of the at least one second user, further comprising:
determining an identifier of at least one third user according to the identifiers of the second users and the current social relationship of the first user, wherein the third user is a user which does not establish the social relationship with the first user in the second users;
and sending the identification of each third user to the first terminal, so that the first terminal establishes a social relationship between the first user and each third user.
4. The method according to any of claims 1 to 3, wherein after determining the identity of the at least one third user, further comprising:
and sending the identifier of the first user to a second terminal corresponding to each third user so that the second terminal establishes a social relationship between the third user and the first user.
5. The method of claim 1 or 3, wherein after obtaining the identification of the fifth user having a social relationship with the fourth user, further comprising:
and sending the identifier of the first user to a third terminal corresponding to each fifth user, so that the third terminal establishes a social relationship between the fifth user and the first user.
6. An apparatus for establishing a social relationship, applied to a server, includes:
the first obtaining module is used for obtaining a first group photo sent by a first terminal corresponding to a first user and an identifier of the first user; a preset area is marked in the first group photo, and the preset area comprises one or more second users;
a third obtaining module configured to: determining the identifier of a fourth user according to the identifiers of the second users in the preset area;
acquiring at least one second group photo in a second database according to the identifier of the fourth user, wherein the second group photo is a group photo of the fourth user and a fifth user;
for each second group photo, according to the identifier of the fourth user and a first database, performing face recognition on each user in the second group photo to obtain the identifier of the fifth user;
and sending the identifier of the fifth user to the first terminal, so that the first terminal establishes a social relationship between the first user and the fifth user.
7. A server, comprising: at least one processor and a memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any of claims 1 to 5.
8. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1 to 5.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910166329.8A CN110033388B (en) | 2019-03-06 | 2019-03-06 | Social relationship establishing method and device and server |
PCT/CN2019/103961 WO2020177286A1 (en) | 2019-03-06 | 2019-09-02 | Method for establishing social relationships, device and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910166329.8A CN110033388B (en) | 2019-03-06 | 2019-03-06 | Social relationship establishing method and device and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110033388A CN110033388A (en) | 2019-07-19 |
CN110033388B true CN110033388B (en) | 2022-07-08 |
Family
ID=67235800
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910166329.8A Active CN110033388B (en) | 2019-03-06 | 2019-03-06 | Social relationship establishing method and device and server |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110033388B (en) |
WO (1) | WO2020177286A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110033388B (en) * | 2019-03-06 | 2022-07-08 | 百度在线网络技术(北京)有限公司 | Social relationship establishing method and device and server |
CN112348689A (en) * | 2020-11-24 | 2021-02-09 | 深兰科技(上海)有限公司 | Face recognition method and system for social service |
CN112633244B (en) * | 2020-12-31 | 2023-03-03 | 深圳云天励飞技术股份有限公司 | Social relationship identification method and device, electronic equipment and storage medium |
CN112784719A (en) * | 2021-01-13 | 2021-05-11 | 伙伴愿景(广东)智能科技有限公司 | Accurate human vein matching method based on block chain and artificial intelligence, storage medium and system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102637183A (en) * | 2011-02-12 | 2012-08-15 | 北京千橡网景科技发展有限公司 | Method and device for recommending friends to user in social network |
CN103164705A (en) * | 2011-12-13 | 2013-06-19 | 腾讯数码(天津)有限公司 | People encircled method and device based on social networking services (SNS) |
CN103189864A (en) * | 2010-08-31 | 2013-07-03 | 诺基亚公司 | Methods and apparatuses for determining shared friends in images or videos |
KR20140077994A (en) * | 2012-12-13 | 2014-06-25 | 박정란 | Method for building social network service using photo |
CN104102656A (en) * | 2013-04-09 | 2014-10-15 | 腾讯科技(深圳)有限公司 | Friend recommending method, device, system and server |
CN105429848A (en) * | 2015-10-23 | 2016-03-23 | 广东小天才科技有限公司 | Method and system for adding friends through photographing and social system of social server |
CN105847111A (en) * | 2016-02-29 | 2016-08-10 | 北京小米移动软件有限公司 | Method and device for adding friend |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120213404A1 (en) * | 2011-02-18 | 2012-08-23 | Google Inc. | Automatic event recognition and cross-user photo clustering |
US20130251201A1 (en) * | 2012-03-22 | 2013-09-26 | Samsung Electronics Co., Ltd. | System and method for recommending buddies in social network |
CN103514286A (en) * | 2013-09-30 | 2014-01-15 | 鸿富锦精密工业(深圳)有限公司 | Friend recommending system and method |
CN107302492A (en) * | 2017-06-28 | 2017-10-27 | 歌尔科技有限公司 | Friend-making requesting method, server, client terminal device and the system of social software |
CN108512670B (en) * | 2018-02-07 | 2020-07-03 | 平安科技(深圳)有限公司 | Group creation method and terminal thereof |
CN109101614A (en) * | 2018-08-06 | 2018-12-28 | 百度在线网络技术(北京)有限公司 | Friend recommendation method and apparatus |
CN110033388B (en) * | 2019-03-06 | 2022-07-08 | 百度在线网络技术(北京)有限公司 | Social relationship establishing method and device and server |
-
2019
- 2019-03-06 CN CN201910166329.8A patent/CN110033388B/en active Active
- 2019-09-02 WO PCT/CN2019/103961 patent/WO2020177286A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103189864A (en) * | 2010-08-31 | 2013-07-03 | 诺基亚公司 | Methods and apparatuses for determining shared friends in images or videos |
CN102637183A (en) * | 2011-02-12 | 2012-08-15 | 北京千橡网景科技发展有限公司 | Method and device for recommending friends to user in social network |
CN103164705A (en) * | 2011-12-13 | 2013-06-19 | 腾讯数码(天津)有限公司 | People encircled method and device based on social networking services (SNS) |
KR20140077994A (en) * | 2012-12-13 | 2014-06-25 | 박정란 | Method for building social network service using photo |
CN104102656A (en) * | 2013-04-09 | 2014-10-15 | 腾讯科技(深圳)有限公司 | Friend recommending method, device, system and server |
CN105429848A (en) * | 2015-10-23 | 2016-03-23 | 广东小天才科技有限公司 | Method and system for adding friends through photographing and social system of social server |
CN105847111A (en) * | 2016-02-29 | 2016-08-10 | 北京小米移动软件有限公司 | Method and device for adding friend |
Also Published As
Publication number | Publication date |
---|---|
WO2020177286A1 (en) | 2020-09-10 |
CN110033388A (en) | 2019-07-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110033388B (en) | Social relationship establishing method and device and server | |
CN108733819B (en) | Personnel archive establishing method and device | |
CN108009528B (en) | Triple Loss-based face authentication method and device, computer equipment and storage medium | |
CN107704838B (en) | Target object attribute identification method and device | |
JP6594329B2 (en) | System and method for facial expression | |
US8560625B1 (en) | Facilitating photo sharing | |
US20180268205A1 (en) | Picture Ranking Method, and Terminal | |
TW201911130A (en) | Method and device for remake image recognition | |
CN108182714B (en) | Image processing method and device and storage medium | |
JP2019530041A (en) | Combining the face of the source image with the target image based on the search query | |
CN111310705A (en) | Image recognition method and device, computer equipment and storage medium | |
WO2019153504A1 (en) | Group creation method and terminal thereof | |
CN103970804A (en) | Information inquiring method and device | |
US11423630B1 (en) | Three-dimensional body composition from two-dimensional images | |
US20200218772A1 (en) | Method and apparatus for dynamically identifying a user of an account for posting images | |
US20140233854A1 (en) | Real time object scanning using a mobile phone and cloud-based visual search engine | |
CN109800319A (en) | Image processing method, device, computer equipment and storage medium | |
CN113677409A (en) | Treasure hunting game guiding technology | |
KR101715708B1 (en) | Automated System for Providing Relation Related Tag Using Image Analysis and Method Using Same | |
US20230410220A1 (en) | Information processing apparatus, control method, and program | |
CN107656959B (en) | Message leaving method and device and message leaving equipment | |
CN114494751A (en) | License information identification method, device, equipment and medium | |
CN108734099A (en) | Auth method and device, electronic equipment, computer program and storage medium | |
CN111783677A (en) | Face recognition method, face recognition device, server and computer readable medium | |
CN111507289A (en) | Video matching method, computer device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |