A friend recommendation system and method based on ternary closure
By introducing the ternary closure principle, clustering, weight calculation, open coefficient and state perception mechanism into the friend recommendation system, the problem of inaccurate friend recommendation on the vehicle machine platform is solved, and a more accurate and humanized friend recommendation effect is achieved. .
Patent Information
- Application Number
- CN202210932275.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-04
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-08-04
AI Technical Summary
The existing friend recommendation system has insufficient coverage on the vehicle and computer platform, and the recommendation results are inaccurate, which fails to fully consider the user's intrinsic motivation and social network relationships.
Using a friend recommendation system based on ternary closures, data updates are updated through the user's geographical location and time, user activities are clustered, the weights that may form edges between users to be recommended and other users are introduced, and the open coefficient and state perception mechanism are introduced. User status matching and sorting, and finally humanized friend recommendations.
It improves the accuracy and success rate of friend recommendations, meets the needs of people who really need to make friends, and realizes effective friend recommendations on the car-machine platform.
Smart Images

Figure SMS_2 
Figure SMS_3 
Figure SMS_4
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of social software development, and in particular, is a friend recommendation system and method based on ternary closure. Background Art
[0002] With the rapid development of social network research and online social networks, online social activities have become an indispensable part of human life. People share their lives and find like-minded friends through social platforms such as QQ, Weibo, Douyin and Twitter. In order to meet people's needs for making friends, these platforms all provide friend recommendation functions. They analyze users' preferences based on the personal information filled in by users and the number of common friends, and recommend users with similar interests.
[0003] However, most of the current friend recommendations are concentrated on communication devices such as mobile phones and computers, and there are few friend recommendations on car computers. With the popularization of new energy vehicles, it is believed that more and more people will use car computers for communication, so we should also cover friend recommendations on car computers. The current friend recommendation mainly focuses on the user's social network, the user's personal information and the user's activities on the platform, but these methods often only focus on the external factors (homogeneity) of the formation of the ternary closure, while ignoring the influence of its internal factors (motivation), thus causing inaccurate recommendations and waste of resources. For example, friend recommendations based on user social networks mostly focus on the number of common friends, and do not consider whether the user has the motivation to add stranger friends; for user personal information friend recommendations, the integrity and timeliness of the information are ignored, which will also cause inaccurate recommendations; based on the analysis of interests and hobbies based on users' online activities, the influence of social network relationships on ternary closure is ignored. It can be seen that these friend recommendation systems are too simple and do not fully consider various influencing factors, so it is difficult to make accurate recommendations and cannot meet the needs of people who really want to make friends. Summary of the invention
[0004] In view of the defects of the existing friend recommendation system, the present invention proposes a friend recommendation system and method based on ternary closure to solve the technical problems of low recommendation success rate, wrong matching between users, overly one-sided considerations and failure to achieve humanized recommendation in the friend recommendation system.
[0005] A friend recommendation system and method based on ternary closure, comprising the following steps:
[0006] Step 1: Determine whether to update the data based on the user's geographic location and time. If the user's geographic location changes and the difference from the last data acquisition time is one week, the user's information is updated, otherwise the recommendation process is terminated to avoid duplicate recommendations.
[0007] Step 2: Preprocess the user data set. The extracted user activities have a certain degree of repetitiveness. By clustering the activities, the redundancy of the data is reduced, making the data more representative.
[0008] Step 3: Calculate the weight of the edge that may be formed between the user to be recommended and other users, add the calculated weight value to the queue to be recommended, introduce the open coefficient, and update the weight value.
[0009] Step 4: Introduce a state perception mechanism to analyze the user's current state. The user's state can be matched based on the user's mood, mental state, and busy / idle status.
[0010] Step 5: Sort the users who have been matched by status according to the size of the weight, and then select users for recommendation.
[0011] A further improvement of the present invention, step one includes: determining whether to obtain data by obtaining the user's geographic location and the time of requesting an update, and setting two conditions: the first condition is whether the geographic location obtained when making the recommendation this time is consistent with the geographic location of the most recent recommendation, and the second condition is whether the time of the recommendation this time is one week different from the time of the most recent recommendation. If the geographic location this time is different from the last time and the time difference is one week, the data will be updated, otherwise the entire recommendation process will be terminated, the data will not be updated, and repeated recommendations will be reduced.
[0012] In a further improvement of the present invention, the step 2 includes: the acquired data has great redundancy, and some activities are related to each other and can be classified into one category, so activities need to be clustered. As for how to measure the correlation between different activities, a set of characteristics such as (challenge, teamwork, etc.) is selected. If an activity has a certain characteristic, the weight of the edge pointing to this edge is 1, otherwise it is 0. For the correlation between activity a and activity b, ρ ab =Correlation(a, b) means that cosine similarity can be selected here: Cluster activities to reduce data redundancy.
[0013] A further improvement of the present invention, the step three includes: calculating the weight of the edge that can be formed between the user to be recommended and other users according to the principle of ternary closure, considering two aspects, including user-user-user and user-activity-user. The calculated weight is added to the queue to be recommended. Considering that the user may not add unfamiliar users, an openness coefficient γ is introduced. γ can be 0 or 1. When γ is 0, it means that the user does not add unfamiliar friends. When γ is 1, it means that the user has experience in adding unfamiliar friends. The weight of the queue to be recommended is updated. At this time, the calculation formula is: w = γ × w ab +γ
[0014] Where w represents the weight of the edge formed by the user and other users, γ is the openness coefficient, and w ab It represents the initial weight obtained by combining the two ternary closure modes. The calculated weights are sorted from large to small and then added to the queue for recommendation.
[0015] A further improvement of the present invention, step four includes: introducing a state perception mechanism before recommendation, using sensors and cameras on the car computer and mobile phone to observe and analyze the user's mood, mental state, busy and idle status, etc., and matching the user's status with the status of other users.
[0016] A further improvement of the present invention, the step five includes: selecting m users for recommendation for the user, for each user, sorting the weights of other users after state matching with the user in order of size, and selecting the first m users for recommendation.
[0017] The invention also discloses a friend recommendation system based on ternary closure, which comprises a data collection module, a data processing module, a weight calculation module, a state matching module and a friend recommendation module.
[0018] The data collection module determines whether to update the data based on the user's geographic location and time.
[0019] The data processing module pre-processes the user's activity data and clusters the user's activity data.
[0020] The weight calculation module calculates the weight of the edge that may be formed between the user to be recommended and other users, introduces the open coefficient, updates the weight value, and then adds it to the queue to be recommended.
[0021] The state matching module introduces a state perception mechanism before recommendation, which will match the current user's state with the state of other users.
[0022] The friend recommendation module selects m users for recommendation for the user. For each user, the weights of other users after status matching with the user are sorted in order of size, and the first m users are selected for recommendation.
[0023] Beneficial effects of the present invention: the existing friend recommendation method only considers a single factor affecting the ternary closure, and often ignores the multi-faceted influences on users when they become friends. Moreover, the current friend recommendation is mostly concentrated on mobile phones, computers and other communication devices, and the friend recommendation coverage on the car computer is insufficient. Therefore, the interaction between the mobile phone and the car computer is used to obtain user data. Considering that the data in the user's data set is correlated, a clustering of user activity data is proposed to reduce the correlation between the data. Then, two aspects affecting the ternary closure, user-user-user and user-activity-user, are used to calculate the initial weights of the edges that may be formed between the user to be recommended and other users. Then, considering that the user may not add unfamiliar friends, an openness coefficient is introduced to update the weights. Finally, before recommending the user, a state perception mechanism is introduced to match the state of the user to be recommended with other users. Finally, the user who has completed the state matching and has a higher weight is recommended to the user. The present invention not only comprehensively considers multiple factors affecting the ternary closure, but also considers the situation of the real social network. Finally, a humanized recommendation process is introduced, which reflects the adaptability of the recommendation method and improves the possibility of successful recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flow chart of the method implemented by the present invention.
[0025] Figure 2 It is a schematic diagram of clustering user activities.
[0026] Figure 3 It is a structural diagram of the recommendation system implemented by the present invention. DETAILED DESCRIPTION
[0027] In order to deepen the understanding of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. The embodiments are only used to explain the present invention and do not limit the protection scope of the present invention.
[0028] like Figure 1 The present invention is a flowchart of a method for implementing a friend recommendation system and method based on ternary closure, comprising the following steps:
[0029] Step 1: Determine whether to update the data based on the user's geographic location and time. If the user's geographic location changes and the difference from the last data acquisition time is one week, the user's information is updated, otherwise the recommendation process is terminated to avoid duplicate recommendations.
[0030] In the data collection phase, data is acquired through the interaction between the car computer and the mobile phone. Online social software acquires open source data by collecting the user's geographic location information, online social activity information, and personal information. In the data acquisition phase, it is necessary to determine whether to update the data, because if the user's geographic location does not change during the recommendation, it will cause repeated recommendations for the user. In addition, people's interests and hobbies are time-sensitive. They may like some activities for a period of time, but may like other activities more after a while. Therefore, it is also necessary to determine whether the difference between the two data acquisition times is one week. If these two conditions are not met at the same time, the entire friend recommendation process ends. Otherwise, the data will be updated, and the acquired data includes the activities and friend relationships of all users in this geographic location in a year.
[0031] Step 2: Preprocess the user data set. The extracted user activities have a certain degree of repetitiveness. By clustering the activities, the redundancy of the data is reduced, making the data more representative.
[0032] The acquired data has a lot of redundancy. Some activities are related to each other and can be classified into one category. Therefore, we need to cluster the activities. To measure the correlation between different activities, we select a set of characteristics such as (challenge, teamwork, etc.). If an activity has a certain characteristic, the weight of the edge pointing to this activity is 1, otherwise it is 0. Figure 2 As shown, for activities a and b, their characteristics can be expressed
[0033] a=(w a1 , w a2 , ...w an-1 , w an ), b=(w b1 , w b2 , ...w bn-1 , w bn ), where w ai , w bi It can be 0 or 1. When it is 0, it means that an activity does not have this characteristic. When it is 1, it means that an activity has this characteristic. For the correlation between activity a and activity b, ρ ab =Correlation(a, b) means that cosine similarity can be selected here:
[0034]
[0035] To calculate the similarity between different activities, the control variable method can be used to select the threshold, set several thresholds, select the threshold with the best classification effect, and finally update the activity data.
[0036] Step 3: Calculate the weight of the edge that may be formed between the user to be recommended and other users, add the calculated weight value to the queue to be recommended, introduce the open coefficient, update the weight value, and then update the queue to be recommended.
[0037] The weights of the edges between the recommended user and other users are calculated based on the principle of ternary closure. The weights are calculated from two aspects, including user-user-user and user-activity-user.
[0038] For the user-user-user pattern, a familiarity level is defined:
[0039]
[0040] Where u1, u2 represent users, friend(ui) represents the number of friends of user ui,
[0041] friend(u1)∩friend(u2) represents the number of common friends of u1 and u2, and friend(u1)Ufriend(u2) represents the union of the number of friends of u1 and u2.
[0042] For the user-activity-user pattern, define a similarity:
[0043]
[0044] Among them, u1 and u2 represent users, and activity(ui) represents the number of activities in which user ui participates.
[0045] activity(u1)∩activity(u2) represents the number of activities that u1 and u2 participate in together.
[0046] acitivity(u1)∪activity(u2) represents the union of the activities that u1 and u2 participate in.
[0047] Combining the two triangle closure modes of user-user-user and user-activity-user, we can get the final weight calculation formula:
[0048] w ab =α×similarity(u1,u2)+β×familarity(u1,u2)
[0049] Among them, α is the similarity influencing factor, β is the familiarity influencing factor, α, β can be (0, 1), and according to the specific situation of each user, the α, β values can be dynamically adjusted to ensure that α+β=1. If the user is keen on participating in activities, the α value is kept greater than the β value. If the user is keen on making friends, the β value is kept greater than the α value.
[0050] The weights of the recommended user and other users are added to the recommended queue. Considering that the user may not add unfamiliar users, an openness coefficient γ is introduced. γ can be 0 or 1. When γ is 0, it means that the user does not add unfamiliar friends. When γ is 1, it means that the user has experience in adding unfamiliar friends. The weight of the recommended queue is updated. At this time, the calculation formula is:
[0051] w=γ×w ab +γ
[0052] where w ab is the weight calculated in two ternary closure modes. The weight between the user to be recommended and the user in the recommendation queue is updated through this formula.
[0053] Step 4: Introduce a state perception mechanism to analyze the user's current state. The user's state can be matched based on the user's mood, mental state, and busy / idle status.
[0054] A state perception mechanism is introduced before recommendation. The sensors and cameras on the car computer and mobile phone are used to observe and analyze the user's mood, mental state, and busy and idle status. If the user is in a depressed state, some happy users can be recommended to him to enlighten the user and help him get out of the sad mood as soon as possible. This can realize a more humane recommendation system. Correspondingly, if the user is in a happy state, he can also be matched with some depressed users. In this way, the recommendation system meets the needs of real society and is full of humane design.
[0055] Step 5: Sort the users who have been matched by status according to the size of the weight, and then select users for recommendation.
[0056] Select m users for recommendation for this user. For each user, the weights of other users after status matching with this user are sorted in order of size, and the first m users are selected for recommendation.
[0057] like Figure 3As shown in the figure, a friend recommendation system based on ternary closure is provided, including a data collection module, a data processing module, a weight calculation module, a state matching module, and a friend recommendation module. The data collection module determines whether to update the data according to the user's geographical location and time. The data processing module preprocesses the user's activity data and clusters the user's activity data. The weight calculation module calculates the weight of the edge that may be formed between the user to be recommended and other users, adds the calculated weight value to the queue to be recommended, introduces the open coefficient, updates the weight value, and then adds it to the queue to be recommended. The state matching module introduces a state perception mechanism before recommendation, which will match the user's state at this time with the state of other users. The friend recommendation module selects m users for recommendation for the user. For each user, the weights of other users after state matching with the user are sorted in order of size, and the first m users are selected for recommendation.
[0058] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A friend recommendation method based on ternary closure, a friend recommendation system based on ternary closure, the system comprising a data collection module, a data processing module, a weight calculation module, a state matching module, and a friend recommendation module, wherein the data collection module determines whether to update the data according to the user's geographical location and time, the data processing module pre-processes the user's activity data to cluster the user's activity data, the weight calculation module calculates the weight of the edge that may be formed between the user to be recommended and other users, adds the calculated weight to the queue to be recommended, introduces an open coefficient, updates the weight, and then adds it to the queue to be recommended, the state matching module introduces a state perception mechanism before recommendation, matches the user's state with the state of other users, the friend recommendation module selects m users for recommendation for the user, for each user, the weights of other users after state matching with the user are sorted in order of size, and the first m users are selected for recommendation, and m is a dynamic value selected according to the user's situation; it is characterized in that The specific steps include: Step 1: Use the data collection module to determine whether to update the data based on the user's geographic location and time. If the user's geographic location changes and the difference from the last data acquisition time is one week, the user's information is updated, otherwise the recommendation process is terminated to avoid duplicate recommendations; Step 2: The data processing module pre-processes the user's data set. The extracted user's activities have a certain degree of repetitiveness. By clustering the activities, the redundancy of the data is reduced, making the data more representative; Step 3: The weight calculation module calculates the weights of the edges that may be formed between the recommended user and other users, adds the calculated weights to the recommended queue, introduces the open coefficient, and updates the weights; Step 4: The state matching module introduces a state perception mechanism to analyze the user's current state and matches the user's state based on the user's mood, mental state, and busy / idle state. Step 5: Use the friend recommendation module to sort the users who have been matched by status according to the size of the weight, and then select users for recommendation; In the step 1, the user's geographical location and time are obtained to determine whether to obtain data, determine whether the geographical location obtained when making the recommendation this time is consistent with the geographical location of the most recent recommendation, and determine whether the time of the recommendation this time is one week different from the time of the most recent recommendation. If the geographical location this time is different from the last time and the time is one week different, the data will be updated, otherwise the entire recommendation process will be terminated. The obtained data includes the activities and friend relationships of all users in this geographical location in a year. If these two conditions are not met, the data will not be updated to reduce repeated recommendations; In step 2, a set of features is selected and the weight of the edge is set to 1, otherwise it is set to 0. ,use Indicates that cosine similarity is selected: Cluster activities to reduce data redundancy; The characteristics of activity a and activity b are represented as: , For the correlation between activity a and activity b, use Indicates that cosine similarity is selected: To calculate the similarity between different activities, the control variable method is used to select the threshold, several thresholds are set, and the threshold with the best classification effect is selected. Finally, the activity data is updated, and i takes [1, n]; The step 3 considers two aspects, including user-user-user and user-activity-user, to calculate the weights: the calculated weights are added to the recommendation queue, and an open coefficient is introduced considering that users may not add unfamiliar users. , Take 0, 1, when When the value is 0, it means that the user does not add unfamiliar users. When the value is 1, it means that the user has experience of adding strangers, and the weight of the queue to be recommended is updated. The calculation formula is: , in, represents the weight of the edge between the user and other users, is the openness coefficient, It represents the initial weights obtained under the two ternary closure modes, sorting the calculated weights in descending order, and then adding them to the queue for recommendation.
2. The friend recommendation method based on ternary closure according to claim 1, characterized in that: For the user-user-user pattern, define a familiarity level: , Among them, u1 and u2 represent users, friend(ui) represents the number of friends of user ui, and i takes 1 and 2 to represent two different users u1 and u2. represents the number of common friends of u1 and u2, It represents the union of the number of friends of u1 and u2; For the user-activity-user pattern, define a similarity: , Among them, u1 and u2 represent users, and activity(ui) represents the number of activities in which user ui participates. represents the number of activities that u1 and u2 participate in together, It represents the union of the activities participated by u1 and u2; Combining the two triangle closure modes of user-user-user and user-activity-user, we get the final weight calculation formula: , in, is the familiarity factor, is the similarity influencing factor, Take (0,1) and dynamically adjust according to the specific situation of each user Value, Guarantee If the user is enthusiastic about participating in the activity, then keep Value greater than If the user is keen on making friends, keep Value greater than value.
Citation Information
Patent Citations
Information recommending method and mobile terminal
CN106294846A
Friend recommending method and device
CN107679249A
Method, device and system of intelligent friend matching
CN107861967A