Literature preference content recommendation method and system based on computer data processing
Through cluster analysis and anomaly detection algorithms, the number of literary content recommendations is adjusted, solving the problem of inaccurate grasp of user preferences due to keyword correlation in the existing technology, and achieving a more accurate literary content recommendation effect.
Patent Information
- Application Number
- CN202411017410.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-07-29
Smart Images

Figure CN118551119B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of content recommendation, and in particular to a method and system for recommending literature preference content based on computer data processing. Background Art
[0002] With the development and popularization of the Internet, people have more and more ways to obtain and browse literary content. However, due to the huge variety and quantity of literary content, users often need to spend a lot of time and energy to find the literary content they are interested in. Therefore, how to recommend appropriate literary content to users based on their interests and preferences has become an urgent problem to be solved.
[0003] When recommending literary content to users, the existing technology often performs cluster analysis on historical data and then recommends content to users based on the clustering results. However, since literary keywords usually have related similar features, data representing different preferences will be clustered together. At this time, recommending content based on the clustering results will result in an inaccurate understanding of user preferences and will not be able to achieve effective recommendations. Summary of the invention
[0004] In order to solve the technical problem that literary keywords usually have associated similar features, which will cause data representing different preferences to be clustered together, and content recommendation based on clustering results will lead to inaccurate grasp of user preferences and inability to make effective recommendations, the purpose of the present invention is to provide a method and system for recommending literary preference content based on computer data processing, and the technical solutions adopted are as follows:
[0005] Obtaining a preset first number of types of behavior data when the user to be analyzed browses each literary keyword;
[0006] Performing cluster analysis on all keywords according to the behavior data to obtain clusters; in each cluster, obtaining the intra-cluster difference of each cluster according to the quantity distribution of keywords and the distribution disorder of the behavior data of all keywords; obtaining the outlier degree value of each cluster according to the positional relationship of keywords between each cluster and other clusters and the difference of intra-cluster difference;
[0007] Obtaining an anomaly score for each keyword in each cluster based on an anomaly detection algorithm; in each cluster, adjusting the preset recommended number of literary contents corresponding to the keyword according to the anomaly score of each keyword and the outlier value of the cluster, and obtaining the final recommended number of literary contents;
[0008] Literary content is recommended to the users to be analyzed based on the final recommended number of literary content corresponding to all keywords and the behavioral data of the keywords.
[0009] Furthermore, in each cluster, according to the quantity distribution of keywords and the distribution disorder of the behavior data of all keywords, the intra-cluster difference of each cluster is obtained, including:
[0010] Select any behavior data as the test data. In each cluster, combine different keywords in pairs to obtain all keyword combinations. Calculate the difference between the two keywords in each keyword combination under the test data as the difference factor. Take the average of the difference factors of all keyword combinations in the cluster under the test data as the average difference value.
[0011] Calculate the difference of the test data between each keyword in the cluster and the cluster center as a difference parameter; obtain the difference factor of the corresponding keyword under the test data according to the difference parameter corresponding to each keyword under the test data and the average difference value, wherein the difference factor is positively correlated with the difference parameter and negatively correlated with the average difference value;
[0012] The sum of the difference factors of all types of behavioral data for each keyword is calculated as the fluctuation characteristic value of the corresponding keyword; the mean of the fluctuation characteristic values of all keywords in the cluster is taken as the mean characteristic value, and the sum of the normalized value of the number of keywords contained in the cluster and the mean characteristic value is taken as the intra-cluster difference of the cluster.
[0013] Furthermore, the preset first number is set to 2.
[0014] Furthermore, cluster analysis is performed on all keywords according to the behavior data to obtain clusters, including:
[0015] Obtain the coordinates of each keyword based on all the behavior data of each keyword and map each keyword as a data point into a two-dimensional coordinate system;
[0016] Based on the elbow method, the optimal K value for clustering all keywords is obtained according to the behavioral data of all keywords;
[0017] Based on the K-means clustering algorithm, cluster analysis is performed on all keywords according to the optimal K value to obtain cluster clusters, wherein the distance metric is the Euclidean distance between the behavior data of the keywords.
[0018] Furthermore, the outlier degree value of each cluster is obtained according to the positional relationship of keywords between each cluster and other clusters and the difference of differences within the cluster, including:
[0019] Select any cluster as the cluster to be tested;
[0020] Obtaining the outlier factor of the cluster to be tested according to the positional relationship of the keywords between the cluster to be tested and other clusters;
[0021] The mean of the difference between the intra-cluster difference of the cluster to be tested and the intra-cluster difference of all other clusters is calculated to obtain the difference mean, and the product of the normalized value of the difference mean of the cluster to be tested and the corresponding outlier factor is used as the outlier degree value of the cluster to be tested.
[0022] Furthermore, the step of obtaining the outlier factor of the cluster to be tested according to the positional relationship of keywords between the cluster to be tested and other clusters includes:
[0023] In the cluster to be tested, a data point corresponding to any keyword is selected as the data point to be tested; a preset second number of data points closest to the data point to be tested are selected as adjacent data points of the data point to be tested, and a preset third number of data points closest to the data point to be tested are selected as neighborhood data points of the data point to be tested, wherein the preset second number is equal to the total number of keywords in the cluster to be tested, and the preset third number is a positive integer less than the total number of keywords in the cluster to be tested;
[0024] The line segment between the data point to be tested and the nearest neighboring data point is used as the radius, the data point to be tested is used as the center of the circle, and the area of the circular area obtained is used as the expanded area value of the keyword corresponding to the data point to be tested; the line segment between the data point to be tested and the nearest neighboring data point is used as the radius, the data point to be tested is used as the center of the circle, and the area of the circular area obtained is used as the initial area value of the keyword corresponding to the data point to be tested;
[0025] The difference between the mean of the expanded area values corresponding to all the keywords in the cluster to be tested and the mean of the initial area values is taken as the outlier factor of the cluster to be tested.
[0026] Furthermore, the method of obtaining an anomaly score of each keyword in each cluster based on an anomaly detection algorithm includes:
[0027] The anomaly score of each keyword in each cluster is obtained based on the CBLOF algorithm.
[0028] Furthermore, in each cluster, according to the abnormality score of each keyword and the outlier degree value of the cluster, the preset recommended number of literary contents corresponding to the keyword is adjusted to obtain the final recommended number of literary contents, including:
[0029] In each cluster, the outlier degree value of the cluster is multiplied by the abnormal score of each keyword in the cluster, and then negatively correlated and normalized to obtain the quantity adjustment weight of the corresponding keyword;
[0030] The quantity adjustment weight of each keyword in the cluster is multiplied by the corresponding preset recommendation quantity and then rounded up to obtain the final recommendation quantity of the literary content of the corresponding keyword.
[0031] Furthermore, the method of recommending literary content to the user to be analyzed based on the final recommended number of literary content corresponding to all keywords and the behavior data of the keywords includes:
[0032] Add up the values of all behavior data for each keyword to obtain the recommendation index of the corresponding keyword;
[0033] Arrange all keywords in descending order according to the recommendation index to obtain a sorting sequence; starting from the first keyword in the sorting sequence, recommend literary content to the user to be analyzed according to the final recommendation number corresponding to each keyword.
[0034] The present invention also proposes a literature preference content recommendation system based on computer data processing, the system comprising:
[0035] A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of any one of the methods can be implemented when the processor executes the computer program.
[0036] The present invention has the following beneficial effects:
[0037] The present invention first obtains the behavior data generated by the user to be analyzed when browsing literary information. The behavior data can provide an initial reference for subsequent processing and analysis. Furthermore, the keywords can be clustered according to the behavioral data corresponding to the keywords to obtain clusters. The keywords in each cluster should have similar characteristics, that is, the users have a relatively consistent preference for the keywords in the cluster. However, given that there will be multiple similar keywords under different literary themes, keywords with different literary preferences are actually clustered into one category. Therefore, in order to more clearly reflect the user's preference and the outliers of the clusters, an intra-cluster analysis can be performed on each cluster: the quantity distribution of keywords in each cluster and the distribution disorder of the behavioral data are calculated to obtain the intra-cluster difference, which is used to characterize the difference in user preferences for the literary content corresponding to the keywords in the cluster. Furthermore, due to the positional relationship between clusters relative to other clusters, that is, the outliers of clusters can also characterize the user's interest preferences, the positional relationship between clusters can be analyzed to obtain the outlier degree of clusters: the positional relationship of keywords between each cluster and other clusters is analyzed and combined with the intra-cluster difference to obtain the outlier degree value of the cluster. The outlier degree value can more accurately characterize the user's preference and outlier characteristics. Then, the anomaly score of the keyword in each cluster is calculated. The anomaly score can also be used as an indicator to reflect the user's preference and outlier characteristics. Therefore, the anomaly score corresponding to the keyword and the outlier value of the cluster to which the keyword belongs are finally combined to adjust the recommended number of literary content corresponding to the keyword to obtain the final recommended number. The final recommended number at this time will be more in line with the user's preference for literary content and more reasonable. Therefore, according to the user's attention to the keyword combined with the final recommended number, it will be more accurate and reasonable to analyze the user when recommending literary content, and a more effective recommendation effect can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flow chart of a method for recommending literature preference content based on computer data processing provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a method and system for recommending literary preference content based on computer data processing proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0041] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0042] The following is a detailed description of a specific solution of a method and system for recommending literature preference content based on computer data processing provided by the present invention in conjunction with the accompanying drawings.
[0043] See also Figure 1 , which shows a method flow chart of a method for recommending literature preference content based on computer data processing provided by an embodiment of the present invention, the method comprising the following steps:
[0044] Step S1: obtaining a preset first number of types of behavior data when the user to be analyzed browses each literary keyword.
[0045] The embodiment of the present invention analyzes the behavioral data generated by the user to be analyzed when browsing literary content, so as to facilitate the company or enterprise to recommend literary content to the user to be analyzed. Since users often search for keywords when browsing literary content, and companies or enterprises recommend content based on the user's browsing of different keywords, in the embodiment of the present invention, the preset first number of behavioral data of the user to be analyzed browsing each literary keyword within the preset historical time period can be first obtained from the database. In this embodiment, the preset first number is set to 2, and the behavioral data can specifically be: cumulative number of clicks and cumulative browsing time. Therefore, at this time, each keyword can be regarded as a binary data point in the form of (cumulative number of clicks, cumulative browsing time). It should be noted that the method of obtaining data and the type of data obtained can be adjusted according to the implementation scenario, and are not limited here. The preset historical time period can be set to one week or one month, and the specific time period is not limited.
[0046] At this point, the behavior data of the users to be analyzed when they browse and search for keywords while browsing literary content can be obtained, which can prepare for the subsequent analysis process.
[0047] Step S2: Perform cluster analysis on all keywords based on the behavioral data to obtain clusters; in each cluster, obtain the intra-cluster difference of each cluster based on the quantity distribution of keywords and the distribution disorder of the behavioral data of all keywords; obtain the outlier degree value of each cluster based on the positional relationship of the keywords between each cluster and other clusters and the difference in intra-cluster difference.
[0048] Before recommending literary content to the user to be analyzed, it is necessary to conduct a preliminary analysis of the behavioral data of the user to be analyzed during the browsing of literary content, so as to obtain the interest preferences of the user to be analyzed. By clustering the keywords, the keywords with similar behavioral data in the browsing process are clustered into one category, thus obtaining clusters. It can be regarded that the user has a relatively consistent preference for the literary content corresponding to the keywords in the same cluster, and it also shows that the keywords in the same cluster are more similar.
[0049] Preferably, in one embodiment of the present invention, cluster analysis is performed on all keywords according to the behavior data to obtain clusters, including:
[0050] Since each keyword can be regarded as a two-tuple data point in the form of (cumulative number of clicks, cumulative browsing time), a two-dimensional coordinate system can be constructed with the horizontal right direction as the horizontal axis and the vertical upward direction as the vertical axis, and then the data points corresponding to all keywords can be mapped to the two-dimensional coordinate system.
[0051] Then, before cluster analysis, the number of clusters is determined, and the optimal K value for clustering all keywords can be obtained based on the elbow method according to the behavioral data of all keywords.
[0052] Then, all keywords can be clustered based on the K-means clustering algorithm according to the obtained optimal K value to obtain clusters, wherein the distance metric is the Euclidean distance between the behavior data of the keywords.
[0053] It should be noted that the process of obtaining the optimal K value based on the elbow method, the process of clustering data based on the K-means clustering algorithm to obtain cluster clusters, and the method of obtaining the Euclidean distance are all technical means well known to those skilled in the art, and are not described in detail here. In other embodiments of the present invention, an iterative self-organizing clustering algorithm can also be used to perform cluster analysis on all keywords to obtain multiple cluster clusters. The choice of clustering method is not specifically limited here and can be adjusted according to the implementation scenario.
[0054] The clustering result represents the preference of the users to be analyzed for different keywords when browsing literary content. However, there is correlation similarity among the data points of literary keywords, that is, there are multiple similar keywords under a literary theme, and the browsing of literary information by users is not limited to the page environment of a single keyword. There will be users who browse multiple keywords under a literary theme to a certain extent. In terms of data distribution, there will be a situation where the user's preference for this series of keywords is close in distribution distance, but there are slight differences in the actual preference. Therefore, in order to more clearly characterize the consistent preference of the users to be analyzed for the literary content corresponding to the keywords in the cluster, a more detailed analysis can be performed on the keywords in each cluster, so as to obtain the intra-cluster difference of each cluster, which is used to characterize the differences in the users' attention to the keywords in this cluster.
[0055] Preferably, in one embodiment of the present invention, in each cluster, according to the quantity distribution of keywords and the distribution disorder of the behavior data of all keywords, the intra-cluster difference of each cluster is obtained, including:
[0056] In this embodiment of the present invention, there are two types of behavior data corresponding to keywords, so one type of behavior data is selected as the data to be tested for analysis.
[0057] Because the preference and attention of the users to be analyzed for the keywords can be reflected in their behavior data, the differences in the behavior data between the keywords in the clusters can be analyzed to characterize the differences within the clusters.
[0058] In each cluster, firstly, different keywords in the cluster are combined in pairs to obtain all keyword combinations, and the difference between the two keywords in each keyword combination under the test data is calculated as the difference factor; the mean of the difference factors of all keyword combinations in the cluster under the test data is taken as the average difference value.
[0059] Then, the difference between each keyword in the cluster and the test data of the cluster center is calculated as the difference parameter; and according to the difference parameter corresponding to each keyword in the test data and the average difference value, the difference factor of the corresponding keyword in the test data is obtained, wherein the difference factor is positively correlated with the difference parameter, and the difference factor is negatively correlated with the average difference value.
[0060] Finally, the sum of the difference factors of all types of behavioral data for each keyword is calculated as the fluctuation characteristic value of the corresponding keyword; the mean of the fluctuation characteristic values of all keywords in the cluster is taken as the mean characteristic value. Because the number of keywords contained in the cluster can also characterize to a certain extent whether the keywords in the cluster attract more attention and preference of the users to be analyzed, the number of keywords in the cluster is also used as an indicator to obtain the intra-cluster difference, that is, the sum of the normalized value of the number of keywords contained in the cluster and the mean characteristic value is taken as the intra-cluster difference of the cluster. The formula model of intra-cluster difference can be, for example, as follows:
[0061]
[0062] in, Indicates The intra-cluster diversity of clusters, Indicates The total number of keywords in the clusters, Indicates the minimum value of the total number of keywords in all clusters. Indicates the maximum value of the total number of keywords in all clusters. Indicates the number of types of behavior data, Indicates The first Keywords in The value of the behavior data, Indicates Cluster centers in clusters In the The value of the behavior data, Indicates The total number of combinations of keywords in the clusters. Indicates The first In the combination, two keywords are in The numerical difference under the behavioral data, Indicates preset parameters.
[0063] In the formula model of intra-cluster difference, we first focus on one behavior data of a keyword, analyze the same behavior data of all keywords in the cluster, combine the keywords in the cluster in pairs, and calculate the numerical difference between the same behavior data of the two keywords in each combination as the difference factor. The difference factor preliminarily characterizes the preference difference between any two keywords of the users to be analyzed under the same behavior data constraint; further, after obtaining the difference factors of the keywords in all combinations, the mean of the difference factors corresponding to all keywords under the same behavior data is calculated as the average difference value The average difference value represents the average difference level of user preference between keywords in the cluster; then the numerical difference between each keyword in the cluster and the cluster center under the same behavior data is calculated, that is, the difference parameter The larger the value, the greater the difference in the attractiveness of each keyword to the cluster center in the cluster, that is, the greater the difference in the preference of the user for the keywords in the cluster and the cluster center of the cluster; so the difference parameter is combined with the average difference value to obtain the difference factor , when the difference factor value is larger, it means that in the cluster, the difference in the user's preference for a certain keyword and the cluster center is more prominent and significant than the average level of preference difference in the cluster, which can indicate that there is a large difference in the preference of the users to be analyzed for the keywords in the cluster. Furthermore, the difference factor of all types of behavior data for each keyword in the cluster can be accumulated as the fluctuation characteristic value of the keyword The fluctuation characteristic value is the preference difference between the user to be analyzed and the cluster center under different browsing behaviors. Then the fluctuation characteristic values of all keywords in the cluster are combined to obtain the overall characteristics reflecting the preference difference between the keywords in the cluster by the user to be analyzed, that is, the mean of the fluctuation characteristic values of all keywords is calculated as the mean characteristic value. . Since the number of keywords included in the cluster is also used as an indicator to measure the intra-cluster difference, the more keywords are included in the cluster, the more likely it is that the preference of the users to be analyzed for the keywords in the cluster will be greatly different. Therefore, the number of keywords included in the cluster can be used as the confidence of the mean eigenvalue. Therefore, the normalized value of the number of keywords included in the cluster is added to the corresponding mean eigenvalue, and the obtained sum is used as the intra-cluster difference of the cluster. The normalization method used here is maximum and minimum normalization.
[0064] It should be noted that the preset parameters The purpose of this embodiment of the present invention is to prevent the denominator from being 0, so the value can be 0.001. The specific value can be adjusted according to the implementation scenario and is not limited here. The normalization method used in this embodiment of the present invention is not unique and is not limited again.
[0065] At this point, by analyzing the differences between the behavioral data generated when the keywords in the clusters are browsed by users and the number of keywords contained in the clusters, the intra-cluster diversity of the clusters is obtained. The intra-cluster diversity can preliminarily characterize the preference deviations of the users to be analyzed for the keywords in the clusters, and can be used in the subsequent analysis process of making more accurate content recommendations for the users to be analyzed.
[0066] By analyzing the differences between the keywords within the clusters, the intra-cluster differences of the clusters are obtained. After that, the positional relationship between the clusters can be further analyzed, and the degree of outliers of each cluster can be evaluated in combination with the obtained intra-cluster differences. By analyzing the degree of outliers, the preferences and interests of the users to be analyzed can be more accurately identified, thereby facilitating more accurate content recommendations.
[0067] Preferably, in one embodiment of the present invention, the outlier degree value of each cluster is obtained according to the positional relationship of keywords between each cluster and other clusters and the difference of intra-cluster differences, including:
[0068] For the convenience of explanation and illustration, any cluster can be selected as the cluster to be tested, and the method for obtaining certain indicators in the embodiment of the present invention is explained by analyzing the cluster to be tested.
[0069] Since the range or area of a cluster with a high degree of outliers will undergo a sudden change when the number of keywords in the cluster increases, based on this feature, we can analyze the changes caused by the increase in the number of keywords in the cluster and evaluate the degree of outliers of the cluster.
[0070] The outlier factor of the cluster to be tested is obtained according to the positional relationship of the keywords between the cluster to be tested and other clusters. The specific method can be: in the above process, the binary data points corresponding to all keywords have been mapped to the two-dimensional coordinate system. Therefore, in the cluster to be tested, a data point corresponding to any keyword is selected as the data point to be tested. Then the preset second number of data points closest to the data point to be tested are used as the adjacent data points of the data point to be tested, and the preset third number of data points closest to the data point to be tested are used as the neighborhood data points of the data point to be tested. Based on the above analysis, it can be known that when a cluster belongs to an outlier cluster, then the number of keywords in the cluster is increased, and the area or range formed by the increased keywords will mutate compared to the area or range formed by the keywords originally in the cluster. Therefore, in this embodiment of the present invention, the preset second number is set to be equal to the total number of keywords in the cluster to be tested, and the preset third number is set to a positive integer less than the total number of keywords in the cluster to be tested.
[0071] Then, the line segment between the data point to be tested and the nearest neighboring data point is used as the radius, the data point to be tested is used as the center of the circle, and the area of the circular area obtained is used as the expanded area value of the keyword corresponding to the data point to be tested. The line segment between the data point to be tested and the nearest neighboring data point is used as the radius, the data point to be tested is used as the center of the circle, and the area of the circular area obtained is used as the initial area value of the keyword corresponding to the data point to be tested. Then, the difference between the mean of the expanded area values corresponding to all the keywords in the cluster to be tested and the mean of the initial area values is used as the outlier factor of the cluster to be tested. The outlier factor characterizes the mutation of the area or range formed when the number of keywords around all the keywords in the cluster to be tested changes.
[0072] After obtaining the outlier factor of the cluster to be tested, the outlier factor can be combined with the intra-cluster difference, that is, the difference mean between the intra-cluster difference of the cluster to be tested and the intra-cluster difference of all other clusters is calculated, and the normalized value of the difference mean is multiplied by the corresponding outlier factor, and the product is used as the outlier degree value of the cluster to be tested. For example, the formula model of the outlier degree value is:
[0073]
[0074] in, Represents the cluster to be tested The outlier value of Represents the cluster to be tested The total number of keywords in Indicates the cluster to be tested. The expansion area value corresponding to the keyword, Indicates the cluster to be tested. Keywords correspond to initial area values, represents the total number of clusters, Represents the cluster to be tested The intra-cluster diversity of Indicates that except for the cluster to be tested Other than The intra-cluster diversity of clusters, Represents the normalization function.
[0075] In the formula model of the outlier degree value, based on the above analysis, it can be known that if the outlier degree of a cluster is high, then when the number of keywords in the cluster is increased, for example, the outlier degree of a cluster is high and the number of keywords in the cluster is 3, then even if the keyword 4 closest to the cluster center in other clusters is added, with the cluster center as the center of the circle and the line segment between the cluster center and the newly added keyword 4 as the radius, the area of the circular area formed will be very different from the initial area of the circle formed by the three keywords in the cluster. In the cluster to be tested, the expansion area value corresponding to each keyword reflects the area formed by each keyword and its corresponding adjacent keywords, and then the initial area value corresponding to each keyword is calculated. The initial area value reflects the area formed by each keyword and its corresponding neighborhood keywords; the higher the outlier degree of the cluster to be tested, the larger the expansion area value corresponding to each keyword in the cluster to be tested will be compared with the initial area value. On the contrary, if the outlier degree value of the cluster to be tested is low, it means that the cluster to be tested is close to other clusters, then there will be some keywords in the cluster to be tested whose corresponding expansion area values will not be significantly mutated compared with the initial area value. Therefore, the outlier degree can be quantified by the difference between the expansion area value and the initial area value. Therefore, the difference between the mean expansion area value of all keywords in the cluster to be tested and the mean initial area value is taken as the outlier factor of the cluster to be tested. . Given that the intra-cluster difference of a cluster represents the preference deviation of the users to be analyzed for the keywords in the cluster, if the intra-cluster difference between clusters is greatly different, it can also reflect the outlier situation of the cluster. Therefore, here, the mean difference between the intra-cluster difference of the cluster to be tested and the intra-cluster difference of all other clusters is calculated, and then the mean difference is combined with the outlier factor corresponding to the cluster to be tested to obtain the outlier degree value of the cluster to be tested.
[0076] At this point, by considering the change in the number of keywords in the cluster, the area is determined according to the positional relationship of the keywords, and then the mutation of the area is analyzed and combined with the difference in the intra-cluster difference between the clusters, the outlier degree value of the cluster to be tested is obtained. The outlier degree value can accurately reflect the interest preference of the user to be analyzed. The higher the outlier degree value of the cluster, the lower the interest of the user to be analyzed in the literary content corresponding to the keywords in the cluster, which may reflect the user's special preference or interest. Conversely, if the outlier degree value of a cluster is lower, it means that the user to be analyzed has a higher interest in the literary content corresponding to the keywords in the cluster. Therefore, literary content can be recommended to users based on the outlier degree value of the cluster, making the recommended content more personalized and more accurate, thereby obtaining better recommendation effects.
[0077] Step S3: Obtain the anomaly score of each keyword in each cluster based on the anomaly detection algorithm; in each cluster, adjust the preset recommended number of literary contents corresponding to the keyword according to the anomaly score of each keyword and the outlier degree value of the cluster to obtain the final recommended number of literary contents.
[0078] Since the anomaly score obtained when monitoring data for anomalies can also characterize the outliers of the data, in this embodiment of the present invention, the anomaly score of each keyword in each cluster is obtained based on the anomaly detection algorithm, and the anomaly score is also used in the subsequent recommendation adjustment process.
[0079] Preferably, in one embodiment of the present invention, obtaining the anomaly score of each keyword in each cluster based on an anomaly detection algorithm includes:
[0080] Since all keywords have been clustered in the embodiment of the present invention, and the first step of the CBLOF algorithm is also to cluster the data, the abnormality score of each keyword in each cluster can be obtained based on the CBLOF algorithm. It should be noted that when obtaining the abnormality score of each keyword in each cluster based on the CBLOF algorithm, the clusters will be distinguished into large clusters and small clusters. The distinguishing method can be: after sorting each cluster from large to small according to the amount of data, when the sum of the first few clusters accounts for 90% of the total, the first few clusters can be considered as large clusters, and the subsequent clusters are considered as small clusters. Other distinguishing methods can also be used, which are not limited here. In addition, the process of obtaining abnormality scores by the CBLOF algorithm is a technical means well known to those skilled in the art, and will not be repeated here.
[0081] After obtaining the outlier degree value of each cluster and the abnormality score of each keyword, the recommended number of literary contents corresponding to the keyword can be adjusted to obtain the final recommended number of literary contents corresponding to each keyword.
[0082] Preferably, in one implementation of the present invention, in each cluster, according to the abnormality score of each keyword and the outlier degree value of the cluster, the preset recommended number of literary contents corresponding to the keyword is adjusted to obtain the final recommended number of literary contents, including:
[0083] If the user to be analyzed has a higher interest and preference for certain literary content, then in the background data, the number of keywords corresponding to these literary contents is often large. Therefore, in the embodiment of the present invention, it is considered that the keywords corresponding to the literary content that the user is more interested in are less outliers than the user's special preferences or interests. Then, considering the information cocoon effect, keywords with high outlier degrees also need to be recommended. Therefore, in each cluster, the outlier degree value of the cluster is multiplied by the abnormal score of each keyword in the cluster, and then negatively correlated and normalized to obtain the quantity adjustment weight of the corresponding keywords.
[0084] Finally, the weight of the number adjustment of each keyword in the cluster is multiplied by the corresponding preset recommendation number and rounded up to get the final recommendation number of the literary content corresponding to the keyword. The formula model for the final recommendation number of literary content corresponding to each keyword is:
[0085]
[0086] in, Indicates The final recommended number of literary contents corresponding to the keywords, Indicates The preset number of recommended literary contents corresponding to keywords, Indicates The outlier degree value of the cluster where the keyword is located, Indicates The anomaly score of keywords, Indicated by natural constant The exponential function with base , Represents the ceiling function.
[0087] In the formula model of the final number of recommendations, based on the above analysis, it can be seen that when the degree of outliers of a cluster is higher, it can be regarded as that the user has a lower interest in the literary content corresponding to the keywords in the cluster. Similarly, if the abnormality score corresponding to the keywords in the cluster is higher, it also means that the user has a lower interest in the literary content corresponding to the keywords. Therefore, the number of recommendations for the literary content corresponding to such keywords should be reduced. Therefore, the abnormality score of each keyword is multiplied by the outlier degree value of the cluster to which it belongs, and then negatively correlated and normalized to achieve logical relationship correction and obtain the quantity adjustment weight of the corresponding keywords. , and finally multiply the quantity adjustment weight by the preset recommendation quantity corresponding to each keyword and round it up to obtain the final recommendation quantity of the literary content corresponding to the keyword.
[0088] It should be noted that when using the CBLOF algorithm to obtain the anomaly score of each keyword, all clusters are divided into large clusters and small clusters. Here, since it is believed in the embodiment of the present invention that large clusters are usually more representative of the user's interest preferences, while small clusters more represent the user's special preferences and interests, here, if the keyword belongs to a large cluster, the corresponding preset recommendation number is set to 10, if the keyword belongs to a small cluster, the corresponding preset recommendation number is set to 5. The specific value can be adjusted according to the implementation scenario and is not limited here.
[0089] In other embodiments of the present invention, the preset recommendation quantities corresponding to all keywords may also be uniformly set to a fixed value of 8. The specific value is not limited here and can be adjusted according to actual conditions.
[0090] At this point, the recommended quantity of literary content corresponding to each keyword can be adjusted to make it more in line with the user's literary interests and preferences, and the subsequent recommendation process can continue.
[0091] Step S4: Recommend literary content to the user to be analyzed based on the final recommended number of literary content corresponding to all keywords and the behavior data of the keywords.
[0092] Based on the above process, the final recommended number of literary contents corresponding to each keyword can be obtained. Since the behavioral data of the user to be analyzed when browsing literary contents obtained in this embodiment of the present invention are the cumulative number of clicks and the cumulative browsing time, and the more the cumulative number of clicks and the longer the cumulative browsing time, it means that the user to be analyzed is more interested in the literary content. Therefore, the final recommended number of literary contents corresponding to the keywords can be combined with the numerical value of the behavioral data to sort the recommendation order of the literary contents and recommend literary contents to the user to be analyzed.
[0093] Preferably, in one embodiment of the present invention, literary content is recommended to the user to be analyzed based on the final recommended number of literary contents corresponding to all keywords and the behavior data of the keywords, including:
[0094] First, add up the values of all behavior data for each keyword to serve as the recommendation index of the corresponding keyword.
[0095] Based on the above analysis, it can be seen that the behavioral data in this embodiment of the present invention includes the cumulative number of clicks and the cumulative browsing time, so the larger the recommendation index corresponding to the keyword, the more the literary content corresponding to the keyword should be recommended first, so all keywords are arranged in descending order according to the recommendation index to obtain a sorted sequence.
[0096] Finally, starting from the first keyword in the sorting sequence, literary content is recommended to the user to be analyzed according to the final recommendation quantity corresponding to each keyword.
[0097] This embodiment also provides a literary preference content recommendation system based on computer data processing, the system includes a memory, a processor and a computer program, wherein the memory is used to store the corresponding computer program, the processor is used to run the corresponding computer program, and when the computer program runs on the processor, it can implement any one of the steps of a literary preference content recommendation method based on computer data processing.
[0098] In summary, the embodiment of the present invention first obtains the behavior data generated by the user to be analyzed when browsing literature, and the behavior data can provide an initial reference for subsequent processing and analysis. Furthermore, the keywords can be clustered according to the behavioral data corresponding to the keywords to obtain clusters. The keywords in each cluster should have similar characteristics, that is, the users have a relatively consistent preference for the keywords in the cluster. However, given that there will be multiple similar keywords under different literary themes, keywords with different literary preferences are actually clustered into one category. Therefore, in order to more clearly reflect the user's preference and the outliers of the clusters, an intra-cluster analysis can be performed on each cluster: the quantity distribution of keywords in each cluster and the distribution disorder of the behavioral data are calculated to obtain the intra-cluster difference, which is used to characterize the user's preference differences for the literary content corresponding to the keywords in the cluster. Furthermore, since the positional relationship between clusters relative to other clusters and the outliers of clusters can also characterize the user's interest preferences, the positional relationship between clusters can be analyzed to obtain the outlier degree of clusters: the positional relationship of keywords between each cluster and other clusters is analyzed and combined with the intra-cluster difference to obtain the outlier degree value of the cluster. The outlier degree value can more accurately characterize the user's preference and outlier characteristics. Then, the anomaly score of the keyword in each cluster is calculated. The anomaly score can also be used as an indicator to reflect the user's preference and outlier characteristics. Therefore, the anomaly score corresponding to the keyword and the outlier value of the cluster to which the keyword belongs are finally combined to adjust the recommended number of literary content corresponding to the keyword to obtain the final recommended number. The final recommended number at this time will be more in line with the user's preference for literary content and more reasonable. Therefore, according to the user's attention to the keyword combined with the final recommended number, it will be more accurate and reasonable to analyze the user when recommending literary content, and a more effective recommendation effect can be obtained.
[0099] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0100] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A method for recommending literary preference content based on computer data processing, characterized in that: The method comprises: Obtaining a preset first number of types of behavior data when the user to be analyzed browses each literary keyword; Performing cluster analysis on all keywords according to the behavior data to obtain clusters; in each cluster, obtaining the intra-cluster difference of each cluster according to the quantity distribution of keywords and the distribution disorder of the behavior data of all keywords; obtaining the outlier degree value of each cluster according to the positional relationship of keywords between each cluster and other clusters and the difference of intra-cluster difference; Obtaining an anomaly score for each keyword in each cluster based on an anomaly detection algorithm; in each cluster, adjusting the preset recommended number of literary contents corresponding to the keyword according to the anomaly score of each keyword and the outlier value of the cluster, and obtaining the final recommended number of literary contents; Recommend literary content to the user to be analyzed based on the final recommended number of literary content corresponding to all keywords and the behavior data of the keywords; In each cluster, according to the quantity distribution of keywords and the distribution disorder of the behavior data of all keywords, the intra-cluster difference of each cluster is obtained, including: Select any behavior data as the test data. In each cluster, combine different keywords in pairs to obtain all keyword combinations. Calculate the difference between the two keywords in each keyword combination under the test data as the difference factor. Take the average of the difference factors of all keyword combinations in the cluster under the test data as the average difference value. Calculate the difference of the test data between each keyword in the cluster and the cluster center as a difference parameter; obtain the difference factor of the corresponding keyword under the test data according to the difference parameter corresponding to each keyword under the test data and the average difference value, wherein the difference factor is positively correlated with the difference parameter and negatively correlated with the average difference value; Calculate the sum of the difference factors of all types of behavior data for each keyword as the fluctuation characteristic value of the corresponding keyword; take the mean of the fluctuation characteristic values of all keywords in the cluster as the mean characteristic value, and take the sum of the value after the normalization of the number of keywords included in the cluster and the mean characteristic value as the intra-cluster difference of the cluster; The preset first number is set to 2; The cluster analysis is performed on all keywords according to the behavior data to obtain clusters, including: Obtain the coordinates of each keyword based on all the behavior data of each keyword and map each keyword as a data point into a two-dimensional coordinate system; Based on the elbow method, the optimal K value for clustering all keywords is obtained according to the behavioral data of all keywords; Based on the K-means clustering algorithm, cluster analysis is performed on all keywords according to the optimal K value to obtain cluster clusters, wherein the distance metric is the Euclidean distance between the behavior data of the keywords; The method of obtaining the outlier degree value of each cluster according to the positional relationship of keywords between each cluster and other clusters and the difference of differences within the cluster includes: Select any cluster as the cluster to be tested; Obtaining the outlier factor of the cluster to be tested according to the positional relationship of the keywords between the cluster to be tested and other clusters; Calculate the mean of the difference between the intra-cluster difference of the cluster to be tested and the intra-cluster difference of all other clusters to obtain a difference mean, and use the product of the normalized value of the difference mean of the cluster to be tested and the corresponding outlier factor as the outlier degree value of the cluster to be tested; The step of obtaining the outlier factor of the cluster to be tested according to the positional relationship of keywords between the cluster to be tested and other clusters includes: In the cluster to be tested, a data point corresponding to any keyword is selected as the data point to be tested; a preset second number of data points closest to the data point to be tested are selected as adjacent data points of the data point to be tested, and a preset third number of data points closest to the data point to be tested are selected as neighborhood data points of the data point to be tested, wherein the preset second number is equal to the total number of keywords in the cluster to be tested, and the preset third number is a positive integer less than the total number of keywords in the cluster to be tested; The line segment between the data point to be tested and the nearest neighboring data point is used as the radius, the data point to be tested is used as the center of the circle, and the area of the circular area obtained is used as the expanded area value of the keyword corresponding to the data point to be tested; the line segment between the data point to be tested and the nearest neighboring data point is used as the radius, the data point to be tested is used as the center of the circle, and the area of the circular area obtained is used as the initial area value of the keyword corresponding to the data point to be tested; The difference between the mean of the expanded area values corresponding to all the keywords in the cluster to be tested and the mean of the initial area values is taken as the outlier factor of the cluster to be tested.
2. According to claim 1, a method for recommending literature preference content based on computer data processing is characterized in that: The method of obtaining the abnormality score of each keyword in each cluster based on the abnormality detection algorithm includes: The anomaly score of each keyword in each cluster is obtained based on the CBLOF algorithm.
3. The method for recommending literature preference content based on computer data processing according to claim 1, characterized in that: In each cluster, according to the abnormality score of each keyword and the outlier degree value of the cluster, the preset recommended number of literary contents corresponding to the keyword is adjusted to obtain the final recommended number of literary contents, including: In each cluster, the outlier degree value of the cluster is multiplied by the abnormal score of each keyword in the cluster, and then negatively correlated and normalized to obtain the quantity adjustment weight of the corresponding keyword; The quantity adjustment weight of each keyword in the cluster is multiplied by the corresponding preset recommendation quantity and then rounded up to obtain the final recommendation quantity of the literary content of the corresponding keyword.
4. The method for recommending literature preference content based on computer data processing according to claim 1, characterized in that: The method of recommending literary content to the user to be analyzed based on the final recommended number of literary content corresponding to all keywords and the behavior data of the keywords includes: Add up the values of all behavior data for each keyword to obtain the recommendation index of the corresponding keyword; Arrange all keywords in descending order according to the recommendation index to obtain a sorting sequence; starting from the first keyword in the sorting sequence, recommend literary content to the user to be analyzed according to the final recommendation number corresponding to each keyword.
5. A literary preference content recommendation system based on computer data processing, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Information pushing method and system based on user group micro-subdivision
CN111738812A
Course teaching resource personality recommendation method based on AI big data
CN117575745A
Cluster-based categorization and presentation of item recommendations
US20080243638A1
Identifying a source of packet drops in a network
US20170149639A1
