A method and device for recommending friends in a game
By building a friend relationship library and calculating the friend tendency, the problem of low accuracy and success rate of friend recommendations in the game is solved, and the recommendation process is matched with the user's friend tendency, improving the targetedness and accuracy of recommendations.
Patent Information
- Application Number
- CN202210322844.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-03-30
AI Technical Summary
The existing game friend recommendation methods have problems such as insufficient accuracy and low recommendation success rate, especially random recommendations, team friend recommendations, dialogue matching recommendations and combat power matching recommendations, etc., which fail to truly base on users' dating tendencies, resulting in high uncertainty in recommendation results.
By constructing a friend relationship gallery, based on the user's dating relationship data in multiple games, the friend tendency between users is calculated, and recommendations are made when the predetermined tendency threshold is reached to ensure that the recommendations are in line with the user's real dating tendency.
It improves the accuracy and success rate of friend recommendations, avoids the repeated recommendations of high-power players and affects the user experience, promotes the healthy development of social attributes in the game, and improves the reliability of data sources.
Smart Images

Figure CN114931753B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer network technologies, and particularly to a method for recommending friends in a game. This application also relates to a device for recommending friends in a game, an electronic device, and a computer-readable storage medium. Background Art
[0002] In the scenario of recommending game friends, the existing methods for recommending friends mainly include random recommendation, team friend recommendation, conversation matching recommendation, combat power matching recommendation, and high-combat-power player recommendation, etc. The above-mentioned methods for recommending friends will lead to uncertainty in the results of friend recommendation, resulting in a low success rate of friend recommendation. Summary of the Invention
[0003] Embodiments of this application provide a method, a device, an electronic device, and a computer-readable storage medium for recommending friends in a game, so as to solve the problems in the prior art that the accuracy of friend recommendation in the game friend recommendation scenario is affected and the recommendation success rate is low.
[0004] Embodiments of this application provide a method for recommending friends in a game, including:
[0005] Obtaining the friend relationship data of a user in a first game;
[0006] Based on the friend relationship data, constructing a friend relationship graph library;
[0007] Based on the friend relationship graph library, obtaining the friend tendency degree between a first user and a second user;
[0008] If the friend tendency degree reaches a predetermined tendency degree threshold, recommending the first user to the second user and / or recommending the second user to the first user in a second game.
[0009] Optionally, the nodes in the friend relationship graph library represent the users, the edges represent the historical friend relationships between the users in the first game, and the edge weights represent the number of times of establishing friend relationships between the users in the first game.
[0010] Optionally, the obtaining the friend tendency degree between a first user and a second user based on the friend relationship graph library includes:
[0011] Based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library, obtaining a tendency degree calculation method matching the connection relationship, and calculating the friend tendency degree between the first user and the second user based on the tendency degree calculation method.
[0012] Optionally, obtaining a propensity calculation method matching the connection relationship based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0013] If the nodes corresponding to the first user and the second user in the friend relationship graph library are adjacent, determine that the edge weight between the node corresponding to the first user and the node corresponding to the second user is the friend propensity between the first user and the second user.
[0014] Optionally, obtaining a propensity calculation method matching the connection relationship based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0015] If the nodes corresponding to the first user and the second user in the friend relationship graph library are not adjacent but can be connected, determine the shortest path between the node corresponding to the first user and the node corresponding to the second user, obtain the edge weights Wij of each edge on the shortest path, and calculate the friend propensity between the first user and the second user according to the following formula:
[0016]
[0017] Optionally, obtaining a propensity calculation method matching the connection relationship based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0018] If the nodes corresponding to the first user and the second user in the friend relationship graph library are not connected, determine that the friend propensity between the first user and the second user is 0.
[0019] Optionally, obtaining the friend relationship data of the user in the first game includes:
[0020] Obtain the role information of the user in the first game, and obtain the friend relationship data of the user in the first game based on the role information.
[0021] Optionally, obtaining the role information of the user in the first game includes:
[0022] Obtain the general game identifier of the user;
[0023] Based on the general game identifier, obtain the first game participated by the user, and obtain the role information of the user in the first game.
[0024] Optionally, the predetermined propensity threshold matches the accuracy of friend recommendation in the second game.
[0025] Optionally, the number of times of establishing a friend relationship between the users in the first game includes the number of times of forming a team between the users in the first game.
[0026] An embodiment of the present application further provides a friend recommendation device in a game. The friend recommendation device in the game is set on a game platform. The friend recommendation device in the game includes:
[0027] A friendship relationship data acquisition unit, configured to acquire friendship relationship data of a user in a first game;
[0028] A friend relationship graph library construction unit, configured to construct a friend relationship graph library based on the friendship relationship data;
[0029] A friend propensity acquisition unit, configured to acquire the friend propensity between a first user and a second user based on the friend relationship graph library;
[0030] A friend recommendation unit, configured to recommend the first user to the second user and / or recommend the second user to the first user in a second game if the friend propensity reaches a predetermined propensity threshold.
[0031] An embodiment of the present application further provides an electronic device, including a processor and a memory; wherein, the memory is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the above-mentioned friend recommendation method in a game.
[0032] An embodiment of the present application further provides a computer-readable storage medium, on which one or more computer instructions are stored, and the instructions are executed by a processor to implement the above-mentioned friend recommendation method in a game.
[0033] Compared with the prior art, the embodiment of the present application has the following advantages:
[0034] The method for recommending friends in a game provided by an embodiment of the present application, after obtaining the friend relationship data of a user in a first game, constructs a friend relationship graph library based on the friend relationship data, and when subsequently recommending friends, based on the friend relationship graph library, obtains the friend inclination degree between a first user and a second user. When the friend inclination degree reaches a predetermined inclination degree threshold, recommends the first user to the second user and / or recommends the second user to the first user in a second game. This method quantifies the friend recommendation process by calculating the friend inclination degree, and the quantification process depends on real historical friend relationship data, which can make the friend recommendation process in the game match the real friend-making inclination of the user, and further make the friend recommendation process conform to the friend-making inclination of the user, improving the pertinence and accuracy of the friend recommendation process. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a flowchart of the method for recommending friends in a game provided by the first embodiment of the present application;
[0036] Figure 1-A is a schematic diagram of a friend relationship provided by an embodiment of the present application;
[0037] Figure 1-B is a schematic diagram of a friend relationship graph library provided by an embodiment of the present application;
[0038] Figure 2 is a block diagram of units of a friend recommendation device in a game provided by the second embodiment of the present application;
[0039] Figure 3 is a schematic logical structure diagram of an electronic device provided by the third embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0040] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of the present application. Therefore, the present application is not limited by the specific embodiments disclosed below.
[0041] It should be noted that the terms "first", "second", "third", etc. in the embodiments of the present application and in the drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. Such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. The terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, a method for recommending friends in a game, a system, a product, or a device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods for recommending friends in a game, products, or devices.
[0042] If simply waiting for players to manually add friends, relatively speaking, it will slow down the process for players to enjoy playing games with friends. Especially when the game just starts, most players are in the stage of being alone and it is difficult to quickly find friends to play with. Therefore, game platforms generally recommend friends to players to help them quickly gain friends and enhance the gaming experience.
[0043] Currently, the common ways of friend recommendation in games are usually as follows:
[0044] Random recommendation - Friends are recommended in a random way;
[0045] Team-up friend recommendation - Players who have had temporary team-up experiences are recommended as friends;
[0046] Conversation matching recommendation - Players who have had temporary conversations are recommended as friends;
[0047] Combat power matching recommendation - Players with similar combat power in the player's server are recommended;
[0048] High combat power player recommendation - Players with relatively high combat power in the server are recommended as friends.
[0049] The above-mentioned friend recommendation methods have the following deficiencies:
[0050] In random recommendation, team-up friend recommendation, and conversation matching recommendation, the process of recommending friends does not truly rely on the user's friendship preferences. That is, the randomly recommended players, players who have had temporary team-up experiences, and players who have had temporary conversations do not necessarily match the user's friendship preferences, and the friend recommendation results are uncertain, resulting in a low recommendation success rate;
[0051] There are the following problems with combat power matching recommendations, high combat power player recommendations, and other combat power-related recommendation methods: High combat power players are repeatedly recommended, causing great trouble to the players being added, affecting the user experience, and making high combat power players become the social center (having many friends), while other players have relatively few friends, affecting the healthy development of the social attributes in the game; moreover, at the beginning of the game service stage, the combat power gap among players has not yet widened, making combat power matching recommendations, high combat power player recommendations, and other combat power-related recommendation methods ineffective, resulting in blind recommendations;
[0052] Moreover, the above-mentioned friend recommendation methods all simply make corresponding friend recommendations based on the data within a single game and server, and the data they are based on has limitations, further resulting in a relatively low success rate of friend recommendations.
[0053] Therefore, in the process of friend recommendation in online games, in order to improve the accuracy and success rate of the friend recommendation process, and make the recommended friends more in line with the friend-making tendencies of the recommended users, this application provides a friend recommendation method in a game, a friend recommendation device in the game corresponding to the friend recommendation method in the game, an electronic device capable of implementing the friend recommendation method in the game, and a computer-readable storage medium. The following provides embodiments to describe in detail the above-mentioned friend recommendation method in the game, the friend recommendation device in the game, the electronic device, and the computer-readable storage medium.
[0054] The first embodiment of this application provides a friend recommendation method in a game. The application subject of this friend recommendation method in the game can be a computing device application for implementing friend recommendation in the game, and this computing device application can run on a game platform. Figure 1 This is the flowchart of the friend recommendation method in the game provided by the first embodiment of this application. The following combines Figure 1 to describe in detail the friend recommendation method in the game provided in this embodiment. The embodiments involved in the following description are used to explain the principle of the friend recommendation method in the game, and are not limitations on actual use.
[0055] As Figure 1 shown, the friend recommendation method in the game provided in this embodiment includes the following steps:
[0056] S101, obtain the friend-making relationship data of the user in the first game.
[0057] This step is used to obtain the friendship relationship data of users in the first game. Here, the users refer to multiple game players corresponding to the target network entity, and these multiple game players may have friendship records in multiple games belonging to the above-mentioned target network entity. In this embodiment, the above-mentioned first game may be a single game or multiple games. Here, multiple games are taken as an example for illustration. The above-mentioned obtaining of the friendship relationship data of users in the first game specifically may refer to: obtaining the role information of users in multiple games, and obtaining the friendship relationship data of the users in the multiple games based on the role information. For example, obtaining the general game identifier of the above-mentioned users, based on this general game identifier, obtaining the multiple games participated by the users, and obtaining the role information of the users in the multiple games, and then summarizing the friendship records of each role information in its corresponding game to obtain the friendship relationship data of the users in multiple games. The general game identifier refers to the same game account of the player in the above-mentioned network entity, such as an email address or a mobile phone number. In multiple games belonging to the above-mentioned network entity, each player corresponds to a unique and fixed general game identifier.
[0058] As Figure 1-A shown, the games belonging to the target network entity include three games, namely Game 1, Game 2, and Game 3. The general game identifier of player A is Pass A. Through this Pass A, it can be found that the role of player A in Game 1 is A1, the role in Game 2 is A2, and the role in Game 3 is A3; the general game identifier of player B is Pass B. Through this Pass B, it can be found that the role of player B in Game 1 is B1, and the role of player B in Game 2 is B2; the general game identifier of player C is Pass C. Through this Pass C, it can be found that the role of player C in Game 2 is C1, and the role of player C in Game 3 is C2. And in Game 1, the role A1 and the role B1 are in a friendship relationship, and in Game 3, the role A3 and the role C2 are in a friendship relationship. Therefore, it can be determined that player A and player B are in a friendship relationship, and player A and player C are also in a friendship relationship.
[0059] S102. Build a friend relationship graph library based on the friendship relationship data.
[0060] After obtaining the friendship relationship data of users in the first game in the above step, this step is used to build a friend relationship graph library based on the above friendship relationship data. As Figure 1-BAs shown in the figure, the friend relationship graph library may include multiple friend relationship graphs. The friend relationship graph is an undirected graph with weights. The nodes in the friend relationship graph represent users, the edges represent the historical friend relationships between users in multiple games, and the edge weights represent the number of times the users establish friend relationships in multiple games (which may include the number of times the users form teams with each other in the above multiple games). For example, if player A and player B only have a friend relationship in game 1, the weight of the edge between their corresponding nodes is 1. If player A and player B have friend relationships in both game 1 and game 2, the weight of the edge between their corresponding nodes is 2.
[0061] S103. Based on the friend relationship graph library, obtain the friend inclination degree between the first user and the second user.
[0062] After constructing the friend relationship graph library in the above steps, this step is used to obtain the friend inclination degree between the first user and the second user based on the friend relationship graph library.
[0063] In this embodiment, obtaining the friend inclination degree between the first user and the second user based on the friend relationship graph library specifically may refer to: based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library, obtain a tendency calculation method that matches the connection relationship, and calculate the friend inclination degree between the first user and the second user based on the tendency calculation method. In this embodiment, this process can be implemented in the following three ways:
[0064] Method 1: If the nodes corresponding to the first user and the second user in the friend relationship graph library are adjacent, determine that the edge weight between the nodes corresponding to the first user and the second user is the friend inclination degree between the first user and the second user;
[0065] Method 2: If the nodes corresponding to the first user and the second user in the friend relationship graph library are not adjacent but can be connected, determine the shortest path between the nodes corresponding to the first user and the second user, obtain the edge weights Wij of each edge on the shortest path, where i and j are the two nodes of any edge on the shortest path, and calculate the friend inclination degree between the first user and the second user according to the following formula:
[0066] That is, when user A and user B are not adjacent but can be connected, calculate the product of the weights corresponding to each edge on the shortest path between user A and user B and determine the obtained result as the friend inclination degree between user A and user B.
[0067] Method 3: If the nodes corresponding to the first user and the second user in the friend relationship graph library are not connected, determine that the friend inclination degree between the first user and the second user is 0.
[0068] S104. If the friend inclination degree reaches a predetermined inclination degree threshold, recommend the first user to the second user and / or recommend the second user to the first user in the second game.
[0069] After obtaining the friend inclination degree between the first user and the second user in the above step, this step is used to recommend the first user to the second user in the second game, or recommend the second user to the first user, or recommend them to each other synchronously when it is determined that the friend inclination degree reaches the predetermined inclination degree threshold. The second game refers to the game currently operated by the user and requiring friend recommendation, and both the first user and the second user are players of the second game. In this embodiment, the above-mentioned predetermined inclination degree threshold matches the friend recommendation accuracy of the second game, that is, the higher the friend recommendation accuracy, the higher the predetermined inclination degree threshold, indicating that the friend inclination degree between the first user and the second user needs to be relatively high for recommendation.
[0070] The friend recommendation method in the game provided by the embodiments of the present application, after obtaining the friend relationship data of the user in the first game, constructs a friend relationship graph library based on the friend relationship data. The nodes in the friend relationship graph library represent users, the edges represent the historical friend relationships between users in the first game, and the edge weights represent the number of times of establishing friend relationships between users in the first game. And when performing friend recommendation subsequently, based on the friend relationship graph library, obtain the friend inclination degree between the first user and the second user. Specifically, based on the connection relationship between the nodes corresponding to the first user and the second user in the friend relationship graph library, obtain a propensity calculation method that matches the connection relationship, and based on the propensity calculation method, calculate the friend inclination degree between the first user and the second user. When the friend inclination degree reaches the predetermined inclination degree threshold, recommend the first user to the second user and / or recommend the second user to the first user in the second game. This method quantifies the friend recommendation process by calculating the friend inclination degree, and this quantification process depends on real historical friend relationship data, which can make the friend recommendation process in the game match the real friend-making inclination of the user, and further make the friend recommendation process conform to the user's friend-making inclination, improving the pertinence and accuracy of the friend recommendation process.
[0071] Moreover, this method can prevent high-power players from being repeatedly recommended, which may affect the user experience, and avoid the situation where high-power players become the social center while other players have relatively few friends, thus affecting the healthy development of the social attributes in the game. Additionally, it can avoid the problem of blind recommendation due to the lack of combat power value at the beginning of the game service stage. Moreover, the friend recommendation method in the game provided in this embodiment makes corresponding friend recommendations based on the data of the first game, and the reliability of the data source is relatively high, further improving the success rate of friend recommendation.
[0072] The above first embodiment provides a friend recommendation method in a game. Correspondingly, the second embodiment of this application also provides a friend recommendation device in a game. This friend recommendation device in the game can be applied to the server of the game platform in the form of software or hardware to perform friend recommendation work. Since the embodiment of the friend recommendation device in the game is basically similar to the embodiment of the friend recommendation method in the game, the description is relatively simple. For the details of the relevant technical features, please refer to the corresponding description of the above-provided embodiment of the friend recommendation method in the game. The following description of the embodiment of the friend recommendation device in the game is only illustrative.
[0073] Please refer to Figure 2 To understand this embodiment, the figure is a block diagram of the units of the friend recommendation device in the game provided in this embodiment. As shown in the figure, the friend recommendation device in the game provided in this embodiment includes:
[0074] A friendship relationship data acquisition unit 201, configured to acquire the friendship relationship data of the user in the first game;
[0075] A friend relationship graph library construction unit 202, configured to construct a friend relationship graph library based on the friendship relationship data. The nodes in the friend relationship graph library represent the user, the edges represent the historical friend relationships between the users in the first game, and the edge weights represent the number of times of establishing friend relationships between the users in the first game;
[0076] A friend tendency acquisition unit 203, configured to acquire the friend tendency between a first user and a second user based on the friend relationship graph library;
[0077] A friend recommendation unit 204, configured to, in response to the friend tendency reaching a predetermined tendency threshold, recommend the first user to the second user and / or recommend the second user to the first user in the second game.
[0078] Optionally, the acquiring the friend tendency between the first user and the second user based on the friend relationship graph library includes:
[0079] Based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library, obtain a propensity calculation method that matches this connection relationship, and calculate the friend propensity between the first user and the second user based on the propensity calculation method.
[0080] Optionally, the obtaining a propensity calculation method that matches the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0081] If the nodes corresponding to the first user and the second user in the friend relationship graph library are adjacent, determine that the edge weight between the node corresponding to the first user and the node corresponding to the second user is the friend propensity between the first user and the second user;
[0082] Optionally, the obtaining a propensity calculation method that matches the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0083] If the nodes corresponding to the first user and the second user in the friend relationship graph library are not adjacent but can be connected, determine the shortest path between the node corresponding to the first user and the node corresponding to the second user, obtain the edge weights Wij of each edge on the shortest path, and calculate the friend propensity between the first user and the second user according to the following formula:
[0084]
[0085] Optionally, the obtaining a propensity calculation method that matches the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0086] If the nodes corresponding to the first user and the second user in the friend relationship graph library are not connected, determine that the friend propensity between the first user and the second user is 0.
[0087] Optionally, the obtaining the friend relationship data of the user in the first game includes:
[0088] Obtain the role information of the user in the first game, and obtain the friend relationship data of the user in the first game based on the role information.
[0089] Optionally, the obtaining the role information of the user in the first game includes:
[0090] Obtain the general game identifier of the user;
[0091] Based on the general game identifier, obtain the first game participated by the user, and obtain the character information of the user in the first game.
[0092] Optionally, the predetermined propensity threshold matches the accuracy of friend recommendation in the second game.
[0093] Optionally, the number of times of establishing a friend relationship between the users in the first game includes the number of times of forming teams with each other between the users in the first game.
[0094] By using the friend recommendation device in the game provided by the embodiments of the present application, the friend recommendation process in the game can be matched with the user's real friend-making propensity, so that the friend recommendation process conforms to the user's friend-making propensity, and the pertinence and accuracy of the friend recommendation process are improved.
[0095] In the above embodiments, a friend recommendation method in a game and a friend recommendation device in a game are provided. In addition, the third embodiment of the present application also provides an electronic device. Since the embodiment of the electronic device is basically similar to the embodiment of the friend recommendation method in the game, the description is relatively simple. For the details of the relevant technical features, please refer to the corresponding description of the embodiment of the friend recommendation method in the game provided above. The following description of the embodiment of the electronic device is only illustrative. The embodiment of the electronic device is as follows:
[0096] Please refer to Figure 3 Understand this embodiment, Figure 3 which is a schematic logical structure diagram of the electronic device provided in this embodiment.
[0097] As Figure 3 shown, the electronic device provided in this embodiment includes: a processor 301 and a memory 302;
[0098] The memory 302 is used to store computer instructions for executing the friend recommendation method in the game scene display game. When the computer instructions are read and executed by the processor 301, the following operations are performed: obtain the friend relationship data of the user in the first game;
[0099] Based on the friend relationship data, construct a friend relationship graph library, where the nodes in the friend relationship graph library represent the users, the edges represent the historical friend relationships between the users in the first game, and the edge weights represent the number of times of establishing friend relationships between the users in the first game;
[0100] Based on the friend relationship graph library, obtain the friend propensity between the first user and the second user;
[0101] If the friend preference reaches a predetermined preference threshold, recommend the first user to the second user and / or recommend the second user to the first user in the second game.
[0102] Optionally, obtaining the friend preference between the first user and the second user based on the friend relationship graph library includes:
[0103] Based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library, obtain a preference calculation method that matches this connection relationship, and calculate the friend preference between the first user and the second user based on the preference calculation method.
[0104] Optionally, obtaining a preference calculation method that matches the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0105] If the nodes corresponding to the first user and the second user in the friend relationship graph library are adjacent, determine that the edge weight between the node corresponding to the first user and the node corresponding to the second user is the friend preference between the first user and the second user;
[0106] Optionally, obtaining a preference calculation method that matches the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0107] If the nodes corresponding to the first user and the second user in the friend relationship graph library are not adjacent but can be connected, determine the shortest path between the node corresponding to the first user and the node corresponding to the second user, obtain the edge weights Wij of each edge on the shortest path, and calculate the friend preference between the first user and the second user according to the following formula:
[0108]
[0109] Optionally, obtaining a preference calculation method that matches the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0110] If the nodes corresponding to the first user and the second user in the friend relationship graph library are not connected, determine that the friend preference between the first user and the second user is 0.
[0111] Optionally, obtaining the friend relationship data of the user in the first game includes:
[0112] Obtain the user's character information in the first game, and obtain the friend relationship data of the user in the first game based on the character information.
[0113] Optionally, the obtaining the user's character information in the first game includes:
[0114] Obtain the user's general game identifier;
[0115] Based on the general game identifier, obtain the first game participated by the user, and obtain the user's character information in the first game.
[0116] Optionally, the predetermined propensity threshold matches the friend recommendation accuracy of the second game.
[0117] Optionally, the number of times of establishing a friend relationship between the users in the first game includes the number of times of forming a team between the users in the first game.
[0118] Compared with the existing friend recommendation methods, by using the electronic device provided in this embodiment, the friend recommendation process in the game can be matched with the user's real friend-making propensity, so that the friend recommendation process conforms to the user's friend-making propensity, and the pertinence and accuracy of the friend recommendation process are improved.
[0119] In the above embodiment, a friend recommendation method in a game, a friend recommendation device in a game, and an electronic device are provided. In addition, the fourth embodiment of the present application also provides a computer-readable storage medium for implementing the above friend recommendation method in a game. The computer-readable storage medium embodiment provided in the present application is described relatively simply. For the relevant parts, please refer to the corresponding descriptions of the above friend recommendation method embodiment in the game. The following described embodiments are merely illustrative.
[0120] The computer-readable storage medium provided in this embodiment stores computer instructions, which when executed by a processor implement the following steps: obtain the friend relationship data of the user in the first game;
[0121] Construct a friend relationship graph library based on the friend relationship data. The nodes in the friend relationship graph library represent the users, the edges represent the historical friend relationships between the users in the first game, and the edge weights represent the number of times of establishing a friend relationship between the users in the first game;
[0122] Based on the friend relationship graph library, obtain the friend propensity between the first user and the second user;
[0123] If the friend preference reaches a predetermined preference threshold, recommend the first user to the second user and / or recommend the second user to the first user in the second game.
[0124] Optionally, obtaining the friend preference between the first user and the second user based on the friend relationship graph library includes:
[0125] Based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library, obtain a preference calculation method that matches this connection relationship, and calculate the friend preference between the first user and the second user based on the preference calculation method.
[0126] Optionally, obtaining a preference calculation method that matches the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0127] If the nodes corresponding to the first user and the second user in the friend relationship graph library are adjacent, determine that the edge weight between the nodes corresponding to the first user and the second user is the friend preference between the first user and the second user;
[0128] Optionally, obtaining a preference calculation method that matches the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0129] If the nodes corresponding to the first user and the second user in the friend relationship graph library are not adjacent but can be connected, determine the shortest path between the nodes corresponding to the first user and the second user, obtain the edge weights Wij of each edge on the shortest path, and calculate the friend preference between the first user and the second user according to the following formula:
[0130]
[0131] Optionally, obtaining a preference calculation method that matches the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes:
[0132] If the nodes corresponding to the first user and the second user in the friend relationship graph library are not connected, determine that the friend preference between the first user and the second user is 0.
[0133] Optionally, obtaining the friendship relationship data of the user in the first game includes:
[0134] Obtain the user's character information in the first game, and obtain the friendship relationship data of the user in the first game based on the character information.
[0135] Optionally, the obtaining the user's character information in the first game includes:
[0136] Obtain the user's general game identifier;
[0137] Based on the general game identifier, obtain the first game participated by the user, and obtain the user's character information in the first game.
[0138] Optionally, the predetermined propensity threshold matches the friend recommendation accuracy of the second game.
[0139] Optionally, the number of times of establishing a friendship relationship between the users in the first game includes the number of times of forming teams with each other between the users in the first game.
[0140] By executing the computer instructions stored on the computer-readable storage medium provided in this embodiment, the friend recommendation process in the game can be matched with the user's real friendship propensity, so that the friend recommendation process conforms to the user's friendship propensity, and the pertinence and accuracy of the friend recommendation process are improved.
[0141] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0142] The memory may include non-permanent memory in the computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of, for example, read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0143] 1. A computer-readable medium includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology for recommending friends in a game. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information accessible by a computing device. As defined herein, a computer-readable medium does not include transitory media such as modulated data signals and carrier waves.
[0144] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as a method, system, or computer program product for recommending friends in a game. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0145] Although the present application is disclosed above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application should be determined by the scope defined in the claims of the present application.
Claims
1. A method for recommending friends in a game, characterized in that, Including: Obtaining the friend relationship data of the user in the first game; Constructing a friend relationship graph library based on the friend relationship data; The nodes in the friend relationship graph library represent the user, and the edge weights represent the number of times the user establishes a friend relationship in the first game; Based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library, obtaining a propensity calculation method matching the connection relationship, and calculating the friend propensity between the first user and the second user based on the propensity calculation method; the connection relationship includes one of adjacent between the node corresponding to the first user and the node corresponding to the second user, non - adjacent but connected between the node corresponding to the first user and the node corresponding to the second user, and unconnected between the node corresponding to the first user and the node corresponding to the second user; If the friend propensity reaches a predetermined propensity threshold, recommending the first user to the second user and / or recommending the second user to the first user in the second game.
2. The method for recommending friends in a game according to claim 1, wherein The edge represents the historical friend relationship between the users in the first game.
3. The method for recommending friends in the game according to claim 2, wherein, The obtaining a propensity calculation method matching the connection relationship based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes: If the nodes corresponding to the first user and the second user in the friend relationship graph library are adjacent, determining the edge weight between the nodes corresponding to the first user and the second user as the friend propensity between the first user and the second user.
4. The method for recommending friends in the game according to claim 2, wherein The obtaining a propensity calculation method matching the connection relationship based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes: If the nodes corresponding to the first user and the second user in the friend relationship graph library are non - adjacent but connected, determining the shortest path between the nodes corresponding to the first user and the second user, obtaining the edge weights Wij of each edge on the shortest path, and calculating the friend propensity between the first user and the second user according to the following formula: 。 5. The method for recommending friends in a game according to claim 2, wherein The obtaining a propensity calculation method matching the connection relationship based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friend relationship graph library includes: If the nodes corresponding to the first user and the second user in the friend relationship graph library are unconnected, determining the friend propensity between the first user and the second user as 0.
6. The method for recommending friends in the game according to claim 1, wherein, The obtaining the friend relationship data of the user in the first game includes: Obtaining the role information of the user in the first game, and obtaining the friend relationship data of the user in the first game based on the role information.
7. The method for recommending friends in a game according to claim 6, wherein The obtaining the role information of the user in the first game includes: Obtaining the general game identifier of the user; Based on the general game identifier, obtain the first game participated by the user, and obtain the character information of the user in the first game.
8. The method for recommending friends in a game according to claim 1, wherein The predetermined propensity threshold matches the friend recommendation accuracy of the second game.
9. The method for recommending friends in a game according to claim 2, wherein The number of times of establishing a friend relationship between the users in the first game includes the number of times of forming teams with each other between the users in the first game.
10. A friend recommendation device in a game, the friend recommendation device in the game is set on a game platform, and is characterized in that, The friend recommendation device in the game includes: A friendship relationship data acquisition unit, configured to acquire friendship relationship data of a user in a first game; A friendship relationship graph library construction unit, configured to construct a friendship relationship graph library based on the friendship relationship data; nodes in the friendship relationship graph library represent the users, and edge weights represent the number of times of establishing a friend relationship between the users in the first game; A friend propensity acquisition unit, configured to obtain a propensity calculation method matching the connection relationship based on the connection relationship between the node corresponding to the first user and the node corresponding to the second user in the friendship relationship graph library, and calculate the friend propensity between the first user and the second user based on the propensity calculation method; the connection relationship includes one of adjacent between the node corresponding to the first user and the node corresponding to the second user, non - adjacent and connectable between the node corresponding to the first user and the node corresponding to the second user, and non - connectable between the node corresponding to the first user and the node corresponding to the second user; A friend recommendation unit, configured to recommend the first user to the second user and / or recommend the second user to the first user in the second game when the friend propensity reaches a predetermined propensity threshold.
11. An electronic device, characterized in that, Comprising a processor and a memory; wherein, The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the friend recommendation method in the game according to any one of claims 1 - 9.
12. A computer-readable storage medium having one or more computer instructions stored thereon, characterized in that, The instruction is executed by the processor to implement the friend recommendation method in the game according to any one of claims 1 - 9.
Citation Information
Patent Citations
Method and system for recommending friend information in social network
CN103379158A