CN111049735B - Group head portrait display method, device, equipment and storage medium - Google Patents

Group head portrait display method, device, equipment and storage medium Download PDF

Info

Publication number
CN111049735B
CN111049735B CN201911337986.0A CN201911337986A CN111049735B CN 111049735 B CN111049735 B CN 111049735B CN 201911337986 A CN201911337986 A CN 201911337986A CN 111049735 B CN111049735 B CN 111049735B
Authority
CN
China
Prior art keywords
group
dimensional array
attribute information
picture
information
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
CN201911337986.0A
Other languages
Chinese (zh)
Other versions
CN111049735A (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 CN201911337986.0A priority Critical patent/CN111049735B/en
Publication of CN111049735A publication Critical patent/CN111049735A/en
Application granted granted Critical
Publication of CN111049735B publication Critical patent/CN111049735B/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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a group head portrait display method, a device, equipment and a storage medium, wherein the method comprises the following steps: when a group session is acquired, acquiring attribute information of the group; the attribute information is used for uniquely identifying the group; generating a two-dimensional array according to the attribute information, and drawing a picture according to the two-dimensional array; and displaying the pictures as a group head portrait. The embodiment is not influenced by the network state, generates the unique picture by utilizing the attribute information with uniqueness, has higher identification degree, ensures that the user can search the group through the identification function of the head portrait of the group, and improves the searching efficiency of the user.

Description

Group head portrait display method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a group head portrait display method, apparatus, device, and storage medium.
Background
With the rapid development of the technology, the mobile terminal has become an indispensable communication tool in daily life, and users can install various application software in the mobile terminal to enjoy convenient services brought by various application software. The chat software is a type of application software which is commonly used by users, a plurality of users can form a group in the chat software, and each user in the group can input characters, pictures, voice or videos in a chat interface of the group for communication. Each user of the group has a respective user avatar, which identifies the user so that each user can quickly identify other users based on the avatar.
When a plurality of users form a group, a group avatar is often required to be generated for the group to identify the group, in the related art, the group avatar is usually drawn through the user avatars of the group members, but the user avatars of other members in the group are usually not available on the client of any one group member, and after the user avatar of the group member is required to be obtained from the server, the group avatar is drawn on the client.
In the related art, under the condition that the network state is not good, the default avatar is usually used as the group avatar to be displayed, such as a gray image, but there may be more than one group that the user joins, and if all the group avatars are displayed by using the default avatar, the user cannot search the group through the identification function of the group avatar, so that the search efficiency of the user is reduced, and the user experience is not good.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method, apparatus, device, and storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a group head portrait display method, including:
when a group session is acquired, acquiring attribute information of the group; the attribute information is used for uniquely identifying the group;
generating a two-dimensional array according to the attribute information, and drawing a picture according to the two-dimensional array;
and displaying the pictures as a group head portrait.
Optionally, the method further comprises:
before the group session is acquired, if a specified control is detected to be triggered, executing the step of acquiring the attribute information; the designated control is used for shielding the group avatar generated by the user avatar.
Optionally, the method further comprises:
if the specified control is not detected to be triggered, detecting the current network quality to obtain a detection result;
and if the detection result does not accord with the preset condition, executing the step of acquiring the attribute information.
Optionally, the method further comprises:
before the group session is obtained, detecting the current network quality to obtain a detection result;
and if the detection result does not accord with the preset condition, executing the step of acquiring the attribute information.
Optionally, the generating a two-dimensional array according to the attribute information includes:
performing hash operation based on the attribute information to obtain a hash value;
and generating a two-dimensional array according to the hash value.
Optionally, the generating a two-dimensional array according to the hash value includes:
converting the hash value into a binary string;
and converting the binary character string into a two-dimensional array based on the specified size information and the specified color matching information.
Optionally, the specified size information includes any one or more of: boundary width information, height information, and width information.
Optionally, the drawing a picture according to the two-dimensional array includes: and converting the value of the two-dimensional array as a color value into a picture.
Optionally, the attribute information includes a group ID.
According to a second aspect of the embodiments of the present disclosure, there is provided a group head portrait display apparatus, including:
the attribute information acquisition module is used for acquiring the attribute information of the group when acquiring the group session; the attribute information is used for uniquely identifying the group;
the picture drawing module is used for generating a two-dimensional array according to the attribute information and drawing a picture according to the two-dimensional array;
and the group head portrait display module is used for displaying the picture as a group head portrait.
Optionally, the attribute information acquiring module is further configured to acquire the attribute information of the group when acquiring the group session if it is detected that the designated control is triggered.
Optionally, the method further comprises:
the network quality detection module is used for detecting the current network quality and obtaining a detection result if the specified control is not detected to be triggered;
the attribute information acquisition module is further configured to acquire the attribute information of the group when the group session is acquired if the detection result does not meet the preset condition.
Optionally, the method further comprises:
the network quality detection module is used for detecting the current network quality before the group session is acquired, and acquiring a detection result;
the attribute information acquisition module is further configured to acquire the attribute information of the group when the group session is acquired if the detection result does not meet the preset condition.
Optionally, the picture drawing module includes:
a hash value acquisition unit, configured to perform a hash operation based on the attribute information to acquire a hash value;
the two-dimensional array generating unit is used for generating a two-dimensional array according to the hash value;
and the picture drawing unit is used for drawing pictures according to the two-dimensional array.
Optionally, the two-dimensional array generating unit includes:
the character string transformation unit is used for transforming the hash value into a binary character string;
and the two-dimensional array generating subunit is used for converting the binary character string into a two-dimensional array based on the specified size information and the specified color matching information.
Optionally, the specified size information includes any one or more of: boundary width information, height information, and width information.
Optionally, the picture drawing unit includes: and converting the value of the two-dimensional array as a color value into a picture.
Optionally, the attribute information includes a group ID.
According to a third aspect of an embodiment of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of any one of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of the first aspects
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising the computer program of any one of the methods of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the embodiment of the disclosure, when a group session is acquired, attribute information of the group is acquired, then the electronic device generates a two-dimensional array according to the attribute information, draws a picture according to the two-dimensional array, and displays the drawn picture as a group avatar, and because the attribute information of different groups has uniqueness, the generated picture has uniqueness, so that a higher identification degree is achieved, a user can search the group through the identification function of the group avatar, the search efficiency of the user is improved, and the group avatars generated by the groups are different, and the visual experience of the user on a displayed group session list including the group avatar is also improved; furthermore, the embodiment does not need a network, is not influenced by network quality, directly generates the pictures based on the attribute information, has high calculation speed and is convenient for quick display of the group images.
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 disclosure, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a group avatar display method according to an exemplary embodiment of the present disclosure.
FIG. 2A is a schematic diagram of a group avatar shown in accordance with an exemplary embodiment of the present disclosure.
FIG. 2B is a schematic diagram of another group avatar shown in the present disclosure according to an exemplary embodiment.
FIG. 3 is a flow chart illustrating another group avatar display method according to an exemplary embodiment of the present disclosure.
FIG. 4 is a hardware block diagram of an electronic device shown in accordance with an exemplary embodiment of the present disclosure.
Fig. 5 is a block diagram of a group head portrait display apparatus provided in accordance with an exemplary embodiment of the present disclosure.
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 disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Based on the problems in the related art, the embodiment of the disclosure provides a group avatar display method, when a group session is obtained, attribute information of the group is obtained, the attribute information is used for uniquely identifying the group, and a picture is generated based on the attribute information and is used as a group avatar.
Referring to fig. 1, a flowchart of a group avatar display method according to an exemplary embodiment of the present disclosure is shown, where the group avatar display method is applicable to an electronic device, and the electronic device may be a device with an instant messaging function, such as a mobile phone, a computer, a tablet, a Personal Digital Assistant (PDA), or an intelligent wearable device (e.g., a watch, a bracelet, etc.), and the method includes:
in step S101, when a group session is acquired, attribute information of the group is acquired; the attribute information is used to uniquely identify the group.
In step S102, a two-dimensional array is generated according to the attribute information, and the two-dimensional array is drawn into a picture.
In step S103, the picture is displayed as a group avatar.
In this embodiment, when a group session is obtained, the electronic device obtains attribute information of the group, where the attribute information is used to uniquely identify the group, and then the electronic device generates a two-dimensional array according to the attribute information, draws a picture according to the two-dimensional array, and displays the drawn picture as a group avatar, where the attribute information of each group is unique, so that the generated picture has uniqueness, and thus has higher identification, and thus a user can search the group through the identification of the group avatar, which improves the search efficiency of the user, and the group avatars generated by each group are different, and also improves the visual experience of the user on a displayed group session list including the group avatar; furthermore, the scheme does not need networking, is high in calculation speed, and is favorable for quickly displaying the generated group head portraits.
It can be understood that, in the embodiment of the present disclosure, the attribute information is not displayed at all, and may be specifically set according to an actual application scenario, in an example, the attribute information includes a group ID, the group ID is a code generated by a server and used for uniquely identifying the group, and an image is generated by using attribute information such as the group ID for uniquely identifying the group, so that the generated image also has uniqueness, thereby having a higher recognition degree; in another example, the attribute information may further include at least one of the following on the basis of including the group ID: the group name, the number of group members, the number of group messages, and the group creation time, etc., which are not limited in this disclosure.
In an embodiment, before obtaining the group session, the electronic device may detect the current network quality, obtain a detection result, the electronic device may send test data to the server and wait for a response, thereby testing a network quality index between the two, the network quality index includes but is not limited to time delay and network packet loss rate, when the detection result does not meet a predetermined condition, that is, when the network quality is not good, the electronic device obtains the group session, and obtains the attribute information together to perform a subsequent picture drawing step, thereby avoiding that the group avatar cannot be generated in time due to the poor network quality, generating the group avatar having unique identification based on the obtained attribute information, which is beneficial to improving the search efficiency of the user, and optimizing the user experience.
It can be understood that, in consideration of different network quality metrics under different scenarios, the embodiment of the present disclosure does not set any limitation to the preset condition, and may specifically set the preset condition according to an actual application scenario.
In another embodiment, in view of privacy issues, a user sometimes does not want to use a group avatar drawn based on a user avatar, and therefore, the electronic device may preset an appointed control, where the appointed control is used to shield the group avatar generated by the user avatar, and before acquiring a group session, if it is detected that the appointed control is triggered, the electronic device acquires the attribute information when acquiring the group session, so as to perform a subsequent picture drawing step, and displays a picture generated based on the attribute information and having unique identification as the group avatar, and does not acquire the group avatar drawn based on the user avatar any more, so that the user search efficiency is improved, the privacy of the user can be better protected, and the user experience is improved.
In other embodiments, if the specified control is not triggered, the electronic device may detect the current network quality, obtain a detection result, and further obtain the attribute information to perform a subsequent picture drawing step when the detection result does not meet the preset condition, that is, when the network quality is not good, the electronic device obtains the group session, so as to avoid that a group avatar cannot be generated in time due to poor network quality, and generate a group avatar having unique identification based on the obtained attribute information, which is beneficial to improving the search efficiency of a user and optimizing the user experience.
In some embodiments, if the detection result meets a preset condition, the user image may be obtained from the server, and the group image may be drawn.
It is understood that, in consideration of the variety of actual product designs, the present disclosure does not set any limitation on the specific setting positions of the trigger operation and the designated control, and the specific setting may be performed according to the actual application scenario, for example, the trigger operation includes but is not limited to clicking, sliding, long pressing, and the like, and the designated control includes but is not limited to: may be set on the set page of the group.
In an embodiment, the electronic device may generate a two-dimensional array based on: the electronic equipment can perform hash operation based on the attribute information, takes the attribute information as input, converts the attribute information into output with fixed length through a hash algorithm, acquires a hash value, and then generates a two-dimensional array according to the hash value; in this embodiment, the attribute information is converted into a hash value with a fixed length based on a hash algorithm, which is beneficial to accelerating the subsequent calculation process and increasing the calculation speed.
As one implementation manner, the electronic device may convert the hash value into a binary string, and then convert the binary string into a two-dimensional array according to designated size information and designated color matching information, the electronic device may determine the number of rows and the number of columns of the two-dimensional array based on the designated size information, then arrange the converted binary string according to the number of rows and the number of columns to obtain an initial two-dimensional array, and finally assign values in the initial two-dimensional array according to the designated color matching information to generate the two-dimensional array.
In an example, the binary string corresponding to the hash value may be determined based on an ASCII (American Standard Code for Information exchange) encoding method.
For example, the designated dimension information includes, but is not limited to, height information based on which the electronic device may determine the number of rows of the two-dimensional array and width information based on which the number of columns of the two-dimensional array may be determined.
Further, in order to improve the aesthetic property of the finally drawn picture, the specified size information may further include boundary width information, and the electronic device may determine the number of rows of the two-dimensional array based on the height information and the boundary width information, and determine the number of columns of the two-dimensional array based on the width information and the boundary width information, where the number of rows and the number of columns corresponding to the boundary width may be filled with the same numerical value, such as "0" or "1" in binary.
Illustratively, the specified color matching information includes a foreground color value and a background color value, the electronic device determines the number of rows and the number of columns of the two-dimensional array based on the specified size information, then arranges the converted binary character string according to the number of rows and the number of columns to obtain an initial two-dimensional array, the initial two-dimensional array includes a numerical value of "0" or "1", the electronic device may assign a position with a numerical value of "0" as the background color value and a position with a numerical value of "1" as the foreground color value, or assign a position with a numerical value of "0" as the foreground color value and a position with a numerical value of "1" as the background color value, which is not limited in any way by the embodiment of the present disclosure, so as to obtain the two-dimensional array.
It can be understood that, in consideration of differences in actual product design, the foreground color value and the background color value are not limited in any way in the embodiment of the present disclosure, and may be specifically set according to an actual application scenario; in one example, the foreground color value and the background color value may be represented by using an RGB color mode, or may be represented by using a CMYK color mode.
After the two-dimensional value is obtained, the electronic device may draw a picture according to the two-dimensional array, as one implementation manner, the electronic device may convert the value of the two-dimensional array as a color value into a picture, please refer to fig. 2A and fig. 2B, which are exemplary picture schematic diagrams obtained according to the method of this embodiment, and then the electronic device displays the picture as a group avatar, because different groups correspond to different attribute information, the generated picture has uniqueness and higher recognition, so that a user may search the group through an identification function of the group avatar, thereby improving search efficiency of the user and improving user experience.
Referring to fig. 3, which is a flowchart illustrating another group avatar display method according to an exemplary embodiment of the present disclosure, in the embodiment illustrated in fig. 3, the attribute information includes the group ID for exemplary description: the method comprises the following steps:
in step S201, when acquiring a group session, acquiring a group ID of the group; the group ID is used to uniquely identify the group.
In step S202, a two-dimensional array is generated according to the group ID, and a picture is drawn according to the two-dimensional array.
In step S203, the picture is displayed as a group avatar.
In this embodiment, when a user applies for creating a group, a server interface is called, and a group ID for identifying the group is generated by the server; when a group session is acquired, the electronic equipment acquires a group ID of the group, then generates a two-dimensional array according to the group ID, draws a picture according to the two-dimensional array, and displays the drawn picture as a group avatar, wherein the generated picture has uniqueness due to the uniqueness of the group ID, so that the generated picture has high identification degree, a user can search the group through the identification function of the group avatar, the searching efficiency of the user is improved, and the generated group avatars are different due to the different group IDs of the groups, and the visual experience of the user on a displayed group session list comprising the group avatar is also improved; furthermore, the scheme does not need networking, is high in calculation speed, and is favorable for quickly displaying the generated group head portraits.
In an embodiment, the electronic device detects the current network quality before acquiring the group session, and acquires the detection result, the electronic device may send test data to the server and wait for a response, so as to test the network quality index between the two, the network quality index includes but is not limited to time delay and network packet loss rate, and the like, when the detection result does not meet the preset condition, that is, the network quality is not good, the electronic device acquires the group session, and simultaneously acquires the group ID to perform subsequent picture drawing steps, thereby avoiding that the group avatar cannot be generated in time due to poor network quality, generating the group avatar with unique identification based on the acquired group ID, which is beneficial to improving the search efficiency of the user, and optimizing the user experience.
In another embodiment, in view of privacy issues, a user sometimes does not want to use a group avatar drawn based on a user avatar, so the electronic device may set in advance an appointed control, where the appointed control is used to shield the group avatar generated by the user avatar, and before acquiring a group session, if it is detected that the appointed control is triggered, the electronic device acquires the group ID when acquiring the group session, so as to perform a subsequent picture drawing step.
In other embodiments, if the specified control is not triggered, the electronic device may detect the current network quality, obtain a detection result, and further obtain the group ID for subsequent picture drawing when the detection result does not meet the preset condition, that is, when the network quality is not good, the electronic device obtains the group session, so as to avoid that the group avatar cannot be generated in time due to poor network quality, and generate the group avatar having unique identification based on the obtained group ID, which is beneficial to improving the search efficiency of the user and optimizing the user experience.
In some embodiments, if the detection result meets a preset condition, the user image may be obtained from the server, and the group image may be drawn.
In an embodiment, the electronic device may generate a two-dimensional array based on: the electronic equipment can perform hash operation based on the group ID, convert the group ID into output with fixed length through a hash algorithm by taking the group ID as input, acquire a hash value and generate a two-dimensional array according to the hash value; in this embodiment, the group ID is converted into a hash value with a fixed length based on a hash algorithm, which is beneficial to accelerating a subsequent calculation process and increasing a calculation speed.
As one implementation manner, the electronic device may convert the hash value into a binary string, and then convert the binary string into a two-dimensional array according to designated size information and designated color matching information, the electronic device may determine the number of rows and the number of columns of the two-dimensional array based on the designated size information, then arrange the converted binary string according to the number of rows and the number of columns to obtain an initial two-dimensional array, and finally assign a value in the initial two-dimensional array according to the designated color matching information to generate the two-dimensional array.
For example, the specified dimension information includes, but is not limited to, height information based on which the electronic device may determine the number of rows of the two-dimensional array and width information based on which the number of columns of the two-dimensional array may be determined.
Further, in order to improve the aesthetic property of the finally drawn picture, the specified size information may further include boundary width information, and the electronic device may determine the number of rows of the two-dimensional array based on the height information and the boundary width information, and determine the number of columns of the two-dimensional array based on the width information and the boundary width information, where, for the number of rows and columns corresponding to the boundary width, the rows and columns may be filled with the same number, such as binary "0" or "1".
Illustratively, the specified color matching information includes a foreground color value and a background color value, the electronic device determines the number of rows and the number of columns of the two-dimensional array based on the specified size information, then arranges the converted binary character string according to the number of rows and the number of columns to obtain an initial two-dimensional array, the initial two-dimensional array includes a numerical value of "0" or "1", the electronic device may assign a position with a numerical value of "0" as the background color value and a position with a numerical value of "1" as the foreground color value, or assign a position with a numerical value of "0" as the foreground color value and a position with a numerical value of "1" as the background color value, which is not limited in any way by the embodiment of the present disclosure, so as to obtain the two-dimensional array.
After the two-dimensional value is obtained, the electronic device can draw a picture according to the two-dimensional array, as one implementation mode, the electronic device can convert the value of the two-dimensional array as a color value into the picture, and then display the picture as a group avatar, and different groups correspond to different group IDs, so that the generated picture has uniqueness and higher identification degree, a user can search the group through the identification function of the group avatar, the searching efficiency of the user is improved, and the use experience of the user is improved.
Corresponding to the embodiment of the method, the disclosure also provides an embodiment of a group head portrait display device and equipment applied by the same.
The embodiment of the group avatar display apparatus in the present disclosure may be applied to a computer device, such as a server or a terminal device. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor in which the file processing is located. From a hardware aspect, as shown in fig. 4, which is a hardware structure diagram of an electronic device where a group avatar display apparatus is located according to an embodiment of the present disclosure, except for the processor 410, the memory 430, the network interface 420, and the nonvolatile memory 440 shown in fig. 4, a server or an electronic device where an apparatus 431 is located in an embodiment may also include other hardware according to an actual function of the computer device, which is not described again.
Accordingly, the embodiments of the present disclosure also provide a computer storage medium, in which a program is stored, and when the program is executed by a processor, the method in any of the above embodiments is implemented.
The present disclosure may take the form of a computer program product embodied on one or more storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of the storage medium of the computer include, but are not limited to: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by a computing device.
Referring to fig. 5, a block diagram of a group head portrait display apparatus according to an exemplary embodiment of the present disclosure is shown, the apparatus including:
an attribute information obtaining module 301, configured to obtain attribute information of the group when a group session is obtained; the attribute information is used to uniquely identify the group.
And the picture drawing module 302 is configured to generate a two-dimensional array according to the attribute information, and draw a picture according to the two-dimensional array.
A group avatar display module 303, configured to display the picture as a group avatar.
In an embodiment, the attribute information obtaining module 301 is further configured to, if it is detected that the designated control is triggered, obtain the attribute information of the group when a group session is obtained.
In one embodiment, the method further comprises:
the network quality detection module is used for detecting the current network quality and obtaining a detection result if the specified control is not detected to be triggered;
the attribute information obtaining module 301 is further configured to, if the detection result does not meet the preset condition, obtain the attribute information of the group when obtaining the group session.
In one embodiment, the method further comprises:
the network quality detection module is used for detecting the current network quality before the group session is acquired to acquire a detection result;
the attribute information obtaining module 301 is further configured to, if the detection result does not meet the preset condition, obtain the attribute information of the group when obtaining the group session.
In one embodiment, the picture drawing module comprises:
a hash value acquisition unit configured to perform a hash operation based on the attribute information to acquire a hash value;
the two-dimensional array generating unit is used for generating a two-dimensional array according to the hash value;
and the picture drawing unit is used for drawing pictures according to the two-dimensional array.
In one embodiment, the two-dimensional array generating unit includes:
a character string transformation unit used for transforming the hash value into a binary character string;
and the two-dimensional array generating subunit is used for converting the binary character string into a two-dimensional array based on the specified size information and the specified color matching information.
In one embodiment, the specified size information includes any one or more of: boundary width information, height information, and width information.
In an embodiment, the picture drawing unit includes: and converting the value of the two-dimensional array as a color value into a picture.
In an embodiment, the attribute information includes a group ID.
The implementation process of the functions and actions of each module in the above device is detailed in the implementation process of the corresponding steps in the above method, and is not described herein again.
For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
Correspondingly, the present disclosure also provides an electronic device, which includes a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: the instructions, when executed, perform the method of the method embodiments of any of the embodiments of the present disclosure.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. Also, the apparatus may cooperate with a network storage device that performs a storage function of the memory by being connected through a network. The storage may be an internal storage unit of the device, such as a hard disk or a memory of the device. The memory may also be an external storage device of the device, such as a plug-in hard disk provided on the device, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory may also include both internal storage units of the device and external storage devices. The memory is used for storing computer programs and other programs and data required by the device. The memory may also be used to temporarily store data that has been output or is to be output.
The various embodiments described herein may be implemented using a computer-readable medium such as computer software, hardware, or any combination thereof. For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to perform the functions described herein. For a software implementation, the implementation such as a process or a function may be implemented with a separate software module that allows performing at least one function or operation. The software code may be implemented by a software application (or program) written in any suitable programming language, which may be stored in memory and executed by the controller.
Electronic devices include, but are not limited to, the following forms of presence: (1) a mobile terminal: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice and data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, etc.; (2) ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has mobile internet access characteristics. Such terminals include: PDA, MID, and UMPC devices, etc., such as iPad; (3) other electronic devices with computing capabilities. The device may include, but is not limited to, a processor, a memory. Those skilled in the art will appreciate that more or fewer components than those shown may be included, or certain components may be combined, or different components, e.g., the device may also include input-output devices, network access devices, buses, camera devices, etc.
In an exemplary embodiment, a storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of an electronic device to perform the above method is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, having instructions therein, which when executed by a processor of a terminal, enable the terminal to perform the above method.
In an exemplary embodiment, a computer program product is also provided, comprising executable program code, wherein the program code, when executed by the above-mentioned apparatus, implements the method embodiments of any of the above.
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 disclosure 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 (16)

1. A method for displaying group head images, comprising:
acquiring attribute information of a group when a group session is acquired under the condition that a specified control is triggered or the detection result of the current network quality does not accord with a preset condition; the attribute information is used for uniquely identifying the group; the specified control is used for shielding the group head portrait generated by the head portrait of the user; the preset condition represents that the network quality is good;
generating a two-dimensional array according to the attribute information, and drawing a picture according to the two-dimensional array; the group is uniquely identified by the picture;
and displaying the pictures as a group head portrait.
2. The method of claim 1, wherein generating a two-dimensional array according to the attribute information comprises:
performing hash operation based on the attribute information to obtain a hash value;
and generating a two-dimensional array according to the hash value.
3. The method of claim 2, wherein generating the two-dimensional array from the hash value comprises:
converting the hash value into a binary string;
and converting the binary character string into a two-dimensional array based on the specified size information and the specified color matching information.
4. The method of claim 3, wherein said drawing a picture according to said two-dimensional array comprises: and converting the value of the two-dimensional array as a color value into a picture.
5. The method of claim 1, wherein the attribute information comprises a group ID.
6. The method of claim 1, further comprising:
if the specified control is not detected to be triggered, detecting the current network quality to obtain a detection result;
and if the detection result does not accord with the preset condition, executing the step of acquiring the attribute information.
7. The method of claim 3, wherein the specified size information comprises any one or more of: boundary width information, height information, and width information.
8. A group head portrait display apparatus, comprising:
the attribute information acquisition module is used for acquiring the attribute information of the group when the group session is acquired under the condition that the specified control is triggered or the detection result of the current network quality does not accord with the preset condition; the attribute information is used for uniquely identifying the group; the specified control is used for shielding the group head portrait generated by the head portrait of the user; the preset condition represents that the network quality is good;
the picture drawing module is used for generating a two-dimensional array according to the attribute information and drawing a picture according to the two-dimensional array; the group is uniquely identified by the picture;
and the group head portrait display module is used for displaying the pictures as the group head portrait.
9. The apparatus of claim 8, further comprising:
the network quality detection module is used for detecting the current network quality and obtaining a detection result if the specified control is not detected to be triggered;
the attribute information acquisition module is further configured to acquire the attribute information of the group when the group session is acquired if the detection result does not meet the preset condition.
10. The apparatus of claim 8, wherein the picture drawing module comprises:
a hash value acquisition unit, configured to perform a hash operation based on the attribute information to acquire a hash value;
the two-dimensional array generating unit is used for generating a two-dimensional array according to the hash value;
and the picture drawing unit is used for drawing pictures according to the two-dimensional array.
11. The apparatus of claim 10, wherein the two-dimensional array generation unit comprises:
the character string transformation unit is used for transforming the hash value into a binary character string;
and the two-dimensional array generating subunit is used for converting the binary character string into a two-dimensional array based on the specified size information and the specified color matching information.
12. The apparatus of claim 11, wherein the specified size information comprises any one or more of: boundary width information, height information, and width information.
13. The apparatus of claim 11, wherein the picture drawing unit comprises: and converting the value of the two-dimensional array as a color value into a picture.
14. The apparatus of claim 8, wherein the attribute information comprises a group ID.
15. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 7.
16. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1 to 7.
CN201911337986.0A 2019-12-23 2019-12-23 Group head portrait display method, device, equipment and storage medium Active CN111049735B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911337986.0A CN111049735B (en) 2019-12-23 2019-12-23 Group head portrait display method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911337986.0A CN111049735B (en) 2019-12-23 2019-12-23 Group head portrait display method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111049735A CN111049735A (en) 2020-04-21
CN111049735B true CN111049735B (en) 2022-07-22

Family

ID=70237418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911337986.0A Active CN111049735B (en) 2019-12-23 2019-12-23 Group head portrait display method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111049735B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111832269B (en) * 2020-09-21 2020-12-08 湖南惟楚有才教育科技有限公司 Self-adaptive user head portrait filling method and system
CN113064981A (en) * 2021-03-26 2021-07-02 北京达佳互联信息技术有限公司 Group head portrait generation method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051763A (en) * 2011-10-17 2013-04-17 联想(北京)有限公司 Contact photo identification generation method and electronic device
CN104158975A (en) * 2014-08-26 2014-11-19 惠州Tcl移动通信有限公司 A method for processing a contact avatar based on a mobile terminal and the mobile terminal
CN105681518A (en) * 2014-11-18 2016-06-15 乐视移动智能信息技术(北京)有限公司 Method and device for generating contact head portraits in contact list automatically
CN108173742A (en) * 2017-12-08 2018-06-15 腾讯科技(深圳)有限公司 A kind of image processing method, device
WO2020119540A1 (en) * 2018-12-10 2020-06-18 上海掌门科技有限公司 Group profile picture generation method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006053068A2 (en) * 2004-11-09 2006-05-18 Benjamin Rodefer Method and system of retrieving avatar data unique to a user
CN105959203B (en) * 2016-04-22 2019-09-20 北京小米移动软件有限公司 Head portrait setting method and device
US11789579B2 (en) * 2016-06-01 2023-10-17 Meta Platforms, Inc. Methods and systems for distinguishing messages in a group conversation
US10607386B2 (en) * 2016-06-12 2020-03-31 Apple Inc. Customized avatars and associated framework
US11595327B2 (en) * 2016-10-14 2023-02-28 Salesforce, Inc. Method, apparatus, and computer program product for associating an identifier with one or more message communications within a group-based communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051763A (en) * 2011-10-17 2013-04-17 联想(北京)有限公司 Contact photo identification generation method and electronic device
CN104158975A (en) * 2014-08-26 2014-11-19 惠州Tcl移动通信有限公司 A method for processing a contact avatar based on a mobile terminal and the mobile terminal
CN105681518A (en) * 2014-11-18 2016-06-15 乐视移动智能信息技术(北京)有限公司 Method and device for generating contact head portraits in contact list automatically
CN108173742A (en) * 2017-12-08 2018-06-15 腾讯科技(深圳)有限公司 A kind of image processing method, device
WO2020119540A1 (en) * 2018-12-10 2020-06-18 上海掌门科技有限公司 Group profile picture generation method and device

Also Published As

Publication number Publication date
CN111049735A (en) 2020-04-21

Similar Documents

Publication Publication Date Title
CN106021421B (en) method and device for accelerating webpage rendering
US20190164250A1 (en) Method and apparatus for adding digital watermark to video
US9952858B2 (en) Computer readable storage media and methods for invoking an action directly from a scanned code
CN111275784B (en) Method and device for generating image
JP6718978B2 (en) System language switching method and system language switching terminal device
CN111950056B (en) BIM display method and related equipment for building informatization model
CN114331820A (en) Image processing method, image processing device, electronic equipment and storage medium
US20230316529A1 (en) Image processing method and apparatus, device and storage medium
CN109862100B (en) Method and device for pushing information
CN108304562B (en) Question searching method and device and intelligent terminal
CN111049735B (en) Group head portrait display method, device, equipment and storage medium
US20200218772A1 (en) Method and apparatus for dynamically identifying a user of an account for posting images
CN111062426A (en) Method, device, electronic equipment and medium for establishing training set
CN111932438B (en) Image style migration method, device and storage device
CN110188782B (en) Image similarity determining method and device, electronic equipment and readable storage medium
US20240095886A1 (en) Image processing method, image generating method, apparatus, device, and medium
CN108921138B (en) Method and apparatus for generating information
US9396211B2 (en) Method and device for providing information using barcode
CN113516697A (en) Image registration method and device, electronic equipment and computer-readable storage medium
CN105022480A (en) Input method and terminal
CN112991148B (en) Style image generation method, model training method, device, equipment and medium
CN110661693A (en) Methods, computing device-readable storage media, and computing devices facilitating media-based content sharing performed in a computing device
CN110337074B (en) Interactive information transmission method, system and terminal equipment
CN109933969B (en) Verification code identification method and device, electronic equipment and readable storage medium
CN107203578B (en) Method and device for establishing association of user identifiers

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