Video playing method and related device

By pre-storing the overall image of the digital character in the user terminal and using the audio data and target part image parameters generated by the server for synthesis processing, the real-time problem of the digital character video live broadcast is solved and the real-time nature and visual effect of the live broadcast are improved.

CN118660176APending Publication Date: 2024-09-17MASHANG CONSUMER FINANCE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410149824.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-01
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

When digital characters conduct live video broadcasts, existing technology is difficult to meet the real-time requirements. Pre-generated fixed speech video playback results in long delays, and image generation based on global features sent by the controller may lead to poor live broadcast effects.

Method used

By pre-storing the overall image of the digital character in the user terminal, and sending drive instructions to the server carrying the broadcast text, the server generates audio data and target part image parameters, and the user terminal performs synthesis processing based on these parameters to generate a synthesized image for video playback, realizing the digital character The changes in target parts when reading the broadcast text are consistent with real humans.

Benefits of technology

It reduces the amount of data transmission and image parameter generation time between the user terminal and the server, reduces the delay between driving instructions and video playback during live broadcast, and improves the real-time nature and visual appeal of video playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118660176A
    Figure CN118660176A
Patent Text Reader

Abstract

The embodiment of the invention provides a video playing method and a related device. The method comprises the following steps: sending a driving instruction to a server; the driving instruction carries a broadcast text of a digital character; receiving response information of the driving instruction; the response information is generated and sent by the server according to the broadcast text; the response information comprises audio data of the broadcast text and image parameters required for generating a target part image of the digital character; according to the image parameters, generating a target part image, and performing synthesis processing on the target part image and a pre-stored overall image of the digital figure to obtain a synthesized image; and performing video playing processing according to the synthesized image and the audio data. Therefore, the real-time performance of video playing in a digital figure live broadcast scene can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a video playback method and related devices. Background Art

[0002] With the development of electronic technology, more and more information is transmitted online. The rapid development of Internet technology has also driven the continuous innovation of video technology. Through live video broadcasting, we can conduct online entertainment and exchange activities or recommend information, etc. Using digital images for live video broadcasting can enrich the visual effects of live broadcasting and increase visual appeal. How to improve the real-time performance of video playback during live broadcasting using digital images is a common focus of users, live broadcasting institutions and live broadcasting platforms. Summary of the invention

[0003] The embodiments of the present application provide a video playback method and related devices to improve the real-time performance of video playback in a digital character live broadcast scene.

[0004] In a first aspect, an embodiment of the present application provides a video playback method, which is applied to a user terminal, including:

[0005] Sending a driving instruction to the server; the driving instruction carries the broadcast text of the digital character;

[0006] receiving response information of the driving instruction; the response information is generated and sent by the server according to the broadcast text; the response information includes audio data of the broadcast text and image parameters required for generating the target part image of the digital character;

[0007] Generating the target part image according to the image parameters, and synthesizing the target part image and the pre-stored overall image of the digital character to obtain a synthesized image;

[0008] Video playback processing is performed according to the synthesized image and the audio data.

[0009] In a second aspect, an embodiment of the present application provides a video playback method, which is applied to a server, comprising:

[0010] Receiving a driving instruction sent by a user terminal; the driving instruction carries a broadcast text of the digital character;

[0011] According to the broadcast text, audio data and image parameters of the broadcast text are generated; the image parameters are used to generate a target part image of the digital character;

[0012] The audio data and the image parameters are used as response information of the driving instruction, and the response information is sent to the user terminal, so that the user terminal generates the target part image according to the image parameters, synthesizes the target part image and the pre-stored overall image of the digital character to obtain a synthesized image, and performs video playback processing according to the synthesized image and the audio data.

[0013] In a third aspect, an embodiment of the present application provides a video playback device, which runs on a user terminal and includes:

[0014] A sending unit, used to send a driving instruction to a server; the driving instruction carries a broadcast text of the digital character;

[0015] A receiving unit, configured to receive response information of the driving instruction; the response information is generated and sent by the server according to the broadcast text; the response information includes audio data of the broadcast text and image parameters required for generating an image of a target part of the digital character;

[0016] A generating unit, configured to generate the target part image according to the image parameters, and synthesize the target part image and the pre-stored overall image of the digital character to obtain a synthesized image;

[0017] A playback unit is used to perform video playback processing according to the composite image and the audio data.

[0018] In a fourth aspect, an embodiment of the present application provides a video playback device, which runs on a server and includes:

[0019] A receiving unit, used to receive a driving instruction sent by a user terminal; the driving instruction carries a broadcast text of the digital character;

[0020] A generating unit, used to generate audio data and image parameters of the broadcast text according to the broadcast text; the image parameters are used to generate a target part image of the digital character;

[0021] The sending unit is used to send the response information to the user terminal using the audio data and the image parameters as response information of the driving instruction, so that the user terminal generates the target part image according to the image parameters, synthesizes the target part image and the pre-stored overall image of the digital character to obtain a synthesized image, and performs video playback processing according to the synthesized image and the audio data.

[0022] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to execute the video playback method as described in the first aspect or the second aspect.

[0023] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium for storing computer-executable instructions, which, when executed by a processor, implement the video playback method as described in the first aspect or the second aspect.

[0024] In the seventh aspect, an embodiment of the present application provides a computer program product, including a computer program or computer executable instructions, characterized in that when the computer program or computer executable instructions are executed by a processor, the video playback method as described in the first aspect or the second aspect is implemented.

[0025] It can be seen that in the embodiment of the present application, first, a driving instruction is sent to the server; the driving instruction carries the broadcast text of the digital character; then, a response message of the driving instruction is received; the response message is generated and sent by the server according to the broadcast text; the response message includes the audio data of the broadcast text and the image parameters required to generate the target part image of the digital character; then, according to the image parameters, the target part image is generated, and the target part image and the pre-stored overall image of the digital character are synthesized to obtain a synthesized image; finally, the video playback process is performed according to the synthesized image and the audio data. In this way, the broadcast text carried in the driving instruction can be used for the server to generate the audio data of the broadcast text and the image parameters for generating the target part image of the digital character. Therefore, the broadcast text can be used to drive the server to change the target part image of the digital character, so that the target part of the digital character when reading the broadcast text in the video looks consistent with the target part of the real human when reading the broadcast text. In addition, by synthesizing the target part image and the pre-stored overall image of the digital character, the change of the target part image driven by the broadcast text can be reflected in the overall image of the digital character. Taking into account that in a live broadcast scenario, when a digital character reads a text in a video, most parts of the overall image are not affected by the text, and only a small number of parts will change as the text read by the digital character changes, therefore, by pre-storing the overall image of the digital character in the user terminal, the images of most parts that are not affected by the text can be reused, reducing the amount of data transmitted between the user terminal and the server, shortening the time for generating image parameters, and reducing the time delay between the user terminal sending a drive instruction carrying the text to the server and the digital character reading the text in the video during the live broadcast, thereby improving the real-time performance of video playback. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.

[0027] Figure 1 A schematic diagram of an implementation environment of a video playback method provided in an embodiment of the present application;

[0028] Figure 2 A processing flow chart of a video playback method provided in an embodiment of the present application;

[0029] Figure 3 A partial flow chart of a video playback method provided in an embodiment of the present application;

[0030] Figure 4 A processing flow chart of another video playback method provided in an embodiment of the present application;

[0031] Figure 5 A schematic diagram of interaction between a user terminal and a server in a video playback method provided in an embodiment of the present application;

[0032] Figure 6 Another schematic diagram of interaction between a user terminal and a server in a video playback method is provided for an embodiment of the present application;

[0033] Figure 7 A schematic diagram of image synthesis in a video playback method is provided for an embodiment of the present application;

[0034] Figure 8 An interface diagram of synthesizing images in a video playback method is provided for an embodiment of the present application;

[0035] Fig. 9 A schematic diagram of a video playback device provided in an embodiment of the present application;

[0036] Fig.10 A schematic diagram of another video playback device provided in an embodiment of the present application;

[0037] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0039] This specification provides a video playback method embodiment:

[0040] Digital images, such as digital human (Digital Human / Meta Human), are digital human images that are close to human images and created using digital technology. Digital human refers to a comprehensive product that exists in the non-physical world, is created and used by computer means, and has multiple human characteristics (appearance characteristics, human performance ability, interaction ability, etc.). Virtual digital humans can be divided according to personality symbols and graphic dimensions, or according to character graphic dimensions. Character image, voice generation module, animation generation module, audio and video synthesis display module, and interaction module constitute the general system framework of virtual digital humans.

[0041] Using digital images for live video broadcast can enrich the visual effects of live broadcast and improve the visual appeal of live broadcast to some people. However, unlike real humans, digital people do not have self-awareness or language expression ability. What digital people say is often driven by the controller behind them. During the live broadcast, participants are often required to communicate with the live audience through barrage or other forms, answer the questions of the live audience, or adjust the words according to the reactions of the live audience, etc. Therefore, live broadcast has high requirements for the real-time performance of the video. If a video of a digital person broadcasting a fixed wording is generated in advance and played, it obviously cannot meet the live broadcast requirements. If an image describing the global features of the digital image is temporarily generated based on the instructions sent by the controller to the driver for video playback, it may cause a long time delay and poor live broadcast effect.

[0042] Therefore, in order to solve the above problems, an embodiment of the present application provides a video playback method.

[0043] The video playback method provided in one or more embodiments of this specification may be applicable to the implementation environment of the video playback method, such as Figure 1 As shown, the implementation environment at least includes a server 101 for processing drive instructions and a user terminal 102 for playing videos.

[0044] The server 101 may be a single server, or a server cluster consisting of a plurality of servers, or one or more cloud servers in a cloud computing platform, for processing drive instructions.

[0045] The user terminal 102 may be a mobile phone, a personal computer, a tablet computer, an e-book reader, a device for information interaction based on VR (Virtual Reality, virtual reality technology), a vehicle-mounted terminal, an IoT device, a wearable smart device, a laptop computer, a desktop computer, etc. The user terminal 102 may be configured with an application client, and the specific form of the client may be an application, a subroutine within an application, a service module within an application, or a web page program; the client may play videos.

[0046] In the implementation environment, during the video playback, the user terminal 102 first sends a driving instruction to the server 101; the driving instruction carries the broadcast text of the digital character; then, the response information of the driving instruction returned by the server 101 is received; the response information is generated and sent by the server 101 according to the broadcast text; the response information includes the audio data of the broadcast text and the image parameters required to generate the target part image of the digital character; then, according to the image parameters, the target part image is generated, and the target part image and the pre-stored overall image of the digital character are synthesized to obtain a synthesized image; finally, the video playback is processed according to the synthesized image and the audio data. In this way, the broadcast text carried in the driving instruction can be used for the server 101 to generate the audio data of the broadcast text and the image parameters for generating the target part image of the digital character. Therefore, the broadcast text can be used to drive the server 101 to change the target part image of the digital character, so that the target part of the digital character when reading the broadcast text in the video looks consistent with the target part of the real human when reading the broadcast text. In addition, by synthesizing the target part image and the pre-stored overall image of the digital character, the change of the target part image driven by the broadcast text can be reflected in the overall image of the digital character. Considering that in the live broadcast scene, when the digital character reads the broadcast text in the video, most of the parts of the overall image are not affected by the broadcast text, and only a small number of parts will change with the change of the broadcast text read by the digital character, therefore, by pre-storing the overall image of the digital character in the user terminal 102, the image of most of the parts that are not affected by the broadcast text can be reused, reducing the amount of data transmitted between the user terminal 102 and the server 101, shortening the generation time of the image parameters, reducing the time delay between the user terminal 102 sending the driving instruction carrying the broadcast text to the server 101 and the digital character reading the broadcast text in the video, and improving the real-time performance of the video playback.

[0047] Figure 2 A processing flow chart of a video playback method provided in an embodiment of the present application. Figure 2 The video playback method provided in this embodiment is applied to a user terminal and specifically includes steps S202 to S208.

[0048] Step S202, sending a driving instruction to the server; the driving instruction carries the broadcast text of the digital character.

[0049] The digital character is a digital character image close to the human image created by digital technology. The digital character in this embodiment can also be replaced by a digital image of a non-human appearance configured by a user.

[0050] The driving instruction is sent to the server so that the server generates response information of the driving instruction according to the broadcast text in the driving instruction.

[0051] The announcement text of the digital character may be the text that the controller of the digital character expects the digital character to announce in the video. The announcement text may be a string. The number of characters included in the announcement text may be one or more.

[0052] The driving instruction may also carry a character identification of the digital character. The character identification may be used to determine a unique corresponding digital character among multiple digital characters pre-configured on the server.

[0053] For example, the character identification carried by the driving instruction is "xiaobing", and based on the character identification, a unique corresponding digital human can be determined from multiple digital humans pre-configured on the server.

[0054] The number of character identifiers may be one or more. In the case where the number of character identifiers is more than one, each of the multiple character identifiers may correspond to one or more broadcast texts.

[0055] The driving instruction may also carry a scene identifier of the broadcast scene in which the digital character is located. The server may be pre-configured with multiple broadcast scenes, each of which has multiple picture frames containing the digital character. The scene identifier may be used to determine a unique corresponding broadcast scene among the multiple broadcast scenes pre-configured by the server, and then obtain multiple picture frames containing the digital character in the broadcast scene.

[0056] For example, the user terminal sends the driver instruction talkConfig to the server

[0057]

[0058]

[0059] Among them, "character" is the name of the character, which is used to indicate which digital human among the pre-configured digital humans the driving instruction is used to drive, that is, the aforementioned character identification. "text" is what the digital human needs to say, that is, the aforementioned broadcast text. "scene_id" is which broadcast scene the digital human uses, that is, the aforementioned scene identification. The digital human has different body movements in different broadcast scenes.

[0060] The number of digital characters included in the multiple picture frames of each broadcast scene can be one or more. The multiple picture frames of each broadcast scene can reflect the background of the digital character in the broadcast scene, the appearance characteristics of the digital character, the action of the digital character, the facial expression of the digital character, etc. The multiple picture frames can be used to generate a corresponding video data, in which the digital character can perform pre-configured actions.

[0061] For example, broadcast scene 1 has corresponding 250 picture frames, which can be used to generate 10 seconds of video data with an FPS (Frames Per Second) of 25 frames per second. In the video data, digital human 1 stands up from his seat, and digital human 2 moves his hands from a silent state.

[0062] FPS is a definition in the field of images. It refers to the number of frames transmitted per second. In layman's terms, it refers to the number of frames in an animation or video. FPS measures the amount of information used to save and display dynamic videos. The more frames per second, the smoother the displayed action will be. FPS can also be understood as "refresh rate". When the refresh rate is too low, the naked eye can feel the flickering and discontinuity of the screen, which has a bad impact on the image display effect and visual perception.

[0063] Total number of frames in the broadcast scene = video duration * FPS (1)

[0064] The total number of frames of the broadcast scene is the number of multiple picture frames of the broadcast scene.

[0065] Referring to the above formula (1), in the process of pre-configuring multiple picture frames of the broadcast scene, the total number of frames of the broadcast duration can be calculated based on the video duration and FPS, and then the picture frames can be configured according to the total number of frames.

[0066] Step S204, receiving response information of the driving instruction; the response information is generated and sent by the server according to the broadcast text; the response information includes the audio data of the broadcast text and the image parameters required to generate the target part image of the digital character.

[0067] The user terminal may receive the response information of the driving instruction returned by the server.

[0068] The audio data of the broadcast text may be audio data obtained by the server performing speech-to-text processing on the broadcast text.

[0069] When the driving instruction carries the character identification of the digital character, the audio data of the broadcast text may be the audio data obtained by the server determining the voice type of the digital character according to the character identification and performing text-to-speech processing on the broadcast text according to the voice type.

[0070] Each digital character may be pre-configured with a corresponding voice type.

[0071] Exemplarily, voice types include but are not limited to male voice, female voice, child voice, and the like.

[0072] The target part image of the digital character may be an image of one or more predetermined parts of the overall image of the digital character, and the target part image may be used to describe the local features of the digital character affected by the broadcast text.

[0073] For example, the target part image of the digital person is the digital person's facial image, or the target part image of the digital person is the digital person's lip image. In the video, the digital person's mouth shape will change during the reading of the text, and the change can be reflected by the digital person's lip image or facial image.

[0074] The image parameters can be used to generate target part images of a digital character.

[0075] The image parameters may be generated by the server according to a preset digital human driving algorithm and the broadcast text, or the image parameters may be generated by the server according to a preset digital human driving algorithm and the audio data of the broadcast text.

[0076] Exemplarily, the preset digital human driving algorithm can be the Wav2lip algorithm. Wav2Lip technology is a lip movement migration algorithm based on GAN (Generative adversarial network), which realizes the synchronization of the generated video character's lip shape with the input voice. Wav2Lip can not only output lip-synced videos matching the target voice based on static images, but also directly perform lip conversion on dynamic videos and output videos matching the input voice. The main function of this technology is to make the lip shape natural when synthesizing audio and pictures, audio and video.

[0077] The idea of ​​the server generating image parameters according to the preset digital human driving algorithm and the broadcast text is similar to the idea of ​​the server generating image parameters according to the preset digital human driving algorithm and the audio data of the broadcast text. In this specification, the image parameters are generated by the server according to the preset digital human driving algorithm and the broadcast text as an example for illustrative explanation. The implementation method of the server generating image parameters according to the preset digital human driving algorithm and the audio data of the broadcast text can refer to the corresponding description part.

[0078] The number of image parameters may be one or more. When the number of image parameters is more than one, each image parameter may be used to generate a corresponding target part image.

[0079] The image parameters may include encoded information of the target area image.

[0080] The coding information may be another string obtained by encoding the string according to a preset coding method after the server generates a string representing the target part image according to the preset digital human driving algorithm and the broadcast text.

[0081] The character string representing the target part image may be a binary character string consisting of the numbers “0” and “1”.

[0082] The encoded information can be a non-binary string.

[0083] Exemplarily, the preset encoding method may be base64. Base64 is one of the encoding methods for transmitting 8-bit bytecodes, and is also a method for representing binary data based on 64 printable characters.

[0084] The coding information of the target part image may be used as a basis for the user terminal to generate the target part image in subsequent steps.

[0085] The image parameters may also include position information of the target part described by the target part image in the overall image of the digital character.

[0086] The server may be pre-configured with picture frames containing digital characters.

[0087] The position information of the target part described by the target part image in the overall image of the digital character may be the position information of the target part image in the picture frame containing the digital character generated by the server according to a preset digital human driving algorithm, broadcast text and the picture frame containing the digital character.

[0088] Taking the rectangular coordinate system as an example, the position information may include the coordinate information of the left boundary of the target part image in the horizontal coordinate, the coordinate information of the upper boundary of the target part image in the vertical coordinate, the width of the target part image and the height of the target part image.

[0089] The position information of the target part described by the target part image in the overall image of the digital character can be used as reference information when the user terminal performs synthesis processing on the target part image in subsequent steps.

[0090] The server may store a preset image set, which includes multiple images, each of which describes the overall image of the digital character at a corresponding time point in the preset video data. The image parameters may also include the frame number of the target part image to be generated in the preset image set pre-stored in the server.

[0091] The preset image set may be an image set consisting of multiple picture frames containing digital characters pre-configured by the server.

[0092] The frame sequence number of the target part image to be generated in the preset image set pre-stored in the server can be used as reference information used when the user terminal performs synthesis processing on the target part image in subsequent steps.

[0093] The server may be pre-configured with a plurality of broadcast scenes and a plurality of picture frames containing digital characters in each broadcast scene.

[0094] In the case where the driving instruction carries a scene identifier, the server may perform query processing in a plurality of pre-configured broadcast scenes according to the scene identifier, thereby obtaining a preset image set corresponding to the scene identifier.

[0095] The image parameters may also include the number of target region images.

[0096] The number of characters in the broadcast text will affect the duration of the audio data of the broadcast text, and the number of target part images can be determined by the duration of the audio data and the pre-configured FPS.

[0097] For example, the broadcast text is "Answer Text", with a total of 4 characters. It takes 3 seconds for the digital human to read the 4 characters. The duration of the audio data is 3 seconds. The pre-configured FPS is 25 frames / second, and the number of target part images is 75. In response to the drive instruction, the server generates audio data of the "Answer Text" with a duration of 3 seconds and 75 image parameters required to generate the target part image. Among the 75 image parameters, each image parameter is as follows:

[0098]

[0099] Among them, "face_box" is the coordinate information of pasting the target part image into the picture frame containing the digital human, that is, the position information of the target part described by the aforementioned target part image in the overall image of the digital human. Specifically, in the "face_box", left is the coordinate information of the left boundary of the target part image in the horizontal coordinate, top is the coordinate information of the upper boundary of the target part image in the vertical coordinate, width is the width of the target part image, and height is the height of the target part image.

[0100] "scene_frame_idx" is the frame number of the target part image to be generated in the preset image set pre-stored in the server, and the preset image set is determined by the scene identifier carried by the driving instruction.

[0101] In addition, the picture frame corresponding to "face_box" and containing the digital human is the picture frame represented by "scene_frame_idx" in the preset image set.

[0102] "image" is the encoding information of the target part image.

[0103] "total_frame" is the number of target area images.

[0104] Step S206, generating a target part image according to the image parameters, and synthesizing the target part image and the pre-stored overall image of the digital character to obtain a synthesized image.

[0105] A preset image set may be stored in the user terminal, and the preset image set includes a plurality of images, wherein each image describes the overall image of a digital character at a corresponding time point in preset video data.

[0106] The overall image of the pre-stored digital character can be represented by a picture frame in a preset image set stored in the user terminal.

[0107] In the case where the image parameters include coding information and position information of the target part described by the target part image in the overall image, the target part image is generated according to the image parameters, and the target part image and the overall image of the pre-stored digital character are synthesized to obtain a synthesized image. The target part image can be generated according to the coding information, and the target part image and the overall image are synthesized according to the position information to obtain a synthesized image.

[0108] When the image parameters include coding information, a target part image is generated according to the image parameters, and the target part image and the overall image of a pre-stored digital character are synthesized to obtain a synthesized image. Alternatively, the target part image is generated according to the coding information, and the target part image and the overall image are synthesized according to pre-stored position information to obtain a synthesized image.

[0109] For example, if the actions performed by the digital human in the preset video data do not change the position of the face, the position of the face can be pre-stored in the user terminal as pre-stored position information.

[0110] The overall image of a digital character can reflect the appearance of each part of the digital character, the actions performed by each part of the digital character, the expression of the digital character, and so on.

[0111] The target part described by the target part image is a part of the overall image of the digital character.

[0112] In a specific implementation method, the image parameters include coding information and position information of the target part described by the target part image in the overall image; based on the image parameters, the target part image is generated, and the target part image and the overall image of the pre-stored digital character are synthesized to obtain a synthesized image, including: performing image generation processing according to the coding information to obtain the target part image; determining the area to be processed in the overall image of the digital character according to the position information; and occluding the area to be processed in the overall image of the digital character by using the target part image to obtain a synthesized image.

[0113] The image generation process is performed according to the coding information to obtain the target part image, which may be a decoding process of the coding information to obtain the target part image. The coding information may be a non-binary string.

[0114] The position information of the target part described by the target part image in the overall image may be the position information of the target part image in the image frame describing the overall image of the digital character.

[0115] The position information may include coordinate information of each boundary of the target region image.

[0116] The position information may also include coordinate information of the left border of the target part image on the horizontal axis, coordinate information of the upper border of the target part image on the vertical axis, the width of the target part image, and the height of the target part image.

[0117] The coordinate information of the right boundary of the target part image on the horizontal coordinate can be determined according to the coordinate information of the left boundary of the target part image on the horizontal coordinate and the width of the target part image. The coordinate information of the lower boundary of the target part image on the vertical coordinate can be determined according to the coordinate information of the upper boundary of the target part image on the vertical coordinate and the height of the target part image. Furthermore, in the image frame describing the overall image of the digital character, the coordinate information of the left boundary of the target part image on the horizontal coordinate can be determined as the coordinate information of the left boundary of the area to be processed on the horizontal coordinate, the coordinate information of the right boundary of the target part image on the horizontal coordinate can be determined as the coordinate information of the right boundary of the area to be processed on the horizontal coordinate, the coordinate information of the upper boundary of the target part image on the vertical coordinate can be determined as the coordinate information of the upper boundary of the area to be processed on the vertical coordinate, and the coordinate information of the lower boundary of the target part image on the vertical coordinate can be determined as the coordinate information of the lower boundary of the area to be processed on the vertical coordinate, so as to achieve the determination of the area to be processed in the overall image of the digital character.

[0118] The target part image is used to block the area to be processed in the overall image of the digital character to obtain a composite image.

[0119] For example, the target part is the lips of a digital person. The target part image is a lip image. In the image frame describing the overall image of the digital person, the lips of the digital person are originally closed. After the lip image is used to block the area to be processed in the image frame to obtain a composite image, the lips are open in the composite image.

[0120] In a specific implementation, a preset image set is stored in both the server and the user terminal; the preset image set includes multiple images, each of which describes the overall image of a digital character at a corresponding time point in the preset video data; the image parameters also include the frame number of the target part image to be generated in the preset image set pre-stored in the server; the method also includes: querying the preset image set pre-stored in the user terminal according to the frame number to obtain the overall image of the digital character.

[0121] The same preset image set is stored in the server and the user terminal. The preset image set includes a plurality of images, each of which describes the overall image of a digital character at a corresponding time point in the preset video data.

[0122] The preset video data may be a video of a digital character performing a preset action in a specific scene, for example, the digital character stands up from where he is sitting and waves to say hello. Playing the preset video data may be playing each image in the preset image set at a preset frame rate and a preset play order. Each image in the preset image set has a corresponding time point in the preset video data.

[0123] For example, the first image corresponds to the 1 / 60 second in the preset video data, and the digital character is sitting with his hands on his knees in the first image... The Nth image corresponds to the N / 60 second in the preset video data, and the digital character stands up with his hands raised in the Nth image... The Mth image corresponds to the M / 60 second in the preset video data, and the digital character stands up with his hands hanging down in the Mth image, etc. N and M are natural numbers greater than 1.

[0124] Considering that the server generates image parameters but does not directly generate the target part image, the target part image is generated by the user terminal according to the image parameters. Therefore, each image parameter generated by the server corresponds to a target part image that will be subsequently generated on the user terminal, i.e., the target part image to be generated. For each image parameter, the image parameter has a corresponding relationship with one of the images in the preset image set pre-stored on the server, and the frame number of the image with the corresponding relationship can be used as the frame number of the target part image to be generated in the preset image set pre-stored on the server.

[0125] For example, the server generates image parameters corresponding to the Nth image in the preset image set stored in the server, and the image parameters can be used for the user terminal to generate the target part image 1. Then, for the server, the frame number of the target part image 1 to be generated in the preset image set stored in the server is "N". N is a natural number greater than or equal to 1.

[0126] Since the content of the preset image set stored locally on the server is consistent with the preset image set stored locally on the user terminal, the frame number of the target part image to be generated in the preset image set stored locally on the server can be used to query the preset image set stored locally on the user terminal to obtain the overall image of the digital character corresponding to the target part image to be generated.

[0127] The frame number of the target part image to be generated in the preset image set pre-stored in the server is equivalent to the frame number of the target part image to be generated in the preset image set pre-stored in the user terminal. Furthermore, by querying the preset image set pre-stored in the user terminal according to the frame number, the image corresponding to the frame number can be obtained, and the image is used as the overall image of the digital character.

[0128] In the case where the image parameters include position information and frame numbers, a preset image set pre-stored in the user terminal can be queried and processed according to the frame number to obtain the overall image of the digital character. Then, based on the position information, the area to be processed is determined in the overall image of the digital character, and the area to be processed in the overall image of the digital character is occluded by the target part image to obtain a composite image.

[0129] Step S208: performing video playback processing according to the synthesized image and audio data.

[0130] The video playback processing is performed according to the synthesized image and the audio data, and the synthesized image can be played at a preset frame rate during the playback of the audio data.

[0131] The preset frame rate is a pre-configured FPS. For example, FPS = 25 frames per second, which is equivalent to playing a composite image every 40 milliseconds.

[0132] In a specific implementation, video playback processing is performed based on the synthesized image and audio data, including: during the playback of the audio data, the synthesized image is played according to a preset frame drop method; the number of synthesized images is determined by the number of image parameters, one image parameter corresponds to one synthesized image; the number of image parameters is determined by the server according to the broadcast time required for the broadcast text.

[0133] The accuracy of the timing mechanism of the user terminal may be limited by hardware conditions, which may make it difficult for the user terminal to accurately play the synthetic image at a preset frame rate. For example, the preset frame rate is 30 frames per second. In fact, when the user terminal plays the synthetic image, it may be 25 frames per second, or 27 frames per second, and so on.

[0134] The number of synthesized images can be multiple. Specifically, the number of synthesized images can be determined by the broadcast text. For example, if it takes 3 seconds for the digital human to finish reading the broadcast text 1, multiple target part images are generated according to the preset driving algorithm, the broadcast text, and the preset image set stored locally on the server. The number of the multiple target part images is 180, corresponding to 60 target part images per second.

[0135] During specific implementation, one image parameter can be used for the user terminal to generate a target part image, and one target part image can be used for the user terminal to generate a composite image, so one image parameter corresponds to one composite image.

[0136] After receiving the driving instruction, the server side can generate multiple image parameters according to the broadcast text carried by the driving instruction, and the number of image parameters is equal to the number of synthesized images. According to the image parameters, the generation of the target part image is performed by the user terminal side. The reason why the number of "target part images" generated by the user terminal is multiple, for example, 100 target part images, is because the server side returns 100 image parameters to the user terminal after receiving the driving instruction. The i-th image parameter of the 100 image parameters includes (frame number i, encoding information of the i-th target part image, and position information of the target part described by the i-th target part image in the overall image). The user terminal can generate the i-th target part image according to the i-th image parameter. Therefore, the number of synthesized images can be determined by the number of image parameters.

[0137] When the broadcast text carried in the driving instruction received by the server is different, the broadcast time required for the broadcast text may be different. The broadcast time required for the broadcast text may be the time required for the digital character in the video data to read the broadcast text. Therefore, the number of image parameters can be determined by the server according to the broadcast time required for the broadcast text.

[0138] For example, the broadcast text 1 carried by the driving instruction received by the server is "XXXXX", and the broadcast time required for the broadcast text 1 is 3 seconds. The broadcast text 2 carried by the driving instruction received by the server is "XXXXXXXXXXX", and the broadcast time required for the broadcast text 2 is 5 seconds.

[0139] In addition, assuming that the preset image set corresponds to a preset video data with a duration of 10 minutes, the preset image set includes a total of 60x60x10=36000 images. After the server returns the response information of the broadcast text 1 to the user terminal, the user terminal generates 180 synthetic images and plays them. If the user terminal side neither issues a new driving instruction to the server side nor stops playing, then in the process of video playback processing, the 180 synthetic images are played first, and then the 181st to 36000th images in the preset image set stored on the user terminal side are played. That is, in the process of video playback, the 1st to 180th synthetic images replace the first 180 images in the original preset video data.

[0140] By playing the composite image in a preset frame drop mode, a small number of composite images can be skipped to ensure that the audio data is synchronized with the action in the composite image, thereby avoiding the video picture lagging behind the video sound and affecting the video viewing effect.

[0141] In addition, in order to ensure smooth video playback, in the process of playing the composite image in a preset frame drop mode, the number of frames of the composite image played per second after the frame drop is greater than or equal to a preset frame number threshold.

[0142] The preset frame number threshold may be 25 frames.

[0143] In a specific implementation method, the composite image is played in the order of the broadcasting time of the broadcasting text; the composite image is played in a preset frame drop mode, including: starting to play audio data, executing the playback task of the composite image according to the preset playback frame rate and playback order, and calling the composite image refresh interface according to the preset refresh frequency; each time the composite image refresh interface is called, the composite image actually played during the execution of the playback task is refreshed; for each call, the composite image actually played at the first time point is obtained and the composite image expected to be played at the first time point is determined; the first time point is the time point when the composite image refresh interface is called; if it is determined that the playback speed of the composite image lags behind the playback speed of the audio data based on the composite image actually played and the composite image expected to be played, then the composite image expected to be played is played.

[0144] When the announcement text is a character string and the synthesized image is played in the order of the announcement time of the announcement text, the digital character in the video reads the character string in the order of the arrangement of the characters in the character string.

[0145] The playback order is the playback time order of the broadcast text, and the preset broadcast frame rate is the pre-configured synthetic image playback frame rate. For example, the preset broadcast frame rate FPS=25 frames / second, which means that theoretically the browser is expected to play a synthetic image every 40ms.

[0146] During the execution of the synthetic image playback task, the playback effect will be affected by the hardware device. The performance of different hardware devices is uneven. Taking the preset broadcast frame rate FPS = 25 frames / second as an example, the hardware device that plays the synthetic image may not be able to play a synthetic image in a fixed playback order every 40ms. In practical applications, it is expected that the time interval between playing two adjacent synthetic images will be fixed at a specified value, which may be difficult to achieve due to the influence of hardware devices. The browser may not be able to play each synthetic image exactly 40ms away from the last synthetic image played.

[0147] For example, the server notifies the browser and gives it a scheduled task that needs to be executed regularly, requiring the browser to play a composite image every 40ms. However, due to the limitation of the hardware device, the browser cannot do it. Sometimes, playing a composite image is 42ms away from the last time a composite image is played, and sometimes, playing a composite image is 45ms away from the last time a composite image is played. The limitation of the hardware device may cause the actual playback to be a little slower than the requirement of the scheduled task. In turn, the actual playback effect may be: 25 composite images are expected to be played in one second, but only 20 composite images are actually played, which is less than expected. This will cause the picture to lag behind the audio and the sound and picture to be out of sync.

[0148] The playback task of the composite image is performed according to the preset playback frame rate and playback order. For example, the first composite image is played in the time interval [T0, T1), the second composite image is played in the time interval [T1, T2), and the third composite image is played in the time interval [T2, T3) ... wherein the time interval between T0 and T1 is 40ms, the time interval between T1 and T2 is 40ms, and the time interval between T2 and T3 is 40ms. By presetting the playback frame rate and playback order, it is possible to determine which composite image is expected to be played at any time point.

[0149] Due to the limitation of hardware equipment, the actual synthetic image played during the execution of the playback task may not be consistent with the expectation. For example, the first synthetic image is played in the time interval [T0, T1'), the second synthetic image is played in the time interval [T1', T2'), and the third synthetic image is played in the time interval [T2', T3') ... Among them, the time interval between T0 and T1' is 42ms, the time interval between T1' and T2' is 43ms, and the time interval between T2' and T3' is 41ms.

[0150] Exemplarily, the synthetic image refresh interface may be a request animation frame interface, ie, a requestAnimationFrame interface, and the preset refresh frequency may be 60 refreshes per second, which may be approximately regarded as a refresh every 16.7 ms.

[0151] requestAnimationFrame is an interface used by browsers for timed loop operations. Its main purpose is to redraw web pages frame by frame, so that various web page animation effects can have a unified refresh mechanism, thereby saving system resources, improving system performance, and improving visual effects.

[0152] Executing the playback task of the composite image according to the preset playback frame rate and playback order, and calling the composite image refresh interface according to the preset refresh frequency can be regarded as starting two timed tasks with different intervals at the same time.

[0153] It should be noted that the interval between playing two adjacent composite images in the playback task is less than the interval at which the composite image refresh interface is called. By configuring two scheduled tasks with different intervals, it is possible to quickly detect and adjust a slight lag in the composite image playback process.

[0154] For example, a composite image is played every 40 ms, and the composite image refresh interface is called every 16.7 ms. Each time the composite image refresh interface is called, the composite image actually played during the execution of the playback task is refreshed.

[0155] Even if the actual refresh frequency of the synthetic image refresh interface is affected by the hardware equipment and there is an error, for example, it is refreshed once every 18ms, then the time interval between two adjacent calls to the synthetic image refresh interface is much less than 40ms. It is still possible to quickly discover and make timely adjustments if the synthetic image lags slightly behind the audio data during playback.

[0156] For each call, the synthetic image actually played at the first time point is obtained and the synthetic image expected to be played at the first time point is determined; the first time point is the time point when the synthetic image refresh interface is called.

[0157] For example, it is pre-configured to call the composite image refresh interface once every 16.7ms. The composite image refresh interface is called for the first time at time point T1, and the composite image actually played at time point T1 is obtained as the first composite image, and the composite image expected to be played at the first time point is determined to be the first composite image; the composite image refresh interface is called for the second time at time point T2, and the composite image actually played at time point T2 is obtained as the first composite image, and the composite image expected to be played at the first time point is determined to be the first composite image; the composite image refresh interface is called for the third time at time point T3, and the composite image actually played at time point T3 is obtained as the first composite image, and the composite image expected to be played at the first time point is determined to be the second composite image, and so on. Among them, the interval between time point T1 and time point T2 is 17ms, and the interval between time point T2 and time point T3 is 19ms.

[0158] The playback of audio data, the execution of the playback task of the composite image, and the calling of the composite image refresh interface are started at the same time point. On this basis, if the composite image actually played at the first time point is different from the composite image expected to be played at the first time point, and the frame number of the composite image actually played at the first time point in the preset image set is smaller than the frame number of the composite image expected to be played at the first time point in the preset image set, it means that the playback speed of the composite image lags behind the playback speed of the audio data.

[0159] For example, the composite image actually played at the first time point is the third composite image, and the frame number of the third composite image in the preset image set is "3". The composite image expected to be played at the first time point is the fifth composite image, and the frame number of the fifth composite image in the preset image set is "5". Therefore, the playback speed of the composite image lags behind the playback speed of the audio data.

[0160] When the composite image refresh interface is called at the first time point, the composite image actually played during the playback task execution is refreshed. The refresh process can be understood as refreshing the composite image actually played at the first time point to the composite image expected to be played at the first time point.

[0161] When it is determined that the playback speed of the composite image lags behind the playback speed of the audio data, the composite images before and after the refresh are changed. For example, the composite image actually played at the first time point before the refresh is the third composite image, and after the refresh, it is changed to the composite image expected to be played at the first time point, that is, the fifth composite image.

[0162] If the synthesized image actually played at the first time point is the same as the synthesized image expected to be played at the first time point, it can be determined that the playback speed of the synthesized image is equal to the playback speed of the audio data, in which case the synthesized images before and after the refresh remain unchanged. For example, the synthesized image actually played at the first time point before the refresh is the third synthesized image, and after the refresh is changed to the synthesized image expected to be played at the first time point, that is, the third synthesized image.

[0163] For example, audio data is played at time T0, the playback task of the composite image is started at time T0, and the composite image refresh interface is called at time T0. During the execution of the playback task, a composite image is expected to be played every 40ms, but in fact, a composite image may be played every 41ms, every 42ms, etc. The composite image refresh interface is expected to be called every 16.7ms, but in fact, the composite image refresh interface may be called every 17ms, every 18ms, etc.

[0164] During the playback of the audio data, at time point T0, the browser plays the first synthetic image based on the requirements of the playback task, and the browser calls the synthetic image refresh interface for the first time, and the first synthetic image is used before and after the refresh; at time point T1, the browser calls the synthetic image refresh interface for the second time, and the first synthetic image is used before and after the refresh; at time point T2, the browser calls the synthetic image refresh interface for the second time, and the first synthetic image is used before and after the refresh; at time point T3, the browser plays the second synthetic image based on the requirements of the playback task; at time point T4, the browser calls the synthetic image refresh interface for the third time, and the second synthetic image is used before and after the refresh…

[0165] Among them, the interval between time point T1 and time point T0 is 17ms, the interval between time point T2 and time point T1 is 18ms, the interval between time point T3 and time point T0 is 41ms, and the interval between time point T4 and time point T2 is 17ms.

[0166] In the case of a small time error, the playback lag of the composite image may not be exposed immediately. By frequently calling the composite image refresh interface, the playback lag of the composite image can be discovered in time and adjusted quickly. In the case that the difference between the frame number of the composite image to be played and the frame number of the composite image actually played is greater than 1, the playback of a small number of composite images can be skipped to ensure that the playback speed of the composite image is consistent with the playback speed of the audio data. In addition, since the frequency of calling the composite image refresh interface is relatively frequent compared to the preset playback frequency of the playback task, the possibility of skipping too many composite images can be reduced to avoid users watching the video of the digital character from visually perceiving frame skipping.

[0167] The following can be combined Figure 3 The specific implementation process of the preset frame drop mode is illustrated by way of example.

[0168] Figure 3 A partial flow chart of a video playback method provided in an embodiment of the present application shows a specific implementation process of playing a composite image according to a preset frame drop mode in the video playback method.

[0169] like Figure 3 As shown, step S302, recording time information and total frame number.

[0170] Considering that the audio data and the synthetic image start playing at the same time, the time point for starting to play the audio data, starting to execute the synthetic image playing task, and starting to call the synthetic image refresh interface are all the same time point.

[0171] The time information may include the time point startTime when the audio data starts to be played. The recording time information may be recording startTime when the audio data starts to be played.

[0172] Considering that audio and video synchronization can be achieved during video playback, the audio data and the synthesized image finish playing at the same time, so the duration of the audio data and the execution duration of the playback task of the synthesized image are the same time length.

[0173] The time information may also include the duration of the audio data, totalTime. The recording time information may be determined based on the audio data, or may be calculated based on a preset playback frame rate and the number of synthesized images to obtain totalTime.

[0174] Record the total number of frames, which is the number of synthesized images and can be represented by imgArr.length.

[0175] Step S304, playing the synthesized image.

[0176] The user terminal can use the draw image function to draw the specified Image at the specified position with the original physical size to play the composite image.

[0177] During specific implementation, the draw image function may be called according to a preset playback frame rate, so as to perform the playback task of the synthesized image according to the preset playback frame rate and playback order.

[0178] Taking into account hardware limitations, the actual playback frame rate of the synthesized image may be lower than the preset playback frame rate.

[0179] For example, if the FPS is 25 frames per second, the user terminal needs to play 25 synthetic images per second, that is, play one synthetic image every 40ms. However, whether the browser cycle clock of the user terminal is fixed depends on the hardware performance. In actual applications, it is often difficult to cycle every 40ms. It may be played once every 42ms, once every 43ms, and so on.

[0180] Step S306: calling a preset interface according to a preset refresh frequency.

[0181] The preset interface may be a request animation frame interface, that is, a requestAnimationFrame interface.

[0182] The preset refresh frequency may be determined by a preset frame rate. For example, if the preset frame rate is 60 frames per second, the preset refresh frequency may be 60 refreshes per second.

[0183] The preset playback frame rate used in the playback task of the composite image is 25 frames per second, and the preset frame rate corresponding to the preset refresh frequency may be greater than the preset playback frame rate used in the playback task of the composite image.

[0184] Each time the preset interface is called, the time point at which the preset interface is called, ie, the aforementioned first time point, can be collected through the function Date.now().

[0185] For each call, the composite image actually played at the time when the preset interface is called can be obtained, and the composite image expected to be played at the time when the preset interface is called can also be obtained based on the time when the preset interface is called, startTime, totalTime and imgArr.length. In specific implementation, in order to facilitate the subsequent comparison of two composite images, the composite image actually played at the time when the preset interface is called can be represented by the frame number in the preset image set, and the composite image expected to be played at the time when the preset interface is called can be represented by the frame number in the preset image set.

[0186] Each time the preset interface is called, the actually played composite image can be refreshed to the expected composite image. If the frame numbers of the actually played composite image and the expected composite image are the same, the composite image played before and after the refresh remains unchanged; if the frame number of the expected composite image is greater than or equal to 1 than the frame number of the actually played composite image, the composite image played before and after the refresh changes.

[0187] Step S304 and step S306 can be regarded as two timing loop operations started simultaneously but with different intervals.

[0188] Due to the similarity of technical concepts, Figure 3 The description of the embodiment is relatively simple, and for the relevant parts, please refer to the corresponding description of the method embodiment provided above.

[0189] In a specific implementation, determining a composite image expected to be played at a first time point includes: determining a time point for starting to play audio data as a second time point; and determining a composite image expected to be played at the first time point based on the first time point, the second time point, and the number of composite images.

[0190] As shown in the following formula (2):

[0191] The frame number of the composite image to be played at the first time point = (first time point - second time point) / first time length * number of composite images = second time length / first time length * number of composite images (2)

[0192] It should be noted that the premise for the above formula (2) to be valid is that the duration of the audio data is the same as the expected duration of the synthetic image playback task. For example, if the duration of the audio data is 10 minutes, it is expected to take 10 minutes to complete the synthetic image playback task.

[0193] For each call, the first time point is the time point when the synthetic image refresh interface is called. The second time point is the time point when the audio data starts to be played. The first time length can be the duration of the audio data, or it can be the expected duration of the synthetic image playback task calculated based on the number of synthetic images and the preset playback frame rate.

[0194] Determining the composite image expected to be played at the first time point according to the first time point, the second time point and the number of composite images may be performed by obtaining the first time length, determining the second time length according to the first time point and the second time point, and determining the composite image expected to be played at the first time point according to the first time length, the second time length and the number of composite images.

[0195] Acquiring the first time length may be acquiring the time length of the audio data and using the time length as the first time length, or the first time length may be calculated according to the number of synthesized images and a preset playback frame rate.

[0196] In a specific implementation, a composite image expected to be played at the first time point is determined based on the first time point, the second time point and the number of composite images, including: determining a first time length based on the number of composite images and a preset playback frame rate; performing a difference processing between the first time point and the second time point to obtain a second time length; determining a composite image expected to be played at the first time point based on the first time length, the second time length and the number of composite images.

[0197] The preset playback frame rate reflects how many composite images are expected to be played per second, and the number of composite images reflects how many composite images need to be played in total. Therefore, the preset playback frame rate and the number of composite images can be used to calculate how long it is expected to take to play each composite image.

[0198] The first time length is determined according to the number of synthesized images and the preset playback frame rate, and the first time length may be obtained by taking the quotient of the number of synthesized images and the preset playback frame rate.

[0199] For example, the number of composite images is 250 frames, that is, there are a total of 250 composite images to be played. The preset playback frame rate is 25 frames / second. The number of composite images and the preset playback frame rate are divided to obtain the first time length, that is, 250 / 25=10 seconds, and the first time length is 10 seconds.

[0200] The first time point is the time point when the synthetic image refresh interface is called, and the second time point is the time point when the audio data starts to play. Then, a difference processing is performed based on the first time point and the second time point to obtain a second time length, which is the time interval between the time point when the synthetic image refresh interface is called and the time point when the audio data starts to play.

[0201] Determining the composite image expected to be played at the first time point based on the first time length, the second time length and the number of composite images may be performed by calculating the frame number of the composite image expected to be played at the first time point in a preset image set based on the first time length, the second time length and the number of composite images.

[0202] In a specific implementation, video playback processing is performed based on the composite image and audio data, including: obtaining the interval time length between two adjacent frames of composite images; determining the number of target images based on the interval time length, and the correspondence between the pre-configured time length and the number of composite images; and when the number of received composite images is equal to the number of target images, performing video playback processing based on the composite image and audio data.

[0203] In the process of the user terminal receiving the response information of the driving instruction returned by the server, the server can return the image parameter to the user terminal each time it generates an image parameter. On this basis, the interval time length of two adjacent frames of synthetic images can be the time interval between the server generating two adjacent image parameters, and each image parameter corresponds to a synthetic image.

[0204] Because the server may take a long time to infer a single frame of an image under high concurrency, taking FPS of 25 frames per second as an example, if the server infers that the time interval between the image parameters of the two target images is greater than 40ms, the user terminal may be confused when directly playing the synthesized image. In this case, you can first determine how many synthesized images to wait for before starting to play based on the device performance on the user terminal. For example, if the server infers that the time interval between the image parameters of the two target images is 60ms, you can wait until the 10th frame is transmitted before starting to play the audio data and the synthesized image.

[0205] The number of synthesized images that need to be collected before starting to play is determined according to the device performance on the user terminal side, and this can be achieved by pre-configuring the corresponding relationship between the time length and the number of synthesized images.

[0206] The target number of images can be determined based on the interval time length and the correspondence between the pre-configured time length and the number of synthesized images. The number of synthesized images corresponding to the interval time length can be determined based on the correspondence between the interval time length and the pre-configured time length and the number of synthesized images, and this number can be used as the target number of images.

[0207] When the number of received composite images is equal to the number of target images, video playback processing is performed based on the composite images and audio data.

[0208] In such Figure 2In the embodiment shown, first, a driving instruction is sent to the server; the driving instruction carries the broadcast text of the digital character; then, a response message of the driving instruction is received; the response message is generated and sent by the server according to the broadcast text; the response message includes the audio data of the broadcast text and the image parameters required to generate the target part image of the digital character; then, according to the image parameters, the target part image is generated, and the target part image and the pre-stored overall image of the digital character are synthesized to obtain a synthesized image; finally, the video playback process is performed according to the synthesized image and the audio data. In this way, the broadcast text carried in the driving instruction can be used for the server to generate the audio data of the broadcast text and the image parameters for generating the target part image of the digital character. Therefore, the broadcast text can be used to drive the server to change the target part image of the digital character, so that the target part of the digital character when reading the broadcast text in the video looks consistent with the target part of the real human when reading the broadcast text. In addition, by synthesizing the target part image and the pre-stored overall image of the digital character, the change of the target part image driven by the broadcast text can be reflected in the overall image of the digital character. Taking into account that in a live broadcast scenario, when a digital character reads a text in a video, most parts of the overall image are not affected by the text, and only a small number of parts will change as the text read by the digital character changes, therefore, by pre-storing the overall image of the digital character in the user terminal, the images of most parts that are not affected by the text can be reused, reducing the amount of data transmitted between the user terminal and the server, shortening the time for generating image parameters, and reducing the time delay between the user terminal sending a drive instruction carrying the text to the server and the digital character reading the text in the video during the live broadcast, thereby improving the real-time performance of video playback.

[0209] Based on the same technical concept, the embodiment of the present application also provides another video playback method. The implementation process of the above-mentioned video playback method can be executed by the user terminal, and the implementation process of the other video playback method provided in the following method embodiment can be executed by the server. The two can cooperate with each other during the execution process. Therefore, the reading of the above-mentioned implementation process can refer to the corresponding content of the following another video playback method embodiment, and accordingly, the reading of the following another video playback method embodiment can also refer to the corresponding content of the above-mentioned method embodiment. Figure 4 This is a processing flow chart of another video playback method provided in an embodiment of the present application. Figure 4 The video playback method provided in this embodiment is applied to a server and specifically includes steps S402 to S406.

[0210] like Figure 4 As shown, step S402, receiving a driving instruction sent by a user terminal; the driving instruction carries a broadcast text of the digital character.

[0211] This step can refer to Figure 2 The corresponding description part of step S202 of the embodiment.

[0212] Step S404, generating audio data and image parameters of the broadcast text according to the broadcast text; the image parameters are used to generate a target part image of the digital character.

[0213] The audio data of the broadcast text is generated according to the broadcast text, and the broadcast text can be input into a TTS (Text To Speech) module for text-to-speech processing to obtain the audio data of the broadcast text.

[0214] According to the broadcast text, the image parameters are generated, which can be generated according to the preset digital human driving algorithm and the broadcast text, or according to the preset digital human driving algorithm and audio data. The image parameters are used to generate the target part image of the digital human.

[0215] In a specific implementation, a server stores a preset image set; the preset image set includes multiple images, wherein each image describes the overall image of a digital character at a corresponding time point in preset video data; based on the broadcast text, audio data and image parameters of the broadcast text are generated, including: performing text-to-speech processing on the broadcast text to obtain audio data; driving a network to convert the audio data and the preset image set to obtain initial image parameters; the initial image parameters include a frame number of a target part image to be generated in the preset image set, a character string representing the target part image to be generated, and position information of a target part described by the target part image to be generated in the corresponding overall image in the preset image set; encoding the character string to obtain encoding information of the target part image to be generated; replacing the character string in the initial image parameters with the encoding information to obtain image parameters.

[0216] A preset image set is stored in both the server and the user terminal. The preset image set includes a plurality of images, wherein each image describes the overall image of a digital character at a corresponding time point in preset video data.

[0217] In specific implementation, audio data and a preset image set can be input into a driving network for conversion processing to obtain initial image parameters; the initial image parameters include the frame number of the target part image to be generated in the preset image set, a character string representing the target part image to be generated, and the position information of the target part described by the target part image to be generated in the corresponding overall image in the preset image set.

[0218] Exemplarily, the driving network may be a Wav2lip network, which is a model that can drive lip movements by voice. The input data of the model may include audio data and a preset image set, and the output data of the model may include multiple initial image parameters, wherein each initial image parameter includes a frame number, a string, and position information.

[0219] For example, the target part is the lip, and the target part image describing the target part is a lip shape map. The preset image set includes 1-200 images, and the preset image set is used for the preset driving model to refer to the position of the lip in each image and some visual features of the lip. Specifically, the preset image set is used for the preset driving model to refer to some visual features of the lip, so that the generated lip shape map can be pasted back on the face without any discord.

[0220] The audio data is 1 second long and can be used to drive the generation of 60 images. The audio data is used to drive the model to determine the changes in lip shape. If only audio data is used to drive, the lip shape changes can be obtained, but when the lip shape image is pasted back to the face, it may look like the mouth and the entire face are not the same person, like using an image processing application to paste a very strange lip image on a person's face, which is very inconsistent and reduces the video playback effect of the digital character. Therefore, the input of the driving model requires both audio data and a preset image set.

[0221] After receiving the audio data and the preset image set, the driving network outputs 60 image parameters: the first image parameter includes: frame number 1, a character string representing the first lip shape image, and the position of the lips in the first image of the preset image set; the second image parameter includes: frame number 2, a character string representing the second lip shape image, and the position of the lips in the second image of the preset image set; ...; the 60th image parameter includes: frame number 60, a character string representing the 60th lip shape image, and the position of the lips in the 60th image of the preset image set.

[0222] The character string is encoded to obtain the encoding information of the target part image to be generated. The binary character string may be encoded according to a preset encoding method to obtain the encoding information of the target part image to be generated, and the encoding information is a non-binary character string.

[0223] Exemplarily, the preset encoding method may be base64.

[0224] In a specific implementation, the driving network converts the audio data and the preset image set to obtain initial image parameters, including: the driving network converts the audio data and the preset image set according to the required playback time of the audio data to obtain N initial image parameters.

[0225] N can be a natural number greater than 1.

[0226] The number of initial image parameters output by the driving network is affected by the playback time required for the audio data. The longer the playback time required for the audio data, the larger the value of N, and the shorter the playback time required for the audio data, the smaller the value of N.

[0227] For example, if the required playback time of the audio data is 4 seconds and the preset playback frame rate FPS = 25 frames per second, it can be determined that it takes 4 seconds for the digital character to finish reading the broadcast text in the video, and a total of 4x25 = 100 target part images need to be generated. The number of initial image parameters is the same as the number of target part images to be generated, so the driving network converts the audio data and the preset image set according to the required playback time of the audio data "4 seconds" to obtain 100 initial image parameters.

[0228] In a specific implementation, the driving instruction also includes a target scene identifier of the broadcast scene in which the digital character is located; the video playback method also includes: determining a preset image set corresponding to the target scene identifier based on the target scene identifier and the correspondence between the pre-configured scene identifier and the image set.

[0229] The server may be pre-configured with a plurality of broadcast scenes and a set of preset images for each broadcast scene.

[0230] The scene identifier can be used to determine a unique corresponding broadcast scene among multiple broadcast scenes pre-configured by the server, and then obtain a preset image set of the broadcast scene.

[0231] In the case where the driving instruction includes the target scene identifier, the server may determine the image set corresponding to the target scene identifier according to the target scene identifier and a correspondence between the pre-configured scene identifier and the image set.

[0232] In a specific implementation, the driving instruction also includes a character identification of the digital character; the driving network converts and processes the audio data and a preset image set to obtain initial image parameters, including: the preset driving network converts and processes based on the character identification, audio data and a preset image set input to obtain initial image parameters.

[0233] The picture frames in the preset image set may include one digital character or multiple digital characters. Through the character identification, a unique corresponding digital character can be determined among the multiple digital characters.

[0234] In specific implementation, the character identification, audio data and preset image set can be input into the driving network for conversion processing to obtain initial image parameters.

[0235] In this implementation, the character identification is used for the driving network to determine a specified digital character from multiple digital characters in a preset image set. When determining the digital character, on the one hand, the preset driving network can determine the position information of the target part described by the target part image in the overall image of the digital character corresponding to the character identification. On the other hand, there may be some differences in the lip visual features of different digital characters. For example, digital character 1 looks like she has applied lipstick, and digital character 2 looks pale and flaky. The driving network can refer to the lip visual features of the specified digital character when generating the lip shape map, so that the lip shape map does not look inconsistent when it is pasted back on the face.

[0236] In a specific implementation, the driving instruction also includes a character identification of the digital character; performing text-to-speech processing on the broadcast text to obtain audio data, including: determining the voice type of the digital character based on the character identification; and performing text-to-speech processing on the broadcast text according to the voice type to obtain audio data.

[0237] Different digital characters can be pre-configured with different voice types.

[0238] For example, the voice type of digital human 1 is soprano, the voice type of digital human 2 is children's voice, the voice type of digital human 3 is bass, and so on.

[0239] According to the character identification, a query process can be performed in the pre-configured correspondence between the character identification and the sound type to obtain the sound type corresponding to the character identification, and the sound type is determined as the sound type of the digital character. According to the sound type, the broadcast text is converted into speech to obtain audio data.

[0240] Step S406, using the audio data and image parameters as response information of the driving instruction, sending the response information to the user terminal, so that the user terminal generates a target part image according to the image parameters, synthesizes the target part image and the overall image of the pre-stored digital character to obtain a synthesized image, and performs video playback processing according to the synthesized image and the audio data.

[0241] This step can refer to Figure 2 The corresponding description part of step S204 to step S208 in the embodiment.

[0242] Since the technical concept is the same, the description in this embodiment is relatively simple, and the relevant parts may refer to the corresponding description of the method embodiment provided above.

[0243] Based on the same technical concept, the embodiment of the present application also provides a video playback method. Figure 5 A schematic diagram of interaction between a user terminal and a server in a video playback method provided in an embodiment of the present application.

[0244] like Figure 5 As shown, the user terminal 502 sends character information and broadcast text to the server 504, which can be referred to Figure 2 The corresponding description part of step S202 in the embodiment.

[0245] The character information may include a character identification of the digital character, and may also include a scene identification of the broadcast scene in which the digital character is located.

[0246] The server 504 sends the facial information of the person to the user terminal 502. Figure 2 The corresponding description part of step S204 in the embodiment.

[0247] The facial information of a person may include image parameters required for generating a target part image. For example, the target part described by the target part image may be the face or the lips.

[0248] The server 504 may also send audio data of the broadcast text to the user terminal 502 .

[0249] After receiving the facial information of the person, the user terminal 502 can generate a target part image according to the facial information of the person, and synthesize the target part image and the overall image of the pre-stored digital person to obtain a synthesized image, and perform video playback processing according to the synthesized image and audio data. Figure 2 The corresponding description part of step S206 to step S208 in the embodiment.

[0250] Since the technical concept is the same, the description in this embodiment is relatively simple, and the relevant parts may refer to the corresponding description of the method embodiment provided above.

[0251] Figure 6 Another schematic diagram of interaction between a user terminal and a server in a video playback method is provided for an embodiment of the present application.

[0252] like Figure 6 As shown, step S602, establishing a connection.

[0253] A communication connection can be established between the user terminal and the server.

[0254] For example, a connection is established between the user terminal and the server via websocket.

[0255] Websocket is a network communication protocol. It is a protocol provided by HTML5 (Hyper Text Markup Language 5) for full-duplex communication on a single TCP (Transmission Control Protocol) connection.

[0256] Step S604: Send connection test information.

[0257] The user terminal may send connection test information to the server.

[0258] For example, sending a heartbeat ping command.

[0259] Ping (Packet Internet Groper) is a program used to test network connectivity. Ping is a service command that works at the application layer of the TCP / IP (Transmission Control Protocol / Internet Protocol) network architecture. It mainly sends ICMP (Internet Control Message Protocol) Echo request messages to a specific destination host to test whether the destination station is reachable and understand its status.

[0260] Step S606: receiving response information of the connection test information.

[0261] The user terminal receives response information of the connection test information, and the response information indicates that the user terminal and the server are in a communicable state.

[0262] Step S608: sending a driving instruction.

[0263] This step can refer to Figure 2 The corresponding description part of step S202 in the embodiment.

[0264] Step S610, receiving preprocessing information.

[0265] Step S612, receiving audio data.

[0266] Step S612 may be executed before step S614, so that the user terminal performs audio playback preprocessing on the audio data, and the user terminal can play the audio data and the synthesized image simultaneously.

[0267] Step S614, receiving image parameters required for generating an image of the target part.

[0268] Each target region image has a corresponding image parameter.

[0269] When there are multiple target part images, the user terminal may execute step S614 multiple times.

[0270] Steps S610 to S614 can refer to Figure 2The corresponding description part of step S604 in the embodiment.

[0271] The user terminal can also generate a target part image according to the image parameters and synthesize the target part image and the overall image of the pre-stored digital character to obtain a synthesized image, and play the video synchronously with sound and picture. For details, please refer to Figure 2 Steps S206 to S208 in the embodiment.

[0272] Step S616, receiving end notification.

[0273] The user terminal may receive an end flag generated by the server, that is, an end identifier, which is used to notify the user terminal that the server has completed all data transmissions.

[0274] Step S618, disconnect.

[0275] For example, the websocket connection between the user terminal and the server is disconnected.

[0276] Since the technical concept is the same, the description in this embodiment is relatively simple, and the relevant parts may refer to the corresponding description of the method embodiment provided above.

[0277] Figure 7 A schematic diagram of image synthesis in a video playback method is provided for an embodiment of the present application.

[0278] like Figure 7 As shown, a preset image set is stored in both the server and the user terminal. The preset image set includes a plurality of images, wherein each image describes the overall image of a digital character at a corresponding time point in the preset video data.

[0279] The frame number of the target part image 702 in the preset image set pre-stored in the server is frame1, the frame number of the target part image 704 in the preset image set is frame2, the frame number of the target part image 706 in the preset image set is frame3, the frame number of the target part image 708 in the preset image set is frame4, the frame number of the target part image 710 in the preset image set is frame5, the frame number of the target part image 712 in the preset image set is frame6, the frame number of the target part image 714 in the preset image set is frame7, and the frame number of the target part image 716 in the preset image set is frame8.

[0280] The frame number of the overall image 718 of the digital character in the preset image set pre-stored in the user terminal is frame1, the frame number of the overall image 720 of the digital character in the preset image set is frame2, the frame number of the overall image 722 of the digital character in the preset image set is frame3, the frame number of the overall image 724 of the digital character in the preset image set is frame4, the frame number of the overall image 726 of the digital character in the preset image set is frame5, the frame number of the overall image 728 of the digital character in the preset image set is frame6, the frame number of the overall image 730 of the digital character in the preset image set is frame7, and the frame number of the overall image 732 of the digital character in the preset image set is frame8.

[0281] On this basis, multiple image pairs with the same frame number can be determined, each image pair including a target part image and an overall image of a digital character. The target part image and the overall image of the digital character in each image pair are synthesized to obtain a synthesized image 734, which can be referred to Figure 2 The corresponding description part of step S206 in the embodiment.

[0282] For example, the frame number of the target part image 716 in the preset image set pre-stored in the server is frame8, and the frame number of the overall image 732 of the digital character in the preset image set pre-stored in the user terminal is frame8, then the target part image 716 and the overall image 732 of the digital character are synthesized to obtain a synthesized image 734.

[0283] Since the technical concept is the same, the description in this embodiment is relatively simple, and the relevant parts may refer to the corresponding description of the method embodiment provided above.

[0284] Figure 8 An interface diagram of a synthesized image in a video playback method is provided for an embodiment of the present application.

[0285] like Figure 8 As shown, the user terminal synthesizes the target part image 804 and the pre-stored overall image 802 of the digital character to obtain a synthesized image 806. For details, please refer to Figure 2 The corresponding description part of step S206 in the embodiment.

[0286] Since the technical concept is the same, the description in this embodiment is relatively simple, and the relevant parts may refer to the corresponding description of the method embodiment provided above.

[0287] An embodiment of a video playback device provided in this specification is as follows:

[0288] In the above-mentioned embodiment, a video playback method applied to a user terminal is provided. Based on the same technical concept, the embodiment of the present application also provides a video playback device, which is described below in conjunction with the accompanying drawings.

[0289] Fig. 9 A schematic diagram of a video playback device provided in an embodiment of the present application. This embodiment provides a video playback device 900, which runs on a user terminal and includes:

[0290] The sending unit 902 is used to send a driving instruction to the server; the driving instruction carries the broadcast text of the digital character;

[0291] The receiving unit 904 is used to receive the response information of the driving instruction; the response information is generated and sent by the server according to the broadcast text; the response information includes the audio data of the broadcast text and the image parameters required to generate the target part image of the digital character;

[0292] A generating unit 906 is used to generate the target part image according to the image parameters, and synthesize the target part image and the pre-stored overall image of the digital character to obtain a synthesized image;

[0293] The playback unit 908 is configured to perform video playback processing according to the synthesized image and the audio data.

[0294] Optionally, the image parameters include coding information and position information of the target part described by the target part image in the overall image; when the generating unit 906 generates the target part image according to the image parameters and synthesizes the target part image and the pre-stored overall image of the digital character to obtain a synthesized image, the following steps are performed:

[0295] Performing image generation processing according to the coding information to obtain the target part image;

[0296] Determining a region to be processed in the overall image of the digital character according to the position information;

[0297] The target part image is used to perform occlusion processing on the area to be processed in the overall image of the digital character to obtain the synthesized image.

[0298] Optionally, the server and the user terminal both store a preset image set; the preset image set includes a plurality of images, wherein each image describes the overall image of the digital character at a corresponding time point in the preset video data; the image parameter also includes a frame number of the target part image to be generated in the preset image set pre-stored in the server; the video playback device 900 also includes:

[0299] The query unit is used to perform query processing on a preset image set pre-stored in the user terminal according to the frame sequence number to obtain the overall image of the digital character.

[0300] Optionally, when performing video playback processing according to the synthesized image and the audio data, the playback unit 908 performs the following steps:

[0301] During the process of playing the audio data, the synthetic image is played according to a preset frame drop method; the number of the synthetic images is determined by the number of the image parameters, and one image parameter corresponds to one synthetic image; the number of the image parameters is determined by the server according to the broadcast time required for the broadcast text.

[0302] Optionally, the synthesized image is played in the order of the broadcasting time of the broadcasting text; when the playback unit 908 plays the synthesized image in a preset frame drop mode, the playback unit 908 performs the following steps:

[0303] Start playing audio data, execute the playing task of the composite image according to the preset playing frame rate and playing order, and call the composite image refresh interface according to the preset refresh frequency; each time the composite image refresh interface is called, the composite image actually played during the execution of the playing task is refreshed;

[0304] For each call, obtaining a synthetic image actually played at a first time point and determining a synthetic image expected to be played at the first time point; the first time point is a time point when the synthetic image refresh interface is called;

[0305] If it is determined, based on the actually played composite image and the expected played composite image, that the playing speed of the composite image lags behind the playing speed of the audio data, the expected played composite image is played.

[0306] Optionally, when determining the composite image to be played at the first time point, the playing unit 908 performs the following steps:

[0307] Determine a time point at which the audio data starts to be played as a second time point;

[0308] The composite image expected to be played at the first time point is determined according to the first time point, the second time point and the number of the composite images.

[0309] Optionally, when the playing unit 908 determines the composite image to be played at the first time point according to the first time point, the second time point and the number of the composite images, the playing unit 908 performs the following steps:

[0310] Determining a first time length according to the number of the composite images and the preset playback frame rate;

[0311] Performing a difference process on the first time point and the second time point to obtain a second time length;

[0312] The composite image expected to be played at the first time point is determined according to the first time length, the second time length, and the number of the composite images.

[0313] Optionally, when performing video playback processing according to the synthesized image and the audio data, the playback unit 908 performs the following steps:

[0314] Obtain the time interval between two adjacent frames of synthetic images;

[0315] Determining the number of target images according to the interval time length and the correspondence between the pre-configured time length and the number of the synthesized images;

[0316] When the number of the received composite images is equal to the number of the target images, video playback processing is performed according to the composite images and the audio data.

[0317] In an embodiment of the present application, a video playback device includes: a sending unit for sending a driving instruction to a server; the driving instruction carries a broadcast text of a digital character; a receiving unit for receiving a response message of the driving instruction; the response message is generated and sent by the server according to the broadcast text; the response message includes the audio data of the broadcast text and the image parameters required to generate the target part image of the digital character; a generating unit for generating the target part image according to the image parameters, and synthesizing the target part image and the pre-stored overall image of the digital character to obtain a synthesized image; a playing unit for performing video playback processing according to the synthesized image and the audio data. In this way, the broadcast text carried in the driving instruction can be used by the server to generate the audio data of the broadcast text and the image parameters for generating the target part image of the digital character. Therefore, the broadcast text can be used to drive the server to change the target part image of the digital character, so that the target part of the digital character when reading the broadcast text in the video looks consistent with the target part of the real human when reading the broadcast text. In addition, by synthesizing the target part image and the pre-stored overall image of the digital character, the change of the target part image driven by the broadcast text can be reflected in the overall image of the digital character. Taking into account that in a live broadcast scenario, when a digital character reads a text in a video, most parts of the overall image are not affected by the text, and only a small number of parts will change as the text read by the digital character changes, therefore, by pre-storing the overall image of the digital character in the user terminal, the images of most parts that are not affected by the text can be reused, reducing the amount of data transmitted between the user terminal and the server, shortening the time for generating image parameters, and reducing the time delay between the user terminal sending a drive instruction carrying the text to the server and the digital character reading the text in the video during the live broadcast, thereby improving the real-time performance of video playback.

[0318] An embodiment of a video playback device provided in this specification is as follows:

[0319] In the above-mentioned embodiment, a video playback method applied to a server is provided. Based on the same technical concept, the embodiment of the present application also provides a video playback device, which is described below in conjunction with the accompanying drawings.

[0320] Fig.10 This is a schematic diagram of another video playback device provided in an embodiment of the present application. This embodiment provides a video playback device 1000, which runs on a server and includes:

[0321] The receiving unit 1002 is used to receive a driving instruction sent by a user terminal; the driving instruction carries a broadcast text of the digital character;

[0322] The generating unit 1004 is used to generate audio data and image parameters of the broadcast text according to the broadcast text; the image parameters are used to generate a target part image of the digital character;

[0323] The sending unit 1006 is used to send the response information to the user terminal using the audio data and the image parameters as response information of the driving instruction, so that the user terminal generates the target part image according to the image parameters, synthesizes the target part image and the pre-stored overall image of the digital character to obtain a synthesized image, and performs video playback processing according to the synthesized image and the audio data.

[0324] Optionally, the server stores a preset image set; the preset image set includes a plurality of images, wherein each image describes the overall image of the digital character at a corresponding time point in the preset video data; when the generating unit 1004 generates the audio data of the broadcast text and the image parameters according to the broadcast text, the generating unit 1004 performs the following steps:

[0325] Performing text-to-speech processing on the broadcast text to obtain audio data;

[0326] The driving network converts the audio data and the preset image set to obtain initial image parameters; the initial image parameters include a frame number of the target part image to be generated in the preset image set, a character string representing the target part image to be generated, and position information of the target part described by the target part image to be generated in the overall image corresponding to the preset image set;

[0327] Encoding the character string to obtain encoding information of the target part image to be generated;

[0328] The character string in the initial image parameter is replaced by the encoding information to obtain the image parameter.

[0329] Optionally, when the generating unit 1004 drives the network to convert the audio data and the preset image set to obtain initial image parameters, it performs the following steps:

[0330] The driving network performs conversion processing on the audio data and the preset image set according to the required playback time of the audio data to obtain N initial image parameters.

[0331] Optionally, the driving instruction further includes a target scene identifier of the broadcast scene where the digital character is located; and the video playback device 1000 further includes:

[0332] According to the target scene identifier and the correspondence between the pre-configured scene identifier and the image set, a preset image set corresponding to the target scene identifier is determined.

[0333] Optionally, the driving instruction further includes a character identification of the digital character; when the generating unit 1004 drives the network to convert the audio data and the preset image set to obtain initial image parameters, the generating unit 1004 performs the following steps:

[0334] The preset driving network performs conversion processing based on the character identification, the audio data and the preset image set input to obtain the initial image parameters.

[0335] Optionally, the generating unit 1004 further includes a character identification of the digital character in the driving instruction; and when the text-to-speech processing is performed on the announcement text to obtain the audio data, the following steps are performed:

[0336] Determining the voice type of the digital character according to the character identification;

[0337] According to the sound type, the broadcast text is converted into speech to obtain the audio data.

[0338] In the embodiment of the present application, the video playback device includes: a receiving unit for receiving a driving instruction sent by a user terminal; the driving instruction carries a broadcast text of a digital character; a generating unit for generating audio data and image parameters of the broadcast text according to the broadcast text; the image parameters are used to generate a target part image of the digital character; a sending unit for sending a response information to the user terminal using the audio data and image parameters as response information of the driving instruction, so that the user terminal generates a target part image according to the image parameters, synthesizes the target part image and the pre-stored overall image of the digital character to obtain a synthesized image, and performs video playback processing according to the synthesized image and audio data. In this way, the broadcast text carried in the driving instruction can be used for the server to generate the audio data of the broadcast text and the image parameters for generating the target part image of the digital character. Therefore, the broadcast text can be used to drive the server to change the target part image of the digital character, so that the target part of the digital character when reading the broadcast text in the video looks consistent with the target part of the real human when reading the broadcast text. In addition, by synthesizing the target part image and the pre-stored overall image of the digital character, the change of the target part image driven by the broadcast text can be reflected in the overall image of the digital character. Taking into account that in a live broadcast scenario, when a digital character reads a text in a video, most parts of the overall image are not affected by the text, and only a small number of parts will change as the text read by the digital character changes, therefore, by pre-storing the overall image of the digital character in the user terminal, the images of most parts that are not affected by the text can be reused, reducing the amount of data transmitted between the user terminal and the server, shortening the time for generating image parameters, and reducing the time delay between the user terminal sending a drive instruction carrying the text to the server and the digital character reading the text in the video during the live broadcast, thereby improving the real-time performance of video playback.

[0339] Corresponding to the video playback method described above, based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the video playback method provided above. Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0340] like Fig.11As shown, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 1101 and memory 1102, and the memory 1102 may store one or more storage applications or data. Among them, the memory 1102 may be a short-term storage or a persistent storage. The application stored in the memory 1102 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 1101 may be configured to communicate with the memory 1102 and execute a series of computer executable instructions in the memory 1102 on the electronic device. The electronic device may also include one or more power supplies 1103, one or more wired or wireless network interfaces 1104, one or more input / output interfaces 1105, one or more keyboards 1106, etc.

[0341] In a specific embodiment, the electronic device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the electronic device, and the one or more programs configured to be executed by one or more processors include the following computer executable instructions:

[0342] Sending a driving instruction to the server; the driving instruction carries the broadcast text of the digital character;

[0343] receiving response information of the driving instruction; the response information is generated and sent by the server according to the broadcast text; the response information includes audio data of the broadcast text and image parameters required for generating the target part image of the digital character;

[0344] Generating the target part image according to the image parameters, and synthesizing the target part image and the pre-stored overall image of the digital character to obtain a synthesized image;

[0345] Video playback processing is performed according to the synthesized image and the audio data.

[0346] In another specific embodiment, the electronic device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the electronic device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:

[0347] Receiving a driving instruction sent by a user terminal; the driving instruction carries a broadcast text of the digital character;

[0348] According to the broadcast text, audio data and image parameters of the broadcast text are generated; the image parameters are used to generate a target part image of the digital character;

[0349] The audio data and the image parameters are used as response information of the driving instruction, and the response information is sent to the user terminal, so that the user terminal generates the target part image according to the image parameters, synthesizes the target part image and the pre-stored overall image of the digital character to obtain a synthesized image, and performs video playback processing according to the synthesized image and the audio data.

[0350] The computer-readable storage medium provided in this embodiment is used to store computer-executable instructions. When the computer-executable instructions are executed by a processor, the following process is implemented:

[0351] Sending a driving instruction to the server; the driving instruction carries the broadcast text of the digital character;

[0352] receiving response information of the driving instruction; the response information is generated and sent by the server according to the broadcast text; the response information includes audio data of the broadcast text and image parameters required for generating the target part image of the digital character;

[0353] Generating the target part image according to the image parameters, and synthesizing the target part image and the pre-stored overall image of the digital character to obtain a synthesized image;

[0354] Video playback processing is performed according to the synthesized image and the audio data.

[0355] It should be noted that the embodiment of the computer-readable storage medium in this specification and the embodiment of the video playback method applied to the user terminal in this specification are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the corresponding method mentioned above, and the repeated parts will not be repeated.

[0356] The computer-readable storage medium provided in this embodiment is used to store computer-executable instructions. When the computer-executable instructions are executed by the processor, the following process can be implemented:

[0357] Receiving a driving instruction sent by a user terminal; the driving instruction carries a broadcast text of the digital character;

[0358] According to the broadcast text, audio data and image parameters of the broadcast text are generated; the image parameters are used to generate a target part image of the digital character;

[0359] The audio data and the image parameters are used as response information of the driving instruction, and the response information is sent to the user terminal, so that the user terminal generates the target part image according to the image parameters, synthesizes the target part image and the pre-stored overall image of the digital character to obtain a synthesized image, and performs video playback processing according to the synthesized image and the audio data.

[0360] It should be noted that the embodiment of the computer-readable storage medium in this specification and the embodiment of the video playback method applied to the server in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding method, and the repeated parts will not be repeated.

[0361] In the embodiment of the present application, first, a driving instruction is sent to the server; the driving instruction carries the broadcast text of the digital character; then, a response message of the driving instruction is received; the response message is generated and sent by the server according to the broadcast text; the response message includes the audio data of the broadcast text and the image parameters required to generate the target part image of the digital character; then, according to the image parameters, the target part image is generated, and the target part image and the pre-stored overall image of the digital character are synthesized to obtain a synthesized image; finally, the video playback process is performed according to the synthesized image and the audio data. In this way, the broadcast text carried in the driving instruction can be used for the server to generate the audio data of the broadcast text and the image parameters for generating the target part image of the digital character. Therefore, the broadcast text can be used to drive the server to change the target part image of the digital character, so that the target part of the digital character when reading the broadcast text in the video looks consistent with the target part of the real human when reading the broadcast text. In addition, by synthesizing the target part image and the pre-stored overall image of the digital character, the change of the target part image driven by the broadcast text can be reflected in the overall image of the digital character. Taking into account that in a live broadcast scenario, when a digital character reads a text in a video, most parts of the overall image are not affected by the text, and only a small number of parts will change as the text read by the digital character changes, therefore, by pre-storing the overall image of the digital character in the user terminal, the images of most parts that are not affected by the text can be reused, reducing the amount of data transmitted between the user terminal and the server, shortening the time for generating image parameters, and reducing the time delay between the user terminal sending a drive instruction carrying the text to the server and the digital character reading the text in the video during the live broadcast, thereby improving the real-time performance of video playback.

[0362] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0363] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0364] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable electronic device to produce a machine, so that the instructions executed by the processor of the computer or other programmable electronic device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0365] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable electronic device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0366] These computer program instructions may also be loaded onto a computer or other programmable electronic device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0367] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0368] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0369] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0370] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0371] Embodiments of the present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0372] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0373] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.

Claims

1. A video playback method, applied to a user terminal, characterized in that: include: Send drive instructions to the server; The driving instruction carries the broadcast text of the digital character; Receiving response information of the driving instruction; The response information is generated and sent by the server according to the broadcast text; the response information includes the audio data of the broadcast text and the image parameters required to generate the target part image of the digital character; Generating the target part image according to the image parameters, and synthesizing the target part image and the pre-stored overall image of the digital character to obtain a synthesized image; Video playback processing is performed according to the synthesized image and the audio data.

2. The method according to claim 1, characterized in that The image parameters include coding information and position information of the target part described by the target part image in the overall image; generating the target part image according to the image parameters, and synthesizing the target part image and the pre-stored overall image of the digital character to obtain a synthesized image, including: Performing image generation processing according to the coding information to obtain the target part image; Determining a region to be processed in the overall image of the digital character according to the position information; The target part image is used to perform occlusion processing on the area to be processed in the overall image of the digital character to obtain the synthesized image.

3. The method according to claim 2, characterized in that The server and the user terminal both store a preset image set; the preset image set includes a plurality of images, wherein each image describes the overall image of the digital character at a corresponding time point in the preset video data; The image parameters also include the frame number of the target part image to be generated in the preset image set pre-stored in the server; the method also includes: A query process is performed on a preset image set pre-stored in the user terminal according to the frame sequence number to obtain the overall image of the digital character.

4. The method according to claim 1, characterized in that: The performing video playback processing according to the synthesized image and the audio data comprises: During the process of playing the audio data, the synthetic image is played according to a preset frame drop method; the number of the synthetic images is determined by the number of the image parameters, and one image parameter corresponds to one synthetic image; the number of the image parameters is determined by the server according to the broadcast time required for the broadcast text.

5. The method according to claim 4, characterized in that The synthesized image is played in the order of the broadcasting time of the broadcasting text; and the playing of the synthesized image in a preset frame dropping mode includes: Start playing audio data, execute the playing task of the composite image according to the preset playing frame rate and playing order, and call the composite image refresh interface according to the preset refresh frequency; each time the composite image refresh interface is called, the composite image actually played during the execution of the playing task is refreshed; For each call, obtaining a synthetic image actually played at a first time point and determining a synthetic image expected to be played at the first time point; the first time point is a time point when the synthetic image refresh interface is called; If it is determined, based on the actually played composite image and the expected played composite image, that the playing speed of the composite image lags behind the playing speed of the audio data, the expected played composite image is played.

6. The method according to claim 5, characterized in that The determining the synthetic image expected to be played at the first time point includes: Determine a time point at which the audio data starts to be played as a second time point; The composite image expected to be played at the first time point is determined according to the first time point, the second time point and the number of the composite images.

7. The method according to claim 6, characterized in that The determining, according to the first time point, the second time point, and the number of the synthesized images, the synthesized image expected to be played at the first time point includes: Determining a first time length according to the number of the composite images and the preset playback frame rate; Performing a difference process on the first time point and the second time point to obtain a second time length; The composite image expected to be played at the first time point is determined according to the first time length, the second time length, and the number of the composite images.

8. The method according to claim 1, characterized in that The performing video playback processing according to the synthesized image and the audio data comprises: Obtain the time interval between two adjacent frames of synthetic images; Determining the number of target images according to the interval time length and the correspondence between the pre-configured time length and the number of the synthesized images; When the number of the received composite images is equal to the number of the target images, video playback processing is performed according to the composite images and the audio data.

9. A video playback method, applied to a server, characterized in that: include: Receiving a driving instruction sent by a user terminal; The driving instruction carries the broadcast text of the digital character; According to the broadcast text, audio data and image parameters of the broadcast text are generated; the image parameters are used to generate a target part image of the digital character; The audio data and the image parameters are used as response information of the driving instruction, and the response information is sent to the user terminal, so that the user terminal generates the target part image according to the image parameters, synthesizes the target part image and the pre-stored overall image of the digital character to obtain a synthesized image, and performs video playback processing according to the synthesized image and the audio data.

10. The method according to claim 9, characterized in that The server stores a preset image set; the preset image set includes a plurality of images, wherein each image describes the overall image of the digital character at a corresponding time point in the preset video data; the audio data of the broadcast text and the image parameters are generated according to the broadcast text, including: Performing text-to-speech processing on the broadcast text to obtain audio data; The driving network converts the audio data and the preset image set to obtain initial image parameters; the initial image parameters include a frame number of the target part image to be generated in the preset image set, a character string representing the target part image to be generated, and position information of the target part described by the target part image to be generated in the overall image corresponding to the preset image set; Encoding the character string to obtain encoding information of the target part image to be generated; The character string in the initial image parameter is replaced by the encoding information to obtain the image parameter.

11. The method according to claim 10, characterized in that The driving network converts the audio data and the preset image set to obtain initial image parameters, including: The driving network performs conversion processing on the audio data and the preset image set according to the required playback time of the audio data to obtain N initial image parameters.

12. The method according to claim 10, characterized in that The driving instruction also includes a target scene identifier of the broadcast scene where the digital character is located; the method also includes: According to the target scene identifier and the correspondence between the pre-configured scene identifier and the image set, a preset image set corresponding to the target scene identifier is determined.

13. The method according to claim 10, characterized in that The driving instruction also includes a character identification of the digital character; the driving network converts the audio data and the preset image set to obtain initial image parameters, including: The preset driving network performs conversion processing based on the character identification, the audio data and the preset image set input to obtain the initial image parameters.

14. The method according to claim 10, characterized in that The driving instruction also includes a character identification of the digital character; the text-to-speech processing of the broadcast text to obtain the audio data includes: Determining the voice type of the digital character according to the character identification; According to the sound type, the broadcast text is converted into speech to obtain the audio data.

15. A video playback device, running on a user terminal, characterized in that: include: A sending unit, used for sending a driving instruction to a server; The driving instruction carries the broadcast text of the digital character; A receiving unit, used for receiving response information of the driving instruction; The response information is generated and sent by the server according to the broadcast text; the response information includes the audio data of the broadcast text and the image parameters required to generate the target part image of the digital character; A generating unit, configured to generate the target part image according to the image parameters, and synthesize the target part image and the pre-stored overall image of the digital character to obtain a synthesized image; A playback unit is used to perform video playback processing according to the composite image and the audio data.

16. A video playback device, running on a server, characterized in that: include: A receiving unit, used for receiving a driving instruction sent by a user terminal; The driving instruction carries the broadcast text of the digital character; A generating unit, used to generate audio data and image parameters of the broadcast text according to the broadcast text; the image parameters are used to generate a target part image of the digital character; The sending unit is used to send the response information to the user terminal using the audio data and the image parameters as response information of the driving instruction, so that the user terminal generates the target part image according to the image parameters, synthesizes the target part image and the pre-stored overall image of the digital character to obtain a synthesized image, and performs video playback processing according to the synthesized image and the audio data.

17. An electronic device, characterized in that: include: processor; And, a memory configured to store computer executable instructions, which, when executed, cause the processor to perform the video playback method according to any one of claims 1 to 14.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the video playback method according to any one of claims 1 to 14.

19. A computer program product, characterized in that The method comprises a computer program or a computer executable instruction, wherein the computer program or the computer executable instruction, when executed by a processor, implements the video playback method according to any one of claims 1 to 14.