CN111049735A - 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
CN111049735A
CN111049735A CN201911337986.0A CN201911337986A CN111049735A CN 111049735 A CN111049735 A CN 111049735A CN 201911337986 A CN201911337986 A CN 201911337986A CN 111049735 A CN111049735 A CN 111049735A
Authority
CN
China
Prior art keywords
group
attribute information
dimensional array
picture
avatar
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.)
Granted
Application number
CN201911337986.0A
Other languages
Chinese (zh)
Other versions
CN111049735B (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.)
Reach Best Technology Co Ltd
Original Assignee
Reach Best 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 Reach Best Technology Co Ltd filed Critical Reach Best 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

Abstract

The present disclosure provides a group head portrait display method, apparatus, device and storage medium, the method comprising: 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 unique attribute information, and has higher identification degree, so that the user can search the group through the identification function of the group avatar, and the searching efficiency of the user is improved.

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, an apparatus, a device, and a 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 acquired, detecting the current network quality to acquire 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 obtaining module is further configured to, if it is detected that the designated control is triggered, obtain the attribute information of the group when the group session is obtained.
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 acquiring the group session 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 acquiring the group session 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 the embodiments 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 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, because the attribute information of different groups has uniqueness, the generated picture has uniqueness, so that the group has higher identification degree, 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 avatar generated by each group is different, and the visual experience of the user on the 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 picture based on the attribute information, has high calculation speed and is convenient for quick display of the group image.
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 illustrated by the present disclosure in accordance with 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 present 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 embodiments of the present disclosure provide a group avatar display method, in which when a group session is obtained, attribute information of the group is obtained, where the attribute information is used to uniquely identify the group, and a picture is generated based on the attribute information, so as to serve 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 mobile phone, a computer, a tablet, a Personal Digital Assistant (PDA), or an intelligent wearable device (such as a watch, a bracelet, etc.) having an instant messaging function, 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, the group creation time, and the like, which are not limited in this disclosure.
In an embodiment, before acquiring a group session, the electronic device may detect current network quality and acquire a detection result, and the electronic device may send test data to the server and wait for a response, so as to test network quality indexes between the two, where the network quality indexes include but are not limited to time delay and network packet loss rate, and when the detection result does not meet a preset condition, that is, when the network quality is not good, the electronic device acquires the group session, and also acquires the attribute information to perform a subsequent picture drawing step, thereby avoiding that a group avatar cannot be generated in time due to poor network quality, and generating a group avatar having unique identification based on the acquired attribute information, which is beneficial to improving the search efficiency of a 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 it is not detected that the designated control is triggered, the electronic device may detect current network quality, obtain a detection result, and further obtain the attribute information to perform a subsequent picture drawing step when the detection result is not in accordance with a 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 a value in the initial two-dimensional array according to the designated color matching information to generate the two-dimensional array.
The specific conversion method of the binary string is not limited in any way, and may be specifically set according to an actual application scenario, and in an example, the binary string corresponding to the hash value may be determined based on an ASCII (American Standard code for Information Interchange) encoding method.
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, assign 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, assign 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, thereby obtaining 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 an RGB color mode, or may be represented by 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 the picture, please refer to fig. 2A and fig. 2B, which are exemplary picture schematics 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 use experience of the user.
Referring to fig. 3, a flowchart of another group avatar display method according to an exemplary embodiment of the present disclosure is shown, in the embodiment shown in fig. 3, the attribute information includes the group ID for exemplary illustration: 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 the server generates a group ID for identifying the group; 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, before acquiring a group session, the electronic device detects current network quality and acquires a detection result, the electronic device may send test data to the server and wait for a response, so as to test network quality indexes between the two, where the network quality indexes include but are not limited to time delay and network packet loss rate, and when the detection result does not meet a preset condition, that is, when the network quality is not good, the electronic device acquires the group session, and also acquires the group ID to perform a subsequent picture drawing step, thereby avoiding that a group avatar cannot be generated in time due to poor network quality, and generating the group avatar having unique identification based on the acquired group ID, which is beneficial to improving the search efficiency of a 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, and therefore, the electronic device may preset an appointed control, where the appointed control is used to mask 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, and displays a picture generated based on the group ID 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 it is not detected that the designated control is triggered, the electronic device may detect current network quality, obtain a detection result, and further obtain the group ID for subsequent picture drawing steps when the detection result is not in accordance with a 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 group ID, 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.
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, the group ID is used as input, the hash operation is converted into output with fixed length through a hash algorithm, a hash value is obtained, and then a two-dimensional array is generated 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 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 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, assign 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, assign 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, thereby obtaining 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 into the picture as a color value, and then display the picture as a group avatar.
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, and the like, having program code embodied therein. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage may be implemented 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 obtaining the group session.
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, and acquiring 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:
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.
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 specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts 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 any of the method 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 through a network connection. 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 Memory 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 codes may be implemented by software applications (or programs) 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, 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 the characteristic of mobile internet access. 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, instructions in the storage medium, when executed by a processor of a terminal, enable the terminal to perform the above-described 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-described apparatus, implements a method embodiment 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 (10)

1. A method for displaying group head images, comprising:
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.
2. The method of claim 1, further comprising:
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.
3. The method of claim 1, further comprising:
before the group session is acquired, detecting the current network quality to acquire a detection result;
and if the detection result does not accord with the preset condition, executing the step of acquiring the attribute information.
4. The method of claim 1, wherein the generating a two-dimensional array from 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.
5. The method of claim 4, wherein generating the two-dimensional array from the hash values 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.
6. The method of claim 5, 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.
7. The method of claim 1, wherein the attribute information comprises a group ID.
8. A group avatar display device, comprising:
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 picture drawing module, 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.
9. 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.
10. 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 of claims 1-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 true CN111049735A (en) 2020-04-21
CN111049735B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111832269A (en) * 2020-09-21 2020-10-27 湖南惟楚有才教育科技有限公司 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 (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080306951A1 (en) * 2004-11-09 2008-12-11 Benjamin Rodefer Method and System of Retrieving Avatar Data Unique to a User
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
CN105959203A (en) * 2016-04-22 2016-09-21 北京小米移动软件有限公司 Portrait-setting method and device
US20170351385A1 (en) * 2016-06-01 2017-12-07 Facebook, Inc. Methods and Systems for Distinguishing Messages in a Group Conversation
US20170358117A1 (en) * 2016-06-12 2017-12-14 Apple Inc. Customized Avatars and Associated Framework
CN108173742A (en) * 2017-12-08 2018-06-15 腾讯科技(深圳)有限公司 A kind of image processing method, device
US20180212903A1 (en) * 2016-10-14 2018-07-26 Slack Technologies, Inc. Method, apparatus, and computer program product for associating an identifier with one or more message communications within a group-based communication system
WO2020119540A1 (en) * 2018-12-10 2020-06-18 上海掌门科技有限公司 Group profile picture generation method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080306951A1 (en) * 2004-11-09 2008-12-11 Benjamin Rodefer Method and System of Retrieving Avatar Data Unique to a User
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
CN105959203A (en) * 2016-04-22 2016-09-21 北京小米移动软件有限公司 Portrait-setting method and device
US20170351385A1 (en) * 2016-06-01 2017-12-07 Facebook, Inc. Methods and Systems for Distinguishing Messages in a Group Conversation
US20170358117A1 (en) * 2016-06-12 2017-12-14 Apple Inc. Customized Avatars and Associated Framework
US20180212903A1 (en) * 2016-10-14 2018-07-26 Slack Technologies, Inc. Method, apparatus, and computer program product for associating an identifier with one or more message communications within a group-based communication system
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

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
(美国)内尔·黛尔,丹尼尔·T.乔伊斯,奇普·威姆斯: "《JAVA面向对象数据结构完全学习教程》", 31 October 2019, 中国青年出版社 *
一抹阳光: "随机字符串生成指定范围内的某个数值", 《HTTPS://WWW.CNBLOGS.COM/QTX-/P/11135506.HTML》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111832269A (en) * 2020-09-21 2020-10-27 湖南惟楚有才教育科技有限公司 Self-adaptive user head portrait filling method and system
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

Also Published As

Publication number Publication date
CN111049735B (en) 2022-07-22

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
JP6718978B2 (en) System language switching method and system language switching terminal device
CN111275784B (en) Method and device for generating image
JP5805918B1 (en) Information acquisition method and information acquisition apparatus
CN107368550B (en) Information acquisition method, device, medium, electronic device, server and system
CN109784304B (en) Method and apparatus for labeling dental images
US20190332804A1 (en) Method for information processing, device, server and storage medium
CN114331820A (en) Image processing method, image processing device, electronic equipment and storage medium
US20230316529A1 (en) Image processing method and apparatus, device and storage medium
CN111049735B (en) Group head portrait display method, device, equipment and storage medium
CN108304562B (en) Question searching method and device and intelligent terminal
US20240095886A1 (en) Image processing method, image generating method, apparatus, device, and medium
CN110188782B (en) Image similarity determining method and device, electronic equipment and readable storage medium
US9396211B2 (en) Method and device for providing information using barcode
CN105022480A (en) Input method and terminal
CN111383289A (en) Image processing method, image processing device, terminal equipment and computer readable storage medium
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
CN113010728A (en) Song recommendation method, system, intelligent device and storage medium
CN107833259B (en) Dynamic cartoon engine processing method and system based on intelligent terminal
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