Summary of the invention
In view of this, the application's technical problem to be solved has been to provide the method and system of the random carousel of a kind of information, to solve the problem that existing information carousel technical approach is single, broadcasting repetition rate is high and information is excessively browsed.
In order to solve the problems of the technologies described above, the application discloses the method for the random carousel of a kind of information, it is characterized in that, comprising:
Server obtains and need carry out the information of random carousel and sort according to priority;
The carousel number of positions that described server provides in the information that is retrieved as described random carousel, and this quantity is carried out to odevity division take the number of the information of described random relay as round, is divided into the odd even group with the corresponding number of number of described information;
Described server is again according to the sequencing of described information after described prioritization, and described information is distributed to corresponding described odd even group successively, and then this information is put into respectively on the carousel position that this odd even group comprises successively;
Described server, according to the described carousel sequence of positions before dividing, is carried out successively and has been put into the above carousel information of each described carousel position in conjunction with preset carousel number of times.
Preferably, server obtains and need carry out the information of random carousel and sort according to priority, is further:
Server obtains the information that need carry out random carousel, and according to preset priority, described information is sorted; Wherein,
Described preset priority, for according to user to the keyword of the described information preset priority that sorts.
Preferably, the carousel number of positions that described server provides in the information that is retrieved as described random carousel, is further:
Remaining carousel number of positions outside the fixing carousel of the removal position that described server provides in the information that is retrieved as described random carousel.
Preferably, described server is again according to the sequencing of described information after described prioritization, and described information is distributed to corresponding described odd even group successively, and then this information is put into respectively on the carousel position that this odd even group comprises successively, is further:
Described server again according to the sequencing of described information after described prioritization and described odd even group according to the posterior clooating sequence of odd number group before even number set, described information is distributed to corresponding described odd even group successively, and then this information is put into respectively on the carousel position that this odd even group comprises successively.
Preferably, described information, is further video, audio frequency and/or Word message.
In order to solve the problems of the technologies described above, disclosed herein as well is the system of the random carousel of a kind of information, couple mutually with server, it is characterized in that, this system comprises: obtaining information module, divides position module, module is set and broadcasting arranges module at random, wherein,
Described obtaining information module, for being obtained and need be carried out the information of random carousel and sort according to priority by described server;
Described division position module, the carousel number of positions providing for be retrieved as the information of described random carousel by described server, and this quantity is carried out to odevity division take the number of the information of described random relay as round, be divided into the odd even group with the corresponding number of number of described information;
The described module that arranges at random, for receiving the sequencing of the rear described information of described obtaining information module output sequence, described information is distributed to successively to the described odd even group of corresponding described division position module output, and then this information is put into respectively on the carousel position that this odd even group comprises successively;
Described broadcasting arranges module, for by described server according to the described carousel sequence of positions before dividing, in conjunction with preset carousel number of times, carry out successively described setting at random and in module, put into the above carousel information of each described carousel position.
Preferably, described obtaining information module, is further used for:
By described server, obtain the information that need carry out random carousel, and according to preset priority, described information is sorted; Wherein,
Described preset priority, for according to user to the keyword of the described information preset priority that sorts.
Preferably, described division position module, is further used for:
By described server, be retrieved as the remaining carousel number of positions outside the fixing carousel of the removal position that the information of described random carousel provides, and this quantity is carried out to odevity division take the number of the information of described random relay as round, be divided into the odd even group with the corresponding number of number of described information.
Preferably, the described module that arranges at random, is further used for:
Receive the sequencing of described information after described obtaining information module output sequence and described odd even group according to the posterior clooating sequence of odd number group before even number set, described information is distributed to successively to the described odd even group of corresponding described division position module output, and then this information is put into respectively on the carousel position that this odd even group comprises successively.
Preferably, described information, is further video, audio frequency and/or Word message.
Compared with prior art, the method and system of the random carousel of a kind of information described in the application, have reached following effect:
1) the application has solved the problem that existing information carousel technical approach is single, broadcasting repetition rate is high and information is excessively browsed, and has solved the problems referred to above in the mode of the random carousel of information.
2) the application has also solved for the user who sees continuously multiple videos, the problem that the information of same information, same brand all can not occur continuously, and the counter productive that can avoid information excessively to represent, can promote again user's experience.
Certainly, arbitrary product of enforcement the application must not necessarily need to reach above-described all technique effects simultaneously.
Embodiment
As used some vocabulary in the middle of specification and claim, censure specific components.Those skilled in the art should understand, and hardware manufacturer may be called same assembly with different nouns.This specification and claims are not used as distinguishing the mode of assembly with the difference of title, but the difference in function is used as the criterion of distinguishing with assembly.If " comprising " mentioned in the middle of specification and claim is in the whole text an open language, therefore should be construed to " comprise but be not limited to "." roughly " refer to that in receivable error range, those skilled in the art can solve the technical problem within the scope of certain error, reach described technique effect substantially.In addition, " couple " word and comprise directly any and electric property coupling means indirectly at this.Therefore, if describe a first device in literary composition, be coupled to one second device, represent that described first device can directly be electrically coupled to described the second device, or be indirectly electrically coupled to described the second device by other devices or the means that couple.Specification subsequent descriptions is to implement the application's preferred embodiments, and right described description is to illustrate that the application's rule is object, not in order to limit the application's scope.The application's protection range is when being as the criterion depending on the claims person of defining.
Embodiment mono-
As shown in Figure 1, be the method flow of the random carousel of information described in the embodiment of the present application one, the method comprises:
Step 101, server obtains and need carry out the information of random carousel and sort according to priority;
Step 102, the carousel number of positions that described server provides in the information that is retrieved as described random carousel, and this quantity is carried out to odevity division take the number of the information of described random relay as round, be divided into the odd even group with the corresponding number of number of described information;
Step 103, described server is again according to the sequencing of described information after described prioritization, and described information is distributed to corresponding described odd even group successively, and then this information is put into respectively on the carousel position that this odd even group comprises successively;
Step 104, described server, according to the described carousel sequence of positions before dividing, is carried out successively and has been put into the above carousel information of each described carousel position in conjunction with preset carousel number of times.
Information described in said method is further video, audio frequency and/or Word message.
Wherein, step 101 is further: server obtains the information that need carry out random carousel, and according to preset priority, described information is sorted; Wherein,
Described preset priority, for according to user to the keyword of the described information preset priority that sorts.
Wherein, the carousel number of positions that server described in step 102 provides in the information that is retrieved as described random carousel, is further: the remaining carousel number of positions outside the fixing carousel of the removal position that described server provides in the information that is retrieved as described random carousel.
Step 102 it should be noted that: server finds the rest position under directed condition, under current directed condition, the position of finding current information to take, during edit operation, because the displaying wheel number of current information is fixed, the number that occupies is fixed, if newly-increased operation, the position of finding other advertisement to take, last in the quantity that calculates remaining carousel position.
And then take the number of the information of described random relay, as round, carry out odevity division according to the quantity of remaining carousel position, be divided into the odd even group with the corresponding number of number of described information;
Particularly, can suppose following two kinds of situations:
1) information, take video ads as example, is put on by classification the advertisement of " miaow cluck grand ceremony " entirely in Tibetan Autonomous Prefecture of Deqen, and this input is an advertisement only, and the random site of generation is 1,3.I.e. video under Tibetan Autonomous Prefecture of Deqen's arbitrary classification, first advertisement, the 3rd advertisement that user sees are current advertisement, 10 take turns after, the 11st, 13 advertisements are current advertisement.
2) information, take video ads as example, is put on by classification the advertisement of " the video Collection Activities of 4G colleges and universities ", totally two advertisements entirely in Sichuan: advertisement A, advertisement B, throw 4 and take turns.Generating random site is 1,3,5,7.I.e. video under the arbitrary classification of Sichuan, first advertisement, the 5th advertisement that user sees are advertisement A, the 3rd, the 7th for advertisement B, 10 take turns after, the 11st, 15 advertisements are advertisement A, the 13rd, 17 advertisements are advertisement B.
Described step 103 can also be further: described server again according to the sequencing of described information after described prioritization and described odd even group according to the posterior clooating sequence of odd number group before even number set, described information is distributed to corresponding described odd even group successively, and then this information is put into respectively on the carousel position that this odd even group comprises successively.
Embodiment bis-
As shown in Figure 2, the method flow of the random carousel of information described in the embodiment of the present application two, comprising:
Step 201, server obtains and need carry out the information of random carousel and sort according to priority;
Step 202, remaining carousel position (passing through getExtraLocation() mode outside the fixing carousel of the removal position that described server provides in the information that is retrieved as described random carousel is obtained) quantity, and this quantity is carried out to odevity division take the number of the information of described random relay as round, be divided into the odd even group with the corresponding number of number of described information;
Step 203, described server again according to the sequencing of described information after described prioritization and described odd even group according to the posterior clooating sequence of odd number group before even number set, described information is distributed to corresponding described odd even group successively, and then this information is put into respectively on the carousel position that this odd even group comprises successively;
Step 204, described server, according to the described carousel sequence of positions before dividing, is carried out successively and has been put into the above carousel information (passing through assembleIdeaLocationMap() execution carousel of each described carousel position in conjunction with preset carousel number of times).
For the step 203 of above-described embodiment two, be actually: described odd even group, according to the posterior clooating sequence of odd number group before even number set, is further: ordering rule is that even number is less than odd number permutation with positive order, and even number position is front, and odd number is rear.At this moment in order, get n position, the carousel sum that n is advertisement, obtains n discontinuous position like this.Be mainly according to remaining carousel position, generate random carousel position.This random effect is to generate by simulation random algorithm.In discontinuous position, generate the different carousel effect of different information.Here information is take advertisement as example: guarantee advertisements different under same brand, in its belonging positions list, occur in turn.First, by discontinuous position, again press natural number size permutation with positive order, traversal list of locations.In current location, by the sequence number of position, advertisement number m in brand is done to mould and calculate, result r is that in brand, r advertisement appears at current location.In addition, after step 203, also need the content of operation completing to be saved in database, for the follow-up no longer expansion of the description and interpretation explanation of above-mentioned sortord.
For user, adopt the method for above-described embodiment one and two, be mainly by the advertising message in page input carousel, and total carousel number and advertisement putting time etc. are set.By said method, first obtain the quantity of carousel position, and according to the quantity of advertisement of wanting carousel, divide carousel position, which next round is broadcasted existing this advertisement, according to the rule that arranges in method, advertisement carousel position is broken up, form random effect, function: the position that arranges advertisement carousel, be which next round is broadcasted existing this advertisement, be responsible for advertisement carousel position to break up, form random effect, this is only the present invention's kernel object the most.In addition, the present invention mainly also passes through saveSysCast() the random list of taking turns advertisement of traversal, and deposit in database and preserve one by one.
Embodiment tri-
As shown in Figure 3, for the system block diagram of the random carousel of information described in the embodiment of the present application three, this system couples mutually with server, and this system comprises: obtaining information module 301, divide position module 302, at random module 303 and broadcasting be set module 304 is set, wherein
Described obtaining information module 301, couples with the described module 303 that arranges at random, mutually for being obtained and need be carried out the information of random carousel and sort according to priority by described server;
Described division position module 302, couple mutually with the described module 303 that arranges at random, the carousel number of positions providing for be retrieved as the information of described random carousel by described server, and this quantity is carried out to odevity division take the number of the information of described random relay as round, be divided into the odd even group with the corresponding number of number of described information;
The described module 303 that arranges at random, with described obtaining information module 301, division position module 302 and broadcasting, module 304 being set respectively couples mutually, for receiving the sequencing of the rear described information of described obtaining information module 301 output sequence, described information is distributed to the described odd even group that corresponding described division position module 302 is exported successively, and then this information is put into respectively on the carousel position that this odd even group comprises successively;
Described broadcasting arranges module 304, couple mutually with the described module 303 that arranges at random, for the described carousel sequence of positions before according to division by described server, in conjunction with preset carousel number of times, carry out successively described setting at random and in module 303, put into the above carousel information of each described carousel position.
In addition, described obtaining information module 301, is further used for: by described server, obtain the information that need carry out random carousel, and according to preset priority, described information is sorted; Wherein, described preset priority, for according to user to the keyword of the described information preset priority that sorts.
In addition, described division position module 302, be further used for: by described server, be retrieved as the remaining carousel number of positions outside the fixing carousel of the removal position that the information of described random carousel provides, and this quantity is carried out to odevity division take the number of the information of described random relay as round, be divided into the odd even group with the corresponding number of number of described information.
In addition, the described module 303 that arranges at random, be further used for: receive the sequencing of described information after described obtaining information module output sequence and described odd even group according to the posterior clooating sequence of odd number group before even number set, described information is distributed to successively to the described odd even group of corresponding described division position module output, and then this information is put into respectively on the carousel position that this odd even group comprises successively.
Information described in said system is further video, audio frequency and/or Word message.
Because method part have been described in detail the embodiment of the present application, here the expansion of the method and system corresponding part relating in embodiment is described and omitted, repeat no more.Description for particular content in system can, with reference to the content of described embodiment of the method, no longer specifically limit here.
Compared with prior art, the method and system of the random carousel of a kind of information described in the application, have reached following effect:
1) the application has solved the problem that existing information carousel technical approach is single, broadcasting repetition rate is high and information is excessively browsed, and has solved the problems referred to above in the mode of the random carousel of information.
2) the application has also solved for the user who sees continuously multiple videos, the problem that the information of same information, same brand all can not occur continuously, and the counter productive that can avoid information excessively to represent, can promote again user's experience.
Those skilled in the art should understand, the application's embodiment can be provided as method, device or computer program.Therefore, the application can adopt complete hardware implementation example, completely implement software example or the form in conjunction with the embodiment of software and hardware aspect.And the application can adopt the form at one or more upper computer programs of implementing of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) that wherein include computer usable program code.
Above-mentioned explanation illustrates and has described some preferred embodiments of the application, but as previously mentioned, be to be understood that the application is not limited to disclosed form herein, should not regard the eliminating to other embodiment as, and can be used for various other combinations, modification and environment, and can, in invention contemplated scope described herein, by technology or the knowledge of above-mentioned instruction or association area, change.And the spirit and scope that the change that those skilled in the art carry out and variation do not depart from the application, all should be in the protection range of the application's claims.