User category adjusting method, device, equipment and storage medium thereof

文档序号:1952891 发布日期:2021-12-10 浏览:19次 中文

阅读说明:本技术 用户类别调整方法、装置、设备及其存储介质 (User category adjusting method, device, equipment and storage medium thereof ) 是由 刘文龙 焦娇 于 2021-09-28 设计创作,主要内容包括:本公开提供一种用户类别调整方法、装置、设备及其存储介质。本公开实施例中提供的一个或多个技术方案,获取包括N个用户的用户数据的数据集合,其中,所述用户数据包括用户类别,N为大于等于2的正整数;确定每个用户的消费行为权重向量;基于所述每个用户的消费行为权重向量,确定用户Ui与所述N个用户中其他用户之间的相似度,其中,所述用户Ui为所述N个用户中的任一用户,i=1,2,…,N;基于所述相似度,将所述用户Ui的用户类别Ci调整为与所述用户Ui之间的相似度最大的用户Uj的用户类别Cj,其中,j=1,2,…,N,j≠i,从而实现对用户类别的调整。(The disclosure provides a user category adjustment method, device, equipment and storage medium thereof. According to one or more technical schemes provided in the embodiments of the present disclosure, a data set including user data of N users is obtained, where the user data includes a user category, and N is a positive integer greater than or equal to 2; determining a consumption behavior weight vector of each user; determining similarity between a user Ui and other users of the N users based on the consumption behavior weight vector of each user, wherein the user Ui is any user of the N users, i =1,2, …, N; and based on the similarity, adjusting the user category Ci of the user Ui to the user category Cj of the user Uj with the highest similarity with the user Ui, wherein j =1,2, …, N, j ≠ i, so as to realize the adjustment of the user category.)

1. A user category adjustment method comprises the following steps:

acquiring a data set comprising user data of N users, wherein the user data comprises user categories, and N is a positive integer greater than or equal to 2;

determining a consumption behavior weight vector of each user;

determining similarity between a user Ui and other users of the N users based on the consumption behavior weight vector of each user, wherein the user Ui is any user of the N users, i =1,2, …, N;

and adjusting the user category Ci of the user Ui to the user category Cj of the user Uj with the maximum similarity to the user Ui based on the similarity, wherein j =1,2, …, N, j ≠ i.

2. The method of claim 1, wherein the determining a consumption behavior weight vector for each user comprises:

determining the times of each commodity purchased by each user;

for any commodity, determining the proportion of the number of users who purchase the commodity to the total number of users who purchase all commodities;

and calculating the purchase weight of each user for each commodity according to the number of times of each commodity purchased by each user and the ratio so as to determine the consumption behavior weight vector of each user.

3. The method according to claim 1 or 2, wherein the method further comprises:

for a user Ui, determining a user with the similarity greater than a preset similarity threshold value with the user Ui in the N users as a user with an association relation with the user Ui;

determining K user categories corresponding to the users having the association relation with the user Ui, wherein K is more than or equal to 1 and less than or equal to N;

and respectively determining similarity index values of the user Ui and the K user categories, and performing iterative updating on the user categories of the user Ui according to the similarity index values until preset iterative conditions are met to determine M user categories, wherein M is more than or equal to 1 and is less than or equal to K.

4. The method of claim 3, wherein the determining similarity index values of the user Ui and the K user categories, respectively, and iteratively updating the user categories of the user Ui according to the similarity index values comprise:

for any user category in the K user categories, determining similarity and value or similarity mean value between the user included in the user category and the user Ui;

determining the user category corresponding to the maximum similarity sum value or the similarity mean value from the K user categories according to the similarity sum value or the similarity mean value;

and performing iterative updating on the user category of the user Ui according to the user category corresponding to the maximum similarity and the value or the similarity mean value.

5. The method of claim 3, wherein the preset iteration condition is one of:

the iteration times reach the preset times;

the number M of the user categories after iteration does not exceed a preset category number threshold;

the number of users in at least one of the M user categories after the iteration exceeds a preset user number threshold.

6. The method of claim 3, further comprising:

determining a preference commodity corresponding to any user category in the M user categories; and

recommending the preferred goods to the users with the user category.

7. A user category adjustment apparatus comprising:

the data acquisition module is used for acquiring a data set comprising user data of N users, wherein the user data comprises user categories, and N is a positive integer greater than or equal to 2;

the weight determining module is used for determining a consumption behavior weight vector of each user;

a similarity determination module, configured to determine, based on the consumption behavior weight vector of each user, a similarity between a user Ui and other users of the N users, where the user Ui is any user of the N users, and i =1,2, …, N;

and an adjusting module, configured to adjust the user category Ci of the user Ui to a user category Cj of a user Uj with the greatest similarity to the user Ui based on the similarity, where j =1,2, …, N, j ≠ i.

8. The apparatus of claim 7, wherein the apparatus further comprises:

an association determining module, configured to determine, for a user Ui, a user whose similarity to the user Ui is greater than a preset similarity threshold from among the N users as a user having an association with the user Ui, and determine K user categories corresponding to the user having an association with the user Ui, where K is greater than or equal to 1 and less than or equal to N;

and the iteration module is used for respectively determining similarity index values of the user Ui and the K user categories, and carrying out iterative update on the user categories of the user Ui according to the similarity index values until a preset iteration condition is met so as to determine M user categories, wherein M is more than or equal to 1 and is less than or equal to K.

9. An electronic device, comprising:

a processor; and

a memory for storing a program, wherein the program is stored in the memory,

wherein the program comprises instructions which, when executed by the processor, cause the processor to carry out the method according to any one of claims 1-6.

10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.

Technical Field

The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for user category adjustment.

Background

The commodities purchased by the users show various information of the users, the types corresponding to the commodities can be divided into education training, travel, automobiles, mothers and babies, real estate and the like, if the similarity of the purchased commodity lists of the two users is high, the consumption abilities, hobbies, the stages of the two users are similar, and the products purchased by one user can be recommended to the other user.

However, as the life stage of the user changes, the consumption behavior of the user or the purchase situation of the goods also changes, which requires adaptive adjustment of the user category.

Disclosure of Invention

In view of the above, embodiments of the present disclosure provide a method, an apparatus, a device and a storage medium for adjusting a user category, so as to at least partially solve the above problems.

According to an aspect of the present disclosure, there is provided a user category adjustment method, including: acquiring a data set comprising user data of N users, wherein the user data comprises user categories, and N is a positive integer greater than or equal to 2; determining a consumption behavior weight vector of each user; determining similarity between a user Ui and other users of the N users based on the consumption behavior weight vector of each user, wherein the user Ui is any user of the N users, i =1,2, …, N; and adjusting the user category Ci of the user Ui to the user category Cj of the user Uj with the maximum similarity to the user Ui based on the similarity, wherein j =1,2, …, N, j ≠ i.

According to a second aspect of the present disclosure, there is provided a user category adjustment apparatus including: the data acquisition module is used for acquiring a data set comprising user data of N users, wherein the user data comprises user categories, and N is a positive integer greater than or equal to 2; the weight determining module is used for determining a consumption behavior weight vector of each user; a similarity determination module, configured to determine, based on the consumption behavior weight vector of each user, a similarity between a user Ui and other users of the N users, where the user Ui is any user of the N users, and i =1,2, …, N; and an adjusting module, configured to adjust the user category Ci of the user Ui to a user category Cj of a user Uj with the greatest similarity to the user Ui based on the similarity, where j =1,2, …, N, j ≠ i.

According to a third aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory storing a program, wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the method of the first aspect.

According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the first aspect.

According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the first aspect.

In one or more technical solutions provided in the embodiments of the present disclosure, a data set including user data of N users is obtained, where the user data includes a user category, and N is a positive integer greater than or equal to 2; determining a consumption behavior weight vector of each user; determining similarity between a user Ui and other users of the N users based on the consumption behavior weight vector of each user, wherein the user Ui is any user of the N users, i =1,2, …, N; and based on the similarity, adjusting the user category Ci of the user Ui to the user category Cj of the user Uj with the highest similarity with the user Ui, wherein j =1,2, …, N, j ≠ i, so as to realize the adjustment of the user category.

Drawings

Further details, features and advantages of the disclosure are disclosed in the following description of exemplary embodiments, taken in conjunction with the accompanying drawings, in which:

fig. 1 is a schematic flowchart of a user category adjustment method according to an embodiment of the present disclosure;

fig. 2 is a schematic diagram of user data and similarity provided by an embodiment of the present disclosure;

FIG. 3 is a schematic diagram of user categories and similarities after a first round of adjustment provided by the embodiments of the present disclosure;

FIG. 4 is a schematic diagram illustrating user categories and similarities after a second round of adjustment according to an embodiment of the present disclosure;

fig. 5 is a schematic structural diagram of a user category adjusting apparatus according to an embodiment of the present disclosure;

FIG. 6 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.

Detailed Description

Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.

It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.

The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description. It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.

It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise. The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.

The commodities purchased by the users show various information of the users, for example, the types corresponding to the commodities can be divided into education training, travel, automobiles, mothers and babies, real estate and the like, if the similarity of the purchased commodity lists of the two users is high, the similarity of the two users is high, and the products purchased by a certain user can be recommended to another user. However, as the life stage of the user changes, the consumption behavior of the user or the purchase situation of the goods also changes. Therefore, the user category needs to be adjusted.

In view of this, the present disclosure provides a user category adjustment method, which can continuously adjust a user category according to consumption behavior data (e.g., commodity purchase data) of a user, thereby improving accuracy of user classification. Referring to the drawings, a scheme of the present disclosure is described below, as shown in fig. 1, fig. 1 is a schematic flow chart of a user category adjustment method provided in an embodiment of the present disclosure, and specifically includes:

s101, acquiring a data set comprising user data of N users.

In some embodiments, the user data includes a user category. Illustratively, the user identification of each user may be initialized and regarded as the user category of each user, in other words, if there are N users in the beginning, there are N user categories correspondingly. For example, if there are 4 users, there are 4 user identities and 4 user categories, for example, (U1, C1), (U2, C2), (U3, C3), and (U4, C4), and the 4 user data may form a data set, where Ui is the user identity of the ith user, Ci is the user category of the ith user, and i =1,2, 3, 4.

S103, determining a consumption behavior weight vector of each user.

For example, the actual purchase of a commodity is taken as an example of the consumption behavior. Specifically, list data of each commodity purchased by the user can be acquired through background data or historical data, so that a commodity purchase list is generated. Each user in the commodity purchase list is uniquely characterized through the user identification, each commodity can also be uniquely characterized through the commodity identification item or the commodity, and each user identification, commodity identification and the commodity purchase frequency of the user are in one-to-one correspondence. As shown in table 1, table 1 is a schematic table of a commodity purchase list provided in the embodiment of the present disclosure.

TABLE 1 Commodity purchase List

User identification Item1 Item2
U1 10 15
U2 15 35

Further, the consumption behavior weight vector of each user may be determined based on the product purchase list shown in table 1, so as to form a consumption behavior weight vector corresponding to the user one to one. Obviously, if there are x kinds of goods, there should be x weight elements in the consumption behavior weight vector. I.e. the weight vector W of the consumption behavior corresponding to the user Uii= (W1, W2, … …, Wx), each weight element corresponding to one commodity.

Taking table 1 as an example, determining the consumption behavior weight vector of each user may include: determining the times of each commodity purchased by each user; for any commodity, determining the proportion of the number of users who purchase the commodity to the total number of users who purchase all commodities; and calculating the purchase weight of each user for each commodity according to the number of times of each commodity purchased by each user and the ratio so as to determine the consumption behavior weight vector of each user.

Specifically, for user U1, the corresponding consumption behavior weight vector W1= (10/(10 + 15), 15/(15 + 35)), that is, (0.4, 0.3), where 0.4 is a weight element for commodity identification Item1 for user U1 and 0.3 is a weight element for commodity identification Item2 for user U1. For the user U2, the corresponding consumption behavior weight vector W2= (15/(10 + 15), 35/(15 + 35)), that is, (0.6, 0.7), where 0.6 is a weight element for commodity identification Item1 for user U2 and 0.7 is a weight element for commodity identification Item2 for user U2.

S105, determining the similarity between the user Ui and other users in the N users based on the consumption behavior weight vector of each user.

Wherein the user Ui is any one of the N users, i =1,2, …, N.

For example, when determining the similarity between the user Ui and the other users in the N users, the similarity may be calculated according to the distance between the user Ui and the consumption behavior weight vector corresponding to the other users in the N users. For example, the euclidean distance or the cosine similarity of the consumption behavior weight vectors of the two users is calculated, and the similarity between the user Ui and the other users in the N users is calculated according to the euclidean distance or the cosine similarity. For example, generally, the smaller the euclidean distance, the greater the similarity.

S107, based on the similarity, the user category Ci of the user Ui is adjusted to the user category Cj of the user Uj with the maximum similarity with the user Ui.

Specifically, in step S107, j =1,2, …, N, j ≠ i.

Illustratively, in step S107, any adjustment is made independent of the order, the data on which the adjustment depends being actually the initial user data, not the adjusted user data. For example, assuming that the user having the greatest similarity to the user U1 is the user U2, the category of the user U1 is changed to the category of the user U2, (U1, C1) is changed to (U1, C2), and meanwhile, if the category of the user U2 having the greatest similarity to the user U2 is the user U1, the category of the user U2 is changed to the category of the user U1, (U2, C2) is changed to (U2, C1) based on the initial user data (U1, C1).

For example, now assume that there are 4 pieces of user data (U1, C1) to (U4, C4), as shown in fig. 2, fig. 2 is a schematic diagram of user data and similarity provided by the embodiment of the present disclosure. In the diagram, the similarity between the user 1 and the users 2, 3, and 4 is 0.8, 0.6, and 0.4, respectively, the similarity between the user 2 and the users 3 and 4 is 0.2 and 0.6, and the similarity between the users 3 and 4 is 0.

Based on the foregoing manner, the user category is adjusted as follows:

the user with the greatest similarity to the user U1 is the user U2, and if the category of the user U1 becomes the category of the user U2, (U1, C1) becomes (U1, C2); the user U1 has the maximum similarity to the user U2, the category of the user U2 is changed to the category of the user U1, (U2, C2) is changed to (U2, C1); the user U1 has the maximum similarity to the user U3, the category of the user U3 is changed to the category of the user U1, (U3, C3) is changed to (U3, C1); the user U2 has the greatest similarity to the user U4, and the category of the user U4 becomes the category of the user U2, (U4, C4) becomes (U4, C2).

Fig. 3 shows the user category (or first round of adjustment) and the similarity after the adjustment in step S107, where fig. 3 is a schematic diagram of the user category and the similarity after the adjustment provided by the embodiment of the disclosure. It can be seen that with the above adjustment, the number of user categories that actually exist has been greatly reduced.

S109, aiming at a user Ui, determining a user with the similarity larger than a preset similarity threshold value with the user Ui in the N users as a user with the association relation with the user Ui, and determining K user categories corresponding to the user with the association relation with the user Ui, wherein K is more than or equal to 1 and less than or equal to N.

Specifically, in step S109, users having an association relationship with the user Ui are obtained by filtering, the number of the users may be multiple or one, and K user categories corresponding to the users having an association relationship are determined.

For example, in fig. 3, for the user U1, the users associated therewith may be considered as the user U2, the user U3 and the user U4, and for the user U4, since the similarity between the user U3 and the user U4 is 0, the users associated with the user U4 may be considered as the user U1 and the user U2. Therefore, in fact, for the user U1, the user categories of the users with which there is an association at this time are the user category C1 and the user category C2.

S111, respectively determining similarity index values of the user Ui and the K user categories, and performing iterative updating on the user categories of the user Ui according to the similarity index values until a preset iterative condition is met to determine M user categories, wherein M is more than or equal to 1 and is less than or equal to K.

After the first iteration, the number K of user categories that actually already exist is greatly reduced compared to the initial N user categories (in fact, 10 ten thousand initial user categories would exist assuming 10 thousand initial user data).

Meanwhile, for each user Ui, K user categories having an association relationship with the user Ui may be determined based on the screening of the association relationship in step S109, so that similarity index values between the user Ui and the K user categories may be determined respectively.

The similarity index value may be a statistical value of similarity, such as similarity and value or similarity mean value between a user included in a certain user category and the user Ui, so as to obtain similarity index values between the user Ui and the K user categories, and further determine a user category corresponding to the maximum similarity and value or similarity mean value from the K user categories according to the similarity and value or similarity mean value; and then, according to the user category corresponding to the maximum similarity and the value or the similarity mean value, the user category of the user Ui is iteratively updated, so that the user category of the user Ui is adjusted again to be: and the user category with the highest similarity index value with the user Ui in the K user categories.

For example, for the user U1 in fig. 3, there are two categories C1 and C2 for the 3 users with which there is an association, if the sum of the similarities is used as the similarity index value of the user category, the update algorithm for the user category of the user U1 is as follows:

since the users included in the user category C1 are the user U2 and the user U3, the similarity index value of the user category C1 is 0.8+0.6=1.4 with respect to the user U1, and similarly, the similarity index value of the user category C2 is 0.4 with respect to the user U1, and the user category of the user U1 is changed from C2 to C1 because 1.4>0.4, that is, (U1, C2) is changed to (U1, C1), and so on for the remaining users U2, U3, and U4.

If the similarity mean value is taken as the similarity index value of the user category, the updating algorithm for the user category of the user U1 is as follows:

for the user U2, if the similarity index value of the user category C1 is 0.2 and the similarity index value of the user category C2 is (0.8+0.6)/2=0.7, the user category of the user U2 is updated to C2, that is, (U2, C1) becomes (U2, C2);

for the user U3, if the similarity index value of the user category C1 is 0.2 and the similarity index value of the user category C2 is 0.6, the category of U3 is updated to C2, i.e., (U3, C1) is changed to (U3, C2);

for the user U2, if the similarity index value of the user category C1 is 0.6 and the similarity index value of the user category C2 is 0.4, the category of U4 is updated to C1, that is, (U4, C2) is changed to (U4, C1).

It should be noted that, no matter what adjustment is performed on the user category in the iterative process, since the consumption behavior weight vector of the user is not changed, the similarity between users is kept unchanged. Through the second round of adjustment, the user category of each user is as shown in fig. 4, and fig. 4 is a schematic diagram of the user category and the similarity after the second round of adjustment according to the embodiment of the present disclosure.

In a second round of adjustment, the iteration may be repeated, typically with each iteration the number of user classes present being reduced by some amount until oscillating repeatedly within a certain number. Based on the method, iteration conditions can be preset, when the number of iterations or the iteration result meets the preset conditions, the iterations are stopped, the current M user categories are output, and M is more than or equal to 1 and less than or equal to K.

Specifically, the iteration condition may be one of: inputting the iteration number to reach a preset number (for example, the preset iteration number is 100); the number of user categories M after the iteration does not exceed a preset category number threshold (e.g., M does not exceed a preset category number threshold 50); the number of users in at least one of the M user categories after the iteration exceeds a preset number of users threshold (e.g., the number of users in the at least one category exceeds a preset number of users threshold 5000). The specific preset conditions can be set automatically based on actual needs to meet the needs of actual services.

S113, aiming at any user category in the M user categories, determining a preference commodity corresponding to the user category, and recommending the preference commodity to the user with the user category.

Through the second round of adjustment, M user categories are obtained, and each user category includes a corresponding plurality of different users. Since these users usually have a certain similarity to each other, the user in the category can be recommended with the product based on the purchasing preference of the user included in the category.

In the recommendation, the recommendation of the preferred goods may be performed to all users of the category, or the recommendation of the preferred goods may be performed to users who have not purchased the preferred goods of the category, and so on.

In one or more technical solutions provided in the embodiments of the present disclosure, a data set including user data of N users is obtained, where the user data includes a user category, and N is a positive integer greater than or equal to 2; determining a consumption behavior weight vector of each user; determining similarity between a user Ui and other users of the N users based on the consumption behavior weight vector of each user, wherein the user Ui is any user of the N users, i =1,2, …, N; and based on the similarity, adjusting the user category Ci of the user Ui to the user category Cj of the user Uj with the highest similarity with the user Ui, wherein j =1,2, …, N, j ≠ i, so as to realize the adjustment of the user category. When applied to commodity recommendation, accurate commodity recommendation can be performed.

Of course, to make the weight elements more accurate for the representation of the user representation, in other embodiments, other ways of calculating the weight vector of consumption behavior may be used.

For example, for any commodity, the weight element weight = (the number of times that the user purchases the commodity/the total number of times that the user purchases the commodity) × log (the total number of users/the number of users purchasing the commodity), based on this way, the actual influence of each commodity in the whole user group can be reflected more accurately, which is beneficial to more accurately realizing the similarity evaluation between users.

In an embodiment, when determining the similarity between any two users, the following manner may be adopted, for example, for 5 items 1 to item5, the consumption behavior weight vector corresponding to the user U1 is W1 (0.3, 0.4, 0.5, 0.1, 0), and the commodity purchase weight vector corresponding to the user identifier U2 is W2= (0, 0.1, 0.2, 0, 0.5), and the similarity may be obtained based on the following calculation manner:

therefore, the similarity between the two users can be more accurately evaluated.

In an embodiment, when determining the users with the association relationship in the adjusted N user data, the determination of the association relationship may be performed based on the similarity between the users. For example, in the adjusted N pieces of user data, a user whose similarity is greater than a preset similarity threshold is determined as a user having an association relationship with the user. For example, if the preset similarity threshold is set to 0, referring to the illustration in fig. 3 again, if the similarity between the user U3 and the user U4 is 0, the two are users without association. If the preset similarity threshold is set to 0.3, the users who have an association relationship with U2 are user U1 and user U4, and at this time, user U3 does not have an association relationship with user U2. By the method, the small association relation can be pre-screening out before the category adjustment, and the user category association between users with large similarity is reserved, so that the accuracy of user classification is improved.

In one embodiment, when determining a preferred commodity corresponding to a certain user category, a commodity which is purchased most frequently in the user category may be determined as the preferred commodity corresponding to the user category, or a commodity which is purchased most frequently in the user category may be determined as the preferred commodity of the category, and so on. For example, for any commodity, calculating a proportion of users who purchase the commodity among the users included in the user category; and when the user proportion exceeds a preset proportion threshold, determining the commodity as a preference commodity corresponding to the user category, and recommending the preference commodity to the user in the user category.

For example, the proportion of users who purchase a certain product P1 in each category is calculated, and if the proportion is greater than a preset proportion threshold value of 0.5, half of the users in the group are considered to prefer to purchase P1, so that P1 is the preferred commodity corresponding to the user category, and the product P1 can be recommended to the users who do not purchase the product in the group. Obviously, there may be a plurality of preferred products corresponding to one user category. By the method, more accurate commodity recommendation can be realized in the same user category with similar users, and user experience is improved.

Here, it should be noted that, in other embodiments, step S109 or steps S111 to S113 may not be included.

In a second aspect of the embodiments of the present disclosure, there is also provided a user category adjusting apparatus, as shown in fig. 5, fig. 5 is a schematic structural diagram of the user category adjusting apparatus provided in the embodiments of the present disclosure, and the apparatus includes:

a data obtaining module 501, configured to obtain a data set including user data of N users, where the user data includes user categories, and N is a positive integer greater than or equal to 2;

a weight determination module 503, configured to determine a consumption behavior weight vector of each user;

a similarity determination module 505, configured to determine, based on the consumption behavior weight vector of each user, a similarity between a user Ui and other users in the N users, where the user Ui is any user in the N users, and i =1,2, …, N;

an adjusting module 507, configured to adjust, based on the similarity, a user category Ci of the user Ui to a user category Cj of a user Uj with a largest similarity to the user Ui, where j =1,2, …, N, j ≠ i;

an association determining module 509, configured to determine, for a user Ui, a user whose similarity to the user Ui is greater than a preset similarity threshold from among the N users as a user having an association with the user Ui, and determine K user categories corresponding to the user having an association with the user Ui, where K is greater than or equal to 1 and less than or equal to N;

an iteration module 511, configured to determine similarity index values between the user Ui and the K user categories, and perform iterative update on the user category of the user Ui according to the similarity index values until a preset iteration condition is met, so as to determine M user categories, where M is greater than or equal to 1 and is less than or equal to K.

Optionally, in an embodiment, the weight determining module 503 is further configured to:

determining the times of each commodity purchased by each user; for any commodity, determining the proportion of the number of users who purchase the commodity to the total number of users who purchase all commodities;

and calculating the purchase weight of each user for each commodity according to the number of times of each commodity purchased by each user and the proportion so as to determine the consumption behavior weight vector of each user.

Optionally, in an embodiment, the iteration module 511 is further configured to:

for a user Ui, determining a user with the similarity greater than a preset similarity threshold value with the user Ui in the N users as a user with an association relation with the user Ui;

determining K user categories corresponding to the users having the association relation with the user Ui, wherein K is more than or equal to 1 and less than or equal to N;

and respectively determining similarity index values of the user Ui and the K user categories, and performing iterative updating on the user categories of the user Ui according to the similarity index values until preset iterative conditions are met to determine M user categories, wherein M is more than or equal to 1 and is less than or equal to K.

Optionally, in an embodiment, the iteration module 511 is further configured to:

for any user category in the K user categories, determining similarity and value or similarity mean value between the user included in the user category and the user Ui;

determining the user category corresponding to the maximum similarity sum value or the similarity mean value from the K user categories according to the similarity sum value or the similarity mean value; and

and performing iterative updating on the user category of the user Ui according to the user category corresponding to the maximum similarity and the value or the similarity mean value.

Optionally, in an embodiment, the preset iteration condition may be one of the following:

the iteration times reach the preset times;

the number M of the user categories after iteration does not exceed a preset category number threshold;

the number of users in at least one of the M user categories after the iteration exceeds a preset user number threshold.

Optionally, in an embodiment, the user category adjusting apparatus may further include a product recommending module, configured to:

determining a preference commodity corresponding to any user category in the M user categories; and recommending the preferred goods to the users with the user category.

In a third aspect of the embodiments of the present disclosure, exemplary embodiments of the present disclosure also provide an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program, when executed by the at least one processor, is for causing the electronic device to perform a method according to an embodiment of the disclosure.

The disclosed exemplary embodiments also provide a non-transitory computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is adapted to cause the computer to perform a method according to an embodiment of the present disclosure.

The exemplary embodiments of the present disclosure also provide a computer program product comprising a computer program, wherein the computer program, when executed by a processor of a computer, is adapted to cause the computer to perform a method according to an embodiment of the present disclosure.

Referring to fig. 6, a block diagram of a structure of an electronic device, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.

As shown in fig. 6, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.

Various components in the electronic device 600 are connected to the I/O interface 605, including: an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 may be any type of device capable of inputting information to the electronic device 600, and the input unit 606 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. Output unit 607 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. Storage unit 604 may include, but is not limited to, magnetic or optical disks. The communication unit 609 allows the electronic device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and/or a chipset, such as a bluetooth (TM) device, a WiFi device, a WiMax device, a cellular communication device, and/or the like.

The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 performs the respective methods and processes described above. For example, in some embodiments, a user category adjustment method as in embodiments of the present disclosure may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 600 via the ROM 602 and/or the communication unit 609. In some embodiments, the computing unit 601 may be configured by any other suitable means (e.g., by means of firmware) to perform user category adjustments as embodiments of the present disclosure.

In the user category adjusting device, the electronic device, the computer-readable storage medium, and the computer program product, reference may be made to the embodiment of the user category adjusting method in a preferred embodiment, which is not described in detail again.

Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.

As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.

To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.

The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种教学材料生成方法、装置、计算机设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!