Video processing method and apparatus, and terminal device

By acquiring video information and utilizing a soundtrack collection and a neural network model to automatically match and generate background music, the problems of low accuracy and efficiency of background music caused by manual experience are solved, achieving more efficient and accurate background music generation.

WO2025194999A1PCT designated stage Publication Date: 2025-09-25BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/072845
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-21
Filing Date
2025-01-16
Publication Date
2025-09-25

AI Technical Summary

Technical Problem

In the prior art, the determination of video background music based on manual experience is highly subjective, resulting in low accuracy and generation efficiency of the background music.

Method used

By obtaining video information, using a preset soundtrack collection and neural network model, it automatically matches and generates background music that matches the video content.

Benefits of technology

It improves the accuracy and generation efficiency of background music, reduces the reliance on manual selection, and ensures the matching of music and video content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025072845_25092025_PF_FP_ABST
    Figure CN2025072845_25092025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a video processing method and apparatus, and a terminal device. The method comprises: acquiring a first video; processing the first video to obtain video information of the first video, wherein the video information is used for indicating video content of the first video; on the basis of the video information, determining, from among a plurality of preset background music sets, target background music information corresponding to the video information, wherein the plurality of background music sets correspond to a plurality of video types, and each background music set comprises a plurality of pieces of background music information; and generating background music of the first video on the basis of the video information and the target background music information. The accuracy of background music is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Video processing method, device and terminal equipment

[0001] This application claims priority to Chinese Patent Application No. 202410330142.8 filed on March 21, 2024, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field

[0002] The embodiments of the present disclosure relate to a video processing method, apparatus, and terminal device. Background Art

[0003] During the video editing process, adding background music to the video can improve the playback effect of the video, and accurately adding background music can improve the promotion of the video.

[0004] Currently, users can manually determine the background music for a video based on their experience. For example, if a video is about dancing, the user might determine that the background music is fast-paced, while if a video is about scenery, the user might determine that the background music is slow-paced, and so on. However, this method of manually determining the background music for a video is highly subjective, resulting in low accuracy. Summary of the Invention

[0005] The present disclosure provides a video processing method, apparatus, and terminal device.

[0006] In a first aspect, the present disclosure provides a video processing method, the video processing method comprising:

[0007] Get the first video;

[0008] Processing the first video to obtain video information of the first video, where the video information is used to indicate video content of the first video;

[0009] Based on the video information, determining target soundtrack information corresponding to the video information from a plurality of preset soundtrack sets, wherein the plurality of soundtrack sets correspond to a plurality of video types, and each soundtrack set includes a plurality of soundtrack information;

[0010] Based on the video information and the target soundtrack information, background music for the first video is generated.

[0011] In a second aspect, the present disclosure provides a video processing device, the video processing device comprising an acquisition module, a processing module, a determination module, and a generation module, wherein:

[0012] The acquisition module is used to acquire the first video;

[0013] The processing module is used to process the first video to obtain video information of the first video, where the video information is used to indicate the video content of the first video;

[0014] The determining module is configured to determine, based on the video information, target soundtrack information corresponding to the video information from a plurality of preset soundtrack sets, wherein the plurality of soundtrack sets correspond to a plurality of video types, and each soundtrack set includes a plurality of soundtrack information;

[0015] The generation module is used to generate background music for the first video based on the video information and the target soundtrack information.

[0016] In a third aspect, an embodiment of the present disclosure provides a terminal device including: a processor and a memory;

[0017] The memory stores computer-executable instructions;

[0018] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video processing method as described in the first aspect and various possible aspects of the first aspect.

[0019] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the video processing method as described in the first aspect and various possible aspects of the first aspect are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, a brief introduction to the drawings required for use in the embodiments will be given below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0021] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0022] FIG2 is a flow chart of a video processing method provided by an embodiment of the present disclosure;

[0023] FIG3 is a schematic diagram of a process for obtaining a first video according to an embodiment of the present disclosure;

[0024] FIG4 is a schematic diagram of another process of obtaining a first video according to an embodiment of the present disclosure;

[0025] FIG5 is a schematic diagram of music information provided by an embodiment of the present disclosure;

[0026] FIG6 is a schematic diagram of a process for determining a target soundtrack set according to an embodiment of the present disclosure;

[0027] FIG7 is a schematic diagram of a method for determining target soundtrack information provided by an embodiment of the present disclosure;

[0028] FIG8 is a schematic diagram of a process for determining candidate soundtrack information provided by an embodiment of the present disclosure;

[0029] FIG9 is a schematic diagram of a process for determining target soundtrack information provided by an embodiment of the present disclosure;

[0030] FIG10 is a schematic diagram of a video processing method according to an embodiment of the present disclosure;

[0031] FIG11 is a schematic structural diagram of a video processing device provided by an embodiment of the present disclosure;

[0032] FIG12 is a schematic structural diagram of a terminal device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0034] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0035] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the terminal device, application, server, or storage medium, that performs the operation of the disclosed technical solution, based on the prompt message.

[0036] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the terminal device.

[0037] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0038] To facilitate understanding, the concepts involved in the embodiments of the present disclosure are explained below.

[0039] Terminal device: is a device with wireless transceiver function. The terminal device can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted. The terminal device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a vehicle-mounted terminal device, a wireless terminal in self-driving, a wireless terminal device in remote medical, a wireless terminal device in smart grid, a wireless terminal device in transportation safety, a wireless terminal device in smart city, a wireless terminal device in smart home, a wearable terminal device, etc. The terminal device involved in the embodiments of the present disclosure can also be called a terminal, user equipment (UE), an access terminal device, a vehicle-mounted terminal, an industrial control terminal, a UE unit, a UE station, a mobile station, a mobile station, a remote station, a remote terminal device, a mobile device, a UE terminal device, a wireless communication device, a UE agent or a UE device, etc. Terminal devices can also be fixed or mobile.

[0040] In the related art, when users edit videos, they can add background music to the video, thereby improving the video's playback quality. Accurately adding background music can also improve the video's promotion. Currently, users can determine the background music corresponding to a video based on manual experience. For example, if the video is a dance video and the subject in the video dances at a fast tempo, the user can determine that the background music corresponding to the video is fast-paced music and determine the corresponding background music for the video from the fast-paced music. If the subject in the video dances at a slow tempo, the user can determine that the background music corresponding to the video is slow-paced music and determine the corresponding background music for the video from the slow-paced music. Users can also determine music that matches the subject's dance tempo based on the subject's dance tempo. However, determining the background music corresponding to a video based on manual experience is highly subjective, and the manual determination of background music is complex, resulting in low accuracy and low efficiency in generating background music.

[0041] In order to solve the technical problems in the related art, the embodiment of the present disclosure provides a video processing method, in which a terminal device can obtain a first video and process the first video to obtain video information of the first video. The terminal device can determine the target video type corresponding to the video information from the multiple video types corresponding to the preset multiple soundtrack sets, wherein the multiple soundtrack sets correspond to the multiple video types, and each soundtrack set includes multiple soundtrack information. The terminal device can determine the soundtrack set corresponding to the target video type as the target soundtrack set. The terminal device can determine the target soundtrack information corresponding to the video information based on the multiple soundtrack information included in the target soundtrack set. The terminal device can generate background music for the first video based on the video information and the target soundtrack information. In the above method, since the video information of the first video matches the target soundtrack information, the terminal device can generate background music that matches the video content of the first video in combination with the target soundtrack information, thereby improving the accuracy of the background music. Moreover, since the terminal device can automatically generate the background music for the first video, the efficiency of background music generation can be improved.

[0042] The application scenario of the embodiment of the present disclosure is described below with reference to FIG1 .

[0043] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. Please refer to Figure 1, which includes a terminal device. The display page of the terminal device is a video editing page, which includes a first video and an add music control. After the user clicks the add music control, the terminal device can jump from the video editing page to the music generation page. The music generation page includes music 1, music 2, and music 3, and music 1, music 2, and music 3 are music generated in real time by the terminal device based on the video information of the first video. After the user clicks music 3 and clicks the completion control, the terminal device can generate a second video. The video content of the second video is the same as the video content of the first video (the same content except for the audio), and the background music of the second video is music 3. In this way, the terminal device can generate the background music of the first video in real time based on the first video, thereby improving the generation efficiency of the background music, and the background music matches the video information of the first video, thereby improving the accuracy of the background music.

[0044] It should be noted that FIG1 is only an example of an application scenario of the embodiment of the present disclosure, and does not limit the application scenario of the embodiment of the present disclosure.

[0045] The following detailed description of the technical solution of the present disclosure and how the technical solution of the present disclosure solves the above-mentioned technical problems is provided with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.

[0046] FIG2 is a flow chart of a video processing method provided by an embodiment of the present disclosure. Referring to FIG2 , the method may include:

[0047] S201: Obtain a first video.

[0048] The execution subject of the embodiment of the present disclosure may be a terminal device, or a video processing device in the terminal device. The video processing device may be implemented by software, or by a combination of software and hardware, which is not limited in the embodiment of the present disclosure.

[0049] The first video may be a video to which background music is to be added. For example, the terminal device includes video 1 and video 2. If the terminal device performs video editing to add background music to video 1, the terminal device may determine that the first video is video 1. If the terminal device performs video editing to add background music to video 2, the terminal device may determine that the first video is video 2. For example, the first video may be a video shot in real time by the terminal device, or the first video may be a video sent by the terminal device to other devices (such as a server, other terminal devices, etc.), or the first video may be a video pre-stored by the terminal device. This is not limited in the embodiments of the present disclosure.

[0050] The process of obtaining the first video is described below with reference to FIG3-FIG4 .

[0051] FIG3 is a schematic diagram of a process for obtaining a first video provided by an embodiment of the present disclosure. Referring to FIG3 , a terminal device is included. The display page of the terminal device is a shooting page, which includes shooting controls, and the shooting mode is a video mode. When the user clicks the shooting control, the terminal device starts recording the video. At the 15th second of video recording, the user clicks the shooting control again, the terminal device stops recording the video, and obtains the 15-second first video. In this way, the terminal device can obtain the first video in real time, improving the flexibility of obtaining the first video.

[0052] FIG4 is another schematic diagram of a process for obtaining a first video provided by an embodiment of the present disclosure. Please refer to FIG4 , which includes a terminal device. The display page of the terminal device is a video editing page. The video editing page may include an add video control. When the user clicks the add video control, the display page of the terminal device jumps from the video editing page to the video page. The video page may include video 1, video 2, video 3, video 4, and a completion control pre-stored by the terminal device. When the user clicks video 2 and clicks the completion control, the terminal device may determine video 2 as the first video, thereby improving the flexibility of obtaining the first video.

[0053] S202: Process the first video to obtain video information of the first video.

[0054] The video information is used to indicate the video content of the first video. For example, the video information corresponding to the first video may indicate the video objects included in the first video, the number of video objects, the type of video, etc. Optionally, the video information may include tags related to the video content and text describing the video content. For example, the tags related to the video content may be generalized tags. If the first video is a video of playing basketball, the tags related to the video content of the first video may be sports, and the text describing the video content may include text describing the object playing basketball (e.g., text that the object in the video is shooting a basketball).

[0055] It should be noted that tags related to video content may include sports, pets, weather, etc., which is not limited in the embodiments of the present disclosure.

[0056] Among them, the terminal device can process the first video according to the video processing model. For example, the video processing model can be used to obtain video information of the video, and the video processing model can be a model of any neural network structure. For example, the structure of the video processing model can be the structure of a deep neural network (DNN). For example, the video processing model can be a pre-trained model, and the video processing model can process any video, and then obtain video information associated with the video. For example, the first video is a video of playing basketball. If the terminal device inputs the first video to the video processing model, the video processing model can output a label of the video content and a text of the video content, wherein the label of the video content is: sports, and the text of the video content is: two people playing basketball.

[0057] Optionally, the video processing model can be trained based on any feasible implementation method. The training samples of the video processing model can include multiple groups of samples, each group of samples can include a sample video and sample video information corresponding to the sample video. It should be noted that the training samples of the video processing model can be designed based on any feasible implementation method, and the embodiments of the present disclosure are not limited to this.

[0058] S203: Based on the video information, determine target soundtrack information corresponding to the video information from a plurality of preset soundtrack sets.

[0059] Among them, multiple soundtrack sets can correspond to multiple video types. For example, soundtrack set 1 corresponds to sports videos, soundtrack set 2 corresponds to basketball videos, soundtrack set 3 corresponds to pet videos, and so on.

[0060] The video type may include generalized video types and / or subdivided video types. For example, the video type may include sports videos (generalized video type), life videos (generalized video type), basketball videos (subdivided video type), and fitness videos (subdivided video type). The terminal device may pre-set multiple video types and establish a correspondence between multiple soundtrack sets and multiple video types. For example, the correspondence between multiple soundtrack sets and multiple video types may be as shown in Table 1:

[0061] Table 1

[0062] It should be noted that Table 1 is only an example of the correspondence between multiple soundtrack sets and multiple video types, and does not limit the correspondence between multiple soundtrack sets and multiple video types.

[0063] It should be noted that the video type can be represented based on video tags (eg, a sports tag indicates a sports video, and a life tag indicates a life video), which is not limited in the embodiments of the present disclosure.

[0064] The soundtrack set may be a preset set, each of which may include multiple soundtrack information. For example, the terminal device may pre-set multiple video types and corresponding soundtrack sets for each video type. When the terminal device determines the background music for the first video, the preset multiple soundtrack sets may be obtained.

[0065] The music information may include information about the music corresponding to the music information. For example, music information 1 corresponds to music A, and music information 2 corresponds to music 2. Music information 1 may include information about music 1, and music information 2 may include information about music 2. For example, the music information may include the corresponding music title, music genre, music scene, music language, number of times the music is used, number of times the music is played, etc., but this disclosure does not limit this.

[0066] Next, the music information will be described with reference to FIG5 .

[0067] FIG5 is a schematic diagram of music information provided by an embodiment of the present disclosure. Referring to FIG5 , a music set is provided. The music set may include music information 1, music information 2, and music information 3. Music information 1 may include information such as Music A (the name of the music), Classical Style (the style of the music), and Fast Tempo (the tempo of the music). Music information 2 may include information such as Music B, Popular Style, and Slow Tempo. Music information 3 may include information such as Music C, Rap Style, and Fast Tempo.

[0068] The target soundtrack information can be used to generate background music for the first video. For example, the target soundtrack information may include information such as the music genre, the setting, the language, and the rhythm of the music. The terminal device can generate relevant background music based on the target soundtrack information. Since the target soundtrack information matches the video information of the first video, the background music generated by the terminal device is highly accurate.

[0069] The terminal device can determine the target soundtrack information corresponding to the video information according to the following feasible implementation method: based on the video information, determine a target soundtrack set from multiple soundtrack sets, and then determine the target soundtrack information based on the multiple soundtrack information included in the target soundtrack set. In this way, the terminal device can accurately determine the soundtrack set associated with the video information, and then accurately determine the background music based on the soundtrack information in the soundtrack set.

[0070] The target soundtrack set is associated with the video information of the first video. For example, the video content indicated by the video information is associated with the video type corresponding to the target soundtrack set.

[0071] The terminal device determines a target soundtrack set from among multiple soundtrack sets based on the video information. Specifically, the terminal device may determine a target video type corresponding to the video information from among multiple video types corresponding to the multiple soundtrack sets, and then determine the soundtrack set corresponding to the target video type as the target soundtrack set. In this way, the terminal device can accurately determine the target soundtrack set corresponding to the video information based on the video type corresponding to the soundtrack set, thereby improving the accuracy of the target soundtrack set.

[0072] For example, the video information indicates that the video content of the first video is: two people playing basketball. If the video type corresponding to the soundtrack set 1 is a sports video, and the video type corresponding to the soundtrack set 2 is a life video, then the terminal device can determine that the target video type corresponding to the video information is a sports video, and the terminal device can determine that the target soundtrack set is soundtrack set 1.

[0073] For example, the video information indicates that the video content of the first video is: two people playing basketball. If the video type corresponding to the soundtrack set 1 is a sports video, and the video type corresponding to the soundtrack set 2 is a basketball video, then the terminal device can determine that the target video type corresponding to the video information is a basketball video, and the terminal device can determine that the target soundtrack set is soundtrack set 2.

[0074] Optionally, the terminal device may determine the target video type according to the following feasible implementation manner: input video information and multiple video types into a preset model to obtain the target video type, wherein the target video type has the highest correlation with the video information.

[0075] Among them, the preset model can be a model of any neural network structure. For example, the preset model can be a model of a DNN structure. For example, the terminal device can input video information and multiple video types into the preset model, and the preset model can determine the correlation between the video information and each video type, and output the video type with the highest correlation to obtain the target video type. For example, the terminal device inputs video information, video type 1, and video type 2 into the preset model, and the preset model determines that the correlation between the video information and video type 1 is correlation A, and the correlation between the video information and video type 2 is correlation B. If correlation A is greater than correlation B, the preset model can output video type 1 (target video type). If correlation A is less than correlation B, the preset model can output video type 2 (target video type).

[0076] The preset model can be used for text understanding and logical reasoning. For example, the preset model can understand video information and infer the video type with the highest relevance based on the video information, thereby obtaining the target video type.

[0077] It should be noted that the preset model can be a pre-trained model, and the terminal device can train the preset model based on any feasible implementation method. The embodiments of the present disclosure are not limited to this. The preset model can be obtained based on multiple groups of sample training, and each group of samples can include sample video information, multiple sample video types, and target sample video types corresponding to the sample video information.

[0078] The process of determining the target soundtrack set will be described below with reference to FIG. 6 .

[0079] Figure 6 is a schematic diagram of a process for determining a target soundtrack set provided by an embodiment of the present disclosure. Please refer to Figure 6, which includes: video information, video type and preset model. Among them, the video type may include video type 1, video type 2 and video type 3, etc. The terminal device (not shown in Figure 6) can input video information and video type to the preset model, wherein the correlation between video type 1 and the video information is 95%, the correlation between video type 2 and the video information is 15%, and the correlation between video type 3 and the video information is 20%. The preset model can output video type 1, and the terminal device can determine video type 1 as the target video type, and determine the soundtrack set corresponding to video type 1 as the target soundtrack set. In this way, the terminal device can accurately determine the target soundtrack set, thereby improving the accuracy of the generated background music.

[0080] Optionally, after determining the target soundtrack set, the terminal device may determine the target soundtrack information based on at least one soundtrack information in the target soundtrack set. For example, if the target soundtrack set includes soundtrack information 1 and soundtrack information 2, the terminal device may determine the target soundtrack set based on soundtrack information 1, determine the target soundtrack set based on soundtrack information 2, or alternatively determine the target soundtrack set based on soundtrack information 1 and soundtrack information 2.

[0081] S204: Generate background music for the first video based on the video information and the target soundtrack information.

[0082] Optionally, the terminal device can generate background music for the first video according to the following feasible implementation: input video information and target soundtrack information into a music generation model to obtain background music, wherein the music generation model can be used to generate the music. In this way, the flexibility of generating background music based on the music generation model can be increased, and the diversity of background music can be improved.

[0083] The music generation model can be a model of any neural network structure. For example, the structure of the music generation model can be a DNN structure. For example, the terminal device can input video information of the first video, music genre, music rhythm, and other information into the music generation model. The music generation model can combine the video information to generate music associated with the music genre, music rhythm, and other information, thereby obtaining background music for the first video.

[0084] It should be noted that the music generation model can be trained based on any feasible implementation method, and the embodiments of the present disclosure are not limited to this. The music generation model can be trained based on multiple groups of training samples, and each group of training samples can include sample video information, sample soundtrack information, and sample music.

[0085] Optionally, after the terminal device generates background music for the first video, the process may further include: adding background music to the first video to generate a second video. For example, if the second video has the same content as the first video, the background music for the second video may be background music generated in real time by the music generation model. This eliminates the need for the user to manually select background music from existing music sources based on experience. The terminal device can automatically generate background music associated with the video content of the first video, thereby improving the efficiency and accuracy of background music generation.

[0086] The disclosed embodiment provides a video processing method, wherein a terminal device can obtain a first video and process the first video to obtain video information of the first video. The terminal device can determine a target video type corresponding to the video information from a plurality of video types corresponding to a preset plurality of soundtrack sets, and determine the soundtrack set corresponding to the target video type as a target soundtrack set. The terminal device can determine the target soundtrack information corresponding to the video information based on the plurality of soundtrack information included in the target soundtrack set. The terminal device can generate background music for the first video based on the video information and the target soundtrack information, and add the background music to the first video to obtain a second video. In the above method, since the video information of the first video matches the target soundtrack information, the terminal device can generate background music that matches the video content of the first video in combination with the target soundtrack information, without the need to select background music from existing music, thereby improving the accuracy of the background music. Moreover, since the terminal device can automatically generate background music for the first video, without the need for the user to create background music, the efficiency of background music generation can be improved.

[0087] Based on the embodiment shown in FIG. 2 , the method for determining target music information in the above-mentioned video processing method will be described in detail below in conjunction with FIG. 7 .

[0088] FIG7 is a schematic diagram of a method for determining target soundtrack information provided by an embodiment of the present disclosure. Referring to FIG7 , the method process includes:

[0089] S701: Obtain information of the first N candidate soundtracks in the target soundtrack set.

[0090] The candidate soundtrack information is the first N soundtrack information in the target soundtrack set, where N is an integer greater than 0. For example, if the target soundtrack set includes 10 soundtrack information, and N is 2, the terminal device can determine the first 2 soundtrack information as candidate soundtrack information. For example, if the target soundtrack set includes soundtrack information 1, soundtrack information 2, soundtrack information 3, and soundtrack information 4 (arranged in an order according to a preset rule), and N is 3, the terminal device can determine soundtrack information 1, soundtrack information 2, and soundtrack information 3 as candidate soundtrack information.

[0091] The multiple soundtrack information in the target soundtrack set may be sorted according to a preset rule, which may include at least one of the following:

[0092] Sort by the size of the first parameter corresponding to each music score;

[0093] Sort by the size of the second parameter corresponding to each music information.

[0094] The first parameter can be used to indicate the number of times the target video has been played within a historical period. The target video can be a video whose background music is the music corresponding to the soundtrack information. For example, soundtrack information 1 corresponds to music 1, and soundtrack information 2 corresponds to music 2. The target video associated with soundtrack information 1 can be a video whose background music is music 1, and the target video associated with soundtrack information 2 can be a video whose background music is music 2.

[0095] The first parameter can be any parameter that is set, and the embodiments of the present disclosure do not limit this. Based on the first parameter, the terminal device can determine the number of times the target video has been played in the historical period. For example, if the first parameter corresponding to soundtrack information 1 indicates 30, the terminal device can determine that the number of times the video whose background music is the music corresponding to soundtrack information 1 has been played in the historical period is 30; if the first parameter corresponding to soundtrack information 2 indicates 100, the terminal device can determine that the number of times the video whose background music is the music corresponding to soundtrack information 2 has been played in the historical period is 100.

[0096] For example, the preset rule is to sort according to the size of the first parameter corresponding to each soundtrack information. If the first parameter corresponding to soundtrack information 1 indicates 100, the first parameter corresponding to soundtrack information 2 indicates 300, the first parameter corresponding to soundtrack information 3 indicates 1000, and the first parameter corresponding to soundtrack information 4 indicates 200, then the arrangement order of multiple soundtrack information in the target soundtrack set is: soundtrack information 3-music information 2-music information 4-music information 1.

[0097] It should be noted that the historical period can be any set period (such as the past hour, the past day, the past week, etc.), and the embodiment of the present disclosure does not limit this.

[0098] Among them, the first parameter can be used to indicate the number of target videos in the historical period, and the second parameter can be an arbitrarily set parameter. The embodiment of the present disclosure does not limit this. The terminal device can determine the number of target videos in the historical period (that is, the number of videos that use the music corresponding to the soundtrack information as background music in the historical period) based on the second parameter. For example, if the second parameter corresponding to soundtrack information 1 indicates 30, the terminal device can determine that the number of videos whose background music is the music corresponding to soundtrack information 1 in the historical period is 30; if the second parameter corresponding to soundtrack information 2 indicates 100, the terminal device can determine that the number of videos whose background music is the music corresponding to soundtrack information 2 in the historical period is 100.

[0099] For example, the preset rule is to sort according to the size of the second parameter corresponding to each soundtrack information. If the second parameter corresponding to soundtrack information 1 indicates 400, the second parameter corresponding to soundtrack information 2 indicates 300, the second parameter corresponding to soundtrack information 3 indicates 200, and the second parameter corresponding to soundtrack information 4 indicates 700, then the arrangement order of multiple soundtrack information in the target soundtrack set is: soundtrack information 4-soundtrack information 1-soundtrack information 2-soundtrack information 3.

[0100] It should be noted that if the preset rule is to sort according to the size of the first parameter and the second parameter corresponding to each soundtrack information, the terminal device can sort based on the size of the average of the numerical value indicated by the first parameter and the numerical value indicated by the second parameter. The terminal device can also sort based on the weighted sum of the numerical value indicated by the first parameter and the numerical value indicated by the second parameter (for example, the numerical value indicated by the first parameter is multiplied by the weight 1 to obtain numerical value A, the numerical value indicated by the second parameter is multiplied by the weight 2 to obtain numerical value B, and numerical value A and numerical value B are added). The embodiments of the present disclosure are not limited to this.

[0101] The process of determining candidate soundtrack information will be described below with reference to FIG. 8 .

[0102] Figure 8 is a schematic diagram of a process for determining candidate soundtrack information provided by an embodiment of the present disclosure. Please refer to Figure 8, which includes a target soundtrack set. Among them, the target soundtrack set includes soundtrack information 1, soundtrack information 2, soundtrack information 3, ..., soundtrack information 10. The first parameter of soundtrack information 1 is 10, the first parameter of soundtrack information 2 is 700, the first parameter of soundtrack information 3 is 900, ..., and the first parameter of soundtrack information 10 is 1000. The terminal device (not shown in Figure 8) can sort according to the size of the first parameter, wherein soundtrack information 10 is the head of the team and soundtrack information 1 is the tail of the team. If N is 3, the terminal device can determine that the candidate soundtrack information includes soundtrack information 10, soundtrack information 3 and soundtrack information 2. In this way, since the first parameter of the candidate soundtrack information is larger, the number of plays of the video corresponding to the candidate soundtrack information is higher, therefore, the accuracy of the background music can be improved and the promotion of the first video can be improved.

[0103] S702: Determine target music score information based on the first N candidate music score information.

[0104] The music information may include music-related tags, such as music genre, music emotion, music scene, music language, etc., which are not limited in the present embodiment.

[0105] The terminal device can determine the target soundtrack information according to the following feasible implementation method: determine the music-related tag corresponding to each candidate soundtrack information, deduplicate multiple music-related tags corresponding to multiple candidate soundtrack information, and obtain the target soundtrack information.

[0106] For example, if candidate soundtrack information 1 includes music-related tag A, music-related tag B, and music-related tag C, and candidate soundtrack information 2 includes music-related tag a, music-related tag B, and music-related tag c, the terminal device deduplicates soundtrack information 1 and soundtrack information 2, and the resulting target soundtrack information may include: music-related tag A, music-related tag B, music-related tag C, music-related tag a, and music-related tag C. For example, if candidate soundtrack information 1 includes rock genre and fast tempo, and candidate soundtrack information 2 includes electronic music genre and fast tempo, the terminal device may determine that the target soundtrack information includes: rock genre, electronic music genre, and fast tempo.

[0107] It should be noted that if there are inconsistencies in the music-related tags in the target soundtrack information, the terminal device may delete the music-related tags in the soundtrack information with a lower ranking. For example, if the target soundtrack information includes rock, fast tempo, and slow tempo, the terminal device may determine that the fast tempo and slow tempo are in conflict. If the soundtrack information corresponding to the fast tempo is ranked higher than the soundtrack information corresponding to the slow tempo, the terminal device may delete the slow tempo, i.e., the target soundtrack information includes rock and fast tempo.

[0108] The process of determining target music information will be described below with reference to FIG. 9 .

[0109] Figure 9 is a schematic diagram of a process for determining target soundtrack information provided by an embodiment of the present disclosure. Please refer to Figure 9, which includes: a candidate soundtrack set. The candidate soundtrack set may include candidate soundtrack information 1, candidate soundtrack information 2, and candidate soundtrack information 3. The music-related tags in the candidate soundtrack information 1 include: rock style and fast tempo, the music-related tags in the candidate soundtrack information 2 include: electronic music style and fast tempo, and the music-related tags in the candidate soundtrack information 3 include: rap style and fast tempo. The terminal device (not shown in Figure 9) can deduplicate the above-mentioned music-related tags to obtain the target soundtrack information, wherein the music-related tags in the target soundtrack information include: rock style, electronic music style, rap style, and fast tempo. In this way, since the accuracy of the target soundtrack information is relatively high, the terminal device can improve the accuracy of the background music based on the target soundtrack information.

[0110] The disclosed embodiments provide a method for determining target soundtrack information, which includes obtaining the top N candidate soundtrack information from a target soundtrack set, determining the music-related tags corresponding to each candidate soundtrack information, and performing deduplication processing on the multiple music-related tags corresponding to the multiple candidate soundtrack information to obtain the target soundtrack information. Because the top N candidate soundtrack information is the soundtrack information with a higher first parameter or a higher second parameter, the target soundtrack information determined by the terminal device is more accurate, thereby improving the accuracy of the generated background music and enhancing the promotion of the video.

[0111] Based on any one of the above embodiments, the process of the above video processing method will be described below with reference to FIG10 .

[0112] FIG10 is a process diagram of a video processing method provided by an embodiment of the present disclosure. Please refer to FIG10 , which includes: a first video, multiple video matching, a video processing model, a preset model, and a music generation model. Among them, the terminal device (not shown in FIG10 ) can input the first video into the video processing model to obtain video information of the first video. The terminal device can input video information, video type 1, video type 2, video type 3, and other video types into the preset model. The preset model can determine that the correlation between video type 1 and the video information is 95%, the correlation between video type 2 and the video information is 15%, and the correlation between video type 3 and the video information is 20%.

[0113] Please refer to Figure 10. The preset model can determine that video type 1 is the target video type, and the terminal device can determine the soundtrack set corresponding to video type 1 as the target soundtrack set. The target soundtrack set includes soundtrack information 1, soundtrack information 2, soundtrack information 3, ..., and soundtrack information 10. The first parameter of soundtrack information 1 is 10, the first parameter of soundtrack information 2 is 700, the first parameter of soundtrack information 3 is 900, ..., and the first parameter of soundtrack information 10 is 1000. The terminal device can sort according to the size of the first parameter, where soundtrack information 10 is the head of the team and soundtrack information 1 is the tail of the team. If N is 3, the terminal device can determine that the candidate soundtrack information includes soundtrack information 10, soundtrack information 3, and soundtrack information 2.

[0114] As shown in Figure 10, the candidate soundtrack set may include soundtrack information 1, soundtrack information 2, and soundtrack information 3. The music-related tags in soundtrack information 1 include rock style and fast tempo, the music-related tags in soundtrack information 2 include electronic music style and fast tempo, and the music-related tags in soundtrack information 3 include electronic music style and fast tempo. The terminal device may perform deduplication processing on the aforementioned music-related tags to obtain target soundtrack information, wherein the music-related tags in the target soundtrack information include rock style, electronic music style, and fast tempo.

[0115] As shown in Figure 10 , the terminal device can input video information and target soundtrack information into the music generation model, which can then output background music. The terminal device can then add background music to the first video to generate a second video. In this way, since the video information of the first video matches the target soundtrack information, the terminal device can combine the target soundtrack information to generate background music that matches the video content of the first video, eliminating the need to select background music from existing music sources. This improves the accuracy of the background music. Furthermore, since the terminal device can automatically generate background music for the first video, eliminating the need for the user to create new background music, the efficiency of background music generation can be improved.

[0116] FIG11 is a schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure. Referring to FIG11 , the video processing device 110 includes an acquisition module 111, a processing module 112, a determination module 113, and a generation module 114, wherein:

[0117] The acquisition module 111 is used to acquire a first video;

[0118] The processing module 112 is used to process the first video to obtain video information of the first video, where the video information is used to indicate the video content of the first video;

[0119] The determining module 113 is configured to determine, based on the video information, target soundtrack information corresponding to the video information from a plurality of preset soundtrack sets, wherein the plurality of soundtrack sets correspond to a plurality of video types, and each soundtrack set includes a plurality of soundtrack information;

[0120] The generating module 114 is configured to generate background music for the first video based on the video information and the target soundtrack information.

[0121] According to one or more embodiments of the present disclosure, the determining module 113 is specifically configured to:

[0122] Determining a target soundtrack set from a plurality of soundtrack sets based on the video information;

[0123] The target soundtrack information is determined based on a plurality of soundtrack information included in the target soundtrack set.

[0124] According to one or more embodiments of the present disclosure, the determining module 113 is specifically configured to:

[0125] Determining a target video type corresponding to the video information among a plurality of video types corresponding to the plurality of soundtrack sets;

[0126] The soundtrack set corresponding to the target video type is determined as the target soundtrack set.

[0127] According to one or more embodiments of the present disclosure, the determining module 113 is specifically configured to:

[0128] Inputting the video information and multiple video types into a preset model to obtain a target video type, wherein the target video type has the highest correlation with the video information;

[0129] The preset model is used for text comprehension and logical reasoning.

[0130] According to one or more embodiments of the present disclosure, the determining module 113 is specifically configured to:

[0131] Obtaining first N candidate soundtrack information in the target soundtrack set, wherein the plurality of soundtrack information in the target soundtrack set is sorted according to a preset rule, where N is an integer greater than 0;

[0132] The target soundtrack information is determined based on the first N candidate soundtrack information.

[0133] According to one or more embodiments of the present disclosure, the determining module 113 is specifically configured to:

[0134] Determine the music-related label corresponding to each candidate soundtrack information;

[0135] Deduplication processing is performed on multiple music-related tags corresponding to multiple candidate soundtrack information to obtain the target soundtrack information.

[0136] According to one or more embodiments of the present disclosure, the preset rule includes at least one of the following:

[0137] Sort by the size of the first parameter corresponding to each piece of music information, where the first parameter is used to indicate the number of times a target video has been played within the historical period, and the target video may be a video whose background music is the music corresponding to the music information;

[0138] The video is sorted according to the size of the second parameter corresponding to each piece of music information, where the second parameter is used to indicate the number of the target videos in a historical period.

[0139] According to one or more embodiments of the present disclosure, the generating module 114 is specifically configured to:

[0140] Inputting the video information and the target soundtrack information into a music generation model to obtain the background music;

[0141] Wherein, the music generation model is used to generate music.

[0142] According to one or more embodiments of the present disclosure, the acquisition module 111 is further configured to:

[0143] The background music is added to the first video to obtain a second video.

[0144] The video processing device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.

[0145] FIG12 is a schematic diagram of the structure of a terminal device provided by an embodiment of the present disclosure. Please refer to FIG12, which shows a schematic diagram of the structure of a terminal device 1200 suitable for implementing an embodiment of the present disclosure. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The terminal device shown in FIG12 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

[0146] As shown in FIG12 , terminal device 1200 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1201, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1202 or programs loaded from a storage device 1208 into a random access memory (RAM) 1203. RAM 1203 also stores various programs and data required for the operation of terminal device 1200. Processing device 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An input / output (I / O) interface 1205 is also connected to bus 1204.

[0147] Typically, the following devices may be connected to the I / O interface 1205: an input device 1206 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1208 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1209. The communication device 1209 may allow the terminal device 1200 to communicate with other devices wirelessly or by wire to exchange data. Although FIG12 illustrates a terminal device 1200 having various devices, it should be understood that not all of the illustrated devices are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0148] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 1209, or installed from the storage device 1208, or installed from the ROM 1202. When the computer program is executed by the processing device 1201, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0149] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with 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 (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a 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, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0150] The computer-readable medium may be included in the terminal device, or may exist independently without being incorporated into the terminal device.

[0151] The computer-readable medium carries one or more programs. When the one or more programs are executed by the terminal device, the terminal device executes the method shown in the above embodiment.

[0152] An embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, various methods that may be involved in the above embodiments are implemented.

[0153] An embodiment of the present disclosure provides a computer program product, including a computer program, which implements various possible methods involved in the above embodiments when executed by a processor.

[0154] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).

[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0156] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0157] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0158] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0159] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0160] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0161] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws and regulations. Data may include information, parameters and messages, such as flow switching indication information.

[0162] In a first aspect, an embodiment of the present disclosure provides a video processing method, the video processing method comprising:

[0163] Get the first video;

[0164] Processing the first video to obtain video information of the first video, where the video information is used to indicate video content of the first video;

[0165] Based on the video information, determining target soundtrack information corresponding to the video information from a plurality of preset soundtrack sets, wherein the plurality of soundtrack sets correspond to a plurality of video types, and each soundtrack set includes a plurality of soundtrack information;

[0166] Based on the video information and the target soundtrack information, background music for the first video is generated.

[0167] According to one or more embodiments of the present disclosure, determining target soundtrack information corresponding to the video information from a plurality of preset soundtrack sets based on the video information includes:

[0168] Determining a target soundtrack set from a plurality of soundtrack sets based on the video information;

[0169] The target soundtrack information is determined based on a plurality of soundtrack information included in the target soundtrack set.

[0170] According to one or more embodiments of the present disclosure, determining a target soundtrack set from multiple soundtrack sets based on the video information includes:

[0171] Determining a target video type corresponding to the video information among a plurality of video types corresponding to the plurality of soundtrack sets;

[0172] The soundtrack set corresponding to the target video type is determined as the target soundtrack set.

[0173] According to one or more embodiments of the present disclosure, determining a target video type corresponding to the video information among the multiple video types corresponding to the multiple soundtrack sets includes:

[0174] Inputting the video information and multiple video types into a preset model to obtain a target video type, wherein the target video type has the highest correlation with the video information;

[0175] The preset model is used for text comprehension and logical reasoning.

[0176] According to one or more embodiments of the present disclosure, determining the target soundtrack information based on the plurality of soundtrack information included in the target soundtrack set includes:

[0177] Obtaining first N candidate soundtrack information in the target soundtrack set, wherein the plurality of soundtrack information in the target soundtrack set is sorted according to a preset rule, where N is an integer greater than 0;

[0178] The target soundtrack information is determined based on the first N candidate soundtrack information.

[0179] According to one or more embodiments of the present disclosure, the music information includes music-related tags; and determining the target music information based on the top N candidate music information includes:

[0180] Determine the music-related label corresponding to each candidate soundtrack information;

[0181] Deduplication processing is performed on multiple music-related tags corresponding to multiple candidate soundtrack information to obtain the target soundtrack information.

[0182] According to one or more embodiments of the present disclosure, the preset rule includes at least one of the following:

[0183] Sort by the size of the first parameter corresponding to each piece of music information, where the first parameter is used to indicate the number of times a target video has been played within the historical period, and the target video may be a video whose background music is the music corresponding to the music information;

[0184] The video is sorted according to the size of the second parameter corresponding to each piece of music information, where the second parameter is used to indicate the number of the target videos in a historical period.

[0185] According to one or more embodiments of the present disclosure, generating background music for the first video based on the video information and the target soundtrack information includes:

[0186] Inputting the video information and the target soundtrack information into a music generation model to obtain the background music;

[0187] Wherein, the music generation model is used to generate music.

[0188] According to one or more embodiments of the present disclosure, after generating the background music of the first video, the method further includes:

[0189] The background music is added to the first video to obtain a second video.

[0190] In a second aspect, an embodiment of the present disclosure provides a video processing device, the video processing device including an acquisition module, a processing module, a determination module, and a generation module, wherein:

[0191] The acquisition module is used to acquire the first video;

[0192] The processing module is used to process the first video to obtain video information of the first video, where the video information is used to indicate the video content of the first video;

[0193] The determining module is configured to determine, based on the video information, target soundtrack information corresponding to the video information from a plurality of preset soundtrack sets, wherein the plurality of soundtrack sets correspond to a plurality of video types, and each soundtrack set includes a plurality of soundtrack information;

[0194] The generation module is used to generate background music for the first video based on the video information and the target soundtrack information.

[0195] According to one or more embodiments of the present disclosure, the determining module is specifically configured to:

[0196] Determining a target soundtrack set from a plurality of soundtrack sets based on the video information;

[0197] The target soundtrack information is determined based on a plurality of soundtrack information included in the target soundtrack set.

[0198] According to one or more embodiments of the present disclosure, the determining module is specifically configured to:

[0199] Determining a target video type corresponding to the video information among a plurality of video types corresponding to the plurality of soundtrack sets;

[0200] The soundtrack set corresponding to the target video type is determined as the target soundtrack set.

[0201] According to one or more embodiments of the present disclosure, the determining module is specifically configured to:

[0202] Inputting the video information and multiple video types into a preset model to obtain a target video type, wherein the target video type has the highest correlation with the video information;

[0203] The preset model is used for text comprehension and logical reasoning.

[0204] According to one or more embodiments of the present disclosure, the determining module is specifically configured to:

[0205] Obtaining first N candidate soundtrack information in the target soundtrack set, wherein the plurality of soundtrack information in the target soundtrack set is sorted according to a preset rule, where N is an integer greater than 0;

[0206] The target soundtrack information is determined based on the first N candidate soundtrack information.

[0207] According to one or more embodiments of the present disclosure, the determining module is specifically configured to:

[0208] Determine the music-related label corresponding to each candidate soundtrack information;

[0209] Deduplication processing is performed on multiple music-related tags corresponding to multiple candidate soundtrack information to obtain the target soundtrack information.

[0210] According to one or more embodiments of the present disclosure, the preset rule includes at least one of the following:

[0211] Sort by the size of the first parameter corresponding to each piece of music information, where the first parameter is used to indicate the number of times a target video has been played within the historical period, and the target video may be a video whose background music is the music corresponding to the music information;

[0212] The video is sorted according to the size of the second parameter corresponding to each piece of music information, where the second parameter is used to indicate the number of the target videos in a historical period.

[0213] According to one or more embodiments of the present disclosure, the generating module is specifically configured to:

[0214] Inputting the video information and the target soundtrack information into a music generation model to obtain the background music;

[0215] Wherein, the music generation model is used to generate music.

[0216] According to one or more embodiments of the present disclosure, the processing module is further configured to:

[0217] The background music is added to the first video to obtain a second video.

[0218] In a third aspect, an embodiment of the present disclosure provides a terminal device including: a processor and a memory;

[0219] The memory stores computer-executable instructions;

[0220] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video processing method as described in the first aspect and various possible aspects of the first aspect.

[0221] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the video processing method as described in the first aspect and various possible aspects of the first aspect are implemented.

[0222] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0223] In addition, although the operations are described in a specific order, this should not be understood as requiring that these operations be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of this disclosure. Certain features described in the context of separate embodiments can also be implemented in a single embodiment in combination. Conversely, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination. Although the subject matter has been described in language specific to structural features and / or method logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A video processing method, comprising: Get the first video; Processing the first video to obtain video information of the first video, where the video information is used to indicate video content of the first video; Based on the video information, determining target soundtrack information corresponding to the video information from a plurality of preset soundtrack sets, wherein the plurality of soundtrack sets correspond to a plurality of video types, and each soundtrack set includes a plurality of soundtrack information; Based on the video information and the target soundtrack information, background music for the first video is generated.

2. The method according to claim 1, wherein The step of determining target soundtrack information corresponding to the video information from a plurality of preset soundtrack sets based on the video information includes: Determining a target soundtrack set from a plurality of soundtrack sets based on the video information; The target soundtrack information is determined based on a plurality of soundtrack information included in the target soundtrack set.

3. The method according to claim 2, wherein: The step of determining a target soundtrack set from a plurality of soundtrack sets based on the video information includes: Determining a target video type corresponding to the video information among a plurality of video types corresponding to the plurality of soundtrack sets; The soundtrack set corresponding to the target video type is determined as the target soundtrack set.

4. The method according to claim 3, wherein: Determining a target video type corresponding to the video information among the multiple video types corresponding to the multiple soundtrack sets includes: Inputting the video information and multiple video types into a preset model to obtain a target video type, wherein the target video type has the highest correlation with the video information; The preset model is used for text comprehension and logical reasoning.

5. The method according to any one of claims 2 to 4, wherein: The determining the target soundtrack information based on the plurality of soundtrack information included in the target soundtrack set includes: Obtaining first N candidate soundtrack information in the target soundtrack set, wherein the plurality of soundtrack information in the target soundtrack set is sorted according to a preset rule, where N is an integer greater than 0; The target soundtrack information is determined based on the first N candidate soundtrack information.

6. The method according to claim 5, wherein: The music information includes music-related tags; The determining the target soundtrack information based on the first N candidate soundtrack information includes: Determine the music-related label corresponding to each candidate soundtrack information; Deduplication processing is performed on multiple music-related tags corresponding to multiple candidate soundtrack information to obtain the target soundtrack information.

7. The method according to claim 5 or 6, wherein: The preset rules include at least one of the following: Sort by the size of the first parameter corresponding to each piece of music information, where the first parameter is used to indicate the number of times a target video has been played in a historical period. The target video may be a video whose background music is the music corresponding to the music information; The second parameters corresponding to each piece of music information are sorted, where the second parameter is used to indicate the number of the target videos in the historical period.

8. The method according to any one of claims 1 to 7, wherein: The step of generating background music for the first video based on the video information and the target soundtrack information includes: Inputting the video information and the target soundtrack information into a music generation model to obtain the background music; Wherein, the music generation model is used to generate music.

9. The method according to any one of claims 1 to 8, wherein: After generating the background music of the first video, the method further includes: The background music is added to the first video to obtain a second video.

10. A video processing device, comprising an acquisition module, a processing module, a determination module and a generation module, wherein: The acquisition module is configured to acquire a first video; The processing module is configured to process the first video to obtain video information of the first video, where the video information is used to indicate video content of the first video; The determining module is configured to determine, based on the video information, target soundtrack information corresponding to the video information from a plurality of preset soundtrack sets, wherein the plurality of soundtrack sets correspond to a plurality of video types, and each soundtrack set includes a plurality of soundtrack information; The generating module is configured to generate background music for the first video based on the video information and the target soundtrack information.

11. A terminal device comprising a processor and a memory, wherein: The memory is configured to store computer-executable instructions; The processor is configured to execute the computer-executable instructions stored in the memory, so that the processor performs the video processing method according to any one of claims 1 to 9.

12. A computer-readable storage medium storing computer-executable instructions, wherein: When the processor executes the computer-executable instruction, the video processing method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Background music adding method and device and electronic device

    CN110740262A

  • Video music matching method and device, server, terminal and storage medium

    CN111031391A

  • Video generation method and device, electronic equipment and storage medium

    CN112911379A

  • Video playing method and apparatus, and device and storage medium

    WO2024007833A1