CN117294804A - Advertisement material self-adaptive generation method, device, equipment and storage medium - Google Patents

Advertisement material self-adaptive generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN117294804A
CN117294804A CN202311397226.5A CN202311397226A CN117294804A CN 117294804 A CN117294804 A CN 117294804A CN 202311397226 A CN202311397226 A CN 202311397226A CN 117294804 A CN117294804 A CN 117294804A
Authority
CN
China
Prior art keywords
new
size
background picture
videos
advertisement
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.)
Granted
Application number
CN202311397226.5A
Other languages
Chinese (zh)
Other versions
CN117294804B (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.)
China Transport Technology Co ltd
Original Assignee
China Transport Technology 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 China Transport Technology Co ltd filed Critical China Transport Technology Co ltd
Priority to CN202311397226.5A priority Critical patent/CN117294804B/en
Publication of CN117294804A publication Critical patent/CN117294804A/en
Application granted granted Critical
Publication of CN117294804B publication Critical patent/CN117294804B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/272Means for inserting a foreground image in a background image, i.e. inlay, outlay
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0276Advertisement creation

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention provides a self-adaptive generation method, a device, equipment and a storage medium of advertisement materials, wherein the method comprises the steps of obtaining background pictures and foreground design elements of the advertisement materials on edited sizes, comparing the background pictures with new sizes, and carrying out equal ratio shrinkage or super-resolution processing; calculating a scaling factor with the size completely embedded in the new size; automatically adjusting the positions of all foreground design elements of the advertisement materials according to a preset strategy; performing jigsaw processing on the background picture and other foreground design elements of the advertisement materials except the video to generate a new background picture; and then processing according to the number of videos to realize that the new background pictures are combined with the videos to generate new advertisement materials conforming to the new size.

Description

Advertisement material self-adaptive generation method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to a self-adaptive generation method, device and equipment of advertisement materials and a storage medium.
Background
In the advertising field, for advertising screens of different sizes, advertisers need to adjust the design elements of the advertisements in terms of position, size, etc. to achieve optimal effect delivery on the advertising screens of different sizes. However, most of these adjusted advertising materials of different sizes are highly similar. The more the size of the advertising screen is put, the more times the manual adjustment is required, and the more the workload is. For large brands of advertisers, they have specialized design teams that can better address the size adaptation problem. However, for most other advertisers, the ability and investment in material adaptation is limited, which in turn can affect the advertising effectiveness.
The invention patent CN114125500A provides a synthetic method and a delivery system of advertisement delivery video, which solve the problem that part of advertisers are difficult to manufacture advertisements. The method is to carry out overall equal ratio size adjustment on the video, and fill other areas of the screen by combining other advertisement parameters. However, the aspect ratio of the static background picture is required to be the same as the aspect ratio of the input, and the static background picture cannot be adaptively compatible with multiple sizes. Only the whole advertisement video is subjected to equal-ratio scaling, and the relative positions of elements in the advertisement video cannot be adaptively adjusted according to multiple sizes. The advertisement parameters need to be uploaded actively by the advertiser, multiple times for multiple sizes. Although the font, color, size and position parameters are considered for the characters, the rendering difference of the characters under different operating system environments is not considered, so that the problem that in the actual application process, the advertisement material is previewed by a user and the advertisement material which is actually rendered is slightly different is caused. Meanwhile, the problem that video duration and frame rate are different under a plurality of videos is not considered.
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, the present invention provides an advertisement material adaptive generation method, apparatus, device and storage medium, so as to solve the above-mentioned technical problems.
The invention provides a self-adaptive generation method of advertisement materials, which comprises the following steps:
s1: obtaining the edited size of advertisement materialThe background picture isThe positions of all foreground design elements of the advertisement materials are recorded as a listThe foreground design element at least comprises one of characters, pictures and videos;
s2: the size and new size of the background picture BComparing the sizes of the images if the background images areIs greater than or equal to the new sizeIs to the size of the background picturePerforming scaling down; if the background pictureIs smaller than the new sizeThe background picture is processedPerforming super resolution processing and adjusting background picturesThe size of (2) to obtain just external new sizeIs a first background picture of (1)
S3: at the first background pictureIntermediate area of new sizeIs cut out to obtain a second background picture
S4: calculating the sizeCompletely embedded in new dimensionsScaling factor of (a)
S5: automatically adjusting the positions of all the foreground design elements of the advertisement materials according to a preset strategy to obtain a new position list
S6: second background pictureAnd performing jigsaw processing on the advertisement materials and other foreground design elements except the video to generate a new background picture
S7: the number of videos in the advertisement material foreground design element is obtained, and the videos are respectively processed according to the number of videos, so that a new background picture is realizedCombining video to generate a new sizeNew advertising material of a size.
In the present invention, the super resolution processing method includes an interpolation-based method including nearest neighbor interpolation, bilinear interpolation and bicubic interpolation, a reconstruction-based method including a frequency domain method and a spatial domain method, a shallow learning-based method including machine learning, manifold learning, sample learning and sparse coding, a deep learning-based method including an SR method based on a convolutional neural network, an SR method based on a residual network and an SR method based on generating an countermeasure network.
In the present invention, the dimensions are calculatedCompletely embedded in new dimensionsScaling factor of (a)The method specifically comprises the following steps:
s41: is sized toIs of the width ofThe height isNew sizeIs of the width ofThe height isSize, dimensions ofAnd new sizeWidth ratio ofSize, dimensions ofAnd new sizeThe height ratio isThe following formula is provided:
s42: if it isThen the sizeCompletely embedded in new dimensionsScaling factor of (a)
S43: if it isThen the sizeCompletely embedded in new dimensionsScaling factor of (a)
In the invention, the positions of all the foreground design elements of the advertisement materials are automatically adjusted according to a preset strategy, wherein the preset strategy comprises misalignment and automatic alignment, and the method specifically comprises the following steps:
s51: when the predetermined strategy is not aligned, the position coordinates of all foreground design elements of the advertisement material are directly adjusted according to the scaling factorCalculating new coordinates;
s52: when the preset strategy is automatic alignment, firstly, the position coordinates of all foreground design elements of the advertisement material are adjusted according to the scaling factorCalculating new coordinates, and further judging the size according to preset judgment rulesCompletely embedded in new dimensionsDistribution of (3);
in the present invention, the preset judgment rules specifically include:
s521: when (when)When the position coordinates of a foreground design element of the advertisement material are assumed to beIf (if)The new position coordinates after the automatic alignment of the upper and lower parts are as followsIf (if)The new position coordinates after the automatic alignment of the upper and lower parts are as follows
S522: when (when)When the position coordinates of a foreground design element of the advertisement material are assumed to beIf (if)The new position coordinates after the left and right automatic alignment are as followsIf (if)The new position coordinates after the left and right automatic alignment are as follows
In the invention, the new background pictures are realized by processing the video pictures according to the number of the videosCombining video to generate a new sizeThe new advertisement material with the size specifically comprises the following components:
s71: acquiring the number of videos in the advertisement material foreground design element;
s72: if the number of videos is 0, pictures are displayedAs a new sizeCorresponding new advertisement materials;
s73: if the number of videos is 1, pictures are displayedAs a base map, combining video directly to generate new sizesCorresponding XinguangNotifying a material;
s74: if the number of videos is greater than 1, taking the lowest frame rate of all videos as the final frame rate of the new advertisement material, taking the shortest time length of all videos as the final time length of the new advertisement material, further carrying out frame shrinking treatment on videos exceeding the final frame rate one by one, cutting off the videos exceeding the time length one by one, and then carrying out picture cutting-off treatment on the videos exceeding the time length one by oneAs a base map, combining all foreground design element videos to generate a new sizeCorresponding new advertising material.
In the present invention, the frame shrinking process is further performed on the video exceeding the final frame rate one by one, specifically including:
s741: the current frame rate of the obtained video isThe target frame rate isWherein, the method comprises the steps of, wherein,
s742: the number of frames per second to be adjusted isEvery otherA position, the frame corresponding to the position needs to be subjected to frame shrinking processing, wherein,representing a downward rounding;
s743: assume a certain frameThe frame shrinking process is needed, and the front and back frames are respectivelyAnd
s744: frame is formedIs set toFront and rear two framesAndtransparency of (2) is
S745: frame is formedRespectively overlapped to the front and the back framesAndon the two frames, new front and back frames are formedAndand finishing the frame shrinking process.
The invention also provides a self-adaptive generation device of the advertisement materials, which comprises the following steps:
and (3) obtaining a background module: obtaining the edited size of advertisement materialThe background picture isSetting all the prospects of the advertisement materialsThe position of the meter element is recorded as a listThe foreground design element at least comprises one of characters, pictures and videos;
size comparison module: the size and new size of the background picture BComparing the sizes of the images if the background images areIs greater than or equal to the new sizeIs to the size of the background picturePerforming scaling down; if the background pictureIs smaller than the new sizeThe background picture is processedPerforming super resolution processing and adjusting background picturesThe size of (2) to obtain just external new sizeIs a first background picture of (1)
And a size cutting module: at the first background pictureIntermediate area of new sizeIs cut out to obtain a second background picture
And a calculation coefficient module: calculating the sizeCompletely embedded in new dimensionsScaling factor of (a)
Element adjustment module: automatically adjusting the positions of all the foreground design elements of the advertisement materials according to a preset strategy to obtain a new position list
Element jigsaw module: second background pictureAnd performing jigsaw processing on the advertisement materials and other foreground design elements except the video to generate a new background picture
Generating a material module: the number of videos in the advertisement material foreground design element is obtained, and the videos are respectively processed according to the number of videos, so that a new background picture is realizedCombining video to generate a new sizeNew advertising material of a size.
The invention also provides an electronic device comprising:
one or more processors;
storage means for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement the method of adaptive generation of advertising material as described in any of the preceding claims.
The present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the advertising material adaptive generation method as set forth in any one of the preceding claims.
The invention provides a self-adaptive generation method, a device, equipment and a storage medium of advertisement materials, wherein the method is realized by acquiring the edited size of the advertisement materialsThe background picture isThe positions of all foreground design elements of the advertisement materials are recorded as a listThe foreground design element at least comprises one of characters, pictures and videos; the size and new size of the background picture BComparing the sizes of the images if the background images areIs greater than or equal to the new sizeIs to the size of the background picturePerforming scaling down; if the background pictureIs smaller than the new sizeThe background picture is processedPerforming super resolution processing and adjusting background picturesThe size of (2) to obtain just external new sizeIs a first background picture of (1)The method comprises the steps of carrying out a first treatment on the surface of the At the first background pictureIntermediate area of new sizeIs cut out to obtain a second background pictureThe method comprises the steps of carrying out a first treatment on the surface of the Calculating the sizeCompletely embedded in new dimensionsScaling factor of (a)The method comprises the steps of carrying out a first treatment on the surface of the Automatically adjusting the positions of all the foreground design elements of the advertisement materials according to a preset strategy to obtain a new position listThe method comprises the steps of carrying out a first treatment on the surface of the Second background pictureAnd performing jigsaw processing on the advertisement materials and other foreground design elements except the video to generate a new background pictureThe method comprises the steps of carrying out a first treatment on the surface of the The number of videos in the advertisement material foreground design element is obtained, and the videos are respectively processed according to the number of videos, so that a new background picture is realizedCombining video to generate a new sizeThe new advertising material of size, the beneficial effects produced include:
1. according to the self-adaptive generation method of the advertisement materials, an advertiser only needs to arrange the advertisement materials with one size, which are designed, so that the positions of foreground design elements can be arranged in a self-adaptive mode according to different sizes of the advertisement screen, the advertisement materials with new sizes are generated, the workload of arranging the advertisement materials with multiple sizes is effectively reduced, and the design efficiency is improved;
2. the background picture is automatically cut after being subjected to equal ratio shrinkage or super resolution processing, so that the background picture can be self-adaptive to multiple sizes without requiring the aspect ratio to be the same as the size;
3. due to the adoption of the preset strategy for automatic adjustment, the arrangement position of the foreground design elements can be automatically optimized according to the aspect ratio condition of the new size, and the design effect of advertisement materials with other sizes is effectively improved;
4. because the background pictures and other foreground design elements except the video are subjected to jigsaw treatment, part of work for generating the multi-size advertisement materials can be transmitted to the front-end page for execution, the workload of background service is effectively reduced, and the speed for rendering the final advertisement materials is further effectively improved. Meanwhile, the problem that the final rendered video results are inconsistent due to the difference of the display effect of the front end and the rear end with respect to the characters can be avoided;
5. due to the adoption of the frame shrinking process, the frame information to be reduced can be overlapped on the front frame picture and the rear frame picture, so that the information loss is avoided; the problem of different video time lengths under the condition of multiple videos is considered, the method can be compatible with multiple video rendering scenes, the use difficulty is effectively reduced, and the multiple videos do not need to be clipped by other professional video clipping tools.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flow chart of an adaptive generation method for advertising material according to an exemplary embodiment of the present invention;
FIG. 2 is a background picture showing an exemplary embodiment of the inventionThe intermediate area is of a new sizeSize-cut background pictureSchematic of (2);
fig. 3 is a schematic structural diagram of an advertisement material adaptive generation device according to an exemplary embodiment of the present invention.
Detailed Description
Further advantages and effects of the present invention will become readily apparent to those skilled in the art from the disclosure herein, by referring to the accompanying drawings and the preferred embodiments. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be understood that the preferred embodiments are presented by way of illustration only and not by way of limitation.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present invention by way of illustration, and only the components related to the present invention are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In the following description, numerous details are set forth in order to provide a more thorough explanation of embodiments of the present invention, it will be apparent, however, to one skilled in the art that embodiments of the present invention may be practiced without these specific details, in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the embodiments of the present invention.
FIG. 1 is a flow chart of an adaptive generation method for advertising material according to an exemplary embodiment of the present invention;
as shown in fig. 1, the adaptive generation method of advertisement materials provided by the invention comprises the following steps:
s1: obtaining the edited size of advertisement materialThe background picture isThe positions of all foreground design elements of the advertisement materials are recorded as a listThe foreground design element at least comprises one of characters, pictures and videos;
s2: the size and new size of the background picture BComparing the sizes of the images if the background images areIs greater than or equal to the new sizeIs to the size of the background picturePerforming scaling down; if the background pictureIs smaller than the new sizeThe background picture is processedPerforming super resolution processing and adjusting background picturesThe size of (2) to obtain just external new sizeIs a first background picture of (1)
S3: at the first background pictureIntermediate area of new sizeIs cut out to obtain a second background picture
S4: calculating the sizeCompletely embedded in new dimensionsScaling factor of (a)
S5: automatically adjusting the positions of all the foreground design elements of the advertisement materials according to a preset strategy to obtain a new position list
S6: second background pictureAnd performing jigsaw processing on the advertisement materials and other foreground design elements except the video to generate a new background picture
S7: the number of videos in the advertisement material foreground design element is obtained, and the videos are respectively processed according to the number of videos, so that a new background picture is realizedCombining video to generate a new sizeNew advertising material of a size.
Specifically, in step S1, it is assumed that the user has been in a size ofThe advertisement material comprises a background picture B and other foreground design elements (including but not limited to characters, pictures and videos). The number of foreground design elements is not limited, but the video needs to be placed at the top layer, i.e., displayed on a layer of text or pictures. The background picture B needs to be placed at the bottom layer, i.e. displayed at the next layer of all foreground design elements.
Assuming that one new size isSize of background picture BAnd new sizeIs compared with the size of the (c):
in step S2, if the size of the background picture B is greater than or equal to the new sizeThe background picture B is scaled down in an equal ratio; if the size of the background picture B is smaller than the new sizePerforming super-resolution processing on the background picture B; after the background picture B is obtained and resized, the new size is just externally connectedBackground picture of (c)
The super-resolution processing method comprises an interpolation-based method, a reconstruction-based method, a shallow learning-based method and a deep learning-based method, wherein the interpolation-based method comprises nearest neighbor interpolation, bilinear interpolation and bicubic interpolation, the reconstruction-based method comprises a frequency domain method and a airspace method, the shallow learning-based method comprises machine learning, manifold learning, sample learning and sparse coding, and the deep learning-based method comprises a convolutional neural network-based SR method, a residual network-based SR method and a generating countermeasure network-based SR method. This is the prior art and will not be described in detail here.
In background pictureIntermediate area of new sizeIs cut out to obtain background picture. As shown in fig. 2, a background pictureBy rectangular shapeRepresentation, clipping out background picturesBy rectangular shapeAnd (3) representing.
Further calculation, calculation of the dimensionsCompletely embedded in new dimensionsScaling factor of (a)The method specifically comprises the following steps:
s41: is sized toIs of the width ofThe height isNew sizeIs of the width ofThe height isSize, dimensions ofAnd new sizeWidth ratio ofSize, dimensions ofAnd new sizeThe height ratio isThe following formula is provided:
s42: if it isThen the sizeCompletely embedded in new dimensionsScaling factor of (a)
S43: if it isThen the sizeCompletely embedded in new dimensionsScaling factor of (a)
According to the coefficient, all foreground design element positions of the edited advertisement material can be completely embedded into new size after calculationAnd (3) inner part. The invention provides the concept of strategy, and the scaled coefficients can be adjusted according to different preset strategiesThe calculated foreground design element positions are further optimized.
Further, the positions of all the foreground design elements of the advertisement materials are automatically adjusted according to a preset strategy, wherein the preset strategy comprises misalignment and automatic alignment, and the method specifically comprises the following steps:
s51: when the predetermined strategy is not aligned, the position coordinates of all foreground design elements of the advertisement material are directly adjusted according to the scaling factorCalculating new coordinates;
s52: when the preset strategy is automatic alignment, firstly, the position coordinates of all foreground design elements of the advertisement material are adjusted according to the scaling factorCalculating new coordinates, and further judging the size according to preset judgment rulesCompletely embedded in new dimensionsDistribution of (3);
specifically, the preset judging rule specifically includes:
s521: when (when)When the position coordinates of a foreground design element of the advertisement material are assumed to beIf (if)The new position coordinates after the automatic alignment of the upper and lower parts are as followsIf (if)The new position coordinates after the automatic alignment of the upper and lower parts are as follows
S522: when (when)When the position coordinates of a foreground design element of the advertisement material are assumed to beIf (if)The new position coordinates after the left and right automatic alignment are as followsIf (if)The new position coordinates after the left and right automatic alignment are as follows
Picture of backgroundAnd performing jigsaw processing on the advertisement material and other foreground design elements except the video to generate a new background picture. Wherein, firstly, the jigsaw processing is carried out, and the front page is mainly considered under the condition of web useThe performance of the surface user machine is insufficient, and background service is generally delivered to render advertisement material pictures, particularly videos. In order to ensure consistent display effect on characters, the same fonts are generally imported by background service. If the user uses the custom fonts, the user custom fonts also need to be uploaded to the background server, and the workload is large.
Even if the font files are the same, the font rendering effect will be slightly different due to a certain difference between the front page and the background service running environment, especially in the case of operating system differences. WPS, for example, may be used in other operating systems such as MAC or Linux, but their font rendering may be slightly different, and there is still a problem that the effect of back-end rendering advertisement materials is inconsistent with the front-end page presentation.
Therefore, the invention provides the concept of jigsaw processing, which can be simply similar to the process of firstly carrying out screenshot on non-video materials on a front-end page. Specifically, the jigsaw process is based mainly on background picturesAnd other non-video foreground design elements, performing image fusion according to the layer and position relationship, wherein the transparency of each foreground design element is 0. Through the jigsaw processing operation, part of work for generating the multi-size advertisement materials can be transmitted to the front end page for execution, so that the workload of background service is effectively reduced, and the speed for rendering the final advertisement materials is further effectively improved. Meanwhile, the problem that the final rendered video results are inconsistent due to the difference of the display effect of the characters at the front end and the rear end can be avoided.
Further, the new background pictures are respectively processed according to the number of the videosCombining video to generate a new sizeThe new advertisement material with the size specifically comprises the following components:
s71: acquiring the number of videos in the advertisement material foreground design element;
s72: if it isVideo number is 0, and pictures are takenAs a new sizeCorresponding new advertisement materials;
s73: if the number of videos is 1, pictures are displayedAs a base map, combining video directly to generate new sizesCorresponding new advertisement materials;
s74: if the number of videos is greater than 1, taking the lowest frame rate of all videos as the final frame rate of the new advertisement material, taking the shortest time length of all videos as the final time length of the new advertisement material, further carrying out frame shrinking treatment on videos exceeding the final frame rate one by one, cutting off the videos exceeding the time length one by one, and then carrying out picture cutting-off treatment on the videos exceeding the time length one by oneAs a base map, combining all foreground design element videos to generate a new sizeCorresponding new advertising material.
Specifically, the method further performs frame shrinking processing on the video exceeding the final frame rate one by one, specifically includes:
s741: the current frame rate of the obtained video isThe target frame rate isWherein, the method comprises the steps of, wherein,
s742: the number of frames per second to be adjusted isEvery otherA position, the frame corresponding to the position needs to be subjected to frame shrinking processing, wherein,representing a downward rounding;
s743: assume a certain frameThe frame shrinking process is needed, and the front and back frames are respectivelyAnd
s744: frame is formedIs set toFront and rear two framesAndtransparency of (2) is
S745: frame is formedRespectively overlapped to the front and the back framesAndon the two frames, new front and back frames are formedAndand finishing the frame shrinking process.
And cutting off the videos exceeding the time length one by one, namely, exceeding the time length, and directly discarding the following frames without participating in the generation of new advertisement materials.
Then the picture is put intoAs a base map, combining all foreground design element videos to generate a new sizeCorresponding new advertising material.
FIG. 3 is a schematic diagram of an advertisement material adaptive generation device according to an exemplary embodiment of the present invention;
as shown in fig. 3, the exemplary advertisement material adaptive generation apparatus includes:
acquisition background module 201: obtaining the edited size of advertisement materialThe background picture isThe positions of all foreground design elements of the advertisement materials are recorded as a listThe foreground design element at least comprises one of characters, pictures and videos;
size comparison module 202: the size and new size of the background picture BComparing the sizes of the images if the background images areIs greater than or equal to the new sizeIs to the size of the background picturePerforming scaling down; if the background pictureIs smaller than the new sizeThe background picture is processedPerforming super resolution processing and adjusting background picturesThe size of (2) to obtain just external new sizeIs a first background picture of (1)
Sizing module 203: at the first background pictureIntermediate area of new sizeIs cut out to obtain a second background picture
The calculation coefficient module 204: calculating the sizeCompletely embedded in new dimensionsScaling factor of (a)
Element adjustment module 205: automatically adjusting the positions of all the foreground design elements of the advertisement materials according to a preset strategy to obtain a new position list
Element tile module 206: second background pictureAnd performing jigsaw processing on the advertisement materials and other foreground design elements except the video to generate a new background picture
The generate material module 207: the number of videos in the advertisement material foreground design element is obtained, and the videos are respectively processed according to the number of videos, so that a new background picture is realizedCombining video to generate a new sizeNew advertising material of a size.
It should be noted that, the advertisement material adaptive generation device provided by the foregoing embodiment and the advertisement material adaptive generation method provided by the foregoing embodiment belong to the same concept, and specific manners in which each module and unit perform operations have been described in detail in the method embodiment, which is not described herein. In practical application, the advertisement material self-adaptive generation device provided in the above embodiment may allocate the functions to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above, which is not limited herein.
The embodiment of the application also provides electronic equipment, which comprises: one or more processors; and a storage device for storing one or more programs, which when executed by the one or more processors, cause the electronic device to implement the advertisement material adaptive generation method provided in the foregoing embodiments.
The embodiment of the application also provides a computer device of the electronic equipment. It should be noted that the computer device of the electronic apparatus is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
In particular, the computer apparatus includes a central processing unit (Central Processing Unit, CPU) which can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) or a program loaded from a storage section into a random access Memory (Random Access Memory, RAM), for example, performing the methods described in the above embodiments. In the RAM, various programs and data required for device operation are also stored. The CPU, ROM and RAM are connected to each other by a bus. An Input/Output (I/O) interface is also connected to the bus.
The following components are connected to the I/O interface: an input section including a keyboard, a mouse, etc.; an output section including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and the like, and a speaker, and the like; a storage section including a hard disk or the like; and a communication section including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section performs communication processing via a network such as the internet. The drives are also connected to the I/O interfaces as needed. Removable media such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, and the like are mounted on the drive as needed so that a computer program read therefrom is mounted into the storage section as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method shown in the flowchart. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. When executed by a Central Processing Unit (CPU), performs the various functions defined in the apparatus of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor apparatus, device, or means, or any combination of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with a computer-readable computer program 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 computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution apparatus, device, or apparatus. A computer program embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The units involved in the embodiments of the present application may be implemented by means of software, or may be implemented by means of hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
Another aspect of the present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the advertising material adaptive generation method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment or may exist alone without being incorporated in the electronic device.
Another aspect of the present application also provides 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 the processor executes the computer instructions, so that the computer device performs the advertisement material adaptive generation method provided in the above embodiments.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. It is therefore intended that all equivalent modifications and changes made by those skilled in the art without departing from the spirit and technical spirit of the present invention shall be covered by the appended claims.

Claims (10)

1. The self-adaptive generation method of the advertisement material is characterized by comprising the following steps:
s1: obtaining the edited size of advertisement materialThe background picture is->The positions of all foreground design elements of the advertisement material are recorded as a list +.>The foreground design element at least comprises one of characters, pictures and videos;
s2: the size and new size of the background picture BIs compared with the size of (1) if the background picture is +.>The size of (2) is greater than or equal to the new size +.>Is to add the background picture +.>Performing scaling down; if the background picture->Is smaller than the new size +.>The background picture is->Performing super resolution processing, and adjusting background picture +.>The size of (2) to obtain just the new external size +.>Is->
S3: at the first background pictureMiddle region, according to new size->Is to crop out the second background picture +.>
S4: calculating the sizeCompletely embedded in new size->Scaling factor of +.>
S5: automatically adjusting the positions of all the foreground design elements of the advertisement materials according to a preset strategy to obtain a new position list
S6: second background pictureAnd performing jigsaw processing on other foreground design elements of the advertisement materials except the video to generate a new background picture +.>
S7: the number of videos in the advertisement material foreground design element is obtained, and the videos are respectively processed according to the number of videos, so that a new background picture is realizedGenerating a new size in combination with the video>New advertising material of a size.
2. The advertising material adaptive generation method according to claim 1, wherein the super-resolution processing method comprises an interpolation-based method, a reconstruction-based method, a shallow learning-based method, and a deep learning-based method, wherein the interpolation-based method comprises nearest neighbor interpolation, bilinear interpolation, and bicubic interpolation, the reconstruction-based method comprises a frequency domain method and a spatial domain method, the shallow learning-based method comprises machine learning, manifold learning, sample learning, and sparse coding, and the deep learning-based method comprises a convolutional neural network-based SR method, a residual network-based SR method, and a generation countermeasure network-based SR method.
3. The method for adaptive generation of advertising material as recited in claim 1, wherein the size is calculatedCompletely embedded in new size->Scaling factor of +.>The method specifically comprises the following steps:
s41: is sized toIs +.>Height is +.>New size->Is +.>Height is +.>Size, dimensions ofAnd new size->Width ratio of->Size->And new size->Height ratio of->The following formula is provided:
s42: if it isSize->Completely embedded in new size->Scaling factor of (a)/>
S43: if it isSize->Completely embedded in new size->Scaling factor of +.>
4. The method for adaptively generating advertisement material according to claim 3, wherein the positions of all the foreground design elements of the advertisement material are automatically adjusted according to a predetermined strategy, and the predetermined strategy comprises misalignment and automatic alignment, and specifically comprises:
s51: when the predetermined strategy is not aligned, the position coordinates of all foreground design elements of the advertisement material are directly adjusted according to the scaling factorCalculating new coordinates;
s52: when the preset strategy is automatic alignment, firstly, the position coordinates of all foreground design elements of the advertisement material are adjusted according to the scaling factorCalculating new coordinates, and further judging the size according to preset judgment rules>Completely embedded in new size->Is a distribution of the (b).
5. The method for adaptively generating advertisement materials according to claim 4, wherein the preset judgment rule specifically comprises:
s521: when (when)At the time, it is assumed that the position coordinates of a foreground design element of the advertisement material is +.>If->The new position coordinate after automatically aligning the upper and lower parts is +.>If->The new position coordinate after automatically aligning the upper and lower parts is +.>
S522: when (when)At the time, it is assumed that the position coordinates of a foreground design element of the advertisement material is +.>If->The new position coordinate after the left and right automatic alignment is +.>If->The new position coordinate after the left and right automatic alignment is +.>
6. The adaptive generation method of advertisement materials according to claim 1, wherein the processing is performed according to the number of videos to realize the new background pictureGenerating a new size in combination with the video>The new advertisement material with the size specifically comprises the following components:
s71: acquiring the number of videos in the advertisement material foreground design element;
s72: if the number of videos is 0, pictures are displayedAs new size +.>Corresponding new advertisement materials;
s73: if the number of videos is 1, pictures are displayedAs a base map, a new size +.>Corresponding new advertisement materials;
s74: if the number of videos is greater than 1, taking the lowest frame rate of all videos as the final frame rate of the new advertisement material, taking the shortest time length of all videos as the final time length of the new advertisement material, further carrying out frame shrinking treatment on videos exceeding the final frame rate one by one, and carrying out frame shrinking treatment on videos exceeding the time lengthCutting off the video one by one, and then carrying out pictureAs a base map, combining all foreground design element videos to generate a new size +.>Corresponding new advertising material.
7. The adaptive generation method of advertisement materials according to claim 6, further performing frame-shrinking processing on the video exceeding the final frame rate one by one, specifically comprising:
s741: the current frame rate of the obtained video isThe target frame rate is +.>Wherein->
S742: the number of frames per second to be adjusted isEvery>A position corresponding to the frame to be subjected to a frame shrinking process, wherein +_>Representing a downward rounding;
s743: assume a certain frameIt is necessary to perform frame shrinking processing, wherein the front and rear frames are +.>And->
S744: frame is formedTransparency of (2) is set to +.>Two frames before and after->And->Transparency of +.>
S745: frame is formedRespectively overlapped with the front frame and the rear frame>And->On, new front and back frames are formed>And->And finishing the frame shrinking process.
8. The self-adaptive generation method of the advertisement material is characterized by comprising the following steps:
and (3) obtaining a background module: obtaining the edited size of advertisement materialThe background picture is->The positions of all foreground design elements of the advertisement material are recorded as a list +.>The foreground design element at least comprises one of characters, pictures and videos;
size comparison module: the size and new size of the background picture BIs compared with the size of (1) if the background picture is +.>The size of (2) is greater than or equal to the new size +.>Is to add the background picture +.>Performing scaling down; if the background picture->Is smaller than the new size +.>The background picture is->Performing super resolution processing, and adjusting background picture +.>The size of (2) to obtain just the new external size +.>Is->
And a size cutting module: at the first background pictureMiddle region, according to new size->Is to crop out the second background picture +.>
And a calculation coefficient module: calculating the sizeCompletely embedded in new size->Scaling factor of +.>
Element adjustment module: automatically adjusting the positions of all the foreground design elements of the advertisement materials according to a preset strategy to obtain a new position list
Element jigsaw module: second background pictureAnd performing jigsaw processing on other foreground design elements of the advertisement materials except the video to generate a new background picture +.>
Generating a material module: the number of videos in the advertisement material foreground design element is obtained, and the videos are respectively processed according to the number of videos, so that a new background picture is realizedGenerating a new size in combination with the video>New advertising material of a size.
9. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement the method of adaptive generation of advertising material as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the advertisement material adaptive generation method of any one of claims 1 to 7.
CN202311397226.5A 2023-10-26 2023-10-26 Advertisement material self-adaptive generation method, device, equipment and storage medium Active CN117294804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311397226.5A CN117294804B (en) 2023-10-26 2023-10-26 Advertisement material self-adaptive generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311397226.5A CN117294804B (en) 2023-10-26 2023-10-26 Advertisement material self-adaptive generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117294804A true CN117294804A (en) 2023-12-26
CN117294804B CN117294804B (en) 2024-02-27

Family

ID=89239023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311397226.5A Active CN117294804B (en) 2023-10-26 2023-10-26 Advertisement material self-adaptive generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117294804B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118246979A (en) * 2024-05-23 2024-06-25 中运科技股份有限公司 Mobile terminal advertisement self-service ordering method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737617A (en) * 2011-04-01 2012-10-17 华为终端有限公司 Method and device for video image display
CN105917369A (en) * 2014-01-14 2016-08-31 指尖翻动公司 Modifying advertisement sizing for presentation in digital magazine
CN106504191A (en) * 2016-10-12 2017-03-15 华侨大学 The APP of 3D mural paintings method for designing and its application based on depth of field picture stitching algorithm
CN110889883A (en) * 2019-11-29 2020-03-17 焦点科技股份有限公司 Self-adaptive intelligent banner advertisement picture generation method and system
US20230132137A1 (en) * 2020-09-30 2023-04-27 Lemon Inc. Method and apparatus for converting picture into video, and device and storage medium
CN116738092A (en) * 2023-05-23 2023-09-12 稳量科技(厦门)有限公司 Advertisement fixed-point delivery optimization auxiliary method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737617A (en) * 2011-04-01 2012-10-17 华为终端有限公司 Method and device for video image display
CN105917369A (en) * 2014-01-14 2016-08-31 指尖翻动公司 Modifying advertisement sizing for presentation in digital magazine
CN106504191A (en) * 2016-10-12 2017-03-15 华侨大学 The APP of 3D mural paintings method for designing and its application based on depth of field picture stitching algorithm
CN110889883A (en) * 2019-11-29 2020-03-17 焦点科技股份有限公司 Self-adaptive intelligent banner advertisement picture generation method and system
US20230132137A1 (en) * 2020-09-30 2023-04-27 Lemon Inc. Method and apparatus for converting picture into video, and device and storage medium
CN116738092A (en) * 2023-05-23 2023-09-12 稳量科技(厦门)有限公司 Advertisement fixed-point delivery optimization auxiliary method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118246979A (en) * 2024-05-23 2024-06-25 中运科技股份有限公司 Mobile terminal advertisement self-service ordering method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN117294804B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
Zhang et al. A shape‐preserving approach to image resizing
CN117294804B (en) Advertisement material self-adaptive generation method, device, equipment and storage medium
US8352856B2 (en) Systems and methods to resize document content
JP5307761B2 (en) Method and system for real-time personalization of electronic images
CN107015788B (en) Method and device for displaying images on mobile device in animation mode
CN109636885B (en) Sequential frame animation production method and system for H5 page
US20110097011A1 (en) Multi-resolution image editing
CN101777175A (en) Seam-based reduction and expansion of images with color-weighted priority
EP2319017A1 (en) Apparatus and method of viewing electronic documents
CN107832103A (en) The method of the processing of UI controls blurred background and Dynamic Announce based on android system
Niu et al. Image resizing via non-homogeneous warping
CN112711729A (en) Rendering method and device based on page animation, electronic equipment and storage medium
US20070211078A1 (en) Image Processing Device And Image Processing Method
Wu et al. Image autoregressive interpolation model using GPU-parallel optimization
CN112700519A (en) Animation display method and device, electronic equipment and computer readable storage medium
US9036941B2 (en) Reducing moiré patterns
JP5254250B2 (en) Method and system for generating boundaries in the process of rasterizing vector graphics, and method for manufacturing the system
US8760472B2 (en) Pixel transforms
US8629883B2 (en) Method and system for generating online cartoon outputs
CN113506305A (en) Image enhancement method, semantic segmentation method and device for three-dimensional point cloud data
JP2004199301A (en) Image processor
US12045946B2 (en) Rotating and cropping images for various forms of media including animation, comics, film, or television
CN115830212A (en) Three-dimensional model display method and related equipment
EP0855682A2 (en) Scan line rendering of convolutions
CN114125500A (en) Method for synthesizing advertisement putting video and putting system

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