WO2021047094A1 - Virtual gift special effect processing method and apparatus, and live streaming system - Google Patents

Virtual gift special effect processing method and apparatus, and live streaming system Download PDF

Info

Publication number
WO2021047094A1
WO2021047094A1 PCT/CN2019/125929 CN2019125929W WO2021047094A1 WO 2021047094 A1 WO2021047094 A1 WO 2021047094A1 CN 2019125929 W CN2019125929 W CN 2019125929W WO 2021047094 A1 WO2021047094 A1 WO 2021047094A1
Authority
WO
WIPO (PCT)
Prior art keywords
gift
special effect
live video
target special
client
Prior art date
Application number
PCT/CN2019/125929
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 WO2021047094A1 publication Critical patent/WO2021047094A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • H04N21/4316Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Definitions

  • the server 220 is configured to receive a virtual gift giving instruction sent by the viewer client 230, and send the gift instruction to the anchor client 210;
  • the server 220 is also used to forward the live video stream data to the viewer client 230;
  • this embodiment will exemplify the "mask” as the target special effect gift.
  • the viewer client After the viewer client obtains the composite location information, it will convert the composite location information according to the size of the special effect display area of the current viewer client, and determine the target of the target special effect gift on the current video frame image according to the converted composite location information Position, add the target special effect gift to the target position for synthesis.
  • S1203 Determine a target position corresponding to the characteristic region on the current video frame image according to the key points of the person contour, so as to synthesize the target special effect gift at the target position.
  • step S110a This step is the same as step S110a, and will not be described in detail here.
  • Figure 9 is a rendering of a virtual gift in a live broadcast technology.
  • AR virtual gifts can only be realistic In the live video playback area, the display effect is not good; however, after adopting the technology of this application, it can be displayed across the live video playback area, and a better special effect display effect can be obtained.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • General Engineering & Computer Science (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Provided are a virtual gift special effect processing method and apparatus, a live streaming system, a device and a storage medium. The processing method comprises: receiving a gifting instruction of a virtual gift sent by an audience client; according to the gifting instruction, acquiring a corresponding target special effect gift and determining a feature area of the target special effect gift; according to the feature area, determining compositing position information of the target special effect gift on a live stream video; sending the live stream video and the compositing position information to the client so that the audience client can, according to the compositing position information, add the target special effect gift to the live stream video for compositing and display. The present application uses an anchor client to encode and encapsulate compositing position information outside of a live stream video, said information is transmitted independently from the live stream video and is decoded at an audience client, which facilitates the audience client editing the effect display of a virtual special effect gift for the second time, and which helps to improve the effect of the display of special effects.

Description

虚拟礼物特效的处理方法和装置、直播系统Method and device for processing virtual gift special effects, and live broadcast system 技术领域Technical field
本申请实施例涉及直播技术领域,具体而言,涉及一种虚拟礼物特效的处理方法和装置、直播系统,还涉及一种计算机设备和存储介质。The embodiments of the present application relate to the field of live broadcast technology, in particular, to a method and device for processing virtual gift special effects, a live broadcast system, and also to a computer device and a storage medium.
背景技术Background technique
随着网络技术发展,实时视频交流如网络直播、视频聊天室等成为一种越来越流行的娱乐方式。在实时视频交流过程中,可以通过赠送虚拟礼物展示特效的方式增加用户之间的互动性。With the development of network technology, real-time video communication such as live webcasts and video chat rooms have become an increasingly popular form of entertainment. In the process of real-time video communication, the interaction between users can be increased by giving virtual gifts to display special effects.
例如,在直播场景中,主播用户在直播间进行直播,观众用户在观众客户端观看主播的直播过程。为了增加主播用户和观众用户之间的互动性,观众用户可以选择特定的目标特效礼物赠送给主播,将目标特效礼物按照所对应的娱乐模板添加到主播画面的特定位置,展示相对应的特效。For example, in a live broadcast scenario, the host user performs the live broadcast in the live broadcast room, and the viewer user watches the host's live broadcast process on the viewer client. In order to increase the interaction between the anchor user and the audience user, the audience user can choose a specific target special effect gift to give to the anchor, and add the target special effect gift to a specific position of the anchor screen according to the corresponding entertainment template to display the corresponding special effect.
现有的礼物特效的展示方法是通过主播客户端将礼物特效合成到视频帧,将含有礼物特效的视频帧放到视频流传输到其他主播客户端或观众客户端进行特效展示,上述展示方式使得礼物特效固化在视频区域,不利于后续对于礼物特效进行二次调整,影响了整体展示效果。The existing gift special effect display method is to synthesize the gift special effect into the video frame through the host client, and put the video frame containing the gift special effect into the video stream and transmit it to other host clients or audience clients for special effect display. The gift special effects are fixed in the video area, which is not conducive to the subsequent adjustment of the gift special effects and affects the overall display effect.
发明内容Summary of the invention
本申请的目的旨在至少解决上述技术缺陷之一,特别是不利于虚拟礼物特效进行二次调整,展示效果不佳的问题。The purpose of this application is to solve at least one of the above technical shortcomings, especially the problem that it is not conducive to secondary adjustment of virtual gift special effects and poor display effect.
第一方面,本申请实施例提供了一种虚拟礼物特效的处理方法,包括以下步骤:In the first aspect, an embodiment of the present application provides a method for processing virtual gift special effects, including the following steps:
接收虚拟礼物的赠送指令,根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域;Receiving a gifting instruction of a virtual gift, obtaining a corresponding target special effect gift according to the gifting instruction, and determining a characteristic area of the target special effect gift;
根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息;Determining, according to the characteristic area, synthetic location information of the target special effect gift on the live video;
将所述直播视频以及所述合成位置信息发送至观众客户端,使得所述观众客户端 根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The live video and the synthesized location information are sent to the audience client, so that the audience client adds the target special effect gift to the live video for synthesis and display according to the synthesized location information.
第二方面,本申请实施例提供了一种虚拟礼物特效的处理方法,包括以下步骤:In the second aspect, an embodiment of the present application provides a method for processing virtual gift special effects, including the following steps:
向主播客户端发送虚拟礼物赠送指令;其中,所述主播客户端根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域,根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息;Send a virtual gift giving instruction to the host client; wherein, the host client obtains the corresponding target special effect gift according to the gift instruction and determines the characteristic area of the target special effect gift, and determines the target special effect gift according to the characteristic area Synthesized location information on the live video;
接收主播客户端发送的直播视频流数据;其中,所述直播视频流数据中包括直播视频和目标特效礼物的合成位置信息;Receiving live video stream data sent by the host client; wherein the live video stream data includes the combined location information of the live video and the target special effect gift;
将所述直播视频流数据转发至观众客户端;其中,所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The live video stream data is forwarded to a viewer client; wherein, the viewer client adds the target special effect gift to the live video according to the combined location information to synthesize and display.
第三方面,本申请实施例提供了一种虚拟礼物特效的处理装置,包括:In a third aspect, an embodiment of the present application provides a device for processing virtual gift special effects, including:
特征获取模块,用于接收虚拟礼物的赠送指令,根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域;The feature acquisition module is configured to receive a virtual gift giving instruction, obtain a corresponding target special effect gift according to the gift instruction, and determine the characteristic area of the target special effect gift;
信息确定模块,用于根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息;An information determining module, configured to determine the combined location information of the target special effect gift on the live video according to the characteristic area;
信息发送模块,用于将所述直播视频以及所述合成位置信息发送至观众客户端,使得所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The information sending module is configured to send the live video and the synthesized location information to the audience client, so that the audience client adds the target special effect gift to the live video for synthesis and synthesis according to the synthesized location information To show.
第四方面,本申请实施例提供了一种虚拟礼物特效的处理装置,包括:In a fourth aspect, an embodiment of the present application provides a device for processing virtual gift special effects, including:
指令发送模块,用于向主播客户端发送虚拟礼物的赠送指令;其中,所述主播客户端根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域,根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息;The instruction sending module is used to send a virtual gift giving instruction to the host client; wherein, the host client obtains the corresponding target special effect gift according to the gift instruction and determines the characteristic area of the target special effect gift, according to the characteristic The area determines the synthesized location information of the target special effect gift on the live video;
数据接收模块,用于接收主播客户端发送的直播视频流数据;其中,所述直播视频流数据中包括直播视频和目标特效礼物的合成位置信息;The data receiving module is configured to receive live video stream data sent by the host client; wherein, the live video stream data includes the combined location information of the live video and the target special effect gift;
数据转发模块,用于将所述直播视频流数据转发至观众客户端;其中,所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The data forwarding module is configured to forward the live video stream data to an audience client; wherein, the audience client adds the target special effect gift to the live video for synthesis and display according to the synthesis location information.
第五方面,本申请实施例提供了一种直播系统,包括主播客户端、观众客户端和以及服务器,所述主播客户端经所述服务器与所述观众客户端通过网络进行通信连 接;In a fifth aspect, an embodiment of the present application provides a live broadcast system, including an anchor client, an audience client, and a server, the anchor client communicates with the audience client through the network through the server;
所述服务器,用于接收所述观众客户端发送的虚拟礼物的赠送指令,并向主播客户端发送所述赠送指令;The server is configured to receive a virtual gift giving instruction sent by the viewer client, and send the gift instruction to the anchor client;
所述主播客户端,用于接收所述赠送指令并获取目标特效礼物标识;根据所述目标特效礼物标识查找得到目标特效礼物,确定所述目标特效礼物所对应的特征区域;根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息;将所述合成位置信息和所述直播视频编码成直播视频流数据发送至服务器;The anchor client is configured to receive the gift instruction and obtain a target special effect gift identifier; find the target special effect gift according to the target special effect gift identifier, and determine the characteristic area corresponding to the target special effect gift; according to the characteristic area Determine the combined location information of the target special effect gift on the live video; encode the combined location information and the live video into live video stream data and send it to the server;
所述服务器,还用于将所述直播视频流数据转发至所述观众客户端;The server is also used to forward the live video stream data to the viewer client;
所述观众客户端,用于接收直播视频流数据和目标特效礼物,从所述直播视频流数据中获取直播视频和所述目标特效礼物的合成位置信息;根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The audience client is configured to receive live video stream data and target special effect gifts, and obtain the combined location information of the live video and the target special effect gifts from the live video stream data; combine the target with the combined location information The special effect gift is added to the live video for synthesis and display.
第六方面,本申请实施例提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上述任一实施例所述的虚拟礼物特效的处理方法的步骤。In a sixth aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor. When the processor executes the program, it can implement any of the above The steps of the method for processing virtual gift special effects described in the embodiment.
第七方面,本申请实施例提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如上述任一实施例所述虚拟礼物特效的处理方法的步骤。In a seventh aspect, an embodiment of the present application provides a storage medium containing computer-executable instructions, when the computer-executable instructions are executed by a computer processor, they are used to perform the processing of virtual gift special effects as described in any of the above embodiments. Method steps.
上述实施例提供的虚拟礼物特效的处理方法和装置、直播系统、设备和存储介质,通过接收观众客户端发送的虚拟礼物的赠送指令,根据赠送指令获取对应的目标特效礼物并确定目标特效礼物的特征区域;根据特征区域确定目标特效礼物在直播视频上的合成位置信息;将直播视频以及合成位置信息发送至客户端,使得观众客户端根据合成位置信息将目标特效礼物添加到直播视频进行合成并进行展示。相对于主播客户端直接将目标特效礼物合成到直播视频,再发送至各观众客户端以在观众客户端的视频区域播放虚拟礼物特效,该方案利用主播客户端在直播视频外将合成位置信息进行编码封装,独立于直播视频进行传输,以使得观众客户端解码得到合成位置信息,便于对虚拟特效礼物的效果展示进行二次编辑,从而有利于观众客户端实现分层特效处理和跨直播视频播放区域的特效展示,提高特效展示的效果。The virtual gift special effect processing method and device, live broadcast system, equipment, and storage medium provided in the above embodiment receive the virtual gift gift instruction sent by the viewer client, obtain the corresponding target special effect gift according to the gift instruction, and determine the target special effect gift Feature area; Determine the composite location information of the target special effect gift on the live video according to the feature area; send the live video and composite location information to the client, so that the audience client adds the target special effect gift to the live video for synthesis and synthesis based on the composite location information To show. Compared with the host client, the target special effect gift is directly synthesized into the live video, and then sent to each viewer client to play the virtual gift special effect in the video area of the viewer client. This solution uses the host client to encode the synthesized location information outside the live video Encapsulation, independent of the live video transmission, so that the audience client decodes the synthesized location information, which is convenient for the secondary editing of the effect display of the virtual special effect gift, which is beneficial to the audience client to achieve hierarchical special effect processing and cross-live video playback area Special effects display, improve the effect of special effects display.
附图说明Description of the drawings
图1是一实施例提供的虚拟礼物特效的处理方法的系统框架示意图;FIG. 1 is a schematic diagram of a system framework of a method for processing virtual gift special effects provided by an embodiment;
图2是一实施例提供的直播系统的结构示意图;FIG. 2 is a schematic structural diagram of a live broadcast system provided by an embodiment;
图3是一实施例提供的一种虚拟礼物特效的处理方法的流程图;FIG. 3 is a flowchart of a method for processing virtual gift special effects according to an embodiment;
图4是一实施例提供的合成位置信息获取方法的流程图;FIG. 4 is a flowchart of a method for obtaining synthetic location information according to an embodiment;
图5是一实施例提供的一种虚拟礼物特效的合成方法的流程图;FIG. 5 is a flowchart of a method for synthesizing virtual gift special effects according to an embodiment;
图6是一种直播技术中虚拟礼物的合成效果图;Figure 6 is a composite effect diagram of a virtual gift in a live broadcast technology;
图7是一实施例提供的虚拟礼物合成的效果图;FIG. 7 is an effect diagram of virtual gift synthesis provided by an embodiment;
图8是一实施例提供的一种虚拟礼物特效的渲染方法的流程图;FIG. 8 is a flowchart of a method for rendering virtual gift special effects according to an embodiment;
图9是一种直播技术中虚拟礼物的渲染效果图;Figure 9 is a rendering effect diagram of a virtual gift in a live broadcast technology;
图10是一实施例提供的虚拟礼物特效的处理方法的另一流程图;FIG. 10 is another flowchart of a method for processing virtual gift special effects provided by an embodiment;
图11是一实施例提供的虚拟礼物赠送过程的时序图;FIG. 11 is a sequence diagram of a virtual gift giving process provided by an embodiment;
图12是一实施例提供的虚拟礼物特效的处理装置的结构示意图;及FIG. 12 is a schematic structural diagram of an apparatus for processing virtual gift special effects provided by an embodiment; and
图13是一实施例提供的虚拟礼物特效的处理装置的另一结构示意图。FIG. 13 is a schematic diagram of another structure of a device for processing virtual gift special effects provided by an embodiment.
具体实施方式detailed description
为了更好地阐释本申请的技术方案,下面示出本方案的虚拟礼物特效的处理方法所可以适用的应用环境。如图1所示,图1是一实施例提供的虚拟礼物特效的处理方法的系统框架示意图,该系统框架可以包括服务端和客户端。位于服务端上的直播平台中可以包括多个虚拟直播间和服务器等,各个虚拟直播间对应播放不同的直播内容。客户端包括观众客户端和主播客户端,通常而言,主播通过主播客户端进行直播,观众通过观众客户端选择进入某一虚拟直播间观看主播进行直播。观众客户端和主播客户端可以通过安装在终端设备上的直播应用程序(Application,APP)进入直播平台。In order to better explain the technical solution of this application, the following shows the applicable application environment of the virtual gift special effect processing method of this solution. As shown in FIG. 1, FIG. 1 is a schematic diagram of a system framework of a method for processing virtual gift special effects provided by an embodiment. The system framework may include a server and a client. The live broadcast platform on the server side may include multiple virtual live broadcast rooms and servers, etc., and each virtual live broadcast room correspondingly plays different live content. Clients include a viewer client and a host client. Generally speaking, the host conducts live broadcast through the host client, and the viewer chooses to enter a virtual live room through the viewer client to watch the host live. The audience client and the anchor client can enter the live broadcast platform through a live broadcast application (Application, APP) installed on the terminal device.
在本实施例中,终端设备可以为智能手机、平板电脑、电子阅读器、台式电脑或笔记本电脑等终端,对此并不做限定。服务器是用于为终端设备提供后台服务的后台服务器,可以用独立服务器或多个服务器组成的服务器集群来实现。In this embodiment, the terminal device may be a terminal such as a smart phone, a tablet computer, an e-reader, a desktop computer, or a notebook computer, which is not limited. A server is a back-end server used to provide back-end services to terminal devices, and it can be implemented by an independent server or a server cluster composed of multiple servers.
本实施例提供的虚拟礼物特效的处理方法适用于在直播过程中赠送虚拟礼物并对虚拟礼物特效进行展示的情况,可以是观众通过观众客户端向目标主播赠送虚拟礼物,以在目标主播所处主播客户端和多个观众客户端展示虚拟礼物的特效,也可以是 主播通过主播客户端向另一主播赠送虚拟礼物,以在赠送虚拟礼物的主播和接收虚拟礼物的主播所处的主播客户端以及多个观众客户端展示虚拟礼物的特效等。The method for processing virtual gift special effects provided in this embodiment is applicable to the situation where virtual gifts are presented and the virtual gift special effects are displayed during the live broadcast. It can be that the audience presents virtual gifts to the target anchor through the audience client, so as to be at the target anchor’s location. The host client and multiple viewer clients display the special effects of virtual gifts, or the host can give a virtual gift to another host through the host client, so that the host who gives the virtual gift and the host who receives the virtual gift is located on the host client And multiple audience clients show special effects of virtual gifts, etc.
下面以观众客户端向目标主播赠送虚拟特效礼物为例,对本方案进行示例性说明。The following takes the audience client to present a virtual special effect gift to the target anchor as an example to illustrate the solution.
图2是一实施例提供的直播系统的结构示意图,如图2所示,该直播系统200包括:主播客户端210、观众客户端230和服务器220。主播客户端210经服务器220与观众客户端230通过网络进行通信连接。FIG. 2 is a schematic structural diagram of a live broadcast system provided by an embodiment. As shown in FIG. 2, the live broadcast system 200 includes: an anchor client 210, an audience client 230, and a server 220. The host client 210 communicates with the audience client 230 via the server 220 through a network.
在本实施例中,主播客户端可以是安装于计算机电脑上的主播客户端,也可以是安装于移动终端,如手机或平板电脑上的主播客户端;同理,观众客户端可以是安装于计算机电脑上的观众客户端,也可以是安装于移动终端,如手机或平板电脑上的观众客户端。In this embodiment, the host client can be the host client installed on a computer, or it can be installed on a mobile terminal, such as a mobile phone or tablet; similarly, the audience client can be installed on The audience client on the computer may also be the audience client installed on a mobile terminal, such as a mobile phone or a tablet computer.
所述服务器220,用于接收所述观众客户端230发送的虚拟礼物的赠送指令,并向主播客户端210发送所述赠送指令;The server 220 is configured to receive a virtual gift giving instruction sent by the viewer client 230, and send the gift instruction to the anchor client 210;
所述主播客户端210,用于接收所述赠送指令并获取目标特效礼物标识;根据所述目标特效礼物标识查找得到目标特效礼物,确定所述目标特效礼物所对应的特征区域;根据所述特征区域确定所述目标特效礼物在所述直播视频上的合成位置信息;将所述合成位置信息和所述直播视频编码成直播视频流数据发送至服务器;The host client 210 is configured to receive the gift instruction and obtain the target special effect gift identifier; find the target special effect gift according to the target special effect gift identifier, and determine the characteristic area corresponding to the target special effect gift; according to the characteristics The region determines the combined location information of the target special effect gift on the live video; encodes the combined location information and the live video into live video stream data and sends it to the server;
所述服务器220,还用于将所述直播视频流数据转发至所述观众客户端230;The server 220 is also used to forward the live video stream data to the viewer client 230;
所述观众客户端230,用于接收直播视频流数据和目标特效礼物,从所述直播视频流数据中获取直播视频和所述目标特效礼物的合成位置信息;根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成,得到特效帧图像;在直播窗口上设置展示特效展示区域,在播放所述直播视频的过程中,在所述特效展示区域同步渲染所述特效帧图像。The audience client 230 is configured to receive live video stream data and target special effect gifts, and obtain the combined location information of the live video and the target special effect gifts from the live video stream data; and convert the combined location information according to the combined location information. The target special effect gift is added to the live video for synthesis to obtain a special effect frame image; a special effect display area is set on the live broadcast window, and the special effect frame image is synchronously rendered in the special effect display area during the process of playing the live video .
图3是一实施例提供的一种虚拟礼物特效的处理方法的流程图,该虚拟礼物特效的处理方法执行于客户端,如主播客户端。在一些实施例中,还可以执行于服务端,如服务器。本实施例以主播客户端为例进行说明。FIG. 3 is a flowchart of a method for processing virtual gift special effects according to an embodiment. The method for processing virtual gift special effects is executed on a client, such as a host client. In some embodiments, it can also be executed on a server, such as a server. In this embodiment, the anchor client is taken as an example for description.
具体的,如图3所示,该虚拟礼物特效的处理方法可以包括以下步骤:Specifically, as shown in FIG. 3, the method for processing the virtual gift special effect may include the following steps:
S110、接收虚拟礼物的赠送指令,根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域。S110. Receive a gifting instruction of a virtual gift, obtain a corresponding target special effect gift according to the gifting instruction, and determine a characteristic area of the target special effect gift.
观众在观看直播视频过程中,向目标主播赠送虚拟礼物,通过在观众客户端触发相关功能按键选择目标特效礼物,向服务器发出虚拟礼物的赠送指令,服务器接收到该赠送指令转发至主播客户端,其中,该虚拟礼物的赠送请求携带有目标特效礼物标识和目标主播标识等信息。While watching the live video, the viewer presents a virtual gift to the target host, and selects the target special effect gift by triggering the relevant function button on the viewer client, and sends a virtual gift gift instruction to the server. The server receives the gift instruction and forwards it to the host client. Wherein, the gift request of the virtual gift carries information such as the target special effect gift identifier and the target anchor identifier.
主播客户端接收观众客户端发送的虚拟礼物的赠送指令,解析该赠送指令所携带的信息,获取到目标特效礼物标识和目标主播标识。服务器根据目标特效礼物标识查找出相对应的目标特效礼物。可选的,目标特效礼物可以是二维显示形式的特效礼物,也可以是三维显示形式的特效礼物,即三维特效礼物。在本实施例中,该目标特效礼物优选为三维特效礼物,如AI(Artificial Intelligence)特效礼物,通过三维特效礼物营造出立体特效,增强现实感受,提高虚拟礼物特效的处理效果。The host client receives the virtual gift giving instruction sent by the viewer client, analyzes the information carried in the gift instruction, and obtains the target special effect gift identifier and the target host identifier. The server finds the corresponding target special effect gift according to the target special effect gift identifier. Optionally, the target special effect gift may be a special effect gift in a two-dimensional display form, or a special effect gift in a three-dimensional display form, that is, a three-dimensional special effect gift. In this embodiment, the target special effect gift is preferably a three-dimensional special effect gift, such as an AI (Artificial Intelligence) special effect gift. The three-dimensional special effect gift is used to create a three-dimensional special effect, enhance the reality experience, and improve the processing effect of the virtual gift special effect.
在实施例中,目标特效礼物根据人物特征来进行效果展示,不同的目标特效礼物对应有各自的特征区域,其中,特征区域是指目标特效礼物在直播视频上所对应设置的区域。示例性的,目标特效礼物可以为天使翅膀、面具和帽子等,天使翅膀可以设置于主播的背部,则天使翅膀对应的特征区域为背部;面具佩戴于主播的眼睛附近,则面具对应的特征区域为脸部;帽子佩戴在主播的头部,则帽子对应的特征区域为头部等。In the embodiment, the target special effect gift is displayed according to the characteristics of the character, and different target special effect gifts correspond to their own characteristic areas, where the characteristic area refers to the correspondingly set area of the target special effect gift on the live video. Exemplarily, the target special effect gift can be angel wings, masks, hats, etc. The angel wings can be set on the anchor’s back, and the characteristic area corresponding to the angel wings is the back; the mask is worn near the eyes of the anchor, the mask corresponds to the characteristic area It is the face; if the hat is worn on the head of the anchor, the characteristic area corresponding to the hat is the head, etc.
S120、根据所述特征区域确定所述目标特效礼物在所述直播视频上的合成位置信息。S120: Determine the combined location information of the target special effect gift on the live video according to the characteristic area.
其中,合成位置信息可以包括:人脸信息、人体轮廓信息、手势信息和人体骨骼信息中的至少一者。在实施例中,合成位置信息可以包括基于主播客户端对直播视频进行识别得到的目标特效礼物合成在该直播视频的目标位置。Wherein, the synthesized position information may include: at least one of face information, human contour information, gesture information, and human bone information. In an embodiment, the synthesized location information may include the target special effect gift obtained by recognizing the live video based on the host client to synthesize the target location of the live video.
主播客户端接收到观众客户端发送的虚拟礼物的赠送指令时,获取目标主播所在直播间的直播视频,从该直播视频中提取当前视频帧图像,根据目标特效礼物对当前视频帧图像进行处理,以提取出用于对目标特效礼物进行合成的相关信息,如目标特效礼物的特征区域在当前视频帧图像的合成位置信息。根据合成位置信息,可以将目标特效礼物合成到当前视频帧图像的目标位置,其中,目标特效礼物的特征区域与当前视频帧图像的目标位置一一对应。在实施例中,合成位置信息可以由一个或多个人物轮廓关键点来表示,其中,每个人物轮廓关键点在当前视频帧图像中有唯一的坐标值,根据人物轮廓关键点的一个或多个坐标值可以得到目标特效礼物添加在当前视频 帧图像的目标位置。When the host client receives the virtual gift giving instruction sent by the viewer client, it obtains the live video of the live room where the target host is located, extracts the current video frame image from the live video, and processes the current video frame image according to the target special effect gift. In order to extract relevant information used to synthesize the target special effect gift, such as the synthesis position information of the characteristic area of the target special effect gift in the current video frame image. According to the synthesis position information, the target special effect gift can be synthesized to the target position of the current video frame image, wherein the characteristic area of the target special effect gift corresponds to the target position of the current video frame image one-to-one. In an embodiment, the synthesized position information may be represented by one or more key points of the person's outline, where each key point of the person's outline has a unique coordinate value in the current video frame image, according to one or more of the key points of the person's outline. A coordinate value can be obtained by adding the target special effect gift to the target position of the current video frame image.
为了便于更清晰地阐述本方案,本实施例将结合“面具”为目标特效礼物做示例性说明。In order to explain this solution more clearly, this embodiment will exemplify the "mask" as the target special effect gift.
在实施例中,观众向目标主播赠送“面具”这一目标特效礼物,“面具”所对应的特征区域为脸部。服务器获取目标主播所在直播间的直播视频,提取出当前视频帧图像,对该当前视频帧图像进行识别,得到一系列的人物轮廓关键点,并从这些人物轮廓关键点中确定某一些目标轮廓点对应的该特征区域,如目标轮廓点A(50,55)、B(45,48)和C(45,60),将目标轮廓点A、B和C按照特定的算法进行连线所得到的区域为目标特效礼物在当前视频帧图像的目标位置。可选的,该“面具”在当前视频帧图像中的合成位置信息包括目标轮廓点A、B和C的坐标值。In the embodiment, the audience presents the target special effect gift of "mask" to the target anchor, and the characteristic area corresponding to the "mask" is the face. The server obtains the live video of the live broadcast room where the target host is located, extracts the current video frame image, recognizes the current video frame image, and obtains a series of key outlines of characters, and determines certain target outline points from these key outlines of characters Corresponding to the feature area, such as target contour points A (50, 55), B (45, 48) and C (45, 60), the target contour points A, B and C are connected according to a specific algorithm. The area is the target position of the target special effect present in the current video frame image. Optionally, the combined position information of the "mask" in the current video frame image includes the coordinate values of the target contour points A, B, and C.
S130、将所述直播视频以及所述合成位置信息发送至所述观众客户端,使得所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。S130. Send the live video and the synthesized location information to the audience client, so that the audience client adds the target special effect gift to the live video for synthesis and display according to the synthesized location information .
主播客户端获取到合成位置信息后,将合成位置信息与直播视频进行编码形成数据包,发送至观众客户端。观众客户端接收到数据包后,进行解码提取出直播视频和合成位置信息。在本实施例中,合成位置信息包括目标特效礼物在当前视频帧图像中的目标轮廓点的坐标值。After the host client obtains the synthesized location information, it encodes the synthesized location information and the live video to form a data packet, which is sent to the viewer client. After the audience client receives the data packet, it decodes and extracts the live video and composite location information. In this embodiment, the synthesized position information includes the coordinate value of the target contour point of the target special effect present in the current video frame image.
观众客户端获取到合成位置信息后,结合当前观众客户端进行特效展示区域的大小对合成位置信息进行相对应的换算,根据换算后的合成位置信息确定目标特效礼物在当前视频帧图像上的目标位置,将目标特效礼物添加到目标位置上进行合成。After the viewer client obtains the composite location information, it will convert the composite location information according to the size of the special effect display area of the current viewer client, and determine the target of the target special effect gift on the current video frame image according to the converted composite location information Position, add the target special effect gift to the target position for synthesis.
例如,主播客户端识别到当前视频帧图像的分辨率大小为400*300,所得到的合成位置信息中目标轮廓点A的坐标值为(50,50),而观众客户端进行展示的同一当前视频帧图像的分辨率大小为800*600,相对应地对合成位置信息进行换算,得到当前目标轮廓点A’的坐标值为(100,100)。将目标特效礼物添加到经换算后的合成位置信息所确定的目标位置上进行合成。需要说明的是,同一当前视频帧图像是指视频帧图像的内容相同,其余特征如分辨率、图像尺寸等可以不同。For example, the host client recognizes that the resolution size of the current video frame image is 400*300, and the coordinate value of the target contour point A in the obtained composite position information is (50, 50), and the viewer client displays the same current The resolution size of the video frame image is 800*600, and the synthesized position information is converted correspondingly to obtain the coordinate value of the current target contour point A'(100, 100). The target special effect gift is added to the target position determined by the converted synthesis position information for synthesis. It should be noted that the same current video frame image means that the content of the video frame image is the same, and other features such as resolution and image size may be different.
在本实施例中,可以将直播视频的当前视频帧图像提取出来,在观众客户端将目标特效礼物添加到当前视频帧图像上合成特效帧图像,在预配置的特效展示区域进行效果展示,该特效展示区域可以独立于视频区域,以提高特效的展示效果。In this embodiment, the current video frame image of the live video can be extracted, the target special effect gift is added to the current video frame image on the viewer client to synthesize the special effect frame image, and the effect is displayed in the pre-configured special effect display area. The special effect display area can be independent of the video area to improve the display effect of the special effect.
本实施例提供的虚拟礼物特效的处理方法,应用于主播客户端,通过接收观众客户端发送的虚拟礼物的赠送指令,根据赠送指令获取对应的目标特效礼物并确定目标特效礼物的特征区域;根据特征区域确定目标特效礼物在直播视频上的合成位置信息;将直播视频以及合成位置信息发送至客户端,使得观众客户端根据合成位置信息将目标特效礼物添加到直播视频进行合成并进行展示。本方案将合成位置信息跟随直播视频一起发送至观众客户端。相对于主播客户端直接将目标特效礼物合成到直播视频,再发送至各观众客户端以在观众客户端的视频区域播放虚拟礼物特效,该实施例利用主播客户端在直播视频外将合成位置信息进行编码封装,使得合成位置信息独立于直播视频,跟随直播视频进行传输,以便于观众客户端根据合成位置信息结合观众客户端对虚拟特效礼物的效果展示进行二次编辑,从而有利于在观众客户端实现分层特效处理和跨直播视频播放区域的特效展示,提高特效展示的效果The method for processing virtual gift special effects provided in this embodiment is applied to an anchor client, by receiving a virtual gift giving instruction sent by the viewer client, obtaining the corresponding target special effect gift according to the giving instruction and determining the characteristic area of the target special effect gift; The characteristic area determines the combined location information of the target special effect gift on the live video; the live video and the combined location information are sent to the client, so that the viewer client adds the target special effect gift to the live video for synthesis and display according to the combined location information. In this solution, the synthesized location information is sent to the audience client along with the live video. Compared with the host client directly synthesizes the target special effect gift into the live video, and then sends it to each viewer client to play the virtual gift special effect in the video area of the viewer client, this embodiment uses the host client to synthesize location information outside the live video Encoding and encapsulation makes the synthesized location information independent of the live video, and is transmitted with the live video, so that the audience client can edit the effect of the virtual special effect gift according to the synthesized location information combined with the audience client, which is beneficial to the audience client Realize layered special effect processing and special effect display across the live video playback area to improve the effect of special effect display
为了使本技术方案更为清晰,更为便于理解,下面对本技术方案中的各个步骤的具体的实现过程和方式加以详细的描述。In order to make the technical solution clearer and easier to understand, the specific implementation process and manner of each step in the technical solution are described in detail below.
在一实施例中,步骤S110的根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域,可以包括以下步骤:In an embodiment, obtaining the corresponding target special effect gift according to the gift instruction in step S110 and determining the characteristic area of the target special effect gift may include the following steps:
S1101、获取目标特效礼物标识。S1101. Obtain a target special effect gift identifier.
在实施例中,不同的虚拟礼物具有唯一的标识,不同的虚拟礼物具有不同的展示形式,例如,根据虚拟礼物的类型,可以分为普通虚拟礼物和特殊虚拟礼物。若赠送的是普通虚拟礼物,则按照现有技术的礼物展示方法进行特效展示,若赠送的是特殊虚拟礼物,则按照本方案所提供的虚拟礼物特效的处理方法进行特效展示。In the embodiment, different virtual gifts have unique identifiers, and different virtual gifts have different display forms. For example, according to the types of virtual gifts, they can be divided into ordinary virtual gifts and special virtual gifts. If the gift is an ordinary virtual gift, the special effect display is performed according to the gift display method of the prior art; if the gift is a special virtual gift, the special effect display is performed according to the processing method of the virtual gift special effect provided by this solution.
在实施例中,获取目标特效礼物标识,根据该目标特效礼物标识判断是否为特殊虚拟礼物,若是,则执行步骤S1102。In the embodiment, the target special effect gift identifier is acquired, and it is determined whether it is a special virtual gift according to the target special effect gift identifier, and if so, step S1102 is executed.
S1102、根据所述目标特效礼物标识查找得到目标特效礼物,确定所述目标特效礼物所对应的特征区域。S1102. Find a target special effect gift according to the target special effect gift identifier, and determine the characteristic area corresponding to the target special effect gift.
在实施例中,不同的目标特效礼物所对应的特征区域不同,也即是,不同的目标特效礼物添加到直播视频中的位置不同。例如,“天使翅膀”添加到主播的背部,“帽子”添加到主播的头部等。In the embodiment, different target special effect gifts correspond to different feature regions, that is, different target special effect gifts are added to the live video at different positions. For example, "angel wings" is added to the anchor's back, "hat" is added to the anchor's head, etc.
服务器获取到目标特效礼物标识,从预配置的数据库中查找出与该目标特效礼物标识相对应的目标特效礼物及其特征区域。可选的,特征区域可以用某些设定的字符 来标识,比如,有字母A表示头部,字母B表示背部等。The server obtains the target special effect gift identifier, and finds the target special effect gift and its characteristic area corresponding to the target special effect gift identifier from the pre-configured database. Optionally, the characteristic area can be identified by certain set characters, for example, the letter A represents the head and the letter B represents the back.
在一实施例中,目标特效礼物标识、目标特效礼物以及特征区域可以建立关联关系,例如{0001,天使翅膀,A},其中,0001表示目标特效礼物标识,“天使翅膀”表示目标特效礼物的名称,A表示目标特效礼物的特征区域,如背部。进一步的,可以将关联关系通过数据结构的方式存储起来。In one embodiment, the target special effect gift identifier, the target special effect gift, and the characteristic area may establish an association relationship, such as {0001, angel wings, A}, where 0001 represents the target special effect gift identifier, and "angel wings" represents the target special effect gift. Name, A represents the characteristic area of the target special effect gift, such as the back. Further, the association relationship can be stored in the form of a data structure.
图4是一实施例提供的合成位置信息获取方法的流程图,如图4所示,在一实施例中,步骤S120的根据所述特征区域确定所述目标特效礼物在所述直播视频上的合成位置信息,可以包括以下步骤:FIG. 4 is a flowchart of a method for obtaining synthetic location information provided by an embodiment. As shown in FIG. 4, in an embodiment, in step S120, the target special effect gift on the live video is determined according to the characteristic region. Synthesizing location information may include the following steps:
S1201、获取所述直播视频的当前视频帧图像。S1201. Obtain a current video frame image of the live video.
其中,当前视频帧图像可以是一帧,也可以是多帧。Among them, the current video frame image may be one frame or multiple frames.
当接收观众客户端发送的虚拟礼物的赠送指令,主播客户端获取目标直播所在直播间的直播视频的一帧或多帧当前视频帧图像。在当前视频帧图像为多帧时,该多帧的当前视频帧图像可以为连接帧视频图像,也可以是隔帧视频图像。When receiving the virtual gift giving instruction sent by the viewer client, the host client obtains one or more current video frame images of the live video in the live broadcast room where the target live broadcast is located. When the current video frame image is multiple frames, the current video frame image of the multiple frames may be a connected frame video image or an alternate frame video image.
S1202、提取所述当前视频帧图像中的人物轮廓关键点。S1202, extract the key points of the outline of the person in the current video frame image.
在实施例中,主播客户端对当前视频帧图像进行预处理,如图像格式转换、滤波去燥、二值化处理等,提取经过预处理后的当前视频帧图像的人物轮廓,再根据轮廓通过算法运算得到人物轮廓关键点。一般而言,需要将当前视频帧图像转换为位图图像。位图是由像素(Pixel)组成的,像素是位图最小的信息单元,存储在图像栅格中,每个像素都具有特定的位置和颜色值,像素的位置可以根据图像的大小用坐标值(x,y)来表示。In the embodiment, the host client preprocesses the current video frame image, such as image format conversion, filtering and de-drying, binarization processing, etc., extracts the person profile of the current video frame image after preprocessing, and then passes it according to the profile. The algorithm calculates the key points of the character outline. Generally speaking, the current video frame image needs to be converted into a bitmap image. The bitmap is composed of pixels. Pixels are the smallest information units of the bitmap. They are stored in the image grid. Each pixel has a specific position and color value. The position of the pixel can be coordinated according to the size of the image. (x,y) to represent.
需要说明的是,当前视频帧图像的人物轮廓关键点的提取方式可以通过现有的工具和算法来实现,如OpenCV、HOG和OTSU算法等,当然还可以通过其他方式提取当前视频帧图像的人物轮廓关键点。It should be noted that the method of extracting the key points of the person's outline in the current video frame image can be achieved by existing tools and algorithms, such as OpenCV, HOG, and OTSU algorithms. Of course, the person in the current video frame image can also be extracted by other methods. Outline key points.
不同人物轮廓关键点的集合对应不同的人体信息。例如,识别出当前视频帧图像的人脸部位,提取人脸部位的轮廓关键点,在一实施例中,人脸信息可以包括106个轮廓关键点,每个轮廓关键点对应人脸的某一部位,每个轮廓关键点对应唯一的坐标值,表示该轮廓关键点在当前视频帧图像中的位置。同理,身体轮廓包括59个轮廓关键点,每个轮廓关键点对应人身体各部位的边缘轮廓,人体骨骼包括22个轮廓关键点,每个轮廓关键点对应人体骨骼关节点,每个轮廓关键点的坐标值表示在当前视 频帧图像中的位置。The collection of key points of different person outlines corresponds to different human body information. For example, the face part of the current video frame image is identified, and the contour key points of the face part are extracted. In one embodiment, the face information may include 106 contour key points, and each contour key point corresponds to the face For a certain part, each contour key point corresponds to a unique coordinate value, which indicates the position of the contour key point in the current video frame image. In the same way, the body contour includes 59 contour key points. Each contour key point corresponds to the edge contour of each part of the human body. The human skeleton includes 22 contour key points. Each contour key point corresponds to the joint point of the human bone. The coordinate value of the point indicates the position in the current video frame image.
S1203、根据所述人物轮廓关键点确定所述特征区域在所述当前视频帧图像上对应的目标位置,以在所述目标位置对所述目标特效礼物进行合成。S1203: Determine a target position corresponding to the characteristic region on the current video frame image according to the key points of the person contour, so as to synthesize the target special effect gift at the target position.
其中,目标特效礼物对应的特征区域与在当前视频帧图像的目标位置相对应。例如,目标特效礼物“天使翅膀”的特征区域为“背部”,从提取出来的人物轮廓关键点识别出属于“背部”特征的轮廓关键点,并确定为目标轮廓点,根据这些目标轮廓点在当前视频帧图像上的坐标值,确定目标特效礼物所在当前视频帧图像上进行合成的目标位置,其中,目标位置可以是目标轮廓点的坐标值的集合,也可以是目标轮廓点连线所形成的区域。Among them, the characteristic area corresponding to the target special effect gift corresponds to the target position in the current video frame image. For example, the characteristic area of the target special effect gift "angel wings" is "back". From the extracted key points of the contours of the characters, the key points of the contours belonging to the "back" feature are identified and determined as the target contour points. According to these target contour points, The coordinate value on the current video frame image determines the target position for synthesis on the current video frame image where the target special effect gift is located. The target position can be a collection of the coordinate values of the target contour points, or it can be formed by the connection of the target contour points Area.
在一实施例中,步骤S120的将所述直播视频以及所述合成位置信息发送至所述客户端,可以包括以下步骤:In an embodiment, the step S120 sending the live video and the synthesized location information to the client may include the following steps:
将所述直播视频和所述合成位置信息进行编码封装成直播视频流数据,并通过服务器将所述直播视频流数据转发至所述观众客户端。The live video and the synthesized location information are encoded and packaged into live video stream data, and the live video stream data is forwarded to the viewer client through a server.
在本实施例中,主播客户端将直播视频和根据目标特效礼物所识别出来的合成位置信息进行编码封装成数据包,形成直播视频流数据。主播客户端将直播视频流数据发送至服务器,以使得服务器将该直播视频流数据转发至观众客户端。In this embodiment, the host client encodes and encapsulates the live video and the synthesized location information identified according to the target special effect gift into a data packet to form live video stream data. The host client sends the live video stream data to the server, so that the server forwards the live video stream data to the viewer client.
观众客户端对直播视频流数据进行解码后得到合成位置信息,并根据合成位置信息对目标特效礼物进行处理。The viewer client decodes the live video stream data to obtain synthesized location information, and processes the target special effect gift according to the synthesized location information.
示例性一:图5是一实施例提供的一种虚拟礼物特效的合成方法的流程图,图5所示,观众客户端根据合成位置信息对目标特效礼物进行分层合成处理,其主要流程可如下:Exemplary one: Figure 5 is a flowchart of a method for synthesizing virtual gift special effects according to an embodiment. As shown in Figure 5, the audience client performs layered synthesis processing on the target special effect gift according to the synthetic location information. The main process can be as follows:
S110a、接收直播视频流数据和目标特效礼物,从所述直播视频流数据中获取直播视频和所述目标特效礼物的合成位置信息。S110a. Receive live video stream data and a target special effect gift, and obtain synthetic location information of the live video and the target special effect gift from the live video stream data.
其中,所述合成位置信息可以包括基于主播客户端对所述直播视频进行识别得到的目标特效礼物合成在所述直播视频上的目标位置。Wherein, the combined location information may include a target location on the live video that is synthesized on the live video based on the target special effect gift obtained by the host client recognizing the live video.
在实施例中,用户通过观众客户端向服务器发送虚拟礼物的赠送指令。主播客户端接收端服务器转发的赠送指令,获取直播视频和目标特效礼物所对应的特征区域。可选的,特征区域可以是主播客户端根据赠送指令进行识别得到的,也可以是服务器接收到赠送指令进行识别得到再转发给主播客户端。本实施例以主播客户端根据赠送 指令识别目标特效礼物所对应的特征区域为例进行说明。In the embodiment, the user sends a virtual gift giving instruction to the server through the audience client. The host client receives the gift instruction forwarded by the end server, and obtains the feature area corresponding to the live video and the target special effect gift. Optionally, the characteristic area may be recognized by the host client according to the gift instruction, or it may be obtained by the server after receiving the gift instruction and then forwarded to the host client. In this embodiment, the anchor client recognizes the characteristic area corresponding to the target special effect gift according to the gift instruction as an example for description.
观众客户端接收到直播视频流数据后进行解码,得到合成位置信息和直播视频,并从直播视频中获取当前视频帧图像。需要说明的是,主播客户端用于识别合成位置信息所对应的当前视频帧图像和观众客户端从直播视频中获取的当前视频帧图像是同一帧图像,其展示在主播客户端和观众客户端的分辨率、尺寸和颜色等可以不同。After the viewer client receives the live video stream data, decodes it to obtain the synthesized location information and the live video, and obtains the current video frame image from the live video. It should be noted that the host client is used to identify the current video frame image corresponding to the synthesized location information and the current video frame image obtained by the viewer client from the live video is the same frame image, which is displayed on the host client and the viewer client. Resolution, size, color, etc. can be different.
其中,目标特效礼物可以是二维显示形式的特效礼物,也可以是三维显示形式的特效礼物,即三维特效礼物。在本实施例中,该目标特效礼物优选为三维特效礼物,通过三维特效礼物营造出立体特效,增强现实感受,提高虚拟礼物特效的展示效果。Among them, the target special effect gift can be a special effect gift in a two-dimensional display form, or a special effect gift in a three-dimensional display form, that is, a three-dimensional special effect gift. In this embodiment, the target special effect gift is preferably a three-dimensional special effect gift, and the three-dimensional special effect gift is used to create a three-dimensional special effect to enhance the reality experience and improve the display effect of the virtual gift special effect.
S120a、将所述直播视频分割为前景图像层和背景图像层,并根据目标特效礼物生成至少一个虚拟礼物特效层。S120a: Divide the live video into a foreground image layer and a background image layer, and generate at least one virtual gift special effect layer according to the target special effect gift.
具体的,从直播视频中获取当前视频帧图像;将当前视频帧图像分割为前景区域和背景区域;其中,所述前景区域所在图层为前景图像层;所述背景区域所在图层为背景图像层。Specifically, the current video frame image is obtained from the live video; the current video frame image is divided into a foreground area and a background area; wherein the layer where the foreground area is located is the foreground image layer; the layer where the background area is located is the background image Floor.
在实施例中,观众客户端从直播视频中获取当前视频帧图像,其中,当前视频帧图像可以一帧视频帧图像,也可以是多帧视频帧图像。In the embodiment, the viewer client obtains the current video frame image from the live video, where the current video frame image may be one frame of video frame image or multiple frames of video frame image.
进一步的,对当前视频帧图像进行背景分割处理。可以利用现有算法对当前视频帧图像的各像素值进行对比,将当前视频帧图像分割为前景区域和背景区域,如将像素值大于某一阈值的像素点的集合所对应的区域作为前景区域,将像素值小于某一阈值的像素点的集合所对应的区域作为背景区域。在实施例中,前景区域和背景区域分别位于不同的图像层,其中,前景区域所在的图像层为前景图像层,背景区域所在的图像层为背景图像层。Further, background segmentation processing is performed on the current video frame image. The existing algorithm can be used to compare the pixel values of the current video frame image, and the current video frame image is divided into the foreground area and the background area. For example, the area corresponding to the set of pixel points with a pixel value greater than a certain threshold is used as the foreground area , The area corresponding to the set of pixel points whose pixel value is less than a certain threshold is regarded as the background area. In the embodiment, the foreground area and the background area are located in different image layers, where the image layer where the foreground area is located is the foreground image layer, and the image layer where the background area is located is the background image layer.
在一实施例中,前景图像层可以包括直播视频中的主播人物区域,背景图像层可以包括直播视频中除主播人物区域外的背景区域。另外,在实施例中,可以对目标特效礼物进行拆分,生成目标特效礼物所对应的一个或多个虚拟礼物特效层,例如,“面具”礼物只有一个虚拟礼物特效层,“雪花”礼物可以包括多个虚拟礼物特效层,如第一片雪花在虚拟礼物特效层A,第二片雪花在虚拟礼物特效层B,第三片和第四片雪花在虚拟礼物特效层C等。In an embodiment, the foreground image layer may include an anchor character area in the live video, and the background image layer may include a background area excluding the anchor character area in the live video. In addition, in the embodiment, the target special effect gift can be split to generate one or more virtual gift special effect layers corresponding to the target special effect gift. For example, the "mask" gift has only one virtual gift special effect layer, and the "snowflake" gift can It includes multiple virtual gift special effect layers, such as the first snowflake on the virtual gift special effect layer A, the second snowflake on the virtual gift special effect layer B, and the third and fourth snowflakes on the virtual gift special effect layer C.
观众客户端获取到当前视频帧图像的前景图像层、背景图像层以及目标特效礼物所对应的一个或多个虚拟礼物特效层。可选的,可以将其进行相应的处理并缓存起来。The viewer client obtains the foreground image layer, background image layer, and one or more virtual gift special effect layers corresponding to the target special effect gift of the current video frame image. Optionally, it can be processed and cached accordingly.
S130a、根据所述合成位置信息将各所述虚拟礼物特效层与所述前景图像层和背景图像层按照顺序进行合成并展示。S130a: According to the synthesis position information, each of the virtual gift special effect layers, the foreground image layer and the background image layer are synthesized and displayed in sequence.
示例性的,合成位置信息包括人物轮廓关键点的位置A(50,50),B(55,60),C(70,100),各图层包括前景图像层a、背景图像层b、虚拟礼物特效层c、虚拟礼物特效层d和虚拟礼物特效层e,各图层的合成顺序为b、c、a、d和e,且c对应A的位置,d对应B的位置,e对应C的位置。Exemplarily, the synthesized position information includes the positions A (50, 50), B (55, 60), C (70, 100) of the key points of the character outline, and each layer includes a foreground image layer a, a background image layer b, and virtual gift special effects. Layer c, virtual gift special effect layer d and virtual gift special effect layer e. The composition order of each layer is b, c, a, d and e, and c corresponds to the position of A, d corresponds to the position of B, and e corresponds to the position of C .
首先,将背景图像层b设置于底层,随后根据A位置将虚拟礼物特效层c与前景图像层a进行合成,接着根据B位置将虚拟礼物特效层d进行合成,最后根据C位置将虚拟礼物特效层e进行合成,以使得目标特效礼物中各部分均添加在当前视频帧图像所对应的目标位置上后,对合成目标特效礼物的当前视频帧图像进行展示。First, set the background image layer b on the bottom layer, then synthesize the virtual gift special effect layer c with the foreground image layer a according to the position A, then synthesize the virtual gift special effect layer d according to the position B, and finally combine the virtual gift special effect according to the position C Layer e is synthesized so that each part of the target special effect gift is added to the target position corresponding to the current video frame image, and then the current video frame image of the synthesized target special effect gift is displayed.
如图6所示,图6是一种直播技术中虚拟礼物的合成效果图,在该技术中,尤其是在大特效礼物展示过程中,虚拟礼物直接添加到直播视频上,使得虚拟礼物和直播视频画面重叠,遮挡主播人物,影响用户观看;而采用本申请的技术后,可以避免遮挡主播人物,可以得到更好的特效展示效果。As shown in Figure 6, Figure 6 is a composite rendering of a virtual gift in a live broadcast technology. In this technology, especially in the process of displaying large special effects gifts, the virtual gift is directly added to the live video, so that the virtual gift and the live broadcast are directly added to the live video. The video images overlap and obscure the anchor characters and affect the user's viewing; and the technology of this application can avoid obstructing the anchor characters, and a better special effect display effect can be obtained.
图7是一实施例提供的虚拟礼物合成的效果图,如图7所示,根据主播的人体背部轮廓信息,将主播人物所在前景图像层设置在“天使翅膀”所在特效层的上面,遮挡“天使翅膀”的设定区域,达到将“天使翅膀”添加到主播人物的背部的效果,根据主播的脸部轮廓信息,将“面具”所在特效层设置在主播人物所在前景图像层之上,遮挡主播人物的脸部设定区域,达到将“面具”添加到主播人物眼睛上的效果,使得目标特效礼物能够根据人体轮廓特征合成到直播视频的当前视频帧图像的目标位置,得到更好的特效展示效果。Figure 7 is an effect diagram of virtual gift synthesis provided by an embodiment. As shown in Figure 7, the foreground image layer where the host character is located is set on the special effect layer where the "angel wings" is located according to the human back contour information of the host, and the "angel wings" is blocked. The setting area of “Angel Wings” achieves the effect of adding “Angel Wings” to the anchor character’s back. According to the anchor’s facial profile information, the special effect layer of the “mask” is set on the foreground image layer of the anchor character to block The face setting area of the host character achieves the effect of adding a "mask" to the eyes of the host character, so that the target special effect gift can be synthesized into the target position of the current video frame image of the live video according to the human contour characteristics, and better special effects are obtained Display of results.
本实施例提供的虚拟礼物特效的合成方法,通过接收直播视频流数据和目标特效礼物,从直播视频流数据中获取直播视频和目标特效礼物的合成位置信息;将直播视频分割为前景图像层和背景图像层,并根据目标特效礼物生成至少一个虚拟礼物特效层;根据合成位置信息将各虚拟礼物特效层与前景图像层和背景图像层按照顺序进行合成并展示。本实施例中观众客户端根据合成位置信息,将目标特效礼物所对应的至少一个虚拟礼物特效层和当前视频帧图像的前景图像层以及背景图像层按照顺序进行合成并展示,实现了根据人物轮廓等所得到的合成位置信息将目标特效礼物合成到当前视频帧图像的既定的目标位置上,避免了目标特效礼物直接显示在视频区域遮挡 主播人物而影响直播效果,同时还提高了虚拟礼物特效的展示效果。In the method for synthesizing virtual gift special effects provided in this embodiment, by receiving live video stream data and target special effect gifts, the combined position information of the live video and target special effect gifts is obtained from the live video stream data; the live video is divided into foreground image layers and The background image layer, and at least one virtual gift special effect layer is generated according to the target special effect gift; the virtual gift special effect layer, the foreground image layer and the background image layer are synthesized and displayed in sequence according to the synthesis position information. In this embodiment, the audience client combines and displays the at least one virtual gift special effect layer corresponding to the target special effect gift and the foreground image layer and background image layer of the current video frame image in order according to the synthetic location information, thereby realizing the realization of the figure according to the profile. The obtained synthetic location information synthesizes the target special effect gift to the established target position of the current video frame image, avoiding the target special effect gift being directly displayed in the video area and obstructing the anchor character and affecting the live broadcast effect. At the same time, it also improves the virtual gift special effect. Display of results.
示例性二:图8是一实施例提供的一种虚拟礼物特效的渲染方法的流程图,图8所示,观众客户端根据合成位置信息对目标特效礼物进行跨直播视频播放区域渲染,其主要流程可如下:Example 2: FIG. 8 is a flowchart of a method for rendering virtual gift special effects according to an embodiment. As shown in FIG. 8, the audience client renders the target special effect gift across the live video playback area according to the synthesized location information. The process can be as follows:
具体的,如图8所示,该虚拟礼物特效的渲染方法可以包括以下步骤:Specifically, as shown in FIG. 8, the rendering method of the virtual gift special effect may include the following steps:
S110b、接收直播视频流数据和目标特效礼物,从所述直播视频流数据中获取直播视频和所述目标特效礼物的合成位置信息。S110b. Receive live video stream data and a target special effect gift, and obtain combined location information of the live video and the target special effect gift from the live video stream data.
其中,本实施例中的目标特效礼物可以是三维显示形式的特效礼物,即三维特效礼物(AI(Artificial Intelligence)虚拟特效礼物)。通过三维特效礼物营造出立体特效,增强现实感受,提高虚拟礼物特效的渲染效果。The target special effect gift in this embodiment may be a special effect gift in a three-dimensional display form, that is, a three-dimensional special effect gift (AI (Artificial Intelligence) virtual special effect gift). Create three-dimensional special effects through three-dimensional special effects gifts, enhance the feeling of reality, and improve the rendering effect of virtual gift special effects.
本步骤与步骤S110a相同,在此不再详细叙述。This step is the same as step S110a, and will not be described in detail here.
S120b、根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成,得到特效帧图像。S120b: Add the target special effect gift to the live video for synthesis according to the synthesis position information to obtain a special effect frame image.
观众客户端获取到合成位置信息,根据合成位置信息确定目标特效礼物在直播视频的当前视频帧图像的目标位置,将目标特效礼物添加到该目标位置上与当前视频帧图像进行合成,得到特效帧图像。其中,当前视频帧图像可以是一帧视频帧图像,也可以是多帧视频帧图像。The audience client obtains the composite position information, determines the target position of the target special effect gift in the current video frame image of the live video according to the composite position information, adds the target special effect gift to the target position and synthesizes the current video frame image to obtain the special effect frame image. Among them, the current video frame image may be one frame of video frame image or multiple frames of video frame image.
在实施例中,当前视频帧图像可以分割为前景图像层和背景图像层,目标特效礼物可以包括一个或多个虚拟礼物特效层,在实施例中,可以对目标特效礼物进行拆分,生成目标特效礼物所对应的一个或多个虚拟礼物特效层,根据合成位置信息确定每个虚拟礼物特效层在前景图像层或背景图像层上的目标位置,将各虚拟礼物特效层、前景图像层和背景图像层进行合成,得到特效帧图像。In an embodiment, the current video frame image can be divided into a foreground image layer and a background image layer, and the target special effect gift can include one or more virtual gift special effect layers. In the embodiment, the target special effect gift can be split to generate the target One or more virtual gift special effect layers corresponding to the special effect gift, determine the target position of each virtual gift special effect layer on the foreground image layer or the background image layer according to the synthesis position information, and combine the virtual gift special effect layer, foreground image layer and background The image layer is synthesized to obtain the special effect frame image.
在一实施例中,根据合成位置信息将各所述虚拟礼物特效层与所述前景图像层和背景图像层按照优先级顺序进行合成并展示。In an embodiment, each of the virtual gift special effect layers, the foreground image layer and the background image layer are synthesized and displayed in a priority order according to the synthesis position information.
S130b、在直播窗口上设置展示特效展示区域,在播放所述直播视频的过程中,在所述特效展示区域同步渲染所述特效帧图像。S130b: Set a special effect display area on the live window, and render the special effect frame image synchronously in the special effect display area during the process of playing the live video.
直播窗口是指直播应用处于开启状态下对应的窗口,处于最大化状态是可以占据整个终端设备屏幕。在本实施例中,在直播窗口上设置特效展示区域,特效展示区域设置于直播视频播放区域之上,特效展示区域大于直播视频播放区域,使得目标特效 礼物所对应的特效能够能放大渲染出来,提高特效展示的效果。其中,直播视频播放区域是指用于播放直播视频的区域。The live broadcast window refers to the corresponding window when the live broadcast application is in the open state, and in the maximized state, it can occupy the entire terminal device screen. In this embodiment, a special effect display area is set on the live window, the special effect display area is set above the live video playback area, and the special effect display area is larger than the live video playback area, so that the special effect corresponding to the target special effect gift can be magnified and rendered. Improve the effect of special effects display. Among them, the live video playing area refers to an area used to play the live video.
观众客户端获取到合成位置信息后,结合当前观众客户端进行特效展示区域的大小对合成位置信息进行相对应的换算,根据换算后的合成位置信息确定目标特效礼物在当前视频帧图像上的目标位置,将目标特效礼物添加到目标位置上进行合成。After the viewer client obtains the composite location information, it will convert the composite location information according to the size of the special effect display area of the current viewer client, and determine the target of the target special effect gift on the current video frame image according to the converted composite location information Position, add the target special effect gift to the target position for synthesis.
例如,主播客户端识别到当前视频帧图像的分辨率大小为400*300,所得到的合成位置信息中目标轮廓点A的坐标值为(50,50),而观众客户端进行展示的同一当前视频帧图像的分辨率大小为800*600,相对应地对合成位置信息进行换算,得到当前目标轮廓点A’的坐标值为(100,100)。将目标特效礼物添加到经换算后的合成位置信息所确定的目标位置上进行合成。需要说明的是,同一当前视频帧图像是指视频帧图像的内容相同,其余特征如分辨率、图像尺寸等可以不同。For example, the host client recognizes that the resolution size of the current video frame image is 400*300, and the coordinate value of the target contour point A in the obtained composite position information is (50, 50), and the viewer client displays the same current The resolution size of the video frame image is 800*600, and the synthesized position information is converted correspondingly to obtain the coordinate value of the current target contour point A'(100, 100). The target special effect gift is added to the target position determined by the converted synthesis position information for synthesis. It should be noted that the same current video frame image means that the content of the video frame image is the same, and other features such as resolution and image size may be different.
在本实施例中,图像帧图像的特效展示和直播视频播放占用不同的线程,以使得其中一线程在播放直播视频过程中,另一线程能够将特效帧图像同步渲染到特效展示区域,以达到视频播放和特效展示同步进行,提高了特效的展示效果。In this embodiment, the special effect display of the image frame image and the live video playback occupy different threads, so that while one of the threads is playing the live video, the other thread can simultaneously render the special effect frame images to the special effect display area to achieve Video playback and special effects display are carried out simultaneously, which improves the display effect of special effects.
需要说明的是,将特效礼物所对应的特效层中被主播人物遮挡的区域透明化,以使得跨直播视频播放区域的特效展示而不影响直播视频播放区域正常的视频播放。It should be noted that the area of the special effect layer corresponding to the special effect gift that is blocked by the host character is made transparent, so that the display of special effects across the live video playback area does not affect the normal video playback of the live video playback area.
如图9所示,图9是一种直播技术中虚拟礼物的渲染效果图,在该技术中,尤其是在AR(Augmented Reality,增强现实)虚拟特效礼物展示过程中,AR虚拟礼物只能现实在直播视频播放区域,展示效果不佳;而采用本申请的技术后,可以跨直播视频播放区域展示,可以得到更好的特效展示效果。As shown in Figure 9, Figure 9 is a rendering of a virtual gift in a live broadcast technology. In this technology, especially in the process of AR (Augmented Reality) virtual special effects gift display, AR virtual gifts can only be realistic In the live video playback area, the display effect is not good; however, after adopting the technology of this application, it can be displayed across the live video playback area, and a better special effect display effect can be obtained.
继续参考图7,如图7所示,在直播视频播放区域设置特效展示区域,在特效展示区域的面积大于直播视频播放区域,虚拟礼物特效渲染到特效展示区域,以使得虚拟礼物特效能够跨直播视频区域进行展示,如图7所示中的虚拟特效礼物中的“天使翅膀”,得到更好的特效展示效果。Continuing to refer to Figure 7, as shown in Figure 7, the special effect display area is set in the live video playback area. The area of the special effect display area is larger than the live video playback area. The virtual gift special effect is rendered to the special effect display area, so that the virtual gift special effect can be broadcast live The video area is displayed, such as the "angel wings" in the virtual special effects gift shown in Figure 7, to get a better special effect display effect.
本实施例提供的虚拟礼物特效的渲染方法,通过接收直播视频流数据和目标特效礼物,从直播视频流数据中获取直播视频和目标特效礼物的合成位置信息;其中,合成位置信息包括基于主播客户端对直播视频进行识别得到的目标特效礼物合成在直播视频上的目标位置;根据合成位置信息将目标特效礼物添加到直播视频进行合成,得到特效帧图像;在直播窗口上设置展示特效展示区域,在播放直播视频的过程中, 在特效展示区域同步渲染特效帧图像,以使得虚拟礼物特效并非仅局限于客户端的直播视频播放区域,能够跨视频播放区域进行渲染和展示。The virtual gift special effect rendering method provided in this embodiment obtains the combined location information of the live video and the target special effect gift from the live video stream data by receiving the live video stream data and the target special effect gift; wherein the combined location information includes information based on the host client The target special effect gift obtained by recognizing the live video is synthesized on the target position of the live video; according to the synthesized position information, the target special effect gift is added to the live video for synthesis to obtain the special effect frame image; the special effect display area is set on the live broadcast window, In the process of playing the live video, the special effect frame images are synchronously rendered in the special effect display area, so that the virtual gift special effect is not limited to the live video play area of the client, and can be rendered and displayed across the video play area.
图10是一实施例提供的虚拟礼物特效的处理方法的另一流程图,该虚拟礼物特效的处理方法应用于服务端,可以由服务器来执行。FIG. 10 is another flowchart of a method for processing virtual gift special effects according to an embodiment. The method for processing virtual gift special effects is applied to the server and can be executed by the server.
具体的,如图10所示,虚拟礼物特效的处理方法包括以下步骤:Specifically, as shown in FIG. 10, the method for processing virtual gift special effects includes the following steps:
S410、向主播客户端发送虚拟礼物的赠送指令。S410: Send a virtual gift giving instruction to the anchor client.
其中,所述主播客户端根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域,根据所述特征区域确定所述目标特效礼物在所述直播视频上的合成位置信息。Wherein, the host client obtains the corresponding target special effect gift according to the gift instruction and determines the characteristic area of the target special effect gift, and determines the synthesized position information of the target special effect gift on the live video according to the characteristic area .
观众在观看直播视频过程中,向目标主播赠送虚拟礼物,通过在观众客户端触发相关功能按键选择目标特效礼物,以使得观众客户端向服务器发出虚拟礼物的赠送指令,服务器接收到该赠送指令转发至主播客户端,其中,该虚拟礼物的赠送请求携带有目标特效礼物标识和目标主播标识等信息。While watching the live video, the viewer presents a virtual gift to the target anchor, and selects the target special effect gift by triggering the relevant function button on the viewer client, so that the viewer client sends a virtual gift gift instruction to the server, and the server receives the gift instruction and forwards it To the host client, the gift request of the virtual gift carries information such as the target special effect gift identifier and the target host identifier.
服务器将观众客户端发送的虚拟礼物的赠送指令转发给主播客户端后,根据获取到的目标特效礼物标识确定相对应的目标特效礼物及其对应的特征区域,同时获取直播视频中当前视频帧图像,对当前视频帧图像进行识别,得到该目标特效礼物的特征区域在当前视频帧图像所对应目标轮廓点,得到合成位置信息。After the server forwards the virtual gift giving instruction sent by the viewer client to the anchor client, it determines the corresponding target special effect gift and its corresponding characteristic area according to the obtained target special effect gift identifier, and at the same time obtains the current video frame image in the live video , The current video frame image is recognized, and the characteristic area of the target special effect gift is obtained at the target contour point corresponding to the current video frame image, and the synthesized position information is obtained.
S420、接收主播客户端发送的直播视频流数据。S420: Receive live video stream data sent by the host client.
其中,所述直播视频流数据中包括直播视频和目标特效礼物的合成位置信息。Wherein, the live video stream data includes the combined location information of the live video and the target special effect gift.
主播客户端将合成位置信息和直播视频进行编码,形成直播视频流数据,以使得合成位置信息独立跟随直播视频进行传输。在实施例中,服务器接收通过主播客户端按照设定的通信协议进行传输得到的直播视频流数据。The host client encodes the synthesized location information and the live video to form live video stream data, so that the synthesized location information is transmitted independently following the live video. In the embodiment, the server receives the live video stream data obtained by the host client for transmission according to the set communication protocol.
S430、将所述直播视频流数据转发至观众客户端;其中,所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。S430. Forward the live video stream data to a viewer client; wherein, the viewer client adds the target special effect gift to the live video according to the combined location information, combines and displays it.
服务器接收到主播客户端发送的直播视频流后转发至处于同一直播间的各观众客户端,以使得观众客户端解码直播视频流数据得到合成位置信息,并根据该合成位置信息将目标特效礼物添加到直播视频上目标位置上进行合成,并对合成后的目标特效礼物进行展示。The server receives the live video stream sent by the host client and forwards it to each viewer client in the same live room, so that the viewer client decodes the live video stream data to obtain synthesized location information, and adds the target special effect gift according to the synthesized location information Go to the target location on the live video to synthesize, and display the synthesized target special effect gift.
本实施例提供的虚拟礼物特效的处理方法,应用于服务端,通过向主播客户端发 送虚拟礼物赠送指令;其中,主播客户端根据赠送指令获取对应的目标特效礼物并确定目标特效礼物的特征区域,根据特征区域确定目标特效礼物在直播视频上的合成位置信息;接收主播客户端发送的直播视频流数据;其中,直播视频流数据中包括直播视频和目标特效礼物的合成位置信息;将直播视频流数据转发至观众客户端;其中,观众客户端根据合成位置信息将目标特效礼物添加到直播视频进行合成并进行展示。本方案通过服务器将合成位置信息跟随直播视频一起发送至观众客户端,使得合成位置信息独立于直播视频,跟随直播视频进行传输,以便于观众客户端根据合成位置信息结合观众客户端对虚拟特效礼物的效果展示进行二次编辑,从而有利于在观众客户端实现分层特效处理和跨直播视频播放区域的特效展示,提高特效展示的效果。The method for processing virtual gift special effects provided in this embodiment is applied to the server by sending a virtual gift gift instruction to the host client; wherein the host client obtains the corresponding target special effect gift according to the gift instruction and determines the characteristic area of the target special effect gift , Determine the combined location information of the target special effect gift on the live video according to the characteristic area; receive the live video stream data sent by the host client; where the live video stream data includes the combined location information of the live video and the target special effect gift; convert the live video The streaming data is forwarded to the audience client; among them, the audience client adds the target special effect gift to the live video for synthesis and display according to the synthesis location information. This solution sends the synthesized location information along with the live video to the audience client through the server, so that the synthesized location information is independent of the live video and is transmitted following the live video, so that the audience client can combine the synthesized location information with the audience client to present virtual special effects The effect of the display is re-edited, which is conducive to the realization of layered special effect processing and special effect display across the live video playback area on the audience client, thereby improving the effect of special effect display.
为了更清楚地阐释本申请的技术方案,将结合若干场景下的示例,进一步进行说明。In order to explain the technical solution of the present application more clearly, a further description will be given in conjunction with examples in several scenarios.
场景一:参考图11,图11是一实施例提供的虚拟礼物赠送过程的时序图;该示例中,观众向主播赠送三维特效礼物“天使翅膀”,对应标识为ID1648,则其主要流程可以如下:Scenario 1: Refer to Figure 11, which is a timing diagram of the virtual gift giving process provided by an embodiment; in this example, the viewer presents the anchor with a three-dimensional special effect gift "angel wings", the corresponding identification is ID1648, then the main process can be as follows :
S11、观众客户端发出送礼请求到服务器。S11. The audience client sends a gift-giving request to the server.
观众用户W通过观众客户端发出送礼请求到服务器,其中,虚拟礼物为ID1648。The audience user W sends a gift-giving request to the server through the audience client, where the virtual gift is ID1648.
S12、服务器进行业务处理。S12. The server performs business processing.
服务器收到送礼请求后,做相应的业务处理(如扣费等)。After the server receives the gift-giving request, it will do the corresponding business processing (such as deduction, etc.).
S13、服务器广播送礼信息。S13. The server broadcasts gift-giving information.
将观众用户W向主播赠送ID1648礼物的送礼信息广播到频道内的所有用户,包括主播客户端和观众客户端。Broadcast the gift-giving information that the viewer user W presents the ID1648 gift to the host to all users in the channel, including the host client and the viewer client.
S14、主播客户端收到送礼信息后,查询该虚拟礼物,识别合成位置信息。S14. After receiving the gift-giving information, the host client queries the virtual gift to identify the synthesized location information.
主播客户端收到送礼信息的广播后,根据虚拟礼物ID1648,查询礼物配置得到该虚拟礼物为三维特效礼物(如AI(Artificial Intelligence)礼物),需要识别的合成位置信息包括人脸和背部,则主播客户端启动进行人脸识别和背景分割识别。After the host client receives the broadcast of the gift information, it queries the gift configuration according to the virtual gift ID 1648 and obtains that the virtual gift is a three-dimensional special effect gift (such as an AI (Artificial Intelligence) gift). The synthetic location information that needs to be recognized includes the face and back. The host client starts to perform face recognition and background segmentation recognition.
S15、主播客户端将合成位置信息打包到直播视频流进行传输。S15. The host client packs the synthesized location information into the live video stream for transmission.
主播客户端将人脸识别和背景分割识别所得到的合成位置信息(可以为AI信息)打包到直播视频流中,通过直播视频流跟随直播视频一起传输到服务器。The host client packs the synthesized location information (which can be AI information) obtained by face recognition and background segmentation recognition into a live video stream, and transmits the live video together with the live video to the server through the live video stream.
S16、服务器转发该直播视频流。S16. The server forwards the live video stream.
服务器将包含有合成位置信息的直播视频流传输至观众客户端。The server transmits the live video stream containing the synthesized location information to the audience client.
S17、观众客户端获取合成位置信息,进行虚拟礼物合成并展示。S17. The audience client obtains the synthesized location information, and performs virtual gift synthesis and display.
观众客户端从直播视频流中解码得到合成位置信息,将合成位置信息与虚拟礼物相结合,播放出天使翅膀特效:主播背后生长书天使翅膀。The audience client decodes the synthesized location information from the live video stream, combines the synthesized location information with the virtual gift, and plays the special effect of angel wings: the angel wings grow behind the anchor.
场景二:观众向主播赠送三维特效礼物“宠物小鸟”,对应标识为ID1649,则其主要流程可以如下:Scenario 2: The audience presents a three-dimensional special effects gift "pet bird" to the anchor, and the corresponding identification is ID1649, then the main process can be as follows:
S21、观众客户端发出送礼请求到服务器。S21. The audience client sends a gift-giving request to the server.
观众用户Q通过观众客户端发出送礼请求到服务器,其中,虚拟礼物为ID1649。The audience user Q sends a gift-giving request to the server through the audience client, where the virtual gift is ID1649.
S22、服务器进行业务处理;S22. The server performs business processing;
服务器收到送礼请求后,做相应的业务处理(如扣费等)。After the server receives the gift-giving request, it does the corresponding business processing (such as deduction, etc.).
S23、服务器广播送礼信息。S23. The server broadcasts gift-giving information.
将观众用户Q向主播赠送ID1649礼物的送礼信息广播到频道内的所有用户,包括主播客户端和观众客户端。Broadcast the gift-giving message that the viewer user Q presents ID1649 gifts to the anchor to all users in the channel, including the anchor client and the audience client.
S24、主播客户端收到送礼信息后,查询该虚拟礼物,识别合成位置信息。S24. After receiving the gift-giving information, the host client queries the virtual gift to identify the synthesized location information.
主播客户端收到送礼信息的广播后,根据虚拟礼物ID1649,查询礼物配置得到该虚拟礼物为三维特效礼物(如AI(Artificial Intelligence)礼物),需要识别的合成位置信息包括人脸和人体轮廓,则主播客户端启动进行人脸识别和人体轮廓识别。After receiving the broadcast of the gift information, the host client queries the gift configuration according to the virtual gift ID 1649 and obtains that the virtual gift is a three-dimensional special effect gift (such as an AI (Artificial Intelligence) gift). The synthetic location information that needs to be recognized includes the face and the outline of the human body. Then the host client starts to perform face recognition and human contour recognition.
S25、主播客户端将合成位置信息打包到直播视频流进行传输。S25. The host client packs the synthesized location information into the live video stream for transmission.
主播客户端将人脸识别和人体轮廓识别所得到的合成位置信息(可以为AI信息)打包到直播视频流中,通过直播视频流跟随直播视频一起传输到服务器。The host client packs the synthesized location information (which can be AI information) obtained by face recognition and human contour recognition into a live video stream, and transmits the live video together with the live video to the server through the live video stream.
S26、服务器转发该直播视频流。S26. The server forwards the live video stream.
服务器将包含有合成位置信息的直播视频流传输至观众客户端。The server transmits the live video stream containing the synthesized location information to the audience client.
S27、观众客户端获取合成位置信息,进行虚拟礼物合成并展示。S27. The audience client obtains the synthesized location information, and performs virtual gift synthesis and display.
观众客户端从直播视频流中解码得到合成位置信息,将合成位置信息与虚拟礼物相结合,播放出“宠物小鸟”特效:小鸟从视频外区域飞到主播肩膀上。The viewer client decodes the synthesized location information from the live video stream, combines the synthesized location information with the virtual gift, and plays the special effect of "pet bird": the bird flies over the shoulder of the anchor from the area outside the video.
以上示例仅用于辅助阐述本申请技术方案,其涉及的图示内容及具体流程不构成对本申请技术方案的使用场景的限定。The above examples are only used to assist in explaining the technical solutions of the present application, and the illustrated content and specific processes involved therein do not constitute a limitation on the use scenarios of the technical solutions of the present application.
下面对虚拟礼物特效的处理装置的相关实施例进行详细阐述。The following describes in detail related embodiments of the device for processing virtual gift special effects.
图12是一实施例提供的虚拟礼物特效的处理装置的结构示意图,如图12所示, 该虚拟礼物特效的处理装置100可以包括:特征获取模块110、信息确定模块120和信息发送模块130。FIG. 12 is a schematic structural diagram of an apparatus for processing virtual gift special effects provided by an embodiment. As shown in FIG. 12, the apparatus 100 for processing virtual gift special effects may include: a feature acquisition module 110, an information determination module 120, and an information sending module 130.
其中,特征获取模块110,用于接收虚拟礼物的赠送指令,根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域;Wherein, the feature obtaining module 110 is configured to receive a gift instruction of a virtual gift, obtain a corresponding target special effect gift according to the gift instruction, and determine a characteristic area of the target special effect gift;
信息确定模块120,用于根据所述特征区域确定所述目标特效礼物在所述直播视频上的合成位置信息;The information determining module 120 is configured to determine the synthesized location information of the target special effect gift on the live video according to the characteristic area;
信息发送模块130,用于将所述直播视频以及所述合成位置信息发送至观众客户端,使得所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The information sending module 130 is configured to send the live video and the synthesized location information to the audience client, so that the audience client adds the target special effect gift to the live video for synthesis according to the synthesized location information And show it.
本实施例提供的虚拟礼物特效的处理装置,应用于主播客户端,通过特征获取模块110接收观众客户端发送的虚拟礼物的赠送指令,根据赠送指令获取对应的目标特效礼物并确定目标特效礼物的特征区域;信息确定模块120根据特征区域确定目标特效礼物在直播视频上的合成位置信息;信息发送模块130将直播视频以及合成位置信息发送至客户端,使得观众客户端根据合成位置信息将目标特效礼物添加到直播视频进行合成并进行展示。本方案将合成位置信息跟随直播视频一起发送至观众客户端。相对于主播客户端直接将目标特效礼物合成到直播视频,再发送至各观众客户端以在观众客户端的视频区域播放虚拟礼物特效,该实施例利用主播客户端在直播视频外将合成位置信息进行编码封装,使得合成位置信息独立于直播视频,跟随直播视频进行传输,以便于观众客户端根据合成位置信息结合观众客户端对虚拟特效礼物的效果展示进行二次编辑,从而有利于在观众客户端实现分层特效处理和跨直播视频播放区域的特效展示,提高特效展示的效果。The device for processing virtual gift special effects provided in this embodiment is applied to a host client, and the feature acquisition module 110 receives a virtual gift giving instruction sent by the viewer client, obtains the corresponding target special effect gift according to the gift instruction, and determines the target special effect gift. Feature area; the information determining module 120 determines the composite location information of the target special effect gift on the live video according to the feature area; the information sending module 130 sends the live video and the composite location information to the client, so that the audience client can perform the target special effect according to the composite location information The gift is added to the live video for synthesis and display. In this solution, the synthesized location information is sent to the audience client along with the live video. Compared with the host client directly synthesizes the target special effect gift into the live video, and then sends it to each viewer client to play the virtual gift special effect in the video area of the viewer client, this embodiment uses the host client to synthesize location information outside the live video Encoding and encapsulation makes the synthesized location information independent of the live video, and is transmitted with the live video, so that the audience client can edit the effect of the virtual special effect gift according to the synthesized location information combined with the audience client, which is beneficial to the audience client Realize layered special effect processing and special effect display across the live video playback area to improve the effect of special effect display.
在一实施例中,特征获取模块110包括:标识获取单元和特征确定单元;In an embodiment, the feature acquisition module 110 includes: an identification acquisition unit and a feature determination unit;
其中,标识获取单元,用于获取目标特效礼物标识;特征确定单元,用于根据所述目标特效礼物标识查找得到目标特效礼物,确定所述目标特效礼物所对应的特征区域。Wherein, the identification acquisition unit is used to acquire the target special effect gift identification; the feature determination unit is used to search for the target special effect gift according to the target special effect gift identification, and determine the characteristic area corresponding to the target special effect gift.
在一实施例中,信息确定模块120包括:帧图像获取单元、关键点提取单元以及目标位置确定单元;In an embodiment, the information determination module 120 includes: a frame image acquisition unit, a key point extraction unit, and a target position determination unit;
其中,帧图像获取单元,用于获取所述直播视频的当前视频帧图像;关键点提取单元,用于提取所述当前视频帧图像中的人物轮廓关键点;目标位置确定单元,用于 根据所述人物轮廓关键点确定所述特征区域在所述当前视频帧图像上对应的目标位置,以在所述目标位置对所述目标特效礼物进行合成。Among them, the frame image acquisition unit is used to obtain the current video frame image of the live video; the key point extraction unit is used to extract the key points of the outline of the person in the current video frame image; the target position determining unit is used to obtain the current video frame image of the live video; The key points of the outline of the person determine the target position corresponding to the characteristic area on the current video frame image, so as to synthesize the target special effect gift at the target position.
在一实施例中,信息发送模块120用于将所述直播视频和所述合成位置信息进行编码封装成直播视频流数据,并通过服务器将所述直播视频流数据转发至所述观众客户端。In an embodiment, the information sending module 120 is configured to encode and encapsulate the live video and the synthesized location information into live video stream data, and forward the live video stream data to the viewer client through the server.
在一实施例中,所述目标特效礼物为三维显示形式的特效礼物。In one embodiment, the target special effect gift is a special effect gift in the form of a three-dimensional display.
在一实施例中,所述合成位置信息包括:人脸信息、人体轮廓信息、手势信息和人体骨骼信息中的至少一者。In an embodiment, the synthesized position information includes at least one of face information, human contour information, gesture information, and human bone information.
图13是一实施例提供的虚拟礼物特效的处理装置的另一结构示意图,本实施例中的虚拟礼物特效的处理装置应用于服务端,如服务器,如图13所示,虚拟礼物特效的处理装置400包括:指令发送模块410、数据接收模块420以及数据转发模块430。FIG. 13 is another schematic structural diagram of a device for processing virtual gift special effects provided by an embodiment. The device for processing virtual gift special effects in this embodiment is applied to a server, such as a server. As shown in FIG. 13, the processing device for virtual gift special effects The device 400 includes: an instruction sending module 410, a data receiving module 420, and a data forwarding module 430.
其中,指令发送模块410,用于向主播客户端发送虚拟礼物的赠送指令;其中,所述主播客户端根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域,根据所述特征区域确定所述目标特效礼物在所述直播视频上的合成位置信息;Wherein, the instruction sending module 410 is configured to send a virtual gift giving instruction to the host client; wherein, the host client obtains the corresponding target special effect gift according to the donation instruction and determines the characteristic area of the target special effect gift, according to Determining, by the characteristic area, synthetic location information of the target special effect gift on the live video;
数据接收模块420,用于接收主播客户端发送的直播视频流数据;其中,所述直播视频流数据中包括直播视频和目标特效礼物的合成位置信息;The data receiving module 420 is configured to receive live video stream data sent by the host client; wherein the live video stream data includes the combined location information of the live video and the target special effect gift;
数据转发模块430,用于将所述直播视频流数据转发至观众客户端;其中,所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The data forwarding module 430 is configured to forward the live video stream data to the audience client; wherein the audience client adds the target special effect gift to the live video for synthesis and display according to the synthesis location information .
上述提供的虚拟礼物特效的处理装置可用于执行上述任意实施例提供的虚拟礼物特效的处理方法,具备相应的功能和有益效果。The device for processing virtual gift special effects provided above can be used to execute the method for processing virtual gift special effects provided by any of the foregoing embodiments, and has corresponding functions and beneficial effects.
本申请实施例还提供一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如上述任一实施例中的虚拟礼物特效的处理方法。An embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the program, the implementation is as in any of the above embodiments. The processing method of virtual gift special effects.
可选的,该计算机设备可以为移动终端、平板电脑、计算机电脑或服务器等。上述提供的计算机设备执行上述任一实施例提供的虚拟礼物特效的处理方法时,具有相应的功能和有益效果。Optionally, the computer device may be a mobile terminal, a tablet computer, a computer computer, or a server. When the computer device provided above executes the method for processing virtual gift special effects provided by any of the above embodiments, it has corresponding functions and beneficial effects.
本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行 指令在由计算机处理器执行时用于执行一种虚拟礼物特效的处理方法,包括:An embodiment of the present application also provides a storage medium containing computer-executable instructions, when the computer-executable instructions are executed by a computer processor, a method for processing a virtual gift special effect, including:
接收虚拟礼物的赠送指令,根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域;Receiving a gifting instruction of a virtual gift, obtaining a corresponding target special effect gift according to the gifting instruction, and determining a characteristic area of the target special effect gift;
根据所述特征区域确定所述目标特效礼物在所述直播视频上的合成位置信息;Determining, according to the characteristic area, synthetic location information of the target special effect gift on the live video;
将所述直播视频以及所述合成位置信息发送至观众客户端,使得所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The live video and the synthesized location information are sent to the audience client, so that the audience client adds the target special effect gift to the live video for synthesis and display according to the synthesized location information.
或者,所述计算机可执行指令在由计算机处理器执行时用于执行一种虚拟礼物特效的处理方法,包括:Alternatively, the computer-executable instructions are used to execute a virtual gift special effect processing method when executed by a computer processor, including:
向主播客户端发送虚拟礼物赠送指令;其中,所述主播客户端根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域,根据所述特征区域确定所述目标特效礼物在所述直播视频上的合成位置信息;Send a virtual gift giving instruction to the host client; wherein, the host client obtains the corresponding target special effect gift according to the gift instruction and determines the characteristic area of the target special effect gift, and determines the target special effect gift according to the characteristic area Synthesized location information on the live video;
接收主播客户端发送的直播视频流数据;其中,所述直播视频流数据中包括直播视频和目标特效礼物的合成位置信息;Receiving live video stream data sent by the host client; wherein the live video stream data includes the combined location information of the live video and the target special effect gift;
将所述直播视频流数据转发至观众客户端;其中,所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The live video stream data is forwarded to a viewer client; wherein, the viewer client adds the target special effect gift to the live video according to the combined location information to synthesize and display.
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的虚拟礼物特效的处理方法操作,还可以执行本申请任意实施例所提供的虚拟礼物特效的处理方法中的相关操作,且具备相应的功能和有益效果。Of course, the storage medium containing computer-executable instructions provided by the embodiments of the present application is not limited to the above-mentioned virtual gift special effects processing method operations, and can also execute the operations provided by any embodiment of the present application. Related operations in the processing method of virtual gift special effects, and have corresponding functions and beneficial effects.

Claims (13)

  1. 一种虚拟礼物特效的处理方法,包括以下步骤:A method for processing virtual gift special effects, including the following steps:
    接收虚拟礼物的赠送指令,根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域;Receiving a gifting instruction of a virtual gift, obtaining a corresponding target special effect gift according to the gifting instruction, and determining a characteristic area of the target special effect gift;
    根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息;Determining, according to the characteristic area, synthetic location information of the target special effect gift on the live video;
    将所述直播视频以及所述合成位置信息发送至观众客户端,使得所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The live video and the synthesized location information are sent to the audience client, so that the audience client adds the target special effect gift to the live video for synthesis and display according to the synthesized location information.
  2. 根据权利要求1所述的虚拟礼物特效的处理方法,所述根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域的步骤包括:The method for processing virtual gift special effects according to claim 1, wherein the step of obtaining the corresponding target special effect gift according to the gift instruction and determining the characteristic area of the target special effect gift comprises:
    获取目标特效礼物标识;Obtain the target special effect gift ID;
    根据所述目标特效礼物标识查找得到所述目标特效礼物,并且确定所述目标特效礼物所对应的特征区域。The target special effect gift is searched and obtained according to the target special effect gift identifier, and the characteristic area corresponding to the target special effect gift is determined.
  3. 根据权利要求1所述的虚拟礼物特效的处理方法,所述根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息的步骤包括:The method for processing virtual gift special effects according to claim 1, wherein the step of determining the synthetic location information of the target special effect gift on the live video according to the characteristic area comprises:
    获取所述直播视频的当前视频帧图像;Acquiring the current video frame image of the live video;
    提取所述当前视频帧图像中的人物轮廓关键点;Extracting key points of the outline of the person in the current video frame image;
    根据所述人物轮廓关键点确定所述特征区域在所述当前视频帧图像上对应的目标位置,以在所述目标位置对所述目标特效礼物进行合成。The target position corresponding to the characteristic area on the current video frame image is determined according to the key points of the person contour, so as to synthesize the target special effect gift at the target position.
  4. 根据权利要求1所述的虚拟礼物特效的处理方法,所述将所述直播视频以及所述合成位置信息发送至观众客户端的步骤包括:The method for processing virtual gift special effects according to claim 1, wherein the step of sending the live video and the synthesized location information to the audience client includes:
    将所述直播视频和所述合成位置信息进行编码封装成直播视频流数据,并通过服务器将所述直播视频流数据转发至所述观众客户端。The live video and the synthesized location information are encoded and packaged into live video stream data, and the live video stream data is forwarded to the viewer client through a server.
  5. 根据权利要求1至4任一项所述的虚拟礼物特效的处理方法,所述目标特效礼物为三维显示形式的特效礼物。According to the method for processing virtual gift special effects according to any one of claims 1 to 4, the target special effect gift is a special effect gift in a three-dimensional display form.
  6. 根据权利要求1至4任一项所述的虚拟礼物特效的处理方法,所述合成位置信息包括:人脸信息、人体轮廓信息、手势信息和人体骨骼信息中的至少一者。The method for processing virtual gift special effects according to any one of claims 1 to 4, wherein the synthesized position information includes at least one of face information, human contour information, gesture information, and human bone information.
  7. 一种虚拟礼物特效的处理方法,包括以下步骤:A method for processing virtual gift special effects, including the following steps:
    向主播客户端发送虚拟礼物赠送指令;其中,所述主播客户端根据所述赠送指令 获取对应的目标特效礼物并确定所述目标特效礼物的特征区域,根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息;Send a virtual gift giving instruction to the host client; wherein, the host client obtains the corresponding target special effect gift according to the gift instruction and determines the characteristic area of the target special effect gift, and determines the target special effect gift according to the characteristic area Synthesized location information on the live video;
    接收主播客户端发送的直播视频流数据;其中,所述直播视频流数据中包括直播视频和目标特效礼物的合成位置信息;Receiving live video stream data sent by the host client; wherein the live video stream data includes the combined location information of the live video and the target special effect gift;
    将所述直播视频流数据转发至观众客户端;其中,所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The live video stream data is forwarded to a viewer client; wherein, the viewer client adds the target special effect gift to the live video according to the combined location information to synthesize and display.
  8. 根据权利要求7所述的虚拟礼物特效的处理方法,所述根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示的步骤包括:8. The method for processing virtual gift special effects according to claim 7, wherein the step of adding the target special effect gift to the live video according to the synthetic location information to synthesize and display it comprises:
    获取所述直播视频的当前视频帧图像;Acquiring the current video frame image of the live video;
    根据所述合成位置信息将所述目标特效礼物添加所述当前视频帧图像,得到特效帧图像;Adding the target special effect gift to the current video frame image according to the combined position information to obtain a special effect frame image;
    将所述特效帧图像渲染到特效展示区域进行展示。The special effect frame image is rendered to the special effect display area for display.
  9. 一种虚拟礼物特效的处理装置,包括:A device for processing virtual gift special effects, including:
    特征获取模块,用于接收虚拟礼物的赠送指令,根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域;The feature acquisition module is configured to receive a virtual gift giving instruction, obtain a corresponding target special effect gift according to the gift instruction, and determine the characteristic area of the target special effect gift;
    信息确定模块,用于根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息;An information determining module, configured to determine the combined location information of the target special effect gift on the live video according to the characteristic area;
    信息发送模块,用于将所述直播视频以及所述合成位置信息发送至观众客户端,使得所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The information sending module is configured to send the live video and the synthesized location information to the audience client, so that the audience client adds the target special effect gift to the live video for synthesis and synthesis according to the synthesized location information To show.
  10. 一种虚拟礼物特效的处理装置,包括:A device for processing virtual gift special effects, including:
    指令发送模块,用于向主播客户端发送虚拟礼物的赠送指令;其中,所述主播客户端根据所述赠送指令获取对应的目标特效礼物并确定所述目标特效礼物的特征区域,根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息;The instruction sending module is used to send a virtual gift giving instruction to the host client; wherein, the host client obtains the corresponding target special effect gift according to the gift instruction and determines the characteristic area of the target special effect gift, according to the characteristic The area determines the synthesized location information of the target special effect gift on the live video;
    数据接收模块,用于接收主播客户端发送的直播视频流数据;其中,所述直播视频流数据中包括直播视频和目标特效礼物的合成位置信息;The data receiving module is configured to receive live video stream data sent by the host client; wherein, the live video stream data includes the combined location information of the live video and the target special effect gift;
    数据转发模块,用于将所述直播视频流数据转发至观众客户端;其中,所述观众客户端根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The data forwarding module is configured to forward the live video stream data to an audience client; wherein, the audience client adds the target special effect gift to the live video for synthesis and display according to the synthesis location information.
  11. 一种直播系统,包括主播客户端、观众客户端和以及服务器,所述主播客户端经所述服务器与所述观众客户端通过网络进行通信连接;A live broadcast system includes an anchor client, an audience client, and a server. The anchor client communicates with the audience client via the server through a network;
    所述服务器,用于接收所述观众客户端发送的虚拟礼物的赠送指令,并向主播客户端发送所述赠送指令;The server is configured to receive a virtual gift giving instruction sent by the viewer client, and send the gift instruction to the anchor client;
    所述主播客户端,用于接收所述赠送指令并获取目标特效礼物标识;根据所述目标特效礼物标识查找得到目标特效礼物,确定所述目标特效礼物所对应的特征区域;根据所述特征区域确定所述目标特效礼物在直播视频上的合成位置信息;将所述合成位置信息和所述直播视频编码成直播视频流数据发送至服务器;The anchor client is configured to receive the gift instruction and obtain a target special effect gift identifier; find the target special effect gift according to the target special effect gift identifier, and determine the characteristic area corresponding to the target special effect gift; according to the characteristic area Determine the combined location information of the target special effect gift on the live video; encode the combined location information and the live video into live video stream data and send it to the server;
    所述服务器,还用于将所述直播视频流数据转发至所述观众客户端;The server is also used to forward the live video stream data to the viewer client;
    所述观众客户端,用于接收直播视频流数据和目标特效礼物,从所述直播视频流数据中获取直播视频和所述目标特效礼物的合成位置信息;根据所述合成位置信息将所述目标特效礼物添加到所述直播视频进行合成并进行展示。The audience client is configured to receive live video stream data and target special effect gifts, and obtain the combined location information of the live video and the target special effect gifts from the live video stream data; combine the target with the combined location information The special effect gift is added to the live video for synthesis and display.
  12. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如权利要求1-8任一项所述的虚拟礼物特效的处理方法的步骤。A computer device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the virtual gift according to any one of claims 1-8 when the processor executes the program Steps of special effects processing methods.
  13. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-8任一项所述虚拟礼物特效的处理方法的步骤。A storage medium containing computer-executable instructions, when the computer-executable instructions are executed by a computer processor, are used to execute the steps of the method for processing virtual gift special effects according to any one of claims 1-8.
PCT/CN2019/125929 2019-09-11 2019-12-17 Virtual gift special effect processing method and apparatus, and live streaming system WO2021047094A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910859930.5A CN110493630B (en) 2019-09-11 2019-09-11 Processing method and device for special effect of virtual gift and live broadcast system
CN201910859930.5 2019-09-11

Publications (1)

Publication Number Publication Date
WO2021047094A1 true WO2021047094A1 (en) 2021-03-18

Family

ID=68557666

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/125929 WO2021047094A1 (en) 2019-09-11 2019-12-17 Virtual gift special effect processing method and apparatus, and live streaming system

Country Status (2)

Country Link
CN (1) CN110493630B (en)
WO (1) WO2021047094A1 (en)

Families Citing this family (38)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110536151B (en) * 2019-09-11 2021-11-19 广州方硅信息技术有限公司 Virtual gift special effect synthesis method and device and live broadcast system
CN110493630B (en) * 2019-09-11 2020-12-01 广州华多网络科技有限公司 Processing method and device for special effect of virtual gift and live broadcast system
CN110475150B (en) * 2019-09-11 2021-10-08 广州方硅信息技术有限公司 Rendering method and device for special effect of virtual gift and live broadcast system
CN110557649B (en) * 2019-09-12 2021-12-28 广州方硅信息技术有限公司 Live broadcast interaction method, live broadcast system, electronic equipment and storage medium
CN110958463A (en) * 2019-12-06 2020-04-03 广州华多网络科技有限公司 Method, device and equipment for detecting and synthesizing virtual gift display position
CN111698523B (en) * 2019-12-06 2021-11-12 广州方硅信息技术有限公司 Method, device, equipment and storage medium for presenting text virtual gift
CN113315924A (en) * 2020-02-27 2021-08-27 北京字节跳动网络技术有限公司 Image special effect processing method and device
CN111277854A (en) * 2020-03-04 2020-06-12 网易(杭州)网络有限公司 Display method and device of virtual live broadcast room, electronic equipment and storage medium
CN111405343A (en) * 2020-03-18 2020-07-10 广州华多网络科技有限公司 Live broadcast interaction method and device, electronic equipment and storage medium
CN111432235A (en) * 2020-04-01 2020-07-17 网易(杭州)网络有限公司 Live video generation method and device, computer readable medium and electronic equipment
CN111464828A (en) * 2020-05-14 2020-07-28 广州酷狗计算机科技有限公司 Virtual special effect display method, device, terminal and storage medium
CN111464830B (en) * 2020-05-19 2022-07-15 广州酷狗计算机科技有限公司 Method, device, system, equipment and storage medium for image display
CN111970575B (en) * 2020-07-24 2022-08-05 网易(杭州)网络有限公司 Virtual gift processing method, storage medium, processor and electronic equipment
CN111784418B (en) * 2020-07-27 2023-08-08 网易(杭州)网络有限公司 Display control method and device for live broadcasting room, computer medium and electronic equipment
CN111970533B (en) * 2020-08-28 2022-11-04 北京达佳互联信息技术有限公司 Interaction method and device for live broadcast room and electronic equipment
CN112383788B (en) * 2020-11-11 2023-05-26 成都威爱新经济技术研究院有限公司 Live broadcast real-time image extraction system and method based on intelligent AI technology
CN112565806B (en) * 2020-12-02 2023-08-29 广州繁星互娱信息科技有限公司 Virtual gift giving method, device, computer equipment and medium
CN112929680B (en) * 2021-01-19 2023-09-05 广州虎牙科技有限公司 Live broadcasting room image rendering method and device, computer equipment and storage medium
CN113038228B (en) * 2021-02-25 2023-05-30 广州方硅信息技术有限公司 Virtual gift transmission and request method, device, equipment and medium thereof
CN113163220B (en) * 2021-02-26 2023-02-28 广州方硅信息技术有限公司 Virtual gift positioning display method and device, equipment and medium thereof
CN113139913B (en) * 2021-03-09 2024-04-05 杭州电子科技大学 New view correction generation method for portrait
WO2022193070A1 (en) * 2021-03-15 2022-09-22 百果园技术(新加坡)有限公司 Live video interaction method, apparatus and device, and storage medium
CN114501041B (en) * 2021-04-06 2023-07-14 抖音视界有限公司 Special effect display method, device, equipment and storage medium
CN113395533B (en) * 2021-05-24 2023-03-21 广州博冠信息科技有限公司 Virtual gift special effect display method and device, computer equipment and storage medium
CN113766258B (en) * 2021-07-27 2023-04-11 广州方硅信息技术有限公司 Live broadcast room virtual gift presentation processing method and equipment and storage medium
CN113596498A (en) * 2021-07-29 2021-11-02 广州方硅信息技术有限公司 Virtual gift display method, device, system and storage medium in live broadcast
CN115706821B (en) * 2021-08-17 2024-04-30 上海哔哩哔哩科技有限公司 Virtual gift display method and device
CN113873267B (en) * 2021-08-20 2024-01-19 广州方硅信息技术有限公司 Live broadcast room virtual gift naming method, server, live broadcast system and storage medium
CN113473211B (en) * 2021-08-20 2023-07-14 广州博冠信息科技有限公司 Virtual gift processing method and device, storage medium and electronic equipment
CN115733995A (en) * 2021-08-30 2023-03-03 北京字跳网络技术有限公司 Interaction method, interaction device, electronic equipment, readable storage medium and program product
CN114025188A (en) * 2021-10-28 2022-02-08 广州虎牙科技有限公司 Live broadcast advertisement display method, system, device, terminal and readable storage medium
CN114222147B (en) * 2021-11-03 2023-10-03 广州方硅信息技术有限公司 Live broadcast layout adjustment method and device, storage medium and computer equipment
CN114125488A (en) * 2021-12-09 2022-03-01 小象(广州)商务有限公司 Virtual gift display method and system in live broadcast
CN114237792A (en) * 2021-12-13 2022-03-25 广州繁星互娱信息科技有限公司 Virtual object display method and device, storage medium and electronic equipment
CN114422821A (en) * 2022-02-14 2022-04-29 广州方硅信息技术有限公司 Live broadcast home page interaction method, device, medium and equipment based on virtual gift
CN114567793A (en) * 2022-02-23 2022-05-31 广州博冠信息科技有限公司 Method and device for realizing live broadcast interactive special effect, storage medium and electronic equipment
CN115134627A (en) * 2022-07-01 2022-09-30 广州博冠信息科技有限公司 Live broadcast room information processing method and device, readable storage medium and electronic equipment
CN115484472B (en) * 2022-09-23 2024-05-28 广州方硅信息技术有限公司 Method and device for playing and processing special effect in live broadcasting room, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007243573A (en) * 2006-03-08 2007-09-20 Toshiba Corp Server apparatus
US20100134588A1 (en) * 2008-12-01 2010-06-03 Samsung Electronics Co., Ltd. Method and apparatus for providing animation effect on video telephony call
CN104780458A (en) * 2015-04-16 2015-07-15 美国掌赢信息科技有限公司 Method and electronic equipment for loading effects in instant video
CN105334963A (en) * 2015-10-29 2016-02-17 广州华多网络科技有限公司 Method and system for displaying virtual article
CN106231434A (en) * 2016-07-25 2016-12-14 武汉斗鱼网络科技有限公司 A kind of living broadcast interactive specially good effect realization method and system based on Face datection
CN106658035A (en) * 2016-12-09 2017-05-10 武汉斗鱼网络科技有限公司 Dynamic display method and device for special effect gift
CN108391153A (en) * 2018-01-29 2018-08-10 北京潘达互娱科技有限公司 Virtual present display methods, device and electronic equipment
CN110493630A (en) * 2019-09-11 2019-11-22 广州华多网络科技有限公司 The treating method and apparatus of virtual present special efficacy, live broadcast system

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101452582B (en) * 2008-12-18 2013-09-18 北京中星微电子有限公司 Method and device for implementing three-dimensional video specific action
CN107071580A (en) * 2017-03-20 2017-08-18 北京潘达互娱科技有限公司 Data processing method and device
CN107682729A (en) * 2017-09-08 2018-02-09 广州华多网络科技有限公司 It is a kind of based on live interactive approach and live broadcast system, electronic equipment
CN107483892A (en) * 2017-09-08 2017-12-15 北京奇虎科技有限公司 Video data real-time processing method and device, computing device
CN107613360A (en) * 2017-09-20 2018-01-19 北京奇虎科技有限公司 Video data real-time processing method and device, computing device
CN107888965B (en) * 2017-11-29 2020-02-14 广州酷狗计算机科技有限公司 Image gift display method and device, terminal, system and storage medium
CN108022279B (en) * 2017-11-30 2021-07-06 广州市百果园信息技术有限公司 Video special effect adding method and device and intelligent mobile terminal
CN108156507B (en) * 2017-12-27 2020-11-13 广州酷狗计算机科技有限公司 Virtual article presenting method, device and storage medium
CN108900858A (en) * 2018-08-09 2018-11-27 广州酷狗计算机科技有限公司 A kind of method and apparatus for giving virtual present
CN109729288A (en) * 2018-12-17 2019-05-07 广州城市职业学院 A kind of short video-generating device and method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007243573A (en) * 2006-03-08 2007-09-20 Toshiba Corp Server apparatus
US20100134588A1 (en) * 2008-12-01 2010-06-03 Samsung Electronics Co., Ltd. Method and apparatus for providing animation effect on video telephony call
CN104780458A (en) * 2015-04-16 2015-07-15 美国掌赢信息科技有限公司 Method and electronic equipment for loading effects in instant video
CN105334963A (en) * 2015-10-29 2016-02-17 广州华多网络科技有限公司 Method and system for displaying virtual article
CN106231434A (en) * 2016-07-25 2016-12-14 武汉斗鱼网络科技有限公司 A kind of living broadcast interactive specially good effect realization method and system based on Face datection
CN106658035A (en) * 2016-12-09 2017-05-10 武汉斗鱼网络科技有限公司 Dynamic display method and device for special effect gift
CN108391153A (en) * 2018-01-29 2018-08-10 北京潘达互娱科技有限公司 Virtual present display methods, device and electronic equipment
CN110493630A (en) * 2019-09-11 2019-11-22 广州华多网络科技有限公司 The treating method and apparatus of virtual present special efficacy, live broadcast system

Also Published As

Publication number Publication date
CN110493630B (en) 2020-12-01
CN110493630A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
WO2021047094A1 (en) Virtual gift special effect processing method and apparatus, and live streaming system
WO2021047420A1 (en) Virtual gift special effect rendering method and apparatus, and live streaming system
WO2021047430A1 (en) Virtual gift special effect synthesis method and apparatus, and live streaming system
WO2020211385A1 (en) Image special effect processing method, device, and live video streaming terminal
JP6599436B2 (en) System and method for generating new user selectable views
JP6283108B2 (en) Image processing method and apparatus
CN107343220B (en) Data processing method and device and terminal equipment
CN106303289B (en) Method, device and system for fusion display of real object and virtual scene
KR20160021146A (en) Virtual video call method and terminal
KR102278848B1 (en) Multi-viewpoint-based 360 video processing method and device
JP2004145448A (en) Terminal device, server device, and image processing method
US9996940B1 (en) Expression transfer across telecommunications networks
US20220385808A1 (en) Selfie setup and stock videos creation
WO2023241459A1 (en) Data communication method and system, and electronic device and storage medium
WO2017124870A1 (en) Method and device for processing multimedia information
CN110958463A (en) Method, device and equipment for detecting and synthesizing virtual gift display position
CN114998935A (en) Image processing method, image processing device, computer equipment and storage medium
US20170221174A1 (en) Gpu data sniffing and 3d streaming system and method
US20230396735A1 (en) Providing a 3d representation of a transmitting participant in a virtual meeting
CN116962744A (en) Live webcast link interaction method, device and live broadcast system
JP2022545880A (en) Codestream processing method, device, first terminal, second terminal and storage medium
KR20210052884A (en) Personalized Video Production System and Method Using Chroma Key
US20020054039A1 (en) 2.5 dimensional head modeling method
US20240015264A1 (en) System for broadcasting volumetric videoconferences in 3d animated virtual environment with audio information, and procedure for operating said device
WO2022181379A1 (en) Image processing device, image processing method, and program

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: 19945147

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: 19945147

Country of ref document: EP

Kind code of ref document: A1