CN107527072B - Method and device for determining similar head portrait and electronic equipment - Google Patents

Method and device for determining similar head portrait and electronic equipment Download PDF

Info

Publication number
CN107527072B
CN107527072B CN201710769259.6A CN201710769259A CN107527072B CN 107527072 B CN107527072 B CN 107527072B CN 201710769259 A CN201710769259 A CN 201710769259A CN 107527072 B CN107527072 B CN 107527072B
Authority
CN
China
Prior art keywords
avatar
head portrait
current user
user
head
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
Application number
CN201710769259.6A
Other languages
Chinese (zh)
Other versions
CN107527072A (en
Inventor
王柯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710769259.6A priority Critical patent/CN107527072B/en
Publication of CN107527072A publication Critical patent/CN107527072A/en
Application granted granted Critical
Publication of CN107527072B publication Critical patent/CN107527072B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/10Multimedia information

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The disclosure relates to a method and a device for determining similar head portraits and electronic equipment. The method comprises the following steps: generating first head portrait comparison information of the current user according to the first head portrait of the current user; generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located; determining a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information; and if the similarity value greater than or equal to the preset threshold value exists in the similarity values, determining the second head portrait of the other user corresponding to the similarity value greater than or equal to the preset threshold value as the head portrait similar to the head portrait of the current user. The embodiment of the disclosure can find the head portrait similar to the first head portrait of the current user in the group, is convenient for the user to find the same or similar head portrait, and improves the experience of the user in group chat.

Description

Method and device for determining similar head portrait and electronic equipment
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method and an apparatus for determining a similar avatar, and an electronic device.
Background
With the rapid development of networks, group chat becomes an important work, life and entertainment mode. When the group chat is carried out, users with repeated head portraits appear, and the confusion is caused to other users. For example, if the avatars of user a and user B are the same in a group, the utterance of user a may be mistaken for the utterance of user B. In the related art, a user needs to find a similar avatar through visual inspection, and the user needs to manually replace the avatar, which causes inconvenience to the user.
Disclosure of Invention
The present disclosure provides a method and an apparatus for determining similar avatar, and an electronic device, so as to solve the deficiencies in the related art.
According to a first aspect of embodiments of the present disclosure, there is provided a method of determining similar avatar, the method comprising:
generating first head portrait comparison information of the current user according to the first head portrait of the current user;
generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located;
determining a similarity value between a first avatar of the current user and a second avatar of at least one other user within the group based on the first avatar comparison information and the second avatar comparison information;
and if the similarity value greater than or equal to a preset threshold value exists in the similarity values, determining the second head portrait of the other user corresponding to the similarity value greater than or equal to the preset threshold value as the head portrait similar to the first head portrait of the current user.
Optionally, generating the first portrait comparison information of the current user according to the first portrait of the current user includes:
graying the first head portrait to obtain a first gray value vector of the first head portrait, namely first head portrait comparison information of the current user;
alternatively, the first and second electrodes may be,
and extracting the same color in each pixel from the first head image to obtain a first color value vector of the first head image, namely the first head image comparison information of the current user.
Optionally, generating second avatar comparison information corresponding to the second avatar of the at least one other user according to the second avatar of the at least one other user in the group where the current user is located includes:
graying the second head portrait to obtain a second gray value vector of the second head portrait, namely second head portrait comparison information of the user; alternatively, the first and second electrodes may be,
for each second head portrait, extracting the same color in each pixel from the second head portrait to obtain a second color value vector of the second head portrait, namely second head portrait comparison information of other users; the color extracted from the second avatar is the same as the color extracted from the first avatar.
Optionally, determining a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information, comprises:
determining, for each user of at least one other user within the group, a cosine value of the first avatar comparison information and second avatar comparison information of a second avatar of the each user; the first head image comparison information is a first gray value vector or a first color value vector; the second head portrait comparison information is a second gray value vector or a second color value vector;
and determining a similarity value between the second head portrait corresponding to each user and the first head portrait of the current user based on the cosine value.
Optionally, after determining that the second avatar of the user corresponding to the similarity value greater than or equal to the preset threshold is a similar avatar to the first avatar of the current user, the method further includes:
generating a prompt message; the prompting message is used for prompting that users similar to the first head portrait of the current user exist in the group.
Optionally, after the determining that the second avatar of the other user corresponding to the similarity value greater than or equal to the preset threshold is a similar avatar to the first avatar of the current user, the method further includes:
responding to a first instruction of the current user, and displaying at least one frame of head portrait in a designated gallery; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user;
and responding to a second instruction of the current user on an interactive interface of the appointed gallery, and replacing the first avatar of the current user with the avatar corresponding to the second instruction.
Optionally, after the determining that the second avatar of the other user corresponding to the similarity value greater than or equal to the preset threshold is a similar avatar to the first avatar of the current user, the method further includes:
replacing the first portrait of the current user with a designated image; the specified image is a frame of head portrait in a specified image library; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user.
Optionally, the method further comprises:
and after the chat in the group is determined to be finished, replacing the first head portrait with a corresponding head portrait when the first head portrait is added into the group.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for determining similar avatar, the apparatus comprising:
the first generation module is used for generating first head image comparison information of the current user according to a first head image of the current user;
the second generation module is used for generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located;
a similarity value determination module, configured to determine a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information;
and the similar head portrait determining module is used for determining the second head portrait of the other user corresponding to the similar value which is greater than or equal to the preset threshold as the head portrait which is similar to the first head portrait of the current user when the similar value which is greater than or equal to the preset threshold exists in the similar values.
Optionally, the first generating module comprises:
the first gray unit is used for graying the first head image to obtain a first gray value vector, namely the first head image comparison information of the current user;
or;
and the first color unit is used for extracting the same color in each pixel from the first head image to obtain a first color value vector of the first head image, namely the first head image comparison information of the current user.
Optionally, the second generating module includes:
a second graying unit, configured to graying the second avatar with a second graying value vector, that is, second avatar comparison information of the user, for each second avatar;
alternatively, the first and second electrodes may be,
a second color unit, configured to extract, for each second avatar, the same color in each pixel from the second avatar, and obtain a second color value vector of the second avatar, that is, second avatar comparison information of the other user; the color extracted from the second avatar is the same as the color extracted from the first avatar.
Optionally, the similarity value determining module includes:
a cosine value determination unit configured to determine, for each of the other users in the group, a cosine value of the first avatar comparison information and the second avatar comparison information of the second avatar of the each user; the first head image comparison information is a first gray value vector or a first color value vector; the second head portrait comparison information is a second gray value vector or a second color value vector;
and the similarity value determining unit is used for determining a similarity value between the second head portrait corresponding to each user and the first head portrait of the current user based on the cosine value.
Optionally, the apparatus further comprises:
a third generating module, configured to generate a prompt message when the similar avatar determination module determines that an avatar similar to the first avatar of the current user exists; the prompting message is used for prompting that users similar to the first head portrait of the current user exist in the group.
Optionally, the apparatus further comprises:
the first response module is used for responding to a first instruction of the current user and displaying at least one frame of head portrait in the appointed image library; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user;
and the second response module is used for responding to a second instruction of the current user on the interactive interface of the specified gallery, and replacing the first avatar of the current user with the avatar corresponding to the second instruction.
Optionally, the apparatus further comprises: a first avatar replacement module for replacing the first avatar of the current user with a designated image when the similar avatar determination module determines that an avatar similar to the first avatar of the current user exists; the specified image is a frame of head portrait in a specified image library; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user.
Optionally, the apparatus further comprises: and the second avatar replacing module is used for replacing the first avatar with the corresponding avatar when the first avatar is added into the group after the chat in the group is determined to be finished.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a display screen;
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
generating first head portrait comparison information of the current user according to the first head portrait of the current user;
generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located;
determining a similarity value between a first avatar of the current user and a second avatar of at least one other user within the group based on the first avatar comparison information and the second avatar comparison information;
and if the similarity value greater than or equal to a preset threshold value exists in the similarity values, determining the second head portrait of the other user corresponding to the similarity value greater than or equal to the preset threshold value as the head portrait similar to the first head portrait of the current user.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, the computer-readable storage medium having stored thereon a number of computer instructions which, when executed, perform the following:
generating first head portrait comparison information of the current user according to the first head portrait of the current user;
generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located;
determining a similarity value between a first avatar of the current user and a second avatar of at least one other user within the group based on the first avatar comparison information and the second avatar comparison information;
and if the similarity value greater than or equal to a preset threshold value exists in the similarity values, determining the second head portrait of the other user corresponding to the similarity value greater than or equal to the preset threshold value as the head portrait similar to the first head portrait of the current user.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
therefore, the head portrait similar to the first head portrait of the current user in the group can be found, the same or similar head portrait can be conveniently found by the user, and the user experience during group chat is improved.
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 disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method of determining similar avatars, according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of determining similar avatars, according to another exemplary embodiment;
FIG. 3 is a flow diagram illustrating a method of determining similar avatars, according to yet another exemplary embodiment;
FIG. 4 is a flow diagram illustrating a method of determining similar avatars, according to an exemplary embodiment;
FIG. 5 is a diagram illustrating an application scenario of the method shown in FIG. 4;
FIG. 6 is a flow diagram illustrating a method of determining similar avatars, according to an exemplary embodiment;
FIGS. 7(a) -7 (e) are schematic views of application scenarios of the method shown in FIG. 6;
FIG. 8 is a flow diagram illustrating a method of determining similar avatars, according to an exemplary embodiment;
FIG. 9 is a flowchart illustrating a method of determining similar avatars, according to an exemplary embodiment;
FIG. 10 is a block diagram illustrating an apparatus for determining similar avatars in accordance with an exemplary embodiment;
FIG. 11 is a block diagram illustrating an apparatus for determining similar avatars in accordance with yet another exemplary embodiment;
FIG. 12 is a block diagram illustrating an apparatus for determining similar avatars in accordance with yet another exemplary embodiment;
FIG. 13 is a block diagram illustrating an apparatus for determining similar avatars in accordance with yet another exemplary embodiment;
FIG. 14 is a block diagram illustrating an apparatus for determining similar avatars in accordance with yet another exemplary embodiment;
FIG. 15 is a block diagram illustrating an apparatus for determining similar avatars in accordance with yet another exemplary embodiment;
FIG. 16 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of devices consistent with certain aspects of the present disclosure as recited in the claims below.
FIG. 1 is a flow diagram illustrating a method of determining similar avatars, according to an exemplary embodiment. The method for determining the similar avatar can be applied to the terminal device or the personal computer, for example, implemented by an application program or software installed on the terminal device or the personal computer. The terminal equipment can be a smart phone, a tablet computer and the like. Referring to fig. 1, the method of determining similar avatar includes:
step 101, generating first head image comparison information of the current user according to the first head image of the current user.
In the present disclosure, the current user is a user about to join a group, or a user who has joined a group and needs to determine whether the same or similar avatar exists in the group. For example, for a user about to join a group, the method provided by the embodiment of the present disclosure is triggered when applying for joining the group. For another example, for a user who has joined a group and needs to determine whether the same or similar avatar exists in the group, a trigger button may be set at a group chat screen or a personal screen of the user in the group, and the user may trigger the method provided by the embodiment of the present disclosure by clicking the trigger button.
In the present disclosure, the first avatar comparison information is generated according to parameters of the first avatar, and is used for characterizing features of the first avatar and determining similarity between the first avatar and a second avatar in a subsequent embodiment. The first head image comparison information may be a first gray value vector of the first head image, or may be a first color value vector or a first luminance value vector of the first head image. The parameters in this embodiment may include a gray value, an RGB color value, and the like of the first avatar. By quantizing the parameters, a matrix corresponding to the first head image after quantization is obtained, and the matrix may be a first gray value vector, a first color value vector, a first luminance value vector, or the like. Namely, the first head image is quantized to obtain the first head image comparison information.
And 102, generating second avatar comparison information corresponding to the second avatar of the at least one other user according to the second avatar of the at least one other user in the group where the current user is located.
The group in the present disclosure is a group to which a current user is about to join, or a group that has already joined. It is understood that a group in the present disclosure generally includes a preset number of users, i.e., a current user and a plurality of other users. For example, a group may include 500 users, the current user and 499 other users. Of course, the group in this disclosure may also include 2 users, i.e., the current user and one other user. The second avatar comparison information in this embodiment is generated according to parameters of the second avatar, and is used to characterize features of the second avatar and to determine similarity between the second avatar and the first avatar in a subsequent embodiment. The parameters in this embodiment may include a gray value, an RGB color value, and the like of the second avatar. In one embodiment, the second avatar comparison information may be a second gray value vector, a second color value vector, or a second luminance value vector of a second avatar of each other user within the group.
It is understood that step 101 and step 102 may be interchanged or performed simultaneously in the embodiments of the present disclosure, and the embodiments of the present disclosure are not limited thereto.
Step 103, determining a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information.
In this embodiment, the first head image comparison information is a first gray value vector or a first color value vector; the second avatar comparison information is a second gray value vector or a second color value vector. In this case, the first avatar comparison information and each of the second avatar comparison information may determine a similarity value, such that at least one similarity value may be determined when there is at least one other user in the group.
Certainly, the first avatar comparison information is a first gray value vector and a first color value vector, the second avatar comparison information is a second gray value vector and a second color value vector, before determining the similarity value, it needs to first determine whether the first avatar comparison information and the second avatar comparison information belong to the same type of vector, for example, if the first avatar comparison information is the first gray value vector, the second avatar comparison information is the second gray value vector, otherwise, the similarity value calculation cannot be performed. It is to be understood that the similarity value is used in this disclosure to characterize the degree of similarity between the first avatar comparison information and the second avatar comparison information.
And 104, if the similarity value greater than or equal to a preset threshold value exists in the similarity values, determining the second head portrait of the other user corresponding to the similarity value greater than or equal to the preset threshold value as the head portrait similar to the first head portrait of the current user.
In this embodiment, the preset threshold is used to represent that the current user and other users in the group can determine that the two avatars are similar or the same. For example, when the similarity value is greater than or equal to the preset threshold, it may be determined that the two avatars are the same when the current user and the other users in the group look at each other, and when the similarity value is less than the preset threshold, it may be determined that the two avatars are different when the current user and the other users in the group look at each other. Therefore, the preset threshold in this embodiment may be set according to a specific scenario, and the embodiment of the present disclosure is not limited.
Therefore, the head portrait similar to the first head portrait of the current user in the group can be found, the same or similar head portrait can be conveniently found by the user, the situation that which user cannot be determined to speak during group chat is avoided, and therefore the experience of the user during group chat is improved.
FIG. 2 is a flow diagram illustrating a method of determining similar avatars, according to another exemplary embodiment. Referring to fig. 2, the method for determining similar head portraits includes:
step 201, generating first head image comparison information of the current user according to the first head image of the current user.
The specific method and principle of step 201 and step 101 are the same, please refer to fig. 1 and related contents of step 101 for detailed description, which is not repeated herein.
Step 202, graying the first head portrait to obtain a first gray image of the first head portrait.
In this embodiment, the first head portrait is grayed to obtain a first grayscale image of the first head portrait. For example, the first head image is grayed, and each pixel in the first head image can be changed to a gray value of 0 to 255, so that a first gray image of the first head image can be obtained.
In an embodiment of the present disclosure, assuming that the first head image includes 9 pixels, graying the first head image to obtain a first grayscale image is:
Figure BDA0001394719980000101
step 203, converting the first gray image into the first gray value vector, i.e. the first portrait comparison information of the current user.
In this embodiment, the first gray image is converted into a first gray value vector, for example, each row of pixels of the first gray image is sequentially embedded in the gray value vector, and the length of the gray value vector is the product of the length and the width of the first gray image.
Continuing with the example in step 202, converting the first grayscale image in this disclosure to a first grayscale vector is:
A=[1,231,132;4,22,100;255,200,189]。
in the embodiment of the present disclosure, step 202 and step 203 may be combined, and a process of obtaining the first grayscale image is omitted, that is, the first head portrait is grayed to directly obtain the first grayscale image of the first head portrait. Therefore, the calculation steps can be simplified, and the calculation efficiency can be improved.
Step 204, for each second avatar: and graying the second head portrait to obtain a second gray image of the second head portrait.
In an embodiment of the present disclosure, assuming that each second head portrait includes 9 pixels, graying one of the second head portraits to obtain a second gray image is:
Figure BDA0001394719980000111
step 205, converting the second gray image into the second gray value vector, i.e. the second avatar comparison information of the user.
Continuing with the example in step 204, converting the second grayscale image in this disclosure to a second grayscale vector is:
B=[5,204,125;41,88,90;208,155,178]。
in the embodiment of the present disclosure, step 204 and step 205 may be combined, and a process of obtaining the second gray scale image is omitted, that is, the second head portrait is grayed to directly obtain the second gray scale image of the second head portrait. Therefore, the calculation steps can be simplified, and the calculation efficiency can be improved.
It is understood that the combination of steps 202 and 203 and the combination of steps 204 and 205 in the embodiment of the present disclosure may be performed in an interchangeable order, or simultaneously.
Step 206, determining a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information.
In one embodiment, for each of the other users in the group, cosine values of the first avatar comparison information and the second avatar comparison information of the second avatar for that each user are determined. And determining a similarity value between the corresponding second head portrait of each user and the first head portrait of the current user based on the cosine value in the embodiment, so as to obtain at least one similarity value.
For example, one other user is selected from the group, and then the cosine values of the first avatar comparison information corresponding to the current user and the second avatar comparison information of the other user are calculated. Taking the first avatar comparison information a and the second avatar comparison information B illustrated in step 101 and step 102 as examples, the cosine values cos < a, B > are:
Figure BDA0001394719980000121
it can be understood that, as the cosine value cos < a, B > increases, the closer the first avatar comparison information and the second avatar comparison information are, i.e., the more similar the first avatar of the current user and the second avatar of the other user.
Step 207, if there is a similarity value greater than or equal to a preset threshold in the similarity values, determining the second avatar of the user corresponding to the similarity value greater than or equal to the preset threshold as an avatar similar to the first avatar of the current user.
In practical applications, if the similarity value of two avatars exceeds a certain threshold, the user may feel that the two avatars are the same, i.e., the avatars are easily confused. In an embodiment of the present disclosure, a preset threshold is used to determine whether two avatars are similar. Correspondingly, when the similarity value which is greater than or equal to the preset threshold value exists in the at least one similarity value, the second head portrait of the user corresponding to the similarity value which is greater than or equal to the preset threshold value is determined as the head portrait which is similar to the head portrait of the current user. In practical applications, the preset threshold may be set according to specific scenes, for example, when the number of people is large, the preset threshold may be set to be smaller, for example, 0.8, so as to prevent a plurality of similar head portraits from appearing. Or the number of people in the group is small, the preset threshold value can be set to be larger, such as 0.9, so that the user can distinguish the head portrait similarity value from the time scale even if the head portrait similarity value is below 0.9. The present embodiment is not limited thereto, and those skilled in the art can make modifications.
Therefore, according to the embodiment of the disclosure, the first head portrait and the second head portrait are respectively converted into the gray value vectors, and the similarity between the first head portrait and the second head portrait is calculated by using the gray value vectors, so that not only can the calculation amount be reduced, but also the calculation accuracy can be improved, and the head portrait similar to the first head portrait of the current user in the group can be found, so that the user can find the same or similar head portraits conveniently, and the situation that which user can not be determined to speak during group chat is avoided, thereby improving the experience of the user during group chat.
FIG. 3 is a flowchart illustrating a method of determining similar avatars, according to yet another exemplary embodiment. Referring to fig. 3, the method of determining similar avatar includes:
step 301, generating first head image comparison information of the current user according to the first head image of the current user.
The specific method and principle of step 301 and step 201 are the same, please refer to fig. 2 and related contents of step 201 for detailed description, which is not repeated herein.
Step 302, extracting the same color in each pixel from the first head portrait to obtain a first color image of the first head portrait;
in general, the first head portrait is a color image, each pixel includes three colors of red R, green G and blue B, in this embodiment, the same color in each pixel, for example, red R, green G or blue B, may be provided from the first head portrait, so that a first color image of the same color in one frame may be obtained. Therefore, when the first head portrait can be represented by the first color image, the subsequent calculation amount is reduced, and the calculation efficiency is improved.
The quantized numerical values of the respective colors in this embodiment can be realized by the acquisition method in the related art, and will not be described in detail here.
Step 303, converting the first color image into the first color value vector, i.e. the first portrait comparison information of the current user.
And converting the first color image into the first color value vector, namely the first portrait comparison information of the current user. It can be understood that, the process of converting each pixel in the first color image into the first color value vector may refer to step 203, and will not be described herein again.
In the embodiment of the present disclosure, step 302 and step 303 may be combined, and the process of acquiring the first color image is omitted, that is, the first color image of the first avatar is directly obtained according to the data of the same color of the first avatar. Therefore, the calculation steps can be simplified, and the calculation efficiency can be improved.
Step 304, for each second avatar: extracting the same color in each pixel from the second head portrait to obtain a second color image of the second head portrait; the color extracted from the second avatar is the same as the color extracted from the first avatar.
In an embodiment of the present disclosure, for each second avatar, reference may be made to step 204 for a process of obtaining a second color image of the second avatar according to the second avatar, which is not described herein again.
Step 305, converting the second color image into the second color value vector, i.e. the second avatar comparison information of the other user.
In an embodiment of the present disclosure, step 205 may be referred to in a process of converting the second color image into the second color value vector according to the embodiment, and details are not repeated here.
In the embodiment of the present disclosure, step 304 and step 305 may be combined, and the process of acquiring the second color image is omitted, that is, the second color image of the second avatar is directly obtained according to the data of the same color of the second avatar. Therefore, the calculation steps can be simplified, and the calculation efficiency can be improved.
It is understood that the combination of steps 302 and 303 and the combination of steps 304 and 305 in the disclosed embodiment can be performed in an interchangeable order, or simultaneously without limitation.
Step 306, determining a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information.
The specific method and principle of step 306 and step 206 are the same, and please refer to fig. 2 and the related contents of step 206 for detailed description, which is not repeated herein.
Step 307, if there is a similarity value greater than or equal to a preset threshold in the similarity values, determining the second avatar of the other user corresponding to the similarity value greater than or equal to the preset threshold as an avatar similar to the first avatar of the current user.
The specific method and principle of step 307 and step 207 are the same, please refer to fig. 2 and related contents of step 207 for detailed description, which is not repeated herein.
It can be seen that, this disclosed embodiment converts first avatar and second avatar into color value vector respectively, utilizes the similarity of color value vector calculation first avatar and second avatar, can reduce the calculated amount and also can improve calculation accuracy, can discover fast the avatar similar with the first avatar of current user within the group, promotes the experience of user when chatting in groups.
Fig. 4 is a flowchart illustrating a method for determining similar avatars according to an exemplary embodiment, and fig. 5 is an application scenario diagram illustrating the method illustrated in fig. 4. Referring to fig. 4, the method of determining similar avatar includes:
step 401, generating first head image comparison information of the current user according to the first head image of the current user.
The specific method and principle of step 401 and step 101 are the same, please refer to fig. 1 and related contents of step 101 for detailed description, which is not repeated herein.
Step 402, generating second avatar comparison information corresponding to the second avatar of the at least one other user according to the second avatar of the at least one other user in the group where the current user is located.
The specific method and principle of step 402 and step 102 are the same, and please refer to fig. 1 and the related contents of step 102 for detailed description, which is not repeated herein.
Step 403, determining a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information.
The specific method and principle of step 403 and step 103 are the same, and please refer to fig. 1 and related contents of step 103 for detailed description, which is not repeated herein.
Step 404, if there is a similarity value greater than or equal to a preset threshold in the similarity values, determining the second avatar of the other user corresponding to the similarity value greater than or equal to the preset threshold as an avatar similar to the first avatar of the current user.
The specific method and principle of step 404 and step 104 are the same, and please refer to fig. 1 and the related contents of step 104 for detailed description, which is not repeated herein.
At step 405, a prompt message is generated. The prompting message prompts the existence of a user within the group having a similar avatar to the current user.
In an embodiment of the present disclosure, by generating the prompt message, it is possible to make the current user or other users in the group clear that users with similar or identical head images exist in the group. In an application scenario of the present disclosure, as shown in fig. 5, when a similar avatar appears during a group joining process or a group chat process, after determining that the similar avatar exists by using steps 401 to 404, a prompt message is generated in a message box 501, for example, "find a user with a similar or the same avatar, please pay attention to identify or replace the avatar in time", and through the prompt message, a current user or other users can distinguish the current user or other users by focusing on the similar avatar during the group chat, thereby reducing the probability that the other users in the group and the current user are not clear which user speaks, and thus improving the group chat experience.
FIG. 6 is a flowchart illustrating a method of determining similar avatars, according to an exemplary embodiment. Referring to fig. 6, the method of determining similar avatar includes:
step 601, generating first head image comparison information of the current user according to the first head image of the current user.
The specific method and principle of step 601 and step 101 are the same, please refer to fig. 1 and related contents of step 101 for detailed description, which is not repeated herein.
Step 602, generating second avatar comparison information corresponding to the second avatar of the at least one other user according to the second avatar of the at least one other user in the group where the current user is located.
The specific method and principle of step 602 and step 102 are the same, and please refer to fig. 1 and the related contents of step 102 for detailed description, which is not repeated herein.
Step 603, determining a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information.
The specific method and principle of step 603 and step 103 are the same, and please refer to fig. 1 and related contents of step 103 for detailed description, which is not described herein again.
Step 604, if there is a similarity value greater than or equal to a preset threshold in the similarity values, determining the second avatar of the other user corresponding to the similarity value greater than or equal to the preset threshold as an avatar similar to the first avatar of the current user.
The specific method and principle of step 604 and step 104 are the same, and please refer to fig. 1 and the related contents of step 104 for detailed description, which is not repeated herein.
Step 605, responding to a first instruction of a current user, displaying at least one frame of head portrait in a designated gallery; wherein the designated gallery comprises a preset gallery or a historical gallery; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user.
And 606, responding to a second instruction of the current user on the interactive interface of the designated gallery, and replacing the head portrait of the current user with the head portrait corresponding to the second instruction.
In an application scenario of the present disclosure, as shown in fig. 7(a) -7 (e) (5 figures in total), after a current user joins the group XX-Team, if the current user needs to confirm whether there are other users with the same or similar head portraits within the group XX-Team, the "add" button 701 shown in fig. 7(a) is triggered to obtain the interface shown in fig. 7(b), and then the "add" button 701 becomes the "close" button, and a "head portraits similarity determination" button 702 appears at the bottom of the "close" button 701 (below in fig. 7 (b)). After the "avatar similarity determination" button 702 is triggered, the steps of the method shown in fig. 1 are performed, and when it is determined that an avatar similar to the current user's avatar is similar to the current user's avatar, a bullet box 703 is displayed, which bullet box 703 includes text (e.g., a user who finds a similar or identical avatar, whether to replace the avatar) and a button (e.g., button "yes" and/or button "no"). Then, according to the triggering operation of the current user, whether the head portrait of the current user is replaced is determined, which comprises the following steps:
when the button "no" is triggered, it is not more like an avatar. Alternatively, when the button "yes" is triggered (corresponding to the first instruction), at least one frame of avatar in the designated gallery is displayed in response to the trigger operation, and fig. 7(e) shows a multi-frame image. When the current user selects to trigger one frame of avatar, such as avatar 705 in the middle of fig. 7(e), button yes and/or button no appears in the interactive interface of the designated image, and finally, after the current user selects trigger button yes, the avatar of the current user is replaced with the selected avatar 705. If the current user selects the trigger button "no", the current user may reselect the avatar until the avatar is determined, and after the current user selects the trigger button "yes", the avatar of the current user is replaced with the selected avatar 705.
In this embodiment, the current user can actively replace the head portrait, thereby avoiding the situation that the head portraits are similar or the same, and improving the group chat experience of the user. In practical application, because the hobbies of each user are different, the current user is guided to actively change the head portrait, the participation sense of the current user can be improved, and the group chat experience is improved.
FIG. 8 is a flowchart illustrating a method of determining similar avatars, according to an exemplary embodiment. Referring to fig. 8, the method of determining similar avatar includes:
step 801, generating first head image comparison information of a current user according to a first head image of the current user.
The specific method and principle of step 801 and step 101 are the same, please refer to fig. 1 and related contents of step 101 for detailed description, which is not repeated herein.
Step 802, generating second avatar comparison information corresponding to the second avatar of the at least one other user according to the second avatar of the at least one other user in the group where the current user is located.
The specific method and principle of step 802 and step 102 are the same, and please refer to fig. 1 and the related contents of step 102 for detailed description, which is not repeated herein.
Step 803, based on the first avatar comparison information and the second avatar comparison information, determining a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group.
The specific method and principle of step 803 and step 103 are the same, and please refer to fig. 1 and the related contents of step 103 for detailed description, which is not repeated herein.
Step 804, if there is a similarity value greater than or equal to a preset threshold in the similarity values, determining the second avatar of the other user corresponding to the similarity value greater than or equal to the preset threshold as an avatar similar to the first avatar of the current user.
The specific method and principle of step 804 and step 104 are the same, and please refer to fig. 1 and the related contents of step 104 for detailed description, which is not repeated herein.
In step 805, the head portrait of the current user is replaced with the designated image.
In an embodiment of the present disclosure, the designated image in the present disclosure is a frame avatar in a designated gallery. Wherein the designated gallery comprises a preset gallery or a historical gallery; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user.
Therefore, in the embodiment, after the existence of the similar head portraits is determined, one frame of head portraits in the image library is automatically designated in the head portraits replacement of the current user, the head portraits do not need to be manually replaced by the current user, the time of the user is saved, and the group chat experience of the user is improved.
FIG. 9 is a flowchart illustrating a method of determining similar avatars, according to an exemplary embodiment. Referring to fig. 9, the method of determining similar avatar includes:
step 901, generating first head image comparison information of the current user according to the first head image of the current user.
The specific method and principle of step 901 and step 101 are the same, and please refer to fig. 1 and related contents of step 101 for detailed description, which is not described herein again.
Step 902, generating second avatar comparison information corresponding to the second avatar of the at least one other user according to the second avatar of the at least one other user in the group where the current user is located.
The specific method and principle of step 902 and step 102 are the same, please refer to fig. 1 and the related contents of step 102 for detailed description, which is not repeated herein.
Step 903, determining a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information.
The specific method and principle of step 903 and step 103 are the same, and please refer to fig. 1 and related contents of step 103 for detailed description, which is not described herein again.
Step 904, if there is a similarity value greater than or equal to a preset threshold in the similarity values, determining the second avatar of the other user corresponding to the similarity value greater than or equal to the preset threshold as an avatar similar to the first avatar of the current user.
The specific method and principle of step 904 and step 104 are the same, and please refer to fig. 1 and the related contents of step 104 for detailed description, which is not repeated herein.
Step 905, replacing the first head portrait with a corresponding head portrait when the first head portrait joins the group.
In the embodiment, the head portrait is automatically replaced, so that the head portrait corresponding to the current user who joins the group can be replaced, and the group chat experience is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for determining similar avatar, as shown in fig. 10, the apparatus including:
a first generating module 1001, configured to generate first head image comparison information of a current user according to a first head image of the current user;
a second generating module 1002, configured to generate second avatar comparison information corresponding to a second avatar of at least one other user according to the second avatar of the at least one other user in the group where the current user is located;
a similarity value determining module 1003, configured to determine a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information;
a similar avatar determination module 1004, configured to determine, when there is a similar value greater than or equal to a preset threshold in the similar values, that the second avatar of the other user corresponding to the similar value greater than or equal to the preset threshold is a similar avatar to the first avatar of the current user.
Optionally, the first generating module 1001 includes:
the first gray unit is used for graying the first head image to obtain a first gray value vector, namely the first head image comparison information of the current user;
or;
and the first color unit is used for extracting the same color in each pixel from the first head image to obtain a first color value vector of the first head image, namely the first head image comparison information of the current user.
Optionally, the second generating module 1002 includes:
a second gray scale unit, configured to graye the second avatar, a second gray scale value vector, that is, second avatar comparison information of the user, for each second avatar;
alternatively, the first and second electrodes may be,
a second color unit, configured to extract, for each second avatar, the same color in each pixel from the second avatar, and obtain a second color value vector of the second avatar, that is, second avatar comparison information of the other user; the color extracted from the second avatar is the same as the color extracted from the first avatar.
In an embodiment of the present disclosure, as shown in fig. 11, the similarity value determining module includes:
a cosine value determination unit 1101 configured to determine, for each of the other users in the group, a cosine value of the first avatar comparison information and the second avatar comparison information of the second avatar of the each user; the first head image comparison information is a first gray value vector or a first color value vector; the second head portrait comparison information is a second gray value vector or a second color value vector;
a similarity value determining unit 1102, configured to determine a similarity value between the second avatar corresponding to each user and the first avatar of the current user based on the cosine value.
In an embodiment of the present disclosure, as shown in fig. 12, the apparatus includes a first generating module 1201, a second generating module 1202, a similar value determining module 1203, and a similar avatar determining module 1204, where each of the modules in this embodiment corresponds to the first generating module 1001, the second generating module 1002, the similar value determining module 1003, and the similar avatar determining module 1004 in fig. 10, and details are not repeated here. Furthermore, the apparatus further comprises:
a third generating module 1205, configured to generate a prompt message when the similar avatar determination module determines that an avatar similar to the first avatar of the current user exists; the prompting message is used for prompting that users similar to the first head portrait of the current user exist in the group.
In an embodiment of the present disclosure, as shown in fig. 13, the apparatus further includes:
a first response module 1301, configured to display at least one frame of avatar in the designated gallery in response to the first instruction of the current user; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user;
a second response module 1302, configured to respond to a second instruction of the current user on the interactive interface of the designated gallery, replace the first avatar of the current user with the avatar corresponding to the second instruction.
In an embodiment of the present disclosure, as shown in fig. 14, the apparatus includes a first generating module 1401, a second generating module 1402, a similar value determining module 1403, and a similar avatar determining module 1404, where in this embodiment, each of the modules corresponds to the first generating module 1001, the second generating module 1002, the similar value determining module 1003, and the similar avatar determining module 1004 in fig. 10, and details are not repeated here. The device further comprises: a first avatar exchange module 1405 for exchanging the first avatar of the current user with a designated image when the similar avatar determination module determines that there is an avatar similar to the first avatar of the current user; the specified image is a frame of head portrait in a specified image library; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user.
In an embodiment of the present disclosure, as shown in fig. 15, the apparatus further includes: a second avatar exchanging module 1501, configured to, after determining that the chat in the group is finished, exchange the first avatar with a corresponding avatar when the group is joined.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, the computer-readable storage medium having stored thereon a number of computer instructions which, when executed, perform the following:
generating first head portrait comparison information of the current user according to the first head portrait of the current user;
generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located;
determining a similarity value between a first avatar of the current user and a second avatar of at least one other user within the group based on the first avatar comparison information and the second avatar comparison information;
and if the similarity value greater than or equal to a preset threshold value exists in the similarity values, determining the second head portrait of the other user corresponding to the similarity value greater than or equal to the preset threshold value as the head portrait similar to the first head portrait of the current user.
FIG. 16 is a block diagram illustrating an electronic device in accordance with an example embodiment. For example, the electronic device 1600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, an exercise device, a personal digital assistant, and so forth.
A processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
generating first head portrait comparison information of the current user according to the first head portrait of the current user;
generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located;
determining a similarity value between a first avatar of the current user and a second avatar of at least one other user within the group based on the first avatar comparison information and the second avatar comparison information;
and if the similarity value greater than or equal to a preset threshold value exists in the similarity values, determining the second head portrait of the other user corresponding to the similarity value greater than or equal to the preset threshold value as the head portrait similar to the first head portrait of the current user.
Referring to fig. 16, electronic device 1600 may include one or more of the following components: processing component 1602, memory 1604, power component 1606, multimedia component 1608, audio component 1610, input/output (I/O) interface 1612, sensor component 1614, and communications component 1616.
The processing component 1602 generally controls overall operation of the device 1600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 1602 may include one or more processors 1620 to execute instructions. Further, the processing component 1602 can include one or more modules that facilitate interaction between the processing component 1602 and other components. For example, the processing component 1602 can include a multimedia module to facilitate interaction between the multimedia component 1608 and the processing component 1602.
The memory 1604 is configured to store various types of data to support operation at the apparatus 1600. Examples of such data include instructions for any application or method operating on device 1600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1604 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.
A power supply component 1606 provides power to the various components of the device 1600. The power components 1606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 1600.
The multimedia component 1608 includes a screen that provides an output interface between the device 1600 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1608 comprises a front-facing camera and/or a rear-facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 1600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1610 is configured to output and/or input an audio signal. For example, audio component 1610 includes a Microphone (MIC) configured to receive external audio signals when apparatus 1600 is in an operational mode, such as a call mode, recording mode, and voice recognition mode. The received audio signal may further be stored in the memory 1604 or transmitted via the communications component 1616. In some embodiments, audio component 1610 further includes a speaker for outputting audio signals.
I/O interface 1612 provides an interface between the processing component 1602 and a peripheral interface module, which can be a keyboard, click wheel, button, or the like. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor assembly 1614 includes one or more sensors for providing status assessment of various aspects to device 1600. For example, sensor assembly 1614 can detect an open/closed state of device 1600, the relative positioning of components, such as a display and keypad of device 1600, a change in position of device 1600 or a component of device 1600, the presence or absence of user contact with device 1600, orientation or acceleration/deceleration of device 1600, and a change in temperature of device 1600. The sensor assembly 1614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communications component 1616 is configured to facilitate communications between the apparatus 1600 and other devices in a wired or wireless manner. The device 1600 may access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an example embodiment, the apparatus 1600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 1604 comprising instructions, executable by the processor 1620 of the apparatus 1600 in the present disclosure is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A method of determining similar avatars, said method comprising:
generating first head portrait comparison information of the current user according to the first head portrait of the current user;
generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located;
determining a similarity value between a first avatar of the current user and a second avatar of at least one other user within the group based on the first avatar comparison information and the second avatar comparison information;
if the similarity value greater than or equal to a preset threshold value exists in the similarity values, determining the second head portrait of the other user corresponding to the similarity value greater than or equal to the preset threshold value as a head portrait similar to the first head portrait of the current user;
replacing the first portrait of the current user with a designated image; the specified image is a frame of head portrait in a specified image library; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user;
and after the fact that the chatting in the group is finished is determined, the first head portrait is replaced by a corresponding head portrait when the first head portrait is added into the group.
2. The method of claim 1, wherein generating the first portrait comparison information for the current user based on the first portrait of the current user comprises:
graying the first head portrait to obtain a first gray value vector of the first head portrait, namely first head portrait comparison information of the current user;
alternatively, the first and second electrodes may be,
and extracting the same color in each pixel from the first head image to obtain a first color value vector of the first head image, namely the first head image comparison information of the current user.
3. The method of claim 1, wherein generating second avatar comparison information corresponding to the second avatar of the at least one other user according to the second avatar of the at least one other user in the group in which the current user is located comprises:
graying the second head portrait to obtain a second gray value vector of the second head portrait, namely second head portrait comparison information of the user;
alternatively, the first and second electrodes may be,
for each second head portrait, extracting the same color in each pixel from the second head portrait to obtain a second color value vector of the second head portrait, namely second head portrait comparison information of other users; the color extracted from the second avatar is the same as the color extracted from the first avatar.
4. The method of claim 2 or 3, wherein determining a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information comprises:
determining, for each user of at least one other user within the group, a cosine value of the first avatar comparison information and second avatar comparison information of a second avatar of the each user; the first head image comparison information is a first gray value vector or a first color value vector; the second head portrait comparison information is a second gray value vector or a second color value vector;
and determining a similarity value between the second head portrait corresponding to each user and the first head portrait of the current user based on the cosine value.
5. The method according to claim 1, wherein after determining the second avatar of the other user corresponding to the similarity value greater than or equal to the preset threshold as the avatar similar to the first avatar of the current user, the method further comprises:
generating a prompt message; the prompting message is used for prompting that users similar to the first head portrait of the current user exist in the group.
6. The method according to claim 1, wherein after determining the second avatar of the other user corresponding to the similarity value greater than or equal to the preset threshold as the avatar similar to the first avatar of the current user, the method further comprises:
responding to a first instruction of the current user, and displaying at least one frame of head portrait in a designated gallery; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user;
and responding to a second instruction of the current user on an interactive interface of the appointed gallery, and replacing the first avatar of the current user with the avatar corresponding to the second instruction.
7. An apparatus for determining similar avatars, said apparatus comprising:
the first generation module is used for generating first head image comparison information of the current user according to a first head image of the current user;
the second generation module is used for generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located;
a similarity value determination module, configured to determine a similarity value between the first avatar of the current user and the second avatar of at least one other user in the group based on the first avatar comparison information and the second avatar comparison information;
the similar head portrait determining module is used for determining the second head portrait of the other user corresponding to the similar value which is greater than or equal to the preset threshold as the head portrait which is similar to the first head portrait of the current user when the similar value which is greater than or equal to the preset threshold exists in the similar values;
a first avatar replacement module for replacing the first avatar of the current user with a designated image when the similar avatar determination module determines that an avatar similar to the first avatar of the current user exists; the specified image is a frame of head portrait in a specified image library; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user;
and the second avatar replacing module is used for replacing the first avatar with the corresponding avatar when the first avatar is added into the group after the chat in the group is determined to be finished.
8. The apparatus of claim 7, wherein the first generating module comprises:
the first gray unit is used for graying the first head image to obtain a first gray value vector, namely the first head image comparison information of the current user;
or;
and the first color unit is used for extracting the same color in each pixel from the first head image to obtain a first color value vector of the first head image, namely the first head image comparison information of the current user.
9. The apparatus of claim 7, wherein the second generating module comprises:
a second graying unit, configured to graying the second avatar with a second graying value vector, that is, second avatar comparison information of the user, for each second avatar;
alternatively, the first and second electrodes may be,
a second color unit, configured to extract, for each second avatar, the same color in each pixel from the second avatar, and obtain a second color value vector of the second avatar, that is, second avatar comparison information of the other user; the color extracted from the second avatar is the same as the color extracted from the first avatar.
10. The apparatus of claim 7, wherein the similarity value determining module comprises:
a cosine value determination unit configured to determine, for each of the other users in the group, a cosine value of the first avatar comparison information and the second avatar comparison information of the second avatar of the each user; the first head image comparison information is a first gray value vector or a first color value vector; the second head portrait comparison information is a second gray value vector or a second color value vector;
and the similarity value determining unit is used for determining a similarity value between the second head portrait corresponding to each user and the first head portrait of the current user based on the cosine value.
11. The apparatus of claim 7, further comprising:
a third generating module, configured to generate a prompt message when the similar avatar determination module determines that an avatar similar to the first avatar of the current user exists; the prompting message is used for prompting that users similar to the first head portrait of the current user exist in the group.
12. The apparatus of claim 7, further comprising:
the first response module is used for responding to a first instruction of the current user and displaying at least one frame of head portrait in the appointed image library; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user;
and the second response module is used for responding to a second instruction of the current user on the interactive interface of the specified gallery, and replacing the first avatar of the current user with the avatar corresponding to the second instruction.
13. An electronic device, characterized in that the electronic device comprises:
a display screen;
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
generating first head portrait comparison information of the current user according to the first head portrait of the current user;
generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located;
determining a similarity value between a first avatar of the current user and a second avatar of at least one other user within the group based on the first avatar comparison information and the second avatar comparison information;
if the similarity value greater than or equal to a preset threshold value exists in the similarity values, determining the second head portrait of the other user corresponding to the similarity value greater than or equal to the preset threshold value as a head portrait similar to the first head portrait of the current user;
replacing the first portrait of the current user with a designated image; the specified image is a frame of head portrait in a specified image library; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user;
and after the fact that the chatting in the group is finished is determined, the first head portrait is replaced by a corresponding head portrait when the first head portrait is added into the group.
14. A computer-readable storage medium having a computer program stored thereon, wherein the computer-readable storage medium has stored thereon computer instructions that, when executed, perform the following:
generating first head portrait comparison information of the current user according to the first head portrait of the current user;
generating second head portrait comparison information corresponding to the second head portrait of at least one other user according to the second head portrait of at least one other user in the group where the current user is located;
determining a similarity value between a first avatar of the current user and a second avatar of at least one other user within the group based on the first avatar comparison information and the second avatar comparison information;
if the similarity value greater than or equal to a preset threshold value exists in the similarity values, determining the second head portrait of the other user corresponding to the similarity value greater than or equal to the preset threshold value as a head portrait similar to the first head portrait of the current user;
replacing the first portrait of the current user with a designated image; the specified image is a frame of head portrait in a specified image library; the appointed image library comprises a preset image library or a historical image library; the preset image library comprises a plurality of frames of pre-selected head portraits, and the historical image library comprises the head portraits used by the current user;
and after the fact that the chatting in the group is finished is determined, the first head portrait is replaced by a corresponding head portrait when the first head portrait is added into the group.
CN201710769259.6A 2017-08-31 2017-08-31 Method and device for determining similar head portrait and electronic equipment Active CN107527072B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710769259.6A CN107527072B (en) 2017-08-31 2017-08-31 Method and device for determining similar head portrait and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710769259.6A CN107527072B (en) 2017-08-31 2017-08-31 Method and device for determining similar head portrait and electronic equipment

Publications (2)

Publication Number Publication Date
CN107527072A CN107527072A (en) 2017-12-29
CN107527072B true CN107527072B (en) 2020-07-03

Family

ID=60683113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710769259.6A Active CN107527072B (en) 2017-08-31 2017-08-31 Method and device for determining similar head portrait and electronic equipment

Country Status (1)

Country Link
CN (1) CN107527072B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110634168B (en) * 2018-06-21 2023-09-12 钉钉控股(开曼)有限公司 Method and device for generating cluster head portraits
CN109005193A (en) * 2018-09-03 2018-12-14 湖北文理学院 Alarming method for power, device and electric terminal
CN109388456B (en) * 2018-09-20 2021-12-07 维沃移动通信有限公司 Head portrait selection method and mobile terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102355534A (en) * 2011-11-01 2012-02-15 宇龙计算机通信科技(深圳)有限公司 Mobile terminal and contact information recommendation method
CN102378005A (en) * 2010-08-10 2012-03-14 索尼公司 Moving image processing apparatus, moving image processing method, and program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020198B (en) * 2012-11-30 2016-10-26 台州市合正信息科技有限公司 One searches for mesh calibration method in video
CN104519401B (en) * 2013-09-30 2018-04-17 贺锦伟 Video segmentation point preparation method and equipment
US9697595B2 (en) * 2014-11-26 2017-07-04 Adobe Systems Incorporated Content aware fill based on similar images
CN104951500B (en) * 2015-04-24 2018-05-29 小米科技有限责任公司 Method for displaying head portrait, device and terminal
CN105100193B (en) * 2015-05-26 2018-12-11 小米科技有限责任公司 Cloud business card recommended method and device
CN106960211B (en) * 2016-01-11 2020-04-14 北京陌上花科技有限公司 Key frame acquisition method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102378005A (en) * 2010-08-10 2012-03-14 索尼公司 Moving image processing apparatus, moving image processing method, and program
CN102355534A (en) * 2011-11-01 2012-02-15 宇龙计算机通信科技(深圳)有限公司 Mobile terminal and contact information recommendation method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Investiqation of the Image Quality Assessment using Neural Networks and Structure Similarty;Chihhsien Kung et al.;《Proceedings of the international Symposium on Computer Science》;20101231;摘要 *
SNS在线身份信息对用户信任评定的影响;张升;《中国优秀硕士学问论文全文数据库 信息科技辑》;20140515;I138-89 *

Also Published As

Publication number Publication date
CN107527072A (en) 2017-12-29

Similar Documents

Publication Publication Date Title
US10152207B2 (en) Method and device for changing emoticons in a chat interface
US9674395B2 (en) Methods and apparatuses for generating photograph
US9591256B2 (en) Methods and devices for video communication
US20180286097A1 (en) Method and camera device for processing image
JP6363299B2 (en) Color gamut mode switching method and apparatus
US20170304735A1 (en) Method and Apparatus for Performing Live Broadcast on Game
CN105095881B (en) Face recognition method, face recognition device and terminal
CN106408603B (en) Shooting method and device
CN110708559B (en) Image processing method, device and storage medium
CN107967459B (en) Convolution processing method, convolution processing device and storage medium
CN104317869A (en) Instant-messaging-based background setting method and device
CN111953904B (en) Shooting method, shooting device, electronic equipment and storage medium
CN107527072B (en) Method and device for determining similar head portrait and electronic equipment
CN106453846B (en) Display method and device of two-dimensional code business card
CN113920465A (en) Method and device for identifying film trailer, electronic equipment and storage medium
CN107424130B (en) Picture beautifying method and device
CN111953903A (en) Shooting method, shooting device, electronic equipment and storage medium
CN112188091A (en) Face information identification method and device, electronic equipment and storage medium
CN110876014B (en) Image processing method and device, electronic device and storage medium
CN107730443B (en) Image processing method and device and user equipment
CN111835941B (en) Image generation method and device, electronic equipment and computer readable storage medium
CN105653623B (en) Picture collection method and device
CN107122356B (en) Method and device for displaying face value and electronic equipment
CN111835977B (en) Image sensor, image generation method and device, electronic device, and storage medium
CN108769513B (en) Camera photographing method and device

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