A content-based social platform user closeness calculation method and system
By collecting data from users' social platforms, the system calculates the two-way social connections and similarities between users, solving the problem of unstable user intimacy calculation in existing technologies. This results in more accurate and stable user intimacy calculation, enhancing user relationships and recommendation effectiveness.
Patent Information
- Application Number
- CN202310083358.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2043-02-08
AI Technical Summary
Existing methods for calculating user intimacy fail to effectively consider two-way interaction and similarity between users, resulting in calculation results that are greatly affected by time, poor feedback, and failure to fully reflect the characteristics of intimacy between users.
By collecting user social data and specific content behavior data, we calculate the two-way social correlation and similarity of users, and use a weighted method to comprehensively calculate user intimacy, taking into account the time decay factor and continuously optimizing the weights based on user feedback.
It achieves more stable user intimacy calculation, enhances intimacy between users, expands the recommendation scope, and uncovers users' potential interests, with better predictability and accuracy.
Smart Images

Figure CN116303663B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data analysis, and particularly relates to a user closeness calculation method and system based on a content social platform. BACKGROUND
[0002] The existing user closeness mainly considers the interaction between users, and the more the interaction, the higher the closeness. The user closeness algorithm considering the similarity does not comprehensively consider the similarity of users, and relies on the viewpoint of "like attracts like, and people with similar interests tend to group together". The user closeness calculated by this method is relatively stable and is less affected by time decay. The user closeness calculated by this method has good effects in improving user closeness, expanding the recommendation field, and mining potential user interests.
[0003] Moreover, the existing user closeness calculation is mostly based on the online or offline interaction of users, and is calculated by comprehensively considering the type and number of interactions. The calculation is mostly one-way closeness weight calculation, and the calculation method is greatly affected by time. The content recommendation based on the calculation has poor feedback effect. In addition, the existing user closeness calculation is mostly one-way calculation based on social data, and does not consider the bidirectional characteristics of closeness and the long-term significance of the similarity between users on closeness. The closeness calculated in this way is greatly affected by the frequency and time of user behavior. SUMMARY
[0004] The purpose of the present application is to provide a user closeness calculation method and system based on a content social platform, so as to solve the technical problem that the current online closeness calculation only considers the positive interaction behavior of users and does not consider the influence of the reverse interaction between users on closeness calculation.
[0005] The present application is implemented by adopting the following technical scheme: a user closeness calculation method based on a content social platform, comprising the following steps:
[0006] S1: collecting user social data and behavior data for specific content;
[0007] S2: calculating a comprehensive social correlation degree according to the collected user social data;
[0008] S3: calculating a user similarity according to the collected behavior data of the user for specific content;
[0009] S4: calculating a user closeness according to the social correlation degree and the user similarity.
[0010] Further, step S1 comprises the following sub-steps:
[0011] S11: Collect user social and content-specific behavioral data through one or more of the following: WeChat Mini Program, iOS SDK Log, Android SDK Log, data interface, and business data MySQL table;
[0012] S12: Perform data validation, cleaning, and transformation on user behavior data;
[0013] S13: The cleaned data is stored in incremental detail tables and / or full statistical tables to provide accurate data support for subsequent calculations of user social connections, user similarity, and user intimacy.
[0014] Furthermore, the user social data includes users' social behaviors on content social platforms, such as following, forwarding, sharing, and commenting on content data of other users. This data will be used to calculate the user's social affinity.
[0015] Furthermore, the behavioral data for specific content includes user behavior data such as browsing, commenting on, and liking certain content, which will be used to calculate user similarity.
[0016] Furthermore, step S2 includes the following sub-steps:
[0017] S21: Calculate positive social association;
[0018] S22: Calculate the reverse social correlation degree;
[0019] S23: Calculate the overall social connection degree.
[0020] Furthermore, step S21 specifically involves: a set W of all behavior types on the content platform, including behaviors such as liking, forwarding, commenting, following, and browsing; the interval t months between user behaviors and the statistical time (t = 1, 2, 3... m); and the weight w of a certain type of social behavior. i (i∈W), and the number of times n of this action occurred t months ago. it Time decay coefficient α; Calculate the positive social association FR(U,V) between U and V:
[0021]
[0022] Furthermore, step S22 specifically involves: given the set W of all behavior types on the content platform, the interval t months between user behaviors and the statistical time (t = 1, 2, 3... m); and the weight w of a certain type of social behavior. i (i∈W), and the number of times n of this action occurred t months ago. it Time decay coefficient α; Calculate the reverse social association RR(U,V) of U to V:
[0023]
[0024] Further, the step S23 is specifically: calculating the comprehensive social correlation degree CR(U, V) by weighting:
[0025] CR(U, V) = m x FR(U, V) + n x RR(U, V), wherein m + n = 1, continuously adjusting data according to user behavior feedback, and optimizing calculation of the comprehensive social correlation degree.
[0026] Further, the step S3 includes the following sub-steps:
[0027] S31: arranging and calculating user content behavior preference data;
[0028] S32: calculating interest similarity between users.
[0029] A user closeness calculation system based on a content social platform, comprising a collection module, a comprehensive social correlation degree calculation module, a user similarity calculation module, and a user closeness calculation module, the collection module is used to collect user social data and behavior data for specific content; the comprehensive social correlation degree calculation module is used to calculate the comprehensive social correlation degree according to the collected user social data; the user similarity calculation module is used to calculate the user similarity according to the collected user behavior data for specific content; and the user closeness calculation module is used to calculate the user closeness according to the social correlation degree and the user similarity.
[0030] The present application has the advantages that: the present application relies on bidirectional social interaction behavior of users, considers time-decay comprehensive social correlation degree, and considers that similarity between users has potential influence on closeness, so that the closeness calculation method of the present application is more stable and predictable, and has positive significance for improving closeness between users, expanding recommendation field, and mining potential attention points of users. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only show some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained according to the structures shown in these drawings without creative labor.
[0032] Figure 1 is a data collection flowchart;
[0033] Figure 2 is a forward social correlation degree calculation flowchart;
[0034] Figure 3A reverse social correlation calculation flowchart;
[0035] Figure 4 A user similarity calculation flowchart. DETAILED DESCRIPTION
[0036] For the purposes of making the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0037] It should be noted that similar reference numerals and letters refer to like items in the drawings, and thus, once an item is defined in one drawing, it is not necessary to further define and explain it in subsequent drawings.
[0038] Some embodiments of the present application will be described in detail below with reference to the drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.
[0039] Embodiment 1: A user closeness calculation method based on a content social platform, comprising the following steps:
[0040] S1: Collecting user social data and behavior data for specific content;
[0041] S2: Calculating comprehensive social correlation according to the collected user social data;
[0042] S3: Calculating user similarity according to the collected behavior data for specific content of the user;
[0043] S4: Calculating user closeness according to the social correlation and the user similarity.
[0044] In this embodiment, the user social data mainly refers to the social behaviors of the user in the content social platform, such as attention, forwarding, sharing, and commenting on the content data of other users, and these data will be used to calculate the user social correlation; the behavior data for specific content refers to the behavior data of the user, such as browsing, commenting, and liking a certain content, and this part of data will be used to calculate the user similarity.
[0045] See Figure 1 , step S1 comprises the following sub-steps:
[0046] S11: According to the actual situation of the business, the user social and behavior data for specific content are collected through five entrances of WeChat applet, IOS SDK Log, Android SDK Log, data interface and business data Mysql table;
[0047] S12: The user behavior data is subjected to data verification, cleaning and conversion processing;
[0048] S13: The data after data cleaning is stored in the form of incremental detail table and / or full amount statistical table, and the behavior data details of the user such as like, attention, forward, collection and comment are recorded completely, so as to provide accurate data support for subsequent user social correlation degree, user similarity and user intimacy calculation.
[0049] The data collection of WeChat applet, IOS SDK Log and Android SDK Log uploads the user behavior log data through front-end burying. The behavior log (Clicklog) includes the behaviors of the user such as browsing, like, collection, forward, attention and comment. The applet or client uploads the user behavior data to the Nginx server through Post request, the LUA script service parses the related POST request to obtain parameters, the parameters after parsing are parsed by the Kafka message queue consumer and then entered into Hbase, and are mapped into Hive. The data collection of the business data Mysql table is divided into two parts of timing extraction and real-time extraction. The timing extraction extracts the Mysql database basic business data into the Hive warehouse in the form of daily incremental or full amount according to the specific business logic; the real-time extraction mainly solves the situation that the large amount of historical data is modified, the Cannal synchronizes the Mysql Binlog change to Hase in real time, and maps to the Hive warehouse. The data interface is directly processed into the Hive warehouse by the Python service.
[0050] After the data enters the Hive warehouse, the user behavior related data needs to be subjected to data verification, cleaning and conversion processing. The data of WeChat applet, IOS SDK Log and Android SDK Log are subjected to ETL processing, mainly including abnormal business data filtering, data type verification, data accuracy and integrity verification, Ip mapping conversion, dimension table mapping association and the like. If there is unqualified business data in the important business nodes, the related personnel is reminded through the message, and the data is corrected and cleaned in the manual intervention mode. The related business backend and frontend of the business data Mysql table have completed data verification, and are used according to the related requirements and business logic.
[0051] In the embodiment, step S2 includes the following sub-steps:
[0052] S21: calculating forward social correlation degree;
[0053] S22: calculating reverse social correlation degree;
[0054] S23: calculating comprehensive social correlation degree.
[0055] See Figure 2 , assuming that the forward social correlation degree of user U and user V is to be calculated, the social data of user U is scanned, the social correlation users of U are circled, the interaction type, interaction times, and interaction time of user U and user V are counted, and the forward social correlation degree of user U and V is calculated. If there is no other social correlation user, the calculated forward social correlation degree score is ranked for subsequent calculation of reverse social correlation degree. Further, step S21 is specifically: given all behavior category set W in the content platform, including like, forward, comment, follow, and browse behaviors; the interval t months (t = 1, 2, 3... m) of user behavior distance from the statistical time; the weight w i (i∈W) of a certain type of social behavior, and the number n it of the behavior t months ago; the time decay coefficient a; calculating the forward social correlation degree FR(U, V) of U to V:
[0056]
[0057] For example: wherein the social behavior weight w i From the user's subjective emotion, such as the weight score of follow is 2, and the weight of browsing the content of other users is 0.5. This weight score needs to be given different values by data modeling personnel in combination with specific business scenarios. The basic principle is that the weight of the behavior with higher complexity of reflecting user emotion is larger, and in actual application, it needs to be verified by real data and continuously optimized. The larger the time decay coefficient is, the more serious the time decay of the correlation degree is. This parameter also needs to be continuously optimized according to the business situation in actual application.
[0058] See Figure 3 , the top N users with higher forward social correlation degree scores of user U are selected, wherein N can be continuously optimized according to experimental data. If user V is the user with the highest forward social correlation degree, the interactive social data sent by user V to user U is scanned, the interaction type, times, and time are counted, and thus the reverse correlation degree of user U and user V is calculated. Further, step S22 is specifically: given all behavior category set W in the content platform, the interval t months (t = 1, 2, 3... m) of user behavior distance from the statistical time; the weight w i (i∈W) of a certain type of social behavior, and the number n it of the behavior t months ago; the time decay coefficient a; calculating the reverse social correlation degree RR(U, V) of U to V:
[0059]
[0060] Further, step S23 is specifically: considering the emphasis of forward correlation degree and reverse correlation degree in the calculation of closeness, the comprehensive social correlation degree CR(U, V) is calculated by weighting:
[0061] CR(U, V) = m x FR(U, V) + n x RR(U, V), where m + n = 1, and the data is adjusted according to user behavior feedback to optimize the calculation of the comprehensive social correlation degree.
[0062] In this embodiment, step S3 includes the following sub-steps:
[0063] S31: organizing and calculating user content behavior preference data;
[0064] S32: calculating the interest similarity between users.
[0065] Specifically, step S31 is specifically: collecting all user content behavior data, organizing the behavior data of the user for all content in the platform in content dimension, such as browsing an article, liking a video, forwarding and sharing content, etc. Considering that the user's interest preference degree may change over time, the time decay coefficient is also added when calculating the user content behavior preference. Take the user behavior data of the last m months as the basis for preference degree calculation, count the behavior times per month and determine the time decay coefficient. Given the content set k in the platform, the user behavior set W, the user behavior time interval t, and the user content behavior weight w j and the behavior times n jt of this month i (k i ∈k) of the user U for a certain content k i , the calculation method is:
[0066]
[0067] For example: where the weight w j of different behaviors needs to be adjusted according to the different business and the preference degree reflected by the behavior, and the time decay coefficient a also needs to be adjusted according to the different business, so that the finally calculated U i can truly reflect the user's interest preference degree. By calculating the preference degree of the user U for each content, the quantified preference degree data of the user for each content can be obtained.
[0068] See Figure 4, step S32 is specifically: for users with social association, calculate the interest similarity between users, given user U and user V, and content set k; U i(i∈k) represents the preference degree of user U for content i, V i(i∈k) represents the preference degree of user V for content i, the interest similarity S(U, V) between user U and user V is calculated by using the cosine similarity method:
[0069]
[0070] In this embodiment, step S4 is specifically: according to the comprehensive social association degree and the user similarity, the user intimacy I(U, V) is calculated:
[0071] I(U, V) = CR(U, V) x (1 + q), wherein q is the user similarity coefficient, the value is taken according to the interval range in which the user similarity value is located, for example:
[0072] The user similarity uses the cosine similarity calculation method, and the value range is-1 to 1, the user similarity coefficient is calculated by using the segmented weighting method, in order to reduce the influence of the similarity, so that the influence of the similarity on the calculation of the intimacy is within a reasonable and effective range, and the reasonable and effective measurement standard is that the feedback result is consistent with the expectation after the user is recommended.
[0073] A user intimacy calculation system based on a content social platform is used to realize the above-mentioned user intimacy calculation method based on the content social platform, the system comprises a collection module, a comprehensive social association degree calculation module, a user similarity calculation module and a user intimacy calculation module, the collection module is used to collect user social data and behavior data for specific content; the comprehensive social association degree calculation module is used to calculate the comprehensive social association degree according to the collected user social data; the user similarity calculation module is used to calculate the user similarity according to the collected user behavior data for specific content; the user intimacy calculation module is used to calculate the user intimacy according to the social association degree and the user similarity.
[0074] The application is based on an online content social platform, and calculates the two-way social correlation degree of a user by collecting the social interaction behavior of the user. Specifically, the two-way social correlation degree of the user is calculated according to the weight and number of different behaviors, and considering factors such as time decay, and at the same time, the first N users with high correlation degree in the social correlation circle are selected, the behaviors of these users are analyzed, the similarity is calculated, and the closeness of the user is calculated by weighted calculation of the comprehensive social correlation degree and the similarity. The closeness calculated on this basis is more stable and more predictable, and has a positive significance for improving the closeness between users, expanding the recommendation field, and mining the potential attention points of users. The application obtains more accurate user closeness by increasing the factors affecting the closeness, and in practice, the weight factor can be adjusted according to the feedback behavior of the user, so that the closeness is more accurate and can be more widely applied.
[0075] It should be noted that for the foregoing embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the application is not limited by the order of the described actions, because according to the application, some steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily necessary for the application.
[0076] In the above embodiments, the basic principles and main features of the application and the advantages of the application are described. Those skilled in the art should understand that the application is not limited by the above embodiments, and the above embodiments and the description in the specification are only to illustrate the principles of the application. Any modification and change made by those skilled in the art without departing from the spirit and scope of the application should be within the protection scope of the claims of the application.
Claims
1. A method for calculating user affinity based on a content social platform, characterized in that, It comprises the following steps: S1: Collecting user social data and behavior data for specific content; S2: Calculating comprehensive social correlation degree according to the collected user social data; Step S2 comprises the following sub-steps: S21: Calculating positive social correlation degree, scanning the social data of user U, circumscribing the social correlation users of U, counting the interaction type, interaction times and interaction time of user U and user V, and calculating the positive social correlation degree of user U and V; S22: Calculating reverse social correlation degree, selecting the top N users with high positive social correlation degree score of user U, if user V is the user with the highest positive social correlation degree, scanning the interactive social data sent by user V to user U, counting the interaction type, times and time, and thus calculating the reverse correlation degree of user U and user V; S23: Calculating comprehensive social correlation degree; Step S21 specifically: Given the behavior type set W in the content platform, including the behaviors of like, forward, comment, follow and browse; The interval t months (t = 1, 2, 3... m) of the behavior distance from the statistical time; The weight wi (i ∈ W) of a certain type of social behavior, and the number nit of the behavior in the past t months; Time decay coefficient α; Calculate the positive social correlation degree FR(U, V) of U to V: ; Step S22 specifically: Given the behavior type set W in the content platform, the interval t months (t = 1, 2, 3... m) of the behavior distance from the statistical time; The weight wi (i ∈ W) of a certain type of social behavior, and the number nit of the behavior in the past t months; Time decay coefficient α; Calculate the reverse social correlation degree RR(U, V) of U to V: ; Step S23 specifically: Calculate the comprehensive social correlation degree CR(U, V) by weighting: Wherein m+n=1, according to user behavior feedback constantly data adjustment, optimization calculation comprehensive social correlation degree; S3: Calculating user similarity according to the collected behavior data of user for specific content; S4: calculating the user closeness I(U, V) according to the comprehensive social correlation and the user similarity: wherein q is a user similarity coefficient, and the value is taken according to the interval range in which the user similarity value is located.
2. The method of claim 1, wherein the content-based social platform is a social network platform. Step S1 comprises the following sub-steps: S11: Collecting user social and behavior data for specific content through one or more of WeChat applet, IOS SDK Log, Android SDK Log, data interface and business data Mysql table; S12: Data verification, cleaning and conversion processing on user behavior data; S13: The data cleaned is stored in the form of incremental detail table and / or full amount statistical table, providing accurate data support for subsequent user social correlation degree, user similarity and user intimacy calculation.
3. The method of claim 1 or 2, wherein, The user social data includes the social behaviors of the user in the content social platform for the content data of other users, such as attention, forwarding, sharing and commenting, which will be used to calculate the user social correlation degree.
4. The method of claim 1 or 2, wherein, The behavior data for specific content includes the behavior data of the user for browsing, commenting and liking a certain content, which will be used to calculate the user similarity.
5. The method of claim 1, wherein, Step S3 comprises the following sub-steps: S31: Organizing and calculating user content behavior preference data; S32: Calculating the interest similarity between users.
6. A system for calculating user affinity based on a content social platform, which is used to implement the method for calculating user affinity based on a content social platform according to any one of claims 1-5, characterized in that, The method comprises a collection module, a comprehensive social correlation calculation module, a user similarity calculation module and a user intimacy calculation module, the collection module is used to collect user social data and behavior data for specific content; The comprehensive social correlation calculation module is used to calculate the comprehensive social correlation according to the collected user social data; The user similarity calculation module is used to calculate the user similarity according to the collected behavior data of the user for specific content; The user intimacy calculation module is used to calculate the user intimacy according to the social correlation and the user similarity.
Citation Information
Patent Citations
User tag determination method and device, computer equipment and storage medium
CN110162692A
Application recommendation method and device
CN111191143A