User similarity analysis method and device, electronic equipment and storage medium
By calculating the similarity between users and using multiple weight factors to weight processing, the problem of inaccurate user placement in the prior art is solved, and the accuracy and user experience of information recommendation are improved.
Patent Information
- Application Number
- CN202410954280.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-08
AI Technical Summary
The existing user similarity algorithms perform poorly when dealing with nonlinear relationships, resulting in inaccurate user delivery objects and reducing user experience.
By obtaining the user's evaluation data on the target object, calculating the similarity between users, and using factors such as Pearson's correlation coefficient, weight, evaluation time weight factor and activity weight factor to perform weighting to improve the accuracy of user delivery.
Effectively filter out objects that users are interested in, improve the accuracy of information recommendations, reduce the delivery of unnecessary information, and improve user experience.
Smart Images

Figure CN118916389A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a user similarity analysis method, device, electronic device and storage medium. Background Art
[0002] With the advent of the Internet era, the rapid development of computer technology has brought people into an era of information explosion. Users receive a lot of information in their daily lives, and these information have their own characteristics, which may be the introduction information of a certain item or the discount information of a certain product. Each user has the item information that he or she is interested in, but due to the imperfect method of delivering item information, users may often receive item information that they are not interested in.
[0003] In order to make the delivered item information meet the user's interests, it is necessary to finely locate the target users. At present, information recommendation algorithms are mainly divided into two categories: similarity algorithms and machine learning algorithms. Information recommendation algorithms can obtain products that users are interested in, and then push information about items that users are interested in. However, it is currently difficult to obtain products that users are interested in through similarity algorithms, and it is easy to ignore the evaluation characteristics of users for items of interest. Therefore, the recommendation algorithm has limitations and is prone to errors in the recommended item information. Summary of the invention
[0004] In order to solve or partially solve the problems existing in the related art, the present application provides a user similarity analysis method, device, electronic device and storage medium, which can obtain the similarity between two users, which is conducive to screening out objects of interest to the user from various objects and improving the accuracy of object delivery.
[0005] In a first aspect, the present application provides a user similarity analysis method, comprising obtaining target object categories corresponding to a plurality of target objects respectively; obtaining first evaluation data corresponding to two users respectively, each of the first evaluation data comprising the number of first evaluations by the user on objects of the target object category and the average number of evaluations by the user on objects of a single target object category; and determining the similarity between the two users based on the first evaluation data of the two users.
[0006] In combination with the first aspect, in a possible implementation of the first aspect, at least one interest category of the user is obtained; a target interest category that is the same as the target object category is filtered out from the at least one interest category of the user; if the target interest category is the same as the target object category, a first number of evaluations by the user on objects in the target object category is obtained.
[0007] In combination with the first aspect, in a possible implementation of the first aspect, determining the similarity between the two users based on the first evaluation data of the two users includes: obtaining a second number of evaluations of the target object, where the second number of evaluations is the total number of evaluations of the target object by all users; determining the weight of the target object based on the second number of evaluations of the target object, where the weight of the target object is negatively correlated with the second number of evaluations; weighting the first number of evaluations of each user according to the weight of the target object to obtain a weighted number of evaluations; and determining the similarity between the two users based on the weighted number of evaluations and the average number of evaluations.
[0008] In combination with the first aspect, in a possible implementation of the first aspect, determining the similarity between the two users based on the weighted evaluation number and the average evaluation number includes: obtaining the historical evaluation time of each user for the target object; determining the evaluation time weight factor of the target object based on the absolute difference between the two historical evaluation times, the evaluation time weight factor being negatively correlated with the absolute difference between the two historical evaluation times; determining the similarity between the two users based on the evaluation time weight factor of the target object, the weighted evaluation number, and the average evaluation number.
[0009] In combination with the first aspect, in a possible implementation of the first aspect, determining the similarity between the two users based on the evaluation time weight factor of the target object, the weighted evaluation number, and the average evaluation number includes: obtaining a third evaluation number for each user, the third evaluation number being the number of evaluations by the user on all target objects; for each user, determining the user's activity weight factor based on the user's third evaluation number, the third evaluation number being positively correlated with the activity weight factor; determining the similarity between the two users based on the weighted evaluation number, the average evaluation number, the evaluation time weight factor, and the activity weight factor.
[0010] In combination with the first aspect, in a possible implementation of the first aspect, determining the activity weight factor of the user based on the number of third evaluations of the user includes: if the number of third evaluations of the user is less than a preset threshold, then determining the activity weight factor of the user based on a first difference between the number of third evaluations of the user and the preset threshold, the activity weight factor being positively correlated with the first difference.
[0011] In combination with the first aspect, in a possible implementation of the first aspect, determining the activity weight factor of the user based on the number of third evaluations of the user includes: if the number of third evaluations of the user is greater than the preset threshold, obtaining the number of recent evaluations of the user for all target objects; determining the activity weight factor of the user based on a first ratio between the number of recent evaluations of the user and the preset threshold, and a first difference between the number of third evaluations of the user and the preset threshold, the activity weight factor being positively correlated with the first ratio and the first difference.
[0012] In combination with the first aspect, in a possible implementation of the first aspect, determining the activity weight factor of the user based on a first ratio between the number of recent evaluations of the user and a preset threshold, and a first difference between the number of third evaluations of the user and the preset threshold, includes: determining a second difference between the number of third evaluations and the number of recent evaluations; determining a second ratio between the second difference and the preset threshold; determining the activity weight factor of the user based on the second ratio, the first ratio and the first difference, the activity weight factor being negatively correlated to the second ratio.
[0013] The second aspect of the present application provides a user similarity analysis device, including an acquisition module for acquiring target object categories corresponding to multiple target objects respectively; a processing module for acquiring first evaluation data corresponding to two users respectively, each of the first evaluation data including the number of first evaluations of the user on objects of the target object category and the average number of evaluations of the user on objects of a single target object category; a determination module for determining the similarity between the two users based on the first evaluation data of the two users.
[0014] In combination with the second aspect, in a possible implementation of the second aspect, the determination module is also used to obtain at least one interest category of the user; filter out a target interest category that is the same as the target object category from the at least one interest category of the user; if the target interest category is the same as the target object category, then obtain the first number of evaluations of the user on the objects of the target object category.
[0015] In combination with the second aspect, in a possible implementation of the second aspect, the processing module is also used to obtain a second number of evaluations of the target object, where the second number of evaluations is the total number of evaluations of the target object by all users; determine the weight of the target object based on the second number of evaluations of the target object, and the weight of the target object is negatively correlated with the second number of evaluations; weight the first number of evaluations of each user according to the weight of the target object to obtain a weighted number of evaluations; and determine the similarity between the two users based on the weighted number of evaluations and the average number of evaluations.
[0016] In combination with the second aspect, in a possible implementation of the second aspect, the determination module is also used to obtain the historical evaluation time of each user on the target object; determine the evaluation time weight factor of the target object based on the absolute difference between the two historical evaluation times, and the evaluation time weight factor is negatively correlated with the absolute difference between the two historical evaluation times; determine the similarity between the two users based on the evaluation time weight factor of the target object, the weighted evaluation number, and the average evaluation number.
[0017] In combination with the second aspect, in a possible implementation of the second aspect, the determination module is also used to obtain the number of third evaluations of each of the users, where the number of third evaluations is the number of evaluations of the user on all target objects; for each of the users, determine the activity weight factor of the user based on the number of third evaluations of the user, and the number of third evaluations is positively correlated with the activity weight factor; determine the similarity between the two users based on the weighted number of evaluations, the average number of evaluations, the evaluation time weight factor, and the activity weight factor.
[0018] In combination with the second aspect, in a possible implementation of the second aspect, the determination module is also used to determine the activity weight factor of the user based on a first difference between the number of third evaluations of the user and the preset threshold if the number of third evaluations of the user is less than a preset threshold, and the activity weight factor is positively correlated with the first difference.
[0019] In combination with the second aspect, in a possible implementation of the second aspect, the determination module is also used to obtain the number of recent evaluations of the user for all target objects if the number of third evaluations of the user is greater than the preset threshold; determine the activity weight factor of the user based on a first ratio between the number of recent evaluations of the user and the preset threshold, and a first difference between the number of third evaluations of the user and the preset threshold, the activity weight factor being positively correlated to the first ratio and the first difference.
[0020] In combination with the second aspect, in a possible implementation of the second aspect, the determination module is also used to determine a second difference between the third number of evaluations and the number of recent evaluations; determine a second ratio between the second difference and the preset threshold; determine the user's activity weight factor based on the second ratio, the first ratio and the first difference, and the activity weight factor is negatively correlated with the second ratio.
[0021] A third aspect of the present application provides an electronic device, including:
[0022] Processor; and
[0023] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.
[0024] A fourth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.
[0025] A fifth aspect of the present application provides a computer program product, comprising a computer program / instruction, which implements the method described above when executed by a processor.
[0026] The technical solution provided by this application may have the following beneficial effects:
[0027] The user similarity analysis method of the present application includes obtaining target object categories corresponding to multiple target objects respectively; obtaining first evaluation data corresponding to two users respectively, each first evaluation data including the number of first evaluations of objects of the target object category by the user and the average number of evaluations of objects of a single target object category by the user; determining the similarity between the two users based on the first evaluation data of the two users, and being able to obtain the similarity between the two users is conducive to screening out objects of interest to the user from various objects and improving the accuracy of object delivery.
[0028] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0030] Figure 1 is a flowchart of a user similarity analysis method shown in an embodiment of the present application;
[0031] Figure 2 is a structural schematic diagram of a user similarity analysis device shown in an embodiment of the present application;
[0032] Figure 3 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0034] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "a", "an" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more associated listed items.
[0035] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0036] First, some of the terms and related technologies involved in this application are explained to facilitate understanding by those skilled in the art.
[0037] Similarity Algorithm can usually be used to calculate the similarity between two things. When calculating similarity, different methods and algorithms can generally be used to measure the similarity between two things. Common similarity algorithms include: cosine similarity, Euclidean distance, Jaccard similarity, Pearson correlation coefficient, etc.
[0038] The Pearson Correlation Coefficient is a statistic that measures the strength and direction of the linear relationship between two variables. Its value ranges from -1 to 1. When the Pearson Correlation Coefficient is 1, it means that the two variables are completely positively correlated, that is, when one variable increases, the other variable also increases by the same amount. When the value is -1, it means that the two variables are completely negatively correlated, that is, when one variable increases, the other variable decreases by the same amount. When the value is 0, it means that there is no linear correlation between the two variables, that is, the change of one variable does not affect the other variable. The calculation formula of the Pearson Correlation Coefficient is based on the quotient of the covariance and standard deviation of the two variables. It provides an indicator to quantify the strength of the linear relationship between the two variables.
[0039] In the related technology, each user has objects that he or she is interested in and objects that he or she is not interested in. The objects that the user is interested in can be obtained through information recommendation algorithms. Currently, information recommendation algorithms are mainly divided into two categories: similarity algorithms and machine learning algorithms. Information recommendation algorithms can be used to obtain products that users are interested in, and then push information about items that users are interested in.
[0040] However, the current similarity algorithm performs poorly when dealing with nonlinear relationships, and may over-judge the relevance of certain popular objects to two users, resulting in inaccurate similarity between the two users, which in turn causes the objects delivered to users to be of no interest to the users, wasting delivery resources and reducing user experience.
[0041] In view of the above problems, an embodiment of the present application provides a user similarity analysis method, which can obtain the similarity between two users, which is helpful for screening out objects of interest to the user from various objects and improving the accuracy of object delivery.
[0042] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0043] Figure 1 It is a flowchart of a user similarity analysis method shown in an embodiment of the present application.
[0044] See also Figure 1 , a user similarity analysis method, comprising:
[0045] S110: Obtain target object categories corresponding to a plurality of target objects.
[0046] Specifically, each target object has its own category, and target object categories corresponding to multiple target objects can be obtained. For example, various data of the target object can be obtained from the website, and the target object category corresponding to the target object can be obtained from the various data of the target object. The target object category includes all objects in the category.
[0047] S120: Acquire first evaluation data corresponding to two users respectively, where each first evaluation data includes the number of first evaluations of the user on objects of the target object category and the average number of evaluations of the user on objects of a single target object category.
[0048] Specifically, various data of users can be obtained from multiple channels, and data cleaning can be performed on the user data. The first evaluation data corresponding to the user can be obtained from the processed data, and the first evaluation data includes the number of first evaluations and the average number of evaluations of two users respectively. It can be understood that the average number of evaluations of users on objects of a single target object category can be obtained by obtaining the number of evaluations of objects under all target object categories by the user and dividing the number of evaluations by the number of target object categories.
[0049] In another possible implementation, at least one interest category of the user is obtained; a target interest category that is the same as the target object category is filtered out from the at least one interest category of the user; if the target interest category is the same as the target object category, the first number of evaluations of the user on objects in the target object category is obtained.
[0050] Specifically, each user may have his or her own interest categories, which may be one or more. For example, a user may be interested in electrical appliances and food categories. The target object category may be electrical appliances. The category that is the same as the target object category may be taken as the target interest category, such as electrical appliances being taken as the target interest category. The first number of evaluations by the user under the target interest category is obtained. The first number of evaluations is the number of evaluations by the user on all objects in the target interest category.
[0051] S130: Determine the similarity between the two users according to the first evaluation data of the two users.
[0052] Specifically, the first evaluation data of two users and the Pearson correlation coefficient algorithm can be combined for calculation to determine the similarity between the two users. The Pearson correlation coefficient algorithm formula is:
[0053]
[0054] Among them, r(x,y) is the similarity between two users, x and y represent two users respectively, x i represents the number of first evaluations of user x on the objects in the target object category of target object i, y i represents the number of first evaluations of the objects under the target object category of the target object i by user y, represents the average number of evaluations by user x on objects of a single target object category, represents the average number of evaluations by user y on objects of a single target object category. It is understandable that the target object may be i, k, etc., and the first number of evaluations by two users on objects under each target object category may be obtained, for example, x i ,y i 、x k ,y k , the similarity between two users can be calculated through the first evaluation data of the two users.
[0055] In another possible implementation, the second number of evaluations of the target object is obtained, where the second number of evaluations is the total number of evaluations of the target object by all users; the weight of the target object is determined based on the second number of evaluations of the target object, where the weight of the target object is negatively correlated with the second number of evaluations; the first number of evaluations of each user is weighted based on the weight of the target object to obtain a weighted number of evaluations; and the similarity between two users is determined based on the weighted number of evaluations and the average number of evaluations.
[0056] Specifically, by obtaining the information data of the target object, the total number of evaluations of the target object by all users can be obtained, for example, the total number of evaluations of the target object i by all users. The weight of the target object is determined according to the second number of evaluations. Specifically, the weight of the target object can be determined by the following formula:
[0057]
[0058] Among them, w(i) is the weight of target object i, S(i) is the second evaluation number of target object i, and N is the number of all target objects. The weight of the target object can be calculated by this formula. It can be understood that the weight of the target object is negatively correlated with the second evaluation number. The larger the value of the second evaluation number, the smaller the weight of the target object.
[0059] Specifically, after obtaining the weight of the target object, the first evaluation quantity of each user can be weighted to obtain the weighted evaluation quantity. For example, the weight of target object i is w i , weight the first evaluation quantity of user x and user y respectively, and get the weighted evaluation quantity x of user x i w i and the weighted number of reviews y by user y i w i It is understandable that the similarity between two users can be determined based on the weighted number of reviews and the average number of reviews, and the calculation formula is:
[0060]
[0061] Among them, x i w i is the weighted evaluation number of user x on target object i, yi w i is the weighted evaluation number of user y’s target object i, represents the average number of evaluations by user x on objects of a single target object category, It represents the average number of evaluations of user y on objects of a single target object category. After adding the weight of the target object into the calculation formula, the similarity between the two users can be obtained more accurately.
[0062] In another possible implementation, the historical evaluation time of each user on the target object is obtained; the evaluation time weight factor of the target object is determined based on the absolute difference between the two historical evaluation times, and the evaluation time weight factor is negatively correlated with the absolute difference between the two historical evaluation times; the similarity between the two users is determined based on the evaluation time weight factor of the target object, the weighted evaluation number, and the average evaluation number.
[0063] Specifically, the historical evaluation time of each user on the target object can be obtained, for example, the historical evaluation time t of user x on target object i xi and user y’s historical evaluation time t on target object i yi , according to the absolute difference between the two historical evaluation times, determine the evaluation time weight factor of the target object. For example, you can use t xi and t yi The absolute difference between them determines the evaluation time weight factor of target object i. The evaluation time weight factor decay(t xi ,t yi ) can be calculated by the following formula:
[0064]
[0065] Among them, decayfactor is a constant, which can be set according to the actual situation, e is also a constant, e is equal to 2.71828, and the historical evaluation time t xi and t yi The unit can be seconds. For example, when the historical evaluation time t xi When the historical evaluation time is t yi When it is 500 seconds, the time when user y evaluates the target object i is 500 seconds different from the current time. xi -t yi The value of | is 200. It can be understood that the evaluation time weight factor is negatively correlated with the absolute difference between the two historical evaluation times. When the absolute difference between the two historical evaluation times is larger, the evaluation time weight factor is smaller.
[0066] Specifically, after obtaining the evaluation time weight factor of the target object, the similarity between two users can be calculated by the following formula:
[0067]
[0068] Among them, decay(t xi ,t yi ) is the evaluation time weight factor of the target object i. The similarity between two users is determined by the evaluation time weight factor of the target object, the weighted evaluation number, and the average evaluation number. After the evaluation time weight factor is added to the formula, the similarity between the two users can be obtained more accurately.
[0069] In another possible implementation, the number of third evaluations for each user is obtained, where the number of third evaluations is the number of evaluations made by the user on all target objects. For each user, the activity weight factor of the user is determined based on the number of third evaluations, and the number of third evaluations is positively correlated with the activity weight factor. The similarity between two users is determined based on the weighted number of evaluations, the average number of evaluations, the evaluation time weight factor, and the activity weight factor.
[0070] Specifically, the third evaluation number is the number of evaluations of all target objects by the user. For example, the third evaluation number may be the number of evaluations of all target objects by user x. The activity weight factor of the user may be determined based on the third evaluation number of the user. For example, the activity weight factor of user x is a x , the activity weight factor of user y is a y , the greater the number of third evaluations, the greater the activity weight factor; the similarity between two users can be determined based on the weighted number of evaluations, the average number of evaluations, the evaluation time weight factor, and the activity weight factor. For example, the activity weight factor of user x is a x , the activity weight factor of user y is a y , the similarity r(x,y) between user x and user y can be calculated according to the following formula:
[0071]
[0072] Among them, a x is the activity weight factor of user x, a y is the activity weight factor of user y. After adding the activity weight factor to the formula, the similarity between the two users can be obtained more accurately.
[0073] In another possible implementation, if the number of third evaluations of a user is less than a preset threshold, the activity weight factor of the user is determined based on a first difference between the number of third evaluations of the user and the preset threshold, and the activity weight factor is positively correlated with the first difference.
[0074] Specifically, the preset threshold can be set according to the actual situation, such as 10, 20, etc., which is not limited here. The preset threshold can be the user's recent activity value, such as the time interval between the user's logins on a certain website. If the user logs in to a certain website every 20 days, the recent activity value can be 20, and the preset threshold can be set to 20. It can be understood that the larger the number of third evaluations, the larger the activity weight factor, that is, the more the number of evaluations of all target objects by the user, the larger the number of third evaluations, and the larger the activity weight factor; the smaller the preset threshold, the smaller the activity weight factor, that is, the user frequently logs in to a certain website, the smaller the recent activity value, the smaller the preset threshold, and the larger the activity weight factor obtained.
[0075] In another possible implementation, if the number of third evaluations of a user is greater than a preset threshold, the number of recent evaluations of the user on all target objects is obtained; based on a first ratio between the number of recent evaluations of the user and the preset threshold, and a first difference between the number of third evaluations of the user and the preset threshold, the activity weight factor of the user is determined, and the activity weight factor is positively correlated with the first ratio and the first difference.
[0076] Specifically, when the number of the user's third evaluations is greater than the preset threshold, it may be that the number of the user's evaluations of all target objects is greater than the recent activity value. For example, the number of the user's evaluations of all target objects is 20, and the recent activity value is set to 10, then the number of the user's third evaluations is greater than the preset threshold. At this time, the number of the user's recent evaluations of all target objects can be obtained. The difference between the number of the user's third evaluations and the recent activity value can be used as the number of the user's recent evaluations of all target objects. For example, the number of the user's third evaluations is 20, and the recent activity value is set to 10, then the number of recent evaluations is 10. If the difference between the number of the user's third evaluations and the recent activity value is less than 0, then the number of the user's recent evaluations of all target objects is set to 0.
[0077] Specifically, the ratio between the number of recent evaluations of a user and a preset threshold can be used as the first ratio. For example, if the number of recent evaluations of a user is 30 and the preset threshold is 10, the first ratio is 3. The user's activity weight factor is determined based on the first difference between the third number of evaluations of the user and the preset threshold. The activity weight factor is positively correlated with the first ratio and the first difference.
[0078] In another possible implementation, a second difference between the third number of evaluations and the number of recent evaluations is determined; a second ratio between the second difference and a preset threshold is determined; and an activity weight factor of the user is determined based on the second ratio, the first ratio, and the first difference, wherein the activity weight factor is negatively correlated with the second ratio.
[0079] Specifically, the second difference between the third number of evaluations and the number of recent evaluations can be obtained. For example, if the third number of evaluations is 30 and the number of recent evaluations is 10, the second difference is 20. The ratio between the second difference and the preset threshold can be used as the second ratio. The user's activity weight factor is determined based on the first ratio, the second ratio and the first difference. The activity factor is negatively correlated with the second ratio, and positively correlated with the first ratio and the first difference.
[0080] The user similarity analysis method of the present application includes obtaining target object categories corresponding to multiple target objects respectively; obtaining first evaluation data corresponding to two users respectively, each first evaluation data including the number of first evaluations of objects of the target object category by the user and the average number of evaluations of objects of a single target object category by the user; determining the similarity between the two users based on the first evaluation data of the two users, and being able to obtain the similarity between the two users is conducive to screening out objects of interest to the user from various objects and improving the accuracy of object delivery.
[0081] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a user similarity analysis device, an electronic device and corresponding embodiments.
[0082] Figure 2 It is a structural diagram of a user similarity analysis device shown in an embodiment of the present application.
[0083] See also Figure 2 , a user similarity analysis device 200, comprising an acquisition module 210, a processing module 220 and a determination module 230. Wherein:
[0084] The acquisition module 210 is used to acquire target object categories corresponding to a plurality of target objects.
[0085] Specifically, each target object has its own category. You can obtain target object categories corresponding to multiple target objects. For example, you can obtain various data of the target object from the website, and obtain the target object category corresponding to the target object from the various data of the target object. The target object category contains all objects in the category.
[0086] The processing module 220 is used to obtain first evaluation data corresponding to two users respectively, each of which includes the number of first evaluations of the user on the objects of the target object category and the average number of evaluations of the user on the objects of a single target object category.
[0087] Specifically, various data of users can be obtained from multiple channels, and data cleaning can be performed on the user data. The first evaluation data corresponding to the user can be obtained from the processed data, and the first evaluation data includes the number of first evaluations and the average number of evaluations of two users respectively. It can be understood that the average number of evaluations of users on objects of a single target object category can be obtained by obtaining the number of evaluations of objects under all target object categories by the user and dividing the number of evaluations by the number of target object categories.
[0088] In another possible implementation, the processing module 220 is also used to obtain at least one interest category of the user; filter out a target interest category that is the same as the target object category from the at least one interest category of the user; if the target interest category is the same as the target object category, obtain the first number of evaluations of the user on the objects in the target object category.
[0089] The determination module 230 is used to determine the similarity between two users according to the first evaluation data of the two users.
[0090] Specifically, the first evaluation data of two users and the Pearson correlation coefficient algorithm can be combined for calculation to determine the similarity between the two users. The Pearson correlation coefficient algorithm formula is:
[0091]
[0092] Among them, r(x,y) is the similarity between two users, x and y represent two users respectively, x i represents the number of first evaluations of user x on the objects in the target object category of target object i, y i represents the number of first evaluations of the objects under the target object category of the target object i by user y, represents the average number of evaluations by user x on objects of a single target object category, represents the average number of evaluations by user y on objects of a single target object category. It is understandable that the target object may be i, k, etc., and the first number of evaluations by two users on objects under each target object category may be obtained, for example, x i ,y i 、x k ,y k , the similarity between two users can be calculated through the first evaluation data of the two users.
[0093] In another possible implementation, the determination module 230 is also used to obtain a second number of evaluations of the target object, where the second number of evaluations is the total number of evaluations of the target object by all users; determine the weight of the target object based on the second number of evaluations of the target object, where the weight of the target object is negatively correlated with the second number of evaluations; weight the first number of evaluations of each user according to the weight of the target object to obtain a weighted number of evaluations; and determine the similarity between two users based on the weighted number of evaluations and the average number of evaluations.
[0094] In another possible implementation, the determination module 230 is also used to obtain the historical evaluation time of each user on the target object; determine the evaluation time weight factor of the target object based on the absolute difference between the two historical evaluation times, and the evaluation time weight factor is negatively correlated with the absolute difference between the two historical evaluation times; determine the similarity between the two users based on the evaluation time weight factor of the target object, the weighted evaluation number, and the average evaluation number.
[0095] In another possible implementation, the determination module 230 is also used to obtain the number of third evaluations for each user, where the number of third evaluations is the number of evaluations of the user on all target objects; for each user, the user's activity weight factor is determined based on the number of third evaluations, and the number of third evaluations is positively correlated with the activity weight factor; the similarity between two users is determined based on the weighted evaluation number, the average evaluation number, the evaluation time weight factor, and the activity weight factor.
[0096] In another possible implementation, the determination module 230 is also used to determine the user's activity weight factor based on a first difference between the number of the user's third evaluations and the preset threshold if the number of the user's third evaluations is less than a preset threshold, and the activity weight factor is positively correlated with the first difference.
[0097] In another possible implementation, the determination module 230 is also used to obtain the number of recent evaluations of all target objects by the user if the number of the user's third evaluations is greater than a preset threshold; determine the user's activity weight factor based on a first ratio between the number of recent evaluations by the user and the preset threshold, and a first difference between the number of the user's third evaluations and the preset threshold, and the activity weight factor is positively correlated with the first ratio and the first difference.
[0098] In another possible implementation, the determination module 230 is also used to determine a second difference between the third number of evaluations and the number of recent evaluations; determine a second ratio between the second difference and a preset threshold; and determine an activity weight factor of the user based on the second ratio, the first ratio and the first difference, wherein the activity weight factor is negatively correlated with the second ratio.
[0099] The user similarity analysis device of the present application includes an acquisition module for acquiring target object categories corresponding to multiple target objects respectively; a processing module for acquiring first evaluation data corresponding to two users respectively, each first evaluation data including the number of first evaluations of objects of the target object category by the user and the average number of evaluations of objects of a single target object category by the user; a determination module for determining the similarity between the two users based on the first evaluation data of the two users, and being able to obtain the similarity between the two users is conducive to screening out objects of interest to the user from various objects and improving the accuracy of object delivery.
[0100] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0101] Figure 3 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.
[0102] See also Figure 3 , the electronic device 300 includes a memory 310 and a processor 320.
[0103] The processor 320 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0104] The memory 310 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 320 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 310 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 310 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0105] The memory 310 stores executable codes, and when the executable codes are processed by the processor 320 , the processor 320 can execute part or all of the methods described above.
[0106] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0107] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0108] Alternatively, the present application also provides a computer program product that can implement part or all of the steps of the method in the above embodiments, and the computer program product includes a computer program / instructions, which implement part or all of the steps of the method in the above embodiments when the computer program / instructions are executed by a processor.
[0109] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A user similarity analysis method, characterized in that: include: Obtain target object categories corresponding to multiple target objects respectively; Acquire first evaluation data corresponding to two users respectively, each of the first evaluation data includes the number of first evaluations of the user on the objects of the target object category and the average number of evaluations of the user on the objects of a single target object category; The similarity between the two users is determined according to the first evaluation data of the two users.
2. The method according to claim 1, characterized in that: The method further comprises: Obtaining at least one interest category of the user; Filtering out a target interest category that is the same as the target object category from at least one interest category of the user; If the target interest category and the target object category are the same, then obtaining a first number of evaluations by the user on objects of the target object category.
3. The method according to claim 1, characterized in that: Determining the similarity between the two users according to the first evaluation data of the two users includes: Acquire a second number of evaluations of the target object, where the second number of evaluations is the total number of evaluations of the target object by all users; determining a weight of the target object according to the second evaluation quantity of the target object, wherein the weight of the target object is negatively correlated with the second evaluation quantity; Weighting the number of first evaluations of each user according to the weight of the target object to obtain a weighted number of evaluations; The similarity between the two users is determined according to the weighted evaluation quantity and the average evaluation quantity.
4. The method according to claim 3, characterized in that The determining the similarity between the two users according to the weighted evaluation quantity and the average evaluation quantity includes: Obtaining the historical evaluation time of each user on the target object; Determining an evaluation time weight factor of the target object according to an absolute difference between the two historical evaluation times, wherein the evaluation time weight factor is negatively correlated with the absolute difference between the two historical evaluation times; The similarity between the two users is determined based on the evaluation time weight factor of the target object, the weighted evaluation quantity, and the average evaluation quantity.
5. The method according to claim 4, characterized in that The determining the similarity between the two users according to the evaluation time weight factor of the target object, the weighted evaluation quantity, and the average evaluation quantity includes: Obtaining the number of third evaluations of each of the users, where the number of third evaluations is the number of evaluations of all target objects by the user; For each of the users, determining an activity weight factor of the user according to the number of third evaluations of the user, wherein the number of third evaluations is positively correlated with the activity weight factor; The similarity between the two users is determined based on the weighted evaluation quantity, the average evaluation quantity, the evaluation time weight factor, and the activity weight factor.
6. The method according to claim 5, characterized in that The determining the activity weight factor of the user according to the number of the third evaluations of the user includes: If the number of the third evaluations of the user is less than a preset threshold, the activity weight factor of the user is determined according to a first difference between the number of the third evaluations of the user and the preset threshold, and the activity weight factor is positively correlated with the first difference.
7. The method according to claim 6, characterized in that The determining the activity weight factor of the user according to the number of the third evaluations of the user includes: If the number of the third evaluations by the user is greater than the preset threshold, obtaining the number of recent evaluations by the user on all target objects; Based on a first ratio between the number of recent evaluations of the user and a preset threshold, and a first difference between the number of third evaluations of the user and the preset threshold, an activity weight factor of the user is determined, and the activity weight factor is positively correlated with the first ratio and the first difference.
8. The method according to claim 7, characterized in that The determining of the activity weight factor of the user according to a first ratio between the number of recent evaluations of the user and a preset threshold, and a first difference between the number of third evaluations of the user and the preset threshold, comprises: Determining a second difference between the third number of evaluations and the number of recent evaluations; determining a second ratio between the second difference and the preset threshold; An activity weight factor of the user is determined according to the second ratio, the first ratio and the first difference, where the activity weight factor is negatively correlated to the second ratio.
9. A user similarity analysis device, characterized in that: include: An acquisition module, used to acquire target object categories corresponding to multiple target objects respectively; A processing module, configured to obtain first evaluation data corresponding to two users respectively, each of the first evaluation data comprising the number of first evaluations by the user on objects of the target object category and the average number of evaluations by the user on objects of a single target object category; A determination module is used to determine the similarity between the two users based on the first evaluation data of the two users.
10. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: An executable code is stored thereon, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as claimed in any one of claims 1 to 8.
12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
