WO2016078454A1 - Method and apparatus for realizing dynamic head portrait - Google Patents

Method and apparatus for realizing dynamic head portrait Download PDF

Info

Publication number
WO2016078454A1
WO2016078454A1 PCT/CN2015/087563 CN2015087563W WO2016078454A1 WO 2016078454 A1 WO2016078454 A1 WO 2016078454A1 CN 2015087563 W CN2015087563 W CN 2015087563W WO 2016078454 A1 WO2016078454 A1 WO 2016078454A1
Authority
WO
WIPO (PCT)
Prior art keywords
avatar
image sequence
directory name
static image
resource
Prior art date
Application number
PCT/CN2015/087563
Other languages
French (fr)
Chinese (zh)
Inventor
宋秀娟
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016078454A1 publication Critical patent/WO2016078454A1/en

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/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/10Multimedia information
    • 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/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services

Definitions

  • This paper relates to the technical field of dynamic avatar implementation, and in particular to a method and device for implementing dynamic avatar.
  • the shortcomings of this solution are: only applicable to the animated avatar of the account under the network structure of the client/server, unable to display the dynamic avatar of the local address book or the contact; when uploading the avatar from a client, to other customers
  • the moment of the avatar is called the avatar synchronization time, because the dynamic avatar is completely produced on the server side, and the concurrent client is used for a long time, which causes a heavy burden on the server, and the time for synchronizing the avatar information increases.
  • An object of the present invention is to provide a method and an apparatus for implementing a dynamic avatar, which solves the problem of causing a heavy burden on a server when there are many concurrent clients in the related art, and the method and the device also solve the problem only at the client end.
  • the network structure of the server can support the problem of dynamic avatars.
  • a method for implementing a dynamic avatar includes the following steps:
  • the still image sequence is displayed frame by frame.
  • the step of generating a static image sequence that changes with time according to the acquired avatar resource includes:
  • the step of binding the directory name of the static image sequence with the account information of an application that is required to dynamically display the avatar includes:
  • the directory name of the static image sequence is bound to the added avatar information, and the directory name of the static image sequence is saved in the avatar information.
  • the step of displaying the static image sequence frame by frame includes:
  • the obtained still image sequence in the static image sequence directory name is displayed frame by frame.
  • the step of acquiring an avatar resource includes:
  • the avatar resource is obtained from a sequence of still pictures.
  • a device for implementing a dynamic avatar includes: establishing a directory name module, a binding module, a display control module, and a display module, wherein:
  • the establishing a directory name module is configured to: obtain an avatar resource, generate a static image sequence that changes with time according to the acquired avatar resource, and establish a directory name of the static image sequence;
  • the binding module is configured to: bind a directory name of the static image sequence with account information of an application that is required to dynamically display an avatar;
  • the display control module is configured to: control display and disappearance time of an avatar of an account of the application, and determine whether the account information of the account and the directory name of the static avatar sequence are bound;
  • the display module is configured to display the static image sequence frame by frame when it is determined that the account information is bound to the directory name of the static image sequence.
  • the establishing a directory name module includes a generating unit and an acquiring unit, where:
  • the generating unit is configured to: generate a plurality of static images in a unified format by performing parsing processing on the acquired avatar resources;
  • the acquiring unit is configured to: sort the plurality of the static images in order of display time, and obtain a sequence of still images that change with time.
  • the binding module includes an adding unit and a saving unit, where:
  • the adding unit is configured to: add avatar information in a database of account information of an application for which dynamic display of the avatar is desired;
  • the saving unit is configured to: bind the directory name of the static image sequence to the added avatar information, and save the directory name of the static image sequence in the avatar information.
  • the display module includes a search unit, a directory name unit, and a display unit, where:
  • the searching unit is configured to: search for avatar information in the account information according to the account information;
  • the obtaining directory name unit is configured to: obtain the static according to the found avatar information The directory name of the image sequence;
  • the display unit is configured to display the sequence of still images in the acquired still image sequence directory name frame by frame.
  • the establishing directory name module is configured to obtain the avatar resource according to any one of the following manners:
  • the avatar resource is obtained from a sequence of still pictures.
  • a computer program comprising program instructions that, when executed by a computer, cause the computer to perform any of the above-described methods of implementing dynamic avatars.
  • the technical solution of the present invention can present an avatar in an animated form, and is flexible to deploy, and is applicable to both the network account and the avatar information of the local account, thereby improving the user experience.
  • FIG. 1 is a flowchart of a method for implementing a dynamic avatar according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an apparatus for implementing a dynamic avatar according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of an application example of an apparatus for implementing a dynamic avatar according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a method for implementing a dynamic avatar according to an embodiment of the present invention
  • FIG. 5 is a first schematic diagram of implementing a dynamic avatar of a local address book according to an embodiment of the present invention
  • FIG. 6 is a second schematic diagram of a dynamic avatar implementation of a local address book according to an embodiment of the present invention.
  • FIG. 7 is a first schematic diagram of implementing a dynamic avatar of a web forum client according to an embodiment of the present invention.
  • FIG. 8 is a second schematic diagram of implementing a dynamic avatar of a web forum client according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for implementing a dynamic avatar according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
  • Step S101 Acquire an avatar resource, obtain a static image sequence that changes with time according to the acquired avatar resource, and establish a directory name of the static image sequence;
  • Step S102 Binding a directory name of the static image sequence with account information of an application that is required to dynamically display an avatar;
  • Step S103 When it is required to display an avatar of an account, determine whether the account information and the directory name of the static image sequence are bound;
  • Step S104 If it is determined that the account information is bound to the directory name of the static image sequence, the static image sequence is displayed frame by frame.
  • the sequence of the static image whose content changes with time according to the obtained avatar resource includes: parsing the acquired avatar resource to generate multiple static images in a unified format; The plurality of still images are sorted in order of display time, and a sequence of still images whose contents change with time is obtained.
  • the binding the directory name of the static image sequence to the account information that is required to dynamically display the avatar includes: adding avatar information in a database of account information that is desired to dynamically display the avatar; and the static image The directory name of the sequence is bound to the added avatar information, so that the directory name of the static image sequence is saved in the avatar information.
  • displaying the static image sequence frame by frame includes: searching for the account information according to the account information.
  • the avatar information is obtained, and the directory name of the static image sequence is obtained according to the avatar information found; and the static image sequence in the obtained static image sequence directory name is displayed frame by frame.
  • the acquiring the avatar resource includes: obtaining the avatar resource from the video file; acquiring the avatar resource from the animation file; and acquiring the avatar resource from the static image sequence.
  • FIG. 2 is a schematic diagram of an apparatus for implementing a dynamic avatar according to an embodiment of the present invention. As shown in FIG. 2, the method includes: creating a directory name module 201, a binding module 202, a display control module 203, and a display module 204.
  • the establishing directory name module 201 is configured to: obtain an avatar resource, obtain a static image sequence whose content changes with time according to the acquired avatar resource, and establish a directory name of the static image sequence;
  • the binding module 202 is configured to: bind the directory name of the static image sequence to the account information of the application that is required to dynamically display the avatar;
  • the display control module 203 is configured to: control the display and disappearance time of an account avatar, and determine whether the directory name of the account and the static avatar sequence is bound;
  • the display module 204 is configured to: when it is determined that the account information of the enabled corresponding application is bound to the directory name of the static image sequence, the static image sequence is displayed frame by frame.
  • the establishing the directory name module 201 includes: a generating unit, configured to: generate a plurality of static images in a unified format by parsing the acquired avatar resources; and acquire a unit, the English pairs the plurality of still images Sorting in order of display time results in a sequence of still images whose contents change over time.
  • a generating unit configured to: generate a plurality of static images in a unified format by parsing the acquired avatar resources; and acquire a unit, the English pairs the plurality of still images Sorting in order of display time results in a sequence of still images whose contents change over time.
  • the binding module 202 includes: an adding unit, configured to: add avatar information in a database of account information that is desired to dynamically display the avatar; and the saving unit is configured to: associate the directory name of the static image sequence with The added avatar information is bound, so that the directory name of the static image sequence is saved in the avatar information.
  • the display module 204 includes: a searching unit, configured to: according to the account information, look up the avatar information in the account information to obtain a directory name unit, and set the method to: obtain the static according to the found avatar information.
  • the directory name of the image sequence; the display unit, set to: will be obtained
  • the sequence of still images in the static image sequence directory name is displayed frame by frame.
  • the acquiring the avatar resource includes: obtaining the avatar resource from the video file; acquiring the avatar resource from the animation file; and acquiring the avatar resource from the static image sequence.
  • FIG. 3 is a schematic diagram of an application example of a device for implementing a dynamic avatar according to an embodiment of the present invention. As shown in FIG. 3, the method includes: an avatar resource receiving module 301, an avatar resource processing module 302, a dynamic avatar storage module 303, and an avatar display control. Module 304 and dynamic avatar display module 305.
  • the avatar resource receiving module 301 is configured to: obtain avatar resources in various formats, and then send the avatar resources to the avatar resource processing module 302.
  • the avatar resource processing module 302 parses different avatar resources to generate a avatar resource in a unified format.
  • the dynamic avatar storage module 303 is configured to: store the received avatar resource to the destination location corresponding to the account, and the avatar display control module 304 is configured to: when it is determined that an animated image of an account is required to be displayed
  • the dynamic avatar display module 305 is configured to: after receiving the display notification sent by the avatar display control module 304, obtain the avatar resource parsing of the account from the dynamic avatar storage module 303 and display the avatar resource.
  • FIG. 4 is a flowchart of a method for implementing a dynamic avatar according to an embodiment of the present invention. As shown in FIG. 4, the method includes the following steps:
  • the process proceeds to step S401 to step S403.
  • Step S401 The avatar resource receiving module 301 obtains avatar resources in various formats, and then pushes it to the avatar resource processing module 302;
  • the avatar resource receiving module 301 may take the initiative to request the avatar resource providing module X to obtain the avatar resource, or the avatar resource providing module X may push the avatar resource to the avatar resource receiving module 301.
  • the avatar resource providing module X and the avatar resource receiving module 301 can be deployed on both ends of the network, such as the network forum and the network address book, and the avatar resource is transmitted through the network; the avatar resource providing module X and the avatar resource receiving module 301 can also be deployed on the avatar resource providing module X and the avatar resource receiving module 301.
  • Different applications of the same device such as the avatar update of the local address book.
  • Step S402 Parsing different avatar resources, generating a unified format avatar resource and pushing Send to the dynamic avatar storage module 303;
  • the avatar resource before processing allows for a variety of formats, such as a video file, an animation file, or a sequence of pictures.
  • a unified format after parsing different avatar resources may optimize image sequences, for example, N static image files, and files are named with increasing counts.
  • N static image files for example, N static image files, and files are named with increasing counts.
  • the avatar resource as a video file as an example: first parsing the video file to obtain a video stream and a voice stream, and decoding the video stream according to the information carried by the file container, obtaining a frame image file, and taking out all or part according to the video length. Key frames (such as a long video, the number of key frames is greater than N, you need to extract N).
  • Step S403 Store the received avatar resource to the destination location corresponding to the account.
  • the preferred embodiment is: adding a column of "avatar location" to the database storing the account information, the column storage content being the directory name of the avatar sequence of each account. If an account information is empty in the column, the animation avatar is not displayed, or the original static avatar is displayed. When an account information is stored in the column, the animation avatar is displayed first.
  • the display of the animated avatar involves steps S404 through S405.
  • Step S404 determining that an animation image of an account needs to be displayed, and notifying the dynamic avatar display module 305;
  • the avatar display control module 304 when the forum view or the address book list view is scrolled to somewhere, and the corresponding account information and avatar need to be displayed, the avatar display control module 304 will get a system notification, and then the avatar display control module 304 notifies the dynamic avatar display module 305 to display the avatar. At the same time, the avatar display control module 304 obtains the animated avatar directory name or the still image data from S03 according to the animation avatar priority principle, and sends the information and the time parameter customized by the avatar display control module 304 to step S405.
  • Step S405 The avatar resource of the account is obtained from the dynamic avatar storage module 303 and parsed and displayed.
  • the obtained time parameter is used as an interval to display the picture in the animated avatar directory frame by frame. If the directory name is empty, the static avatar picture is still displayed by related technology.
  • FIG. 5 and FIG. 6 respectively show first and second schematic diagrams of implementing a dynamic address avatar of a local address book according to an embodiment of the present invention.
  • This embodiment describes an application of the present invention in a local address book to implement the present invention.
  • the local address book presents the effect of an animated avatar.
  • the avatar resource processing module 302 of the embodiment of the present invention may be placed in a separate plug-in/device as shown in FIG. 5, or may be added to the local address book application as shown in FIG. 6.
  • the embodiment includes an avatar resource receiving module 301, an avatar resource processing module 302, a dynamic avatar storage module 303, an avatar display control module 304, and a dynamic avatar display module 305.
  • the local address book requests an animated avatar from the camera application through the avatar resource receiving module 301.
  • the original static avatar scheme only specifies the image format, and the format specified by the request is a compatible video file (eg, .3gp/.mp4), animation. File (.gif) and image sequence.
  • the request also contains the path Dir where the resource should be stored.
  • the camera obtains the video file by recording, and can also obtain the animation file or the image sequence by continuously taking photos, store it in the Dir path, and feed back the operation end message to the avatar resource receiving module 301.
  • the avatar resource receiving module 301 After receiving the feedback, the avatar resource receiving module 301 notifies the avatar resource processing module 302 that the information carried by the notification is the avatar resource path Dir and the processed resource (image sequence) storage path Dir1 of the unified format is completed by the avatar resource processing module 302.
  • the avatar resource processing module 302 stores the processed avatar resource to Dir1.
  • the avatar resource processing module 302 then notifies the dynamic avatar storage module 303 that the message carries Dir1.
  • the dynamic avatar storage module 303 adds a column of "avatar location" to the database for storing account information, and the dynamic avatar storage module 303 stores Dir1 to the location corresponding to the account of the column.
  • the avatar display control module 304 After the avatar resource storage module 303 completes the above processing, the avatar display control module 304 performs the avatar update, and the avatar display control module 304 completes the process of step S404: the avatar display control module 304 obtains the animation from the dynamic avatar storage module 303 according to the animation avatar priority principle.
  • the avatar directory name or the static image data is sent to the dynamic avatar display module 305 by the information and the time parameter T customized by the avatar display control module 304.
  • the dynamic image display module 305 displays each picture under the received directory name on a frame-by-frame basis at a time interval T.
  • the avatar display control module 304 obtains the static image data from the dynamic avatar storage module 303 and sends the static image data to the dynamic avatar display module 305.
  • the dynamic avatar display module 305 directly displays the image.
  • FIG. 7 and FIG. 8 respectively show first and second schematic diagrams of the implementation of the dynamic forum avatar of the web forum client according to the embodiment of the present invention.
  • This embodiment describes the present invention on the client side of the web forum (browser or The application in the forum client) to achieve the effect of presenting the animated avatar on the client side of the web forum.
  • the avatar resource processing module 302 of the embodiment of the present invention may be placed in a separate plug-in/device as shown in FIG. 7, or may be added to the network forum client-side application as shown in FIG. 8.
  • This solution will be implemented on the client side of the forum, reducing the burden on the server when multiple users.
  • the embodiment includes an avatar resource receiving module 301, an avatar resource processing module 302, a dynamic avatar storage module 303, an avatar display control module 304, and a dynamic avatar display module 305.
  • the account ACC1 updates its avatar, that is, pushes a gif file to the account storage unit of the server.
  • the step S401 is received by the server and the step S402 is processed.
  • the server performs only receiving and simple storage, and the processes of step S401 and step S402 are not performed.
  • the server sends the required content to the client-side avatar resource receiving module 301.
  • the client side processes each avatar information as follows:
  • the avatar resource processing module 302 processes the avatar information according to step S402.
  • the processing is completely the same as the description of step S402.
  • the animation file such as gif
  • the file is parsed to obtain the image sequence; the image sequence does not need to be additionally processed. .
  • the resulting sequence of images is then stored in a temporary directory, and the dynamic avatar storage module 303 stores the directory name in a list retrieved by account, or in a temporary database.
  • the avatar display control module 304 retrieves the directory name from the dynamic avatar storage module 303 by using the account, extracts the sequence of the image, and notifies the dynamic avatar of the time sequence T customized by the image sequence path and the avatar display control module 304.
  • the display module 305 performs display.
  • the related art processes the avatar resources into an animation file (such as a gif file).
  • the embodiment of the present invention processes the image sequence, and the avatar display control module 304 customizes the time interval T according to the client capability, thereby improving compatibility with the client side.
  • the embodiment of the present invention obtains an avatar resource that is not limited in format, parses the resource, and regenerates a avatar resource such as an image sequence suitable for the display module, and finally displays the resource in a unified format by the display module.
  • the embodiment of the invention can display an avatar in an animated form, and is flexible to deploy, and is applicable to both the network account and the avatar information of the local account, thereby improving the user experience.
  • the embodiment of the invention also discloses a computer program, comprising program instructions, when the program instruction is executed by a computer, so that the computer can execute the implementation method of any dynamic avatar described above.
  • the embodiment of the invention also discloses a carrier carrying the computer program.
  • the technical solution of the present invention can present an avatar in an animated form, and is flexible to deploy, and is applicable to both the network account and the avatar information of the local account, thereby improving the user experience, and therefore the invention has strong industrial applicability.

Abstract

A method and apparatus for realizing a dynamic head portrait. The method comprises the following steps: acquiring a head portrait resource, obtaining a time-varying static image sequence of a head portrait content according to the acquired head portrait resource, and establishing a directory name of the static image sequence; binding the directory name of the static image sequence with account number information about an application expecting to dynamically display a head portrait; when the head portrait of a certain account number needs to be displayed, judging whether the account number information has been bound with the directory name of the static image sequence; and if it is judged that the account number information has been bound with the directory name of the static image sequence, displaying the static image sequence frame by frame. The technical solution can present a head portrait in an animation form, is flexible in deployment, and is applicable to head portrait information about a network account number and a local account number, thereby improving user experience.

Description

一种动态头像的实现方法及装置Method and device for realizing dynamic avatar 技术领域Technical field
本文涉及动态头像的实现技术领域,特别涉及一种动态头像的实现方法及装置。This paper relates to the technical field of dynamic avatar implementation, and in particular to a method and device for implementing dynamic avatar.
背景技术Background technique
网络论坛、网络通讯录、本地通讯录(联系人)等软件产品都涉及到账号信息,目前账号信息中的头像都是静态图片呈现。如果能以动态图像或动画的形式呈现头像,这种趣味性会极大提升用户体验,提升这些产品的竞争力。动画形式呈现头像,目前仅有的一个专利技术方案(公开号303N101599017)如下:【1】通信用户终端将视频文件或图像序列以及对应的处理参数发送到特定服务器,【2】由该服务器对接收到的视频文件或图像序列,并按照所接收的处理参数,对所接收的视频文件或图像序列进行处理,以生成动态头像。该方案存在的缺陷是:仅适用于客户端/服务器这种网络架构下账号的动画头像呈现,无法实现本地通讯录或联系人的动态头像显示;从某客户端上传头像的时刻,到其他客户端呈现出该头像时刻,称为头像同步时间,因为动态头像的制作完全在服务器侧,并发客户端多时,给服务器造成沉重负担,造成同步头像信息的时间增加。Software products such as web forums, network address books, and local address books (contacts) all involve account information. Currently, the avatars in the account information are static images. If you can present your avatar in the form of a moving image or animation, this fun will greatly enhance the user experience and enhance the competitiveness of these products. The avatar is presented in an animated form. Currently, only one patented technical solution (publication number 303N101599017) is as follows: [1] The communication user terminal transmits the video file or image sequence and corresponding processing parameters to a specific server, [2] receiving by the server pair The resulting video file or sequence of images and processing the received video file or sequence of images in accordance with the received processing parameters to generate a dynamic avatar. The shortcomings of this solution are: only applicable to the animated avatar of the account under the network structure of the client/server, unable to display the dynamic avatar of the local address book or the contact; when uploading the avatar from a client, to other customers The moment of the avatar is called the avatar synchronization time, because the dynamic avatar is completely produced on the server side, and the concurrent client is used for a long time, which causes a heavy burden on the server, and the time for synchronizing the avatar information increases.
发明内容Summary of the invention
本发明的目的在于提供一种动态头像的实现方法及装置,以解决相关技术中在并发客户端多的时候,给服务器造成沉重负担的问题,该方法和装置同时也解决了仅能在客户端/服务器这种网络结构下才能支持动态头像的问题。An object of the present invention is to provide a method and an apparatus for implementing a dynamic avatar, which solves the problem of causing a heavy burden on a server when there are many concurrent clients in the related art, and the method and the device also solve the problem only at the client end. The network structure of the server can support the problem of dynamic avatars.
为了解决上述技术问题,采用如下技术方案:In order to solve the above technical problems, the following technical solutions are adopted:
一种动态头像的实现方法,包括以下步骤:A method for implementing a dynamic avatar includes the following steps:
获取头像资源,根据所获取的头像资源,生成随时间变化的静态图像序 列,并建立所述静态图像序列的目录名;Obtain an avatar resource, and generate a static image sequence that changes with time according to the acquired avatar resource Columns, and create a directory name for the sequence of still images;
将所述静态图像序列的目录名与期望进行头像动态显示的应用的账号信息进行绑定;Binding the directory name of the static image sequence to the account information of the application for which the avatar is dynamically displayed;
在需要显示一应用的账号的头像时,判断该账号的账号信息与所述静态图像序列的目录名是否已绑定;When it is required to display an avatar of an application account, determine whether the account information of the account and the directory name of the static image sequence are bound;
若判断该账号信息与所述静态图像序列的目录名已经绑定,则逐帧显示所述静态图像序列。If it is determined that the account information is already bound to the directory name of the still image sequence, the still image sequence is displayed frame by frame.
可选地,所述根据所获取的头像资源,生成随时间变化的静态图像序列的步骤包括:Optionally, the step of generating a static image sequence that changes with time according to the acquired avatar resource includes:
通过对所获取的头像资源进行解析处理,生成统一格式的多张静态图像;Generating a plurality of still images in a unified format by parsing the acquired avatar resources;
对所述多张所述静态图像按照显示时间顺序进行排序,得到随时间变化的静态图像序列。Sorting the plurality of the still images in order of display time, and obtaining a sequence of still images that change with time.
可选地,所述将所述静态图像序列的目录名与期望进行头像动态显示的应用的账号信息进行绑定的步骤包括:Optionally, the step of binding the directory name of the static image sequence with the account information of an application that is required to dynamically display the avatar includes:
在期望进行头像动态显示的应用的账号信息的数据库中添加头像信息;Adding avatar information in a database of account information of an application for which avatar dynamic display is desired;
将所述静态图像序列的目录名与所添加的头像信息进行绑定,将所述静态图像序列的目录名保存在所述头像信息中。The directory name of the static image sequence is bound to the added avatar information, and the directory name of the static image sequence is saved in the avatar information.
可选地,所述若判断该账号信息与所述静态图像序列的目录名已经绑定,则逐帧显示所述的静态图像序列的步骤包括:Optionally, if the account information is determined to be bound to the directory name of the static image sequence, the step of displaying the static image sequence frame by frame includes:
根据所述账号信息,查找所述账号信息中的头像信息;Searching for avatar information in the account information according to the account information;
根据所查找到的头像信息,获取所述静态图像序列的目录名;Obtaining a directory name of the static image sequence according to the avatar information found;
将所获取的静态图像序列目录名中的静态图像序列进行逐帧显示。The obtained still image sequence in the static image sequence directory name is displayed frame by frame.
可选地,所述获取头像资源的步骤包括:Optionally, the step of acquiring an avatar resource includes:
通过以下任一方式获取所述头像资源:Obtain the avatar resource in any of the following ways:
从视频文件中获取所述头像资源;Obtaining the avatar resource from a video file;
从动画文件中获取所述头像资源; Obtaining the avatar resource from the animation file;
从静态图片序列中获取所述头像资源。The avatar resource is obtained from a sequence of still pictures.
一种动态头像的实现装置,包括建立目录名模块、绑定模块、显示控制模块和显示模块,其中:A device for implementing a dynamic avatar includes: establishing a directory name module, a binding module, a display control module, and a display module, wherein:
所述建立目录名模块设置成:获取头像资源,根据所获取的头像资源生成随时间变化的静态图像序列,并建立所述静态图像序列的目录名;The establishing a directory name module is configured to: obtain an avatar resource, generate a static image sequence that changes with time according to the acquired avatar resource, and establish a directory name of the static image sequence;
所述绑定模块设置成:将所述静态图像序列的目录名与期望进行头像动态显示的应用的账号信息进行绑定;The binding module is configured to: bind a directory name of the static image sequence with account information of an application that is required to dynamically display an avatar;
所述显示控制模块设置成:控制一应用的账号的头像的显示及消失时刻,并判断该账号的账号信息与所述静态头像序列的目录名是否已绑定;The display control module is configured to: control display and disappearance time of an avatar of an account of the application, and determine whether the account information of the account and the directory name of the static avatar sequence are bound;
所述显示模块设置成:当判断该账号信息与所述静态图像序列的目录名已经绑定,则逐帧显示所述静态图像序列。The display module is configured to display the static image sequence frame by frame when it is determined that the account information is bound to the directory name of the static image sequence.
可选地,所述建立目录名模块包括生成单元和获取单元,其中:Optionally, the establishing a directory name module includes a generating unit and an acquiring unit, where:
所述生成单元设置成:通过对所获取的头像资源进行解析处理,生成统一格式的多张静态图像;The generating unit is configured to: generate a plurality of static images in a unified format by performing parsing processing on the acquired avatar resources;
所述获取单元设置成:对多张所述静态图像按照显示时间顺序进行排序,得到随时间变化的静态图像序列。The acquiring unit is configured to: sort the plurality of the static images in order of display time, and obtain a sequence of still images that change with time.
可选地,所述绑定模块包括添加单元和保存单元,其中:Optionally, the binding module includes an adding unit and a saving unit, where:
所述添加单元设置成:在期望进行头像动态显示的应用的账号信息的数据库中添加头像信息;The adding unit is configured to: add avatar information in a database of account information of an application for which dynamic display of the avatar is desired;
所述保存单元设置成:将所述静态图像序列的目录名与所添加的头像信息进行绑定,将所述静态图像序列的目录名保存在所述头像信息中。The saving unit is configured to: bind the directory name of the static image sequence to the added avatar information, and save the directory name of the static image sequence in the avatar information.
可选地,所述显示模块包括查找单元、获取目录名单元和显示单元,其中:Optionally, the display module includes a search unit, a directory name unit, and a display unit, where:
所述查找单元设置成:根据所述账号信息,查找所述账号信息中的头像信息;The searching unit is configured to: search for avatar information in the account information according to the account information;
所述获取目录名单元设置成:根据所查找到的头像信息,获取所述静态 图像序列的目录名;The obtaining directory name unit is configured to: obtain the static according to the found avatar information The directory name of the image sequence;
所述显示单元设置成:将所获取的静态图像序列目录名中的静态图像序列进行逐帧显示。The display unit is configured to display the sequence of still images in the acquired still image sequence directory name frame by frame.
可选地,所述建立目录名模块设置成按照如下方式中的任意一种获取所述头像资源:Optionally, the establishing directory name module is configured to obtain the avatar resource according to any one of the following manners:
从视频文件中获取所述头像资源;Obtaining the avatar resource from a video file;
从动画文件中获取所述头像资源;Obtaining the avatar resource from the animation file;
从静态图片序列中获取所述头像资源。The avatar resource is obtained from a sequence of still pictures.
一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行上述任意的动态头像的实现方法。A computer program comprising program instructions that, when executed by a computer, cause the computer to perform any of the above-described methods of implementing dynamic avatars.
一种载有所述的计算机程序的载体。A carrier carrying the computer program as described.
与相关技术相比较,本发明的有益效果在于:Compared with the related art, the beneficial effects of the present invention are:
本发明技术方案可以呈现动画形式的头像,且部署灵活,对网络账号和本地账号的头像信息都适用,提高了用户体验。The technical solution of the present invention can present an avatar in an animated form, and is flexible to deploy, and is applicable to both the network account and the avatar information of the local account, thereby improving the user experience.
附图概述BRIEF abstract
图1是本发明实施例提供的一种动态头像的实现方法的流程图;FIG. 1 is a flowchart of a method for implementing a dynamic avatar according to an embodiment of the present invention;
图2是本发明实施例提供的一种动态头像的实现装置的示意图;2 is a schematic diagram of an apparatus for implementing a dynamic avatar according to an embodiment of the present invention;
图3是本发明实施例提供的动态头像的实现装置的应用实例的示意图;3 is a schematic diagram of an application example of an apparatus for implementing a dynamic avatar according to an embodiment of the present invention;
图4是本发明实施例提供的动态头像是实现方法的流程图;4 is a flowchart of a method for implementing a dynamic avatar according to an embodiment of the present invention;
图5是本发明实施例提供的本地通讯录动态头像实现的第一示意图;FIG. 5 is a first schematic diagram of implementing a dynamic avatar of a local address book according to an embodiment of the present invention; FIG.
图6是本发明实施例提供的本地通讯录动态头像实现的第二示意图;FIG. 6 is a second schematic diagram of a dynamic avatar implementation of a local address book according to an embodiment of the present invention; FIG.
图7是本发明实施例提供的网络论坛客户端动态头像实现的第一示意图; FIG. 7 is a first schematic diagram of implementing a dynamic avatar of a web forum client according to an embodiment of the present invention; FIG.
图8是本发明实施例提供的网络论坛客户端动态头像实现的第二示意图。FIG. 8 is a second schematic diagram of implementing a dynamic avatar of a web forum client according to an embodiment of the present invention.
本发明的较佳实施方式Preferred embodiment of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
以下结合附图对本发明的优选实施例进行详细说明,应当理解,以下所说明的优选实施例仅用于说明和解释本发明,并不用于限定本发明。The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.
图1显示了本发明实施例提供的一种动态头像的实现方法的流程图,如图1所示,包括以下步骤:FIG. 1 is a flowchart of a method for implementing a dynamic avatar according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
步骤S101:获取头像资源,根据所获取的头像资源,得到随时间变化的静态图像序列,并建立所述静态图像序列的目录名;Step S101: Acquire an avatar resource, obtain a static image sequence that changes with time according to the acquired avatar resource, and establish a directory name of the static image sequence;
步骤S102:将所述静态图像序列的目录名与期望进行头像动态显示的应用的账号信息进行绑定;Step S102: Binding a directory name of the static image sequence with account information of an application that is required to dynamically display an avatar;
步骤S103:在需要显示某账号的头像时,判断该账号信息与所述静态图像序列的目录名是否已绑定;Step S103: When it is required to display an avatar of an account, determine whether the account information and the directory name of the static image sequence are bound;
步骤S104:若判断该账号信息与所述静态图像序列的目录名已经绑定,则逐帧显示所述的静态图像序列。Step S104: If it is determined that the account information is bound to the directory name of the static image sequence, the static image sequence is displayed frame by frame.
可选地,本发明实施例所述根据所获取的头像资源,得到其内容随时间变化的静态图像序列包括:通过对所获取的头像资源进行解析处理,生成统一格式的多张静态图像;对所述多张静态图像按照显示时间顺序进行排序,得到其内容随时间变化的静态图像序列。Optionally, the sequence of the static image whose content changes with time according to the obtained avatar resource according to the embodiment of the present invention includes: parsing the acquired avatar resource to generate multiple static images in a unified format; The plurality of still images are sorted in order of display time, and a sequence of still images whose contents change with time is obtained.
可选地,所述将所述静态图像序列的目录名与期望进行头像动态显示的账号信息进行绑定包括:在期望进行头像动态显示的账号信息的数据库中添加头像信息;将所述静态图像序列的目录名与所添加的头像信息进行绑定,使所述静态图像序列的目录名保存在所述头像信息中。Optionally, the binding the directory name of the static image sequence to the account information that is required to dynamically display the avatar includes: adding avatar information in a database of account information that is desired to dynamically display the avatar; and the static image The directory name of the sequence is bound to the added avatar information, so that the directory name of the static image sequence is saved in the avatar information.
可选地,所述若判断该账号信息与所述静态图像序列的目录名已经绑定,则逐帧显示所述的静态图像序列包括:根据账号信息,查找所述账号信息中 的头像信息;根据所查找到的头像信息,获取所述静态图像序列的目录名;将所获取的静态图像序列目录名中的静态图像序列进行逐帧显示。Optionally, if the account information is determined to be bound to the directory name of the static image sequence, displaying the static image sequence frame by frame includes: searching for the account information according to the account information. The avatar information is obtained, and the directory name of the static image sequence is obtained according to the avatar information found; and the static image sequence in the obtained static image sequence directory name is displayed frame by frame.
可选地,所述获取头像资源包括以下任一方式:从视频文件中获取头像资源;从动画文件中获取头像资源;从静态图片序列中获取头像资源。Optionally, the acquiring the avatar resource includes: obtaining the avatar resource from the video file; acquiring the avatar resource from the animation file; and acquiring the avatar resource from the static image sequence.
图2显示了本发明实施例提供的一种动态头像的实现装置的示意图,如图2所示,包括:建立目录名模块201、绑定模块202、显示控制模块203以及显示模块204。FIG. 2 is a schematic diagram of an apparatus for implementing a dynamic avatar according to an embodiment of the present invention. As shown in FIG. 2, the method includes: creating a directory name module 201, a binding module 202, a display control module 203, and a display module 204.
其中,所述建立目录名模块201,设置成:获取头像资源,根据所获取的头像资源,得到其内容随时间变化的静态图像序列,并建立所述静态图像序列的目录名;The establishing directory name module 201 is configured to: obtain an avatar resource, obtain a static image sequence whose content changes with time according to the acquired avatar resource, and establish a directory name of the static image sequence;
绑定模块202,设置成:将所述静态图像序列的目录名与期望进行头像动态显示的应用的账号信息进行绑定;The binding module 202 is configured to: bind the directory name of the static image sequence to the account information of the application that is required to dynamically display the avatar;
显示控制模块203,设置成:控制某个账号头像的显示及消失时刻,并判断该账号与所述静态头像序列的目录名是否已绑定;The display control module 203 is configured to: control the display and disappearance time of an account avatar, and determine whether the directory name of the account and the static avatar sequence is bound;
显示模块204,设置成:当判断所启用的相应应用的账号信息与所述静态图像序列的目录名已经绑定,则逐帧显示所述的静态图像序列。The display module 204 is configured to: when it is determined that the account information of the enabled corresponding application is bound to the directory name of the static image sequence, the static image sequence is displayed frame by frame.
可选地,所述建立目录名模块201包括:生成单元,设置成:通过对所获取的头像资源进行解析处理,生成统一格式的多张静态图像;获取单元,英语对所述多张静态图像按照显示时间顺序进行排序,得到其内容随时间变化的静态图像序列。Optionally, the establishing the directory name module 201 includes: a generating unit, configured to: generate a plurality of static images in a unified format by parsing the acquired avatar resources; and acquire a unit, the English pairs the plurality of still images Sorting in order of display time results in a sequence of still images whose contents change over time.
可选地,所述绑定模块202包括:添加单元,设置成:在期望进行头像动态显示的账号信息的数据库中添加头像信息;保存单元,设置成:将所述静态图像序列的目录名与所添加的头像信息进行绑定,使所述静态图像序列的目录名保存在所述头像信息中。Optionally, the binding module 202 includes: an adding unit, configured to: add avatar information in a database of account information that is desired to dynamically display the avatar; and the saving unit is configured to: associate the directory name of the static image sequence with The added avatar information is bound, so that the directory name of the static image sequence is saved in the avatar information.
可选地,所述显示模块204包括:查找单元,设置成:根据账号信息,查找所述账号信息中的头像信息获取目录名单元,设置成:根据所查找到的头像信息,获取所述静态图像序列的目录名;显示单元,设置成:将所获取 的静态图像序列目录名中的静态图像序列进行逐帧显示。Optionally, the display module 204 includes: a searching unit, configured to: according to the account information, look up the avatar information in the account information to obtain a directory name unit, and set the method to: obtain the static according to the found avatar information. The directory name of the image sequence; the display unit, set to: will be obtained The sequence of still images in the static image sequence directory name is displayed frame by frame.
其中,所述获取头像资源包括以下任一方式:从视频文件中获取头像资源;从动画文件中获取头像资源;从静态图片序列中获取头像资源。The acquiring the avatar resource includes: obtaining the avatar resource from the video file; acquiring the avatar resource from the animation file; and acquiring the avatar resource from the static image sequence.
图3显示了本发明实施例提供的动态头像的实现装置的应用实例的示意图,如图3所示,包括:头像资源接收模块301、头像资源处理模块302、动态头像存储模块303、头像显示控制模块304以及动态头像显示模块305。FIG. 3 is a schematic diagram of an application example of a device for implementing a dynamic avatar according to an embodiment of the present invention. As shown in FIG. 3, the method includes: an avatar resource receiving module 301, an avatar resource processing module 302, a dynamic avatar storage module 303, and an avatar display control. Module 304 and dynamic avatar display module 305.
其中,所述头像资源接收模块301设置成:获取各种格式的头像资源,然后推送到头像资源处理模块302,所述头像资源处理模块302将不同的头像资源进行解析,生成统一格式的头像资源并推送至动态头像存储模块303,动态头像存储模块303设置成:将收到的头像资源存储至该账号对应的目的位置,头像显示控制模块304设置成:当判断需要显示某账号的动画图像时,通知动态头像显示模块305,动态头像显示模块305设置成:接收到头像显示控制模块304发送的显示通知时,从动态头像存储模块303获取该账号的头像资源解析后显示。The avatar resource receiving module 301 is configured to: obtain avatar resources in various formats, and then send the avatar resources to the avatar resource processing module 302. The avatar resource processing module 302 parses different avatar resources to generate a avatar resource in a unified format. And the dynamic avatar storage module 303 is configured to: store the received avatar resource to the destination location corresponding to the account, and the avatar display control module 304 is configured to: when it is determined that an animated image of an account is required to be displayed The dynamic avatar display module 305 is configured to: after receiving the display notification sent by the avatar display control module 304, obtain the avatar resource parsing of the account from the dynamic avatar storage module 303 and display the avatar resource.
图4显示了本发明实施例提供的动态头像是实现方法的流程图,如图4所示,包括以下步骤:FIG. 4 is a flowchart of a method for implementing a dynamic avatar according to an embodiment of the present invention. As shown in FIG. 4, the method includes the following steps:
在实施时,有头像资源提供模块X(头像资源提供模块X不属于本发明方案范畴)提供新的头像资源时,会经过步骤S401至步骤S403。In the implementation, when the avatar resource providing module X (the avatar resource providing module X does not belong to the scope of the present invention) provides a new avatar resource, the process proceeds to step S401 to step S403.
步骤S401:头像资源接收模块301得到各种格式的头像资源,然后推送到头像资源处理模块302;Step S401: The avatar resource receiving module 301 obtains avatar resources in various formats, and then pushes it to the avatar resource processing module 302;
获取各种格式的头像资源可以是头像资源接收模块301模块主动向头像资源提供模块X发起获取头像资源的请求,也可以是头像资源提供模块X向头像资源接收模块301推送头像资源。头像资源提供模块X和头像资源接收模块301可以部署于网络的两端,如网络论坛和网络通讯录的情形,经网络传送头像资源;头像资源提供模块X和头像资源接收模块301也可以部署于同一设备的不同应用,例如本地通讯录的头像更新情形。The avatar resource receiving module 301 may take the initiative to request the avatar resource providing module X to obtain the avatar resource, or the avatar resource providing module X may push the avatar resource to the avatar resource receiving module 301. The avatar resource providing module X and the avatar resource receiving module 301 can be deployed on both ends of the network, such as the network forum and the network address book, and the avatar resource is transmitted through the network; the avatar resource providing module X and the avatar resource receiving module 301 can also be deployed on the avatar resource providing module X and the avatar resource receiving module 301. Different applications of the same device, such as the avatar update of the local address book.
步骤S402:将不同的头像资源进行解析,生成统一格式的头像资源并推 送至动态头像存储模块303;Step S402: Parsing different avatar resources, generating a unified format avatar resource and pushing Send to the dynamic avatar storage module 303;
处理前的头像资源,允许格式多样,例如可以是一段视频文件、动画文件或图片序列。为最大程度兼容目前已有实现,降低实施难度,将不同的头像资源进行解析处理后的统一格式可优选图像序列,例如:N张静态图像文件,文件以递增的计数命名。以处理前头像资源为视频文件为例:先解析该视频文件得到视频流和语音流,根据文件容器提供携带的信息对视频流解码,得到一帧帧图像文件,根据视频长度,取出全部或部分关键帧(比如视频较长,关键帧数目大于N,则需要抽出N张)。The avatar resource before processing allows for a variety of formats, such as a video file, an animation file, or a sequence of pictures. In order to maximize compatibility with existing implementations and reduce implementation difficulty, a unified format after parsing different avatar resources may optimize image sequences, for example, N static image files, and files are named with increasing counts. Taking the avatar resource as a video file as an example: first parsing the video file to obtain a video stream and a voice stream, and decoding the video stream according to the information carried by the file container, obtaining a frame image file, and taking out all or part according to the video length. Key frames (such as a long video, the number of key frames is greater than N, you need to extract N).
步骤S403:将收到的头像资源存储至该账号对应的目的位置;Step S403: Store the received avatar resource to the destination location corresponding to the account.
结合当前联系人或论坛等应用的账号信息存储技术,优选实施例为:对存储账号信息的数据库增加“头像位置”一列,该列存储内容为每个账号的头像序列所在的目录名。如果某账号信息在该列中存储内容为空,则不显示动画头像,还是显示其原有静态头像。某账号信息在该列中存储内容非空时,优先显示其动画头像。In combination with the account information storage technology of the current contact or the forum, the preferred embodiment is: adding a column of "avatar location" to the database storing the account information, the column storage content being the directory name of the avatar sequence of each account. If an account information is empty in the column, the animation avatar is not displayed, or the original static avatar is displayed. When an account information is stored in the column, the animation avatar is displayed first.
在实施时,动画头像的显示,涉及到步骤S404到步骤S405。In implementation, the display of the animated avatar involves steps S404 through S405.
步骤S404:判断需要显示某账号的动画图像,并通知动态头像显示模块305;Step S404: determining that an animation image of an account needs to be displayed, and notifying the dynamic avatar display module 305;
例如在论坛视图或通讯录列表视图滚动到某处,需要显示对应的账号信息和头像时,头像显示控制模块304会得到系统通知,然后头像显示控制模块304通知动态头像显示模块305去显示该头像,同时头像显示控制模块304按照动画头像优先原则,从S03得到动画头像目录名或静态图像数据,将这些信息以及头像显示控制模块304自定义的时间参数发送给步骤S405。For example, when the forum view or the address book list view is scrolled to somewhere, and the corresponding account information and avatar need to be displayed, the avatar display control module 304 will get a system notification, and then the avatar display control module 304 notifies the dynamic avatar display module 305 to display the avatar. At the same time, the avatar display control module 304 obtains the animated avatar directory name or the still image data from S03 according to the animation avatar priority principle, and sends the information and the time parameter customized by the avatar display control module 304 to step S405.
步骤S405:从动态头像存储模块303获取该账号的头像资源并解析后显示。Step S405: The avatar resource of the account is obtained from the dynamic avatar storage module 303 and parsed and displayed.
以得到的时间参数为间隔,逐帧显示动画头像目录中的图片,若目录名为空,则仍以相关技术显示该静态头像图片。The obtained time parameter is used as an interval to display the picture in the animated avatar directory frame by frame. If the directory name is empty, the static avatar picture is still displayed by related technology.
图5和图6分别显示了本发明实施例提供的本地通讯录动态头像实现的第一和第二示意图,本实施例描述本发明在本地通讯录中的应用,以实现本 地通讯录呈现动画头像的效果。与原静态头像方案相比,本发明实施例新增的头像资源处理模块302,可以如图5所示放在独立插件/装置中,也可以如图6所示添加在本地通讯录应用中。本实施例包括:头像资源接收模块301、头像资源处理模块302、动态头像存储模块303、头像显示控制模块304以及动态头像显示模块305。FIG. 5 and FIG. 6 respectively show first and second schematic diagrams of implementing a dynamic address avatar of a local address book according to an embodiment of the present invention. This embodiment describes an application of the present invention in a local address book to implement the present invention. The local address book presents the effect of an animated avatar. Compared with the original static avatar solution, the avatar resource processing module 302 of the embodiment of the present invention may be placed in a separate plug-in/device as shown in FIG. 5, or may be added to the local address book application as shown in FIG. 6. The embodiment includes an avatar resource receiving module 301, an avatar resource processing module 302, a dynamic avatar storage module 303, an avatar display control module 304, and a dynamic avatar display module 305.
本地通讯录通过头像资源接收模块301向相机应用请求动画头像,与原有静态头像方案只指明图片格式所不同的是,该请求指明的格式为兼容视频文件(如.3gp/.mp4)、动画文件(.gif)和图像序列。该请求同时包含资源应存放的路径Dir。相机通过录像得到视频文件,也可通过连续拍照得到动画文件或图像序列,存放在Dir路径,并将操作结束消息反馈给头像资源接收模块301。头像资源接收模块301在收到反馈后通知头像资源处理模块302,该通知携带的信息为头像资源路径Dir和处理后统一格式的资源(图像序列)存放路径Dir1由头像资源处理模块302完成步骤S402中描述的处理:对视频文件,处理完全同步骤S402的举例描述;对gif等动画文件,则进行文件解析,得到图像序列;对图像序列则不需额外处理。头像资源处理模块302将上述处理后的头像资源存放至Dir1.然后头像资源处理模块302将步骤S402完成消息通知动态头像存储模块303,消息中携带Dir1。与相关静态头像技术相比,动态头像存储模块303对存储账号信息的数据库增加了“头像位置”一列,动态头像存储模块303将Dir1存放至该列的该账号所对应位置处。The local address book requests an animated avatar from the camera application through the avatar resource receiving module 301. The original static avatar scheme only specifies the image format, and the format specified by the request is a compatible video file (eg, .3gp/.mp4), animation. File (.gif) and image sequence. The request also contains the path Dir where the resource should be stored. The camera obtains the video file by recording, and can also obtain the animation file or the image sequence by continuously taking photos, store it in the Dir path, and feed back the operation end message to the avatar resource receiving module 301. After receiving the feedback, the avatar resource receiving module 301 notifies the avatar resource processing module 302 that the information carried by the notification is the avatar resource path Dir and the processed resource (image sequence) storage path Dir1 of the unified format is completed by the avatar resource processing module 302. The processing described in the following: for the video file, the processing is completely the same as the description of the step S402; for the animation file such as gif, the file is parsed to obtain the image sequence; no additional processing is required for the image sequence. The avatar resource processing module 302 stores the processed avatar resource to Dir1. The avatar resource processing module 302 then notifies the dynamic avatar storage module 303 that the message carries Dir1. Compared with the related static avatar technology, the dynamic avatar storage module 303 adds a column of "avatar location" to the database for storing account information, and the dynamic avatar storage module 303 stores Dir1 to the location corresponding to the account of the column.
头像资源存储模块303完成上述处理后通知头像显示控制模块304进行头像更新,由头像显示控制模块304完成步骤S404的流程:头像显示控制模块304按照动画头像优先原则,从动态头像存储模块303得到动画头像目录名或静态图像数据,将这些信息以及头像显示控制模块304自定义的时间参数T发送给动态头像显示模块305。动态像显示模块305将收到的目录名下的每张图片,按照时间间隔T,逐帧显示。而对比原有方案为:头像显示控制模块304从动态头像存储模块303中获取静态图像数据并发送给动态头像显示模块305,由动态头像显示模块305直接显示这张图片。After the avatar resource storage module 303 completes the above processing, the avatar display control module 304 performs the avatar update, and the avatar display control module 304 completes the process of step S404: the avatar display control module 304 obtains the animation from the dynamic avatar storage module 303 according to the animation avatar priority principle. The avatar directory name or the static image data is sent to the dynamic avatar display module 305 by the information and the time parameter T customized by the avatar display control module 304. The dynamic image display module 305 displays each picture under the received directory name on a frame-by-frame basis at a time interval T. The avatar display control module 304 obtains the static image data from the dynamic avatar storage module 303 and sends the static image data to the dynamic avatar display module 305. The dynamic avatar display module 305 directly displays the image.
图7和图8分别显示了本发明实施例提供的网络论坛客户端动态头像实现的第一和第二示意图,本实施例描述本发明在网络论坛客户侧(浏览器或 论坛客户端)中的应用,以实现网络论坛客户侧呈现动画头像的效果。与原静态头像方案相比,本发明实施例新增的头像资源处理模块302可以如图7所示放在独立插件/装置中,也可以如图8所示添加在网络论坛客户侧应用中。本方案将实施在论坛客户侧,减轻了多用户时服务器的负担。本实施例包括:头像资源接收模块301、头像资源处理模块302、动态头像存储模块303、头像显示控制模块304以及动态头像显示模块305。FIG. 7 and FIG. 8 respectively show first and second schematic diagrams of the implementation of the dynamic forum avatar of the web forum client according to the embodiment of the present invention. This embodiment describes the present invention on the client side of the web forum (browser or The application in the forum client) to achieve the effect of presenting the animated avatar on the client side of the web forum. Compared with the original static avatar solution, the avatar resource processing module 302 of the embodiment of the present invention may be placed in a separate plug-in/device as shown in FIG. 7, or may be added to the network forum client-side application as shown in FIG. 8. This solution will be implemented on the client side of the forum, reducing the burden on the server when multiple users. The embodiment includes an avatar resource receiving module 301, an avatar resource processing module 302, a dynamic avatar storage module 303, an avatar display control module 304, and a dynamic avatar display module 305.
账号ACC1更新其头像,即推送一个gif文件到服务器的账号存储单元。与相关技术中由服务器对该gif进行步骤S401接收和步骤S402处理不同,本发明实施例中服务器只进行接收和简单存储,不进行步骤S401和步骤S402的处理。The account ACC1 updates its avatar, that is, pushes a gif file to the account storage unit of the server. In the related art, the step S401 is received by the server and the step S402 is processed. In the embodiment of the present invention, the server performs only receiving and simple storage, and the processes of step S401 and step S402 are not performed.
客户侧向服务器请求某页面内容时,服务器将所需内容发送至该客户侧头像资源接收模块301。在内容处理时,若内容中包含一个或多个头像信息,则客户侧对每个头像信息进行如下处理:When the client side requests the content of a certain page from the server, the server sends the required content to the client-side avatar resource receiving module 301. In the content processing, if the content contains one or more avatar information, the client side processes each avatar information as follows:
头像资源处理模块302将头像信息按照步骤S402进行处理,对视频文件,处理完全同步骤S402的举例描述;对gif等动画文件,则进行文件解析,得到图像序列;对图像序列则不需额外处理。然后将得到的图像序列存储至临时目录,由动态头像存储模块303将目录名存储至以账号检索的列表中,或临时数据库中。页面显示到该账户头像时,头像显示控制模块304从动态头像存储模块303中以账号检索出目录名,取出图片序列,将图片序列路径和头像显示控制模块304自定义的时间参数T通知动态头像显示模块305进行显示。相关技术将头像资源统一处理为动画文件(如gif文件),本发明实施例处理为图像序列,头像显示控制模块304根据客户端能力自定义时间间隔T,提高了对客户侧的兼容性。The avatar resource processing module 302 processes the avatar information according to step S402. For the video file, the processing is completely the same as the description of step S402. For the animation file such as gif, the file is parsed to obtain the image sequence; the image sequence does not need to be additionally processed. . The resulting sequence of images is then stored in a temporary directory, and the dynamic avatar storage module 303 stores the directory name in a list retrieved by account, or in a temporary database. When the page is displayed to the account avatar, the avatar display control module 304 retrieves the directory name from the dynamic avatar storage module 303 by using the account, extracts the sequence of the image, and notifies the dynamic avatar of the time sequence T customized by the image sequence path and the avatar display control module 304. The display module 305 performs display. The related art processes the avatar resources into an animation file (such as a gif file). The embodiment of the present invention processes the image sequence, and the avatar display control module 304 customizes the time interval T according to the client capability, thereby improving compatibility with the client side.
综上所述,本发明实施例通过得到不限格式的头像资源,将该资源解析后重新生成适合显示模块的统一格式的头像资源如图像序列,最后由显示模块对统一格式的资源进行显示。In summary, the embodiment of the present invention obtains an avatar resource that is not limited in format, parses the resource, and regenerates a avatar resource such as an image sequence suitable for the display module, and finally displays the resource in a unified format by the display module.
综上所述,本发明实施例具有以下技术效果:In summary, the embodiments of the present invention have the following technical effects:
本发明实施例可以呈现动画形式的头像,且部署灵活,对网络账号和本地账号的头像信息都适用,提高了用户体验。 The embodiment of the invention can display an avatar in an animated form, and is flexible to deploy, and is applicable to both the network account and the avatar information of the local account, thereby improving the user experience.
本发明实施例还公开了一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行上述任意的动态头像的实现方法。The embodiment of the invention also discloses a computer program, comprising program instructions, when the program instruction is executed by a computer, so that the computer can execute the implementation method of any dynamic avatar described above.
本发明实施例还公开了一种载有所述的计算机程序的载体。The embodiment of the invention also discloses a carrier carrying the computer program.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
尽管上文对本发明进行了详细说明,但是本发明不限于此,本技术领域技术人员可以根据本发明的原理进行各种修改。因此,凡按照本发明原理所作的修改,都应当理解为落入本发明的保护范围。Although the invention has been described in detail above, the invention is not limited thereto, and various modifications may be made by those skilled in the art in accordance with the principles of the invention. Therefore, modifications made in accordance with the principles of the invention are to be understood as falling within the scope of the invention.
工业实用性Industrial applicability
本发明技术方案可以呈现动画形式的头像,且部署灵活,对网络账号和本地账号的头像信息都适用,提高了用户体验,因此本发明具有很强的工业实用性。 The technical solution of the present invention can present an avatar in an animated form, and is flexible to deploy, and is applicable to both the network account and the avatar information of the local account, thereby improving the user experience, and therefore the invention has strong industrial applicability.

Claims (12)

  1. 一种动态头像的实现方法,包括以下步骤:A method for implementing a dynamic avatar includes the following steps:
    获取头像资源,根据所获取的头像资源生成随时间变化的静态图像序列,并建立所述静态图像序列的目录名;Obtaining an avatar resource, generating a static image sequence that changes with time according to the acquired avatar resource, and establishing a directory name of the static image sequence;
    将所述静态图像序列的目录名与期望进行头像动态显示的应用的账号信息进行绑定;Binding the directory name of the static image sequence to the account information of the application for which the avatar is dynamically displayed;
    在需要显示一应用的账号的头像时,判断该账号的账号信息与所述静态图像序列的目录名是否已绑定;When it is required to display an avatar of an application account, determine whether the account information of the account and the directory name of the static image sequence are bound;
    若判断该账号信息与所述静态图像序列的目录名已经绑定,则逐帧显示所述静态图像序列。If it is determined that the account information is already bound to the directory name of the still image sequence, the still image sequence is displayed frame by frame.
  2. 根据权利要求1所述的动态头像的实现方法,其中,所述根据所获取的头像资源生成随时间变化的静态的图像序列的步骤包括:The method for implementing a dynamic avatar according to claim 1, wherein the step of generating a static image sequence that changes with time according to the acquired avatar resource comprises:
    通过对所获取的头像资源进行解析处理,生成统一格式的多张静态图像;Generating a plurality of still images in a unified format by parsing the acquired avatar resources;
    对所述多张所述静态图像按照显示时间顺序进行排序,得到随时间变化的静态图像序列。Sorting the plurality of the still images in order of display time, and obtaining a sequence of still images that change with time.
  3. 根据权利要求1所述的动态头像的实现方法,其中,所述将所述静态图像序列的目录名与期望进行头像动态显示的应用的账号信息进行绑定的步骤包括:The method for implementing a dynamic avatar according to claim 1, wherein the step of binding the directory name of the static image sequence with the account information of an application for which the avatar is dynamically displayed includes:
    在期望进行头像动态显示的应用的账号信息的数据库中添加头像信息;Adding avatar information in a database of account information of an application for which avatar dynamic display is desired;
    将所述静态图像序列的目录名与所添加的头像信息进行绑定,将所述静态图像序列的目录名保存在所述头像信息中。The directory name of the static image sequence is bound to the added avatar information, and the directory name of the static image sequence is saved in the avatar information.
  4. 根据权利要求3所述的动态头像的实现方法,其中,所述若判断该账号信息与所述静态图像序列的目录名已经绑定,则逐帧显示所述的静态图像序列的步骤包括:The method for implementing a dynamic avatar according to claim 3, wherein the step of displaying the static image sequence frame by frame if the account information is determined to be bound to the directory name of the static image sequence comprises:
    根据所述账号信息,查找所述账号信息中的头像信息;Searching for avatar information in the account information according to the account information;
    根据所查找到的头像信息,获取所述静态图像序列的目录名;Obtaining a directory name of the static image sequence according to the avatar information found;
    将所获取的静态图像序列目录名中的静态图像序列进行逐帧显示。 The obtained still image sequence in the static image sequence directory name is displayed frame by frame.
  5. 根据权利要求1-4中任意一项所述的动态头像的实现方法,其中,所述获取头像资源的步骤包括:The method for implementing a dynamic avatar according to any one of claims 1 to 4, wherein the step of acquiring an avatar resource comprises:
    通过以下任一方式获取所述头像资源:Obtain the avatar resource in any of the following ways:
    从视频文件中获取所述头像资源;Obtaining the avatar resource from a video file;
    从动画文件中获取所述头像资源;Obtaining the avatar resource from the animation file;
    从静态图片序列中获取所述头像资源。The avatar resource is obtained from a sequence of still pictures.
  6. 一种动态头像的实现装置,包括建立目录名模块、绑定模块、显示控制模块和显示模块,其中:A device for implementing a dynamic avatar includes: establishing a directory name module, a binding module, a display control module, and a display module, wherein:
    所述建立目录名模块设置成:获取头像资源,根据所获取的头像资源生成随时间变化的静态图像序列,并建立所述静态图像序列的目录名;The establishing a directory name module is configured to: obtain an avatar resource, generate a static image sequence that changes with time according to the acquired avatar resource, and establish a directory name of the static image sequence;
    所述绑定模块设置成:将所述静态图像序列的目录名与期望进行头像动态显示的应用的账号信息进行绑定;The binding module is configured to: bind a directory name of the static image sequence with account information of an application that is required to dynamically display an avatar;
    所述显示控制模块设置成:控制一应用的账号的头像的显示及消失时刻,并判断该账号的账号信息与所述静态头像序列的目录名是否已绑定;The display control module is configured to: control display and disappearance time of an avatar of an account of the application, and determine whether the account information of the account and the directory name of the static avatar sequence are bound;
    所述显示模块设置成:当判断该账号信息与所述静态图像序列的目录名已经绑定,则逐帧显示所述静态图像序列。The display module is configured to display the static image sequence frame by frame when it is determined that the account information is bound to the directory name of the static image sequence.
  7. 根据权利要求6所述的动态头像的实现装置,其中,所述建立目录名模块包括生成单元和获取单元,其中:The apparatus for implementing a dynamic avatar according to claim 6, wherein the establishing directory name module comprises a generating unit and an obtaining unit, wherein:
    所述生成单元设置成:通过对所获取的头像资源进行解析处理,生成统一格式的多张静态图像;The generating unit is configured to: generate a plurality of static images in a unified format by performing parsing processing on the acquired avatar resources;
    所述获取单元设置成:对多张所述静态图像按照显示时间顺序进行排序,得到随时间变化的静态图像序列。The acquiring unit is configured to: sort the plurality of the static images in order of display time, and obtain a sequence of still images that change with time.
  8. 根据权利要求6所述的动态头像的实现装置,其中,所述绑定模块包括添加单元和保存单元,其中:The apparatus for implementing a dynamic avatar according to claim 6, wherein the binding module comprises an adding unit and a saving unit, wherein:
    所述添加单元设置成:在期望进行头像动态显示的应用的账号信息的数据库中添加头像信息;The adding unit is configured to: add avatar information in a database of account information of an application for which dynamic display of the avatar is desired;
    所述保存单元设置成:将所述静态图像序列的目录名与所添加的头像信 息进行绑定,将所述静态图像序列的目录名保存在所述头像信息中。The saving unit is configured to: the directory name of the static image sequence and the added avatar letter The binding is performed, and the directory name of the static image sequence is saved in the avatar information.
  9. 根据权利要求8所述的动态头像的实现装置,其中,所述显示模块包括查找单元、获取目录名单元和显示单元,其中:The apparatus for implementing a dynamic avatar according to claim 8, wherein the display module comprises a search unit, a directory name unit, and a display unit, wherein:
    所述查找单元设置成:根据所述账号信息,查找所述账号信息中的头像信息;The searching unit is configured to: search for avatar information in the account information according to the account information;
    所述获取目录名单元设置成:根据所查找到的头像信息,获取所述静态图像序列的目录名;The obtaining directory name unit is configured to: obtain a directory name of the static image sequence according to the found avatar information;
    所述显示单元设置成:将所获取的静态图像序列目录名中的静态图像序列进行逐帧显示。The display unit is configured to display the sequence of still images in the acquired still image sequence directory name frame by frame.
  10. 根据权利要求6-9任意一项所述的动态头像的实现装置,其中,所述建立目录名模块设置成按照如下方式中的任意一种获取所述头像资源:The device for implementing a dynamic avatar according to any one of claims 6-9, wherein the establishing directory name module is configured to acquire the avatar resource according to any one of the following manners:
    从视频文件中获取所述头像资源;Obtaining the avatar resource from a video file;
    从动画文件中获取所述头像资源;Obtaining the avatar resource from the animation file;
    从静态图片序列中获取所述头像资源。The avatar resource is obtained from a sequence of still pictures.
  11. 一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行如权利要求1-5中任一项所述的动态头像的实现方法。A computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of implementing a dynamic avatar according to any one of claims 1-5.
  12. 一种载有如权利要求11所述的计算机程序的载体。 A carrier carrying the computer program of claim 11.
PCT/CN2015/087563 2014-11-19 2015-08-19 Method and apparatus for realizing dynamic head portrait WO2016078454A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410660482.3A CN105635232A (en) 2014-11-19 2014-11-19 Method and device for realizing dynamic head portrait
CN201410660482.3 2014-11-19

Publications (1)

Publication Number Publication Date
WO2016078454A1 true WO2016078454A1 (en) 2016-05-26

Family

ID=56013252

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/087563 WO2016078454A1 (en) 2014-11-19 2015-08-19 Method and apparatus for realizing dynamic head portrait

Country Status (2)

Country Link
CN (1) CN105635232A (en)
WO (1) WO2016078454A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209393A (en) * 2019-04-24 2019-09-06 深圳点猫科技有限公司 A kind of programming implementation method and device for head portrait replacement in gameization education
CN112637042A (en) * 2018-09-26 2021-04-09 深圳市云歌人工智能技术有限公司 Method, apparatus and storage medium for distributing information based on priority

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992990B (en) * 2019-01-11 2020-10-30 刘高峰 User head portrait processing method, device and system
CN115499672B (en) * 2021-06-17 2023-12-01 北京字跳网络技术有限公司 Image display method, device, equipment and storage medium
CN117336549A (en) * 2022-01-10 2024-01-02 抖音视界有限公司 Video processing method and device and non-volatile computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599017A (en) * 2009-07-14 2009-12-09 阿里巴巴集团控股有限公司 A kind of generation mthods, systems and devices of head image of network user
CN102883304A (en) * 2012-10-11 2013-01-16 王维国 Method for setting head portrait in contact list of mobile phone of other person
US20140095315A1 (en) * 2012-09-28 2014-04-03 Siva G. Narendra Mobile device with reveal of dynamic content
CN104065913A (en) * 2014-06-27 2014-09-24 上海梦荻网络科技有限公司 Instant messaging client

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035938B (en) * 2010-12-10 2014-04-02 福州瑞芯微电子有限公司 Method for dynamically displaying video contacts in communication apparatus
CN102368749B (en) * 2011-09-23 2016-08-10 上海量明科技发展有限公司 Instant communication contacts list presents the method and system of individual character pattern
CN102368196B (en) * 2011-10-02 2016-05-04 上海量明科技发展有限公司 Method, terminal and the system of customer end contents transmission window inediting dynamic picture
CN103248748B (en) * 2012-02-13 2016-05-18 宇龙计算机通信科技(深圳)有限公司 Terminal and contact photo setting method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599017A (en) * 2009-07-14 2009-12-09 阿里巴巴集团控股有限公司 A kind of generation mthods, systems and devices of head image of network user
US20140095315A1 (en) * 2012-09-28 2014-04-03 Siva G. Narendra Mobile device with reveal of dynamic content
CN102883304A (en) * 2012-10-11 2013-01-16 王维国 Method for setting head portrait in contact list of mobile phone of other person
CN104065913A (en) * 2014-06-27 2014-09-24 上海梦荻网络科技有限公司 Instant messaging client

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637042A (en) * 2018-09-26 2021-04-09 深圳市云歌人工智能技术有限公司 Method, apparatus and storage medium for distributing information based on priority
CN110209393A (en) * 2019-04-24 2019-09-06 深圳点猫科技有限公司 A kind of programming implementation method and device for head portrait replacement in gameization education

Also Published As

Publication number Publication date
CN105635232A (en) 2016-06-01

Similar Documents

Publication Publication Date Title
WO2016078454A1 (en) Method and apparatus for realizing dynamic head portrait
US8694586B2 (en) Maintaining corresponding relationships between chat transcripts and related chat content
US8700699B2 (en) Using a proxy server for a mobile browser
EP3055761B1 (en) Framework for screen content sharing system with generalized screen descriptions
CN109582644A (en) File memory method, device, equipment and computer readable storage medium
CN101193074A (en) A method and system for display image on instant communication demonstration frame
WO2015065955A1 (en) Bandwidth reduction system and method
CN104320417A (en) Method for interconnection and stream transmission and stream media play between mobile terminal and web terminal
JP7448672B2 (en) Information processing methods, systems, devices, electronic devices and storage media
TW201737681A (en) Method and apparatus for implementing instant messaging
WO2014201803A1 (en) Method and system for synchronizing duplicated contents in multiple terminals
JP7176133B2 (en) Method, apparatus and computer program for dynamic adaptive streaming over HTTP
EP3532917A1 (en) Video playback in group communications
US20140344726A1 (en) Information processing method of im application device and system, im application device, terminal, and storage medium
CN104320491A (en) Method for synchronous display between mobile device and web terminal
JP2022525366A (en) Methods, devices, and programs for receiving media data
WO2015180446A1 (en) System and method for maintaining connection channel in multi-device interworking service
CN104394200A (en) A method for performing simultaneous preview and display between a mobile device and a web terminal
CN111625308B (en) Information display method and device and electronic equipment
CN113766298B (en) Bullet screen display method, device and system
CN106878145B (en) Display method, display device and display system of user-defined picture
WO2012122771A1 (en) Method for providing reading service, content provision server and system
GB2508138A (en) Delivering video content to a device by storing multiple formats
US9569543B2 (en) Sharing of documents with semantic adaptation across mobile devices
CN104808976B (en) File sharing method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15860245

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15860245

Country of ref document: EP

Kind code of ref document: A1