Computer system for efficiently selecting and providing information6144944Abstract A system for selecting and providing information. The system can include an advertisement server that provides selected advertisements in response to a request from a web page server. The request includes information that will allow the advertisement server to select an appropriate advertisement. The advertisement server includes a control program for controlling the selection of the advertisements. The control program communicates with one or more affinity engines. Each affinity engine determines an affinity (degree of relevance or indicator of matching) given advertisements have for the information corresponding to the request. The engines use different request information such as demographic information, page sponsor information, keyword sponsor information, etc. Claims What is claimed is: Description THE BACKGROUND OF THE INVENTION
______________________________________
require util;
require advantage;
my($socket) = util::ConnectToServer($SERVER,$PORT);
my(%evidenceData,$output) ;
$evidenceData{`USERNAME`} = `mike`;
$evidenceData{`AGE`} = 25;
. . . .
$output = advantage::SubmitEvidence($socket,*%evidenceData);
if ($$output{`ERRORCODE`} != 0) {
ERROR . . .
}
______________________________________
NOTE This call may be used for the evidence data that needs to be provided only once during user visit, for example, after user login. NAME SubmitEvidenceAndGetAd SYNOPSIS require advantage; $output=advantage::SubmitEvidenceAndGetAd($socket,$evidence); DESCRIPTION SubmitEvidenceAndGetAd submits some information about a user to the ad server 100 and fetches a best match advertisement for that user. $socket is the socket descriptor, indicating the connected socket to the ad server 100, acquired through prior a ConnectToServer() call. $evidence is a reference to an associative array, where any number of values in the USERDATA structure may be set. User identification is provided in the $evidence associative array. RETURN VALUE $output is reference to an associative array where the following fields are set. $output{`ERRORCODE`} Error code from the ad server 100. $$output{`ADID`} Identifier for the best match ad, this may be used later to notify a click. $$output{`ADGIF`} Image file for the ad, this may a URL or path name. $$output{`ADDEST`} Destination of the ad. $$output {`ADALTERNTEXT`} Alternate text for the ad. Upon successful return the value of ERRORCODE field should be zero. SEE ALSO USERDATA, SubmitEvidenceAndGetNAds EXAMPLE The following example shows how to form an HTTP snippet to be inserted into dynamic pages such as can be used to generate the page 179.
__________________________________________________________________________
require advantage;
my(%evidenceData,$output);
$evidenceData{`USERNAME`} = `mike`;
$evidenceData{`PAGDID`} = `Some URL`;
. . . .
$output = advantage::SubmitEvidenceAndGetAd($socket,*%evidenceData);
if ($$output{`ERRORCODE`} != 0 {
ERROR . . .
}
my($httpSnippet)=<a href=
/cgibin/click.p1?ADID=$$output{`ADID`}&DEST=$$output{`ADDEST`}> <img
src=$$output{`ADGIF`} alt=$$output{`ADALTERNTEXT`}> </a>;
__________________________________________________________________________
NAME GetAd SYNOPSIS require advantage; $output=advantage::GetAd($socket,$evidence); DESCRIPTION GetAd fetches a best match ad for a user. $socket is the socket descriptor, indicating the connected socket to the ad server 100, acquired through prior a ConnectToServer() call. $evidence is a reference to an associative array. User identification is provided in the $evidence associative array. RETURN VALUE $output is reference to an associative array where the following fields are set. $$output{`ERRORCODE`} Error code from the ad server 100. $$output{`ADID`} Identifier for the best match ad, this may be used later to notify a click. $$output{`ADGIF`} Image file for the ad, this may a URL or path name. $$output{`ADDEST`} Destination of the ad. $$output{`ADALTERNTEXT`} Alternate text for the ad. Upon successful return the value of ERRORCODE field should be zero. SEE ALSO USERDATA, GetNAds EXAMPLE See SubmitEvidenceAndGetAd. NAME NotifyClick SYNOPSIS require advantage; $output=advantage::NotifyClick($socket,$addata); DESCRIPTION NotifyClick registers a user's click on an ad. $socket is the socket descriptor, indicating the connected socket to the ad server 100, acquired through a prior ConnectToServer() call. $addata is a reference to an associative array. User identification is provided in the $addata associative array, also `ADID` is provided for registering a click. If ADID is not available try using NotifyClickAndGetDestination. RETURN VALUE $output is reference to an associative array where the following fields are set. $$output{`ERRORCODE`}: Error code from the ad server 100. Upon successful return the value of ERRORCODE field should be zero. SEE ALSO USERDATA, NotifyClickAndGetDestination EXAMPLE
______________________________________
require advantage;
my(%addata,$output);
$addata{`USERNAME`} = $user;
$addata{`ADID`} = $adid;
$output = advantage::NotifyClick($socket,*%addata);
if ($$output{`ERRORCODE`} != 0) {
ERROR . . .
______________________________________
NAME NotifyClickAndGetDestination SYNOPSIS require advantage; $output=advantage::NotifyClickAndGetDestination($socket,$addata); DESCRIPTION NotifyClickAndGetDestination registers a user's click on an ad for a given ADSELECTORID. $socket is the socket descriptor, indicating the connected socket to the ad server 100, acquired through prior a ConnectToServer() call. $addata is a reference to an associative array. User identification is provided in the $addata associative array, also `ADSELECTORID` is provided. This call needs to be used when the ads are placed in static pages using CGIs. Each ad placement request provides the `ADSELCTORID` while trying to fetch an ad from the ad server 100. The ad server 100 internally keeps a list of ADSELCTORID for the ADIDS for each user. The call NotifyClickAndGetDestination recalls the ADID for the given (user,ADSELCTORID) pair. From that ADID, the ad server 100 retrieves the ad destination field and registers the click. RETURN VALUE $output is a reference to an associative array where the following fields are set. $$output{`ERRORCODE`} Error code from the ad server 100. $$output{`ADDEST`} The destination URL. Upon successful return the value of ERRORCODE field should be zero. SEE ALSO USERDATA EXAMPLE The following example shows click registration and HTTP redirect to the destination.
______________________________________
require advantage;
my(%addata,$output);
$addata{`USERNAME`} = $user;
$addata{`ADSELCTORID`} = $adselectorid;
$output = advantage::NotifyClickAndGetDesitnation($socket,*%addata);
if ($$output{`ERRORCODE`} != 0) {
ERROR . . .
}
print STDOUT Location: $$output{`ADDEST`}.backslash.n.backslash.n;
______________________________________
NAME SubmitEvidenceAndGetNAd SYNOPSIS require advantage; $output=advantage::SubmitEvidenceAndGetNAd($socket,$evidence); DESCRIPTION SubmitEvidenceAndGetNAd submits some information about a user to the ad server 100 and fetches a best match ad for that user. $socket is the socket descriptor, indicating the connected socket to the ad server 100, acquired through prior a ConnectToServer() call. $evidence is a reference to an associative array, where any number of values in the USERDATA structure may be set. User identification is provided in the $evidence associative array. The field `NUMBEROFADSPERPAGE` indicates the number of advertisements to be fetched. The field PAGEID is set to indicate the page for which multiple ads are requested. When this call is made for first time the ad server 100 generates NUMBEROFADSPERPAGE ads for the page. The call returns however with the first ad in the set. Consecutive calls of same function or the function GetNAds returns the next ad in the set, provided the user id and the PAGEID match. If at any time there are not any ads in the pre-generated set then a new set of ads is generated for that page. RETURN VALUE $output is a reference to an associative array where the following fields are set $$output{`ERRORCODE`} Error code from the ad server 100. $$output{`ADD`} Identifier for the best match ad, this may be used later to notify a click. $$output{`ADGIF`} Image file for the ad, this may a URL or path name. $$output{`ADDEST`} Destination of the ad. $$output{`ADALTERNTEXT`} Alternate text for the ad. Upon successful return the value of ERRORCODE field should be zero. SEE ALSO USERDATA, SubmitEvidenceAndGetAd NAME GetNAd SYNOPSIS require advantage; $output=advantage::GetNAd($socket,$evidence); DESCRIPTION GetNAd generates a set of best matching ads for the user, it returns the first ad in the set. $socket is the socket descriptor, indicating the connected socket to the ad server 100, acquired through prior a ConnectToServer() call. $evidence is a reference to an associative array. User identification is provided in the $evidence associative array. The field `NUMBEROFADSPERPAGE` indicates the number of advertisements to be fetched. The field PAGEID must be set to indicate the page for which multiple ads are requested. When this call is made for the first time the ad server 100 generates NUMBEROFADSPERPAGE ads for the page. The call returns however with the first ad in the set. Consecutive calls of same function or the function SubmitEvidenceAndGetNAds returns the next ad in the set, provided the user id and the PAGEID match. If at any time there are not any ads in the pre-generated set, then a new set of ads is generated for that page. RETURN VALUE $output is a reference to an associative array where the following fields are set. $$output{`ERRORCODE`} Error code from the ad server 100. $$output{`ADID`} Identifier for the best match ad, this may be used later to notify a click. $$output{`ADGIF`} Image file for the ad, this may a URL or path name. $$output{`ADDEST`} Destination of the ad. $$output{`ADALTERNTEXT`} Alternate text for the ad. Upon successful return the value of ERRORCODE field should be zero. SEE ALSO USERDATA, GetAd NAME USERDATA SYNOPSIS require advantage; @USERDATA DESCRIPTION USERDATA is simple array of strings. The strings describe various fields that can be set for the API. See individual API functions for usage of special fields marked with asterisks.
______________________________________
USERNAME Login name (12 bytes max)
GROUPNAME Group name, if any
COOKIE Cookie
EXTERNALID 12 bytes max (set
STARPOINT.sub.-- EXTERNALID = 1)
REFERER The URL which referred this
BROWSER Netscape: IE etc. (string)
OS NT:Win95 etc. (string)
HOSTNAME Hostname from where the request
originated
IPADDR IP address of the originator
DOMAINNAME Domain name of the originator
PAGEID Unique page reference (string) can be
URL
KEYWORD Any keywords user typed
PAGEDATA The page contents user is looking at.
ADID The adid of the ad user clicked on
ADSELECTORID Optional value to be statically inserted in
pages such that the ad server 100
remembers the ads shown
AGE Demographic data 0 .. ddd
NUMBEROFCHILDREN
Demographic data 0 .. ddd
HOUSEHOLDINCOME
Demographic data 0 .. ddd k$/year
GENDER Demographic data 0=unknown 1=male
2=female
MARITALSTATUS Demographic data 0=unknown, 1=single,
2=married, 3=divorced
OCCUPATION Demographic data string
NUMBEROFADSPERPAGE
Number of ads to be placed on page
USERINTEREST Psychographic data for Psychographic
engine. Syntax: :<Value>[, Value>]*::
______________________________________
Engine API This section describes the API for the affinity engines. The API allows the various engines to receive selection criteria from the ad server 100, access advertisement information, and use the selection criteria and the advertisement information to determine affinity values for various advertisements. The API allows the affinity engines to provide the list of advertisements back to the ad server 100. An important advantage of some embodiments of the invention is that the engine API supports unknown future applications for serving dynamically generated media, as well as the evolution of the advertising application. The engine API supports different and currently unknown types of constraints and matching operations. An advantage of the API presented in this section is that all the engines have a common interface. The common interface allows developers to quickly add and change engines for an ad server 100. This feature is important in markets such as web advertising because of the dynamic nature of the web. In some embodiments, specialized engines are built directly into the ad server 100 and do not comply with this API. These engines may be built this way to increase the performance of those engines. Another advantage of the API presented herein is that it can be extended to add functionality. FIG. 3 illustrates some of the classes described in this section. For each affinity engine type, there is an associated affinity attribute type and a corresponding affinity criterion type. For a given engine, this triple of types comprises the definition of a loadable affinity engine module (e.g., page sponsor engine 112) which can be loaded by the engine loading and registration 120 into the ad server 100. In some embodiments, each affinity engine module is implemented as a dynamically loadable class library. These classes use dependence, or a subset of dependence inheritance. The support classes used by the other classes, then the affinity attributes and the affinity criterion, and then the affinity engine classes are described. TReferenceCountedPointer TReferenceCountedPointer is a templatized class that implements a reference counted pointer to keep track of the number of references to a given object These classes are used to implement garbage collection, among other functions. These classes are not shown in FIG. 3. Other embodiments of this invention do not require explicit reference counts because the language used to implement the invention automatically provides such reference counts. Interface Definition
__________________________________________________________________________
template <class X>
class TReferenceCountedPointer {
public:
TReferenceCountedPointer(X* pointerToObject = 0);
// create a reference counted pointer class by passing it a
// pointer to the object that is being reference counted.
// the object is adopted by TReferenceCountedPointer.
// because the object is adopted, only use this constructor
// once for any pointer. if you use it twice, then someone will
// be "disappointed" when their pointer becomes invalid.
TReferenceCountedPointer(const TReferenceCountedPointer&);
TReferenceCountedPointer& operator=(const TReferenceCountedPointer$);
TReferenceCountedPointer& operator=(X* pointerToObject);
// make new reference counted pointers from old ones by
// using either the copy constructor or the assignment operator.
.about.TReferenceCountedPointer( );
// deleting the reference counted pointer object will decrement
// the reference count ot the pointer and delete the object itself
// if the reference count goes to zero.
long GetReferenceCount( );
X* operator-->( ) const;
// returns a pointer to the ref counted object so that can
// instance of TReferenceCountedPointer<X> can be accessed
// in the same way as X*.
X& operator*( ) const;
// dereference operator returns a reference to the ref counted object
// so that an instance of TReferenceCountedPointer<X> can be accessed
// in the same wasy as X*.
// below are convenience operators to allow TReferenceCountedPointers
// to be used just like regular pointers
friend int operator==(const TReferenceCountedPointer<X>& p1,
const TReferenceCountedPointer<X>& p2);
friend int operator==(const void* p1,
const TReferenceCountedPoint<X>& p2);
friend int operator==(const TReferenceCountedPoint<X>& p1,
const void* p2) ;
friend int operator==(const int,
const TReferenceCountedPointer<X>& p2);
friend int operator==(const TReferenceCountedPointer<X>& p1,
const int);
__________________________________________________________________________
Subclassing Example This class is not meant to be subclassed. Implementation Issues TReferenceCountedPointers are used liberally throughout the definition of the affinity engine framework 110. Each platform implements this class in the most efficient way possible. That means, each platform implements the class using the fastest possible atomic operation, e.g. "Compare and Swap". TAffinityAttribute FIG. 3 illustrates the attribute classes 310. An affinity engine works by selecting abstract entities that are represented by a type of data object called an affinity attribute. The internal structure of an attribute object will vary from engine to engine. For instance, a demographic affinity attribute may specify age, sex, and income information; a geographic affinity attribute may store information about zip codes, states, and countries. The primary function of TAffinityAttribute is to serve as the abstract type for engine-related attributes. This allows objects to receive, store, and pass arbitrary attribute types as TAffinityAttribute pointers. No restrictions are placed upon the structure or complexity of an affinity attribute by the TAffinityAttribute base class. Interface Definition
______________________________________
//***********************************************************
// TAffinityAttribute is the abstract base class for all engine-
// specific attribute data. The class serves to define common
// protocol for attributes data and as a type-check mechanism to
// for collecting disparate types of attribute information
// into a single container.
//
// The base class does not specify a protocol for how attribute data
// is stored or accesssed by a client.
//***********************************************************
class TAffinityAttribute {
public:
TAffinityAttribute ( );
.about.TAffinityAttribute ( );
TAffinityAttribute (const TAffinityAttribute &);
TAffinityAttribute & operator=(const TAffinityAttribute &);
TModuleID GetModuleID ( );
// TModuleID is an identifier which is unique to a given
// Affinity Engine Module. The details of the implementation
// of this class are platform specific and depend upon the
// characteristics of the runtime support provided. However,
// what is important is that each Affinity Engine Module
// will have a unique identity within the system. The value
// returned by GetModuleID will be the same for each type in
// an Affinity Engine Module (i.e., for the attribute, criterion,
// and engine objects in the module).
};
______________________________________
Subclassing Example The following code shows how to subclass TAffinityAttribute to create an attribute that contains demographic information.
______________________________________
//***********************************************************
// Simple TAffinityAttribute subclass example for demographic data.
//***********************************************************
class TDemographicProfile : public TAffinityAttribute {
public:
TDemographicProfile ( );
.about.TDemographicProfile( );
TDemographicProfile(const TDemographicProfile&);
TDemographicProfile& operator=(const TDemographicProfile&);
TDemographicProifle (const TString& name);
enum ESex (kMale, kFemale, kUnknown);
// Getters & Setters
ESex GetSex( )
{return fSex;};
unsigned short GetAge ( )
{return fAge;};
void SetSex(ESex sex)
(fSex = sex;};
void SetAge(unsigned short age)
{fAge = age;};
private:
Esex fSex;
unsigned short
fAge;
______________________________________
Related Issues The data storage framework implements a protocol for refreshing, and committing data within a TAfinityAttribute. TAfinityAttributes descends from a class called TObject which implements a protocol for synchronizing information with various caches. That protocol is described in the United States patent application entitled, "Distributed Computer Storage System and Method" application serial number XX/XXX,XXX, filed XXXXXX, 199X, having inventors Stephen J. Kuran II and Sandeep A. Nawathe. TEntity TEntity is an abstract base class that defines a protocol for retrieving affinity attributes from an object. Examples of TEntities might be documents, advertisements, ad campaigns, or users. TEntity does not define any mechanisms for creating, modifying, or storing attribute information. Thus, subclasses of TEntity are free to define their own mechanisms for handling these operations. This is important because an entity may keep and modify data in some other form than the common TAffinityAttribute. For instance, a user object may keep and manipulate attribute information in a relational database and only create affinity attribute objects when called by GetAttributeDatum. Interface Definition
______________________________________
//***********************************************************
// TEntity is an abstract base class which makes an
// object type useable by Affinity Engines. TEntity
// defines the protocol for accessing affinity attribute
// information and etntity naming. Note that the class does not
// define a protocol by which to initialize or change attribute
// information. This is deferred to the subclass.
//***********************************************************
class TEntity {
public:
TEntity ( );
virtual .about.TEntity ( );
TEntity (const TEntity &);
TEntity & operator=(const TEntity &);
virtual TReferenceCountedPointer<TAffinityAttribute>
GetAttributeDatum(TModuleId attributeType) = 0:
// Returns a reference counted pointer to a TAffinityAttribute
// object of the type specified by attributeType. If such attribute
// information does not exist for this TSelectableEntity, it returns
// a reference-counted pointer to a null.
//
// Note: it is possible that a particular instance of
// TEntity could have multiple affinity attributes of the
// same type (i.e., with the same value for TModuleID). For instance,
// the long-term psychographic attribute information for a user object
// might include a set of information affinity vectors, all
// having the same type. In such a case, GetAttributeDatum may
// return an object if the semantics of the TEntity subclass are
// such that there is a reasonable or natural way to define a single
// object to return. If it does not make semantic sense to return a
// single object, then the subclass should return a null.
______________________________________
Subclassing Example Below is an example implementation of a class called TAttributeBag. TAttributeBag is a kind of collection class for attribute information. It is given to suggest one possible way for a subclass to get and set of attribute values.
__________________________________________________________________________
#include <map.h>
// include STL map function
//***********************************************************
// TAttributeBag is a concrete class which can be used as a base
// to make an object type usable by Affinity Engines.
//***********************************************************
class TAttributeBag: public TEntity {
public:
TAttributeBag( ) { };
virtual .about.TAttributeBag( ) { };
TAttributeBag(const TAttributeBag&);
TAttributeBag& operator=(const TAttributeBag&);
virtual void SetAttributeData(TAffinityAttribute & dataToSet);
// take a TAffinityAttribute and remember it.
// If an attribute of the same type already exists, then overwrite it.
Virtual TReferenceCountedPointer<TAffinityAttribute>
GetAttributeDatum(TModuleID attributeType);
// return a pointer to attribute data or a null pointer if no such
// attribute exists.
private:
typdef map<TModuleID, TAffinityAttribute&, less<TModuleID> > TDataBag;
// TString is a C++ string class replacement.
TDataBag fDataBag;
void TAttributeBag:: SetAttributeData (TAffinityAttribute& dataToSet)
{
fDataBag[dataToSet.GetModuleID( )] = dataToSet;
}
const TAffinityAttribute& TAttributeBag::GetAttributeData(TModuleID
dataType)
{
TDataBag::const.sub.-- iterator location = fDataBag.find(dataType);
if (location == fDataBag.end( ))
return 0;
else
return (*location).second;
}
__________________________________________________________________________
Below is an example of how a TUser might be defined using a TAttributeBag.
______________________________________
class TUser: public TAttributeBag {
TUser(TString& name);
// . . .
// . . . somewhere in someone's code . . .
TString name = GenerateUserName( );
TGeographicAttribute place = GenerateGeographicData( );
TDemographicAttribute details = GeneratedDemographicProfile( );
TUser newUser(name);
newUser.SetAttributeData(place);
newUser.SetAttributeData(DETAILS);
// newUser now has attribute data. note that from a formal standpoint,
// it is perfectly acceptable for a user to have no attribute
______________________________________
data.
TAffinityCriterion The criterion classes 320 are now described. TAffinityCriterion object is a counterpart to a TAffinityAttribute object. In particular, it is engine-specific information that is used to select entities. Examples of selection criteria would be a demographic age-range. For a query-by-example over a collection of documents, a document might be a TAffinityCriterion. For a sociographic engine, a user might be a TAffinityCriterion. Note that for every TAffinityAttribute subclass, there exists a TAffinityCriterion subclass which, in essence, specifies a query over a set of affinity attributes.
______________________________________
//***********************************************************
// TAffinityCriterion is the abstract base class for all engine-
// specific selection criteria. The class defines common
// protocol for affinity criteria as well as providing
// a type-check mechanism for collecting together disparate
// criteria into a single container.
//
// The base class does not specify a protocol for storing or
// accessing criteria data.
//***********************************************************
class TAffinityCriterion {
public:
TAffinityCriterion ( );
.about. TAffinityCriterion ( );
TAffinityCriterion (const TAffinityCriterion &);
TAffinityCriterion & operator=(const TAffinityCriterion &);
TModuleID GetModuleID ( );
// TModuleID is an identifier which is unique to a given
// Affinity Engine Module. The details of the implementation
// of this class are platform specific and depend upon the
// characteristics of the runtime support provided. The value
// returned by GetModuleID will be the same for each type in
// an Affinity Engine Module (i.e., for the attribute, criterion,
// and engine objects in the module).
______________________________________
Subclassing Example The following code shows how to subclass TAffinityCriterion to create a demographic affinity criterion object.
__________________________________________________________________________
//***********************************************************
// Simple TAffinityCriterion subclass example for demographic data.
//***********************************************************
class TDemographicCriterion : public TAffinityCriterion {
public:
TDemographicCriterion ( );
.about. TDemographicCriterion ( );
TDemographicCriterion (const TDemographicCriterion &);
TDemographicCriterion & operator=(const TDemographicCriterion &);
// Getters & Setters
TDemographicProfile::ESex GetSexCriterion( )
{return fSex;};
void GetAgeRange(unsigned short& low, unsigned short& high)
{low = fLowAge; high = fHighAge;};
void SetSexCriterion(ESexCriterion sex)
{fSex = sex;};
void SetAgeRange(unsigned short low, unsigned short high)
{fLowAge = low; fHighAge = high;};
private:
TDemographicProfile::ESex
fSex;
unsigned short fLowAge;
unsigned short fHighAge;
__________________________________________________________________________
TSelectionSpecifier TSelectionSpecifier is a base class for collecting together selection criteria that are used by Affinity Engines. TSelectionSpecifier is the counterpart to TEntity. Interface Definition
______________________________________
//***********************************************************
// TSelectionSpecifier is an abstract base class which makes an
// object type useable as a supplier of affinity criteria to
// an Affinity Engine.
//***********************************************************
class TSelectionSpecifier {
public:
TSelectionSpecifier ( );
.about. TSelectSpecifier ( );
TSelectionSpecifier (const TSelectionSpecifier &);
TSelectionSpecifier & operator=(const TSelectionSpecifier &);
virtual const TReferenceCountedPointer<TAffinityCriterion>
GetCriterion(const type.sub.-- info& criterionType) = 0;
// returns a pointer to a TAffinityCriterion object of type
// specified by type.sub.-- info if such criteria information exists
// for this object. Subcalssers should override this method
// to provide attribute content to the caller. The caller
// adopts the TAffinityAttribute object returned by this method.
______________________________________
Subclassing Example Because of the parallels between TAfinityAttribute and TAffinityCriterion, it is simple to construct a TCriterionBag using the TAttributeBag as an example TAffinityEngine Now the engine classes 330 are described. TAffinityEngine is a virtual base class that defines the top level protocol for Affinity Engine use.
__________________________________________________________________________
class TAffinityEngine : public MCloneable {
public:
TAffinityEngine ( );
virtual .about.TAffinityEngine ( );
TAffinityEngine(const TAffinityEngine &);
TAffinityEngine& operator=(const TAffinityEngine&);
//*** Add, Remove, and Update methods below are used to initialize
//*** and maintain an engine's internal data storage.
virtual void AddSelectSpecifier(TSelectionSpecifier&) = 0;
// add a new selection specifier (i.e., advertisement or
// document) to the engine.
virtual void RemoveSelectionSpecifier(TSelectionSpecifier&) = 0;
// remove a selection specifier (i.e., advertisement or
// document) from the engine.
virtual void UpdateSelectionSpecifier(TSelectionSpecifier&) = 0;
// update a previous submitted selection specifier
//*** Generate, Recognize, and FIlter methods below are used to query
//*** an engine.
virtual TReferenceCountedPointer<TRelevanceList> Generate(TEntity&) = 0;
// generate a TRelevanceList for an entity.
virtual TReferenceCountedPointer<TRelevanceList>
Recognize(TEntity&, const TRelevanceList&) = 0;
// generate a TRelevanceList for an entity, but restrict the output
// to contain only items in the TRelevanceList passed into the
// method as the second argument.
virtual void Filter(TEntity&, TRelevanceList&) = 0;
// filter the input TRelevanceList through the current engine.
// filtering has the same semantic effect as doing a
// coordinatewisemultiply the input with the result returned
// by Recognize. The difference is
// that the input TRelevanceList is altered.
//*** Each engine contains a reader/writer lock to allow it to
synchronize
//*** its own operation. In one embodiment, the reader/writer lock
provided
//*** by the RogueWave class library is used on the Solaris and NT
//*** platforms.
friend class TEngineReadSynchronizer;
friend class TEngineWriteSynchronizer;
protected:
RWReadersWriterLock fEngineSynchronizer;
};
__________________________________________________________________________
TRelevanceList TRelevanceList is a concrete class returned by affinity engines. That is, affinity engines return lists of entities with non-zero relevance using a TRelevanceList. TRelevanceList is a subclass of the Standard Template Library map function. This list may be iterated by using the supplied iterators for the map. Interface Definition
______________________________________
typedef multimap<float, RWCString, greater<float> > TPrioritizedList;
typedef TStringFloatMap map<RWCString, float, less<RWCString> >;
class TRelevanceList : public TStringFloatMap {
public:
TRelevanceList ( );
virtual .about. TRelevanceList ( );
TRelevanceList (const TRelevanceList &);
TRelevanceList & operator=(const TRelevanceList &);
FuzzyAnd(const TRelevanceList& other);
// "this" is modified to contain the fuzzy AND of each
// element in "this" with its corresponding element in
// "other".
FuzzyOr(const TRelevanceList& other);
// "this" is modified to contain the fuzzy OR of each
// element in "this" with its corresponding element in
// "other".
virtual void FuzzyClosedWorldNot( );
// the value of each element of "this" is modified to contain one
// minus the element's present value. Note: elements with an
// affinity measure of one will be deleted from the list. elements
// not in the list (i.e., those whose measure is zero) will not be
// added to the list. Thus, this function is a closed-world not
// because it assumes the universe of elements is completely
// exhausted by those already on the list.
VectorAdd(const TRelevanceList& other);
// "this" is modified to contain the element-wise addition
// of each element in "this" with its corresponding element in
// "other".
VectorSubtract(const TRelevanceList& other);
// "this" is modified to contain the element-wise addition
// of each element in "this" with its corresponding element in
// "other".
virtual void Fuzzify( );
// normalize the vector so that no value is greater than 1 and
// values less than zero are removed
virtual void Normalize( );
// normalize the vector
virtual void FuzzifyThenNormalize( );
// normalize the vector
virtual void NormalizeThenFuzzify( );
// normalize the vector
virtual void CoordinatewiseMultiply(const TRelevanceList &other);
// "this" is assign the elementwise multiplication of "this" and
// "other". coordinates not present in both are eliminated.
virtual void MultiplyByScalar(float scalar);
// each element of "this" is multiplied by scalar
virtual void Intersect(const TRelevanceList &other);
// all element of "this" which are not also in "other" are removed.
virtual void Remove(const TRelevanceList &other);
// all elements of "other" are removed from "this".
virutal TReferenceCountedPointer<TPrioritizedList>
GetPriorityizedList( );
// extract a prioritized list from "this"
};
______________________________________
C. Example Search FIG. 4 illustrates an example of using a number of affinity engines to generate a list of advertisements. This example represents the details of how ad selections are made in one embodiment of the ad server 100. The ad server 100, using the ad exec program 101, sequences the running of affinity engines and the combining of evidence. The ad exec program 101 works by successively generating and pruning lists of advertisements. At each generation block in the flow chart, a list of potential ads is determined based on the user-profile information passed to the engine. For example, at block 410, block 420, and block 430, page sponsor advertisements, key word sponsor advertisements, and content stream and/or user interest advertisements, respectively, are found. The block 410 passes its generated list through the corresponding weighting block 412. The weighting block 412 adjusts the weights of advertisements found by the block 410. Similar blocks 422 and 432 exist. Note that in one embodiment, block 420 will not be executed if a sufficient number of advertisements are found in block 410 (after the weights are applied). Then the weights may be adjusted by passing the prospective advertisements through the remaining targeting engines (block 440) to handle the following targeting characteristics: Ad Schedule Demographics Browser, OS, and Hardware Platform User Impression Freshness Geographic Inventory Levels At block 450, the list of ads is returned. This list can then be used by the ad server 100 to provide the web server 160 with the appropriate number of ads. The following are the important details to note concerning this example. There is an implicit prioritization among the different ways to target ads. Specifically, page sponsorship ads take priority over keyword sponsorship ads, which take priority over content-stream and user-interest targeted ads, which in turn take priority over floating ads. Ads whose sole targeting information is based on demographics, browser information, or geographic location are treated as floating ads. If an ad is selected based on both content-stream targeting and user-interest targeting, then the evidence scores are combined in an additive manner. Thus, an ad which satisfies both targeting methods will likely have a higher score than an ad which satisfies only one. Demographics targeting is not additive. If an ad is demographically targeted and the user's demographic match scores zero, then the ad will be eliminated from the list of prospective ads. Geographic targeting is not additive. If an ad is geographically targeted and the user's geographic location scores zero, then the ad will be eliminated from the list of prospective ads. Browser information targeting is not additive. If an ad is targeted based on browser type, OS type, or hardware platform and the user's platform scores zero, then the ad will be eliminated from the list of prospective ads. Additionally, demographic targeting matches using several distinct elements (e.g., age, martial status, gender, etc.). When computing the relevance score for a demographic match, each element has a positive score or the resulting score will be zero. For example, an ad which targets married males will score zero for an unmarried male or for an unmarried person of unknown gender. Browser information targeting matches using three distinct elements, namely, browser type, OS, and domain name. When computing the relevance score for a browser information match, each element has a positive score or the resulting score will be zero. For example, an ad which targets Netscape browsers and the MacOS platform will not match a user who is running the Internet Explorer browser on MacOS. User interest targeting is done using an implicit "or" semantics. This means the user interest engine works differently from the above two engines. For example, an ad which has both "golfers" and "swimmers" selected for user interest targeting will match a person whose interest is either golfing or swimming or both. D. Conclusions An expandable system and method for efficiently selecting and providing information such as advertisements has been described using some exemplary embodiments. However, the above description is not meant to limit the scope of the invention. The invention is defined by the scope of the claims.
|
Same subclass Same class Consider this |
||||||||||
