CN109618018B - User head portrait display method, device, terminal, server and storage medium - Google Patents

User head portrait display method, device, terminal, server and storage medium Download PDF

Info

Publication number
CN109618018B
CN109618018B CN201811541567.4A CN201811541567A CN109618018B CN 109618018 B CN109618018 B CN 109618018B CN 201811541567 A CN201811541567 A CN 201811541567A CN 109618018 B CN109618018 B CN 109618018B
Authority
CN
China
Prior art keywords
user
avatar
picture
target
terminal
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
CN201811541567.4A
Other languages
Chinese (zh)
Other versions
CN109618018A (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201811541567.4A priority Critical patent/CN109618018B/en
Publication of CN109618018A publication Critical patent/CN109618018A/en
Application granted granted Critical
Publication of CN109618018B publication Critical patent/CN109618018B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4594Address books, i.e. directories containing contact information about correspondents
    • 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/52User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a user head portrait display method, a user head portrait display device, a terminal, a server and a storage medium, and belongs to the technical field of network communication. According to the technical scheme provided by the embodiment of the disclosure, the head portrait picture selected by the first user for the second user according to the preference of the first user can be acquired based on the head portrait setting request of the first user, so that the target head portrait picture is associated with the second user in the user relation chain of the first user, and when the first user views any interface related to the second user on a terminal where the first user logs in, the second user can display the target head portrait picture set by the first user for the second user, so that the head portrait picture of the second user meets the requirements of the first user.

Description

User head portrait display method, device, terminal, server and storage medium
Technical Field
The present disclosure relates to the field of network communication technologies, and in particular, to a method, an apparatus, a terminal, a server, and a storage medium for displaying a user avatar.
Background
With the development of network communication technology, more and more social applications are emerging, and users in the social applications set their head portraits by themselves so that other users can see the head portraits on interactive pages when performing any interaction with the users, and can quickly recognize the identities of the users based on the head portraits.
For example, the user a and the user B are related users, the user a may interact with the user B or view personal information of the user B, when the user a views the avatar of the user B, only the avatar set by the user B itself may be seen, after the user B changes the avatar of itself suddenly, the user a may temporarily fail to find the user B through the avatar, or the user a may dislike a new avatar changed by the user B for itself, and the like.
Disclosure of Invention
The disclosure provides a user head portrait display method, a device, a terminal, a server and a storage medium, which can display a head portrait set by a first user when the terminal logged in by the first user views the head portrait of a second user. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for displaying a user avatar, the method being applied to a terminal, including:
acquiring an avatar setting request of a first user, wherein the avatar setting request is used for indicating to set an avatar of a second user, and the first user and the second user are related users on a social application;
acquiring a target head portrait picture;
associating the target avatar picture with the second user in the user relationship chain for the first user;
and displaying the target head portrait picture in a head portrait display area of the second user on a display interface of the first user.
In one possible design, the obtaining the target avatar picture includes:
displaying at least one picture stored on the terminal;
when a second selection instruction for any one of the at least one picture is received, a picture corresponding to the second selection instruction is obtained and used as the target avatar picture.
In one possible design, the method further includes:
acquiring a preset number of historical target head portrait pictures associated with the second user based on the head portrait setting request;
when a selected instruction for any one of the preset number of historical avatar pictures is received, acquiring a historical target avatar picture corresponding to the selected instruction as the target avatar picture;
and displaying the target head portrait picture in the head portrait display area.
In one possible design, the displaying the target avatar picture in the avatar display area of the second user of the display interface of the first user includes:
and when the display interface is a conversation interface of the first user and the second user or a personal display interface of the second user, displaying the target avatar picture in an avatar display area of the second user.
In one possible design, the associating the target avatar picture with the second user in the user relationship chain of the first user includes:
acquiring a first storage address of the target head portrait picture at the terminal;
and associating the first storage address with the second user in a user relationship chain of the first user stored in the terminal.
In one possible design, the associating the target avatar picture with the second user in the user relationship chain of the first user includes:
acquiring a correlation instruction, wherein the correlation instruction is used for guiding a server to correlate the target head portrait picture with the second user in a user relation chain of the first user;
and sending the association instruction to the server.
In one possible design, the obtaining the avatar setting request of the first user includes:
displaying a personal information setting page of the second user, wherein the personal information setting page is provided with a head portrait setting control;
and when the triggering operation of the first user on the avatar setting control is detected, acquiring an avatar setting request of the first user.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for displaying a user avatar, the method being applied to a server, including:
receiving an association instruction for directing a server to associate a target avatar picture with a second user in a user relationship chain of the first user;
acquiring the target head portrait picture based on the association instruction;
associating the target avatar picture with the second user in the user relationship chain for the first user;
and when an avatar acquisition request of the first user is received, sending the target avatar picture to a terminal, wherein the avatar acquisition request is used for indicating to acquire the target avatar picture.
In one possible design, the obtaining the target avatar picture based on the association instruction includes:
and extracting the target head portrait picture carried by the association instruction based on the association instruction.
In one possible design, the associating the target avatar picture with the second user in the user relationship chain of the first user includes:
acquiring a second storage address of the target head portrait picture in the server;
associating the second storage address with the second user in the user relationship chain for the first user.
According to a third aspect of the embodiments of the present disclosure, there is provided a user avatar display apparatus applied to a terminal, including:
the system comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is configured to obtain an avatar setting request of a first user, the avatar setting request is used for indicating that an avatar of a second user is set, and the first user and the second user are users related in social application;
a second acquisition unit configured to acquire a target avatar picture;
an associating unit configured to associate the target avatar image with the second user in a user relationship chain of the first user;
a first display unit configured to display the target avatar picture in an avatar display area of the second user of the display interface of the first user.
In one possible design, the second obtaining unit is configured to:
displaying at least one historical avatar picture associated with the second user;
when a first selection instruction for any one of the at least one historical avatar picture is received, acquiring the historical avatar picture corresponding to the first selection instruction as the target avatar picture.
In one possible design, the apparatus further includes:
a third obtaining unit configured to obtain a preset number of historical target avatar pictures associated with the second user based on the avatar setting request;
the third obtaining unit is further configured to, when a selection instruction for any one of the preset number of historical avatar pictures is received, obtain a historical target avatar picture corresponding to the selection instruction as the target avatar picture;
a second display unit configured to display the target avatar picture in the avatar display area.
In one possible design, the second obtaining unit is configured to:
displaying at least one picture stored on the terminal;
when a second selection instruction for any one of the at least one picture is received, a picture corresponding to the second selection instruction is obtained and used as the target avatar picture.
In one possible design, the first display unit is configured to:
and when the display interface is a conversation interface of the first user and the second user or a personal display interface of the second user, displaying the target avatar picture in an avatar display area of the second user.
In one possible design, the association unit is configured to:
acquiring a first storage address of the target head portrait picture at the terminal;
and associating the first storage address with the second user in a user relationship chain of the first user stored in the terminal.
In one possible design, the association unit is configured to:
acquiring a correlation instruction between the target head portrait picture and the first user and the second user;
and sending the association instruction to a server.
In one possible design, the first obtaining unit is configured to:
displaying a personal information setting page of the second user, wherein the personal information setting page is provided with a head portrait setting control;
and when the triggering operation of the first user on the avatar setting control is detected, triggering an avatar setting request of the first user.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a user avatar display apparatus applied to a server, including:
a receiving unit configured to receive a correlation instruction for directing a server to correlate a target avatar picture with a second user in a user relationship chain of the first user;
an acquisition unit configured to acquire the target avatar picture based on the association instruction;
an associating unit configured to associate the target avatar image with the second user in a user relationship chain of the first user;
the sending unit is configured to send the target head portrait picture to a terminal when a head portrait obtaining request of a first user is received, wherein the head portrait obtaining request is used for indicating obtaining of the target head portrait picture.
In one possible design, the obtaining unit is configured to:
and extracting the target head portrait picture carried by the association instruction based on the association instruction.
In one possible design, the association unit is configured to:
acquiring a second storage address of the target head portrait picture in a server;
associating the second storage address with the second user in the user relationship chain for the first user.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a terminal, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring an avatar setting request of a first user, wherein the avatar setting request is used for indicating to set an avatar of a second user, and the first user and the second user are related users on a social application;
acquiring a target head portrait picture;
associating the target avatar picture with the second user in the user relationship chain for the first user;
and displaying the target head portrait picture in a head portrait display area of the second user on a display interface of the first user.
According to a sixth aspect of embodiments of the present disclosure, there is provided a server including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
receiving an association instruction for directing a server to associate a target avatar picture with a second user in a user relationship chain of the first user;
acquiring the target head portrait picture based on the association instruction;
associating the target avatar picture with the second user in the user relationship chain for the first user;
and when an avatar acquisition request of a first user is received, sending the target avatar picture to a terminal, wherein the avatar acquisition request is used for indicating to acquire the target avatar picture.
According to a seventh aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having instructions therein, which when executed by a processor of a terminal, enable the terminal to perform a user avatar display method, the method comprising:
acquiring an avatar setting request of a first user, wherein the avatar setting request is used for indicating to set an avatar of a second user, and the first user and the second user are related users on a social application;
acquiring a target head portrait picture;
associating the target avatar picture with the second user in the user relationship chain for the first user;
and displaying the target head portrait picture in a head portrait display area of the second user on a display interface of the first user.
According to an eighth aspect of embodiments of the present disclosure, there is provided an application program comprising one or more instructions which, when executed by a processor of a terminal, enable the terminal to perform a method of displaying a user avatar, the method comprising:
acquiring an avatar setting request of a first user, wherein the avatar setting request is used for indicating to set an avatar of a second user, and the first user and the second user are related users on a social application;
acquiring a target head portrait picture;
associating the target avatar picture with the second user in the user relationship chain for the first user;
and displaying the target head portrait picture in a head portrait display area of the second user on a display interface of the first user.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the embodiment of the disclosure can acquire the avatar picture selected by the first user for the second user based on the avatar setting request of the first user, so that the target avatar picture is associated with the second user in the user relationship chain of the first user, and when the first user views any interface related to the second user on the terminal where the first user logs in, the second user can display the target avatar picture set by the first user for the second user, so that the avatar picture of the second user meets the requirement of the first user.
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 chart illustrating a method of user avatar display in accordance with an exemplary embodiment.
FIG. 2 is a flow chart illustrating a method of user avatar display in accordance with an exemplary embodiment.
FIG. 3 is a flow chart illustrating a method of user avatar display in accordance with an exemplary embodiment.
FIG. 4 is a flow chart illustrating a method of user avatar display in accordance with an exemplary embodiment.
FIG. 5 is a flow chart illustrating a method of user avatar display in accordance with an exemplary embodiment.
Fig. 6 is a block diagram illustrating a user avatar display apparatus according to an exemplary embodiment.
Fig. 7 is a block diagram illustrating a user avatar display apparatus according to an exemplary embodiment.
Fig. 8 is a block diagram illustrating a structure of a terminal 800 for user avatar display according to an exemplary embodiment.
Fig. 9 is a block diagram illustrating a structure of a server 900 for user avatar display according to 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 apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a user avatar display method according to an exemplary embodiment, where the user avatar display method is applied to a terminal, as shown in fig. 1, and includes the following steps:
in step 101, an avatar setting request of a first user is obtained, where the avatar setting request is used to indicate that an avatar of a second user is set, and the first user and the second user are users associated in a social application.
In step 102, a target avatar picture is acquired.
In step 103, the target avatar image is associated with the second user in the user relationship chain of the first user.
In step 104, the target avatar picture is displayed in the avatar display area of the second user of the display interface of the first user.
In some embodiments, the obtaining the target avatar picture includes:
displaying at least one picture stored on the terminal;
and when a second selection instruction for any one of the at least one picture is received, acquiring a picture corresponding to the second selection instruction as the target avatar picture.
In some embodiments, the method further comprises:
acquiring a preset number of historical target head portrait pictures associated with the second user based on the head portrait setting request;
when a selected instruction for any one of the preset number of historical avatar pictures is received, acquiring a historical target avatar picture corresponding to the selected instruction as the target avatar picture;
and displaying the target head portrait picture in the head portrait display area.
In some embodiments, the target avatar picture is displayed in the avatar display area of the second user of the first user's display interface:
when the display interface is a conversation interface of the first user and the second user or a personal display interface of the second user, displaying the target avatar picture in an avatar display area of the second user.
In some embodiments, associating the target avatar picture with the second user in the user relationship chain of the first user comprises:
acquiring a first storage address of the target head portrait picture at the terminal;
and associating the first storage address with the second user in a user relationship chain of the first user stored by the terminal.
In some embodiments, associating the target avatar picture with the second user in the user relationship chain of the first user comprises:
acquiring a correlation instruction, wherein the correlation instruction is used for guiding a server to correlate the target head portrait picture with the second user in a user relation chain of the first user;
and sending the association instruction to a server.
In some embodiments, the obtaining the avatar setting request of the first user includes:
displaying a personal information setting page of the second user, wherein the personal information setting page is provided with a head portrait setting control;
and when the triggering operation of the first user on the avatar setting control is detected, acquiring an avatar setting request of the first user.
Fig. 2 is a flowchart illustrating a user avatar display method according to an exemplary embodiment, where the user avatar display method is applied to a server, as shown in fig. 2, and includes the following steps:
in step 201, an association instruction for directing the server to associate the target avatar picture with the second user in a user relationship chain of the first user is received.
In step 202, the target avatar picture is obtained based on the association instruction.
In step 203, the target avatar image is associated with the second user in the user relationship chain of the first user.
In step 204, when an avatar acquisition request of the first user is received, the target avatar picture is sent to a terminal, where the avatar acquisition request is used to instruct to acquire the target avatar picture.
In some embodiments, the obtaining the target avatar picture based on the association instruction includes:
and extracting the target head portrait picture carried by the association instruction based on the association instruction.
In some embodiments, the associating the target avatar picture with the second user in the user relationship chain of the first user comprises:
acquiring a second storage address of the target head portrait picture in the server;
the second storage address is associated with the second user in a user relationship chain for the first user.
Fig. 3 is a flowchart illustrating a user avatar display method according to an exemplary embodiment, where the user avatar display method is applied to a terminal, as shown in fig. 3, and includes the following steps:
in step 301, the terminal displays a personal information setting page of the second user, the personal information setting page having an avatar setting control.
In the embodiment of the disclosure, the terminal may have a social application thereon, the first user may register and log in to the social application on the terminal, and the second user is a user associated with the first user on the social application. The first user and the second user may be strongly associated users, for example, the first user and the second user may be friends with each other on the social application, and of course, the first user and the second user may also be weakly associated users, for example, the second user may be a user concerned by the first user on the social application, which is not specifically limited herein. The personal information setting page may be used for the first user to set and change the personal information of the second user, for example, the first user may set the remark information of the second user through the personal information setting page. The avatar setting control is used for the first user to set the avatar of the second user, so that the avatar of the second user seen by the first user is the avatar set by the first user for the second user on the social application logged in by the first user.
For example, the process of the terminal displaying the personal information setting page of the second user may include the following steps 301A and 301B:
301A, the terminal displays the personal information detail page of the second user, and the personal information detail page is provided with an information setting control.
The personal information detail page may be configured to display specific information of the second user, where the specific information may be a nickname, an account number, an age, an avatar picture, a gender, and the like of the second user, and the specific information is not specifically limited in this disclosure. In addition, the personal information detail page may be associated with the head portrait display area of the second user in a preset interface, and the first user may trigger the personal information detail page of the second user by performing a trigger operation on the head portrait display area of the second user in the preset interface.
For example, when the terminal displays the session interfaces of the first user and the second user, the first user may perform a trigger operation on the avatar display area of the second user in the session interface to trigger the personal information detail page of the second user; when the terminal displays the personal display interface of the second user, the first user can also perform triggering operation on the head portrait display area of the second user in the personal display interface so as to trigger the personal information detail page of the second user. The preset interface is not specifically limited in the embodiments of the present disclosure.
301B, when the terminal detects the triggering operation of the information setting control in the personal information detail page, displaying the personal information setting page of the second user.
The personal information detail page may also have at least one operable control, such as an information setting control, which may be associated with the personal information setting page of the second user. The information setting control may be displayed on the personal information detail page, and of course, the information setting control may also be hidden in the personal information detail page, which is not specifically limited in this disclosure.
In addition, the personal information setting page may also have an avatar display area, the avatar display area of the personal information setting page may be associated with a preset page, and the avatar display area of the personal information setting page may be different from a page associated with the avatar display area in the preset interface.
It should be noted that the process of displaying the personal information setting page of the second user by the terminal is only an exemplary illustration, in other embodiments, the terminal may also display the personal information setting page of the second user by other manners, and the embodiment of the present disclosure is not specifically limited herein.
In step 302, when the terminal detects a triggering operation of the avatar setting control by a first user, an avatar setting request of the first user is obtained.
In the embodiment of the present disclosure, the avatar setting request is used to instruct the terminal to set the avatar of the second user. The avatar setting control can be associated with an avatar display area in a personal information setting page of a second user on the terminal, the user can trigger the avatar display area of the personal information setting page, and when the terminal detects the trigger operation on the avatar display area of the personal information setting page, the terminal can trigger the avatar setting request of the first user.
Of course, the avatar setting control can also be displayed in a preset area of the avatar display area in the personal information setting page. For example, the terminal may display the avatar setting control at a distance of 1cm from the right side of the avatar display area in the personal information setting page. And when the terminal detects the triggering operation of the head portrait setting control at the position 1cm on the right side of the head portrait display area in the personal information setting page, triggering the head portrait setting request of the first user. The specific display position and display method of the avatar setting control are not specifically limited in the embodiments of the present disclosure.
In step 303, the terminal displays at least one picture stored on the terminal.
In this disclosure, the at least one picture may be a picture taken by the terminal, or a picture downloaded by the terminal based on the internet, and this disclosure is not limited in this respect. Wherein the at least one picture may be stored in a gallery of the terminal.
Specifically, the avatar setting control in step 302 may be associated with a gallery call interface of the terminal, and when the terminal detects a trigger operation on the avatar setting control, the terminal may obtain the gallery call interface of the terminal, and through the gallery call interface, the terminal may display a gallery page, where the gallery page may display at least one picture. Of course, the terminal may also obtain the gallery call interface of the terminal in other manners, and the embodiment of the present disclosure is not specifically limited herein.
In step 304, when the terminal receives a selection instruction for any one of the at least one picture, the terminal acquires a picture corresponding to the selection instruction as the target avatar picture.
The selection instruction can be triggered by the selection operation of the first user on any picture in the gallery page of the terminal, and the first selection instruction can be used for the terminal to determine the target avatar picture based on the at least one picture.
Specifically, when the terminal displays the gallery page, the first user may directly click a display area of any one of at least one picture in the gallery page to trigger the selection instruction, of course, each picture in the gallery page may also have a checkable frame in a preset area, the preset area of the gallery page may have a confirmation control, when the first user checks the checkable frame corresponding to any one picture and performs a triggering operation on the confirmation control, the terminal may trigger the selection instruction, and the terminal may use any one picture corresponding to the checkable frame as the target avatar picture. Of course, the terminal may also trigger the selected instruction in other manners, and the embodiment of the present disclosure is not specifically limited herein.
It should be noted that the display area of any one of the pictures or the confirmation control may be associated with a personal information setting page of a user of the terminal, and after the terminal receives the selected instruction, the terminal may jump back to the personal information setting page of the user, where the avatar picture displayed in the avatar display area of the personal information setting page is the target avatar picture.
In step 305, the terminal obtains a first storage address of the target avatar picture at the terminal.
In the embodiment of the present disclosure, as can be seen from the foregoing steps 303 to 304, the target avatar picture may be any one picture already stored on the terminal, and then the first storage address is a storage address of the any one picture on the terminal.
In step 306, the terminal associates the first storage address with the second user in the user relationship chain of the first user stored by the terminal.
In the embodiment of the present disclosure, the user relationship chain of the first user is used to associate the first user with other users, the user relationship chain of the first user may be stored in a terminal or a server, and the user relationship chain of the first user may store a user identifier of the first user, user identifiers of other users, and user-defined information set by the first user for other users. For example, the custom information may be a storage address of the avatar picture set by the first user for the other user at the terminal or the server. The first user and the other users are associated users. Of course, other information may also be stored in the user relationship chain of the first user, and the embodiment of the disclosure is not specifically limited herein.
Taking the example that the user relationship chain of the first user is stored in the terminal, the user relationship chain of the first user may store the user identifier of the second user, so that the first user is associated with the second user. The terminal may update the user relationship chain of the first user each time it acquires one first storage address, and the terminal may store the one first storage address and the user identifier of the second user in the user relationship chain correspondingly, so as to associate the first storage address with the second user. And, the one first storage address may be stored in correspondence with a first time stamp indicating a point in time when the user relationship chain is updated based on the one first storage address.
Further, the terminal may preset a maximum number of the first storage addresses that may be stored in the user relationship chain, for example, the maximum number may be three. When the terminal acquires a target first storage address again after the first storage addresses stored in the user relationship chain reach the maximum number, the process of updating the user relationship chain by the terminal may include steps 306A to 306C:
306A, the terminal traverses the stored first timestamps in the user relationship chain to determine the earliest first timestamp.
The terminal may compare sequentially with other first time stamps based on any one of the first time stamps, and when the any one of the first time stamps is earlier than all of the other first time stamps, the terminal may determine the any one of the first time stamps as an earliest time stamp.
306B, the terminal replaces the first storage address corresponding to the earliest timestamp with the target first storage address.
And 306C, the terminal stores a second time stamp corresponding to the target first storage address in the user relationship chain, wherein the second time stamp is used for indicating a time point of updating the user relationship chain based on the target first storage address.
The above steps 305 and 306 are exemplified by storing the user relationship chain of the first user in the terminal, and the association process between the target avatar image and the second user is explained. Of course, the user relationship chain of the first user may also be stored in the server, the terminal may obtain the association instruction, and after the server receives the association instruction sent by the terminal, the server may associate the target avatar picture with the second user in the user relationship chain of the first user of the server based on the association instruction. The disclosed embodiments are not specifically limited herein. The association instruction may be triggered by the first user performing a triggering operation on any one of the display area of any one of the historical avatar pictures, the selectable control, the display area of any one of the pictures, and the confirmation control in step 304.
In step 307, when the display interface of the terminal is the conversation interface of the first user and the second user or the personal display interface of the second user, the target avatar picture is displayed in the avatar display area of the second user.
In the embodiment of the present disclosure, after associating the target avatar picture with the second user in the user relationship chain of the first user through steps 305 and 306, when the terminal displays any one of the interfaces related to the first user and the second user, the terminal may obtain the user relationship chain corresponding to the user identifier of the first user based on the user identifier of the first user, and then the terminal may obtain the storage address of the target avatar picture of the second user according to the user identifier of the second user, and finally, the terminal may obtain the target avatar picture based on the storage address of the target avatar picture, and when the terminal displays any one of the interfaces related to the first user and the second user, display the target avatar picture in the avatar display area of the second user, so that the first user may display the target avatar picture according to the second user, and quickly identifying the identity of the second user.
Wherein the interface on the terminal related to the first user and the second user can be a conversation interface of the first user and the second user. When the terminal receives a session request of a first user and a second user, the terminal can be triggered to display a session interface of the first user and the second user. Specifically, when the terminal detects a trigger operation on a message control, the terminal may display a session list of the first user, and when the terminal detects a trigger operation on a preset region corresponding to a second user in the session list, the terminal may obtain a session request between the first user and the second user, and based on the session request, the terminal may display a session interface between the first user and the second user. Of course, the terminal may also display the session interface of the first user and the second user in other manners, which is not limited herein.
In addition, the interfaces on the terminal for the first user and the second user may also be presented to the second user's individual. When the terminal receives a request for viewing the personal exhibition information of the second user, the terminal can be triggered to display the personal exhibition page of the second user. Specifically, based on a session interface of a first user and a second user, when the terminal detects a trigger operation on an avatar display area of the second user on the session interface, the terminal may display a profile page of the second user, the profile page may have a personal presentation control, and when the terminal detects the trigger operation on the personal presentation control, the terminal may display the personal presentation interface of the second user. Of course, the terminal may also display the personal display interface of the second user in other manners, and the embodiment of the disclosure is not limited herein.
Or the second user's personal display interface, and of course, the interface related to the first user and the second user may also be other interfaces, and the embodiments of the present disclosure are not limited in this respect.
The embodiment of the disclosure can acquire the avatar picture selected by the first user for the second user based on the avatar setting request of the first user, so that the target avatar picture is associated with the second user in the user relationship chain of the first user, and when the first user views any interface related to the second user on the terminal where the first user logs in, the second user can display the target avatar picture set by the first user for the second user, so that the avatar picture of the second user meets the requirement of the first user. Based on the user head portrait display method, the process of setting the target head portrait picture for the second user greatly enhances the flexibility of the head portrait display of the second user, and avoids the situation that the first user can only see the head portrait set for the second user when the first user views the interface related to the second user at the terminal where the first user logs in.
The above embodiment shown in fig. 3 is described by taking an example that the terminal acquires the target avatar picture from at least one picture stored in the terminal, and the embodiment may be applied to a scenario where the user relationship chain of the first user does not store any first storage address, and of course, the embodiment may also be applied to a scenario where the user relationship chain of the first user stores the first storage address. In some embodiments, when the first storage address is stored in the user relationship chain of the first user, the terminal may further obtain a target avatar picture based on the avatar picture corresponding to the first storage address, and based on this, the above steps 303 to 306 may be replaced with the following steps 401 to 404. Fig. 4 is a flowchart illustrating a user avatar display method according to an exemplary embodiment, which includes, referring to fig. 4:
in step 401, the terminal obtains a user relationship chain of the first user based on the avatar setting request of the first user.
In this embodiment of the present disclosure, the avatar setting request may carry a user identifier of a first user and a user identifier of a second user, where the user identifier of the first user is used to uniquely identify the first user, the user identifier of the second user is used to uniquely identify the second user, and the user identifier may be a user ID (Identification, identity Identification number). The user relationship chain of the first user may be stored in the terminal, or may also be stored in the server, and this disclosed embodiment takes the example that the user relationship chain of the first user is stored in the terminal as an example to describe a process of acquiring a target avatar picture by the terminal.
The terminal may obtain, from each user relationship chain stored in the terminal, a user relationship chain associated with the user identifier of the first user according to the user identifier of the first user carried by the avatar setting request, as the user relationship chain of the first user.
In step 402, the terminal obtains a preset number of first storage addresses associated with a second user according to a first preset rule based on the user relationship chain of the first user.
In the disclosed embodiment, the first storage address is a storage address of the avatar picture that has been associated with the second user in the user relationship chain of the first user. For example, the process of the terminal acquiring the preset number of first storage addresses associated with the second user based on the user relationship chain of the first user may include the following steps 402A to 402B:
402A, the terminal obtains all first storage addresses associated with the user identification of the second user from the user relationship chain of the first user according to the user identification of the second user carried by the avatar setting request.
As shown in step 306, each first storage address in the user relationship chain of the first user is stored corresponding to a first timestamp, where the first timestamp is used to indicate a time point when the user relationship chain is updated based on the first storage address. The terminal may obtain all the first storage addresses and the first time stamp corresponding to each first storage address based on the user identifier of the second user.
402B, the terminal obtains a preset number of first storage addresses from all the first storage addresses according to a first preset rule.
The first preset rule is a rule that the terminal acquires a preset number of first storage addresses. For example, the first preset rule may be an order of the first time stamps from morning to evening.
The terminal may rank all the first storage addresses corresponding to all the first timestamps according to the order of all the first timestamps from morning to evening. When the preset number is smaller than the number of all the first storage addresses, the terminal can obtain the first storage addresses with the latest preset number of the first timestamps from all the arranged first storage addresses; when the preset number is larger than the number of all the first storage addresses, the terminal can directly acquire all the first storage addresses.
It should be noted that the preset number may be smaller than or equal to the maximum number of the first storage addresses that can be stored in the user relationship chain.
In step 403, the terminal displays a preset number of historical target head portrait pictures corresponding to the preset number of first storage addresses according to a second preset rule.
In the embodiment of the present disclosure, the second preset rule is a rule that the terminal displays the preset number of historical target head portrait pictures. The historical target avatar picture is a target avatar picture obtained by the terminal based on the embodiment of fig. 3.
Based on the preset number of first storage addresses acquired in step 402, the terminal may acquire the historical target avatar picture corresponding to each first storage address according to the preset number of first storage addresses. Furthermore, the terminal can sequence the acquired historical target head portrait pictures with the preset number according to the sequence of the first timestamps corresponding to the first storage addresses from morning to evening. The terminal can display the sorted preset number of historical target head portrait pictures on a historical head portrait page.
The historical avatar page may be associated with the avatar setting control in step 302, and when the terminal detects a trigger operation on the avatar setting control, the terminal may display the historical avatar page. Of course, the preset number of historical target avatar pictures may also be displayed on other pages of the terminal, and the embodiment of the present disclosure is not limited herein.
In step 404, when the terminal receives a selection instruction for any one of the preset number of historical target avatar pictures, the terminal acquires the historical target avatar picture corresponding to the selection instruction as the target avatar picture.
In the embodiment of the disclosure, the selection instruction may be triggered by a user selection operation on the any one historical target avatar picture, and the selection instruction may be used for the terminal to determine the target avatar picture based on the at least one historical target avatar picture. The target head portrait picture is a head portrait picture selected by the user for a second user and is used for being displayed in a head portrait display area of the second user on the terminal.
The selection operation can be realized by directly clicking the display area of any one of the historical target avatar pictures on the terminal by the user, certainly, a selectable control can be displayed in the preset area of each historical target avatar picture displayed on the terminal, and the user can also realize the selection operation of the historical target avatar picture corresponding to the selectable control by clicking the selectable control. When the terminal detects the selection operation in any way, the terminal may trigger the selection instruction, and the embodiment of the present disclosure is not specifically limited herein.
The above steps 401 to 404 are described with an example that the user relationship chain of the first user is stored in the terminal, and a process that the terminal acquires the target avatar image is the same as the above steps 401 to 404 when the user relationship chain of the first user is stored in the server.
The above-mentioned embodiment shown in fig. 3 is described with an example that the user relationship chain of the first user is stored in the terminal, and the user relationship chain of the first user may also be stored in the server, and after the terminal acquires the target avatar picture of the second user, the terminal may also associate the target avatar picture with the first user and the second user in the server, and the following description is given with an embodiment shown in fig. 5. Fig. 5 is a flowchart illustrating a user avatar display method according to an exemplary embodiment, where the user avatar display method is applied to a server, as shown in fig. 5, and includes the following steps:
in step 500, the terminal obtains a correlation instruction, where the correlation instruction carries a target avatar picture.
In an embodiment of the disclosure, the association instructions are configured to direct the server to associate the target avatar image with the second user in a user relationship chain of the first user. The association instruction may carry an identifier of the first user and an identifier of the second user, where the identifier of the first user is used to uniquely represent the first user, and the identifier of the second user is used to uniquely represent the second user. The target avatar picture is any one picture selected by the terminal based on at least one picture stored by the terminal. For example, the association instruction may be triggered by the following scenario:
when the terminal displays the gallery page in step 305, if the terminal detects the selection operation of any picture in the gallery page, the terminal may trigger the association instruction. At this time, the associated instruction may carry the any one picture, and the any one picture is the target avatar picture. Of course, in other embodiments, the terminal may also trigger the association instruction in other manners, and the embodiments of the present disclosure are not specifically limited herein.
It should be noted that, since the history target avatar image in fig. 4 is already associated with the second user in the user relationship chain of the first user, when the terminal detects a selection operation on any history target avatar image, the terminal may not trigger the association instruction.
In step 501, the terminal sends an association instruction to the server.
In step 502, after receiving the association instruction, the server obtains a second storage address of the target avatar picture in the server based on the target avatar picture carried by the association instruction.
In this embodiment of the disclosure, the second storage address may be a URL (Uniform Resource Locator) storage address of the target avatar picture at the server. The server can extract the target head portrait picture carried by the association instruction based on the association instruction. The server can generate a URL storage address of the target avatar picture in the server based on the target avatar picture, and takes the URL storage address of the target avatar picture in the server as the second storage address.
In step 503, the server associates the second storage address with the second user in the user relationship chain of the first user.
In the embodiment of the present disclosure, a user relationship chain of each user may be stored in the server, and the user relationship chain may store a user identifier of each user, user identifiers of other users related to each user, custom information set for other users by each user, and the like. For example, the custom information may be a storage address of the avatar picture set by each user for the other user in the server.
The server may obtain the user relationship chain of the first user from the user relationship chains of the respective users stored in the server based on the user identifier of the first user carried by the association instruction. Furthermore, the server may store the second storage address and the user identifier of the second user in the user relationship chain of the first user correspondingly according to the user identifier of the second user carried by the association instruction. In the user relationship chain of the first user, the server associates the second storage address with the second user, and the server updates the user relationship chain based on each second storage address, which is the same as the process of step 306 described above, and the embodiments of the present disclosure are not described in detail here.
For example, the user relationship chain of the first user may be implemented in the server by the following algorithm:
create table my_friend_setting{
id bigint auto imcrement primary key,
uid binary not null,// first user ID
friendiD bigint null,// second user ID
avatar varchar (255)// second memory address
use _ other borol; show _ avatar varchar (255)// determine if the first user is a second user-defined avatar and determine the corresponding second storage address
nickname of nickname varchar (255),// remark nickname of second user
create _ time timestamp,// creation time
update _ time estimate// update time
}
In the above exemplary user relationship chain of the first user, the first user ID, the second storage address, the judgment field, the remark nickname of the second user, the time when the user relationship chain is created, the time when the user relationship chain is updated, and the like are stored. And a field corresponding to the second storage address can be null, and is used for indicating that the first user does not set the target avatar picture for the second user. The determination field may be used to determine whether a field corresponding to the second storage address is empty.
In step 504, the terminal obtains an avatar acquisition request of the first user.
In this embodiment of the present disclosure, the avatar acquisition request is used to instruct the server to acquire an avatar of the second user. The avatar acquisition request may carry a user identifier of the first user and a user identifier of the second user.
After the server associates the target avatar picture with the second user in the user relationship chain of the first user, the avatar capture request may be triggered by the following scenario: the first user logs on to the terminal and the terminal initially displays an interface associated with the second user.
In this scenario, the first user logging on to the terminal includes two possibilities: (1) the first user may have never previously logged on the terminal, this login being the first time the first user logs on the terminal; (2) before the terminal acquires the target head portrait picture of the second user, the first user may log in the terminal.
Based on the above two possibilities, the terminal does not cache the target avatar picture of the second user, so that, under both possibilities, when the terminal initially displays the interface related to the second user, the other terminal may trigger the avatar acquisition request. The interface related to the second user may be a session interface between the first user and the second user, or may also be a personal display page of the second user, or may also be other interfaces related to the second user, which is not limited herein.
In step 505, the terminal sends the avatar acquisition request to the server.
In step 506, after the server receives the avatar acquisition request of the first user, the server acquires the target avatar picture based on the avatar acquisition request.
Based on any one of the above-mentioned two trigger scenarios of the avatar acquisition request, the process of the server sending the target avatar picture to the terminal may include the following exemplary steps 506A to 506B:
506A, when the server receives the avatar acquisition request sent by the terminal or any one of the other terminals, the server may acquire the user relationship chain of the first user associated with the user identifier of the first user according to the avatar acquisition request carrying the user identifier of the first user.
506B, the server may obtain, from the user relationship chain of the first user, the second storage address of the target avatar picture corresponding to the user identifier of the second user, according to the avatar obtaining request carrying the user identifier of the second user.
The server may determine whether the second storage address of the target avatar picture of the second user stored in the user relationship chain of the first user is empty or not based on the user relationship chain of the first user and the user identifier of the second user. For example, the server may determine whether the second storage address of the target avatar picture of the second user stored in the user relationship chain of the first user is empty according to the determination field "use _ other bolt" in the user relationship chain of the first user.
And when the server judges that the second storage address of the target head portrait picture stored in the user relationship chain of the first user is empty, the server does not send the target head portrait picture to the terminal.
When the server determines that the second storage address of the target avatar picture stored in the user relationship chain of the first user is not empty, the server may obtain the second storage address of the target avatar picture, and based on the second storage address, the server may obtain the target avatar picture, and perform the following step 507.
In step 507, the server sends the target avatar picture to the terminal.
In step 508, after the terminal receives the target avatar picture sent by the server, the terminal displays the target avatar picture in the avatar display area of the second user.
In the embodiment of the present disclosure, the avatar display area of the second user may be located on a session interface between the first user and the second user on the terminal, or may be located on a personal display page of the second user, and the like.
When the terminal initially displays a session interface between the first user and the second user, the terminal can display the received target avatar picture in an avatar display area of the second user on the session interface; when the avatar acquisition request of the terminal is a personal display interface of a second user for the first time by the terminal, the terminal can display the received target avatar picture in an avatar display area of the second user on the personal display interface. The terminal may preset the shape of the avatar display area, for example, the shape of the avatar display area may be a circle or a square. Of course, the terminal may also provide a plurality of selectable personalized shapes of the avatar display area, and the first user may select a favorite shape from the plurality of personalized shapes through the terminal as the shape of the avatar display area of the second user, which is not limited herein.
The embodiment of the disclosure can acquire the avatar picture selected by the first user for the second user based on the avatar setting request of the first user, so that the target avatar picture is associated with the second user in the user relationship chain of the first user, and when the first user views any interface related to the second user on the terminal where the first user logs in, the second user can display the target avatar picture set by the first user for the second user, so that the avatar picture of the second user meets the requirement of the first user. Based on the user head portrait display method, the process of setting the target head portrait picture for the second user greatly enhances the flexibility of the head portrait display of the second user, and avoids the situation that the first user can only see the head portrait set for the second user when the first user views the interface related to the second user at the terminal where the first user logs in.
Fig. 6 is a block diagram illustrating a user avatar display apparatus according to an exemplary embodiment. Referring to fig. 6, the apparatus includes: a first acquisition unit 601, a second acquisition unit 602, an association unit 603, and a first display unit 604.
A first obtaining unit 601, configured to obtain an avatar setting request of a first user, where the avatar setting request is used to indicate that an avatar of a second user is set, and the first user and the second user are users associated in a social application;
a second obtaining unit 602 configured to obtain a target avatar picture;
an associating unit 603 configured to associate the target avatar image with the second user in the user relationship chain of the first user;
a first display unit 604 configured to display the target avatar picture in an avatar display area of the second user of the display interface of the first user.
In one possible design, the second obtaining unit 602 is configured to:
displaying at least one historical avatar picture associated with the second user;
and when a first selection instruction for any one of the at least one historical avatar picture is received, acquiring the historical avatar picture corresponding to the first selection instruction as the target avatar picture.
In one possible design, the apparatus further includes:
a third obtaining unit configured to obtain a preset number of historical target head portrait pictures associated with the second user based on the head portrait setting request;
the third obtaining unit is further configured to, when a selection instruction for any one of the preset number of historical avatar pictures is received, obtain a historical target avatar picture corresponding to the selection instruction as the target avatar picture;
and the second display unit is configured to display the target head portrait picture in the head portrait display area.
In one possible design, the second obtaining unit 602 is configured to:
displaying at least one picture stored on the terminal;
and when a second selection instruction for any one of the at least one picture is received, acquiring a picture corresponding to the second selection instruction as the target avatar picture.
In one possible design, the first display unit 604 is configured to:
when the display interface is a conversation interface of the first user and the second user or a personal display interface of the second user, displaying the target avatar picture in an avatar display area of the second user.
In one possible design, the associating unit 603 is configured to:
acquiring a first storage address of the target head portrait picture at the terminal;
and associating the first storage address with the second user in a user relationship chain of the first user stored by the terminal.
In one possible design, the associating unit 603 is configured to:
acquiring a correlation instruction between the target head portrait picture and the first user and the second user;
and sending the association instruction to a server.
In one possible design, the first obtaining unit 601 is configured to:
displaying a personal information setting page of the second user, wherein the personal information setting page is provided with a head portrait setting control;
and when the triggering operation of the first user on the avatar setting control is detected, triggering an avatar setting request of the first user.
The embodiment of the disclosure can acquire the avatar picture selected by the first user for the second user based on the avatar setting request of the first user, so that the target avatar picture is associated with the second user in the user relationship chain of the first user, and when the first user views any interface related to the second user on the terminal where the first user logs in, the second user can display the target avatar picture set by the first user for the second user, so that the avatar picture of the second user meets the requirement of the first user.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 7 is a block diagram illustrating a user avatar display apparatus according to an exemplary embodiment. Referring to fig. 7, the apparatus includes: a receiving unit 701, an acquiring unit 702, an associating unit 703, and a transmitting unit 704.
A receiving unit 701 configured to receive an association instruction, where the association instruction is used to direct a server to associate a target avatar picture with a second user in a user relationship chain of the first user;
an obtaining unit 702 configured to obtain the target avatar picture based on the association instruction;
an associating unit 703 configured to associate the target avatar image with the second user in the user relationship chain of the first user;
a sending unit 704 configured to send the target avatar picture to the terminal when receiving an avatar acquisition request of the first user, the avatar acquisition request being used for instructing to acquire the target avatar picture.
In one possible design, the obtaining unit 702 is configured to:
and extracting the target head portrait picture carried by the association instruction based on the association instruction.
In one possible design, the associating unit 703 is configured to:
acquiring a second storage address of the target head portrait picture in the server;
the second storage address is associated with the second user in a user relationship chain for the first user.
The embodiment of the disclosure can acquire the avatar picture selected by the first user for the second user based on the avatar setting request of the first user, so that the target avatar picture is associated with the second user in the user relationship chain of the first user, and when the first user views any interface related to the second user on the terminal where the first user logs in, the second user can display the target avatar picture set by the first user for the second user, so that the avatar picture of the second user meets the requirement of the first user.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 8 is a block diagram illustrating a structure of a terminal 800 for user avatar display according to an exemplary embodiment. The terminal 800 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 800 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, the terminal 800 includes: a processor 801 and a memory 802.
The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 801 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 801 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 802 may include one or more computer-readable storage media, which may be non-transitory. Memory 802 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 802 is used to store at least one instruction for execution by processor 801 to implement the user avatar display method provided by method embodiments of the present invention.
In some embodiments, the terminal 800 may further include: a peripheral interface 803 and at least one peripheral. The processor 801, memory 802 and peripheral interface 803 may be connected by bus or signal lines. Various peripheral devices may be connected to peripheral interface 803 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 804, a touch screen display 805, a camera 806, an audio circuit 807, a positioning component 808, and a power supply 809.
The peripheral interface 803 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, memory 802, and peripheral interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral interface 803 may be implemented on separate chips or circuit boards, which are not limited by this embodiment.
The Radio Frequency circuit 804 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 804 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 804 converts an electrical signal into an electromagnetic signal to be transmitted, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity unit card, and so forth. The radio frequency circuit 804 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 804 may further include NFC (Near Field Communication) related circuits, which are not limited in the present disclosure.
The display screen 805 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 805 is a touch display, the display 805 also has the ability to capture touch signals on or above the surface of the display 805. The touch signal may be input to the processor 801 as a control signal for processing. At this point, the display 805 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 805 may be one, providing the front panel of the terminal 800; in other embodiments, the display 805 may be at least two, respectively disposed on different surfaces of the terminal 800 or in a folded design; in still other embodiments, the display 805 may be a flexible display disposed on a curved surface or a folded surface of the terminal 800. Even further, the display 805 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 805 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 806 is used to capture images or video. Optionally, camera assembly 806 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 806 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 807 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 801 for processing or inputting the electric signals to the radio frequency circuit 804 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 800. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 807 may also include a headphone jack.
The positioning component 808 is used to locate the current geographic position of the terminal 800 for navigation or LBS (Location Based Service). The Positioning component 808 may be a Positioning component based on the GPS (Global Positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 809 is used to provide power to various components in terminal 800. The power supply 809 can be ac, dc, disposable or rechargeable. When the power source 809 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 800 also includes one or more sensors 810. The one or more sensors 810 include, but are not limited to: acceleration sensor 811, gyro sensor 812, pressure sensor 813, fingerprint sensor 814, optical sensor 815 and proximity sensor 816.
The acceleration sensor 811 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 800. For example, the acceleration sensor 811 may be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 801 may control the touch screen 805 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 811. The acceleration sensor 811 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 812 may detect a body direction and a rotation angle of the terminal 800, and the gyro sensor 812 may cooperate with the acceleration sensor 811 to acquire a 3D motion of the user with respect to the terminal 800. From the data collected by the gyro sensor 812, the processor 801 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 813 may be disposed on the side bezel of terminal 800 and/or underneath touch display 805. When the pressure sensor 813 is disposed on the side frame of the terminal 800, the holding signal of the user to the terminal 800 can be detected, and the processor 801 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 813. When the pressure sensor 813 is disposed at a lower layer of the touch display screen 805, the processor 801 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 805. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 814 is used for collecting a fingerprint of the user, and the processor 801 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 801 authorizes the user to perform relevant sensitive operations including unlocking a screen, viewing encrypted information, downloading software, paying for and changing settings, etc. Fingerprint sensor 814 may be disposed on the front, back, or side of terminal 800. When a physical button or a vendor Logo is provided on the terminal 800, the fingerprint sensor 814 may be integrated with the physical button or the vendor Logo.
The optical sensor 815 is used to collect the ambient light intensity. In one embodiment, the processor 801 may control the display brightness of the touch screen 805 based on the ambient light intensity collected by the optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 805 is increased; when the ambient light intensity is low, the display brightness of the touch display 805 is turned down. In another embodiment, the processor 801 may also dynamically adjust the shooting parameters of the camera assembly 806 based on the ambient light intensity collected by the optical sensor 815.
A proximity sensor 816, also known as a distance sensor, is typically provided on the front panel of the terminal 800. The proximity sensor 816 is used to collect the distance between the user and the front surface of the terminal 800. In one embodiment, when the proximity sensor 816 detects that the distance between the user and the front surface of the terminal 800 gradually decreases, the processor 801 controls the touch display 805 to switch from the bright screen state to the dark screen state; when the proximity sensor 816 detects that the distance between the user and the front surface of the terminal 800 becomes gradually larger, the processor 801 controls the touch display 805 to switch from the screen-on state to the screen-on state.
Those skilled in the art will appreciate that the configuration shown in fig. 8 is not intended to be limiting of terminal 800 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 9 is a block diagram illustrating a structure of a server 900 for user avatar display according to an example embodiment. The server 900 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 901 and one or more memories 902, where the memory 902 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 901 to implement the user avatar display method provided by the above-mentioned method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, there is also provided a computer readable storage medium, such as a memory, comprising instructions executable by a processor in a terminal to perform the user avatar display method in the above embodiments. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (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 (17)

1. A method for displaying a user head portrait, which is applied to a terminal, comprises the following steps:
when the terminal detects that a first user triggers an avatar setting control, acquiring an avatar setting request of the first user, and displaying a historical avatar page of a second user, wherein the avatar setting control is associated with the historical avatar page, the avatar setting request is used for indicating to set an avatar of the second user, and the first user and the second user are associated users in social application;
acquiring a user relation chain of the first user based on the avatar setting request, wherein the user relation chain is used for storing a plurality of first storage addresses, the user relation chain is updated by the terminal based on the acquired storage addresses, and the first storage addresses are storage addresses of avatar pictures associated with the second user; based on the user relationship chain, acquiring a preset number of first storage addresses associated with the second user according to the sequence of first timestamps from morning to evening corresponding to each first storage address stored in the user relationship chain, wherein the first timestamps are used for indicating the time point of updating the user relationship chain based on one first storage address; acquiring historical target head portrait pictures corresponding to each first storage address according to the preset number of first storage addresses, sequencing the acquired preset number of historical target head portrait pictures according to the sequence of the first time stamps corresponding to the acquired first storage addresses from morning to evening, and displaying the sequenced preset number of historical head portrait pictures on a historical head portrait page;
when a selected instruction for any one historical target head portrait picture in the preset number of historical head portrait pictures is received, acquiring the historical target head portrait picture corresponding to the selected instruction as a target head portrait picture;
displaying the target avatar picture in an avatar display area of the second user of the display interface of the first user, wherein the shape of the avatar display area is selected by the first user from a plurality of personalized shapes.
2. The method of claim 1, wherein the displaying the target avatar picture in the avatar display area of the second user of the first user's display interface comprises:
and when the display interface is a conversation interface of the first user and the second user or a personal display interface of the second user, displaying the target avatar picture in an avatar display area of the second user.
3. The method of claim 1, further comprising: associating the target avatar picture with the second user in the user relationship chain for the first user; the associating the target avatar picture with the second user in the user relationship chain of the first user comprises:
acquiring a correlation instruction, wherein the correlation instruction is used for instructing a server to correlate the target avatar picture with the second user in a user relation chain of the first user;
and sending the association instruction to a server.
4. The method of claim 1, wherein obtaining the avatar setting request of the first user comprises:
displaying a personal information setting page of the second user, wherein the personal information setting page is provided with a head portrait setting control;
and when the triggering operation of the first user on the avatar setting control is detected, acquiring an avatar setting request of the first user.
5. A method for displaying a user avatar is applied to a server, and comprises the following steps:
receiving an association instruction, wherein the association instruction is used for directing the server to associate the target head portrait picture with the second user in a user relationship chain of the first user;
acquiring the target head portrait picture based on the association instruction;
associating the target avatar picture with the second user in the user relationship chain for the first user;
when an avatar acquisition request of the first user is received, sending the target avatar picture to a terminal, wherein the avatar acquisition request is used for indicating acquisition of the target avatar picture, the terminal is used for displaying the target avatar picture in an avatar display area of the second user on a display interface of the first user, and the shape of the avatar display area is selected from a plurality of personalized shapes by the first user;
when the terminal detects the triggering operation of the first user on the avatar setting control, the terminal executes the following operations to acquire the target avatar picture: acquiring an avatar setting request of the first user, and displaying a historical avatar page of the second user, wherein the avatar setting control is associated with the historical avatar page, and the avatar setting request is used for indicating to set the avatar of the second user; based on the avatar setting request, acquiring a user relationship chain of the first user, wherein the user relationship chain is used for storing a plurality of second storage addresses, the user relationship chain is updated by the server based on the acquired storage addresses, and the second storage addresses are storage addresses of avatar pictures associated with the second user; based on the user relationship chain, acquiring a preset number of second storage addresses associated with the second user according to the sequence of second timestamps corresponding to each second storage address stored in the user relationship chain from morning to evening, wherein the second timestamps are used for indicating the time point of updating the user relationship chain based on one second storage address; acquiring historical target head portrait pictures corresponding to each second storage address according to the preset number of second storage addresses, sequencing the acquired preset number of historical target head portrait pictures according to the sequence of the acquired second time stamps corresponding to each second storage address from morning to evening, and displaying the sequenced preset number of historical head portrait pictures on the historical head portrait page; when a selected instruction for any one historical target avatar picture in the preset number of historical avatar pictures is received, acquiring the historical target avatar picture corresponding to the selected instruction as the target avatar picture.
6. The method of claim 5, wherein the obtaining the target avatar picture based on the association instruction comprises:
and extracting the target head portrait picture carried by the association instruction based on the association instruction.
7. The method of claim 5, wherein associating the target avatar picture with the second user in the user relationship chain for the first user comprises:
acquiring a second storage address of the target head portrait picture in the server;
associating the second storage address with the second user in the user relationship chain for the first user.
8. A user avatar display apparatus, comprising:
the terminal comprises a first obtaining unit, a second obtaining unit and a display unit, wherein the first obtaining unit is configured to obtain an avatar setting request of a first user and display a historical avatar page of a second user when the terminal detects a triggering operation of the avatar setting control by the first user, the avatar setting control is associated with the historical avatar page, the avatar setting request is used for indicating that an avatar of the second user is set, and the first user and the second user are users associated in social application;
a second obtaining unit configured to obtain, based on the avatar setting request, a user relationship chain of the first user, the user relationship chain being used to store a plurality of first storage addresses, the user relationship chain being updated by the terminal based on the obtained storage addresses, the first storage addresses being storage addresses of avatar pictures already associated with the second user; based on the user relationship chain, acquiring a preset number of first storage addresses associated with the second user according to the sequence of first timestamps from morning to evening corresponding to each first storage address stored in the user relationship chain, wherein the first timestamps are used for indicating the time point of updating the user relationship chain based on one first storage address; acquiring historical target head portrait pictures corresponding to each first storage address according to the preset number of first storage addresses, sequencing the acquired preset number of historical target head portrait pictures according to the sequence of the first time stamps corresponding to the acquired first storage addresses from morning to evening, and displaying the sequenced preset number of historical head portrait pictures on a historical head portrait page;
the second obtaining unit is further configured to, when a selection instruction for any one of the preset number of historical avatar pictures is received, obtain a historical target avatar picture corresponding to the selection instruction as the target avatar picture;
a first display unit configured to display the target avatar picture in an avatar display area of the second user of the display interface of the first user, a shape of the avatar display area being selected by the first user from a plurality of personalized shapes.
9. The apparatus of claim 8, wherein the first display unit is configured to:
and when the display interface is a conversation interface of the first user and the second user or a personal display interface of the second user, displaying the target avatar picture in an avatar display area of the second user.
10. The apparatus of claim 8, further comprising an association unit configured to:
acquiring a correlation instruction between the target head portrait picture and the first user and the second user;
and sending the association instruction to a server.
11. The apparatus of claim 8, wherein the first obtaining unit is configured to:
displaying a personal information setting page of the second user, wherein the personal information setting page is provided with a head portrait setting control;
and when the triggering operation of the first user on the avatar setting control is detected, triggering an avatar setting request of the first user.
12. A user avatar display apparatus, wherein the apparatus is applied to a server, comprising:
a receiving unit configured to receive a correlation instruction for directing a server to correlate a target avatar picture with a second user in a user relationship chain of the first user;
an acquisition unit configured to acquire the target avatar picture based on the association instruction;
an associating unit configured to associate the target avatar image with the second user in a user relationship chain of the first user;
a sending unit, configured to send the target avatar picture to a terminal when receiving an avatar acquisition request of a first user, where the avatar acquisition request is used to instruct acquisition of the target avatar picture, and the terminal is used to display the target avatar picture in an avatar display area of a second user on a display interface of the first user, and a shape of the avatar display area is selected by the first user from a plurality of personalized shapes;
when the terminal detects the triggering operation of the first user on the avatar setting control, the terminal executes the following operations to acquire the target avatar picture: acquiring an avatar setting request of the first user, and displaying a historical avatar page of the second user, wherein the avatar setting control is associated with the historical avatar page, and the avatar setting request is used for indicating to set the avatar of the second user; based on the avatar setting request, acquiring a user relationship chain of the first user, wherein the user relationship chain is used for storing a plurality of second storage addresses, the user relationship chain is updated by the server based on the acquired storage addresses, and the second storage addresses are storage addresses of avatar pictures associated with the second user; based on the user relationship chain, acquiring a preset number of second storage addresses associated with the second user according to the sequence of second timestamps corresponding to each second storage address stored in the user relationship chain from morning to evening, wherein the second timestamps are used for indicating the time point of updating the user relationship chain based on one second storage address; acquiring historical target head portrait pictures corresponding to each second storage address according to the preset number of second storage addresses, sequencing the acquired preset number of historical target head portrait pictures according to the sequence of the acquired second time stamps corresponding to each second storage address from morning to evening, and displaying the sequenced preset number of historical head portrait pictures on the historical head portrait page; when a selected instruction for any one historical target avatar picture in the preset number of historical avatar pictures is received, acquiring the historical target avatar picture corresponding to the selected instruction as the target avatar picture.
13. The apparatus of claim 12, wherein the obtaining unit is configured to:
and extracting the target head portrait picture carried by the association instruction based on the association instruction.
14. The apparatus of claim 12, wherein the associating unit is configured to:
acquiring a second storage address of the target head portrait picture in a server;
associating the second storage address with the second user in the user relationship chain for the first user.
15. A terminal, comprising:
one or more processors;
one or more memories for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to perform the method steps of the user avatar display method of any of claims 1-4.
16. A server, comprising:
one or more processors;
one or more memories for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to perform the method steps of the user avatar display method of any of claims 5-7.
17. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of a terminal, enable the terminal to perform the method steps of the user avatar display method of any of claims 1-4.
CN201811541567.4A 2018-12-17 2018-12-17 User head portrait display method, device, terminal, server and storage medium Active CN109618018B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811541567.4A CN109618018B (en) 2018-12-17 2018-12-17 User head portrait display method, device, terminal, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811541567.4A CN109618018B (en) 2018-12-17 2018-12-17 User head portrait display method, device, terminal, server and storage medium

Publications (2)

Publication Number Publication Date
CN109618018A CN109618018A (en) 2019-04-12
CN109618018B true CN109618018B (en) 2022-05-03

Family

ID=66009512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811541567.4A Active CN109618018B (en) 2018-12-17 2018-12-17 User head portrait display method, device, terminal, server and storage medium

Country Status (1)

Country Link
CN (1) CN109618018B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955787B (en) * 2019-11-12 2024-03-12 上海连尚网络科技有限公司 User head portrait setting method, computer equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424340A (en) * 2013-09-11 2015-03-18 腾讯科技(深圳)有限公司 Social network application information processing method, device and system
CN105681175A (en) * 2016-03-22 2016-06-15 浙江翼信科技有限公司 Method and device of modifying contact person head portrait in instant messaging application
CN106209584A (en) * 2016-07-01 2016-12-07 腾讯科技(深圳)有限公司 User profile processing method based on the Internet, client and server
CN106533906A (en) * 2016-11-15 2017-03-22 中国人民解放军理工大学 Method for setting plurality of user pictures specific to different contacts
CN108494938A (en) * 2018-03-08 2018-09-04 广东欧珀移动通信有限公司 Head image information processing method, device, server and computer-readable medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014176773A1 (en) * 2013-05-02 2014-11-06 东莞宇龙通信科技有限公司 Terminal and processing method for head portrait of contact person

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424340A (en) * 2013-09-11 2015-03-18 腾讯科技(深圳)有限公司 Social network application information processing method, device and system
CN105681175A (en) * 2016-03-22 2016-06-15 浙江翼信科技有限公司 Method and device of modifying contact person head portrait in instant messaging application
CN106209584A (en) * 2016-07-01 2016-12-07 腾讯科技(深圳)有限公司 User profile processing method based on the Internet, client and server
CN106533906A (en) * 2016-11-15 2017-03-22 中国人民解放军理工大学 Method for setting plurality of user pictures specific to different contacts
CN108494938A (en) * 2018-03-08 2018-09-04 广东欧珀移动通信有限公司 Head image information processing method, device, server and computer-readable medium

Also Published As

Publication number Publication date
CN109618018A (en) 2019-04-12

Similar Documents

Publication Publication Date Title
CN107885533B (en) Method and device for managing component codes
CN110674022B (en) Behavior data acquisition method and device and storage medium
CN110278464B (en) Method and device for displaying list
CN109327608B (en) Song sharing method, terminal, server and system
CN110932963B (en) Multimedia resource sharing method, system, device, terminal, server and medium
CN108959361B (en) Form management method and device
CN110740340B (en) Video live broadcast method and device and storage medium
CN110147503B (en) Information issuing method and device, computer equipment and storage medium
CN112751679A (en) Instant messaging message processing method, terminal and server
CN110750734A (en) Weather display method and device, computer equipment and computer-readable storage medium
CN111858382A (en) Application program testing method, device, server, system and storage medium
CN113051015B (en) Page rendering method and device, electronic equipment and storage medium
CN112770177B (en) Multimedia file generation method, multimedia file release method and device
CN111064657B (en) Method, device and system for grouping concerned accounts
CN111008083B (en) Page communication method and device, electronic equipment and storage medium
CN111881423A (en) Method, device and system for limiting function use authorization
CN108495183B (en) Method and device for displaying album information
CN110366044B (en) Method, device and system for acquiring target object
CN109618018B (en) User head portrait display method, device, terminal, server and storage medium
CN114143280B (en) Session display method and device, electronic equipment and storage medium
CN112597417B (en) Page updating method and device, electronic equipment and storage medium
CN111369434B (en) Method, device, equipment and storage medium for generating spliced video covers
CN111314205B (en) Instant messaging matching method, device, system, equipment and storage medium
CN113051494A (en) Information display method and device, electronic equipment and storage medium
CN113076452A (en) Application classification method, device, equipment and computer readable 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