Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this
Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described
Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual,
Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
For problem of the prior art, this specification embodiment provides a kind of displaying content generating method, referring to Fig. 1 institute
Show, this method may comprise steps of:
S101 is received and is shown that content generates instruction, and determines the target material set and demand percentage of the instruction;
This illustrates in the scheme that embodiment provides, and before generating displaying content, can upload needs in advance in displaying
Several materials added in appearance, such as picture, video, sound clip;Material database can also be pre-established, is stored in more general
Material can select from material database before generating displaying content, call general matter;It is, of course, also possible to by being uploaded
Material and the general matter called form target material set;Etc., this specification embodiment does not limit this.
In showing content generation instruction, the specified target material for generating and showing content needs is needed, in addition, also needing to specify
Demand percentage, i.e., according to the screen proportion of playing display content.
S102, at least one standard proportional of determining and the demand percentage similarity degree within a preset range;
This illustrates that template set can be preset, what is stored in template set is each in the scheme that embodiment provides
The ratio of template is common standard proportional in practical application, for example, 1:1 (square), 4:3 (banner), 16:9 are (long horizontal
Width), 3:4 (vertical scroll of painting or calligraphy), 9:16 (the long vertical scroll of painting or calligraphy), 4n:3k (the extremely long banner of multi-screen), 16n:9k (the extremely long banner of multi-screen), 3k:4n it is (more
The long vertical scroll of painting or calligraphy of anode), 9k:16n (the extremely long vertical scroll of painting or calligraphy of multi-screen), etc..
The determining similarity degree with the demand percentage is not limited in this specification embodiment within a preset range extremely
The specific implementation of a few standard proportional, those skilled in the art can flexibly set according to actual needs.
In a kind of specific embodiment of this specification embodiment, preset range may include 2 parts, it is possible, firstly, to
Judge whether the demand percentage is preset standard proportional in template set, if it is, can be directly true by the standard proportional
It is set to the standard proportional within a preset range with the similarity degree of the demand percentage.
And if it is not, then can further calculate in the demand percentage and template set between each preset standard ratio
Similarity degree, for example, calculate it is long with wide difference and difference is weighted, or the calculating total face lap area Zhan
Long-pending ratio, etc..Corresponding, preset range can be similarity degree threshold value, i.e., if the phase of demand percentage and standard proportional
It is higher than preset threshold like degree, then is determined as the standard proportional within a preset range;Alternatively, being also possible to based on similarity degree
The top n in sort result is calculated, i.e., ratio and the similarity degree calculated result of each standard proportional are ranked up according to demand, by phase
It is determined as within a preset range like the higher top n standard proportional of degree;Etc..
S103, for identified each standard proportional: obtaining that the standard proportional is corresponding from default template set can
Use template;
In scheme provided by this specification embodiment, it can be accomplished in several ways and be obtained from default template set
The standard proportional corresponding Available templates do not limit this in this specification embodiment, and those skilled in the art can basis
Actual demand is flexibly set.
It, can be corresponding for every kind of standard size default one in a kind of specific embodiment of this specification embodiment
Standard form, then can be directly from default template set, and obtaining the corresponding template of the standard proportional is Available templates.
It, can be according to the scene, exhibition for showing that content is applicable in another specific embodiment of this specification embodiment
The purposes etc. shown, presets a variety of styles, such as Christmas style, New Year style, constant pitch day style or agricultural style, industry
Style, internet style, etc. a variety of industry styles or market style, office style, campus style, etc. several scenes wind
Lattice, etc..It also, is the standard form that every kind of standard size presets one or more styles in default template set.
Accordingly, it when obtaining the corresponding Available templates of the standard proportional from default template set, can determine first
The demand style for showing content and generating the displaying content to be generated of instruction, in addition, obtaining in default template set
Ratio is the standard form of the standard proportional, and determines the template style of standard form obtained, thus will be with the demand
The standard form that style matches is determined as Available templates.
S104 carries out the design logic of the Available templates according to the difference of the demand percentage and the standard proportional
Amendment;The design logic is used to indicate that target material to generate position and size in the picture for showing content;
S105 carries out size adjusting and splicing to target material, generates and show content according to revised design logic.
For ease of description, S104 is illustrated in conjunction with S105.
It, can be right in several ways according to revised design logic in scheme provided by this specification embodiment
Target material carries out size adjusting, does not limit this in this specification embodiment, those skilled in the art can be according to reality
Demand is flexibly set.
In a kind of specific embodiment of this specification embodiment, design logic can be also used for indicating to target material
Carry out the picture area that need to retain when size adjusting.Accordingly according to revised design logic, size is carried out to target material
When adjustment, the picture image of the size to be adjusted of the target material can be obtained first, and patrol according to revised design
Volume, to needing the picture area retained to identify in the picture image, then determine the edge of picture area that recognizes with
The positional relationship at the picture image edge, to zoom in and out and/or cut out to picture image according to identified positional relationship
It cuts, so as to retain the picture area in picture image adjusted.
In one example, the picture area that need represented in design logic retain can be significant in picture image
Object.Then accordingly, to when the picture area of reservation being needed to identify in the picture image, it can detecte the picture image
In obvious object, and detected obvious object is determined as in the picture image needing the picture area retained.
In another example, before the picture area of need represented in design logic reservation can be in picture image
Scene area.Then accordingly, to when the picture area of reservation being needed to identify in the picture image, it can detecte the picture figure
The picture structure of picture obtains the foreground area of the picture image, and detected prospect is determined as the picture image
The middle picture area that need to retain.
In another example, the picture area that represented need retain in design logic can be the master in picture image
Want region.Then accordingly, to needed in the picture image retain picture area identify when, can be to the picture image
In each section region carry out limb recognition, obtain the main region of the picture image, and the main region is determined as
The picture area retained is needed in the picture image.
In addition, design logic can be also used for indicating the corresponding background material of template style, and/or correspondence of Available templates
Material rendering rule etc., according to revised design logic, can determine the stitching position of background material and target material, with
And the rendering rule such as color, tone, saturation degree, contrast of material, so that rendering generation shows content.
It as described above, can be according to different standard proportionals, different style and not in the scheme that this specification provides
Same material size adjusting mode generates more sets and shows contents, therefore, in order to therefrom select in optimal a set of or a few set displaying
Hold for playing, content, which scores, to be shown to each set.
In this specification embodiment, each displaying content generated can be directed to: obtain the several of the displaying content
Picture image, and picture clarity and the scoring of picture aesthetics are carried out to each picture image obtained, thus based on to each picture
The scoring of face image obtains the scoring of the displaying content, then according to for it is each show content scoring, obtain scoring score value and/
Or sequence meets several preferred displaying contents of preset requirement, to determine that presentation device needs to open up from the preferred displaying content
The content shown.Obtain after preferably showing content, the content that presentation device need to be shown can be determined directly as, can also it is artificial or
The content that final presentation device need to be shown is obtained by regular further screening.
Wherein, this specification embodiment does not limit the concrete mode to score picture clarity, for example, can adopt
It is carried out synthesis with Tenengrad gradient method, Laplacian gradient method, Variance Method etc., or a variety of methods of combination and is commented
Point, those skilled in the art can flexible choice according to actual needs.
Similarly, embodiment does not limit the concrete mode to score picture aesthetics, for example, can be in conjunction with to beauty
The standard of sight degree evaluates data, and training picture aesthetics Rating Model can such as be instructed with neuro images product paddy using deep learning
Practice convolutional neural networks etc., or a variety of methods is combined to carry out comprehensive score, those skilled in the art can be according to actual needs
Flexible choice.
In addition, in a kind of specific embodiment of this specification embodiment, can also by collecting result of broadcast data,
Participate in showing the scoring of content.Specifically, the result of broadcast data for generating and showing content, the result of broadcast number can be obtained
According to including showing Content Selection personnel to the selection result data of the displaying content, show that content generates for example, receiving at certain
After instruction, generate during showing content, after obtaining several preferred displaying contents, can by advertiser or operation personnel into
Row artificial screening selects one or more sets optimal displaying contents for actual play;Result of broadcast data can also include exhibition
Show that equipment shows the advertisement effectiveness data after the content, for example, the viewing of spectators group should after presentation device plays certain displaying content
The duration of content or the number data that specific operation (such as scanning the two-dimensional code) is carried out according to the instruction of the content.
According to result of broadcast data obtained, the template that can be used for corresponding displaying content carries out recommendation and comments
Point, to can specifically be primarily based on when obtaining the scoring of the displaying content based on the scoring to each picture image to each picture
The scoring of face image, including picture clarity scoring are scored with picture aesthetics, obtain the picture scoring of the displaying content, and
According to the recommendation of used template score, obtain the displaying content template scoring, thus to obtained picture scoring with
Template scoring is weighted, and obtains the scoring of the displaying content.
In another specific embodiment of this specification embodiment, it can also will be obtained according to result of broadcast data
The scoring of template recommendation specifically can be from pre- for obtaining the corresponding Available templates of the standard proportional from default template set
If obtaining the corresponding several templates of the standard proportional in template set, and recommendation scoring in several templates is met into default want
The template (such as highest one or several templates of recommendation scoring) asked is determined as Available templates.
Corresponding to above method embodiment, this specification embodiment also provides a kind of displaying content generation device, referring to fig. 2
It is shown, the apparatus may include:
Command reception module 110 shows that content generates instruction for receiving, and determines the target material of the instruction
Set and demand percentage;
Ratio-dependent module 120, for the determining similarity degree with the demand percentage within a preset range at least one
A standard proportional;
Template determining module 130, for being directed to identified each standard proportional: obtaining the mark from default template set
The corresponding Available templates of quasi- ratio;And the difference according to the demand percentage and the standard proportional, to the Available templates
Design logic is modified;The design logic be used for indicate target material generates show content picture in position and
Size;
Content generating module 140, for carrying out size adjusting to target material and spelling according to revised design logic
It connects, generates and show content.
In a kind of specific embodiment that this specification provides, the ratio-dependent module 120 specifically can be used for:
Determine that the displaying content generates the demand style of the displaying content to be generated of instruction;And
Obtain the standard form that ratio in default template set is the standard proportional;
It determines the template style of standard form obtained, and the standard form to match with the demand style is determined
For Available templates.
In a kind of specific embodiment that this specification provides, the design logic can be also used for indicating:
The corresponding background material of template style of the Available templates, and/or corresponding material rendering rule.
In a kind of specific embodiment that this specification provides, the design logic is also used to indicate: to target
Material carries out the picture area that need to retain when size adjusting;
The content generating module 140, it is shown in Figure 3, may include:
Picture image obtains submodule 141, the picture image of the size to be adjusted for obtaining the target material;
Picture area identifies submodule 142, for according to revised design logic, to needing to retain in the picture image
Picture area identified;
Positional relationship determines submodule 143, for determining the edge and the picture image side of the picture area recognized
The positional relationship of edge;
Picture image adjusting submodule 144, for according to identified positional relationship, picture image is zoomed in and out and/
Or cut, so as to retain the picture area in picture image adjusted.
In a kind of specific embodiment that this specification provides, the picture of represented need reservation in the design logic
Region can be with are as follows: the obvious object in the picture image;
The picture area identifies submodule 142, specifically can be used for:
The obvious object in the picture image is detected, and detected obvious object is determined as the picture image
The middle picture area that need to retain.
In a kind of specific embodiment that this specification provides, the picture of represented need reservation in the design logic
Region can be with are as follows: the foreground area in the picture image;
The picture area identifies submodule 142, specifically can be used for:
The picture structure for detecting the picture image obtains the foreground area of the picture image;
Detected prospect is determined as in the picture image to the picture area for needing to retain.
In a kind of specific embodiment that this specification provides, the picture of represented need reservation in the design logic
Region can be with are as follows: the main region in the picture image;
The picture area identifies submodule 142, specifically can be used for:
Limb recognition is carried out to each section region in the picture image, obtains the main region of the picture image;
The main region is determined as in the picture image to the picture area for needing to retain.
In a kind of specific embodiment that this specification provides, described device can also include content scores module 150,
It is shown in Figure 4, it can specifically include:
Picture scoring submodule 151, for being directed to each displaying content generated: obtaining several pictures of the displaying content
Face image, and picture clarity and the scoring of picture aesthetics are carried out to each picture image obtained;
Content scores submodule 152, for obtaining the scoring of the displaying content based on the scoring to each picture image;
It is preferable to determine submodules 153, for obtaining scoring score value and/or sequence according to for each scoring for showing content
Meet several preferred displaying contents of preset requirement, so as to out of determine in the preferred displaying content presentation device need to be shown
Hold.
In a kind of specific embodiment that this specification provides, described device can also include that effect data obtains module
160, it is shown in Figure 5, it specifically includes:
Effect data obtains submodule 161, generates the result of broadcast data for showing content for obtaining, the broadcasting effect
Fruit data include: to show that Content Selection personnel show the content to the selection result data, and/or presentation device of the displaying content
Advertisement effectiveness data afterwards;
Recommendation scoring submodule 162, for making for corresponding displaying content according to result of broadcast data obtained
Template carries out recommendation scoring;
The content scores submodule 152, is specifically used for:
Based on the scoring to each picture image, the picture scoring of the displaying content is obtained;
It is scored according to the recommendation of used template, obtains the template scoring of the displaying content;
The scoring of obtained picture and template scoring are weighted, the scoring of the displaying content is obtained.
In a kind of specific embodiment that this specification provides, described device can also include that effect data obtains module
160, it specifically includes:
Effect data obtains submodule 161, generates the result of broadcast data for showing content for obtaining, the broadcasting effect
Fruit data include: to show that Content Selection personnel show the content to the selection result data, and/or presentation device of the displaying content
Advertisement effectiveness data afterwards;
Recommendation scoring submodule 162, for making for corresponding displaying content according to result of broadcast data obtained
Template carries out recommendation scoring;
The template determining module 130, is specifically used for:
The corresponding several templates of the standard proportional are obtained from default template set, and recommendation in several templates is commented
The template for meeting preset requirement is divided to be determined as Available templates.
The function of modules and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in
On reservoir and the computer program that can run on a processor, wherein processor realizes displaying above-mentioned when executing described program
Content generating method.This method includes at least:
A kind of displaying content generating method, this method comprises:
It receives and shows that content generates instruction, and determine the target material set and demand percentage of the instruction;
At least one standard proportional of determining and the demand percentage similarity degree within a preset range;
For identified each standard proportional:
The corresponding Available templates of the standard proportional are obtained from default template set;
According to the difference of the demand percentage and the standard proportional, the design logic of the Available templates is modified;
The design logic is used to indicate that target material to generate position and size in the picture for showing content;
According to revised design logic, size adjusting and splicing are carried out to target material, generates and shows content.
Fig. 6 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram,
The equipment may include: processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus
1050.Wherein processor 1010, memory 1020, input/output interface 1030 and communication interface 1040 are real by bus 1050
The now communication connection inside equipment each other.
Processor 1010 can use general CPU (Central Processing Unit, central processing unit), micro- place
Reason device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one
Or the modes such as multiple integrated circuits are realized, for executing relative program, to realize technical side provided by this specification embodiment
Case.
Memory 1020 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 1020 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 1020, and execution is called by processor 1010.
Input/output interface 1030 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 1040 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 1050 include an access, equipment various components (such as processor 1010, memory 1020, input/it is defeated
Outgoing interface 1030 and communication interface 1040) between transmit information.
It should be noted that although above equipment illustrates only processor 1010, memory 1020, input/output interface
1030, communication interface 1040 and bus 1050, but in the specific implementation process, which can also include realizing normal fortune
Other assemblies necessary to row.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising real in above equipment
Component necessary to existing this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
Displaying content generating method above-mentioned is realized when sequence is executed by processor.This method includes at least:
A kind of displaying content generating method, this method comprises:
It receives and shows that content generates instruction, and determine the target material set and demand percentage of the instruction;
At least one standard proportional of determining and the demand percentage similarity degree within a preset range;
For identified each standard proportional:
The corresponding Available templates of the standard proportional are obtained from default template set;
According to the difference of the demand percentage and the standard proportional, the design logic of the Available templates is modified;
The design logic is used to indicate that target material to generate position and size in the picture for showing content;
According to revised design logic, size adjusting and splicing are carried out to target material, generates and shows content.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitorymedia), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description
Module may or may not be physically separated, can be each module when implementing this specification example scheme
Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or
Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor
Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.