CN111461804A - Method and device for recommending size - Google Patents

Method and device for recommending size Download PDF

Info

Publication number
CN111461804A
CN111461804A CN201910048483.5A CN201910048483A CN111461804A CN 111461804 A CN111461804 A CN 111461804A CN 201910048483 A CN201910048483 A CN 201910048483A CN 111461804 A CN111461804 A CN 111461804A
Authority
CN
China
Prior art keywords
target user
size
target
user
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910048483.5A
Other languages
Chinese (zh)
Inventor
陆韬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910048483.5A priority Critical patent/CN111461804A/en
Publication of CN111461804A publication Critical patent/CN111461804A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The invention discloses a method and a device for recommending sizes, and relates to the technical field of computers. One embodiment of the method comprises: generating target user vectors according to the purchase records of the target users, and generating non-target user vectors according to the purchase records of the non-target users; according to the non-target user vectors, the target user vectors and the similarity calculation method, calculating the similarity between the non-target users and the target user, and accordingly screening out similar users of the target user from the non-target users; and recommending the size of the target product to the target user according to the similar user. The method and the device expand the application range of size recommendation, improve the recommendation accuracy, and save time and labor.

Description

Method and device for recommending size
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for recommending sizes.
Background
As e-commerce progresses, more and more people buy products on websites or applications, and the size of the product to be bought is determined either by the size commonly used by the user, measured using various tools, or by using augmented reality techniques.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
firstly, because the sizes of products of different brands have difference, the accuracy is not high by adopting the size commonly used by users; secondly, the mode of adopting the augmented reality technology needs to be photographed, so that the method is only suitable for recommending the size of shoes and is not suitable for recommending the size of clothes; thirdly, by adopting the measuring mode, the measuring method may not be accurate to find the measuring tool and measure, so that the problems of time and labor consumption and low accuracy exist.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for recommending a size, which can expand an application range of size recommendation, improve recommendation accuracy, and save time and labor.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of recommending a size.
The method for recommending the size comprises the following steps:
generating target user vectors according to the purchase records of the target users, and generating non-target user vectors according to the purchase records of the non-target users;
according to the non-target user vectors, the target user vectors and the similarity calculation method, calculating the similarity between the non-target users and the target user, and accordingly screening out similar users of the target user from the non-target users;
and recommending the size of the target product to the target user according to the similar user.
In one embodiment, generating a target user vector from the purchase records of the target user and generating each non-target user vector from the purchase records of each non-target user comprises:
acquiring the size of the purchased article of the target user from the purchase record of the target user, and generating a target user vector according to a first preset rule;
and acquiring the size of purchased articles of each non-target user except the target product from the purchase record of each non-target user, and generating each non-target user vector according to the first preset rule.
In one embodiment, the calculating the similarity between each non-target user and the target user according to each non-target user vector, the target user vector and the similarity calculation method, so as to screen out similar users of the target user from the non-target users, includes:
substituting the target user vector and each non-target user vector into a cosine similarity formula for calculation to obtain a cosine similarity value of each non-target user;
and selecting the cosine similarity value with the maximum value from the cosine similarity values, and taking the non-target user corresponding to the cosine similarity value with the maximum value as the similar user of the target user.
In one embodiment, recommending the target product to the target user according to the size of the target product recommended by the similar user comprises:
judging whether the similarity of the similar users is smaller than a preset value;
if so, recommending the size of the target product to the target user according to a pre-established corresponding relation between the brand and the size of the brand, the brand of the target product and the purchase record of the target user;
if not, recommending the size of the target product to the target user according to the size of the purchased article of the similar user, the size of the purchased article of the target user and the cosine similarity formula.
In one embodiment, recommending the size of the target product to the target user according to the size of the purchased products of the similar users, the size of the purchased products of the target user and the cosine similarity formula comprises:
generating a reference vector according to a second preset rule based on the size of the purchased article of the similar user, wherein the first preset rule and the rule corresponding to the target product form the second preset rule;
generating a reference vector according to the second preset rule based on the size of the target product of the target user and the size of the purchased article of the target user;
substituting the reference vector and the reference vector into the cosine similarity formula, making the size of the target product of the target user be an unknown number, making the cosine similarity value in the cosine similarity formula be 1, solving the size, and taking the solved size as the size of the target product recommended to the target user.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided an apparatus for recommending a size.
The device for recommending the size comprises the following components:
the generating unit is used for generating target user vectors according to the purchase records of the target users and generating non-target user vectors according to the purchase records of the non-target users;
the processing unit is used for calculating the similarity between each non-target user and the target user according to each non-target user vector, the target user vector and a similarity calculation method, so that similar users of the target user are screened out from the non-target users;
and the recommending unit is used for recommending the size of the target product to the target user according to the similar user.
In one embodiment, the generating unit is specifically configured to:
acquiring the size of the purchased article of the target user from the purchase record of the target user, and generating a target user vector according to a first preset rule;
and acquiring the size of purchased articles of each non-target user except the target product from the purchase record of each non-target user, and generating each non-target user vector according to the first preset rule.
In one embodiment, the processing unit is specifically configured to:
substituting the target user vector and each non-target user vector into a cosine similarity formula for calculation to obtain a cosine similarity value of each non-target user;
and selecting the cosine similarity value with the maximum value from the cosine similarity values, and taking the non-target user corresponding to the cosine similarity value with the maximum value as the similar user of the target user.
In one embodiment, the recommending unit is specifically configured to:
judging whether the similarity of the similar users is smaller than a preset value;
if so, recommending the size of the target product to the target user according to a pre-established corresponding relation between the brand and the size of the brand, the brand of the target product and the purchase record of the target user;
if not, recommending the size of the target product to the target user according to the size of the purchased article of the similar user, the size of the purchased article of the target user and the cosine similarity formula.
In an embodiment, the recommending unit is further specifically configured to:
generating a reference vector according to a second preset rule based on the size of the purchased article of the similar user, wherein the first preset rule and the rule corresponding to the target product form the second preset rule;
generating a reference vector according to the second preset rule based on the size of the target product of the target user and the size of the purchased article of the target user;
substituting the reference vector and the reference vector into the cosine similarity formula, making the size of the target product of the target user be an unknown number, making the cosine similarity value in the cosine similarity formula be 1, solving the size, and taking the solved size as the size of the target product recommended to the target user.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the method for recommending the size, provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has a computer program stored thereon, and the computer program, when executed by a processor, implements the method for recommending a size provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: generating a target user vector through the purchase record of the target user, generating a non-target user vector through the purchase record of the non-target user, selecting a similar user of the target user from the non-target user by using a vector and similarity calculation method, finding the similar user of the target user in a big data analysis mode, recommending the size by using the similar user, and having higher accuracy, thereby reducing the goods return rate and the purchase cost and improving the user experience; the size recommendation method is not only suitable for recommending the size of the shoes, but also suitable for recommending the size of the clothes, and the application range of the size recommendation is expanded; the user does not need to carry out operations such as measurement, so that the time-saving and labor-saving effects are realized, and the problem of inaccurate size recommendation caused by inaccurate measurement method is avoided.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a main flow of a method of recommending sizes according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an application scenario of a method of recommending size according to an embodiment of the present invention;
FIG. 3 is an example of calculating cosine similarity values in a method of recommending a size according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a main flow of a method of recommending size according to another embodiment of the present invention;
FIG. 5 is a schematic diagram of another application scenario of a method of recommending size according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of the main units of a device for recommending sizes according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
With the development of e-commerce, more and more people buy products on websites or applications, the products can be shoes or clothes, the products have particularity, each user has own size, and how to buy products with the size suitable for the user on the websites or applications is a difficult problem. Statistically, the return of goods from shopping on a website or application is generated in half because of improper size, thereby incurring high time and money costs to the seller and user.
The existing method of recommending the size is to take a picture of the foot of the user, identify the size of the foot of the user from the picture by an augmented reality technology, and recommend the size of the shoe according to the size of the foot of the user, which is not suitable for recommending the size of the clothes (which is not suitable for recommending the size of the clothes because the picture of the user wearing the clothes is to be taken, and the recommended size of the clothes is not accurate due to the clothes, and it is not practical to take a picture of the user not wearing the clothes), and the augmented reality technology depends on the picture to recommend the size of the foot of the user.
In the conventional size recommending mode, a user purchases products according to the sizes frequently purchased by the user, and the sizes of products of different brands have difference, so that the accuracy of recommending the sizes in the mode is not high.
The third existing method for recommending the size is that the user measures the body data (e.g. clothes length, shoulder width, etc.) of the user, and recommends the purchased size according to the measured body data. Because the user does not know the measuring method very much, the measuring accuracy is not high, the accuracy of the recommended size is not high, and the size can be determined only by finding the measuring tool and using the measuring tool for measurement, which causes the problem that the recommended size is time-consuming and labor-consuming.
In summary, the prior art method of recommending size has the following problems: the application range is narrow, the recommendation result is inaccurate, time and labor are consumed, and the problems of high goods return and exchange rate, high purchase cost and poor user experience are further caused.
In order to solve the problems in the prior art, an embodiment of the present invention provides a method for recommending a size, which may be performed by a server, as shown in fig. 1, and the method includes:
and S101, generating target user vectors according to the purchase records of the target users, and generating non-target user vectors according to the purchase records of the non-target users.
In this step, it should be noted that the target user is a user who wants to purchase the target product but does not know which size of the target product to purchase, and users other than the target user are non-target users. The target product may be a jacket, pants, shoes, or the like.
In specific implementation, the size of the purchased article of the target user can be obtained according to the purchase record of the target user, and a target user vector is generated according to a first preset rule; and acquiring the sizes of purchased articles of the non-target users except the target products according to the purchase records of the non-target users, and generating a non-target user vector according to a first preset rule. In addition, a relationship table of user and SKU (SKU is the unique code of the product) as shown in fig. 2 can be created according to the purchase record of the target user and the purchase record of the non-target user, and the target user vector and the non-target user vector can be generated more conveniently by using the relationship table of user and SKU.
Step S102, calculating the similarity between each non-target user and the target user according to each non-target user vector, the target user vector and a similarity calculation method, and accordingly screening out similar users of the target user from the non-target users.
In this step, during specific implementation, the cosine similarity value of each non-target user may be calculated according to each non-target user vector, the target user vector, and a cosine similarity formula, where the cosine similarity value may represent the similarity between the non-target user and the target user, and the cosine similarity value with the largest value is selected from the cosine similarity values, and the corresponding non-target user is used as the similar user of the target user.
It should be understood that the similarity between the non-target user and the target user may be calculated by using a cosine similarity formula provided in the embodiment of the present invention, and those skilled in the art may flexibly calculate the similarity between the non-target user and the target user without affecting the embodiment of the present invention, for example, the similarity between the non-target user and the target user may be calculated by using Euclidean Distance (Euclidean Distance), Manhattan Distance (Manhattan Distance), minkowski Distance (minkowski Distance), or Pearson correlation coefficient (pearcorrelation correlation) and the like.
And S103, recommending the size of the target product to the target user according to the similar user.
In the step, during specific implementation, the cosine similarity value of the similar user is smaller than a preset value, and the size of the target product can be recommended to the target user by adopting the corresponding relation between the brand and the size of the brand, the brand of the target product and the purchase record of the target user; the cosine similarity value of the similar user is larger than or equal to a preset value, and the size of the target product can be recommended to the target user by adopting the size of the purchased product of the similar user, the size of the purchased product of the target user and a cosine similarity formula.
In the embodiment, the target user vector is generated through the target user purchase record, the non-target user purchase record is generated into the non-target user vector, the similar users of the target user are selected from the non-target user by utilizing a vector and similarity calculation method, so that the similar users of the target user are found in a big data analysis mode, the size is recommended by utilizing the similar users, the accuracy is higher, the goods return rate and the purchase cost are reduced, and the user experience degree is improved; the size recommendation method is not only suitable for recommending the size of the shoes, but also suitable for recommending the size of the clothes, and the application range of the size recommendation is expanded; the user does not need to carry out operations such as measurement, so that the time-saving and labor-saving effects are realized, and the problem of inaccurate size recommendation caused by inaccurate measurement method is avoided.
In the embodiment of the present invention, step S101 may include:
and acquiring the size of the purchased article of the target user from the purchase record of the target user, and generating a target user vector according to a first preset rule.
And acquiring the size of purchased articles of each non-target user except the target product from the purchase record of each non-target user, and generating each non-target user vector according to the first preset rule.
In this embodiment, the range of the purchase record of the target user and the purchase record of the non-target user may be artificially defined, for example, the target product may be a shirt, the range of the purchase record of the target user and the purchase record of the non-target user may be a jacket, and the purchase record may be obtained from a database storing the purchase records.
In specific implementation, the sizes of purchased articles of the target user can be arranged according to a preset sequence of the first product codes to generate a target user vector; correspondingly, according to the sequence of the first product codes, the sizes of purchased products of non-target users except the target products are arranged to generate a non-target user vector; the size of the product code corresponding to the product that is not purchased can be set to 0, or any value. In addition, the order of the first product code and the order of the target product constitute the order of the second product code.
In the embodiment, the target user vector is generated according to the first preset rule by the size of the purchased article of the target user, and the non-target user vector is generated according to the first preset rule by the size of the purchased article of the non-target user except the target product, so that the similar user of the target user is selected from the non-target user according to the similarity of the vectors, the similar user is found in a big data analysis mode, the size is recommended by the similar user, the accuracy is further improved, the return rate and the purchase cost are reduced, and the user experience is improved; the size recommendation method is not only suitable for recommending the size of the shoes, but also suitable for recommending the size of the clothes, and the application range of the size recommendation is expanded; the user does not need to carry out operations such as measurement, so that the time-saving and labor-saving effects are realized, and the problem of inaccurate size recommendation caused by inaccurate measurement method is avoided.
In this embodiment of the present invention, step S102 may include:
and substituting the target user vector and each non-target user vector into a cosine similarity formula for calculation to obtain a cosine similarity value of each non-target user.
And selecting the cosine similarity value with the maximum value from the cosine similarity values, and taking the non-target user corresponding to the cosine similarity value with the maximum value as the similar user of the target user.
In this embodiment, the target user vector and the non-target user vector are substituted into the cosine similarity formula for calculation, so as to calculate the cosine similarity value of the non-target user, wherein the cosine similarity value of the non-target user represents the similarity between the target user vector and the non-target user vector. For example, as shown in fig. 3, it is assumed that the target user vector is a and the non-target user vector is b, and if an included angle θ between a and b is smaller, the similarity between a and b is higher, and the similarity between a and b is higher; if the included angle theta between a and b is larger, the similarity between a and b is lower, and the similarity between a and b is lower.
The cosine similarity formula is as follows:
cosθ=a*b/|a|*|b|
where a represents a target user vector, b represents a non-target user vector, | a | represents a modulus of the target user vector, | b | represents a modulus of the non-target user vector.
In the embodiment, the cosine similarity value of each non-target user is calculated according to the target user vector, the non-target user vector and the cosine similarity formula, and the cosine similarity value of each non-target user represents the similarity degree of the non-target user vector and the target user vector, so that the similar user most similar to the target user can be selected from the non-target users according to the cosine similarity value with the largest value, and when the similar user is used for recommending the size, the accuracy is further improved, the return rate and the purchase cost are reduced, and the user experience degree is improved; the size recommendation method is not only suitable for recommending the size of the shoes, but also suitable for recommending the size of the clothes, and the application range of the size recommendation is expanded; the user does not need to carry out operations such as measurement, so that the time-saving and labor-saving effects are realized, and the problem of inaccurate size recommendation caused by inaccurate measurement method is avoided.
To solve the problems of the prior art, another embodiment of the present invention provides a method for recommending a size, which may be performed by a server, as shown in fig. 4, and includes:
step S401, generating target user vectors according to the purchase records of the target users, and generating non-target user vectors according to the purchase records of the non-target users.
It should be appreciated that the embodiments of the present invention recommend the size of the target product of the user based on the purchase record of the user, and thus, are not suitable for the user who does not have the purchase record.
Step S402, calculating the similarity between each non-target user and the target user according to each non-target user vector, the target user vector and the similarity calculation method, thereby screening out the similar users of the target user from the non-target users.
And S403, judging whether the similarity of the similar users is smaller than a preset value.
In this step, during implementation, it may be determined whether the cosine similarity value of the similar user is smaller than a preset value. The significance of judging the size relationship between the cosine similarity values of the similar users and the preset value is that when the cosine similarity values of the similar users are determined to be smaller than the preset value, the size of the target product is recommended to the target user without adopting a cosine similarity formula, so that the recommended size is not necessarily suitable for the target user if the size is recommended by adopting the cosine similarity formula, and thus, the stability of accurately recommended size is ensured. In addition, the preset value can be set to 0.8, or fine adjustment can be performed according to a purchase record formed by the recommended sizes of the target products, for example, if most of the recommended sizes are not suitable for the target users, the preset value is adjusted to 0.88; alternatively, if most of the recommended sizes are suitable for the target user, the preset value is adjusted to 0.78.
It should be noted that, it is determined whether the similarity of the similar users is smaller than a preset value, if so, step S404 is executed, and if not, step S405 is executed.
And S404, recommending the size of the target product to the target user according to the pre-established corresponding relation between the brand and the size of the brand, the brand of the target product and the purchase record of the target user.
In this step, when the user purchases different brands of the same product, the sizes of the same product have certain relationship, for example, the size of a shirt of brand A purchased by the user is M, but the size of a shirt of brand B purchased by the user must be L.
The method for establishing the size corresponding relationship between the brand and the brand can comprise the following steps: for the same product (the same product refers to a product with only different brands and sizes), selecting a reference brand from all brands of the same product (the selection method can be random selection, or can be the brand with the highest sales volume as the reference brand); for each brand except the reference brand, acquiring the quantity of all sizes of the brand purchased by a user purchasing the preset sizes of the reference brand, selecting the size with the largest quantity from the quantity of all sizes, and determining the size corresponding relation between the brand and the base station brand according to the difference value between the size with the largest quantity and the preset sizes. It should be noted that the preset size can be specifically set according to the requirement.
This step is illustrated below with a specific example: pre-establishing a corresponding relationship between the brands and the sizes of the brands as shown in FIG. 5; if the cosine similarity value of the similar user is smaller than a preset value, inquiring a product I with the same brand and different brand from the purchase record of the target user, wherein the size of the product I is 3, and the brand is l; inquiring the brand of the target product which is one code larger than the brand l from the corresponding relation of the brand and the size of the brand according to the brand and the brand l of the target product; the size of the target product recommended to the target user is size 3 plus one.
It should be understood that the more the types of brands in the size correspondence between the brands and the brands, the greater the chance of recommending the size of the target product to the target user, which is because the target user can recommend the size of the target product to the target user according to the size correspondence between the brands and the brands as long as the target user purchases one of the brands related in the size correspondence between the brands and the brands.
Step S405, recommending the size of the target product to the target user according to the size of the purchased article of the similar user, the size of the purchased article of the target user and the cosine similarity formula.
In this step, when implemented, the method may include: generating a reference vector according to a second preset rule based on the size of the purchased article of the similar user, wherein the first preset rule and the rule corresponding to the target product form the second preset rule; generating a reference vector according to the second preset rule based on the size of the target product of the target user and the size of the purchased article of the target user; substituting the reference vector and the reference vector into the cosine similarity formula, making the size of the target product of the target user be an unknown number, making the cosine similarity value in the cosine similarity formula be 1, solving the size, and taking the solved size as the size of the target product recommended to the target user. In this way, a reference vector is generated according to a second preset rule by the size of the purchased article of the similar user, a reference vector is generated according to the second preset rule by the size of the purchased article of the target user and the size of the target product of the target user, and the size is recommended in a way that the reference vector is the same as the reference vector, so that the size recommendation accuracy is further improved, the return and exchange rate and the purchase cost are reduced, and the user experience is improved; the size recommendation method is not only suitable for recommending the size of the shoes, but also suitable for recommending the size of the clothes, and the application range of the size recommendation is expanded; the user does not need to carry out operations such as measurement, so that the time-saving and labor-saving effects are realized, and the problem of inaccurate size recommendation caused by inaccurate measurement method is avoided.
In addition, in specific implementation, the sizes of the purchased products of similar users can be arranged according to a preset second product code sequence to generate a reference vector; correspondingly, the size of the target product of the target user and the size of the purchased article of the target user are arranged according to the sequence of the second product codes, and a reference vector is generated; wherein the order of the first product code and the order of the target product code constitute the order of the second product code.
It should be noted that the purchased products of similar users include target products, and reference vectors are generated according to the target products, and the size of the target products can be recommended to the target users by using the reference vectors. If the purchased articles of the similar users do not comprise the target product, the size of the target product cannot be recommended to the target user. In addition, when there are a plurality of similar users, one may be optionally selected to recommend the size of the target product to the target user, but the similar users are necessarily similar users who have purchased the target product.
In this embodiment, if the similarity of the similar users is not less than the preset value, the size is recommended by using a cosine similarity formula, so that the similarity between the similar users and the target user is not lower than the preset degree, and the stability of size recommendation is ensured.
In order to solve the problems in the prior art, a method for recommending size according to another embodiment of the present invention is described below with reference to fig. 2 by a specific example, where the method is executed by a server, and the method includes:
acquiring purchase records of all users (in the embodiment, all users refer to user 1, user 2, user 3, user 2 is a target user, a target product is product 4, a product code of product 4 is SKU4, and user 1 and user 3 are non-target users), and filling a pre-established relationship table between users and SKUs according to the purchase records of each user, wherein fig. 2 is the filled relationship table between users and SKUs.
In this step, each row in the user-to-SKU relationship table characterizes a user and each column characterizes a SKU. It should be understood that if the same user purchases two sizes of the same product, the same user may be characterized by two lines, with the two sizes filling the two lines separately.
The filling method is described below with reference to fig. 2 as a specific example: one purchase record for USER-1 is that USER-1 purchases product 1 (product 1 is coded as SKU1) size is 20, thus, 20 is filled into the cell with row number USER-1 and column number SKU 1. In addition, the size of the relationship table to fill in the user and SKU must be the size of the order that the user finally purchased, and should fill in if an order change occurs. If the shoes are shoes, the number of codes of the shoes can be directly filled in, and if the clothes are clothes, the clothes can be mapped into corresponding numbers of codes, for example: s-1; m-2; l-3. And according to the relation table of the user and the SKU, a target user vector and a non-target user vector can be generated more conveniently.
The size of the purchased item of user 1 is obtained from the purchase record of user 1: product 1 (product code SKU1) size 20, product 2 (product code SKU2) not purchased, product 3 (product code SKU3) size 20, and product 4 (product code SKU4) size 20. The 20, 0 and 20 are generated into the user 1 vector (20020) in the order of SKU1, SKU2 and SKU3 (i.e. the first preset rule).
The size of the purchased item of the user 3 is acquired from the purchase record of the user 3: product 1 was not purchased, product 2 was not purchased, product 3 was sized 20, and product 4 was not purchased. A user 3 vector is generated with 0, and 20 in the order of SKU1, SKU2, and SKU3 (0020).
The size of the purchased item of user 2 is obtained from the purchase record of user 2: product 1 is size 20, product 2 is not purchased, and product 3 is size 20. The user 2 vector is generated with 20, 0 and 20 in the order of SKU1, SKU2 and SKU3 (20020).
The cosine similarity value of user 1 ═ (20020) × (20020)/| 20020 | 20020 | ═ 1.
The cosine similarity value of the user 3 ═ 0.7 (0020) × (20020)/| 0020 | 20020 |.
The cosine similarity value of user 1 is 1, and the cosine similarity value of user 3 is 0.7, and it is obvious that the cosine similarity value of user 1 is 1, which is the largest cosine similarity value, and thus user 1 is a similar user to user 2.
The preset value is 0.8, so the cosine similarity value of the similar users is larger than the preset value.
Reference vectors (2002020) are generated in the order of SKU1, SKU2, SKU3, and SKU4 (i.e., a second preset rule) based on the size of purchased items (20, 0, 20, and 20) of user 1.
A base vector (20020X) is generated in the order of SKU1, SKU2, SKU3, and SKU4 based on size X of user 2's product 4 and size of user 2's purchased items (20, 0, and 20).
Substituting the reference vector and the reference vector into a cosine similarity formula, enabling the size of a product 4 of the user 2 to be X, enabling a cosine similarity value in the cosine similarity formula to be 1, solving that the size of the product 4 of the user 2 is 20, wherein the solving process comprises the following steps: 1 ═ 2002020 ═ 20020X/| | 2002020 | | | 20020X |, X ═ 20, and 20 is taken as the size of the product 4 recommended to the user 2.
It should be understood that if the user's purchase record is formed according to the size of the target product of the recommended target user, the corresponding relationship between the brand and the size of the brand and the relationship table between the user and the SKU are updated according to the purchase record.
The process of recommending size is described in detail above with reference to fig. 1-5, and the apparatus for recommending size is described below with reference to fig. 6.
In order to solve the problems in the prior art, an embodiment of the present invention provides an apparatus for recommending a size, the apparatus being executable by a server, as shown in fig. 6, and the apparatus including:
the generating unit 601 is configured to generate a target user vector according to the purchase record of the target user, and generate each non-target user vector according to the purchase record of each non-target user.
A processing unit 602, configured to calculate, according to each non-target user vector, the target user vector, and a similarity calculation method, a similarity between each non-target user and the target user, so as to screen out a similar user of the target user from the non-target users.
And the recommending unit 603 is configured to recommend the size of the target product to the target user according to the similar user.
In this embodiment of the present invention, the generating unit 601 is specifically configured to:
and acquiring the size of the purchased article of the target user from the purchase record of the target user, and generating a target user vector according to a first preset rule.
And acquiring the size of purchased articles of each non-target user except the target product from the purchase record of each non-target user, and generating each non-target user vector according to the first preset rule.
In this embodiment of the present invention, the processing unit 602 is specifically configured to:
and substituting the target user vector and each non-target user vector into a cosine similarity formula for calculation to obtain a cosine similarity value of each non-target user.
And selecting the cosine similarity value with the maximum value from the cosine similarity values, and taking the non-target user corresponding to the cosine similarity value with the maximum value as the similar user of the target user.
It should be understood that the manner of implementing the embodiment of the present invention is the same as that of implementing the embodiment shown in fig. 1, and is not described herein again.
To solve the problems of the prior art, another embodiment of the present invention provides an apparatus for recommending a size, the apparatus being executable by a server, the apparatus comprising:
and the generating unit is used for generating target user vectors according to the purchase records of the target users and generating non-target user vectors according to the purchase records of the non-target users.
And the processing unit is used for calculating the similarity between each non-target user and the target user according to each non-target user vector, the target user vector and the similarity calculation method, so as to screen out the similar users of the target user from the non-target users.
The recommending unit is used for judging whether the similarity of the similar users is smaller than a preset value; if so, recommending the size of the target product to the target user according to a pre-established corresponding relation between the brand and the size of the brand, the brand of the target product and the purchase record of the target user; if not, recommending the size of the target product to the target user according to the size of the purchased article of the similar user, the size of the purchased article of the target user and the cosine similarity formula.
In this embodiment of the present invention, in specific implementation, recommending a size of a target product to the target user according to the size of the purchased product of the similar user, the size of the purchased product of the target user, and the cosine similarity formula includes: generating a reference vector according to a second preset rule based on the size of the purchased article of the similar user, wherein the first preset rule and the rule corresponding to the target product form the second preset rule; generating a reference vector according to the second preset rule based on the size of the target product of the target user and the size of the purchased article of the target user; substituting the reference vector and the reference vector into the cosine similarity formula, making the size of the target product of the target user be an unknown number, making the cosine similarity value in the cosine similarity formula be 1, solving the size, and taking the solved size as the size of the target product recommended to the target user.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 4, and the description thereof is omitted.
Fig. 7 illustrates an exemplary system architecture 700 to which the method of recommending size or the apparatus for recommending size of the embodiments of the present invention can be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 701, 702, 703. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for recommending size provided by the embodiment of the present invention is generally executed by the server 705, and accordingly, the apparatus for recommending size is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
To the I/O interface 805, AN input section 806 including a keyboard, a mouse, and the like, AN output section 807 including a network interface card such as a Cathode Ray Tube (CRT), a liquid crystal display (L CD), and the like, a speaker, and the like, a storage section 808 including a hard disk, and the like, and a communication section 809 including a network interface card such as a L AN card, a modem, and the like are connected, the communication section 809 performs communication processing via a network such as the internet, a drive 810 is also connected to the I/O interface 805 as necessary, a removable medium 811 such as a magnetic disk, AN optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted into the storage section 808 as.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a generation unit, a processing unit, and a recommendation unit. The name of these units does not form a limitation to the unit itself in some cases, for example, the generating unit may also be described as "a unit that generates a target user vector from a purchase record of a target user and generates each non-target user vector from a purchase record of each non-target user".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: generating target user vectors according to the purchase records of the target users, and generating non-target user vectors according to the purchase records of the non-target users; according to the non-target user vectors, the target user vectors and the similarity calculation method, calculating the similarity between the non-target users and the target user, and accordingly screening out similar users of the target user from the non-target users; and recommending the size of the target product to the target user according to the similar user.
According to the technical scheme of the embodiment of the invention, the target user vector is generated through the purchase record of the target user, the non-target user vector is generated through the purchase record of the non-target user, the similar user of the target user is selected from the non-target user by utilizing a vector and similarity calculation method, so that the similar user of the target user is found in a big data analysis mode, the size is recommended by utilizing the similar user, the accuracy is higher, the goods return rate and the purchase cost are reduced, and the user experience is improved; the size recommendation method is not only suitable for recommending the size of the shoes, but also suitable for recommending the size of the clothes, and the application range of the size recommendation is expanded; the user does not need to carry out operations such as measurement, so that the time-saving and labor-saving effects are realized, and the problem of inaccurate size recommendation caused by inaccurate measurement method is avoided.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method of recommending sizes, comprising:
generating target user vectors according to the purchase records of the target users, and generating non-target user vectors according to the purchase records of the non-target users;
according to the non-target user vectors, the target user vectors and the similarity calculation method, calculating the similarity between the non-target users and the target user, and accordingly screening out similar users of the target user from the non-target users;
and recommending the size of the target product to the target user according to the similar user.
2. The method of claim 1, wherein generating a target user vector based on the purchase records of the target user and generating each non-target user vector based on the purchase records of each non-target user comprises:
acquiring the size of the purchased article of the target user from the purchase record of the target user, and generating a target user vector according to a first preset rule;
and acquiring the size of purchased articles of each non-target user except the target product from the purchase record of each non-target user, and generating each non-target user vector according to the first preset rule.
3. The method of claim 2, wherein the step of calculating the similarity between each non-target user and the target user according to each non-target user vector, the target user vector and the similarity calculation method, so as to screen out similar users of the target user from the non-target users comprises:
substituting the target user vector and each non-target user vector into a cosine similarity formula for calculation to obtain a cosine similarity value of each non-target user;
and selecting the cosine similarity value with the maximum value from the cosine similarity values, and taking the non-target user corresponding to the cosine similarity value with the maximum value as the similar user of the target user.
4. The method of claim 3, wherein recommending the target product to the target user according to the size of the target product recommended by the similar user comprises:
judging whether the similarity of the similar users is smaller than a preset value;
if so, recommending the size of the target product to the target user according to a pre-established corresponding relation between the brand and the size of the brand, the brand of the target product and the purchase record of the target user;
if not, recommending the size of the target product to the target user according to the size of the purchased article of the similar user, the size of the purchased article of the target user and the cosine similarity formula.
5. The method according to claim 4, wherein recommending the size of the target product to the target user according to the size of the purchased items of the similar user, the size of the purchased items of the target user, and the cosine similarity formula comprises:
generating a reference vector according to a second preset rule based on the size of the purchased article of the similar user, wherein the first preset rule and the rule corresponding to the target product form the second preset rule;
generating a reference vector according to the second preset rule based on the size of the target product of the target user and the size of the purchased article of the target user;
substituting the reference vector and the reference vector into the cosine similarity formula, making the size of the target product of the target user be an unknown number, making the cosine similarity value in the cosine similarity formula be 1, solving the size, and taking the solved size as the size of the target product recommended to the target user.
6. An apparatus for recommending sizes, comprising:
the generating unit is used for generating target user vectors according to the purchase records of the target users and generating non-target user vectors according to the purchase records of the non-target users;
the processing unit is used for calculating the similarity between each non-target user and the target user according to each non-target user vector, the target user vector and a similarity calculation method, so that similar users of the target user are screened out from the non-target users;
and the recommending unit is used for recommending the size of the target product to the target user according to the similar user.
7. The apparatus according to claim 6, wherein the generating unit is specifically configured to:
acquiring the size of the purchased article of the target user from the purchase record of the target user, and generating a target user vector according to a first preset rule;
and acquiring the size of purchased articles of each non-target user except the target product from the purchase record of each non-target user, and generating each non-target user vector according to the first preset rule.
8. The apparatus according to claim 7, wherein the processing unit is specifically configured to:
substituting the target user vector and each non-target user vector into a cosine similarity formula for calculation to obtain a cosine similarity value of each non-target user;
and selecting the cosine similarity value with the maximum value from the cosine similarity values, and taking the non-target user corresponding to the cosine similarity value with the maximum value as the similar user of the target user.
9. The apparatus according to claim 8, wherein the recommending unit is specifically configured to:
judging whether the similarity of the similar users is smaller than a preset value;
if so, recommending the size of the target product to the target user according to a pre-established corresponding relation between the brand and the size of the brand, the brand of the target product and the purchase record of the target user;
if not, recommending the size of the target product to the target user according to the size of the purchased article of the similar user, the size of the purchased article of the target user and the cosine similarity formula.
10. The apparatus according to claim 9, wherein the recommending unit is further configured to:
generating a reference vector according to a second preset rule based on the size of the purchased article of the similar user, wherein the first preset rule and the rule corresponding to the target product form the second preset rule;
generating a reference vector according to the second preset rule based on the size of the target product of the target user and the size of the purchased article of the target user;
substituting the reference vector and the reference vector into the cosine similarity formula, making the size of the target product of the target user be an unknown number, making the cosine similarity value in the cosine similarity formula be 1, solving the size, and taking the solved size as the size of the target product recommended to the target user.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201910048483.5A 2019-01-18 2019-01-18 Method and device for recommending size Pending CN111461804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910048483.5A CN111461804A (en) 2019-01-18 2019-01-18 Method and device for recommending size

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910048483.5A CN111461804A (en) 2019-01-18 2019-01-18 Method and device for recommending size

Publications (1)

Publication Number Publication Date
CN111461804A true CN111461804A (en) 2020-07-28

Family

ID=71684080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910048483.5A Pending CN111461804A (en) 2019-01-18 2019-01-18 Method and device for recommending size

Country Status (1)

Country Link
CN (1) CN111461804A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100091669A (en) * 2009-02-11 2010-08-19 인하대학교 산학협력단 Personalized recommendation system for e-commerce service
US20110231278A1 (en) * 2010-03-17 2011-09-22 Amanda Fries Garment sizing system
CN104504581A (en) * 2014-12-18 2015-04-08 东华大学 Garment size managing method based on big data and e-commerce platform
US20150242929A1 (en) * 2014-02-24 2015-08-27 Shoefitr, Inc. Method and system for improving size-based product recommendations using aggregated review data
CN106611318A (en) * 2015-10-21 2017-05-03 阿里巴巴集团控股有限公司 Commodity size selection method and system
CN107967637A (en) * 2016-10-20 2018-04-27 阿里巴巴集团控股有限公司 The recommendation method, apparatus and electronic equipment of a kind of merchandise items model

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100091669A (en) * 2009-02-11 2010-08-19 인하대학교 산학협력단 Personalized recommendation system for e-commerce service
US20110231278A1 (en) * 2010-03-17 2011-09-22 Amanda Fries Garment sizing system
US20150242929A1 (en) * 2014-02-24 2015-08-27 Shoefitr, Inc. Method and system for improving size-based product recommendations using aggregated review data
CN106462862A (en) * 2014-02-24 2017-02-22 亚马逊技术股份有限公司 Method and system for improving size-based product recommendations using aggregated review data
CN104504581A (en) * 2014-12-18 2015-04-08 东华大学 Garment size managing method based on big data and e-commerce platform
CN106611318A (en) * 2015-10-21 2017-05-03 阿里巴巴集团控股有限公司 Commodity size selection method and system
CN107967637A (en) * 2016-10-20 2018-04-27 阿里巴巴集团控股有限公司 The recommendation method, apparatus and electronic equipment of a kind of merchandise items model

Similar Documents

Publication Publication Date Title
CN107967284B (en) Method and device for storing and inquiring order information
CN107463675B (en) Data processing method and system
TW201342289A (en) Method, web server and web browser of providing information
CN107193932B (en) Information pushing method and device
CN109711917B (en) Information pushing method and device
CN107590678A (en) Method of Commodity Recommendation and system
CN113095893A (en) Method and device for determining sales of articles
CN104951941A (en) Method and system for providing transfer information of commodity objects
CN111932321B (en) Method and device for pushing article information for user, electronic equipment and medium
CN110858209B (en) Business object access/release method, device and system and electronic equipment
CN111461804A (en) Method and device for recommending size
CN110020131B (en) Method and device for arranging commodities
CN107357847B (en) Data processing method and device
CN109474884B (en) Data processing method and system
CN110956514A (en) Method and device for generating order information
CN110827101A (en) Shop recommendation method and device
CN112561606B (en) Shelf placement method and device based on user behaviors, electronic equipment and medium
CN110880119A (en) Data processing method and device
CN113822745A (en) Article display method and device
CN113535769A (en) Method and device for inquiring information
CN111488537A (en) Page display method and device
CN111784376A (en) Method and apparatus for processing information
CN110544140A (en) method and device for processing browsing data
CN113220700B (en) Method and device for realizing dynamic inventory processing
CN113112285B (en) Data analysis method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination