Methods, devices, electronic equipment, media, and products for recommending friends
By calculating the activity and similarity of the target user's second-degree friends and mutual friends, highly active and similar second-degree friends are recommended, solving the problem of low success rate of friend recommendations in online games and improving user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2026-03-06
AI Technical Summary
In online games, based on existing friend recommendation methods, unfamiliar users are less willing to establish friendships, resulting in unsatisfactory recommendation effects and a low success rate.
By determining the activity level of each friend in the target user's social circle, the number and activity level of mutual friends between the target user and their second-degree friends are calculated. A recommendation value is calculated based on activity level and similarity, and highly active and similar second-degree friends are recommended to the target user, who is also informed of their mutual friends.
It increased the willingness of target users to establish friendships with second-degree friends, enhanced the sense of connection, promoted friend additions, and improved the accuracy and success rate of recommendation results.
Smart Images

Figure CN116236793B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of game technology, and in particular to a method, apparatus, electronic device, medium, and product for recommending friends. Background Technology
[0002] In online games, social interaction provides players with a variety of different ways to play. For example, after multiple players establish a friendship relationship, they can team up to participate in the game together, which greatly enhances the players' gaming experience.
[0003] Currently, to facilitate users in discovering and adding friends, enhance the gaming experience, and increase player engagement, many games and gaming application platforms have incorporated friend recommendation features. Friend recommendations typically match users with similar gaming preferences, such as random recommendations or recommendations from teammates.
[0004] However, in the context of social gaming, based on the aforementioned friend recommendation method, the two strangers being recommended are less willing to establish a friendship, resulting in an unsatisfactory recommendation effect and a low success rate for friend recommendations. Summary of the Invention
[0005] In view of the above problems, embodiments of the present invention are proposed to provide a method, apparatus, electronic device, medium and product for recommending friends that overcomes or at least partially solves the above problems.
[0006] To achieve the above objectives, the present invention provides a method for recommending friends, the method comprising:
[0007] Determine the activity level of each friend in the target user's friend circle; wherein, the friend circle includes first-degree friends and second-degree friends, the first-degree friends are the target user's friends, and the second-degree friends are the friends of the first-degree friends;
[0008] For a single second-degree friend, identify the common friends of the single second-degree friend and the target user, and calculate the recommendation value of the single second-degree friend based on the activity level of the single second-degree friend and the activity level of the common friends.
[0009] Target second-degree friends are identified based on the recommendation scores of each second-degree friend and recommended to the target user. The target user is also informed of the mutual friends between the target second-degree friends and the target user.
[0010] Preferably, the step of determining the activity level of each friend in the target user's friend circle includes:
[0011] Obtain the historical login time of each friend in the target user's friend circle, and calculate the activity level of each friend based on the historical login time and the current time.
[0012] Preferably, the step of calculating the activity level of each friend based on the historical login time and the current time includes:
[0013] Calculate the continuous active time of each friend in the friend circle after their historical login;
[0014] The activity level of each friend is calculated based on the continuous active time, the historical login time, and the current time.
[0015] Preferably, the step of determining the common friends of a single second-degree friend and the target user includes:
[0016] Obtain the historical login time of each friend, and determine the list of users who logged in within a specified time based on the historical login time;
[0017] For a single second-degree friend in the user list, determine the common friends of the single second-degree friend and the target user.
[0018] Preferably, the step of calculating the recommendation value of a single second-degree friend based on the activity level of the individual second-degree friend and the activity level of the mutual friends includes:
[0019] For a single mutual friend, the activity score of the single mutual friend is determined based on the activity level of the single second-degree friend and the activity level of the single mutual friend.
[0020] The recommendation value of a single second-degree friend is calculated based on the activity scores of all mutual friends corresponding to that single second-degree friend.
[0021] Preferably, the step of determining the activity score of a single mutual friend based on the activity level of the single second-degree friend and the activity level of the mutual friend includes:
[0022] For a single mutual friend, a preset coefficient for that mutual friend is determined based on the activity level of that mutual friend;
[0023] The activity score of the individual second-degree friend is determined based on the activity level of the individual second-degree friend, the activity level of the mutual friend, and the preset coefficient.
[0024] Preferably, the step of calculating the recommendation value of a single second-degree friend based on the activity scores of each mutual friend corresponding to that single second-degree friend includes:
[0025] The average activity score of a single second-degree friend is determined based on the activity scores of all mutual friends corresponding to that single second-degree friend.
[0026] The recommendation value of a single second-degree friend is determined based on the average activity score.
[0027] Preferably, the step of determining the target second-degree friend based on the recommendation value includes:
[0028] Determine the similarity between the individual second-degree friend and the target user;
[0029] Based on the similarity and the recommendation value, the target second-degree friend is determined.
[0030] Preferably, the step of determining the similarity between the individual second-degree friend and the target user includes:
[0031] Determine the number of friends of the target user, the number of friends of a single second-degree friend, and the number of mutual friends of the target user and the single second-degree friend;
[0032] The similarity between the target user and the individual second-degree friend is determined based on the number of friends of the target user, the number of friends of the individual second-degree friend, and the number of mutual friends.
[0033] Furthermore, to achieve the above objectives, the present invention also provides a device for recommending friends, the device comprising:
[0034] The determination module is used to determine the activity level of each friend in the target user's friend circle; wherein, the friend circle includes first-degree friends and second-degree friends, the first-degree friends are the target user's friends, and the second-degree friends are the friends of the first-degree friends;
[0035] The calculation module is used to determine the common friends of the single second-degree friend and the target user for a single second-degree friend, and to calculate the recommendation value of the single second-degree friend based on the activity level of the single second-degree friend and the activity level of the common friends.
[0036] The recommendation module is used to determine target second-degree friends based on the recommendation values of each second-degree friend and recommend them to the target user, and to inform the target user of the mutual friends between the target second-degree friends and the target user.
[0037] In addition, to achieve the above objectives, the present invention also provides an electronic device, the electronic device comprising: a memory, a processor, and a friend recommendation program stored in the memory and executable on the processor, wherein when the friend recommendation program is executed by the processor, it implements the steps of the friend recommendation method as described above.
[0038] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a friend recommendation program, which, when executed by a processor, implements the steps of the friend recommendation method as described above.
[0039] In addition, to achieve the above objectives, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method for recommending friends as described above.
[0040] This invention proposes a method, apparatus, electronic device, medium, and product for recommending friends. The method includes: determining the activity level of each friend in a target user's friend circle; wherein the friend circle includes first-degree friends and second-degree friends, the first-degree friends being friends of the target user, and the second-degree friends being friends of the first-degree friends; for a single second-degree friend, determining the common friends of the single second-degree friend and the target user, and calculating the recommendation value of the single second-degree friend based on the activity level of the single second-degree friend and the activity level of the common friends; determining target second-degree friends based on the recommendation values of each second-degree friend and recommending them to the target user, and informing the target user of the common friends between the target second-degree friend and the target user. By considering the activity level of common friends when recommending second-degree friends and informing the target user of the common friends, embodiments of this invention can increase the sense of connection between the recommended friend and the target user; thereby encouraging the target user to add the recommended friend as a friend. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention;
[0042] Figure 2 This is a flowchart illustrating a method for recommending friends according to a first embodiment of the present invention.
[0043] Figure 3 A flowchart illustrating another method for recommending friends provided in the second embodiment of the present invention;
[0044] Figure 4 A flowchart illustrating a method for recommending friends provided in the third embodiment of the present invention;
[0045] Figure 5 This is a flowchart illustrating a method for recommending friends according to a fourth embodiment of the present invention.
[0046] Figure 6 A flowchart illustrating another method for recommending friends provided in the fourth embodiment of the present invention;
[0047] Figure 7A flowchart illustrating another method for recommending friends provided in the fifth embodiment of the present invention;
[0048] Figure 8 This is a flowchart illustrating a method for recommending friends according to the sixth embodiment of the present invention.
[0049] Figure 9 A flowchart illustrating another method for recommending friends provided in the sixth embodiment of the present invention;
[0050] Figure 10 This is a schematic diagram of the functional modules of a friend recommendation device provided in the seventh embodiment of the present invention.
[0051] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0052] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0053] like Figure 1 As shown, Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.
[0054] The electronic device in this embodiment of the invention can be a mobile terminal or a server device.
[0055] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0056] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0057] like Figure 1As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a friend recommendation program.
[0058] The operating system is a program that manages and controls electronic devices and software resources, and supports the operation of the network communication module, user interface module, friend recommendation program, and other programs or software; the network communication module is used to manage and control the network interface 1002; and the user interface module is used to manage and control the user interface 1003.
[0059] exist Figure 1 In the electronic device shown, the electronic device calls the recommended friend program stored in the memory 1005 through the processor 1001, and performs the operations in the various embodiments of the recommended friend method described below.
[0060] Based on the above hardware structure, an embodiment of the method for recommending friends according to the present invention is proposed.
[0061] This embodiment provides a method for recommending friends, which can be applied to social gaming. (See reference...) Figure 2 , Figure 2 This is a flowchart illustrating a first embodiment of the friend recommendation method of the present invention. The friend recommendation method may include:
[0062] Step S10: Determine the activity level of each friend in the target user's friend circle; wherein, the friend circle includes first-degree friends and second-degree friends, the first-degree friends are the target user's friends, and the second-degree friends are the friends of the first-degree friends.
[0063] The target user's circle of friends includes first-degree friends and second-degree friends; first-degree friends can be the target user's friends. Second-degree friends can be the friends of first-degree friends.
[0064] In this embodiment, in order to improve the recommendation effect, the first-degree friends of the target user can be identified, and then the second-degree friends of the target user can be identified based on the first-degree friends to obtain the target user's friend circle; thus, the activity level of each friend in the friend circle can be determined separately.
[0065] Step S20: For a single second-degree friend, determine the common friends of the single second-degree friend and the target user, and calculate the recommendation value of the single second-degree friend based on the activity level of the single second-degree friend and the activity level of the common friends.
[0066] Mutual friends refer to the same friends of the target user and their second-degree friend within the game or game application platform. The more mutual friends the target user and their second-degree friend have, the closer their relationship is; conversely, the fewer mutual friends the target user and their second-degree friend have, the more distant their relationship is.
[0067] The recommendation score is a recommendation index for a single second-degree friend, calculated based on the activity levels of both that friend and mutual friends. For example, the higher the activity levels of both the second-degree friend and mutual friends, the higher the recommendation score for that second-degree friend.
[0068] In practice, for a single second-degree friend, the mutual friends of the single second-degree friend and the target user can be identified from the target user's friend circle; then, the recommendation value of the single second-degree friend can be calculated based on the activity level of the single second-degree friend and the activity level of the mutual friends.
[0069] As an example, if a second-degree friend M and the target user N have three mutual friends a, b, and c, the recommendation value of the second-degree friend M can be calculated based on the activity level of the second-degree friend M, as well as the activity levels of the three mutual friends a, b, and c.
[0070] Step S30: Determine target second-degree friends based on the recommendation values of each second-degree friend and recommend them to the target user, and inform the target user of the mutual friends between the target second-degree friends and the target user.
[0071] Among them, target second-degree friends can be one or more second-degree friends selected based on their recommendation scores. For example, second-degree friends whose recommendation scores exceed a specified threshold can be designated as target second-degree friends. Target second-degree friends are selected as reliable second-degree friends, and recommending these target second-degree friends to the target users can ensure the recommendation effect.
[0072] For example, the recommendation scores can be sorted from highest to lowest, and one or more second-degree friends with the highest recommendation scores can be identified as target second-degree friends.
[0073] In its implementation, after determining the recommendation value of a single second-degree friend, one or more target second-degree friends can be identified based on this value and recommended to the target user. Simultaneously, the target user is informed of any mutual friends between the target second-degree friend and the target user. By informing the target user of these mutual friends in a team-based game social scenario, this increases the willingness of the two strangers to establish a friendship, and also increases the probability of the target user adding them as friends.
[0074] This embodiment determines the activity level of each friend in a target user's social circle. The social circle includes first-degree friends and second-degree friends; first-degree friends are the target user's friends, and second-degree friends are the friends of the first-degree friends. For each second-degree friend, common friends between the second-degree friend and the target user are determined, and a recommendation value is calculated based on the activity levels of the second-degree friend and the common friends. Target second-degree friends are determined based on the recommendation values of each second-degree friend and recommended to the target user. The target user is also informed of the common friends between the target second-degree friend and the target user. This embodiment of the invention, by considering the activity level of common friends when recommending second-degree friends in game-based social interactions and informing the target user of these common friends, can increase the sense of connection between the target user and their second-degree friends, thereby encouraging the target user to add the recommended friends as friends.
[0075] Based on the foregoing embodiments, a second embodiment of the method for recommending friends according to the present invention is proposed. In one embodiment, step S10 may include the following sub-steps:
[0076] Sub-step S101: Obtain the historical login time of each friend in the target user's friend circle, and calculate the activity level of each friend based on the historical login time and the current time.
[0077] Among these, historical login time can be the login time of each friend in the past when they logged into the game or game application platform. For example, the login time of a user when they logged into the game or game application platform half a month ago can be used as the user's historical login time.
[0078] In practice, the historical login time of each friend in the target user's social circle can be obtained; then, for each friend in the social circle, the activity level of each friend can be calculated based on the historical login time and the current time.
[0079] Furthermore, referring to Figure 3 In one embodiment, sub-step S101 may further include the following sub-steps:
[0080] Sub-step S1011: Calculate the continuous active time of each friend in the friend circle after their historical login.
[0081] Sub-step S1012: Calculate the activity level of each friend based on the continuous active time, the historical login time, and the current time.
[0082] Among them, the continuous active time can be the online time of each friend in the friend circle after logging into the game or game application platform in history.
[0083] In this embodiment, the continuous active time after each friend in the target user's circle of friends after historical login can be calculated first. Further, the activity level of each friend can be calculated based on the continuous active time, historical login time, and current time. Thus, in order to reflect user stickiness, the continuous active time after historical login is added when calculating the activity level of each friend. By using the three dimensions of historical login time, current time, and continuous active time after successful historical login to calculate the activity level of each friend, a more accurate and realistic activity level of friends can be reflected.
[0084] In this embodiment, the historical login time of each friend in the target user's friend circle is obtained, and the activity level of each friend is calculated based on the historical login time and the current time. Thus, the activity level of each friend can be calculated based on the historical login time and the current time of each friend in the friend circle, thereby improving the accuracy of activity level calculation.
[0085] Based on the foregoing embodiments, a third embodiment of the friend recommendation method of the present invention is proposed. (Refer to...) Figure 4 In one embodiment, step S20 may further include the following sub-steps:
[0086] Sub-step S201: Obtain the historical login time of each friend, and determine the list of users who logged in within the specified time based on the historical login time.
[0087] The user list can be a list of friends from the friend circles of the target user who logs into the game or game application platform within a specified time.
[0088] The specified time can be configured according to the actual situation; for example, the specified time can be 7 days or 1 month.
[0089] In practice, by obtaining the historical login time of each friend, a list of users who logged into the game or game application platform within a specified time can be filtered based on the historical login time.
[0090] Sub-step S202: For a single second-degree friend in the user list, determine the common friends of the single second-degree friend and the target user.
[0091] After determining the user list, for a single second-degree friend in the user list, the mutual friends of the single second-degree friend and the target user can be determined based on the single second-degree friend and the target user's friend circle; thus, second-degree friends with higher activity can be filtered out by historical login time.
[0092] In this embodiment, by obtaining the historical login time of each friend, a list of users who logged in within a specified time is determined based on the historical login time; for a single second-degree friend in the user list, the common friends of the single second-degree friend and the target user are determined; thus, by using the historical login time of each friend, more active second-degree friends can be filtered out, and the common friends of the more active second-degree friends and the target user can be determined, ensuring the friend recommendation effect.
[0093] Based on the foregoing embodiments, a fourth embodiment of the friend recommendation method of the present invention is proposed. (Refer to...) Figure 5 In one embodiment, step S20 may include the following sub-steps:
[0094] Sub-step S203: For a single mutual friend, determine the activity score of the single mutual friend based on the activity level of the single second-degree friend and the activity level of the single mutual friend.
[0095] In practice, after identifying the mutual friends of a single second-degree friend and the target user, an activity score can be calculated for each mutual friend based on the activity level of both the second-degree friend and the mutual friend.
[0096] Furthermore, referring to Figure 6 In one embodiment, sub-step S203 may further include the following sub-steps:
[0097] Sub-step S2031: For a single mutual friend, determine the preset coefficient of the single mutual friend based on the activity level of the single mutual friend;
[0098] Sub-step S2032: Determine the activity score of the single second-degree friend based on the activity level of the single second-degree friend, the activity level of the mutual friend, and the preset coefficient.
[0099] The preset coefficient can be the weight coefficient of a single mutual friend determined by the activity level of that mutual friend.
[0100] For example, activity levels can be divided into multiple levels according to different ranges, and then the correspondence between activity levels and preset coefficients can be set, where the higher the activity level, the larger the corresponding preset coefficient.
[0101] As an example, the relationship between the activity level of mutual friends and the preset coefficient is shown in Table 1 below:
[0102]
[0103] As can be seen from Table 1, the higher the activity level of mutual friends, the higher the preset coefficient will be; conversely, the lower the activity level of mutual friends, the lower the preset coefficient will be.
[0104] In practical implementation, for each mutual friend, a preset coefficient can be determined based on the friend's activity level. Furthermore, based on the activity levels of individual second-degree friends, the mutual friend, and the preset coefficient, an activity score is calculated for each mutual friend. The preset coefficient can be used to increase the impact of mutual friend activity on the recommendation value, placing second-degree friends with higher activity levels in higher recommendation positions and those with lower activity levels in lower positions, thereby improving the accuracy of friend recommendations.
[0105] As an example, the activity score of a single second-degree friend can be calculated by multiplying the activity level of a mutual friend by the activity level of a mutual friend and a preset coefficient.
[0106] Sub-step S204: Calculate the recommendation value of the single second-degree friend based on the activity scores of each mutual friend corresponding to the single second-degree friend.
[0107] In practice, after determining the activity score of a single mutual friend, the recommendation value of a single second-degree friend can be determined based on the activity scores of each mutual friend corresponding to that single second-degree friend.
[0108] As an example, the recommendation value for a single second-degree friend can be calculated by summing the activity scores of all mutual friends corresponding to that second-degree friend.
[0109] In this embodiment, by targeting a single mutual friend, determining the activity score of the single second-degree friend based on the activity level of the single second-degree friend and the activity level of the single mutual friend; and calculating the recommendation value of the single second-degree friend based on the activity scores of each mutual friend corresponding to the single second-degree friend; thus, by calculating the recommendation value of a single second-degree friend based on the activity level of the single second-degree friend and the activity levels of each mutual friend corresponding to it, the targeting and accuracy of friend recommendations can be improved.
[0110] Based on the foregoing embodiments, a fifth embodiment of the friend recommendation method of the present invention is proposed. (Refer to...) Figure 7 In one embodiment, sub-step S204 may further include the following sub-steps:
[0111] Sub-step S2041: Determine the average activity score of the single second-degree friend based on the activity scores of each mutual friend corresponding to the single second-degree friend;
[0112] Sub-step S2042: Determine the recommendation value of a single second-degree friend based on the average activity score.
[0113] The average activity score can be the average of the activity scores of all mutual friends corresponding to a single second-degree friend.
[0114] In practice, after determining the activity score of a single mutual friend, the average activity score of that mutual friend can be determined based on the activity scores of all mutual friends associated with that mutual friend. This average activity score can then be used as the recommendation value for that mutual friend. By using the average activity level to calculate the recommendation value for mutual friends, the influence of mutual friend activity on the recommendation value can be increased. This results in mutual friends with higher activity levels being placed in higher recommendation positions, while mutual friends with lower activity levels are placed in lower recommendation positions, thereby improving the accuracy of friend recommendations.
[0115] Furthermore, in one embodiment, sub-step S204 may further include: adding a preset coefficient when calculating the activity score of a single mutual friend. For details, please refer to the above sub-steps S2031 to S2032, which will not be repeated here. First, execute the sub-steps S2031-S2032 above. For a single mutual friend, determine its corresponding preset coefficient based on the activity level of the single mutual friend. Then, determine the activity score of the single mutual friend based on the activity levels of the single second-degree friend, the mutual friend, and the preset coefficient. Further, execute the sub-steps S2041-S2042 above to calculate the average activity score of each mutual friend corresponding to the single second-degree friend, which is used as the average activity score of the single second-degree friend. The average activity score of the single second-degree friend can then be determined as the recommendation value of the single second-degree friend. By incorporating the preset coefficient when calculating the activity score of mutual friends, and then averaging the activity scores of mutual friends calculated based on the preset coefficient, the second-degree friends of highly active mutual friends are given higher priority for recommendation, reducing potential interference caused by low activity levels of multiple mutual friends, thereby improving the accuracy of friend recommendations.
[0116] In this embodiment, the average activity score of a single second-degree friend is determined based on the activity scores of all mutual friends corresponding to that single second-degree friend; the recommendation value of the single second-degree friend is determined based on the average activity score; thus, the recommendation value of a single second-degree friend can be determined based on the average activity score of the single second-degree friend; thereby reducing potential interference caused by low activity levels of multiple mutual friends and improving the accuracy of friend recommendations.
[0117] Based on the foregoing embodiments, a sixth embodiment of the friend recommendation method of the present invention is proposed. (Refer to...) Figure 8In one embodiment, step S30 may include the following sub-steps:
[0118] Sub-step S301: Determine the similarity between the single second-degree friend and the target user;
[0119] Sub-step S302: Determine the target second-degree friend based on the similarity and the recommendation value.
[0120] Similarity can be used to represent the degree of social similarity between a single second-degree friend and the target user in a game or game application platform.
[0121] In practical implementation, the similarity between a single second-degree friend and the target user can be determined based on both the second-degree friend and their mutual friends. Then, the target second-degree friend can be identified based on the similarity and the recommendation score of the single second-degree friend.
[0122] As an example, we can first determine whether the similarity between a single second-degree friend and the target user is not less than a preset threshold (for example, the preset threshold is 50%). If the similarity is greater than or equal to the preset threshold, it means that the single second-degree friend and the target user are considered suitable to be matched as friends, and the multiple second-degree friends can be identified as target second-degree friends. If the similarity is less than the preset threshold, it means that the single second-degree friend and the target user are considered unsuitable to be matched as friends, and the multiple second-degree friends cannot be identified as target second-degree friends.
[0123] As another example, the recommendation value of a single second-degree friend can be multiplied by its similarity to the target user to obtain the final recommendation value; furthermore, the final recommendation values can be sorted in descending order, and one or more second-degree friends with the highest final recommendation values can be identified as target second-degree friends.
[0124] Furthermore, referring to Figure 9 In one embodiment, sub-step S301 may further include the following sub-steps:
[0125] Sub-step S3011: Determine the number of friends of the target user, the number of friends of the single second-degree friend, and the number of mutual friends of the target user and the single second-degree friend;
[0126] Sub-step S3012: Determine the similarity between the single second-degree friend and the target user based on the number of friends of the target user, the number of friends of the single second-degree friend, and the number of mutual friends.
[0127] The number of mutual friends can be the number of shared friends between the target user and a single second-degree friend.
[0128] In this embodiment, the number of friends of the target user, the number of friends of a single second-degree friend, and the number of mutual friends between the target user and the single second-degree friend can be determined first. Furthermore, the similarity between a single second-degree friend and the target user can be determined based on the number of friends of the target user, the number of friends of a single second-degree friend, and the number of mutual friends.
[0129] In practice, the similarity calculation formula between a single second-degree friend and the target user can be: the square root of the product of the number of mutual friends ÷ the number of friends of each individual. Here, the product of the number of friends of each individual can be the product of the number of friends of the single second-degree friend and the number of friends of the target user.
[0130] In this embodiment, the similarity between the individual second-degree friend and the target user is determined; the target second-degree friend is determined based on the similarity and the recommendation value; thus, the target second-degree friend can be determined based on the similarity between the individual second-degree friend and the target user and the recommendation value of the second-degree friend, thereby achieving high-precision friend recommendation.
[0131] The seventh embodiment of the present invention also provides a friend recommendation device corresponding to the friend recommendation method in the foregoing embodiments. Since the principle by which the device in the seventh embodiment solves the problem is similar to the friend recommendation method in the foregoing embodiments, the implementation of the device can refer to the implementation of the method, and repeated details will not be described again. See also... Figure 10 The device for recommending friends in this invention may include:
[0132] The determining module 10 is used to determine the activity level of each friend in the target user's friend circle; wherein, the friend circle includes first-degree friends and second-degree friends, the first-degree friends are the target user's friends, and the second-degree friends are the friends of the first-degree friends;
[0133] The calculation module 20 is used to determine the common friends of the single second-degree friend and the target user for a single second-degree friend, and to calculate the recommendation value of the single second-degree friend based on the activity level of the single second-degree friend and the activity level of the common friends.
[0134] The recommendation module 30 is used to determine target second-degree friends based on the recommendation values of each second-degree friend and recommend them to the target user, and to inform the target user of the mutual friends between the target second-degree friends and the target user.
[0135] Optionally, the determining module 10 may further include:
[0136] The first unit is used to obtain the historical login time of each friend in the target user's circle of friends, and to calculate the activity level of each friend based on the historical login time and the current time.
[0137] Optionally, the first unit may further include:
[0138] The first subunit is used to calculate the continuous active time of each friend in the friend circle after their historical login.
[0139] The second sub-unit is used to calculate the activity level of each friend based on the continuous active time, the historical login time, and the current time.
[0140] Optionally, the computing module 20 may further include:
[0141] The second unit is used to obtain the historical login time of each friend, and determine the list of users who logged in within a specified time based on the historical login time.
[0142] The third unit is used to determine the common friends of the target user and the single second-degree friend in the user list.
[0143] Optionally, the computing module 20 may further include:
[0144] The fourth unit is used to determine the activity score of a single mutual friend based on the activity level of the single second-degree friend and the activity level of the single mutual friend.
[0145] The fifth unit is used to calculate the recommendation value of a single second-degree friend based on the activity scores of each mutual friend corresponding to that single second-degree friend.
[0146] Optionally, the fourth unit may further include:
[0147] The third subunit is used to determine a preset coefficient for a single mutual friend based on the activity level of that single mutual friend.
[0148] The fourth subunit is used to determine the activity score of the single second-degree friend based on the activity level of the single second-degree friend, the activity level of the mutual friend, and the preset coefficient.
[0149] Optionally, the fifth unit may further include:
[0150] The fifth subunit is used to determine the average activity score of the single second-degree friend based on the activity scores of each mutual friend corresponding to the single second-degree friend;
[0151] The sixth subunit is used to determine the recommendation value of a single second-degree friend based on the average activity score.
[0152] Optionally, the recommendation module 30 may further include:
[0153] The sixth unit is used to determine the similarity between the individual second-degree friend and the target user;
[0154] The seventh unit is used to determine the target second-degree friend based on the similarity and the recommendation value.
[0155] Optionally, the sixth unit may further include:
[0156] The seventh subunit is used to determine the number of friends of the target user, the number of friends of the single second-degree friend, and the number of mutual friends of the target user and the single second-degree friend;
[0157] The eighth subunit is used to determine the similarity between the single second-degree friend and the target user based on the number of friends of the target user, the number of friends of the single second-degree friend, and the number of mutual friends.
[0158] Furthermore, the present invention also provides a computer-readable storage medium storing a friend recommendation program thereon, which, when executed by a processor, implements the steps of the friend recommendation method as described above.
[0159] The method implemented when the friend recommendation program running on the processor is executed can be referred to in various embodiments of the friend recommendation method of the present invention, and will not be repeated here.
[0160] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0161] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0162] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause an electronic device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0163] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method of recommending a friend, characterized by, The method comprises: determining the activity of each friend in the friend circle of a target user; wherein the friend circle comprises first-degree friends and second-degree friends, the first-degree friends being friends of the target user, and the second-degree friends being friends of the first-degree friends; for a single second-degree friend, determining common friends of the single second-degree friend and the target user, and calculating a recommendation value of the single second-degree friend according to the activity of the single second-degree friend and the activity of the common friends; determining a target second-degree friend according to the recommendation value of each second-degree friend and recommending the target second-degree friend to the target user, and informing the target user of the common friends between the target second-degree friend and the target user; wherein the step of calculating the recommendation value of the single second-degree friend according to the activity of the single second-degree friend and the activity of the common friends comprises: for a single common friend, determining an activity score of the single common friend according to the activity of the single second-degree friend and the activity of the single common friend; calculating the recommendation value of the single second-degree friend according to the activity score of each common friend corresponding to the single second-degree friend; wherein the step of determining the activity score of the single common friend according to the activity of the single second-degree friend and the activity of the single common friend comprises: for a single common friend, determining a preset coefficient of the single common friend according to the activity of the single common friend, wherein the activity is graded, and the higher the level of the activity, the greater the value of the preset coefficient corresponding to the activity; determining the activity score of the single common friend according to the activity of the single second-degree friend, the activity of the single common friend, and the preset coefficient; wherein the step of calculating the recommendation value of the single second-degree friend according to the activity score of each common friend corresponding to the single second-degree friend comprises: determining an average activity score of the single second-degree friend according to the activity score of each common friend corresponding to the single second-degree friend; determining the recommendation value of the single second-degree friend according to the average activity score; wherein the step of determining a target second-degree friend according to the recommendation value comprises: determining the similarity of the single second-degree friend and the target user, the similarity representing the social similarity of the single second-degree friend and the target user on a game application platform; determining a target second-degree friend according to the similarity and the recommendation value; wherein the step of determining the similarity of the single second-degree friend and the target user comprises: determining the number of friends of the target user, the number of friends of the single second-degree friend, and the number of common friends of the target user and the single second-degree friend; The similarity between the single second-degree friend and the target user is determined according to the number of friends of the target user, the number of friends of the single second-degree friend, and the number of common friends, and a calculation formula for determining the similarity between the single second-degree friend and the target user is: the number of common friends ÷ square root of the product of the number of friends of the target user and the number of friends of the single second-degree friend.
2. The method of claim 1, wherein, The step of determining the activity of each friend in the friend circle of the target user comprises: The historical login time of each friend in the friend circle of the target user is obtained, and the activity of each friend is calculated according to the historical login time and the current time.
3. The method of claim 2, wherein, The step of calculating the activity of each friend according to the historical login time and the current time comprises: The continuous active time of each friend in the friend circle after historical login is calculated; The activity of each friend is calculated according to the continuous active time, the historical login time, and the current time.
4. The method according to any one of claims 1 to 3, characterized in that, The step of determining, for a single second-degree friend, the common friends of the single second-degree friend and the target user comprises: The historical login time of each friend is obtained, and a user list that logs in within a specified time is determined according to the historical login time; For a single second-degree friend in the user list, the common friends of the single second-degree friend and the target user are determined.
5. An apparatus for recommending a friend, the apparatus comprising: The device comprises: A determination module is configured to determine the activity of each friend in the friend circle of a target user; wherein the friend circle comprises first-degree friends and second-degree friends, the first-degree friends are friends of the target user, and the second-degree friends are friends of the first-degree friends; A calculation module is configured to determine, for a single second-degree friend, the common friends of the single second-degree friend and the target user, and to calculate a recommendation value of the single second-degree friend according to the activity of the single second-degree friend and the activity of the common friends; A recommendation module is configured to determine a target second-degree friend according to the recommendation value of each second-degree friend and recommend the target second-degree friend to the target user, and to inform the target user of the common friends between the target second-degree friend and the target user; The calculation module is further configured to determine, for a single common friend, an active score of the single common friend according to the activity of the single second-degree friend and the activity of the single common friend; The recommendation value of the single second-degree friend is calculated according to the active score of each common friend corresponding to the single second-degree friend; The calculation module is further configured to determine, for a single common friend, a preset coefficient of the single common friend according to the activity of the single common friend, wherein the activity is graded, and the higher the level of the activity, the greater the value of the preset coefficient corresponding to the activity; The active score of the single common friend is determined according to the activity of the single second-degree friend, the activity of the common friend, and the preset coefficient; The calculation module is further configured to determine the average active score of the single second-degree friend according to the active score of each common friend corresponding to the single second-degree friend; and determine a recommendation value of the single second-degree friend according to the average active score; determine a similarity between the single second-degree friend and the target user according to the recommendation value and the similarity; determine a target second-degree friend according to the similarity and the recommendation value; determine a number of friends of the target user and a number of friends of the single second-degree friend, and a number of common friends of the target user and the single second-degree friend; determine the similarity between the single second-degree friend and the target user according to the number of friends of the target user and the number of friends of the single second-degree friend, and the number of common friends, wherein a calculation formula of the similarity between the single second-degree friend and the target user is: the number of common friends ÷ square root of the product of the number of friends of the target user and the number of friends of the single second-degree friend.
6. An electronic device, comprising: The electronic device includes a memory, a processor, and a program or instructions stored on the memory and executable on the processor, and the program or instructions are executed by the processor to implement the steps of the method of any one of claims 1 to 4.
7. A computer readable storage medium characterized in that, The computer readable storage medium stores a program, and the program is executed by the processor to implement the steps of the method of any one of claims 1 to 4.
8. A computer program product, characterised in that, The computer readable storage medium stores a program, and the program is executed by the processor to implement the steps of the method of any one of claims 1 to 4. The computer readable storage medium stores a program, and the program is executed by the processor to implement the steps of the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Friend recommending method and system
CN105245435A