CN114286181B - Video optimization method and device, electronic equipment and storage medium - Google Patents

Video optimization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114286181B
CN114286181B CN202111238981.XA CN202111238981A CN114286181B CN 114286181 B CN114286181 B CN 114286181B CN 202111238981 A CN202111238981 A CN 202111238981A CN 114286181 B CN114286181 B CN 114286181B
Authority
CN
China
Prior art keywords
video
target
template
optimized
target template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111238981.XA
Other languages
Chinese (zh)
Other versions
CN114286181A (en
Inventor
许奂杰
吴恒冠
李岳光
严计升
董浩
林璟
林琴
张浩鑫
芦清林
杨秀金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111238981.XA priority Critical patent/CN114286181B/en
Publication of CN114286181A publication Critical patent/CN114286181A/en
Application granted granted Critical
Publication of CN114286181B publication Critical patent/CN114286181B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application relates to the technical field of video processing, in particular to a video optimization method, a device, electronic equipment and a storage medium, which are used for responding to an optimization request aiming at a video to be optimized, carrying out tag identification on the video to be optimized to obtain a video tag set corresponding to the video to be optimized, wherein the optimization request comprises a platform type of at least one target application platform and an original size of the video to be optimized; respectively obtaining target template sets corresponding to at least one target application platform based on the obtained at least one platform type, original size and video tag set; each target template has a target size meeting the putting size condition of the corresponding target application platform; and respectively filling the videos to be optimized into each target template contained in the obtained at least one target template set to obtain each optimized target video, so that video distortion can be avoided when the video size is adjusted, and the video click rate is improved.

Description

Video optimization method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of video processing technologies, and in particular, to a video optimization method, a video optimization device, an electronic device, and a storage medium.
Background
Currently, with the development of video technology and network technology, the same target video can be put in different application platforms.
However, in the process of delivering the target video, since the requirements of different application platforms for delivering the target video may be different, for example, the delivering size of the same target video in the game platform is different from the delivering size in the social platform; therefore, in order to ensure that the released target video can meet the requirements of different application platforms on the release size, the target video needs to be optimized before release.
In the related art, when optimizing a target video, the original ratio (such as the aspect ratio) of the target video is generally adjusted based on the target ratio of an application platform, so as to determine the delivery size of the target video, so as to meet the video delivery requirements of different application platforms.
However, when the target proportion of the application platform is larger than the original proportion of the target video, the target video is optimized by adopting the mode, part of video elements are lost in the process of adjusting the target video, so that video distortion occurs in the adjusted target video, the expected playing effect cannot be achieved, and the video click rate is reduced.
Disclosure of Invention
The embodiment of the application provides a video optimization method, a video optimization device, electronic equipment and a storage medium, which are used for avoiding video distortion of a target video in a size adjustment process, so that the video click rate is improved.
The video optimization method provided by the embodiment of the application comprises the following steps:
in response to an optimization request aiming at a video to be optimized, carrying out tag identification on the video to be optimized to obtain a video tag set corresponding to the video to be optimized, wherein the optimization request comprises a platform type of at least one target application platform and an original size of the video to be optimized;
respectively obtaining target template sets corresponding to the at least one target application platform based on the obtained at least one platform type, the original size and the video tag sets; each target template has a target size meeting the putting size condition of the corresponding target application platform;
and filling the videos to be optimized into each target template contained in the obtained at least one target template set respectively to obtain optimized target videos.
The video optimization device provided by the embodiment of the application comprises:
the video optimizing method comprises a first identifying unit, a second identifying unit and a third identifying unit, wherein the first identifying unit is used for identifying labels of videos to be optimized in response to an optimizing request aiming at the videos to be optimized to obtain a video label set corresponding to the videos to be optimized, and the optimizing request comprises a platform type of at least one target application platform and an original size of the videos to be optimized;
The second identification unit is used for respectively obtaining target template sets corresponding to the at least one target application platform based on the obtained at least one platform type, the original size and the video tag set; each target template has a target size meeting the putting size condition of the corresponding target application platform;
and the optimizing unit is used for respectively filling the videos to be optimized into each target template contained in the obtained at least one target template set to obtain optimized target videos.
Optionally, the second identifying unit is configured to:
for the at least one target application platform, respectively executing the following operations:
determining a candidate template set corresponding to one target application platform according to the platform type and the original size of the target application platform, wherein the candidate template set comprises a plurality of candidate templates, and each candidate template corresponds to one template label set;
and matching the video label set with the template label set corresponding to each candidate template respectively to obtain each target template, and generating a target template set containing each target template.
Optionally, when tag identification is performed on the video to be optimized to obtain the video tag set of the video to be optimized, the first identifying unit is configured to:
obtaining video characteristics of the video to be optimized, wherein the video characteristics are at least one of image content characteristics, audio content characteristics and text content characteristics;
determining the matching probability between the video features and the candidate features corresponding to the candidate tags by adopting a trained tag identification model, respectively taking the candidate tags meeting the matching probability condition as the video tags of the video to be optimized, and generating a video tag set containing the video tags;
the label recognition model is obtained through iterative training based on a training sample set, wherein the training sample set comprises a plurality of video samples to be optimized, and the video samples to be optimized correspond to video sample characteristics and sample video labels respectively.
Optionally, the optimizing unit is configured to:
for each target template contained in the obtained at least one target template set, respectively executing the following operations:
based on the size of a filling area corresponding to a target filling area in a target template, carrying out equal proportion adjustment on the original size of the video to be optimized;
And filling the adjusted video to be optimized into the target filling area to obtain an optimized target video.
Optionally, after the target template sets corresponding to the at least one target application platform are obtained respectively, before the video to be optimized is filled into each target template included in the obtained at least one target template set, the method further includes a processing unit, where the processing unit is configured to:
for the at least one target template set, performing the following operations respectively:
respectively sending the playing parameters corresponding to each target template to a client so that the client generates preview videos based on each playing parameter and the videos to be optimized respectively, and sending the target template identifiers corresponding to each selected preview video to a server in response to the selection instruction for each preview video;
and receiving each target template identifier returned by the client and reconstructing a target template set containing the target templates corresponding to the target template identifiers.
Optionally, the second identifying unit is configured to:
for the at least one target application platform, respectively executing the following operations:
based on the platform type, the original size and the video tag set corresponding to one target application platform, obtaining each target template corresponding to the one target application platform;
When the template number of each target template is not smaller than the template number threshold value, generating a target template set containing each target template;
and when the template quantity is determined to be smaller than the template quantity threshold value, acquiring a corresponding quantity of universal templates, and generating a target template set comprising all the universal templates and all the target templates.
Optionally, the video tag is any one of the following: video scenario tags, video style tags, presentation object tags, or key content tags.
The electronic device provided by the embodiment of the application comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor is caused to execute the steps of any video optimization method.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium and executes the computer instructions to cause the computer device to perform the steps of any of the video optimization methods described above.
An embodiment of the application provides a computer readable storage medium comprising program code for causing an electronic device to perform the steps of any one of the video optimization methods described above, when the program product is run on the electronic device.
The application has the following beneficial effects:
the embodiment of the application provides a video optimization method, a video optimization device, electronic equipment and a storage medium. When the video to be optimized is adjusted to the target size corresponding to the target application platform, the target template sets corresponding to the target application platform can be determined based on the platform type corresponding to the target application platform, the original size of the video to be optimized and the video tag sets, the video to be optimized is filled into the target templates contained in each target template set, and the original size of the video to be optimized can be adjusted to the target size specified by the target application platform on the premise that the original proportion of the video to be optimized is not changed. Therefore, even if the target proportion of the target application platform is larger than the original proportion of the video to be optimized, all video elements in the original video can be reserved, video distortion is avoided, the expected playing effect can be achieved, and the video click rate is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a schematic diagram of an application scenario according to an embodiment of the present application;
FIG. 2 is a flowchart of a video optimization method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a first interface according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for determining video tags of a video to be optimized according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of determining a target template according to an embodiment of the present application;
FIG. 6 is a first schematic diagram of a target template according to an embodiment of the present application;
FIG. 7 is a flow chart of determining a set of target templates in an embodiment of the application;
FIG. 8 is a schematic diagram of a generic template in an embodiment of the application;
FIG. 9 is a flowchart of obtaining a new set of target templates according to an embodiment of the present application;
FIG. 10 is a second interface diagram of an embodiment of the present application;
FIG. 11 is a schematic diagram illustrating an effect of a first target video according to an embodiment of the present application;
FIG. 12 is a schematic diagram illustrating the effect of a second target video according to an embodiment of the present application;
FIG. 13 is a schematic diagram illustrating an effect of a third target video according to an embodiment of the present application;
FIG. 14 is a flow chart of an advertisement optimization method according to an embodiment of the present application;
FIG. 15 is another flow chart of a video optimization method according to an embodiment of the application;
FIG. 16 is a schematic diagram of a video optimizing apparatus according to an embodiment of the present application;
fig. 17 is a schematic diagram of a hardware composition structure of an electronic device to which the embodiment of the present application is applied.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the technical solutions of the present application, but not all embodiments. All other embodiments, based on the embodiments described in the present document, which can be obtained by a person skilled in the art without any creative effort, are within the scope of protection of the technical solutions of the present application.
Some of the concepts involved in the embodiments of the present application are described below.
Video to be optimized: the video to be optimized characterizes various forms of video information available in the Internet, such as game advertisement video, start-up advertisement of video application software, and the like.
Target video: the target video is a video with a target size which is size information of a put size condition of the target application platform, for example, the target size of the target video is 9:16.
Video tag set: the video tag set comprises a plurality of video tags, and each video tag is used for representing specific content and characteristics of video.
In particular, the video tag may be a video storyline tag that characterizes a storyline of a video, such as driving, education, etc.; the video tag can also be a video style tag, and the video style tag characterizes the color style of the video, such as lovely style, cheerful style and the like; the video tag can also be a display object tag, and the display object tag represents a tag of a commodity displayed by the video, such as an automobile, soda water and the like; the video tag may also be a key content tag, where the key content tag characterizes key content that can attract the target object to purchase the merchandise, such as a video trailer image, which is not limited in the embodiment of the present application.
The target application platform comprises: the target application platform is a platform with application programs in different video creative forms, such as a game application platform, a video playing application platform and the like, and each target application platform corresponds to different video delivery size conditions.
The application program is a computer program capable of completing one or more services, some application programs are required to be installed on a used terminal device by a user to be used, and some application programs are not required to be installed, for example, various applets, webpages and the like in certain social applications. The applet can be used without downloading and installing, and the user can open the application program by sweeping or searching.
Target template set: the target template set is a set of target templates corresponding to the target application platform, the target template set comprises a plurality of target templates, and each target template has a target size meeting the putting size condition of the corresponding target application platform.
The following briefly describes the design concept of the embodiment of the present application:
at present, with the development of video technology and network technology, the same target video can be put in different application platforms, for example, the same advertisement video can be put in a game platform or a video playing platform.
However, the requirements of different application platforms on the putting size of the video may be different, for example, the target video is an advertisement video, the putting size of the same advertisement video in the game platform is 9:16, and the putting size in the social platform is 3:4, so the putting size of the advertisement video in the game platform is different from the putting size in the social platform; in order to ensure that target videos put in different target application platforms can meet the requirements of different application platforms on the put size, the put size of the target videos needs to be optimized before video putting, so that the video size of the optimized target videos can meet the put size of the target application platforms.
In the related art, when optimizing a target video, the original scale of the target video is generally adjusted based on the target scale (e.g., aspect ratio) of the application platform, for example, stretching the target video can adjust the target video from the original scale to the target scale required when the application platform is launched.
However, when the target proportion of the application platform is larger than the original proportion of the target video, the target video is optimized by adopting the mode, and part of video elements of the target video are lost in the process of adjusting the video size, so that video content is distorted, and after the video is put into the application platform, the expected playing effect cannot be achieved, and the click rate of the target video is reduced.
And if the video is required to be put on a plurality of different target application platforms, the video size needs to be adjusted for a plurality of times respectively so as to adapt to the put-on size requirements of the different target application platforms, target videos under a plurality of versions are stored, and the adjustment process depends on professional designers, so that a large amount of time and resources are consumed, and the tracking of the effect expression of the same video on the different application platforms is not facilitated.
In view of this, the embodiments of the present application provide a video optimization method, apparatus, electronic device, and storage medium. The video tag set is obtained by analyzing the video content, and the target template set corresponding to each target application platform is respectively determined based on the platform type and the original size corresponding to at least one target application platform and the video tag set of the video to be optimized, so that the video to be optimized is optimized based on each target template set, the optimized target video can meet the requirement of the putting size of different target application platforms, the situation of video distortion is avoided, the video making and putting threshold is greatly reduced, and the video putting effect is enhanced.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and not for limitation of the present application, and embodiments of the present application and features of the embodiments may be combined with each other without conflict.
Fig. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. The application scenario diagram includes a client 110 and a server 120. The client 110 in the embodiment of the present application is a device that installs a video resizing application.
The video size adjustment application according to the embodiment of the application may be software, or may be a web page, an applet, etc., and the server is a server for video size adjustment corresponding to the software or the web page, the applet, etc.
It should be noted that, the video optimization method in the embodiment of the present application may be executed by the server or the client separately, or may be executed by the server and the client together. When the server and the client execute together, for example, the client may send a triggered optimization request and a video to be optimized to the server, and after the server determines a corresponding target template set, the video to be optimized is optimized based on each target template included in the determined target template set, so that each optimized target video is sent to the client for display. Hereinafter, the server and the client are mainly used as examples, and the method is not particularly limited.
The following takes advertisement videos as an example:
(1) The target object selects each target application platform, game platform and video playing platform which desire to deliver the advertisement video in the client, so that the client triggers and generates an optimization request, and the client sends the optimization request which triggers and generates and the advertisement video uploaded by the client to the server.
The optimization request comprises a platform type corresponding to the game platform, a platform type corresponding to the video playing platform and the original size of the advertisement video.
(2) And the server identifies the video content of the advertisement video after the acquired advertisement video and the optimization request, so as to acquire a video tag set of the advertisement video.
The video tag set comprises a vehicle driving scene tag and an automobile industry tag.
(3) And matching and obtaining a target template set corresponding to the game platform and a target template set corresponding to the video playing platform from each candidate template based on the platform type corresponding to the game platform, the platform type corresponding to the video playing platform, the original size of the advertisement video, the vehicle driving scene tag and the automobile industry tag.
(4) And filling the original advertisement videos into each target template contained in each target template set respectively, so as to obtain target advertisement videos meeting the putting size condition of the game platform and target advertisement videos meeting the putting size condition of the video playing platform.
(5) And sending each target advertisement video to the client, so that the client can display each generated target advertisement video in different target application platforms after receiving each target advertisement video.
It should be noted that only one of the application scenarios is described above, and other more scenarios exist in the actual service.
In an alternative embodiment, the client 110 and the server 120 may communicate over a communication network.
In an alternative embodiment, the communication network is a wired network or a wireless network.
In the embodiment of the present application, the client 110 is a computer device used by a user, and the computer device may be a personal computer, a mobile phone, a tablet computer, a notebook, an electronic book reader, a vehicle-mounted terminal, or the like, which has a certain computing capability and operates instant messaging software and a website or social software and a website. Each client 110 is connected to a server 120 through a wireless network, and the server 120 is a server cluster or a cloud computing center formed by one server or a plurality of servers, or is a virtualization platform.
It should be noted that, the method shown in fig. 1 is merely illustrative, and the number of clients and servers is not limited in practice, and is not particularly limited in the embodiment of the present application.
The video optimization method provided by the exemplary embodiments of the present application will be described below with reference to the accompanying drawings in conjunction with the application scenario described above, and it should be noted that the application scenario described above is only shown for the convenience of understanding the spirit and principles of the present application, and embodiments of the present application are not limited in this respect.
Referring to fig. 2, a flowchart of an implementation of a video optimization method according to an embodiment of the present application is described herein by taking a server as an execution body, where a specific implementation flow of the method is as follows:
step 20: and responding to an optimization request aiming at the video to be optimized, and carrying out tag identification on the video to be optimized to obtain a video tag set corresponding to the video to be optimized.
The optimization request comprises at least one platform type of the target application platform and an original size of the video to be optimized.
In the embodiment of the application, the target object uploads the video to be optimized to the client, so that the client forwards the video to be optimized to the server, identifies the video size of the video to be optimized, obtains the original size of the video to be optimized, simultaneously, the client responds to platform type selection operation triggered by the target object, obtains the platform type corresponding to at least one target application platform, generates an optimization request comprising at least one platform type and the original size, and sends the generated optimization request to the server.
The platform type selection operation is a selection operation triggered by the target object aiming at least one application platform in the client.
For example, referring to fig. 3, a schematic diagram of a first interface in an embodiment of the present application is shown, in an operation interface of a client, three operation controls corresponding to an application platform are displayed, which are a "game platform" operation control, a "social platform" operation control, and a "video playing platform" operation control, respectively, and when a target object clicks the "game platform" operation control, the "social platform" operation control, and the "video playing platform" operation control, a platform type selection operation is triggered and generated, so that the client obtains a game platform type, a social platform type, and a video playing platform type in response to the platform type selection operation.
Meanwhile, the operation interface also comprises a video uploading operation control, so that the target object uploads the video to be optimized to the client by clicking the video uploading operation control, and identifies the size of the video to be optimized to obtain the original size of the video to be optimized.
The operation interface further comprises a 'determining' operation control and a 'resetting' operation control, when the target object clicks the 'determining' operation control, an optimization request comprising the game platform type, the social platform type, the video playing platform type and the original size of the video to be optimized is generated, and when the target object clicks the 'resetting' operation control, the obtained game platform type, social platform type and video playing platform type are deleted.
Then, after obtaining the video to be optimized and an optimization request aiming at the video to be optimized, the server carries out tag identification on the video to be optimized by adopting a preset tag identification mode to obtain each video tag of the video to be optimized, and generates a video tag set containing each video tag.
It should be noted that, the video tag set in the embodiment of the present application is used for marking the video content, style, video scenario and the like of the video to be optimized, and the video tag set can reflect the video content information of the video to be optimized.
Optionally, in the embodiment of the present application, a possible implementation manner is provided for obtaining a video tag set, and a process for obtaining a tag set corresponding to a video to be optimized in the embodiment of the present application is described in detail below, where the process includes:
s201: and obtaining video characteristics of the video to be optimized.
Wherein the video feature is at least one of an image content feature, an audio content feature, and a text content feature.
In the embodiment of the application, a preset feature extraction mode is adopted to extract the features of the video to be optimized, so that the video features of the video to be optimized are obtained.
The video features in the embodiment of the present application include at least one of image content features, audio content features and text content features, for example, the video features include image content features, and for example, the video features include image content features, audio content features and text content features, which are not limited in the embodiment of the present application.
In a specific implementation, if the video feature includes a plurality of features with different dimensions, the features with different dimensions need to be spliced to obtain the video feature, for example, if the image content feature, the audio content feature and the text content feature are obtained through a preset feature extraction mode, the image content feature, the audio content feature and the text content feature are spliced through a preset feature splicing mode, so as to obtain the video feature of the video to be optimized.
In the embodiment of the application, when the feature extraction is performed on the video to be optimized, the feature extraction is performed on the video to be optimized from different dimensions through different feature extraction models, so as to obtain the features of the video to be optimized in different dimensions. Taking video features as image content features, audio content features and text content features as examples, a process of obtaining video features in an embodiment of the present application will be described in detail, including:
s2011: and extracting the characteristics of the video to be optimized by adopting an image recognition model to obtain the image content characteristics of the video to be optimized.
The image recognition model may be a behavior recognition model, which may be, for example, a time-shift model (Temporal Shift Module, TSM).
Step 2012: and extracting the characteristics of the video to be optimized by adopting an audio identification model to obtain the audio content characteristics of the video to be optimized.
The audio recognition model may be, for example, a VGGish model, and in the embodiment of the present application, the principle of feature extraction of the video to be optimized by using the VGGish model is as follows: and extracting and obtaining a spectrogram corresponding to the audio of the video to be optimized in a fixed time segment, and inputting the spectrogram into a VGGish model for classification, wherein the VGGish model in the embodiment of the application is composed of 11 layers of convolution layers, and downsampling is carried out for 3 times, and the audio content characteristics are the characteristics output through the penultimate full-connection layer in the VGGish model.
S2013: and extracting the characteristics of the video to be optimized by adopting a text recognition model to obtain the text content characteristics of the video to be optimized.
The text recognition model may be a language representation model, and the language representation model may be a bi-directional coding model (Bidirectional Encoder Representation from Transformers, BERT) based on a converter, and is used for coding an input text and outputting a vector representation of each word/word in the text after semantic information is fused.
It should be noted that, when the feature extraction is performed on the video to be optimized, there is no limitation on the execution sequence between S2011 and S2013 in the embodiment of the present application, S2011 may be executed first, S2012 may be executed first, and of course, S2013 may be executed first, or simultaneously, which is not limited in the embodiment of the present application.
S2014: and splicing the video content characteristics, the audio content characteristics and the text content characteristics to obtain the video characteristics of the video to be optimized.
In the embodiment of the application, after the video content characteristics, the audio content characteristics and the text content characteristics are obtained, the video content characteristics, the audio content characteristics and the text content characteristics are spliced by adopting a preset characteristic splicing mode, so that the video characteristics of the video to be optimized are obtained.
S202: and determining the matching probability between the video features and the candidate features corresponding to each candidate tag by adopting a trained tag identification model, respectively taking each candidate tag meeting the matching probability condition as the video tag of the video to be optimized, and generating a video tag set containing each video tag.
The label recognition model is obtained through iterative training based on a training sample set, wherein the training sample set comprises a plurality of video samples to be optimized, and the video samples to be optimized correspond to video sample characteristics and sample video labels respectively.
First, the training process for introducing the tag recognition model is as follows: when a label recognition model is trained, firstly, a training sample set is obtained, wherein the training sample set comprises a plurality of video samples to be optimized, and video sample characteristics and sample video labels corresponding to each video sample to be optimized.
It should be noted that, in the embodiment of the present application, the video sample feature includes at least one of an image content feature, an audio content feature and a text content feature.
In addition, it should be noted that, in the embodiment of the present application, the video features obtained in the actual application process of the tag identification model are consistent with the video sample features in the training process, for example, in the actual application process, the obtained video features include the image content features and the audio content features, and then in the training process, the video sample features also need to include the image content features and the audio content features.
After the training sample set is obtained, the training sample set is input into an initial tag recognition model, and the initial tag recognition model is subjected to iterative training according to the video sample characteristics and the video tags of each sample until the objective function of the initial tag recognition model converges, so that the tag recognition model after training is obtained.
Wherein the objective function is a cross entropy function minimization between each video sample feature and the corresponding sample video tag.
It should be noted that, in the embodiment of the present application, the tag identification model is updated iteratively, for example, every 24 hours.
Then, after the trained tag recognition model is obtained, the obtained video features are input into the trained tag recognition model, the matching probability between the video features and the candidate features corresponding to each candidate tag is respectively determined, so that each matching probability is obtained, each candidate tag corresponds to one matching probability with the video features, then, each candidate tag meeting the matching probability condition is selected from each candidate tag based on each obtained matching probability, and each selected candidate tag is used as the video tag of the video to be optimized, so that a video tag set containing each video tag is generated.
In the implementation, the matching probability condition may be a probability threshold, so when each candidate tag satisfying the matching probability condition is used as a video tag of the video to be optimized, whether the corresponding candidate tag is used as the video tag of the video to be optimized may be determined by judging whether the matching probability corresponding to each candidate tag is smaller than a preset probability threshold.
In the following, a specific example will be described, for example, referring to fig. 4, which is a schematic flow chart of determining each video tag of a video to be optimized in the embodiment of the present application, assuming that the video feature of the video to be optimized is X, each candidate tag is A1, A2, A3, and the preset probability threshold is 80%, the video feature X is input into a trained tag identification model, the video feature X is matched with the candidate feature of the candidate tag A1, the video feature X is matched with the candidate feature of the candidate tag A2, and the video tag X is matched with the candidate feature of the candidate tag A3, so as to obtain a matching probability between the video feature X and the candidate feature of the candidate tag A1 of 30%, and a matching probability between the video feature X and the candidate feature of the candidate tag A2 of 80%, and a candidate tag A2 corresponding to the matching probability of 80%, and a candidate tag A3 corresponding to the matching probability of 90%, as video tags of the video to be optimized, and a candidate tag set including the candidate tag A2 and the candidate tag A3 is generated.
The video tag may be a video scenario plot tag, a video style tag, a display object tag or a key content tag, where the video scenario plot tag characterizes the content of story content of a video to be optimized, the video style tag is a video image style tag, the display object tag is a tag of an article displayed by the video, the key content tag is a benefit point of the video, that is, a content which is mainly expected to be expressed by the video, and of course, the video tag may also include a video presentation form, a video filling form, a tail frame benefit point, and the like.
It should be noted that, in the embodiment of the present application, the video tag set includes a plurality of video tags, and of course, in the actual application process, one video tag may also be included.
In this way, the video content of the video to be optimized is understood, so that the video tag set of the video to be optimized is obtained based on the trained tag recognition model, the matched target template can be ensured to be the template associated with the video content in the subsequent template matching process, and the video click rate can be improved when the target video is generated.
Step 21: and respectively obtaining target template sets corresponding to at least one target application platform based on the obtained at least one platform type, original size and video tag set.
Each target template has a target size that satisfies a launch size condition of a corresponding target application platform.
In the embodiment of the application, after the video tag of the video to be optimized is obtained, the target template set corresponding to each of the at least one target application platform can be respectively obtained according to the obtained at least one platform type, original size and video tag set.
Optionally, in the embodiment of the present application, a possible implementation manner is provided for obtaining the target template set corresponding to each of the at least one target application platform, and when step 21 is executed, the target template set corresponding to each of the at least one target application platform needs to be obtained respectively, and specifically, taking any one target application platform (hereinafter referred to as a target application platform i) as an example, the process of obtaining the target template set is described as follows:
s211: and determining a candidate template set corresponding to the target application platform i according to the platform type and the original size of the target application platform i.
The candidate template set comprises a plurality of candidate templates, and each candidate template corresponds to one template label set.
In the embodiment of the application, firstly, according to the platform type of the target application platform i, each candidate template meeting the requirement of the throwing size of the target application platform i is determined from a template database. Because each candidate template corresponds to an original size which can be adjusted, the original size of the video to be optimized is matched with the original size corresponding to each candidate template, a plurality of candidate templates are obtained from the candidate templates through matching, and a candidate template set comprising the plurality of candidate templates obtained through matching is generated.
It should be noted that, each candidate template corresponds to a template tag set, and is labeled for the candidate template in advance.
S212: and matching the video label set with the template label set corresponding to each candidate template respectively to obtain each target template, and generating a target template set containing each target template.
In the embodiment of the application, the video label set is matched with the template label set corresponding to each candidate template respectively, so that each target template which can be matched is determined from each candidate template, and the target template set containing each target template is generated.
For example, for a feature scene in the "education, finance" industry, a "finance dashboard, a writing paper" scene, templates containing industry feature materials can be adopted for filling; aiming at the special scene mouth broadcasting and scene play scenes in the financial and web service industries, the focus character following template can be adopted for filling; aiming at a characteristic scene of commodity close-up in the E-commerce industry, filling can be carried out by adopting a selling point display template; aiming at the wide 'filling' scene in all industries, a depacketizing template can be adopted; for video "multi-shot" scenes in all industries, a "highlight show" template and a "hierarchical simulcast" template may be employed, which is not limited in the embodiments of the present application.
For example, referring to fig. 5, a schematic flow chart of determining a target template in the embodiment of the present application is shown, the video label set includes two video labels, namely, an education label and a writing paper label, the template database includes four candidate templates, namely, a candidate template a, a candidate template B, a candidate template C and a candidate template D, the template label set corresponding to the candidate template a includes an education label and a writing paper label, the template label set corresponding to the candidate template B includes an automobile label, a driving test label and a vehicle driving label, the template label set corresponding to the candidate template C includes an education label and a writing paper label, the template label set corresponding to the candidate template D includes a live broadcast label and a lovely style label, the education label and the writing paper label in the video label set are matched with the template label set between the candidate templates, and whether the education label and the writing paper label are included in the template label set corresponding to the candidate templates is the same, and then, the template set corresponding to the education label and the writing paper label are obtained from the candidate templates, the template label set includes the education label and the writing paper label is the candidate template a and the candidate template D, and the candidate template D is generated as the target template set.
For example, referring to fig. 6, which is a first schematic diagram of a target template in the embodiment of the present application, a template tag set corresponding to a candidate template shown in fig. 6 includes an education tag and a writing paper tag, so that a video to be optimized is filled into a video adding area to be optimized during video optimization.
In the embodiment of the application, in order to improve the accuracy of template recommendation, when each video tag in the video tag set can be matched with each video tag in the template tag set of the candidate template, the candidate template is used as the target template obtained by matching.
Of course, in the practical application process, when each video tag in the video tag set is included in the template tag set, for example, the video tag set includes two video tags, that is, an automobile tag and a vehicle driving tag, and when the template tag set corresponding to the candidate template includes the automobile tag, the vehicle driving tag and the driving examination tag, it is determined that each video tag in the video tag set at this time is included in the template tag set of the candidate template, so that the candidate template can be used as the target template, which is not limited in the embodiment of the present application.
Optionally, in the embodiment of the present application, the corresponding target template may be determined based on the video audience group information, the video tag set, the original size and the platform type, so that accuracy of determining the target template may be improved, and the video audience group information may be, for example, children, elderly people, and the like.
Optionally, in the embodiment of the present application, the corresponding duration clipping scheme, the effect enhancement scheme, and the like may also be determined based on the video audience group information, the video tag set, the original size, and the platform type, which is not limited in the embodiment of the present application.
For example, assuming that the advertisement duration that the target application platform can play is 10 seconds and the video duration of the video to be optimized is 15 seconds, a corresponding duration clipping scheme needs to be determined based on the video tag set, the original size and the platform type, and the video to be optimized is clipped to 10 seconds.
It should be noted that the effect enhancing scheme includes a sticker and a special effect, which is not limited in the embodiment of the present application.
In this way, through the mode of label matching, the target template for video size adjustment can be accurately pushed to the target object, and the target template adapting to video content can be recommended to the target object, so that the understandability of the converted target video can be improved while size conversion is ensured, and the click rate of the target video is improved.
Optionally, in the embodiment of the present application, the target template determined based on the video tag set is a target template that conforms to the video content of the video to be optimized, however, when the target template that conforms to the video content of the video to be optimized cannot be matched, the selection of the target object for video optimization is reduced, so, in order to ensure that the target object can obtain more target templates, thereby bringing more template selections to the target object and improving the selectivity of video optimization, in the embodiment of the present application, a possible implementation manner is provided when the number of target templates does not reach the threshold of the number of templates, and referring to fig. 7, a flowchart for determining the target template set in the embodiment of the present application is provided, specifically, taking the target application platform i as an example, the process of obtaining the target template set is described as follows:
s70: and obtaining each target template corresponding to the target application platform i based on the platform type, the original size and the video tag set corresponding to the target application platform i.
In the embodiment of the application, each target template corresponding to the target application platform i is obtained based on the platform type, the original size and the video tag set corresponding to the target application platform i.
It should be noted that, the obtaining manner of each target template corresponding to the target application platform i may be, for example, the manner of S211-S212, which is not repeated herein.
After each target template corresponding to the target application platform i is obtained, a target template set is not generated temporarily.
S71: and when the template number of each target template is not smaller than the template number threshold value, generating a target template set containing each target template.
In the embodiment of the present application, whether the template number of each target template of the target application platform i is smaller than a preset template number threshold value is determined, which can be specifically divided into the following two cases: first case: the template number of each target template of the target application platform i is not less than a preset template number threshold value; second case: the template number of each target template of the target application platform i is smaller than a preset template number threshold value. Both of the above will be described in detail later.
Specifically, when S71 is executed, if it is determined that the number of templates of each target template is not less than the threshold number of templates, it is determined that each target template corresponding to the target application platform i at this time is a template for performing video optimization processing, so that a target template set including each target template is generated.
For example, assuming that the preset template number threshold is 10, after counting the number of the target templates, determining that the template number of each target template is 15, a target template set including 15 target templates is generated.
S72: when the number of templates is determined to be smaller than the threshold value of the number of templates, the corresponding number of universal templates are obtained, and a target template set containing all the universal templates and all the target templates is generated.
In the embodiment of the application, whether the template number of each target template is smaller than a preset threshold value is judged, and when the template number is smaller than the threshold value, the corresponding number of universal templates is obtained, and a target template set comprising each universal template and each target template is generated.
The universal template is suitable for all video advertisement materials, is suitable for the delivery of various advertisement industries and various traffic positions, is only suitable for the use of partial video advertisement materials, and needs to be used on the basis of understanding video content, namely the customized template.
For example, if it is determined that the number of non-universal templates or the number of adapted non-universal templates that cannot be output is smaller than the template number threshold, the style of the universal template is output, and finally each video outputs 12 target templates.
Optionally, in the embodiment of the present application, a possible implementation manner is provided for obtaining a corresponding number of universal templates, and a process for obtaining a corresponding number of universal templates in the embodiment of the present application is described in detail below, where the process includes:
calculating the difference value between the template quantity threshold value and the template quantity, and randomly acquiring the universal templates with the quantity corresponding to the difference value from all the universal templates, thereby generating a target template set comprising all the universal templates and all the target templates.
It should be noted that, in the embodiment of the present application, the obtained universal template is a template capable of meeting the requirement of the putting size of the target application platform i.
For example, referring to fig. 8, a general template diagram in an embodiment of the present application is shown, where the target size of the general template is 9:16, and the original size of the video to be optimized that can be filled is 16:9, that is, when the original size of the video to be optimized is 16:9, the original size of the video to be optimized can be adjusted from the 16:9 to the target size of 9:16 by using the general template, so as to meet the target size requirement of the target application platform.
Optionally, in the embodiment of the present application, after the target templates are obtained, because the number of target templates is large, if each target template and the video to be optimized are rendered to obtain each target video after each target template is obtained, the calculation amount is increased.
S90: and respectively sending the playing parameters corresponding to each target template to the client so that the client generates preview videos based on each playing parameter and the videos to be optimized respectively, and sending the target template identifiers corresponding to the selected preview videos to the server in response to the selection instruction for each preview video.
In the embodiment of the application, the client adopts a communication protocol agreed with the server, and respectively sends the playing parameters corresponding to each target template to the client, so that after the client receives the playing parameters, the client generates the preview video under each playing parameter based on the playing parameters and the video to be optimized, and displays the generated preview videos to the target object according to a preset display mode, then the target object can trigger a selection execution instruction for each displayed preview video, and the client responds to the selection instruction for each preview video to determine each selected preview video and sends the target template identification corresponding to each selected preview video to the server.
For example, referring to fig. 10, in the second interface schematic diagram of the embodiment of the present application, each target template obtained through template matching is a target template a "vertical video 9:16" meeting the requirement of the delivery size of the application platform X, and a target template B "horizontal video 16:9" and a target template C "horizontal video 16:9" meeting the requirement of the delivery size of the target application platform Y, so that the target object can view the preview video generated by using the target template a, view the preview video generated by using the target template B, and view the preview video generated by using the target template C in the preview area, and the target object can select the target template to be rendered so as to make the server render the video to be optimized.
S91: and receiving the target template identifiers returned by the client and regenerating a target template set containing the target templates corresponding to the target template identifiers.
In the embodiment of the application, each target template identifier returned by the client is received, the target template corresponding to each returned target template identifier is determined, and the target template set containing each target template is regenerated. Therefore, the client-side rendering only needs to map the target template into the agreed communication protocol for displaying, and does not need to truly call the FFmpeg video rendering framework to synthesize and render, so that the rendering speed is high, after the front end and the rear end are separated and rendered, the rapidity of the client-side rendering, splicing and displaying process can be ensured, the stability of the server rendering, synthesizing and storing process is reserved, and the waiting time of a user is reduced.
Step 22: and filling the videos to be optimized into each target template contained in the obtained at least one target template set respectively to obtain optimized target videos.
In the embodiment of the application, the video to be optimized is respectively filled into each target template contained in the obtained at least one target template set, so that each optimized target video is obtained.
For example, referring to fig. 11, an effect diagram of a first target video in an embodiment of the present application is shown, fig. 11 is a target video in a filled educational scene, referring to fig. 12, an effect diagram of a second target video in an embodiment of the present application is shown, fig. 12 is a target video in a filled reading scene, referring to fig. 13, an effect diagram of a third target video in an embodiment of the present application is shown, and fig. 13 is a schematic effect diagram in a filled food scene.
Optionally, in the embodiment of the present application, a possible implementation manner is provided for implementing step 22, and the method for implementing video filling in the embodiment of the present application is described in detail below, where the method includes:
s221: and based on the size of the filling area corresponding to the target filling area in one target template, carrying out equal proportion adjustment on the original size of the video to be optimized.
In the embodiment of the application, when the original size of the video to be optimized is adjusted in equal proportion based on the size of the target filling area in one target template, the original size of the video to be optimized is adjusted to the size of the target filling area, that is, the aspect ratio of the adjusted video to be optimized is the same as that of the target filling area.
S222: and filling the adjusted video to be optimized into the target filling area to obtain the optimized target video.
In the embodiment of the application, since the aspect ratio of the adjusted video to be optimized is the same as that of the target filling area, the adjusted video to be optimized is filled into the target filling area, so that the optimized target video is obtained.
For example, the video to be optimized is a horizontal version video with a width of 1280 pixels and a height of 720 pixels, the target size of the target application platform is a vertical version with a width of 720 pixels and a height of 1280 pixels, so that it is determined that the original size of the video to be optimized cannot meet the size release requirement of the target application platform, one-key conversion needs to be performed on the video size, the video scenario label of the video to be optimized is determined to be a network electronic business through a label identification model, the video style label is light and fast, and the display object label is an electronic business, so that the target template obtained through label matching is a customized template in the electronic business industry and has the customizing effect of red package rain. If the customized E-commerce template is not available under the current flow specification at this time, the universal template is recommended. Such as a three-square, accordion, etc. And then, after receiving the playing parameters sent by the server and aiming at the electronic commerce template, the client plays the video to be optimized according to the playing parameters so as to ensure that the user can preview without actually rendering a video material finished product, finally, selecting a target template, sending a target template identifier corresponding to the target template to the server, generating a final target video, and storing the final target video in a material library.
In the embodiment of the application, the current video to be optimized is understood based on the tag identification model, then, on the basis of the video to be optimized, a target template for size transformation, a time length adjustment scheme and a process for enriching video effects are predicted, namely, various transformation parameters of the video to be optimized are obtained, and finally, the video to be optimized is optimized through video rendering, so that the optimized target video is obtained. Thus, abundant target templates are adopted, different target templates are matched for different industries, traffic and advertisement contents, one-click video casting is realized, video making and casting thresholds are greatly reduced, and video casting effects are improved.
Based on the foregoing embodiments, a specific example is used to describe the video optimization method in the embodiment of the present application, and referring to fig. 14, a flowchart of the advertisement optimization method in the embodiment of the present application is shown, where the flowchart includes:
1. the target object selects each target application platform which is expected to put advertisements in the client, namely a game application platform and a video playing application platform, and triggers to generate an optimization request by clicking a 'determining' operation control, and simultaneously uploads the advertisements to be optimized to the client by clicking and dragging.
2. And carrying out tag identification on the advertisement to be optimized, and determining a video tag set of the advertisement to be optimized, wherein the video tag set comprises an education tag and a post-class coaching tag.
3. And performing label matching based on the education labels and the after-class coaching labels to obtain a corresponding target template set, wherein the target template set comprises a target template A, a target template B and a target template C, and the target template A and the target template C are universal templates.
4. And sending the playing parameters of the target template A, the target template B and the target template C to the client, so that the client generates each preview advertisement according to the playing parameters of the target template A, the target template B and the target template C and advertisements to be optimized, the target object can select a corresponding target template, namely the target template B, based on each generated preview advertisement, and clicks a 'determination' operation control in an operation interface, so that the client sends a target template identifier corresponding to the target template B to the server.
5. And determining a target template B based on the target template identification, and optimizing the advertisement to be optimized based on the target template B to obtain the target advertisement.
Based on the above embodiments, referring to fig. 15, another flowchart of a video optimization method according to an embodiment of the present application includes:
Step 150: and obtaining video scenario labels, viewing style labels, display object labels and key content labels by adopting a trained label identification model.
In the embodiment of the application, a shot segmentation mode, a video color recognition mode, a video multi-label matching mode, a main body detection mode, a caption recognition mode, a filling removal mode, a single-target tracking mode and a video cover map recognition mode can be adopted to obtain video scenario labels, vision style labels, display object labels, key content labels and other attribute labels.
Step 151: and respectively obtaining target template sets corresponding to at least one target application platform based on the obtained at least one platform type, original size, video scenario plot label, viewing style label, display object label and key content label.
The target template can be a video filling-removing template, a focus following template, an intelligent drawing template, an intelligent color-taking template, a three-grid template, an accordion template, a split lens joint broadcasting template and a fuzzy filling template.
Step 152: rendering the video to be optimized based on each target template contained in the target template set to obtain each target video.
Based on the same inventive concept, the embodiment of the application also provides a video optimization device. As shown in fig. 16, which is a schematic structural diagram of the video optimization apparatus 1600, may include:
the first identifying unit 1601 is configured to identify, in response to an optimization request for a video to be optimized, a tag of the video to be optimized, to obtain a video tag set corresponding to the video to be optimized, where the optimization request includes a platform type of at least one target application platform and an original size of the video to be optimized;
a second identifying unit 1602, configured to obtain, based on the obtained at least one platform type, original size and video tag set, target template sets corresponding to the at least one target application platform respectively; each target template has a target size meeting the putting size condition of the corresponding target application platform;
and the optimizing unit 1603 is configured to fill the video to be optimized into each target template included in the obtained at least one target template set, respectively, so as to obtain each optimized target video.
Optionally, the second identifying unit 1602 is configured to:
for at least one target application platform, the following operations are respectively executed:
determining a candidate template set corresponding to a target application platform according to the platform type and the original size of the target application platform, wherein the candidate template set comprises a plurality of candidate templates, and each candidate template corresponds to a template label set;
And matching the video label set with the template label set corresponding to each candidate template respectively to obtain each target template, and generating a target template set containing each target template.
Optionally, when performing tag identification on a video to be optimized to obtain a video tag set of the video to be optimized, the first identifying unit 1601 is configured to:
obtaining video characteristics of a video to be optimized, wherein the video characteristics are at least one of image content characteristics, audio content characteristics and text content characteristics;
determining the matching probability between the video features and the candidate features corresponding to each candidate tag by adopting a trained tag identification model, respectively taking each candidate tag meeting the matching probability condition as a video tag of the video to be optimized, and generating a video tag set containing each video tag;
the label recognition model is obtained through iterative training based on a training sample set, wherein the training sample set comprises a plurality of video samples to be optimized, and the video samples to be optimized correspond to video sample characteristics and sample video labels respectively.
Optionally, the optimizing unit 1603 is configured to:
for each target template contained in the obtained at least one target template set, respectively executing the following operations:
Based on the size of a filling area corresponding to a target filling area in a target template, carrying out equal proportion adjustment on the original size of the video to be optimized;
and filling the adjusted video to be optimized into the target filling area to obtain the optimized target video.
Optionally, after the target template sets corresponding to the at least one target application platform are respectively obtained, before the video to be optimized is respectively filled into each target template included in the obtained at least one target template set, the method further includes a processing unit 1604, where the processing unit 1604 is configured to:
for at least one target template set, the following operations are performed:
respectively sending the playing parameters corresponding to each target template to the client so that the client generates preview videos based on each playing parameter and the videos to be optimized respectively, and sending the target template identifiers corresponding to each selected preview video to the server in response to the selection instruction for each preview video;
and receiving the target template identifiers returned by the client and regenerating a target template set containing the target templates corresponding to the target template identifiers.
Optionally, the second identifying unit 1602 is configured to:
For at least one target application platform, the following operations are respectively executed:
based on a platform type, an original size and a video tag set corresponding to a target application platform, obtaining each target template corresponding to the target application platform;
when the template number of each target template is not smaller than the template number threshold value, generating a target template set containing each target template;
when the number of templates is determined to be smaller than the threshold value of the number of templates, the corresponding number of universal templates are obtained, and a target template set containing all the universal templates and all the target templates is generated.
Optionally, the video tag is any one of the following: video scenario tags, video style tags, presentation object tags, or key content tags.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
In some possible embodiments, a video optimization device according to the present application may include at least a processor and a memory. Wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps in the video optimization method according to various exemplary embodiments of the application described in this specification. For example, the processor may perform the steps as shown in fig. 2.
The embodiment of the application also provides electronic equipment based on the same conception as the embodiment of the method. In one embodiment, the electronic device may be a server, such as server 120 shown in FIG. 1. In this embodiment, the electronic device may be configured as shown in fig. 17, including a memory 1701, a communication module 1703, and one or more processors 1702.
A memory 1701 for storing computer programs for execution by the processor 1702. The memory 1701 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a program required for running an instant messaging function, and the like; the storage data area can store various instant messaging information, operation instruction sets and the like.
The memory 1701 may be a volatile memory (RAM) such as a random-access memory (RAM); the memory 1701 may also be a nonvolatile memory (non-volatile memory), such as a read-only memory, a flash memory (flash memory), a hard disk (HDD) or a Solid State Drive (SSD); or memory 1701, is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1701 may be a combination of the above.
The processor 1702 may include one or more central processing units (central processing unit, CPU) or digital processing units, or the like. Processor 1702 is configured to implement the video optimization method described above when invoking a computer program stored in memory 1701.
The communication module 1703 is used for communicating with a terminal device and other servers.
The specific connection medium between the memory 1701, the communication module 1703 and the processor 1702 is not limited to the above embodiments of the present application. The embodiment of the present application is illustrated in fig. 17 by a bus 1704 between the memory 1701 and the processor 1702, and the bus 1704 is illustrated in fig. 17 by a bold line, and the connection between other components is merely illustrative and not limiting. The bus 1704 may be classified as an address bus, a data bus, a control bus, or the like. For ease of description, only one thick line is depicted in fig. 17, but only one bus or one type of bus is not depicted.
The memory 1701 stores a computer storage medium in which computer-executable instructions for implementing the video optimization method of the embodiment of the present application are stored. The processor 1702 is configured to perform the video optimization method described above, as shown in fig. 2.
In some possible embodiments, aspects of the video optimization method provided by the present application may also be implemented in the form of a program product comprising program code for causing a computer device to perform the steps of the video optimization method according to the various exemplary embodiments of the application described herein above, when the program product is run on a computer device, e.g. the computer device may perform the steps as shown in fig. 2.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code and may run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's equipment, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the elements described above may be embodied in one element in accordance with embodiments of the present application. Conversely, the features and functions of one unit described above may be further divided into a plurality of units to be embodied.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to either imply that the operations must be performed in that particular order or that all of the illustrated operations be performed to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (12)

1. A method of video optimization, comprising:
in response to an optimization request aiming at a video to be optimized, carrying out tag identification on the video to be optimized to obtain a video tag set corresponding to the video to be optimized, wherein the optimization request comprises a platform type of at least one target application platform and an original size of the video to be optimized;
for the at least one target application platform, respectively executing the following operations: determining a candidate template set corresponding to one target application platform according to the platform type and the original size of the target application platform, wherein the candidate template set comprises a plurality of candidate templates, and each candidate template corresponds to one template label set; matching the video tag set with the template tag set corresponding to each candidate template respectively to obtain each target template, and generating a target template set containing each target template; each target template has a target size meeting the putting size condition of the corresponding target application platform;
And filling the videos to be optimized into each target template contained in the obtained at least one target template set respectively to obtain optimized target videos.
2. The method of claim 1, wherein performing tag recognition on the video to be optimized to obtain the set of video tags for the video to be optimized comprises:
obtaining video characteristics of the video to be optimized, wherein the video characteristics are at least one of image content characteristics, audio content characteristics and text content characteristics;
determining the matching probability between the video features and the candidate features corresponding to the candidate tags by adopting a trained tag identification model, respectively taking the candidate tags meeting the matching probability condition as the video tags of the video to be optimized, and generating a video tag set containing the video tags;
the label recognition model is obtained through iterative training based on a training sample set, wherein the training sample set comprises a plurality of video samples to be optimized, and the video samples to be optimized correspond to video sample characteristics and sample video labels respectively.
3. The method according to claim 1 or 2, wherein filling the video to be optimized into each target template included in the obtained at least one target template set, respectively, to obtain each optimized target video, includes:
For each target template contained in the obtained at least one target template set, respectively executing the following operations:
based on the size of a filling area corresponding to a target filling area in a target template, carrying out equal proportion adjustment on the original size of the video to be optimized;
and filling the adjusted video to be optimized into the target filling area to obtain an optimized target video.
4. The method according to claim 1 or 2, wherein after obtaining the respective target template sets corresponding to the at least one target application platform, before filling the video to be optimized into each target template included in the obtained at least one target template set, respectively, the method further comprises:
for the at least one target template set, performing the following operations respectively:
respectively sending the playing parameters corresponding to each target template to a client so that the client generates preview videos based on each playing parameter and the videos to be optimized respectively, and sending the target template identifiers corresponding to each selected preview video to a server in response to the selection instruction for each preview video;
and receiving each target template identifier returned by the client and reconstructing a target template set containing the target templates corresponding to the target template identifiers.
5. The method of claim 4, wherein obtaining a respective set of target templates for the at least one target application platform based on the obtained at least one platform type, the original size, and the set of video tags, respectively, comprises:
for the at least one target application platform, respectively executing the following operations:
based on the platform type, the original size and the video tag set corresponding to one target application platform, obtaining each target template corresponding to the one target application platform;
when the template number of each target template is not smaller than the template number threshold value, generating a target template set containing each target template;
and when the template quantity is determined to be smaller than the template quantity threshold value, acquiring a corresponding quantity of universal templates, and generating a target template set comprising all the universal templates and all the target templates.
6. The method of claim 1 or 2, wherein the video tag is any one of: video scenario tags, video style tags, presentation object tags, or key content tags.
7. A video optimization apparatus, comprising:
The video optimizing method comprises a first identifying unit, a second identifying unit and a third identifying unit, wherein the first identifying unit is used for identifying labels of videos to be optimized in response to an optimizing request aiming at the videos to be optimized to obtain a video label set corresponding to the videos to be optimized, and the optimizing request comprises a platform type of at least one target application platform and an original size of the videos to be optimized;
the second identifying unit is used for respectively executing the following operations aiming at the at least one target application platform: determining a candidate template set corresponding to one target application platform according to the platform type and the original size of the target application platform, wherein the candidate template set comprises a plurality of candidate templates, and each candidate template corresponds to one template label set; matching the video tag set with the template tag set corresponding to each candidate template respectively to obtain each target template, and generating a target template set containing each target template; each target template has a target size meeting the putting size condition of the corresponding target application platform;
and the optimizing unit is used for respectively filling the videos to be optimized into each target template contained in the obtained at least one target template set to obtain optimized target videos.
8. The apparatus of claim 7, wherein when performing tag recognition on the video to be optimized to obtain the video tag set of the video to be optimized, the first recognition unit is configured to:
obtaining video characteristics of the video to be optimized, wherein the video characteristics are at least one of image content characteristics, audio content characteristics and text content characteristics;
determining the matching probability between the video features and the candidate features corresponding to the candidate tags by adopting a trained tag identification model, respectively taking the candidate tags meeting the matching probability condition as the video tags of the video to be optimized, and generating a video tag set containing the video tags;
the label recognition model is obtained through iterative training based on a training sample set, wherein the training sample set comprises a plurality of video samples to be optimized, and the video samples to be optimized correspond to video sample characteristics and sample video labels respectively.
9. The apparatus according to claim 7 or 8, wherein the optimizing unit is configured to:
for each target template contained in the obtained at least one target template set, respectively executing the following operations:
Based on the size of a filling area corresponding to a target filling area in a target template, carrying out equal proportion adjustment on the original size of the video to be optimized;
and filling the adjusted video to be optimized into the target filling area to obtain an optimized target video.
10. The apparatus of claim 7 or 8, wherein after obtaining the respective target template sets corresponding to the at least one target application platform, before filling the video to be optimized into each target template included in the obtained at least one target template set, the apparatus further comprises a processing unit, where the processing unit is configured to:
for the at least one target template set, performing the following operations respectively:
respectively sending the playing parameters corresponding to each target template to a client so that the client generates preview videos based on each playing parameter and the videos to be optimized respectively, and sending the target template identifiers corresponding to each selected preview video to a server in response to the selection instruction for each preview video;
and receiving each target template identifier returned by the client and reconstructing a target template set containing the target templates corresponding to the target template identifiers.
11. An electronic device comprising a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1-6.
12. A computer readable storage medium, characterized in that it comprises a program code for causing an electronic device to perform the steps of the method of any of claims 1-6 when said storage medium is run on said electronic device.
CN202111238981.XA 2021-10-25 2021-10-25 Video optimization method and device, electronic equipment and storage medium Active CN114286181B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111238981.XA CN114286181B (en) 2021-10-25 2021-10-25 Video optimization method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111238981.XA CN114286181B (en) 2021-10-25 2021-10-25 Video optimization method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114286181A CN114286181A (en) 2022-04-05
CN114286181B true CN114286181B (en) 2023-08-15

Family

ID=80868899

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111238981.XA Active CN114286181B (en) 2021-10-25 2021-10-25 Video optimization method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114286181B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348459A (en) * 2022-08-16 2022-11-15 支付宝(杭州)信息技术有限公司 Short video processing method and device
CN115379259B (en) * 2022-08-18 2024-04-26 百度在线网络技术(北京)有限公司 Video processing method, device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9602881B1 (en) * 2016-01-14 2017-03-21 Echostar Technologies L.L.C. Apparatus, systems and methods for configuring a mosaic of video tiles
CN109168028A (en) * 2018-11-06 2019-01-08 北京达佳互联信息技术有限公司 Video generation method, device, server and storage medium
CN110602544A (en) * 2019-09-12 2019-12-20 腾讯科技(深圳)有限公司 Video display method and device, electronic equipment and storage medium
CN110662103A (en) * 2019-09-26 2020-01-07 北京达佳互联信息技术有限公司 Multimedia object reconstruction method and device, electronic equipment and readable storage medium
CN111683280A (en) * 2020-06-04 2020-09-18 腾讯科技(深圳)有限公司 Video processing method and device and electronic equipment
CN111739128A (en) * 2020-07-29 2020-10-02 广州筷子信息科技有限公司 Target video generation method and system
WO2021073315A1 (en) * 2019-10-14 2021-04-22 北京字节跳动网络技术有限公司 Video file generation method and device, terminal and storage medium
CN113473182A (en) * 2021-09-06 2021-10-01 腾讯科技(深圳)有限公司 Video generation method and device, computer equipment and storage medium
WO2021196281A1 (en) * 2020-03-30 2021-10-07 北京金堤科技有限公司 Multimedia file generation method and apparatus, storage medium and electronic device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10694223B2 (en) * 2017-06-21 2020-06-23 Google Llc Dynamic custom interstitial transition videos for video streaming services
CN110163050B (en) * 2018-07-23 2022-09-27 腾讯科技(深圳)有限公司 Video processing method and device, terminal equipment, server and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9602881B1 (en) * 2016-01-14 2017-03-21 Echostar Technologies L.L.C. Apparatus, systems and methods for configuring a mosaic of video tiles
CN109168028A (en) * 2018-11-06 2019-01-08 北京达佳互联信息技术有限公司 Video generation method, device, server and storage medium
CN110602544A (en) * 2019-09-12 2019-12-20 腾讯科技(深圳)有限公司 Video display method and device, electronic equipment and storage medium
CN110662103A (en) * 2019-09-26 2020-01-07 北京达佳互联信息技术有限公司 Multimedia object reconstruction method and device, electronic equipment and readable storage medium
WO2021073315A1 (en) * 2019-10-14 2021-04-22 北京字节跳动网络技术有限公司 Video file generation method and device, terminal and storage medium
WO2021196281A1 (en) * 2020-03-30 2021-10-07 北京金堤科技有限公司 Multimedia file generation method and apparatus, storage medium and electronic device
CN111683280A (en) * 2020-06-04 2020-09-18 腾讯科技(深圳)有限公司 Video processing method and device and electronic equipment
CN111739128A (en) * 2020-07-29 2020-10-02 广州筷子信息科技有限公司 Target video generation method and system
CN113473182A (en) * 2021-09-06 2021-10-01 腾讯科技(深圳)有限公司 Video generation method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114286181A (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN110213610B (en) Live broadcast scene recognition method and device
CN112929744B (en) Method, apparatus, device, medium and program product for segmenting video clips
CN114286181B (en) Video optimization method and device, electronic equipment and storage medium
CN109121022B (en) Method and apparatus for marking video segments
CN112948708B (en) Short video recommendation method
CN111400518A (en) Method, device, terminal, server and system for generating and editing works
US10721519B2 (en) Automatic generation of network pages from extracted media content
CN111199541A (en) Image quality evaluation method, image quality evaluation device, electronic device, and storage medium
CN112637675B (en) Video generation method, device, electronic equipment and storage medium
CN111836118B (en) Video processing method, device, server and storage medium
CN109992187B (en) Control method, device, equipment and storage medium
US20230291978A1 (en) Subtitle processing method and apparatus of multimedia file, electronic device, and computer-readable storage medium
CN112182281B (en) Audio recommendation method, device and storage medium
CN115496820A (en) Method and device for generating image and file and computer storage medium
CN113923504B (en) Video preview moving picture generation method and device
CN109816023B (en) Method and device for generating picture label model
CN114845149B (en) Video clip method, video recommendation method, device, equipment and medium
CN114286169A (en) Video generation method, device, terminal, server and storage medium
US20230396857A1 (en) Video generation method and apparatus, and electronic device and computer-readable medium
CN111914850B (en) Picture feature extraction method, device, server and medium
CN110166801B (en) Media file processing method and device and storage medium
CN113505268A (en) Interactive processing method and device
WO2022188563A1 (en) Dynamic cover setting method and system
CN114630194B (en) Bullet screen jump linking method, system, equipment and computer readable storage medium
CN113312516B (en) Video processing method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant