Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 2, a kind of content recommendation method provided by the invention, comprising:
Obtain the commending contents data under default collection address;
In this step, the collection address of commending contents data is provided by content service provider, as shown in Figure 3, content service provider Australia Howdini offers terminal one URL address as gathering address, the URL address that server provides according to it and the content service provider of this address is provided, the target information of commending contents data is obtained in configuration, such as, configuration URL address is
http:// feeds.touchstorm.com/mrss/aa46.Configuration URL name is called Australian Howdini Health.Configure behind this collection address, the URL address that access configures, obtains commending contents data.
According to the incidence relation of commending contents position and described commending contents data, the commending contents data that get are write on corresponding commending contents position.
Based on above-described embodiment, from the URL address acquisition configuring to commending contents data, according to the mapping relations between commending contents data and commending contents position, the commending contents data acquisition that traversal gets, extract the commending contents data that have mapping relations with commending contents position, the commending contents data that extract are write on corresponding commending contents position.
Owing to having set up incidence relation between commending contents data and commending contents position, thereby can make when commending contents data are upgraded to some extent, according to the corresponding relation between commending contents data and commending contents position, commending contents data after upgrading are write in commending contents position corresponding to terminal, realize terminal content and recommended the synchronizeing of content recommendation of content on position and content supplier, and can in time the commending contents data of renewal be write on corresponding commending contents position, make user obtain up-to-date commending contents.And needn't be as in prior art, manually the commending contents data that get are put on commending contents position, thereby the effective time of having avoided manual programming content to recommend the commending contents data on position to bring is short and the defect of easily makeing mistakes, especially avoided in prior art, when the frequency of manual layout is less than the frequency of commending contents Data Update, can not in time the commending contents data of renewal be write to commending contents position and the user that causes can not obtain the defect of up-to-date commending contents data in time.
As a kind of embodiment preferably, the incidence relation of commending contents position and described commending contents data
Process of establishing be: chosen content is recommended position; For arranging, selected commending contents position gathers address; The call number of the commending contents data under described collection address is set; Set up the numbering of described commending contents position and the incidence relation between described call number.
A plurality of commending contents of terminal operated by rotary motion position, and can or reduce the quantity of commending contents position according to concrete increase in demand.Based on above arbitrary embodiment, the present embodiment arranges a numbering for each commending contents position, as the ID of each commending contents position.In the URL address that Er Cong content service provider provides, can have access to a plurality of commending contents data objects, in the present embodiment, a numbering is set to each the commending contents data object getting, as the ID of each commending contents data object.Thus, we can specify the content-data recommended of numbering be tied on the commending contents position of specifying numbering, are about to the ID of commending contents position and the ID of commending contents data object and carry out associatedly, set up the mapping relations of commending contents data and commending contents position.While setting up mapping relations, can gather address for each commending contents position URL of configuration, also can gather address by a plurality of commending contents position URL of configuration, in the present embodiment, in order to improve, set up associated efficiency, can carry out batch associated, when batch is associated, can gather address for a plurality of commending contents position URL of configuration, also can gather address for whole commending contents position URL of configuration, for configuring, commending contents position gathers behind URL address, the URL that configuration is set gathers the call number of the commending contents data under address, set up the numbering of commending contents position and the incidence relation between call number.For a specific example, supposing that terminal has 10 commending contents positions, is for No. ID 1 ~ 10, then entirely selects the commending contents position of terminal, and selected commending contents position number is 10, for these 10 commending contents positions arrange collection address, is
http://feeds.touchstorm.com/mrss/aa46,the commending contents data object getting from this collection address has 20, be for No. ID 1 ~ 20, start sequence number that can chosen content recommending data object, be that call number is 11, and the arrangement mode that commending contents data object is set is order arrangement, can obtain layout result is, be for No. ID that 1 commending contents position is 11 with No. ID commending contents data object is associated, be for No. ID that 2 commending contents position is 12 with No. ID commending contents data object is associated ... the like, be for No. ID that 10 commending contents position is 20 with No. ID commending contents data object is associated, just completed the incidence relation of all commending contents positions and all commending contents data object, and this incidence relation can be got up as data table stores.Certainly, the incidence relation here can also be other relations, such as the start sequence number of chosen content recommending data object is 1, but the arrangement mode of commending contents data object is set for to be arranged in order according to odd number, can obtain layout result is, be for No. ID that 1 commending contents position is 1 with No. ID commending contents data object is associated, be for No. ID that 2 commending contents position is 3 with No. ID commending contents data object is associated ... the like, be for No. ID that 10 commending contents position is 19 with No. ID commending contents data object is associated, just completed the incidence relation of all commending contents positions and all commending contents data object.It should be noted that, no matter adopt which type of expression formula, between the numbering of commending contents data object and the numbering of commending contents position, set up incidence relation, all will guarantee has corresponding commending contents data object on commending contents position, specifically, suppose to have got 10 commending contents data objects from default collection address, terminal is also provided with 10 commending contents positions, but the expression formula adopting is on commending contents position, to write the commending contents data object that adds 1 numbering correspondence than the numbering of this commending contents position, write the commending contents data object that is numbered 11 being numbered on 10 commending contents position, but 10 commending contents data objects have altogether been got from gathering address, so, occurred being numbered on 10 commending contents position and there is no corresponding commending contents data object, this situation is not allowed in actual mechanical process, so, which type of be defined as no matter adopt expression formula herein, between the numbering of commending contents data object and the numbering of commending contents position, set up incidence relation, all will guarantee has corresponding commending contents data object on commending contents position.
As the present embodiment a kind of implementation preferably, in this step, be also provided with the collection initial time and the collection period that obtain commending contents data, be and obtain commending contents data and be provided with acquisition strategies, as shown in Figure 4, the crawl time is set, the collection initial time of obtaining commending contents data is 17:44:00, and collection period is that the crawl periodic intervals number of days in Fig. 4 is 1 day.
In the present embodiment, after configuring the target information and acquisition strategies of commending contents data, within one day, when current time arrives the initial time 17:44:00 setting, according to the URL address configuring, access
http:// feeds.touchstorm.com/mrss/aa46,generally, under a collection address, there are a plurality of commending contents data objects, therefore, access
http:// feeds.touchstorm.com/mrss/aa46can receive a plurality of commending contents data objects that this address is returned, and, in actual mechanical process, the situation that the commending contents data object that likely occurs getting is invalid data, the invalid data here can be understood as, if the commending contents data type getting is video, but the broadcast address of video is unavailable or terminal is not supported the form of obtained video, now, these invalid datas are given up.
In order to save processing resource, preferably, the present embodiment is that the quantity of the commending contents data object that gets is set a threshold value, such as setting this threshold value in Fig. 3, is 10.When the quantity of the commending contents data object returning when this address that terminal receives is greater than or equal to 10, give up after invalid data wherein, from remaining commending contents data object, select 10 bases of recommending position as layout terminal content, can be to choose arbitrarily 10, also can recommend the real needs of position to select 10 according to terminal, the mode of choosing is not construed as limiting herein; When terminal receives that the quantity of the commending contents data object returning this address is less than 10, give up after invalid data wherein, using remaining commending contents data object as layout terminal content, recommend the basis of position.
The decoding standard of commending contents data can also be set in this step, such as the Howdini_video.xml arranging in Fig. 3, when using the decoding standard arranging, can not successfully resolve the commending contents data object returning, judge that the commending contents data object getting does not meet the decoding standard of setting, this commending contents data object is given up, and sent alarm to terminal, terminal receives after this alarm, can, according to this alarm, suitably the decoding standard arranging be adjusted.
Particularly, can a decoding standard be set for each default collection address, because collection address Dou Shi content service provider provides, and may there be different decoding standards in different content service providers, if in actual mechanical process, for all collection addresses arrange same decoding standard, so, in some cases, just there will be from gathering address acquisition commending contents data, the unsuccessful situation of decoding, thus can not in time the commending contents data that get be write on commending contents position, affected user's experience.In the present embodiment, according to the difference of content service provider, the decoding standard of pre-configured and commending contents data adaptation, just evaded the unsuccessful situation of above-mentioned decoding, can be in time to the commending contents decoding data getting, thereby, in time decoded commending contents data are written on commending contents position.
As the embodiment of the present invention a kind of implementation preferably, in obtaining the process of commending contents data, terminal can also be set and obtain the threshold value of commending contents data failure number of times, such as being 5 by this Threshold, in gathering the process of commending contents data, when obtaining data failure number of times and reach 5, can determine that this default collection address is wrong, or there is no commending contents data under this collection address, now, send alarm, also can produce an error log simultaneously, with indication, related personnel checks error reason or changes default collection address, change behind default collection address, when arriving next acquisition time, collection address acquisition commending contents data from change.Owing to having set the threshold value of obtaining commending contents data failure number of times, while having avoided obtaining when the collection address from default less than commending contents data, execution is always obtained the action of commending contents data and is absorbed in endless loop.
Based on same inventive concept, a kind of content recommendation device that the present embodiment provides comprises: acquisition module, for obtaining the commending contents data under default collection address; Layout module, for according to the incidence relation of commending contents position and described commending contents data, writes the commending contents data that get on corresponding commending contents position.
Collection address Shi You content service provider provides, as shown in Figure 3, content service provider Australia Howdini offers terminal one URL address as gathering address, the URL address that server provides according to it and the content service provider of this address is provided, the target information of commending contents data is obtained in configuration, such as, configuration URL address is
http:// feeds.touchstorm.com/mrss/aa46.Configuration URL name is called Australian Howdini Health.Configure behind this collection address, the URL address that access configures, obtains commending contents data.
Acquisition module is accessed the collection address of above-mentioned configuration, and obtains the commending contents data under this collection address.Get after commending contents data, by layout module, according to the incidence relation of commending contents position and described commending contents data, the commending contents data that get are write on corresponding commending contents position.
Owing to having set up incidence relation between commending contents data and commending contents position, thereby can make when commending contents data are upgraded to some extent, according to the corresponding relation between commending contents data and commending contents position, commending contents data after upgrading are write in commending contents position corresponding to terminal, realize terminal content and recommended the synchronizeing of content recommendation of content on position and content supplier, and can in time the commending contents data of renewal be write on corresponding commending contents position, make user obtain up-to-date commending contents.And needn't be as in prior art, manually the commending contents data that get are put on commending contents position, thereby the effective time of having avoided manual programming content to recommend the commending contents data on position to bring is short and the defect of easily makeing mistakes, especially avoided in prior art, when the frequency of manual layout is less than the frequency of commending contents Data Update, can not in time the commending contents data of renewal be write to commending contents position and the user that causes can not obtain the defect of up-to-date commending contents data in time.
As the present embodiment a kind of implementation preferably, this device also comprises: select module, for chosen content, recommend position; Module is set, and the commending contents position that is used to described selection module to select arranges the call number that gathers the commending contents data under address and described collection address; Relating module, for setting up the described call number of commending contents data of module setting and the incidence relation between the numbering of described commending contents position of arranging.
A plurality of commending contents of terminal operated by rotary motion position, and can or reduce the quantity of commending contents position according to concrete increase in demand.Based on above arbitrary embodiment, the present embodiment arranges a numbering for each commending contents position, as the ID of each commending contents position.In the URL address that Er Cong content service provider provides, can have access to a plurality of commending contents data objects, in the present embodiment, a numbering is set to each the commending contents data object getting, as the ID of each commending contents data object.Thus, we can specify the content-data recommended of numbering be tied on the commending contents position of specifying numbering, are about to the ID of commending contents position and the ID of commending contents data object and carry out associatedly, set up the mapping relations of commending contents data and commending contents position.While setting up mapping relations, can gather address for each commending contents position URL of configuration, also can gather address by a plurality of commending contents position URL of configuration, in the present embodiment, in order to improve, set up associated efficiency, can carry out batch associated, when batch is associated, can gather address for a plurality of commending contents position URL of configuration, also can gather address for whole commending contents position URL of configuration, for configuring, commending contents position gathers behind URL address, the URL that configuration is set gathers the call number of the commending contents data under address, set up the numbering of commending contents position and the incidence relation between call number.For a specific example, supposing that terminal has 10 commending contents positions, is for No. ID 1 ~ 10, then select module entirely to select the commending contents position of terminal, selecting the selected commending contents position number of module is 10, then, by module is set, for these 10 commending contents positions arrange collection address, is
http://feeds.touchstorm.com/mrss/aa46, supposesthe commending contents data object getting from this collection address has 20, be for No. ID 1 ~ 20, the start sequence number that module arranges commending contents data object is set, be that call number is 11, and the arrangement mode that commending contents data object is set is order arrangement, relating module is according to selecting module and the chosen content of module being set and content is set, can obtain layout result is, be for No. ID that 1 commending contents position is 11 with No. ID commending contents data object is associated, be for No. ID that 2 commending contents position is 12 with No. ID commending contents data object is associated ... the like, be for No. ID that 10 commending contents position is 20 with No. ID commending contents data object is associated, just completed the incidence relation of all commending contents positions and all commending contents data object, and this incidence relation can be got up as data table stores.Certainly, the incidence relation here can also be other relations, such as the start sequence number of chosen content recommending data object is 1, but the arrangement mode of commending contents data object is set for to be arranged in order according to odd number, can obtain layout result is, be for No. ID that 1 commending contents position is 1 with No. ID commending contents data object is associated, be for No. ID that 2 commending contents position is 3 with No. ID commending contents data object is associated ... the like, be for No. ID that 10 commending contents position is 19 with No. ID commending contents data object is associated, just completed the incidence relation of all commending contents positions and all commending contents data object.It should be noted that, no matter adopt which type of expression formula, between the numbering of commending contents data object and the numbering of commending contents position, set up incidence relation, all will guarantee has corresponding commending contents data object on commending contents position, specifically, suppose to have got 10 commending contents data objects from default collection address, terminal is also provided with 10 commending contents positions, but the expression formula adopting is on commending contents position, to write the commending contents data object that adds 1 numbering correspondence than the numbering of this commending contents position, write the commending contents data object that is numbered 11 being numbered on 10 commending contents position, but 10 commending contents data objects have altogether been got from gathering address, so, occurred being numbered on 10 commending contents position and there is no corresponding commending contents data object, this situation is not allowed in actual mechanical process, so, which type of be defined as no matter adopt expression formula herein, between the numbering of commending contents data object and the numbering of commending contents position, set up incidence relation, all will guarantee has corresponding commending contents data object on commending contents position.
As the present embodiment another kind of implementation preferably, this content recommendation device module is also obtained the collection initial time of described commending contents data, collection period, the commending contents data threshold value that quantity arranges threshold value, gathers address and obtain commending contents data failure number of times of obtaining for arranging is set.In this preferred embodiment, acquisition module is specifically in arranging the collection period of module setting, and when current time arrives the collection initial time of setting, the collection address that access is set, obtains the commending contents data under this collection address.
In the present embodiment, after configuring the target information and acquisition strategies of commending contents data, within one day, when current time arrives the initial time 17:44:00 setting, according to the URL address configuring, access
http:// feeds.touchstorm.com/mrss/aa46, obtains commending contents data.
Further, as the present embodiment a kind of implementation preferably, this device also comprises chooses module, for when determining that the quantity of the commending contents data that get is greater than or equal to the threshold value of setting, chooses the commending contents data of setting threshold quantity.
Generally, under a collection address, there are a plurality of commending contents data objects, therefore, access
http:// feeds.touchstorm.com/mrss/aa46can receive a plurality of commending contents data objects that this address is returned, and, in actual mechanical process, the situation that the commending contents data object that likely occurs getting is invalid data, the invalid data here can be understood as, if the commending contents data type getting is video, but the broadcast address of video is unavailable or terminal is not supported the form of obtained video, now, these invalid datas are given up.In order to save processing resource, the present embodiment is that the quantity of the commending contents data object that gets is set a threshold value, such as setting this threshold value in Fig. 3, is 10.When the quantity of the commending contents data object returning when this address that terminal receives is greater than or equal to 10, give up after invalid data wherein, by choosing module, from remaining commending contents data object, select 10 bases of recommending position as layout terminal content, can be to choose arbitrarily 10, also can recommend the real needs of position to select 10 according to terminal, the mode of choosing is not construed as limiting herein; When terminal receives that the quantity of the commending contents data object returning this address is less than 10, give up after invalid data wherein, using remaining commending contents data object as layout terminal content, recommend the basis of position.
Further, as the embodiment of the present invention a kind of implementation preferably, this device also comprises extremely
Processing module, for when obtaining the number of times of commending contents data failure and reach setting threshold, send alarm, also can produce an error log simultaneously, with indication, related personnel checks error reason or changes default collection address, change behind default collection address, when arriving next acquisition time, the collection address acquisition commending contents data from change.Owing to having set the threshold value of obtaining commending contents data failure number of times, while having avoided obtaining when the collection address from default less than commending contents data, execution is always obtained the action of commending contents data and is absorbed in endless loop.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or meter
Calculation machine program product.Therefore, the present invention can adopt complete hardware implementation example, complete implement software example or knot
Close the form of the embodiment of software and hardware aspect.And the present invention can adopt at one or more wherein bags
The computer-usable storage medium that contains computer usable program code (include but not limited to magnetic disk memory,
CD-ROM, optical memory etc.) form of the upper computer program of implementing.
The present invention is that reference is according to the method for the embodiment of the present invention, equipment (system) and computer program product
The process flow diagram of product and/or block scheme are described.Should understand can be by computer program instructions realization flow figure and
/ or block scheme in each flow process and/or the flow process in square frame and process flow diagram and/or block scheme and/
Or the combination of square frame.Can provide these computer program instructions to multi-purpose computer, special purpose computer, embedding
The processor of formula processor or other programmable data processing device, to produce a machine, makes by calculating
The instruction that the processor of machine or other programmable data processing device is carried out produces for realizing at process flow diagram one
The device of the function of appointment in square frame of individual flow process or a plurality of flow process and/or block scheme or a plurality of square frame.
These computer program instructions also can be stored in energy vectoring computer or the processing of other programmable datas is established
In the standby computer-readable memory with ad hoc fashion work, make to be stored in this computer-readable memory
Instruction produce the manufacture comprise command device, this command device is realized in flow process or a plurality of of process flow diagram
The function of appointment in square frame of flow process and/or block scheme or a plurality of square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make
Must on computing machine or other programmable devices, carry out sequence of operations step to produce computer implemented place
Reason, thus the instruction of carrying out on computing machine or other programmable devices is provided for realizing one of process flow diagram
The step of the function of appointment in square frame of flow process or a plurality of flow process and/or block scheme or a plurality of square frame.
Although described the preferred embodiments of the present invention, once those skilled in the art obtain cicada base
This creative concept, can make other change and modification to these embodiment.So appended right is wanted
Ask and be intended to all changes and the modification that are interpreted as comprising preferred embodiment and fall into the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification and not depart from this present invention
Bright spirit and scope.Like this, if of the present invention these are revised and modification belong to the claims in the present invention and
Within the scope of its equivalent technologies, the present invention be also intended to comprise these change and modification interior.