Background technology
Advertisement duration and spilling rule are a kind of methods of the optimization Consumer's Experience used in video website, and advertisement duration is matched somebody with somebody
When putting the video duration for referring to watch according to user and ad placement to judge to allow the maximum advertisement to user's dispensing
Long and advertisement number;Overflow mechanism refers to the video duration and ad placement watched according to user, marks off a two dimension
Advertisement putting region, and assign an overflow value to each crosspoint in order, when the overflow value of advertisement be more than or equal to it is current wide
When accusing the overflow value of position, just advertisement is allowed to appear on the position.The overflow value of advertisement was added in units of 1 minute simultaneously
Reducing:The overflow value for having launched the advertisement of completion subtracts 1, and the overflow value for not launching completion adds 1.List is improved by such calculate
The dispenser meeting of the advertisement of dispensing task is not completed in the time of position.
It is to configure one in database to play position with advertisement on advertisement duration and the conventional implementation for overflowing rule
Put with the advertisement duration of a length of dimension during video and overflow rule list, for represent current duration video need launch it is wide
The overflow value of total duration and advertisement play position is accused, all users are requested to be configured all to walk this part.It is as shown in the table:
|
Video duration lower limit |
The video duration upper limit |
Advertisement maximum duration |
Advertisement maximum number |
Preceding patch |
0 |
1 |
0 |
0 |
Preceding patch |
1 |
3 |
16 |
2 |
Preceding patch |
3 |
5 |
37 |
2 |
Preceding patch |
5 |
10 |
53 |
3 |
Preceding patch |
10 |
10000 |
63 |
4 |
After paste |
0 |
10000 |
61 |
1 |
Point is inserted in first |
5 |
10 |
62 |
1 |
Point is inserted in first |
10 |
10000 |
62 |
4 |
System is configured according to duration allocation list, and the video duration and advertisement play position of viewing are obtained in being asked from user,
Can matches the advertisement maximum duration that can be launched and maximum ad number.
Overflow allocation list:
|
Pasted before 1st |
Pasted before 2nd |
Pasted before 3rd |
Pasted before 4th |
In insert the 1st patch |
In insert the 2nd patch |
1-3 minutes |
11 |
12 |
|
|
|
|
3-5 minutes |
7 |
8 |
10 |
14 |
|
|
5-10 minutes |
3 |
4 |
6 |
9 |
13 |
|
More than 10 minutes |
0 |
1 |
2 |
5 |
12 |
15 |
According to allocation list is overflowed, duration and advertisement play position that viewing video is obtained in being asked from user calculate system
To it is each point position corresponding to overflow value, such as the preceding patch of 30 minutes, can get 4 positions and its overflow value difference people 0,1,
2、5.Advertisement simultaneously also has an overflow value in itself, and this value initial value is 0, per minute to add 1 according to input situation or subtract 1.
For example, advertisement A upper one minute overflow value be 6, preset injected volume be 1cpm (cpm=counts per minute count/
Point), system can analyze the injected volume of one minute material in current minute, if upper one minute, injected volume was more than or equal to 1cpm,
Then advertisement A overflow value can reduce by 1, as 5;Conversely, if upper one minute, injected volume was less than 1cpm, overflow value then increases by 1, i.e.,
For 7.In addition, the increase and decrease scope of overflow value, between 0 arrives maximum overflow value, such as upper table, maximum overflow value is 15.Advertisement is overflow
Go out value and determine which position it can be thrown on,
The content of the invention
Therefore, the present invention is used uniformly same rule for video website in the prior art and realizes advertisement duration and spilling
Rule configuration, it can not accomplish different according to user or site resource and use different rules to realize and be directed to user configuration, it is impossible to
The problem of making full use of site resource and lifting Consumer's Experience, there is provided a kind of advertisement duration adaptive based on user and spilling rule
Implementation method then, it is characterised in that the described method comprises the following steps:
Step 1:Division packing ID values, beaten according to the user resources and the division of corresponding resource value that can be obtained in client
ID values are wrapped, each the pack corresponding one group of user resources title of ID values and corresponding resource value, pack ID values to arrange from small to large
Numerical value;
Step 2:Configure advertisement duration and overflow rule, an advertisement duration table and spilling are configured for each packing ID values
Rule list;
Step 3:Packing ID values corresponding to user are obtained, system receives client terminal playing request, obtains user resources and phase
The resource value answered, search in the packing ID values divided in step 1 corresponding with the user resources of the user and corresponding resource value
Packing ID values, when the user resources of the user and corresponding resource value correspond to multiple packing ID values, access value is maximum to beat
Wrap ID values;
Step 4:Realize advertisement duration and overflow rule and be directed to user configuration, according to the packing ID determined in step 3
Value, find in step 2 as the advertisement duration table and spilling rule list of the configuration of packing ID values, realize advertisement duration and overflow rule
Then it is directed to user configuration.
The user resources include area, client platform and visual classification.
Can be set in step 1 one not with any user resources and corresponding resource value corresponding to acquiescence packing ID values,
An advertisement duration table being configured for acquiescence packing ID values in step 2 and overflowing rule list, the user in step 3 when acquisition provides
Source and corresponding resource value can not correspond to user resources and corresponding resource value corresponding to pack ID values when, take acquiescence pack ID
It is worth the packing ID values corresponding to the user.
Advertisement duration table described in step 2 is for one with when advertisement play position and video during the advertisement of a length of dimension
Long table, the corresponding advertisement maximum duration of each advertisement play position and video duration and advertisement maximum number, it is real in step 4
Existing advertisement duration is the advertisement duration table according to corresponding to the packing ID values determined in step 3 for the method for user configuration, it is determined that
Advertisement maximum duration and advertisement maximum number.
The rule list that overflows described in step 2 is that a spilling with a length of dimension when advertisement play position and video is advised
Then table, each advertisement play position and video duration correspond to an overflow value, realize that overflow rule matches somebody with somebody for user in step 4
The method put is that each advertisement is provided with an overflow value in itself, and this value initial value is 0, the systems inspection per minute advertisement putting
Situation, if injected volume upper one minute is less than 1cpm, the overflow value increase by 1 of the advertisement, if the advertisement putting upper one minute
Amount is more than or equal to 1cpm, then the overflow value of the advertisement reduces 1, and the increase and decrease scope of overflow value, will between 0 arrives maximum overflow value
The current overflow value of the advertisement compared with overflowing rule list corresponding to the packing ID values determined in step 3, work as by the advertisement
The region for the overflow value that preceding overflow value is more than or equal in spilling rule list is the region that can currently launch the advertisement.
The beneficial effects of the present invention are:Regular using the advertisement duration adaptive based on user and spilling of the present invention
Implementation method, it is possible to achieve for the different situation such as different regions, client platform and visual classification, flexibly adjust advertisement
Duration and the configuration for overflowing rule, so as to reach the effect for making full use of site resource and lifting Consumer's Experience.Simultaneity factor meeting
Retain an acquiescence packing ID value and be used as global default rule, when user's request is unsatisfactory for any particular arrangement, directly use
Default rule is launched.
Embodiment
The embodiment of the present invention is illustrated below in conjunction with the accompanying drawings:
Based on the adaptive advertisement duration of user and regular implementation method is overflowed, step as shown in Figure 1,
Step 1:Division packing ID values, beaten according to the user resources and the division of corresponding resource value that can be obtained in client
ID values are wrapped, each the pack corresponding one group of user resources title of ID values and corresponding resource value, pack ID values to arrange from small to large
Numerical value.
As shown in the table, 130 corresponding area of packing ID values is Beijing, and client platform is mobile phone, and visual classification is film
Customer type.
Step 2:Configure advertisement duration and overflow rule, configure an advertisement duration table for packing ID values 130 and overflow rule
Then table is as follows:
Duration allocation list
Overflow rule list
Step 3:Packing ID values corresponding to user are obtained, system receives client terminal playing request, obtains user resources and phase
The resource value answered, such as it is that area is Beijing to get the user, client platform is mobile phone, and visual classification is film, in step
Searched in the packing ID values divided in rapid one and the user resources of the user and the corresponding packing ID values of corresponding resource value, lookup
It is 130 to packing ID values, when the user resources of the user and corresponding resource value correspond to multiple packing ID values, such as satisfaction is objective
Family end platform is mobile phone, and corresponding packing ID values are 110 when visual classification is film, the maximum packing ID values 130 of access value.
Step 4:Realize advertisement duration and overflow rule and be directed to user configuration, according to the packing ID determined in step 3
Value 130, find in step 2 for packing ID values 130 configure advertisement duration table and spilling rule list, realize advertisement duration and
Overflow rule and be directed to user configuration.
Can be set as preferred embodiment, in step 1 one not with any user resources and corresponding resource value
It is corresponding to give tacit consent to packing ID values, it is that acquiescence packing ID values configure an advertisement duration table and spilling rule list, step in step 2
In rapid three when the user resources of acquisition and corresponding resource value can not correspond to user resources and corresponding resource value corresponding to beat
When wrapping ID values, it is packing ID values corresponding to the user to take acquiescence packing ID values.So when can not obtain user resources and user money
When source can not match with packing ID values, system hit acquiescence packing ID values, directly launched using default rule.
Advertisement duration table described in step 2 is for one with when advertisement play position and video during the advertisement of a length of dimension
Long table, the corresponding advertisement maximum duration of each advertisement play position and video duration and advertisement maximum number, it is real in step 4
Existing advertisement duration is the advertisement duration table according to corresponding to the packing ID values 130 determined in step 3 for the method for user configuration,
Determine advertisement maximum duration and advertisement maximum number.
The rule list that overflows described in step 2 is that a spilling with a length of dimension when advertisement play position and video is advised
Then table, each advertisement play position and video duration correspond to an overflow value, realize that overflow rule matches somebody with somebody for user in step 4
The method put is that each advertisement is provided with an overflow value in itself, and this value initial value is 0, the systems inspection per minute advertisement putting
Situation, if injected volume upper one minute is less than 1cpm, the overflow value increase by 1 of the advertisement, if the advertisement putting upper one minute
Amount is more than or equal to 1cpm, then the overflow value of the advertisement reduces 1, and the increase and decrease scope of overflow value, will between 0 arrives maximum overflow value
The current overflow value of the advertisement corresponding to the packing ID values 130 determined in step 3 compared with overflowing rule list, the advertisement
Current overflow value be more than or equal to that to overflow the region of the overflow value in rule list be that can currently launch the region of the advertisement.Such as
The overflow value of the current advertisement is 12, then the advertisement can enter in region of the overflow value less than or equal to 12 in above-mentioned spilling rule list
Row is launched, and system will select advertisement maximum duration in advertisement duration table to play the advertisement more than the position of the advertisement duration.
Basic Java language algorithm structure of the invention is as follows:
Ad-request stereotactic conditions are retrieved
The data of ad-request are parsed, the request retrieved in the index, get one group of packing Id, such as
3 groups are configured with the duration and spilling rule of management end, then this 3 groups of conditions of retrieval result are all matchings, so in result
Comprising this 3 groups of packing ID, we sort this 3 groups packing Id value from big to small, take the value of maximum as this retrieval
As a result.Then duration and the regular number of spilling corresponding to being taken out according to the packing Id of this result from duration and the allocation list overflowed
According to calculate maximum ad duration, maximum ad number and overflow value are prepared.
Maximum ad duration calculation
One group of HashMap using advertisement play position as key is associated with duration allocation list, at this moment using ad-request
In ad spot information navigate to the List tables of storage duration section configuration;Further according in ad-request be passed to video duration,
Can navigates to final result, including:Advertisement maximum duration, maximum ad number, whether use and overflow rule, if do not made
With rule is overflowed, it is 0 just directly to return to one to be worth and length is " maximum ad number ";If regular using overflowing,
Need to obtain and overflow rule.
Overflow value calculates
User is associated with one group of HashMap using duration section as key according to packing Id is overflowed, then according to ad-request
In video duration information navigate to one group of duration section List, then reuse advertisement position and List results screened, most
Overflow value of the point position information for obtaining launching eventually corresponding to point position.
Data store organisation
Key data structure table is resource, resource_direction, adlen_range, overflow_
range。
resource:The packing ID of resource, one group of stereotactic conditions combination is packaged as 1 resource.
resource_direction:Specific resource information is stored, such as area, client platform, program ID, ID
Etc., support the orientations of a variety of dimensions.
adlen_range:Duration allocation list, by two dimensions of video duration and advertisement position to advertisement maximum duration and advertisement
Whether maximum number enters row constraint, and can configure regular using overflowing.
overflow_range:Rule configuration list is overflowed, each crosspoint is given by two dimensions of video duration and advertisement position
One overflow value is set, when the overflow value of advertisement in itself is more than or equal to the value in this crosspoint, just allows the advertisement normally to throw
Put, it is this to be designed with beneficial to lifting Consumer's Experience, when advertisement capacity abundance, as far as possible by advertisement release in long video.
Index structure
Resource orients index structure:Resource orientation index is that the data structure based on HashMap+List represents, such as Fig. 2 institutes
Show, the depth of the index tree depend on the dimension of orientation number, the key of each non-leaf nodes is an orientation dimension, often
The leaf node of individual branch is a List, and the packing ID of user resources is stored in list.
Duration configuration index structure:As shown in figure 3, data structure of the duration configuration index structure based on HashMap+List
Represent, it shows as a contour index tree, is divided into three layers, and the key of first layer is the packing Id of user resources, the second layer
Key be advertisement play position Id, third layer is the List in a duration section, each duration under storage Current ad position
Chopping rule.
Overflow rule index structure:As shown in figure 4, overflow the index structure and the index structure class of duration configuration of rule
Seemingly, the data structure based on HashMap+List is realized, is divided into three layers, and first layer is the packing Id that key is user resources, the
Two layers of key is the period, and third layer is the List of a spilling rule objects, represents what can be launched under current duration section
Overflow value corresponding to point position and the point position.
Described above is the preferred embodiment of the present invention, it is noted that for those skilled in the art
For, on the premise of principle of the present invention is not departed from, some improvements and modifications can also be made, these improvements and modifications
It should be regarded as protection scope of the present invention.