Title: Application of an XMLbased Taxonomy to Retail Industry
1Application of an XML-based Taxonomy to Retail
Industry
- Intelligent Recommender for Supermarket Shopping
2Outline
- Introduction (by Vincent)
- Taxonomy (by Sheng)
- Promotion Rules (by Judy)
- Recommendation Rules (by Judy)
- Membership Rules (by Xianrong)
- Discount Rules (by Xianrong)
- Customer Shopping List (by Vincent)
- Total Amount for Current Purchase (by Vincent)
3Goals of the project
- Supermarket Business Recommend System
- Functionalities of Our System
- Manage memberships
- Manage promotions, special discounts
- Give the discount amount for a product
- Give a recommendation list depending on the
customer - Give the total amount of the purchased product
4Ontology Domain Analysis
5Ontology Domain Analysis
career gender age boughtProducts income hobbies ag
eofChildren totalAmount
6Ontology Domain Analysis
inSeason
foodFeature
price expiryDate degreeofPerishablity
7Ontology Domain Analysis
8Ontology Domain Analysis
9Ontology Domain Analysis
10Ontology Domain Analysis
11Ontology Domain Analysis
12Ontology Creating Classes
13Ontology Creating Properties
14Ontology Creating Individuals
15Ontology Creating Individuals
16Ontology Source Code
- Code---gtshow RDF/XML source code
17Ontology Convert to RDF
OWL Source code
RDF Files
Class relationships
J2SE JDOM
18Ontology Convert to RDF
19Knowledge Base Overview
Time
Special Events
Product Attributes
Product Promotion
Customer Attributes
Product Recommendation
Customer Membership
Final Discount
Customer Makes Decisions
Customer Preference
Customer Shopping List
Trolley Computation
20Promotion Rules
21Promotion Rules (cont.)
- rule (1)
- If there is a special event, all the products
will be set to a 50 discount. - promotion(id-gt?Product_IdProduct
discountAmount-gt 0.5Real)- special_event(special
_event_discount-gt0.5Real), - product(id-gt?Product_Id!?).
22Promotion Rules (cont.)
- rule (2)
- If a kind of food is imperishable, and it will
expire in one week, this product will be reduced
to a 10 discount. - promotion(id-gt?Product_IdProduct
discountAmount-gt0.1Real) - product(id-gt?Product
_IdFood expiryDate-gtoneweek degreeofPerishablit
y-gtnone!?), - special_event(special_event_discount-gt0Real).
- rule (3) (4)
23Promotion Rules (cont.)
- rule (5)
- If a kind of Cosmetics is imperishable, and it
will expire in one month, this product will be
reduced to a 50 discount. - promotion(id-gt?Product_IdProduct
discountAmount-gt0.5Real) - - product(id-gt?Product_IdCosmetics
expiryDate-gtonemonth degreeofPerishablity-gtnone!?
), - special_event(special_event_discount-gt0Real).
- rule (6)(7)(8)
24Promotion Rules (cont.)
- rule (9)
- When it is out of season, set womens clothes to
a 50 discount, mens to a 30 discount and kids
to a 40 discount. - promotion(id-gt?Product_IdProduct
discountAmount-gt0.5Real) - - product(id-gt?Product_Id WomenClothes
inSeason-gtfalse!?) , - special_event(special_event_discount-gt0Real).
- rule (10)(11)
25Promotion Rules (Demo)
26Recommendation Rules
27Recommendation Rules (cont.)
- member rule identify whether an element is in
a list - member(?Product_IdProduct, ?Product_IdProduct
?CustomerBoughtProducts_Tail). - member(?Product_IdProduct,?CustomerBoughtProduct
s_HeadProduct ?CustomerBoughtProducts_Tail)- n
otEqual(?Product_IdProduct,?CustomerBoughtProduct
s_HeadProduct), - member(?Product_IdProduct,? CustomerBoughtProdu
cts_Tail).
28Recommendation Rules (cont.)
- check rule check an element in a list is less
than 3 or not - check (?Customer_Ageofchildren_Head
?Customer_Ageofchildren_Tail)- lessThanOrEqual(
?Customer_Ageofchildren_HeadInteger, 3Integer). - check (?Customer_Ageofchildren_Head
?Customer_Ageofchildren_Tail )-
greaterThan(?Customer_Ageofchildren_HeadInteger,
3Integer), - check(?Customer_Ageofchildren_Tail).
29Recommendation Rules (cont.)
- rule (14)
- If a product is on sale and a customer bought
this product in his previous purchases, recommend
this product to this customer. - recommendList(customerid-gt?Customer_Id
customername-gt?Customer_Name productid-gt?Product_
IdProduct productname-gt?Product_Name
discountamount-gt?Discount_AmountReal
originalprice-gt?Original_PriceReal)- - product(id-gt?Product_IdProduct
name-gt?Product_Name price-gt?Original_PriceReal!?
), - promotion(id-gt?Product_IdProduct
discountAmount-gt?Discount_AmountReal), - customer(id-gt?Customer_Id name-gt?Customer_Name
boughtProducts-gt?CustomerBoughtProducts!?), - member(?Product_IdProduct,?CustomerBoughtProduct
s).
30Recommendation Rules (cont.)
- rule (15)
- This is a rule based on a customers hobbies. If
a customer is fond of swimming and he has never
bought a kind of swimwear clothes in his previous
purchases, recommend promoted clothes suitable
for doing such an exercise to him. - recommendList(customerid-gt?Customer_Id
customername-gt?Customer_Name productid-gt?Product_
IdProduct productname-gt?Product_Name
discountamount-gt?Discount_AmountReal
originalprice-gt?Original_PriceReal)- - product(id-gt?Product_IdSwimwear
name-gt?Product_Name price-gt?Original_PriceReal!?
), - promotion(id-gt?Product_IdProduct
discountAmount-gt?Discount_AmountReal), - customer(id-gt?Customer_Id name-gt?Customer_Name
hobbies-gtswimming boughtProducts-gt?CustomerBought
Products!?), - naf(member(?Product_IdProduct,?CustomerBoughtPro
ducts)). - rule (16)Carrer rule(17)AgeofChildren
31Recommendation Rules (cont.)
- rule (19)
- If a customer is an office white-collar and a
woman, recommend lady suits and lady dresses to
her, no matter whether she bought such clothes in
her previous purchases or whether such clothes
are on sale. - recommendList(customerid-gt?Customer_Id
customername-gt?Customer_Name productid-gt?Product_
IdProduct productname-gt?Product_Name
discountamount-gt0Real originalprice-gt?Original_P
riceReal)- - product(id-gt?Product_IdWomenDress
name-gt?Product_Name price-gt?Original_PriceReal!?
), - naf(promotion(id-gt?Product_IdProduct!?)),
- customer(id-gt?Customer_Id name-gt?Customer_Name
career-gtofficeWhiteCollar gender-gtfemale!?). - rule (18)hobbies rule(20)AgeofChildren
32Recommendation Rules Demo
33Membership Rules
Three Star Member
Total Amount 2000 CAD
Two Star Member
Total Amount 1000 CAD
One Star Member
34Membership Rules Rule (12)
- membership(id-gt?Customer_Id membershiplevel-gttwoS
tarMember)- - customer(id-gt?Customer_Id membership-gtoneStarMemb
er totalAmount-gt?Customer_TotalAmountReal!?), - greaterThanOrEqual(?Customer_TotalAmount,
1000Real).
35Membership Rules Rule (13)
- membership(id-gt?Customer_Id membershiplevel-gtthre
eStarMember)- - customer(id-gt?Customer_Id membership-gttwoStarMemb
er totalAmount-gt?Customer_TotalAmountReal!?), - greaterThanOrEqual(?Customer_TotalAmount,
2000Real).
36Final Discount Rules Structural Overview
Final discount
Product based discount
Membership based discount
37Final Discount Rules Formula
-
-
- 1-(1-p)(1-m)
- 1-(1-p-mpm)
- 1-1pm-pm
- pm-pm
Product based Discount
Membership Based Discount
38Final Discount Rules Three Steps
- pm? m-pm? pm-pm
- multiply (?YReal, ?pReal, mReal),
- subtract (?XReal, mReal, ?YReal),
- add(?Final_DiscountReal, ?pReal, ?XReal).
39Final Discount Rules Rule (21)
- discount(customerid-gt?Customer_Id
customername-gt?Customer_Name productid-gt?Product_
IdProduct - productname-gt?Product_Name originalprice-gt?Origin
al_PriceReal - discountamount-gt?Final_Discount_AmountReal)-
- customer(id-gt?Member_Id membership-gtoneStarMember
!?), - recommendList(customerid-gt?Customer_Id
customername-gt?Customer_Name productid-gt?Product_
IdProduct productname-gt?Product_Name
originalprice-gt?Original_PriceReal
discountamount-gt?Discount_AmountReal), - equal(?Member_Id, ?Customer_Id ),
- Membership
based discount for one stars member is 0.1 - multiply (?YReal, ?Discount_AmountReal,
0.1Real), - subtract (?XReal, 0.1Real, ?YReal),
- add(? Final_Discount_AmountReal,
?Discount_AmountReal, ?XReal).
40Final Discount Rules Rule (22)
- discount(customerid-gt?Customer_Id
customername-gt?Customer_Name productid-gt?Product_
Id Product - productname-gt?Product_Name originalprice-gt?Origin
al_PriceReal - discountamount-gt?Final_Discount_AmountReal)-
- customer(id-gt?Member_Id membership-gttwoStarMember
!?), - recommendList(customerid-gt?Customer_Id
customername-gt?Customer_Name productid-gt?Product_
IdProduct - productname-gt?Product_Name originalprice-gt?Origin
al_PriceReal discountamount-gt?Discount_AmountRe
al), - Membership
based discount for two stars member is 0.2 - equal(?Member_Id, ?Customer_Id ),
- multiply (?YReal, ?Discount_AmountReal,
0.2Real), - subtract (?XReal, 0.2Real, ?YReal),
- add(?Final_Discount_AmountReal,
?Discount_AmountReal, ?XReal).
41Final Discount Rules Rule (23)
- discount(customerid-gt?Customer_Id
customername-gt?Customer_Name productid-gt?Product_
Id Product - productname-gt?Product_Name originalprice-gt?Origin
al_PriceReal - discountamount-gt? Final_Discount_AmountReal)-
- customer(id-gt?Member_Id membership-gtthreeStarMemb
er!?), - recommendList(customerid-gt?Customer_Id
customername-gt?Customer_Name productid-gt?Product_
IdProduct - productname-gt?Product_Name originalprice-gt?Origin
al_PriceReal discountamount-gt?Discount_AmountRe
al), - equal(?Member_Id, ?Customer_Id ),
- Membership
based discount for three stars member is 0.4 - multiply (?YReal, ?Discount_AmountReal,
0.4Real), - subtract (?XReal, 0.4Real, ?YReal),
- add(?Final_Discount_AmountReal,
?Discount_AmountReal, ?XReal).
42Final Discount Rules Demo