Matching friend-making method and device
By grading the entry and calculating the interest similarity, the problem of user data deviation in the prior art is solved, the accurate matching of user interests and content recommendations in social networks is achieved, and the accuracy of recommendations and user experience is improved.
Patent Information
- Application Number
- CN202310768076.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2025-01-03
AI Technical Summary
The dating recommendation methods in existing social networks rely on fuzzy user data for multi-dimensional operations, which can easily lead to deviation from the real situation and cannot accurately match people with similar interests.
The objective data directly provided by the user is used to perform precise calculations through mathematical methods. Combined with recommendation methods based on user information and interests, the user scores the entry, calculates the degree of interest similarity between users through cosine similarity or Euclidean distance, and performs the Match and content recommendations.
It effectively avoids deviations, achieves accurate interest matching and content recommendations among users, and improves the accuracy and user experience of recommendations.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technologies, and in particular, to a method for matching and making friends in a social network. Background Art
[0002] Currently, there are mainly three methods for friend-making recommendations on various social platforms: one is relationship-based recommendation, the second is user-profile-based recommendation, and the third is interest-based recommendation. Generally, fuzzy operations are performed based on fuzzy user data. By observing complex user data and performing overly multi-dimensional operations, deviations from the actual situation may occur.
[0003] This method combines user-profile-based recommendation and interest-based recommendation. Instead of performing fuzzy operations based on fuzzy user data, it directly performs precise operations on the objective data provided by users through mathematical methods, thus avoiding deviations from the actual situation that may occur by observing complex user data and performing overly multi-dimensional operations.
[0004] Rely on users to rate various types of content to match people with the same interests and viewpoints for pairing between strangers and screening the content displayed to users (the content includes text dynamics, short videos, pictures, articles, links, etc. published by other users). User ratings are in units of terms, and the content of the terms includes people, movies, books, music, and other noun phrases created by users. Users select terms and rate them from 1 to 5 points. Finally, according to users' various preferences, through algorithms, users with the same preferences are matched one-on-one to chat, form community groups, and follow each other's dynamics. For example, match those who like "@Big Gugu Guchi" and dislike "Wolf Warrior 2", and match those who like "NetEase Cloud Music" and "Red Dead Redemption" at the same time. And through the content recommendation algorithm, the content liked by users with a higher degree of interest similarity can be recommended to similar users. Summary of the Invention
[0005] The technical solution of the present invention is as follows:
[0006] A friend-making recommendation method for a large-scale social network includes the following steps:
[0007] Step 1, users rate terms in numerical form, and the rating records of all users for all terms are stored in the server;
[0008] Step 2, calculate the similarity of ratings of multiple terms between the first user and other users to obtain the degree of interest similarity between two users. The degree of interest similarity between any two users is represented by a score;
[0009] Step 3: Calculate the interest similarity between all users in the server and the first user, and match the user with the highest interest similarity score with the first user as a friend.
[0010] In step 2, the interest similarity score can be obtained by calculating the cosine similarity between the vectors composed of the two users' ratings on all terms.
[0012] in,
[0013] i represents the entry number that can be used to match between user x and user y.
[0014] n represents the total number of terms that can be used to match between user x and user y.
[0015] θ xy The angle in n-dimensional geometric space that represents the similarity of interests between user x and user y.
[0016] cos(θ xy ) represents the cosine function value of the angle in the n-dimensional geometric space that represents the similarity of interests between user x and user y. Here we use it to represent the numerical value of the similarity of interests between user x and user y. The closer the value is to 1, the greater the similarity of interests between user x and user y. The closer the value is to -1, the greater the difference in interests between user x and user y.
[0017] In step 2, the similarity scores of the two users' interests can be obtained by calculating the Euclidean distance between the vectors composed of the two users' ratings on all terms.
[0019] in,
[0020] a i、 b i ……x i They represent the rating values of user i for term a, term b, ..., term x, respectively.
[0021] a j、 b j ……x j They represent the rating values of user j for term a, term b, ..., term x, respectively.
[0022] d ij represents the calculated similarity value of interests between user i and user j,
[0023] After calculation, d ij The lower the value of , the more similar the interests of user i and user j are.
[0024] In step 2, the content rated by the user includes entries, as well as text, pictures, videos, and audios that the user browses.
[0025] After completing step 3, content may be recommended to a user, wherein the recommended content is content with a higher score given by users with a higher score of similarity to the user's interests.
[0026] After completing step 3, a group may be created for multiple users with high user interest similarity scores.
[0027] After completing step 3, the overall user rating of a content may be calculated based on the ratings of all or part of the users on the content.
[0028] In step 2, the entry can be preset by the system or created by the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 The present invention is a flowchart of the social network friend recommendation method.
[0030] Figure 2 A geometric diagram for calculating the interest similarity score proposed in the present invention (cosine similarity).
[0031] Figure 3 A geometric diagram (Euclidean distance) for calculating the interest similarity score proposed in the present invention. DETAILED DESCRIPTION
[0032] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0033] Example 1
[0034] The present invention discloses a method for recommending friends on a large-scale social network, and its flow chart is as follows: Figure 1 , including the following steps:
[0035] User 1, user 2, ... user n rate some entries. Here is an example: User 1 and User 2 both rate entries A and B. User 1 rates entry A 4 points and entry B 1 point. User 2 rates entry A 3 points and entry B 2 points.
[0036] At this time, the similarity of interests between user 1 and user 2 can be calculated (based on the evaluation of terms A and B).
[0037] like Figure 2As shown in the figure, by calculating the cosine similarity between the vectors composed of the scores of all terms given by the two users, the interest similarity score is obtained. That is, the cosine similarity between the two vectors of user 1 (coordinate axis 4,1) and user 2 (coordinate axis 3,2) is calculated by the following formula:
[0039] Introducing user 1 (coordinate axis 4, 1) and user 2 (coordinate axis 3, 2), we get:
[0040] = = ≈0.94
[0041] Therefore, the cosine similarity between the two is 0.94, that is, in the context of only entry A and entry B, the interest similarity (expressed by cosine similarity) between user 1 and user 2 is 0.94. After that, by comparing the interest similarity (expressed by cosine similarity) between different users, one-to-one matching chat, forming community groups, and following each other's dynamics can be carried out.
[0042] The above is an example in the context of only two terms. When there are three terms, it can be expanded to a three-dimensional coordinate axis and the above cosine similarity formula can be applied. It can even be expanded to n terms and the above cosine similarity formula can be applied to calculate their interest similarity.
[0043] Example 2
[0044] The present invention discloses a method for recommending friends on a large-scale social network, and its flow chart is as follows: Figure 1 , including the following steps:
[0045] User 1, user 2, ... user n rate some entries. Here is an example: User 1 and User 2 both rate entries A and B. User 1 rates entry A with 5 points and entry B with 2 points. User 2 rates entry A with 3 points and entry B with 4 points.
[0046] At this time, the similarity of interests between user 1 and user 2 can be calculated (based on the evaluation of terms A and B).
[0047] like Figure 3 As shown in the figure, by calculating the Euclidean distance between the vectors composed of the scores of all terms given by the two users, the similarity score of their interests can be obtained. That is, the Euclidean distance between the two vectors of user 1 (coordinate axis 5,2) and user 2 (coordinate axis 3,4) is calculated by the following formula:
[0048]
[0049] Introducing user 1 (coordinate axis 5, 2) and user 2 (coordinate axis 3, 4), we get:
[0050] = =2 ≈2.83
[0051] Therefore, the Euclidean distance between the two is 0.94, that is, in the context of only term A and term B, the interest similarity (expressed in Euclidean distance) between user 1 and user 2 is 0.94. After that, by comparing the interest similarity (expressed in Euclidean distance) between different users, one-to-one matching chat, forming community groups, and following each other's dynamics can be carried out.
[0052] The above is an example in the context of only two terms. When there are three terms, it can be expanded to a three-dimensional coordinate axis and the above Euclidean distance formula can be applied. It can even be expanded to n terms and the above Euclidean distance formula can be applied to calculate their interest similarity.
[0053] The above shows and describes the basic principles and main features of the present invention and the characteristics of the present invention. The present invention is not limited by the above experimental examples. The above experimental examples and the description are only to illustrate the principles of the present invention. Without departing from the principles of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention claimed for protection.
Claims
1. A friend recommendation method for large-scale social networks, characterized in that: The following steps are involved: S1 users rate entries in numerical form, and all users' ratings of all entries are recorded on the server; S2 calculates the similarity of the scores of the first user and other users on the multiple terms, and obtains the similarity of the interests of the two users. The similarity of the interests of any two users is represented by a score; S3 calculates the interest similarity between all users in the server and the first user, and the user with the highest interest similarity score is matched with the first user as a friend.
2. The method according to claim 1, characterized in that By calculating the cosine similarity between the vectors composed of the ratings of two users on all terms, we can get the similarity score of their interests.
3. The method according to claim 1, characterized in that The similarity score of two users’ interests is obtained by calculating the Euclidean distance between the vectors composed of their ratings on all terms.
4. The method according to claim 2 or 3, characterized in that The content rated by the user includes entries, as well as text, pictures, videos, and audios that the user browses.
5. The method according to claim 2 or 3, characterized in that: Recommend content to a user, where the recommended content is content with higher ratings from users with higher scores for similarity to the user's interests.
6. The method according to claim 2 or 3, characterized in that: Create a group for multiple users who have high user interest similarity scores.
7. The method according to claim 2 or 3, characterized in that: According to the ratings of all or part of the users on a certain content, the overall user rating of the content is calculated.
8. The method according to claim 1, characterized in that Entries can be preset by the system or created by the user.
