METHOD, APPARATUS, SERVER AND MEDIUM FOR GENERATING TARGET VIDEO - Patent application
The method processes live streaming data to generate targeted videos by evaluating audio, interaction, and video metrics, automating the video generation process and enhancing quality and efficiency.
Patent Information
- Application Number
- JP2023507247
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-08-12
- Filing Date
- 2021-08-11
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-08-11
AI Technical Summary
Existing methods for generating targeted video from live streaming data require manual segmentation of long video files, which is labor-intensive and inefficient.
A method that processes live streaming data to generate audio, interaction, and video metric values based on preset categories, and generates a target video automatically by determining an overall metric value that satisfies a preset condition, incorporating aspects like lexical completeness of audio data.
Automatically generates high-quality targeted videos by comprehensively evaluating audio, interaction, and video data, reducing labor costs and improving efficiency compared to manual methods.
Smart Images

Figure 0007567028000001 
Figure 0007567028000002 
Figure 0007567028000003
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to a Chinese patent application filed with the China Patent Office on August 12, 2020, bearing application number 202010806612.5 and entitled "Method, Apparatus, Server and Medium for Generating Target Video," the entire contents of which are incorporated herein by reference. TECHNICAL FIELD Embodiments of the present application relate to the field of computer technology, and in particular to a method, an apparatus, a server and a medium for generating a target video. [Background technology]
[0002] With the rapid development of Internet technology, the application of live video streaming is becoming increasingly widespread.
[0003] The related approach usually involves first storing the live streaming data into a long video file, and then manually cutting out required segments from the long video file to generate short videos. Summary of the Invention [Problem to be solved by the invention]
[0004] The embodiments of the present application provide a method, an apparatus, a server, and a medium for generating a target video. [Means for solving the problem]
[0005] According to a first aspect, an embodiment of the present application provides a method for generating a target video, the method including: acquiring live streaming data, where the live streaming data includes at least one of audio data, live interaction data, and video data; processing the live streaming data and generating corresponding audio metric values, at least one of interaction metric values, and video metric values based on target objects included in the processing result; generating an overall metric value of the live streaming data based on the generated audio metric value, at least one of the interaction metric values, and video metric value; and generating a target video based on the live streaming data in response to determining that the overall metric value of the live streaming data satisfies a predetermined condition.
[0006] In some embodiments, the step of processing the live streaming data and generating corresponding video metric values based on target objects included in the processing result includes a step of image-recognizing video frames in the video data and determining a number belonging to a first preset category image and a number belonging to a second preset category image, respectively, and a step of generating video metric values based on the determined number belonging to the first preset category image and the number belonging to the second preset category image.
[0007] In some embodiments, the step of generating a video metric value based on the determined number belonging to the first preset category image and the number belonging to the second preset category image includes a step of obtaining preset image weight values corresponding to the first preset category image and the second preset category image, respectively, and a step of performing a weighted sum on the determined number belonging to the first preset category image and the number belonging to the second preset category image and the respective corresponding image preset weight values to generate the video metric value.
[0008] In some embodiments, the live streaming data includes audio data, and the step of processing the live streaming data and generating corresponding audio metric values based on target objects included in the processing result includes the steps of speech-recognizing the audio data and generating speech-recognized text, determining a number of texts included in the speech-recognized text that belong to a first preset category text and a number that belong to a second preset category text, respectively, and generating audio metric values based on the determined numbers that belong to the first preset category text and the second preset category text.
[0009] In some embodiments, the live streaming data includes live interaction data, and the step of processing the live streaming data and generating corresponding interaction metric values based on target objects included in the processing result includes determining a number of target interaction behaviors indicated by the live interaction data, and generating interaction metric values based on the determined number of target interaction behaviors.
[0010] In some examples, the target interaction behaviors include at least two of a first preset interaction behavior, a second preset interaction behavior, and a third preset interaction behavior, and the step of generating an interaction metric value based on the number of determined target interaction behaviors includes performing a weighted sum based on the number of determined target interaction behaviors and preset interaction weights corresponding to the first preset interaction behavior, the second preset interaction behavior, and the third preset interaction behavior to generate an interaction metric value.
[0011] In some embodiments, the step of generating an overall metric value of the live streaming data based on at least one of the generated audio metric values, interaction metric values, and video metric values includes the steps of obtaining preset metric weights corresponding to each of the generated audio metric values, at least one of the interaction metric values, and video metric values; normalizing the generated audio metric values, at least one of the interaction metric values, and video metric values; and performing a weighted sum on the normalized audio metric values, at least one of the interaction metric values, and video metric values to generate an overall metric value of the live streaming data.
[0012] In some embodiments, the pre-set condition includes that a number of live streaming slices that satisfy an overall metric value condition among a set of live streaming slices associated with the live streaming data is greater than a target number, and the overall metric value condition includes that an overall metric value corresponding to the live streaming slice is less than an overall metric value of the live streaming data.
[0013] In some embodiments, the live streaming data includes audio data, and generating a target video based on the live streaming data includes determining start / end positions of a clip of the live streaming data based on lexical completeness of a recognition text corresponding to the audio data, and generating a target video based on the clipped live streaming data.
[0014] In some embodiments, generating a target video based on the clipped live streaming data includes adding special effects to the clipped video stream data to generate the target video.
[0015] According to a second aspect, an embodiment of the present application provides an apparatus for generating a target video, the apparatus including: an acquisition unit configured to acquire live streaming data, where the live streaming data includes at least one of audio data, live interaction data, and video data; a processing unit configured to process the live streaming data and generate corresponding audio metric values, at least one of interaction metric values, and video metric values based on a target object included in the processing result; a first generation unit configured to generate an overall metric value of the live streaming data based on the generated audio metric value, at least one of the interaction metric values, and video metric value; and a second generation unit configured to generate a target video based on the live streaming data in response to determining that the overall metric value of the live streaming data satisfies a predetermined condition.
[0016] In some embodiments, the processing unit includes a first recognition subunit configured to perform image recognition on video frames in the video data and determine a number belonging to a first preset category image and a number belonging to a second preset category image, respectively, and a first generation subunit configured to generate a video metric value based on the determined number belonging to the first preset category image and the number belonging to the second preset category image.
[0017] In some embodiments, the first generation subunit includes an acquisition module configured to acquire preset image weight values corresponding to a first preset category image and a second preset category image, respectively, and a generation module configured to perform a weighted sum on the determined numbers belonging to the first preset category image and the determined numbers belonging to the second preset category image and the corresponding image preset weight values, respectively, to generate the video metric value.
[0018] In some embodiments, the live streaming data includes voice data, and the processing unit includes a second recognition subunit configured to speech-recognize the voice data and generate a voice-recognized text, a first determination subunit configured to determine a number of texts included in the voice-recognized text that belong to a first preset category text and a number that belong to a second preset category text, respectively, and a second generation subunit configured to generate a voice metric value based on the determined number of texts that belong to the first preset category text and the determined number of texts that belong to the second preset category text.
[0019] In some embodiments, the live streaming data includes live interaction data, and the processing unit includes a second determination subunit configured to determine a number of target interaction behaviors indicated by the live interaction data, and a third generation subunit configured to generate an interaction metric value based on the determined number of target interaction behaviors.
[0020] In some examples, the target interaction behavior includes at least two of a first preset interaction behavior, a second preset interaction behavior, and a third preset interaction behavior, and the third generation subunit is further configured to perform a weighted sum based on the number of determined target interaction behaviors and preset interaction weights corresponding to the first preset interaction behavior, the second preset interaction behavior, and the third preset interaction behavior to generate an interaction metric value.
[0021] In some embodiments, the first generation unit includes an acquisition subunit configured to acquire preset metric weights corresponding to each of the generated voice metric values, at least one of the interaction metric values, and video metric values; a normalization subunit configured to normalize the generated voice metric values, at least one of the interaction metric values, and video metric values; and a fourth generation subunit configured to perform a weighted sum on the normalized voice metric values, at least one of the interaction metric values, and video metric values to generate an overall metric value of the live streaming data.
[0022] In some embodiments, the pre-set condition includes that a number of live streaming slices that satisfy an overall metric value condition among a set of live streaming slices associated with the live streaming data is greater than a target number, and the overall metric value condition includes that an overall metric value corresponding to the live streaming slice is less than an overall metric value of the live streaming data.
[0023] In some embodiments, the live streaming data includes audio data, and the second generation unit includes a third determination subunit configured to determine a start / end position of a clip of the live streaming data based on a lexical completeness of a recognized text corresponding to the audio data, and a fifth generation subunit configured to generate a target video based on the clipped live streaming data.
[0024] In some embodiments, the fifth generating sub-unit is further configured to add special effects to the clipped video stream data to generate a target video.
[0025] According to a third aspect, an embodiment of the present application provides a server, the server including one or more processors and a storage device having one or more programs stored therein, the one or more programs, when executed by the one or more processors, causing the one or more processors to realize a method according to any of the embodiments of the first aspect.
[0026] According to a fourth aspect, an embodiment of the present application provides a computer readable medium having stored thereon a computer program which, when executed by a processor, realises the method according to any of the embodiments of the first aspect.
[0027] According to a fifth aspect, embodiments of the present application further provide a computer program product comprising computer program instructions, the computer program instructions causing a computer to perform a method according to any embodiment of the first aspect.
[0028] According to a sixth aspect, embodiments of the present application further provide a computer program, which when run on a computer causes the computer to perform the method according to any of the embodiments of the first aspect.
[0029] The method, device, server and medium for generating a target video provided by the embodiments of the present application respectively process at least one of the voice data, live interaction data and video data contained in the acquired live streaming data to generate a comprehensive metric value obtained from the voice metric value, at least one of the interaction metric value and the video metric value, and finally generate a target video, thereby realizing the automatic generation of the target video on the one hand, and comprehensively selecting the generation basis of the target video from multiple aspects such as the voice, at least one of the live interaction and video on the other hand, and improving the quality and generation efficiency of the generated target video. [Brief description of the drawings]
[0030] Other features, objects and advantages of the present application will become more apparent from a reading of the following detailed description of non-limiting embodiments, made with reference to the drawings in which: [Figure 1] FIG. 1 is an exemplary system architecture diagram to which embodiments of the present application may be applied. [Diagram 2] 2 is a flowchart of an embodiment of a method for generating a target video according to the present application. [Diagram 3] FIG. 2 is a schematic diagram of an application scene of a method for generating a target video according to an embodiment of the present application; [Figure 4] 4 is a flowchart of another embodiment of a method for generating a target video according to the present application. [Diagram 5] FIG. 2 is a structural schematic diagram of an embodiment of an apparatus for generating a target video according to the present application; [Figure 6] FIG. 1 is a structural schematic diagram of an electronic device suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0031] The present application will be described in more detail below in conjunction with the drawings and examples. It should be understood that the specific examples described herein are not limiting to the present invention, but are only used to interpret the present invention. For the sake of convenience, only parts related to the present invention are shown in the drawings.
[0032] In addition, the embodiments and features in the embodiments in the present application can be combined with each other unless they are contradictory. The present application will be described in detail below by combining the embodiments with reference to the drawings.
[0033] FIG. 1 illustrates an exemplary architecture 100 in which the method for generating a target video or the apparatus for generating a target video of the present application can be applied.
[0034] 1, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing a communication link between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as, for example, wires, wireless communication links, or fiber optic cables.
[0035] The terminal devices 101, 102, and 103 receive and send messages by interacting with a server 105 via a network 104. Various communication client applications, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, a text editing application, and a video live distribution application, may be installed on the terminal devices 101, 102, and 103.
[0036] The terminal devices 101, 102, 103 may be hardware or software. If the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting audio and video transmission, including but not limited to smartphones, tablets, laptop computers, and desktop computers. If the terminal devices 101, 102, 103 are software, they may be installed in the electronic devices listed above. They may be realized as multiple software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. No specific limitations are provided here.
[0037] The server 105 may be a server providing various services, such as a background server providing support for video live streaming applications on the terminal devices 101, 102, 103. The background server can perform processing, such as analysis, on the received live streaming data and feed back the processing result (e.g., target video) to the terminal devices.
[0038] It should be noted that the above live streaming data may also be directly stored locally in the server 105, and the server 105 can directly extract and process the locally stored live streaming data, in which case the terminal devices 101, 102, 103 and the network 104 may not exist.
[0039] The server may be hardware or software. If the server is hardware, it may be realized as a distributed server cluster consisting of multiple servers, or as a single server. If the server is software, it may be realized as multiple pieces of software or software modules (e.g., software or software modules for providing distributed services), or as a single piece of software or software module. No specific limitations are provided here.
[0040] It should be noted that the method for generating a target video provided by the embodiments of the present application is generally performed by the server 105, and correspondingly, the apparatus for generating a target video is generally provided in the server 105.
[0041] It should be noted that the terminals 101, 102, and 103 can be used to perform the method for generating a target video, and the terminal 101 may collect live streaming data and send the collected live streaming data to the server 105, so that the server 105 performs the method for generating a target video.
[0042] It should be understood that the number of terminal devices, networks and servers in FIG. 1 are merely exemplary, and there may be any number of terminal devices, networks and servers as required by implementation.
[0043] 2, a flow chart 200 of an embodiment of a method for generating a target video according to the present application is shown. The method for generating a target video includes steps 201 to 204. Step 201: Obtain live streaming data.
[0044] In this embodiment, the execution subject of the method for generating a target video (the server 105 shown in FIG. 1) can obtain live streaming data through a wired connection or a wireless connection. The live streaming data can include at least one of audio data and live interaction data, and video data. Thus, the live streaming data can include audio data, video data, live interaction data and video data, and can further include audio data, live interaction data and video data. The audio data is usually synchronized in time with the video data. The live interaction data can include data for recording the interaction situation between the streamer and the viewers during live distribution. The live interaction data can include, but is not limited to, at least one of the number of real-time comments in a preset period (e.g., per minute), the number of characterizing the streamer's approval (e.g., giving approval, sending gifts) in a preset period (e.g., per minute), and the number of comments and messages in a preset period (e.g., per minute).
[0045] As an example, the execution entity can obtain live streaming data in real time from an electronic device (e.g., the terminal device shown in FIG. 1) that is in communication with the execution entity. As yet another example, the execution entity can obtain live streaming data that is pre-stored locally. The live streaming data may be obtained by performing video slicing on pre-stored historical live streaming data. The video slices may further correspond to start and end times in the historical live streaming data.
[0046] Step 202: process the live streaming data, and generate corresponding at least one of an audio metric value, an interaction metric value, and a video metric value according to a target object included in the processing result.
[0047] In this embodiment, the execution subject can process the live streaming data acquired in step 201 in various manners, and the execution subject can generate corresponding audio metric values, at least one of interaction metric values and video metric values based on the target object included in the processing result.
[0048] In this embodiment, as an example, the execution subject can extract acoustic features from the voice data in the acquired live streaming data in various ways. The acoustic features can include, but are not limited to, at least one of Mel Frequency Cepstrum Coefficients (MFCC), Linear Prediction Cepstrum Coefficients (LPCC), pitch, timbre, and volume. Then, the execution subject can generate a voice metric value corresponding to the extracted acoustic features in various ways. For example, the execution subject can utilize a pre-trained artificial neural network to generate a voice metric value corresponding to the extracted acoustic features. The artificial neural network can be trained by taking voice data corresponding to a great segment of the historical live streaming data as a positive sample and voice data corresponding to a normal segment as a negative sample. The voice metric value may be a value between 0 and 1. Further, for example, the execution subject can compare the extracted acoustic features with a preset threshold corresponding to each acoustic feature, and then generate a voice metric value corresponding to the extracted acoustic features based on a number greater than the corresponding preset threshold.
[0049] In this embodiment, as an example, the execution subject can process the live interaction data in the acquired live streaming data in various ways to generate a corresponding interaction metric value. For example, the execution subject can take the number of real-time comments or the period in which the number of comments exceeds a preset threshold as the interaction metric value. For example, the live streaming data includes 5 minutes of data. The number of real-time comments from 0 to 1 minutes is 15, the number of real-time comments from 1 to 2 minutes is 28, the number of real-time comments from 2 to 3 minutes is 85, the number of real-time comments from 3 to 4 minutes is 66, and the number of real-time comments from 4 to 5 minutes is 32. Assuming that the preset threshold is 50, the execution subject can determine the interaction metric value as 2.
[0050] In this embodiment, as an example, the execution entity can process the video data in the acquired live streaming data in various ways to generate corresponding video metric values. For example, the execution entity can determine the number of video frames including a target image in the live streaming data. Based on the determined number of video frames including the target image, generate a video metric value corresponding to the live streaming data.
[0051] In some optional embodiments of this embodiment, the execution entity can process the live streaming data according to the following steps 1 to 2, and generate corresponding video metric values based on the target objects included in the processing result. In the first step, video frames in the video data are image-recognized to determine the number of images belonging to a first preset category and the number of images belonging to a second preset category.
[0052] In these embodiments, the executing entity can use various image recognition methods to perform image recognition on the video frames in the video data, and determine the number belonging to the first preset category image and the number belonging to the second preset category image, respectively. The first preset category image and the second preset category image can include images related to a preset application scene. For example, the first preset category image can be a dunk shot image, and the second preset category image can be a three-point shot image.
[0053] Optionally, the execution entity can perform frame extraction from the video data, for example, extracting one frame out of every ten frames, and then image recognition is performed on the video frames extracted by the execution entity, thereby saving computing resources.
[0054] Optionally, the first preset category image can include images for characterizing product sales, such as product images, price tags, etc. The second preset category image can include preset person images. The preset person can be, for example, a streamer. Thus, the method can provide a technical basis for recognizing highlight moments in live sales videos from the perspective of image recognition.
[0055] In a second step, a video metric value is generated based on the determined numbers belonging to the first preset category image and the determined numbers belonging to the second preset category image.
[0056] In these embodiments, the execution subject can generate the video metric value in various ways based on the determined number belonging to the first preset category image and the number belonging to the second preset category image. As an example, the execution subject can select a larger value of the determined number belonging to the first preset category image and the number belonging to the second preset category image as the video metric value. As yet another example, the execution subject can further set the value of the ratio between the selected larger value and the video frame to be image-recognized as the video metric value.
[0057] Optionally, the execution entity can further first obtain image preset weight values (e.g., 1, 0.5) corresponding to the first preset category image and the second preset category image, respectively. Then, the execution entity can perform a weighted sum on the determined numbers belonging to the first preset category image and the numbers belonging to the second preset category image and the corresponding image preset weight values to generate the video metric value.
[0058] In some optional embodiments of this embodiment, based on the audio data contained in the live streaming data, the execution entity can process the live streaming data according to the following steps 1 to 3, and generate a corresponding audio metric value based on the target object included in the processing result. In the first step, the speech data is subjected to speech recognition to generate a speech-recognition text.
[0059] In these embodiments, the executing entity can recognize the voice data included in the live streaming data acquired in step 201 using various voice recognition techniques, and generate a corresponding voice-recognized text.
[0060] In the second step, the number of texts included in the speech recognition text that belong to the first preset category text and the number of texts that belong to the second preset category text are determined.
[0061] In these embodiments, the execution subject can determine the number of texts included in the speech recognition text that belong to the first preset category text and the number of texts that belong to the second preset category text, respectively, in various ways. The first preset category text and the second preset category text can include texts related to a preset application scene. For example, the first preset category text can include preset descriptive words such as "nice shot", "nice", and "how wonderful", and the second preset category text can include preset suggested words such as "everyone look", "noticed", and so on.
[0062] Optionally, the first preset category text may include product description information. The product description information may include product name, product evaluation information (e.g., "delicious", "easy to use, not expensive", etc.). The second preset category text may include pre-set sales keywords. The pre-set sales keywords may include, for example, "link up", "buy now", etc. Thus, the method may provide a technical basis for the recognition of highlight moments in live sales videos from the perspective of voice recognition.
[0063] In a third step, a speech metric value is generated based on the determined numbers belonging to the first preset category text and the determined numbers belonging to the second preset category text.
[0064] In these embodiments, the execution subject can generate the voice metric value in various ways based on the determined number belonging to the first preset category text and the number belonging to the second preset category text. As an example, the execution subject can select the larger value of the determined number belonging to the first preset category text and the number belonging to the second preset category text as the voice metric value. As yet another example, the execution subject can further set the value of the ratio of the selected larger value to the number of words included in the recognition text as the voice metric value.
[0065] Optionally, the execution subject can further first obtain text preset weight values corresponding to the first preset category text and the second preset category text, respectively.The execution subject can then perform a weighted sum on the determined numbers belonging to the first preset category text and the numbers belonging to the second preset category text and the corresponding text preset weight values to generate the speech metric value.
[0066] Optionally, based on the product description information contained in the first preset category text and the preset sales keywords contained in the second preset category text, a text preset weight value (e.g., 1) corresponding to the first preset category text is generally smaller than a text preset weight value (e.g., 5) corresponding to the second preset category text.
[0067] In some optional embodiments of this embodiment, the execution entity can process the live streaming data based on the live interaction data contained in the live streaming data according to the following steps 1 and 2, and generate corresponding interaction metric values based on the target objects included in the processing result. The first step is to determine the number of target interaction behaviors that are dictated by the live interaction data.
[0068] In these embodiments, the actor may determine the number of target interaction behaviors indicated by the live interaction data included in the live streaming data acquired in step 201 in various ways. The target interaction behaviors may include, but are not limited to, at least one of sending real-time comments, characterizing behaviors favoring the streamer (e.g., giving a thumbs-up, sending a gift), sending comments, and writing messages.
[0069] In the second step, an interaction metric value is generated based on the number of determined target interaction behaviors.
[0070] In these embodiments, the execution subject can generate the interaction metric value in various ways based on the number of target interaction behaviors determined by the first step. For example, the execution subject can set the number of the determined target interaction behaviors as the interaction metric value. As yet another example, the execution subject can further set the value of the ratio of the number of the determined target interaction behaviors to a preset numerical value as the interaction metric value.
[0071] Optionally, the target interaction behavior may include at least two of a first preset interaction behavior, a second preset interaction behavior, and a third preset interaction behavior. Based on the number of determined target interaction behaviors, the execution entity may perform a weighted sum based on the number of determined target interaction behaviors and preset interaction weights corresponding to the first preset interaction behavior, the second preset interaction behavior, and the third preset interaction behavior to generate the interaction metric value. The first preset interaction behavior, the second preset interaction behavior, and the third preset interaction behavior may include interaction behaviors related to preset application scenes.
[0072] Optionally, the first preset interaction behavior, the second preset interaction behavior, and the third preset interaction behavior can respectively include: a product link appears on a live streaming screen, an order is generated according to the product link provided by the live streaming data, and a real-time comment is sent, so that the method can provide a technical basis for recognizing a highlight moment in a live sales video from the viewpoint of an interaction behavior.
[0073] Step 203: generating an overall metric value of the live streaming data based on at least one of the generated voice metric value, the interaction metric value, and the video metric value.
[0074] In this embodiment, the execution subject can generate the overall metric value of the live streaming data according to at least one of the generated voice metric value, the interaction metric value, and the video metric value in various ways. For example, the execution subject can select a maximum value as the overall metric value of the live streaming data from at least one of the generated voice metric value, the interaction metric value, and the video metric value.
[0075] In some optional embodiments of this embodiment, the executing entity can generate a comprehensive metric value of the live streaming data based on the generated audio metric value, at least one of the interaction metric values and the video metric value, according to the following steps 1 to 3. The first step involves obtaining preset metric weights corresponding to each of the generated voice metric values, at least one of the interaction metric values, and the video metric values.
[0076] In these embodiments, the execution entity may first obtain preset metric weights corresponding to the generated voice metric value, at least one of the interaction metric value, and the video metric value, respectively, and the preset metric weights may be, for example, 0.3, 0.3, and 0.4.
[0077] In a second step, at least one of the generated speech metric values, interaction metric values and video metric values are normalized.
[0078] In these embodiments, the execution entity may normalize the audio metric values, at least one of the interaction metric values, and the video metric values generated in the first step, such that the audio metric values, at least one of the interaction metric values, and the video metric values generated in the normalized first step belong to the same order.
[0079] In a third step, a weighted sum is performed on the normalized audio metric value, at least one of the interaction metric value and the video metric value to generate a comprehensive metric value for the live streaming data.
[0080] In these embodiments, the execution entity can perform a weighted sum on at least one of the normalized audio metric values, the interaction metric values, and the video metric values obtained in the second step to generate an overall metric value of the live streaming data.
[0081] Step 204, in response to determining that the overall metric value of the live streaming data satisfies the preset condition, generate a target video based on the live streaming data.
[0082] In this embodiment, the performing entity may generate a target video based on the live streaming data in various ways in response to determining that the overall metric value of the live streaming data satisfies a preset condition. For example, the preset condition may include that the overall metric value of the live streaming data is greater than a preset metric value threshold. For example, the performing entity may use the live streaming data as the target video as is. As yet another example, the performing entity may obtain the target video by performing post-processing on the live streaming data. The post-processing may include, for example, adding a filter, adjusting brightness, adjusting contrast, etc.
[0083] In some alternative embodiments of this embodiment, the preset condition may include that the number of live streaming slices that satisfy an overall metric value condition among the live streaming slice set related to the live streaming data is greater than a target number. The overall metric value condition may include that an overall metric value corresponding to the live streaming slice is less than an overall metric value of the live streaming data. The target number may be any number that is pre-specified according to actual application requirements. The target number may be a number determined by a rule, for example, a number obtained by multiplying the number of live streaming slices included in the related live streaming slice set by a preset ratio.
[0084] For example, the live streaming slice set related to the live streaming data may include live streaming data slices for each period obtained from an information source (e.g., live room ID) corresponding to the same live streaming. Suppose, the live streaming slice set related to the live streaming data includes 10 live streaming slices. The target number is 6. If the overall metric value corresponding to the live streaming slice set is smaller than the overall metric value of the live streaming data and is greater than 6, the preset condition is met.
[0085] Continuing with reference to FIG. 3, FIG. 3 is a schematic diagram of an application scene of a method for generating a target video according to an embodiment of the present application. In the application scene of FIG. 3, a user 301 uses a terminal device 302 to perform live streaming. The terminal device 302 transmits live streaming data 303 to a background server 304. The above live streaming data can include audio data and video data. The background server 304 processes the live streaming data 303, and generates an audio metric value 80 and a video metric value 70 (shown as 305 in FIG. 3) based on the contained objects representing the degree of greatness (e.g., the audio of "nice shot" and the "dunk shot image"). Then, the background server 304 averages the generated audio metric value and video metric value to generate a total metric value 75 (shown as 306 in FIG. 3). Then, according to the total metric value 75 being greater than a preset threshold (e.g., 70), the background server 304 can generate a great clip video 307 based on the live streaming data 303. Optionally, the background server 304 can further send the generated fantastic clip video 307 to the terminal device 302 .
[0086] At present, one of the prior arts is usually to first store live streaming data into a long video file, and then manually cut out the required segments from the long video file to generate a short video, which requires a lot of labor costs. The method provided by the above embodiment of the present application processes at least one of the voice data, live interaction data, and video data contained in the acquired live streaming data respectively to generate a comprehensive metric value obtained from the voice metric value, at least one of the interaction metric value, and the video metric value, and finally generate a target video. Compared with generating a target video by the method of manual cutting, the solution provided by the present application realizes automatic generation of the target video, and effectively reduces labor costs. For example, compared with the method of generating a target video based only on a single dimension such as audio or video, the solution provided by the present application comprehensively selects the generation basis of the target video from multiple aspects such as voice, at least one of live interaction, and video, thereby improving the quality and generation efficiency of the generated target video.
[0087] 4, a flow chart 400 of another embodiment of a method for generating a target video is shown. The flow chart 400 of the method for generating a target video includes steps 401-404. Step 401: Obtain live streaming data.
[0088] In this embodiment, the live streaming data can include audio data and video data.
[0089] Step 402: Process the live streaming data, and generate corresponding at least one of an audio metric value, an interaction metric value, and a video metric value according to a target object included in the processing result.
[0090] Step 403: generating an overall metric value of the live streaming data based on at least one of the generated voice metric value, the interaction metric value, and the video metric value.
[0091] The above steps 401, 402, and 403 correspond respectively to steps 201, 202, and 203 and their optional embodiments in the above embodiment, and the above description of steps 201, 202, and 203 and their optional embodiments is also applicable to steps 401, 402, and 403, and will not be described here in detail.
[0092] Step 404: in response to determining that the overall metric value of the live streaming data satisfies a preset condition, determine a start / end position of a clip of the live streaming data based on a phrase continuity of the recognized text corresponding to the voice data, and generate a target video based on the clipped live streaming data.
[0093] In this embodiment, in response to determining that the overall metric value of the live streaming data satisfies a predetermined condition, an entity executing the method for generating a target video (e.g., the server 105 shown in FIG. 1) can generate the target video by following the steps 1 and 2 below. In the first step, the start / end positions of a clip of the live streaming data are determined based on the lexical completeness of the recognized text corresponding to the audio data.
[0094] In this embodiment, the execution subject may first determine the completeness of a phrase based on the recognition text corresponding to the voice data. Then, the execution subject may determine the start / end position of the clip of the live streaming data in various ways based on the determined completeness of the phrase. The start / end position of the clip may include the start position and the end position of the clip. As an example, in response to determining that a phrase of the recognition text corresponding to the voice data is complete (e.g., "XX is really good"), the execution subject may determine the start / end position of the voice data as the start / end position of the clip. As yet another example, in response to determining that a phrase of the recognition text corresponding to the voice data is not complete (e.g., "This shot is great", "Next, please follow..."), the execution subject may determine the end position of a phrase having only the latter half as the start position of the clip, and the start position of a phrase having only the first half as the end position of the clip.
[0095] In the second step, a target video is generated based on the clipped live streaming data.
[0096] In this embodiment, the execution subject can generate a target video based on the clipped live streaming data in various ways. For example, the execution subject can determine the clipped live streaming data as the target video as it is. For another example, the execution subject can perform post-processing on the clipped live streaming data and generate a target video based on the post-processed live streaming data.
[0097] In some alternative embodiments of this embodiment, the execution entity can further add special effects to the clipped video stream data to generate a target video, the special effects can include, but are not limited to, at least one of subtitles, stickers, and transition effects.
[0098] As can be seen from Fig. 4, the flow 400 of the method for generating a target video in this embodiment embodies the steps of determining the start / end position of a clip of live streaming data based on the lexical completeness of a recognition text corresponding to audio data, and generating a target video based on the clipped live streaming data. Thus, the solution described in this embodiment can ensure the lexical completeness of the target video by generating a target video based on the lexical completeness of a recognition text corresponding to audio data.
[0099] Further referring to FIG. 5, as an implementation of the methods shown in the above figures, the present application provides an embodiment of an apparatus for generating a target video, which embodiment of the apparatus corresponds to the embodiment of the method shown in FIG. 2 or FIG. 4, and which can be specifically used in various electronic devices.
[0100] As shown in Fig. 5, the apparatus 500 for generating a target video provided by this embodiment includes an acquisition unit 501, a processing unit 502, a first generation unit 503, and a second generation unit 504. The acquisition unit 501 is configured to acquire live streaming data including at least one of audio data, live interaction data, and video data; the processing unit 502 is configured to process the live streaming data and generate corresponding audio metric values, at least one of interaction metric values, and video metric values according to a target object included in the processing result; the first generation unit 503 is configured to generate a comprehensive metric value of the live streaming data according to the generated audio metric value, at least one of interaction metric values, and video metric value; and the second generation unit 504 is configured to generate a target video based on the live streaming data in response to determining that the comprehensive metric value of the live streaming data satisfies a preset condition.
[0101] In this embodiment, in the apparatus 500 for generating a target video, the specific processing of the acquisition unit 501, the processing unit 502, the first generation unit 503, and the second generation unit 504, and the technical effects brought about by them can be referred to the relevant descriptions of steps 201, 202, 203, and 204 in the embodiment corresponding to FIG. 2, respectively, and will not be described in detail here.
[0102] In some alternative embodiments of this embodiment, the processing unit 502 may include a first recognition subunit (not shown) and a first generation subunit (not shown). The first recognition subunit may be configured to perform image recognition on video frames in the video data and determine a number belonging to a first preset category image and a number belonging to a second preset category image, respectively. The first generation subunit may be configured to generate a video metric value based on the determined number belonging to the first preset category image and the number belonging to the second preset category image.
[0103] In some alternative embodiments of this embodiment, the first generating subunit may include an acquisition module (not shown) and a generating module (not shown). The acquisition module may be configured to acquire preset image weight values corresponding to a first preset category image and a second preset category image, respectively. The generating module may be configured to perform a weighted sum on the determined numbers belonging to the first preset category image and the numbers belonging to the second preset category image and the respective corresponding image preset weight values to generate the video metric value.
[0104] In some alternative embodiments of this embodiment, the live streaming data may include voice data. The processing unit 502 may include a second recognition subunit (not shown), a first determination subunit (not shown), and a second generation subunit (not shown). The second recognition subunit may be configured to perform voice recognition on the voice data and generate a voice-recognized text. The first determination subunit may be configured to determine the number of texts included in the voice-recognized text that belong to a first preset category text and the number of texts that belong to a second preset category text, respectively. The second generation subunit may be configured to generate a voice metric value based on the determined number of texts that belong to the first preset category text and the number of texts that belong to the second preset category text.
[0105] In some alternative embodiments of this embodiment, the live streaming data may include live interaction data. The processing unit 502 may include a second determining subunit (not shown) and a second generating subunit (not shown). The second determining subunit may be configured to determine a number of target interaction behaviors indicated by the live interaction data. The third generating subunit may be configured to generate an interaction metric value based on the determined number of target interaction behaviors.
[0106] In some alternative embodiments of this embodiment, the target interaction behavior may include at least two of a first preset interaction behavior, a second preset interaction behavior, and a third preset interaction behavior. The third generating subunit may be further configured to perform a weighted sum based on the number of the determined target interaction behaviors and preset interaction weights corresponding to the first preset interaction behavior, the second preset interaction behavior, and the third preset interaction behavior to generate an interaction metric value.
[0107] In some alternative embodiments of this embodiment, the first generating unit 503 may include an acquisition subunit (not shown), a normalization subunit (not shown), and a fourth generating subunit (not shown). The acquisition subunit may be configured to acquire preset metric weights corresponding to each of the generated voice metric values, at least one of the interaction metric values, and the video metric values. The normalization subunit may be configured to normalize the generated voice metric values, at least one of the interaction metric values, and the video metric values. The fourth generating subunit may be configured to perform a weighted sum on the normalized voice metric values, at least one of the interaction metric values, and the video metric values, and generate a comprehensive metric value of the live streaming data.
[0108] In some optional embodiments of this embodiment, the pre-set condition includes that the number of live streaming slices that satisfy the overall metric value condition among the live streaming slice set related to the live streaming data is greater than a target number, and the overall metric value condition includes that the overall metric value corresponding to the live streaming slice is smaller than the overall metric value of the live streaming data.
[0109] In some alternative embodiments of this embodiment, the live streaming data may include audio data. The second generating unit 504 may include a third determining subunit (not shown) and a fifth generating subunit (not shown). The third determining subunit may be configured to determine a start / end position of a clip of the live streaming data based on a lexical completeness of a recognition text corresponding to the audio data. The fifth generating subunit may be configured to generate a target video based on the clipped live streaming data.
[0110] In some alternative embodiments of this embodiment, the fifth generating sub-unit may be further configured to add special effects to the clipped video stream data to generate a target video.
[0111] The device provided by the above embodiment of the present application acquires live streaming data by an acquisition unit 501. The live streaming data includes at least one of voice data, live interaction data, and video data. Then, the processing unit 502 processes the live streaming data, and generates corresponding voice metric values, at least one of interaction metric values, and video metric values according to the target objects included in the processing result. Then, the first generation unit 503 generates a comprehensive metric value of the live streaming data according to the generated voice metric values, at least one of interaction metric values, and video metric values. Finally, the second generation unit 504 generates a target video based on the live streaming data in response to determining that the comprehensive metric value of the live streaming data meets the preset condition. Thereby, on the one hand, the automatic generation of the target video is realized, and on the other hand, the generation basis of the target video is comprehensively selected from multiple aspects such as voice, at least one of live interaction, and video, so as to improve the quality and generation efficiency of the generated target video.
[0112] Hereinafter, referring to FIG. 6, a structural schematic diagram of an electronic device (e.g., the server in FIG. 1) 600 suitable for implementing the embodiment of the present application is shown. The terminal device in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets, portable android devices), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs, desktop computers, and the like. The server shown in FIG. 6 is merely an example and should not impose any limitations on the functions and scope of use of the embodiment of the present application.
[0113] 6, the electronic device 600 may include a processing unit (e.g., a central processing unit, a graphic processor, etc.) 601 that may perform various suitable operations and processes according to a program stored in a read-only memory (ROM) 602 or loaded from a storage device 608 into a random access memory (RAM) 603. The RAM 603 further stores various programs and data necessary for the operation of the electronic device 600. The processing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0114] Typically, input devices 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, etc., output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc., storage devices 608 including, for example, a magnetic tape, a hard disk, etc., and a communication device 609 can be connected to the I / O interface 605. The communication device 609 allows the electronic device 600 to communicate wirelessly or wired with other devices to exchange data. Although FIG. 6 shows the electronic device 600 having various devices, it should be understood that it is not required to implement or include all the devices shown. Instead, more or fewer devices may be implemented or included. Each block shown in FIG. 6 may represent one device or multiple devices as necessary.
[0115] In particular, according to an embodiment of the present application, the process described above with reference to the flowcharts can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product including a computer program carried on a computer-readable medium, the computer program including program code for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, it performs the above-mentioned functions defined in the method of the embodiment of the present application.
[0116] It should be noted that the computer-readable medium described in the embodiment of the present application may be a computer-readable signal medium, or a computer-readable storage medium, or any combination of the above. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (electrical programmable ROM, EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (compact disc ROM, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiment of the present application, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the embodiment of the present application, the computer-readable signal medium may include a data signal propagating in baseband or as part of a carrier wave, the data signal carrying computer-readable program code. Such propagated data signals may take many forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may be any computer-readable medium, except for computer-readable storage media, which may transmit, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted by any suitable medium, including, but not limited to, electrical wires, fiber optic cables, RF (RadioFrequency), or the like, or any suitable combination of the above.
[0117] The computer-readable medium may be included in the electronic device, or may be separate from the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the server, causes the server to execute the following steps: acquire live streaming data including at least one of voice data, live interaction data, and video data; process the live streaming data and generate corresponding voice metric values, at least one of interaction metric values, and video metric values based on target objects included in the processing result; generate an overall metric value of the live streaming data based on the generated voice metric value, at least one of interaction metric values, and video metric value; and generate a target video based on the live streaming data in response to determining that the overall metric value of the live streaming data satisfies a preset condition.
[0118] The present invention further provides a computer program, which causes a computer to execute the method for generating a target video provided by the above embodiments.
[0119] Computer program code for carrying out the operations of the embodiments of the present application can be written in one or more programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and even conventional procedural programming languages such as "C", Python, or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. When a remote computer is involved, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., connecting via the Internet using an Internet service provider).
[0120] The flowcharts and block diagrams in the drawings illustrate architecture, functions, and operations that can be realized according to the system, method, and computer program product of various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a certain logical function. It should be noted that in some alternative implementations, the functions shown in the blocks may occur in a different order from the order shown in the figures. For example, two blocks shown in succession may actually be executed essentially in parallel, or in some cases in the reverse order, depending on the functions involved. Also, each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts may be realized in a dedicated system by hardware, or in a combination of dedicated hardware and computer instructions, for executing a certain function or operation.
[0121] The units described in the embodiments of the present application may be implemented in a software manner or a hardware manner. The described units may be provided in a processor, and may be described as a processor including, for example, an acquisition unit, a processing unit, a first generation unit, and a second generation unit. The names of these units, if any, do not constitute limitations on the units themselves, and for example, the acquisition unit may be described as "a unit for acquiring live streaming data, including at least one of audio data, live interaction data, and video data."
[0122] The above description is merely a description of the preferred embodiments of the present disclosure and the technical principles applied thereto. As can be understood by those skilled in the art, the disclosure scope of the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, and also includes other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept, such as by replacing the above features with technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Claims
1. 1. A method for generating a target video, comprising: acquiring live streaming data, the live streaming data including at least one of audio data, live interaction data, and video data; processing the live streaming data and generating corresponding at least one of an audio metric value, an interaction metric value, and a video metric value based on a target object included in the processing result; generating an overall metric value for the live streaming data based on the generated audio metric value, at least one of the interaction metric value and the video metric value; generating a target video based on the live streaming data in response to determining that an overall metric value of the live streaming data satisfies a predetermined condition, the predetermined condition including that a number of live streaming slices that satisfy an overall metric value condition among a live streaming slice set associated with the live streaming data is greater than a target number.
2. The step of processing the live streaming data and generating corresponding video metric values based on target objects included in the processing result includes: performing image recognition on video frames in the video data to determine a number of images belonging to a first preset category and a number of images belonging to a second preset category; and generating the video metric value based on the determined number of images belonging to the first preset category and the determined number of images belonging to the second preset category.
3. The step of generating the video metric value based on the determined number of images belonging to the first preset category and the number of images belonging to the second preset category includes: obtaining preset image weight values respectively corresponding to the first preset category image and the second preset category image; 3. The method of claim 2, further comprising: performing a weighted sum on the determined numbers belonging to the first preset category image and the determined numbers belonging to the second preset category image and the corresponding preset image weight values to generate the video metric value.
4. the live streaming data includes audio data; The step of processing the live streaming data and generating a corresponding audio metric value based on a target object included in the processing result includes: performing speech recognition on the speech data to generate a speech-recognized text; determining a number of texts included in the speech recognition text that belong to a first preset category text and a number of texts included in the speech recognition text that belong to a second preset category text, respectively; A method according to any one of claims 1 to 3, further comprising the step of generating the speech metric value based on the determined numbers belonging to the first preset category text and the determined numbers belonging to the second preset category text.
5. the live streaming data includes live interaction data; The step of processing the live streaming data and generating corresponding interaction metric values based on target objects included in the processing result includes: determining a number of target interaction behaviors indicated by the live interaction data; and generating the interaction metric value based on a number of determined target interaction behaviors.
6. The target interaction behavior includes at least two of a first preset interaction behavior, a second preset interaction behavior, and a third preset interaction behavior; The step of generating the interaction metric value based on the number of determined target interaction behaviors includes:
6. The method of claim 5, further comprising: performing a weighted sum based on a number of determined target interaction behaviors and preset interaction weights corresponding to the first preset interaction behavior, the second preset interaction behavior, and the third preset interaction behavior to generate the interaction metric value.
7. The step of generating an overall metric value of the live streaming data based on at least one of the generated audio metric value, the interaction metric value, and the video metric value includes: obtaining preset metric weights corresponding to the generated voice metric values, at least one of the interaction metric values, and the video metric values; normalizing at least one of the generated audio metric values, interaction metric values, and video metric values; and performing a weighted sum on at least one of the normalized audio metric values, interaction metric values and video metric values to generate an overall metric value for the live streaming data.
8. A method according to any one of claims 1 to 7, characterized in that the overall metric value condition includes an overall metric value corresponding to a live streaming slice being smaller than an overall metric value of the live streaming data.
9. the live streaming data includes audio data; The step of generating a target video based on the live streaming data includes: determining start / end positions of a clip of the live streaming data based on lexical integrity of a recognized text corresponding to the audio data; The method according to any one of claims 1 to 8, further comprising the step of: generating a target video based on the clipped live streaming data.
10. The step of generating a target video based on the clipped live streaming data includes: The method of claim 9, further comprising: adding special effects to the clipped live streaming data to generate a target video.
11. 1. An apparatus for generating a target video, comprising: An acquisition unit configured to acquire live streaming data, the live streaming data including at least one of audio data, live interaction data, and video data; a processing unit configured to process the live streaming data and generate corresponding at least one of an audio metric value, an interaction metric value, and a video metric value based on a target object included in the processing result; a first generating unit configured to generate an overall metric value of the live streaming data based on the generated at least one of the audio metric value, the interaction metric value and the video metric value; a second generation unit configured to generate a target video based on the live streaming data in response to determining that an overall metric value of the live streaming data satisfies a preset condition, the preset condition including that a number of live streaming slices that satisfy an overall metric value condition among a set of live streaming slices associated with the live streaming data is greater than a target number; An apparatus comprising:
12. one or more processors; a storage device storing one or more programs; Including, A server, characterized in that said one or more programs, when executed by said one or more processors, cause said one or more processors to implement the method of any one of claims 1 to 10.
13. A computer-readable medium having a computer program stored thereon, A computer readable medium, characterized in that the computer program implements the method of any one of claims 1 to 10 when executed by a processor.
14. A computer program comprising: A computer program product which, when executed by a computer, causes the computer to carry out the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Video generation method and device, computer equipment and storage medium
CN111050191A
Information processing device, information processing method, and program
WO2017077751A1
