Summary of the invention
In view of this, technical problems to be solved in this application have been to provide a kind of advertisement matching process and system with highly scalable, to solve multi-level input prioritization logic, can only be solidificated in program code, once will adjust priority, just relate to the problem such as amendment and system upgrade of code.
In order to solve the problems of the technologies described above, the application discloses a kind of advertisement matching process with highly scalable, it is characterized in that, comprising:
According to XML configuration file structure Hash tree structure, and the child node of the different levels of this Hash tree structure;
According to the attribute of the advertisement of storing in database, be organized as accessed entity object, and be deposited into according to described entity object in the child node of corresponding child node in described Hash tree structure or establishment, and carry out network-caching;
While throwing in described advertisement, first judge the fixed condition of the advertisement that client will obtain, search entity object described at least one of storing in the corresponding child node in described Hash tree structure according to this fixed condition;
Again according to find at least one described in entity object and default filtercondition carry out filtration treatment, draw the described advertisement that can throw in.
Preferably, wherein, according to XML configuration file structure Hash tree structure, and the child node of the different levels of this Hash tree structure, further comprise: after described XML configuration file is modified, corresponding described Hash tree structure, and the child node of the different levels of this Hash tree structure also can be carried out corresponding amendment when buffer memory loads.
Preferably, wherein, described default filtercondition comprises: the default injected volume of advertisement exhausts, this advertisement duration exceeds the alone family that current video positive can be thrown maximum duration and active user watches number of times to reach system requirements and watches the number of times upper limit.
Preferably, wherein, according to the attribute of the advertisement of storing in database, be organized as accessed entity object, and be deposited into according to described entity object in the child node of corresponding child node in described Hash tree structure or establishment, and carry out network-caching; Be further: according to the attribute of the advertisement of storing in database, be organized as accessed entity object, and be deposited in the corresponding child node in described Hash tree structure according to described entity object, the child node that corresponding child node creates as do not found also deposits in wherein, then carry out network-caching.
Preferably, wherein, in the leaf node position of described Hash tree structure, at least 4 nodes are set, represent respectively video group, subscriber identity information, key word and channel that advertisement is directed.
In order to solve the problems of the technologies described above, disclosed herein as well is a kind of advertisement matching system with highly scalable, this system couples mutually with database, it is characterized in that, and this system comprises: advertisement cache module and advertisement putting module,
Described advertisement cache module, couples mutually with described database and advertisement putting module respectively, for constructing Hash tree structure according to XML configuration file, and the child node of the different levels of this Hash tree structure; Then according to the attribute of the advertisement of storing in described database, be organized as accessed entity object, and be deposited into according to described entity object in the child node of corresponding child node in described Hash tree structure or establishment, and carry out network-caching;
Described advertisement putting module, couple mutually with described advertisement cache module and client respectively, while being used for throwing in described advertisement, first judge the fixed condition of this advertisement, search entity object described at least one of storing in the corresponding child node in the Hash tree structure on described advertisement cache module according to this fixed condition; Again according to find at least one described in entity object and default filtercondition carry out filtration treatment, show that the described advertising feedback that can throw in is to described client.
Preferably, wherein, described advertisement cache module, further also for: after described XML configuration file is modified, corresponding described Hash tree structure, and the child node of the different levels of this Hash tree structure also can be carried out corresponding amendment when buffer memory loads.
Preferably, wherein, described default filtercondition comprises: the default injected volume of advertisement exhausts, this advertisement duration exceeds the alone family that current video positive can be thrown maximum duration and active user watches number of times to reach system requirements and watches the number of times upper limit.
Preferably, wherein, described advertisement cache module, further also for the attribute of the advertisement of storing according to database, be organized as accessed entity object, and be deposited in the corresponding child node in described Hash tree structure according to described entity object, the child node that corresponding child node creates as do not found also deposits in wherein, then carry out network-caching.
Preferably, wherein, in the leaf node position of described Hash tree structure, at least 4 nodes are set, represent respectively video group, subscriber identity information, key word and channel that advertisement is directed.
Compared with prior art, a kind of advertisement matching process and the system with highly scalable described in the application, has reached following effect:
1) the application can provide a kind of advertisement matching way with extensibility, to solve multi-level input prioritization logic, can only be solidificated in program code, once will adjust priority, just relates to amendment and the system upgrade of code.
2) the application can also solve a special advertisement because the input cycle closes to an end, for example: but due to spending on ads wretched insufficiency, how to solve keeping other advertisement still to meet under the major premise of original advertisement priority, freely adjust the problem of the priority of certain particular advertisement.
Certainly, arbitrary product of enforcement the application must not necessarily need to reach above-described all technique effects simultaneously.
Embodiment
Censure specific components as used some vocabulary in the middle of instructions and claim.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 instructions 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, be coupled to one second device if describe a first device in literary composition, 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.Instructions 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 domain is when being as the criterion depending on the claims person of defining.
Embodiment mono-
As shown in Figure 1, be the advertisement matching process flow process with highly scalable described in the embodiment of the present application one, the method comprises:
Step 101, according to XML(extending mark language) configuration file structure Hash tree structure, and the child node of the different levels of this Hash tree structure;
Step 102, according to the attribute of the advertisement of storing in database, be organized as accessed entity object, and be deposited into according to described entity object in the child node of corresponding child node in described Hash tree structure or establishment, and carry out network-caching (buffer memory Hash tree structure (HashTree) and adIdeaMap object (also can be called advertisement entity Object table));
Step 103, while throwing in described advertisement, first judges the fixed condition of the advertisement that client will obtain, and searches entity object described at least one of storing in the corresponding child node in described Hash tree structure according to this fixed condition;
Step 104, then according to find at least one described in entity object and default filtercondition carry out filtration treatment, draw the described advertisement that can throw in.
Wherein, step 101 further comprises: after described XML configuration file is modified, and corresponding described Hash tree structure, and the child node of the different levels of this Hash tree structure also can be carried out corresponding amendment when buffer memory loads.
Wherein, step 104, described default filtercondition is: the default injected volume of advertisement exhausts, this advertisement duration exceeds the alone family that current video positive can be thrown maximum duration and active user watches number of times to reach system requirements and watches the number of times upper limit etc.
Wherein, step 102, the attribute of the advertisement of storing in described database, comprising: the URL address (being ad material address) of advertisement, the contents such as the monitoring address (advertisement exposure monitoring URL address, the clicked monitoring URL of advertisement address) that advertisement is relevant, do not do concrete restriction here.
In addition, step 102, according to the attribute of the advertisement of storing in database, is organized as accessed entity object, and is deposited into according to described entity object in the child node of corresponding child node in described Hash tree structure or establishment, and carries out network-caching; Be further: according to the attribute of the advertisement of storing in database, be organized as accessed entity object, and be deposited in the corresponding child node in described Hash tree structure according to described entity object, the child node that corresponding child node creates as do not found also deposits in wherein, then carry out network-caching.
In addition, step 103 is specially: by distributed caching instrument by the described Hash tree structure (HashTree) in buffer memory described in previous step (step 102) and adIdeaMap(advertisement entity Object table) data pull throws in the internal memory of server to front end, then front end is thrown in service and can in HashTree, be searched according to active user's required parameter the material ID of advertisement, then in adIdeaMap, find the entity object that this material ID is corresponding (also can be called ADIdea object) according to material ID, and return to (can make to return to ad-request side's (being requesting client)) according to the code that this object constructs advertisement.
In addition, in step 101, the child node of the different levels of the Hash tree structure (HashTree) of structure, is traditionally arranged to be the child node of 5 layers, wherein:
Ground floor has 2 child nodes (also can be referred to as Tree node), corresponds respectively in the HashTree tree of conventional oriented approach (common) and arenas by the HashTree of round loop play (theater_lunbo).
The second layer:
For first Tree node, its ground floor Node node represent current layer time deposit advertisement fixing to Platform Type (device_type);
The 3rd layer:
Represent the priority of advertisement, this attribute is with numeral, is by the sequence node of ordered arrangement from small to large;
The 4th layer;
Represent advertisement fixing to area (area);
Layer 5:
4 nodes (leaf node) are set and represent respectively the directed video group of advertisement, user ID (ID identity information is the ID of ad material namely), key word and channel.Certainly be not limited to 4 nodes here.
Wherein, Hash tree structure (HashTree) comprises 3 attribute: name, KMap and KNode, wherein:
Name: it,, corresponding to the title (namely ground floor) of the Tree node in XML configuration file, is used for representing the corresponding type of Hash tree structure.
KMap: the recurrence Map structure (namely aforesaid second to five layer) that is a multilayer, the Value of its Key-Value centering can be that the KNode of the same level that new Map(is corresponding is while being non-leaf node), also can be that the KNode of the same level that List(is corresponding is while being leaf node), it is exactly finally for depositing the container of fixed condition of advertisement in HashTree;
KNode: for depositing the information of structure description file of HashTree, the name attribute of KNode and amode attribute correspond respectively to the attribute of the same name of the Node node in XML configuration file, KNode has also comprised a list, in list, each element is also KNode type node, that is to say that KNode is the data structure of a recurrence.
As shown in Figures 2 and 3, adopting the method for the invention to enumerate with concrete Application Example two (also can be called embodiment) here describes:
Step 1, as shown in Figure 2, supposes to have certain advertisement A, and its ID is the namely ID of ad material of 81(ID), product type is conventional input, fixed condition is: throw in the end at PC, priority level is 2, and directed area is " Guangdong Province ", surely throws key word and " makes laughs ".
Step 2, be conventional input according to its product type, known it with name property value under Ad root node in htree.xml configuration file be " common " and Tree node (ground floor) corresponding, it should be deposited in the KMap of HashTree that type is common carries out buffer memory simultaneously; (supposing that this advertisement is before packing the HashTree that type is " common " into, the KMap structure (as shown in Figure 2) in HashTree).
Step 3, while throwing in described advertisement, the KNode node in HashTree is carried out to following ergodic process (as shown in Figure 2):
The ground floor key of access KNode is device_type, is PC according to the device type of advertisement A orientation, and the Key(corresponding to the first order that can navigate to KMap is ad material ID) for P(P represents PC end, M represents Mobile end);
Next straton node of access KNode, key is priority, is 2 according to the priority of advertisement A, the Key corresponding to the second level that can navigate to KMap is 2;
Access KNode next straton node again, key is area, is Guangdong Province according to the orientation area of advertisement A, the key corresponding to the third level that can navigate to KMap is a42;
Visit again next straton node of KNode, key has 4: videogroup, userid, keyword, channel, be that key word " is made laughs " according to the throwing condition of determining of advertisement A, the known key matching is " keyword ", so key corresponding to the third level that can KMap for " k makes laughs ", this node is in the path of KMap " P/2/a42 " under do not exist, so want a newly-built K-V node, the K of node is " k makes laughs ", V is a new List, adds the ID:81 of advertisement A in List;
As shown in Figure 3, suppose in certain ad-request, comprise following information: this request comes from PC end, request area of source is: Guangdong Province, key word is: make laughs, request comes from the broadcast page of program " where father goes " (program ID is 500), and the uploader ID of this video is: 120, and we will carry out following search procedure for the structure in figure the 3rd accompanying drawing so:
First, Location Request platform: PC end, so can navigate to the node P of the ground floor of KMap;
Secondly, access successively from high to low 1 and 2 two node of the KMap second layer according to priority;
The 3rd, Location Request area, finds to only have this node of a42 to mate, so navigate to the 3rd node layer: the P/2/a42 of KMap;
The 4th, locate videogroup, userid, keyword, the channel of the 4th layer, find that user ID and corresponding 2 nodes of key word " u120 " and " k makes laughs " can match, then can find 2 can throw advertising listing, comprising advertisement ID:38,56,81 etc.;
Finally, filter out some the advertisement ID that can not throw in these 2 lists, then obtain the ID list that can throw, wherein filter operation comprises: the default injected volume of advertisement exhausts, this advertisement duration exceeds the alone family that current video positive can be thrown maximum duration, active user watches number of times to reach system requirements and watches number of times upper limit etc.
Embodiment tri-
As shown in Figure 4, for the advertisement matching system block diagram with highly scalable described in the embodiment of the present application three, this system and database (are deposited the database of advertisement, it can be client, also can be that server does not limit here) couple mutually, this system comprises: advertisement cache module 401 and advertisement putting module 402, wherein
Described advertisement cache module 401, couples mutually with described database and advertisement putting module 402 respectively, for constructing Hash tree structure according to XML configuration file, and the child node of the different levels of this Hash tree structure; Then according to the attribute of the advertisement of storing in described database, be organized as accessed entity object, and be deposited into according to described entity object in the child node of corresponding child node in described Hash tree structure or establishment, and carry out network-caching (buffer memory Hash tree structure (HashTree) and adIdeaMap object (also can be called advertisement entity Object table));
Described advertisement putting module 402, couple mutually with described advertisement cache module 401 and client respectively, while being used for throwing in described advertisement, first judge the fixed condition of this advertisement, search entity object described at least one of storing in the corresponding child node in the Hash tree structure on described advertisement cache module 401 according to this fixed condition; Again according to find at least one described in entity object and default filtercondition carry out filtration treatment, show that the described advertising feedback that can throw in is to described client.
Wherein, described advertisement cache module 401 further also for: after described XML configuration file is modified, corresponding described Hash tree structure, and the child node of the different levels of this Hash tree structure also can automatically be upgraded when buffer memory loads.
Wherein, described in described advertisement putting module 402, default filtercondition is: the default injected volume of advertisement exhausts, this advertisement duration exceeds the alone family that current video positive can be thrown maximum duration, active user watches number of times to reach system requirements and watches the number of times upper limit etc.Certainly filtercondition can also comprise other modes here, does not do concrete restriction here.
Wherein, the attribute of the advertisement of storing in described database, comprise: the URL address (being ad material address) of advertisement, the contents such as the monitoring address (advertisement exposure monitoring URL address, the clicked monitoring URL of advertisement address) that advertisement is relevant, do not do concrete restriction here.
In addition, in described advertisement cache module 401, according to the attribute of the advertisement of storing in database, be organized as accessed entity object, and be deposited into according to described entity object in the child node of corresponding child node in described Hash tree structure or establishment, and carry out network-caching; Be further: according to the attribute of the advertisement of storing in database, be organized as accessed entity object, and be deposited in the corresponding child node in described Hash tree structure according to described entity object, the child node that corresponding child node creates as do not found also deposits in wherein, then carry out network-caching.
In addition, described advertisement putting module 402 is specially: by distributed caching instrument by the described Hash tree structure (HashTree) of buffer memory described in advertisement cache module 401 and adIdeaMap(advertisement entity Object table) data pull out (can pull on local computer), then in HashTree, search the material ID of advertisement according to fixed condition, then in adIdeaMap, find the entity object that this material ID is corresponding (also can be called ADIdea object) according to material ID, and return to (can make to return to ad-request side's (being requesting client)) according to the code that this object constructs advertisement.
In addition, in described advertisement cache module 401, the child node of the different levels of the Hash tree structure (HashTree) of structure, is traditionally arranged to be the child node of 5 layers, wherein:
Ground floor has 2 child nodes (also can be referred to as Tree node), corresponds respectively in the HashTree tree of conventional oriented approach (common) and arenas by the HashTree of round loop play (theater_lunbo).
The second layer:
For first Tree node, its ground floor Node node represent current layer time deposit advertisement fixing to Platform Type (device_type);
The 3rd layer:
Represent the priority of advertisement, this attribute is with numeral, is by the sequence node of ordered arrangement from small to large;
The 4th layer;
Represent advertisement fixing to area (area);
Layer 5:
4 nodes (leaf node) are set and represent respectively the directed video group of advertisement, user ID (ID is the ID of ad material namely), key word, channel.
Wherein, Hash tree structure (HashTree) comprises 3 attribute: name, KMap and KNode, wherein:
Name: it,, corresponding to the title (namely ground floor) of the Tree node in XML configuration file, is used for representing the corresponding type of Hash tree structure.
KMap: the recurrence Map structure (namely aforesaid second to five layer) that is a multilayer, the Value of its Key-Value centering can be that the KNode of the same level that new Map(is corresponding is while being non-leaf node), also can be that the KNode of the same level that List(is corresponding is while being leaf node), it is exactly finally for depositing the container of fixed condition of advertisement in HashTree;
KNode: for depositing the information of structure description file of HashTree, the name attribute of KNode and amode attribute correspond respectively to the attribute of the same name of the Node node in XML configuration file, KNode has also comprised a list, in list, each element is also KNode type node, that is to say that KNode is the data structure of a recurrence.
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, a kind of advertisement matching process and the system with highly scalable described in the application, has reached following effect:
1) the application can provide a kind of advertisement matching way with extensibility, to solve multi-level input prioritization logic, can only be solidificated in program code, once will adjust priority, just relates to amendment and the system upgrade of code.
2) the application can also solve a special advertisement because the input cycle closes to an end, for example: but due to spending on ads wretched insufficiency, how to solve keeping other advertisement still to meet under the major premise of original advertisement priority, freely adjust the problem of the priority of certain particular advertisement.
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 disk memory, 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, amendment and environment, and can, in invention contemplated scope described herein, change by technology or the knowledge of above-mentioned instruction or association area.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 domain of the application's claims.