Intelligent content recommendation method and system based on AI vision algorithm
Through an intelligent content recommendation method based on AI visual algorithms, combined with dynamic interest modeling and lightweight index construction, the problems of high computational complexity and dynamic interest capture of traditional recommendation systems are solved, and efficient and accurate visual content recommendation is achieved.
Patent Information
- Application Number
- CN202510505283.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-04-22
AI Technical Summary
Traditional content recommendation systems have high computational complexity when processing large-scale visual content, making it difficult to meet real-time recommendation needs and capture dynamic changes in users' interests, resulting in insufficient matching between recommendation results and users' visual preferences.
An intelligent content recommendation method based on AI visual algorithm is adopted. Through dynamic interest modeling, lightweight index construction and adaptive threshold optimization, combined with multi-dimensional visual features and exponential decay function, dynamic thresholds are generated, and content recommendation is performed using lightweight visual association index table.
It improves the accuracy and efficiency of visual content recommendations, systematically solves the shortcomings of existing recommendation systems in dynamic interest capture, computational efficiency and adaptability, and realizes efficient large-scale visual content recommendations.
Smart Images

Figure CN120386931B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to an intelligent content recommendation method and system based on AI visual algorithms. Background Art
[0002] With the booming development of the digital content industry, users are facing an increasingly severe problem of information overload. Traditional content recommendation systems rely primarily on users' historical behavioral data (such as clicks, browsing time, favorites, etc.) for collaborative filtering or content-based recommendations, but these methods have significant limitations. On the one hand, traditional methods often ignore the multi-dimensional characteristics of visual content (such as object structure, scene semantics, style aesthetics, and dynamic behavior), resulting in insufficient matching between recommendation results and users' current visual preferences. On the other hand, dynamic changes in user interests (such as short-term interest drift or long-term preference evolution) are difficult to capture through static models, further reducing the timeliness and accuracy of recommendations. In addition, existing systems often face performance bottlenecks due to excessive computational complexity when processing large-scale visual content, making it difficult to meet the needs of real-time recommendations.
[0003] Therefore, it is necessary to provide an intelligent content recommendation method and system based on AI visual algorithm to solve the above technical problems. Summary of the Invention
[0004] To solve the above technical problems, the present invention provides an intelligent content recommendation method and system based on AI visual algorithm, which improves the accuracy of visual content recommendation through dynamic interest modeling, lightweight index construction and adaptive threshold optimization.
[0005] The present invention provides an intelligent content recommendation method based on an AI visual algorithm, the method comprising the following steps:
[0006] Based on the historical interaction content of the current user, an exponential decay function is used to calculate the current user's interest weights for the multi-dimensional visual features, where the interest weights are the current user's preference strength for each dimension of the multi-dimensional visual features;
[0007] Based on all interest weights and combined with pre-acquired user activity, a dynamic threshold is generated;
[0008] Determining anchor content by combining the historical interaction content and all interest weights, and determining a primary candidate content set from the plurality of to-be-recommended content based on a pre-constructed lightweight visual association index table, wherein the pre-constructed lightweight visual association index table represents a visual relationship matrix between each pair of to-be-recommended content;
[0009] For each primary candidate content in the primary candidate content set, performing a multi-dimensional weighted calculation based on all interest weights of the current user to obtain a visual similarity score;
[0010] Primary candidate contents whose visual similarity scores exceed the dynamic threshold are screened out, and a content recommendation list is generated based on the screened primary candidate contents.
[0011] Preferably, the calculation process of the interest weight includes:
[0012] Extract object detection features, scene semantic features, style aesthetic features, and dynamic behavior features of each content in the current user's historical interaction content;
[0013] For each dimension of visual features, the preference strength at the current moment is calculated using an exponential decay function based on the interaction timestamp between the current user and the historical interaction content, and is used as the interest weight. The calculation formula for the preference strength is:
[0014]
[0015] in Indicates the current time For the first The preference strength of dimensional visual features, Indicates the The timestamp of the interaction, represents the attenuation coefficient, Indicates the The first historical interaction content The saliency score of the dimensional visual feature, Represents the base of natural logarithms.
[0016] Preferably, the process of generating the dynamic threshold includes:
[0017] The user activity score is calculated based on the current user's historical interaction frequency within the preset time window and the number of valid operations triggered in the current session. The historical interaction frequency and the number of valid operations are weighted and integrated.
[0018] Based on the logarithmic function relationship between the sum of preference strength and user activity score, a dynamic threshold is generated by normalizing the scaling factor.
[0019] Preferably, the process of constructing the pre-built lightweight visual association index table includes:
[0020] For all the content to be recommended, extract a set of visual features to be recommended with the same dimensions as the multi-dimensional visual features;
[0021] Based on the set of visual features to be recommended, calculating the visual similarity between each two pieces of content to be recommended, and constructing a visual similarity matrix, wherein each matrix element represents the visual similarity between the corresponding two pieces of content to be recommended, and the visual similarity is calculated using the weighted cosine similarity of the visual features in each dimension;
[0022] The visual similarity matrix is subjected to sparse processing and stored in a hash table structure to form a lightweight visual association index table.
[0023] Preferably, the process of determining the primary candidate content set includes:
[0024] From the historical interaction content, select at least one historical interaction content having the highest matching degree with the normalized preference strength of the current user as the anchor content, wherein the matching degree is determined by calculating the weighted dot product of the multi-dimensional visual features of the historical interaction content and the normalized preference strength;
[0025] Based on the visual similarity matrix stored in the lightweight visual association index table, all the content to be recommended whose visual similarity with the anchor content exceeds a preset association threshold is retrieved to form a primary candidate content set.
[0026] Preferably, the process of obtaining the visual similarity score includes:
[0027] For each primary candidate content, calculate the feature similarity between its to-be-recommended visual feature set and the multi-dimensional visual features of the anchor content in each dimension;
[0028] The weighted similarity components of each dimension are obtained by multiplying the feature similarity of each dimension by the normalized preference strength of the current user;
[0029] The weighted similarity components of all dimensions are summed to obtain the visual similarity score of the primary candidate content relative to the current user, and the score is normalized.
[0030] Preferably, the process of generating the content recommendation list includes:
[0031] Compare the visual similarity score of each primary candidate content with the generated dynamic threshold in real time, and select the primary candidate content with a score exceeding the dynamic threshold;
[0032] After screening, the primary candidate content is sorted in descending order according to its visual similarity score to generate an ordered recommended content queue;
[0033] Based on the ordered recommended content queue, a preset number of candidate contents are intercepted to generate a final content recommendation list.
[0034] The application further provides an intelligent content recommendation system based on an AI visual algorithm, which is used for executing the intelligent content recommendation method based on the AI visual algorithm.
[0035] The weight calculation module is configured to calculate, based on the historical interaction content of the current user, an interest weight of the current user for each of the multi-dimensional visual features by using an exponential decay function, wherein the interest weight is a preference intensity of the current user for each of the multi-dimensional visual features.
[0036] The threshold dynamic generation module is configured to generate a dynamic threshold based on all the interest weights and in combination with the pre-acquired user activity.
[0037] The content primary screening module is configured to determine anchor content in combination with the historical interaction content and all the interest weights, and determine a primary candidate content set from the plurality of to-be-recommended contents based on a pre-constructed lightweight visual association index table, wherein the pre-constructed lightweight visual association index table represents a visual relationship matrix between each pair of to-be-recommended contents.
[0038] The multi-dimensional weighting module is configured to perform multi-dimensional weighting calculation on each of the primary candidate contents in the primary candidate content set according to all the interest weights of the current user, to obtain a visual similarity score.
[0039] The recommended content generation module is configured to screen out the primary candidate content whose visual similarity score exceeds the dynamic threshold, and generate a content recommendation list according to the screened primary candidate content.
[0040] Compared with the related art, the intelligent content recommendation method and system based on the AI visual algorithm provided by the application have the following beneficial effects:
[0041] The application solves the key defects of the existing recommendation system in dynamic interest capturing, calculation efficiency and adaptive ability by the synergistic optimization of dynamic interest modeling (in combination with multi-dimensional visual features and an exponential decay function), lightweight visual association index and self-adaptive dynamic threshold (based on user activity and interest weight linkage adjustment), and provides an efficient solution for large-scale visual content recommendation. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 A flowchart of the intelligent content recommendation method based on the AI visual algorithm provided by the application is provided.
[0043] Figure 2 A module structure diagram of the intelligent content recommendation system based on the AI visual algorithm provided by the application is provided. DETAILED DESCRIPTION
[0044] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all of the structures. Furthermore, the embodiments of the present invention and the features of the embodiments may be combined with one another unless there is a conflict.
[0045] It should also be noted that, for ease of description, only portions relevant to the present invention are shown in the accompanying drawings, rather than all of the contents. Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the various operations (or steps) as sequential processes, many of the operations can be performed in parallel, concurrently, or simultaneously. In addition, the order of the various operations can be rearranged. The process can be terminated when its operations are completed, but may also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0046] Example 1
[0047] The present invention provides an intelligent content recommendation method based on AI visual algorithm, referring to Figure 1 As shown, the method includes the following steps:
[0048] S1: Based on the historical interaction content of the current user, an exponential decay function is used to calculate the current user's interest weights for the multi-dimensional visual features, where the interest weight is the current user's preference strength for each dimension of the multi-dimensional visual features.
[0049] Specifically, the calculation process of interest weight includes:
[0050] S11: Extract object detection features, scene semantic features, style aesthetic features, and dynamic behavior features of each content in the current user's historical interaction content.
[0051] In this embodiment, four types of visual features are extracted from the user's historical interaction content, namely object detection features, scene semantic features, style aesthetic features, and dynamic behavior features, and each type of feature corresponds to a visual dimension.
[0052] The object detection feature extraction process involves using a pre-trained YOLOv7 model to detect objects within the content. Input images are uniformly scaled to 640×640 resolution, maintaining their original aspect ratio, and non-square images are handled by padding with gray edges. The model outputs the coordinates of the detection bounding boxes and the object category confidence scores from the 80-category COCO dataset. For each piece of content, the top five object categories with the highest confidence scores are selected, their occurrence frequencies are counted, and encoded into a 256-dimensional feature vector. Principal component analysis (PCA) is then used to reduce the dimensionality to 64 dimensions, preserving 90% of the variance.
[0053] The scene semantic feature extraction process is as follows: A ResNet-50 model fine-tuned on the Places365 dataset is used. The input image is center-cropped to 224×224 pixels, and a 365-dimensional scene category probability distribution is output. The top three scene categories with the highest probability values are selected and their probabilities are concatenated to form a 3D scene feature vector.
[0054] The extraction process for style aesthetic features is as follows: Style features are extracted using the StyleGAN-2 model, using the sixth-layer style modulation parameters of the generator as a 512-dimensional style vector. Simultaneously, an aesthetic scoring model trained on the AVA dataset outputs an aesthetic score ranging from 0 to 1. The style vector and the aesthetic score are then concatenated into a 513-dimensional composite feature.
[0055] The extraction process for dynamic behavior features is as follows: The SlowFast network is used to extract spatiotemporal features from the video content. The input video clip is sampled into 32 frames, and the RGB frame and optical flow frame features are extracted separately. After fusion, a 2048-dimensional dynamic feature vector is obtained.
[0056] S12: For each dimension of visual features, the preference strength at the current moment is calculated using an exponential decay function based on the interaction timestamp between the current user and the historical interaction content, and is used as the interest weight. The calculation formula for the preference strength is:
[0057]
[0058] in Indicates the current time For the first The preference strength of dimensional visual features, Indicates the The timestamp of the interaction, represents the attenuation coefficient, Indicates the The first historical interaction content The saliency score of the dimensional visual feature, Represents the base of natural logarithms.
[0059] In this embodiment, the interest weight is dynamically adjusted according to the time distribution of the user's historical interaction behavior.
[0060] The formula for calculating preference strength uses an exponential decay function to calculate the user's interest weight for multi-dimensional visual features. Its specific form is a comprehensive evaluation of each historical user interaction behavior in the time dimension and content significance dimension. The natural logarithm base in the formula is Is a mathematical constant used to construct a standard exponential decay relationship. As an adjustable parameter, its value range is limited to between 0.1 and 0.5. This range has been verified by experiments to effectively balance the influence of recent behavior and long-term interests. Time difference calculation uses timestamp differences accurate to the second to ensure the accuracy of timeliness evaluation.
[0061] Significance score It is a quantitative indicator that measures the impact of a visual feature dimension in a user's historical interaction content on user interest. It is defined as: the degree of significance of the user's performance on the feature of a historical interaction content under the visual feature dimension.
[0062] The saliency score needs to be calculated separately for each visual feature dimension (object, scene, style, dynamics) and quantified in combination with key parameters in the feature extraction process.
[0063] Specifically, the calculation process of the significance score is:
[0064] The saliency score of the object detection feature measures the user's attention to object recognition in a certain historical interactive content. First, the YOLOv7 model is used to detect objects in the content and output each detected object category and its confidence. From these detection results, the top five object categories with the highest confidence are selected, and the average confidence of these five object categories is calculated as the saliency score of the content in the object dimension. If fewer than five objects are detected, the average confidence of the actual detected objects is taken as the saliency score. The final score ranges from 0 to 1, representing the saliency of the content in terms of object detection features.
[0065] The salience score of scene semantic features is used to assess the user's interest in the scene classification within a particular historical interaction. The content is analyzed using a fine-tuned ResNet-50 model, outputting a probability distribution for 365 possible scene categories. The top three scene categories with the highest probability values are selected and summed. To ensure this sum falls within the standard range of 0 to 1, it is further normalized by dividing it by 3 to obtain the salience score for the scene semantic features of the content. This is done to ensure fair and reasonable comparisons between different content.
[0066] The salience score of the style aesthetic feature reflects the user's interest in the style and aesthetics of a particular historical interaction. The aesthetic score, which ranges from 0 to 1, is directly used as the salience score of the style aesthetic feature, using the aesthetic score assigned by the aesthetic scoring model trained on the AVA dataset. For content without an aesthetic score (such as some videos), the aesthetic score is replaced by the norm of the sixth-layer style vector of the StyleGAN-2 generator and divided by a preset maximum norm threshold.
[0067] The significance score of dynamic behavior features is applicable to video content, which reflects the user's attention to dynamic changes in the video. For video content, the SlowFast network is used to extract its spatiotemporal feature vector and calculate the variance of this vector to measure the intensity of change of video features. The weight is set according to the length of the video: if the video length exceeds 30 seconds, the weight is 1.2; if the video length is less than 30 seconds, the weight is 0.8. The significance score of the dynamic behavior feature is obtained by dividing the variance of the feature vector by the mean of the global feature variance and multiplying it by the video length weight. For non-video content, the significance score of the dynamic behavior feature is set to 0, and this dimension is ignored in subsequent calculations.
[0068] S2: Based on all interest weights, a dynamic threshold is generated in combination with the pre-acquired user activity.
[0069] Specifically, the process of generating a dynamic threshold includes:
[0070] S21: Calculate the user activity score based on the current user's historical interaction frequency within a preset time window and the number of valid operations triggered in the current session, where the historical interaction frequency and the number of valid operations are weighted and fused.
[0071] In this embodiment, the real-time activity of users is calculated through multi-dimensional behavior analysis. The specific implementation process is as follows:
[0072] First, perform historical interaction frequency statistics: count the number of effective interaction behaviors of users within the preset time window (the default setting is the last 7 days), including but not limited to core operations such as clicks, favorites, shares, and complete playback.
[0073] Different types of interactive behaviors are assigned different weights (click weight 0.5, collection weight 1.0, sharing weight 1.2, and complete playback weight 1.5), and the historical interaction intensity value is calculated through weighted summation.
[0074] The time window supports dynamic adjustment. For example, for high-frequency users (more than 50 interactions per day), the window is automatically shortened to 3 days to more sensitively capture changes in interest.
[0075] Then, conduct current session behavior analysis: record all user operations from login to the current moment in real time, including page browsing depth (access path length), single content dwell time (seconds), refresh / slide and other action frequencies.
[0076] Session activity is calculated using a time decay factor: Behaviors within the last 10 minutes are weighted 1.0, and behaviors exceeding 30 minutes have their weight decayed by 20% per hour.
[0077] Set a gain coefficient for key operations (such as collection and repeat playback). When similar operations are repeated within a single day, the contribution value of each operation increases by 10%.
[0078] Finally, score fusion and normalization are performed: the historical interaction intensity and the current session activity are weighted and fused according to a set ratio, for example, 6 to 4.
[0079] S22: Based on the logarithmic function relationship between the sum of preference strengths and the user activity score, a dynamic threshold is generated by normalizing the scaling factor.
[0080] In this embodiment, an adaptive threshold is generated based on the dynamic relationship between user activity and preference strength. The specific implementation process is as follows:
[0081] First, the sum of the preference strengths (S) is calculated. Specifically, the preference strengths of each dimension outputted in step S13 are added together to obtain the user's overall interest strength index.
[0082] Then, the user activity score (A) is calculated, which comes from the calculation result of step S21 and has a value range of 0 to 100 (mapped to a percentage system).
[0083] The dynamic threshold (T) is inversely proportional to the logarithm of the user activity score, and the calculation formula is:
[0084]
[0085] in, The default value is 0.75, which was optimized in the range of 0.6 to 0.9 through A / B testing.
[0086] For low-activity users with a user activity score A less than or equal to 5, a protection mechanism is enabled: the dynamic threshold T is forcibly set to be greater than or equal to 0.3 to avoid a degradation in experience caused by too short recommendation lists.
[0087] In addition, dynamic thresholds need to be constrained within a certain range. When the calculated value exceeds the upper limit, the threshold decay strategy is enabled: it automatically decreases by 0.02 every 30 minutes until it returns to below the upper threshold.
[0088] For sudden activity surges (for example, if A increases by more than 50% within 5 minutes), smoothing filtering is enabled: the moving average of the last three activity scores is taken to suppress noise fluctuations.
[0089] At the same time, the dynamic threshold has a real-time update mechanism: the dynamic threshold is recalculated every 5 minutes and persistently stored in the distributed cache.
[0090] When it is detected that the interval between two consecutive user requests is less than 1 minute, an immediate threshold update is triggered to ensure the real-time recommendation results.
[0091] S3: Determine the anchor content by combining historical interaction content and all interest weights, and determine the primary candidate content set from multiple contents to be recommended based on a pre-built lightweight visual association index table, where the pre-built lightweight visual association index table represents the visual relationship matrix between each pair of contents to be recommended.
[0092] In step S3, the process of constructing the lightweight visual association index table includes:
[0093] First, for all the content to be recommended, a set of visual features to be recommended with the same dimensions as the multi-dimensional visual features is extracted.
[0094] In this embodiment, multi-dimensional visual features are extracted from all content to be recommended to ensure strict alignment with the feature dimensions of the user's historical interactive content.
[0095] Object detection feature extraction: Use the same YOLOv7 model configuration as step S11 to detect objects in the candidate content. The input image is uniformly scaled to 640×640 resolution and bilinear interpolation is used to maintain image quality.
[0096] Post-process the detection results: filter out objects with a confidence score below 0.4 and calculate the category distribution of the remaining objects. Generate a 64-dimensional feature vector for each candidate (using PCA dimensionality reduction) and store it in the feature database.
[0097] Scene semantic feature extraction: The ResNet-50 model fine-tuned in step S11 is used, and the input image undergoes the same preprocessing process (center cropped to 224×224 pixels).
[0098] After outputting the 365-dimensional scene probability distribution, the probability values of the top-3 scene categories are retained to form a 3D scene feature vector.
[0099] Style aesthetic feature extraction: The sixth-layer style parameters of the StyleGAN-2 generator are used to extract a 512-dimensional style vector. Combined with the scalar value (0 to 1) output by the aesthetic scoring model, the style vector and the aesthetic score are concatenated into a 513-dimensional composite feature.
[0100] Dynamic Behavior Feature Extraction (Video Content Only): For candidate video content, the SlowFast network is used to extract spatiotemporal features. Input video clips are sampled at 32 frames, and optical flow is calculated using the TV-L1 algorithm. RGB and optical flow features are combined to output a 2048-dimensional vector. For very long videos (over 5 minutes), features are extracted in 30-second segments and the average is calculated.
[0101] Secondly, based on the set of visual features to be recommended, the visual similarity between each two recommended contents is calculated, and a visual similarity matrix is constructed, in which each matrix element represents the visual similarity between the corresponding two recommended contents. The visual similarity is calculated using the weighted cosine similarity of the visual features of each dimension.
[0102] In this embodiment, based on the extracted feature set to be recommended, the multi-dimensional similarity relationship between the contents is calculated.
[0103] Including single-dimensional similarity calculation, it is divided into the following steps:
[0104] Object feature similarity: IoU-aware cosine similarity is used. First, the cosine similarity of the two content object category distribution vectors is calculated, and then multiplied by the average detection box overlap (IoU).
[0105] Scene feature similarity: Jensen-Shannon divergence is used to measure the difference in scene probability distribution and converted into a 0-1 similarity value.
[0106] Style feature similarity: Calculate the cosine similarity of the composite feature vectors, and impose a penalty factor of 0.8 when the difference in aesthetic score exceeds 0.3.
[0107] Dynamic feature similarity: For video content, dynamic time warping (DTW) is used to align feature sequences and then calculate the similarity.
[0108] Then, weighted fusion is performed according to the dimension allocation ratio of the user's interest weight (including but not limited to 0.4 for objects, 0.3 for scenes, 0.2 for styles, and 0.1 for dynamics, which can be selected according to actual conditions).
[0109] For cross-modal content (such as images and videos), only the similarity of shared dimensions (such as objects, scenes, styles, and dynamics) is calculated, and the weights of missing dimensions are proportionally distributed to other dimensions.
[0110] Finally, the matrix is optimized and a block calculation strategy is adopted to divide the content library of tens of millions into 100×100 sub-matrix blocks. GPU parallel acceleration calculation is used to directly assign zero to cells with similarity less than 0.2 to reduce invalid calculation overhead.
[0111] Finally, the visual similarity matrix is sparsely processed and stored in a hash table structure to form a lightweight visual association index table.
[0112] In this embodiment, the original similarity matrix is converted into a lightweight retrieval structure, specifically including:
[0113] Sparse processing: Set a dynamic retention threshold: for each row (single content), only retain the top-50 adjacent contents with similarity, and set the rest to zero.
[0114] For popular top content (e.g., with more than 100,000 clicks), additional long-tail related items with a similarity greater than 0.7 are retained to improve the recall rate.
[0115] A two-layer hash index is used: the first layer uses the content ID as the key and stores its top 50 adjacent content ID list; the second layer uses the content ID pair as the key (such as "ID1 to ID2") and stores the exact similarity value.
[0116] Perform differential encoding compression on the adjacency list: Convert the content ID sequence into a differential array to reduce storage space usage. Finally, use memory-mapped file (MMAP) technology to load the index table into memory to support high-speed random access.
[0117] Specifically, the process of determining the primary candidate content set includes:
[0118] S31: From the historical interaction content, select at least one historical interaction content that has the highest matching degree with the normalized preference strength of the current user as the anchor content, wherein the matching degree is determined by calculating the weighted dot product of the multi-dimensional visual features of the historical interaction content and the normalized preference strength.
[0119] In this embodiment, the anchor content that best matches the current preference is filtered out from the user's historical interaction content.
[0120] First, for each historical interaction, the weighted dot product of its multidimensional visual feature vector and the user's normalized preference strength is calculated. For object detection features, the 64-dimensional feature vector is multiplied by the user's object-dimension preference strength and the sum is calculated. Scene semantic features are directly dot-producted using a 3-dimensional vector with the scene preference strength. Style and dynamic features are processed similarly, using 513-dimensional and 2048-dimensional feature vectors, respectively. The top three historical interactions with the highest weighted dot product scores are automatically selected as anchor points. If the difference in the highest scores is less than 0.1, the top five anchor points are expanded to avoid omissions.
[0121] For new or low-activity users, when available historical content is insufficient, a fallback strategy is activated: 10 pieces of content are randomly selected from a pre-set popular content library as temporary anchors, and replaced in real time based on first-time interactions. All anchor content must meet time validity requirements, and outdated content older than 30 days is automatically filtered to ensure timely recommendations.
[0122] S32: Based on the visual similarity matrix stored in the lightweight visual association index table, all to-be-recommended content whose visual similarity with the anchor content exceeds a preset association threshold is retrieved to form a primary candidate content set.
[0123] In this embodiment, multi-anchor association retrieval is performed based on a lightweight visual association index table. For each selected anchor, the top 50 similar contents associated with it are extracted from the hash table index, and entries with a similarity exceeding a dynamic association threshold (initial value 0.6) are screened.
[0124] Cross-source merging of multi-anchor search results: When the same content is associated with multiple anchors, only the highest similarity value is retained, and the number of associated anchors is recorded as an auxiliary ranking factor. A two-stage filtering mechanism is used to first eliminate candidate content with a similarity below 0.4, and then exclude content that the user has interacted with in the past 7 days. Diversity control is implemented on the merged candidate set, and categories with a share exceeding 30% are statistically distributed according to content categories, with a downgrade (score × 0.7). The final candidate set size is controlled between 200 and 500 items. When insufficient results are found, the association threshold is automatically lowered (by 0.05 each time) and the search is repeated. The retrieval process uses batch parallel computing, compressing the response time of a single request to less than 50ms, and supporting tens of thousands of concurrent queries per second.
[0125] S4: For each primary candidate content in the primary candidate content set, perform multi-dimensional weighted calculation based on all interest weights of the current user to obtain a visual similarity score.
[0126] Specifically, the process of obtaining the visual similarity score includes:
[0127] S41: For each primary candidate content, calculate the feature similarity between its to-be-recommended visual feature set and the multi-dimensional visual features of the anchor content in each dimension.
[0128] In this embodiment, specifically, multi-dimensional visual features of candidate content and anchor content are first extracted, including object detection features, scene semantic features, style aesthetic features, and dynamic behavior features.
[0129] For object detection features, the cosine similarity between the category distribution vectors of the two is calculated, and the result is adjusted in combination with the average overlap rate (IoU) of the detection box to ensure that both the category matching degree and the consistency of spatial position are taken into account.
[0130] For scene semantic features, Jensen-Shannon divergence is used to measure the difference in the probability distribution of the two scenes, and the result is mapped to a similarity range of 0 to 1.
[0131] For style aesthetic features, the cosine similarity of the composite feature vectors is calculated. If the difference in aesthetic scores exceeds a certain threshold (e.g., 0.3), a penalty factor (e.g., 0.8) is applied to the similarity to reduce the impact of overly obvious aesthetic differences on the similarity.
[0132] For dynamic behavior features, the Dynamic Time Warping (DTW) algorithm is used to align feature sequences and then calculate similarity, thereby addressing the temporal shift of features between frames in the video content. Ultimately, the feature similarity between the candidate content and the anchor content in each visual dimension is obtained.
[0133] S42: Perform weighted multiplication of the feature similarity of each dimension and the normalized preference strength of the current user to obtain a weighted similarity component of each dimension.
[0134] In step S42, based on the feature similarities of each dimension calculated in step S41 and combined with the normalized preference strength of the current user, weighted multiplication is performed to obtain the weighted similarity components of each dimension.
[0135] Specifically, the normalized preference strength of the current user is first read from the user profile database. This includes the user's interest weights for four dimensions: objects, scenes, styles, and dynamics. Then, the feature similarity of each dimension is multiplied by the corresponding interest weight to obtain the weighted similarity component for that dimension.
[0136] For example, if the user's interest weight in the object dimension is 0.4, and the feature similarity between the candidate content and the anchor content in the object dimension is 0.8, then the weighted similarity component of this dimension is 0.4 multiplied by 0.8, or 0.32. This process is applied to all visual dimensions separately, ensuring that the similarity contribution of each dimension can be differentiated based on the user's personalized preferences, thereby reflecting the user's attention to different visual features.
[0137] S43: Sum the weighted similarity components of all dimensions to obtain a visual similarity score of the primary candidate content relative to the current user, and normalize the score.
[0138] In step S43 , the weighted similarity components of all dimensions are summed to obtain a visual similarity score of the primary candidate content relative to the current user, and the sum is normalized.
[0139] Specifically, the weighted similarity components of all dimensions calculated in step S42 are first summed to form a comprehensive score representing the overall visual similarity between the candidate content and the anchor content. This comprehensive score is then normalized to facilitate subsequent comparison and screening. This normalization typically employs a smoothed L1 normalization method, dividing the comprehensive score of each candidate content by the sum of the comprehensive scores of all candidate content, and performing a logarithmic transformation on the result to enhance discrimination.
[0140] In addition, outliers need to be processed during the normalization process, such as truncating scores that are outside a reasonable range to avoid extreme values affecting the overall ranking effect.
[0141] Ultimately, each candidate content will receive a normalized visual similarity score for subsequent dynamic threshold screening and content recommendation list generation.
[0142] S5: Screen out primary candidate content whose visual similarity scores exceed a dynamic threshold, and generate a content recommendation list based on the screened primary candidate content.
[0143] Specifically, the process of generating the content recommendation list includes:
[0144] S51: Compare the visual similarity score of each primary candidate content with the generated dynamic threshold in real time, and screen out the primary candidate content with a score exceeding the dynamic threshold.
[0145] For each candidate content in the primary candidate content set, its visual similarity score needs to be compared with the dynamic threshold in real time to screen out candidate content with a score exceeding the dynamic threshold.
[0146] Specifically, the most recent dynamic threshold (T) for the current user is first read from the distributed cache. This threshold, generated in step S2 and updated in real time, is then retrieved. The visual similarity score for each candidate content (calculated in step S43) is then compared against the dynamic threshold. If a candidate content score exceeds the dynamic threshold, it is retained as a valid recommendation candidate; otherwise, it is excluded.
[0147] To ensure screening efficiency, batch processing is adopted in actual operations to compare the scores of multiple candidate contents with thresholds in parallel, thereby supporting real-time response requirements in high-concurrency scenarios.
[0148] In addition, in order to avoid the recommendation list being too short or too long due to abnormal situations, the distribution of screening results is automatically recorded, and the instant adjustment mechanism of the dynamic threshold is triggered when necessary.
[0149] S52: Arrange the screened primary candidate contents in descending order according to their visual similarity scores to generate an ordered recommended content queue.
[0150] Specifically, in step S52, all candidate content that passes the dynamic threshold screening and its corresponding visual similarity scores are first loaded into memory to form a list to be sorted. Next, an efficient sorting algorithm (including but not limited to quick sort or heap sort) is used to sort the list in descending order, ensuring that the content with the highest score is displayed first.
[0151] To further enhance the user experience, we've introduced diversity control and time decay factors: If the proportion of content of the same type is too high, low-ranking content will be downgraded; Furthermore, time weighting is applied based on the freshness of the content, prioritizing recently updated content. After sorting, a structured recommendation queue is generated, and its intermediate results are cached for use in subsequent steps.
[0152] S53: Based on the ordered recommended content queue, intercept a preset number of candidate contents to generate a final content recommendation list.
[0153] In step S53 , specifically, the target length of the recommendation list (eg, 10 or 20 items) is first read from the configuration file. This parameter can be dynamically adjusted according to the user device type, network conditions, or personalized needs.
[0154] Then, the target number of content is extracted from the sorted recommendation queue in sequence and formatted to ensure that each recommended content contains complete meta information (such as title, cover image, description, etc.).
[0155] To further optimize recommendation results, candidate content undergoes a secondary filtering process to eliminate potential duplicate recommendations or irrelevant content (such as content that the user has explicitly marked as "not interested"). Finally, the generated recommendation list is packaged in JSON or another standardized format and returned to the front-end presentation layer via an API. Throughout this process, the system records the creation time and version number of the recommendation list for subsequent analysis and optimization.
[0156] Example 2
[0157] The present invention also provides an intelligent content recommendation system based on AI visual algorithm, which is used to execute the intelligent content recommendation method based on AI visual algorithm. Figure 2 As shown, the system includes:
[0158] The weight calculation module 100 is used to calculate the current user's interest weights for multi-dimensional visual features based on the current user's historical interaction content using an exponential decay function, wherein the interest weight is the current user's preference intensity for each dimensional visual feature in the multi-dimensional visual feature.
[0159] The threshold dynamic generation module 200 is configured to generate a dynamic threshold based on all interest weights and a user activity level obtained in advance.
[0160] The content primary screening module 300 is configured to determine anchor content based on the historical interaction content and all interest weights, and determine a primary candidate content set from the plurality of to-be-recommended contents based on a pre-constructed lightweight visual correlation index table representing a visual relationship matrix between any two to-be-recommended contents.
[0161] The multi-dimensional weighting module 400 is configured to perform multi-dimensional weighting calculation on each primary candidate content in the primary candidate content set according to all interest weights of the current user, to obtain a visual similarity score.
[0162] The recommended content generation module 500 is configured to screen the primary candidate content whose visual similarity score exceeds the dynamic threshold, and generate a content recommendation list according to the screened primary candidate content.
[0163] The present application is described with reference to flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks
[0164] Those skilled in the art can understand that all or part of the steps of various methods in the above embodiments can be completed by instructing the relevant hardware by means of a program, and the program can be stored in a computer readable storage medium, including Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically-Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, magnetic disk storage, magnetic tape storage, or any other medium that can be used to carry or store data in a computer readable manner.
[0165] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.
Claims
1. An intelligent content recommendation method based on AI visual algorithm, characterized in that: The method comprises the following steps: Based on the historical interaction content of the current user, an exponential decay function is used to calculate the current user's interest weights for the multi-dimensional visual features, where the interest weights are the current user's preference strength for each dimension of the multi-dimensional visual features; Based on all interest weights and combined with pre-acquired user activity, a dynamic threshold is generated; Determining anchor content by combining the historical interaction content and all interest weights, and determining a primary candidate content set from the plurality of to-be-recommended content based on a pre-constructed lightweight visual association index table, wherein the pre-constructed lightweight visual association index table represents a visual relationship matrix between each pair of to-be-recommended content; For each primary candidate content in the primary candidate content set, performing a multi-dimensional weighted calculation based on all interest weights of the current user to obtain a visual similarity score; Primary candidate contents whose visual similarity scores exceed the dynamic threshold are screened out, and a content recommendation list is generated based on the screened primary candidate contents.
2. The intelligent content recommendation method based on AI visual algorithm according to claim 1, characterized in that: The calculation process of the interest weight includes: Extract object detection features, scene semantic features, style aesthetic features, and dynamic behavior features of each content in the current user's historical interaction content; For each dimension of visual features, the preference strength at the current moment is calculated using an exponential decay function based on the interaction timestamp between the current user and the historical interaction content, and is used as the interest weight. The calculation formula for the preference strength is: in Indicates the current time For the first The preference strength of dimensional visual features, Indicates the The timestamp of the interaction, represents the attenuation coefficient, Indicates the The first historical interaction content The saliency score of the dimensional visual feature, Represents the base of natural logarithms.
3. The intelligent content recommendation method based on AI visual algorithm according to claim 2, characterized in that: The process of generating the dynamic threshold includes: The user activity score is calculated based on the current user's historical interaction frequency within the preset time window and the number of valid operations triggered in the current session. The historical interaction frequency and the number of valid operations are weighted and integrated. Based on the logarithmic function relationship between the sum of preference strength and user activity score, a dynamic threshold is generated by normalizing the scaling factor.
4. The intelligent content recommendation method based on AI visual algorithm according to claim 3, characterized in that: The construction process of the pre-built lightweight visual association index table includes: For all the content to be recommended, extract a set of visual features to be recommended with the same dimensions as the multi-dimensional visual features; Based on the set of visual features to be recommended, calculating the visual similarity between each two pieces of content to be recommended, and constructing a visual similarity matrix, wherein each matrix element represents the visual similarity between the corresponding two pieces of content to be recommended, and the visual similarity is calculated using the weighted cosine similarity of the visual features in each dimension; The visual similarity matrix is subjected to sparse processing and stored in a hash table structure to form a lightweight visual association index table.
5. The intelligent content recommendation method based on AI visual algorithm according to claim 4, characterized in that: The process of determining the primary candidate content set includes: From the historical interaction content, select at least one historical interaction content having the highest matching degree with the normalized preference strength of the current user as the anchor content, wherein the matching degree is determined by calculating the weighted dot product of the multi-dimensional visual features of the historical interaction content and the normalized preference strength; Based on the visual similarity matrix stored in the lightweight visual association index table, all the content to be recommended whose visual similarity with the anchor content exceeds a preset association threshold is retrieved to form a primary candidate content set.
6. The intelligent content recommendation method based on AI visual algorithm according to claim 5, characterized in that: The process of obtaining the visual similarity score includes: For each primary candidate content, calculate the feature similarity between its to-be-recommended visual feature set and the multi-dimensional visual features of the anchor content in each dimension; The weighted similarity components of each dimension are obtained by multiplying the feature similarity of each dimension by the normalized preference strength of the current user; The weighted similarity components of all dimensions are summed to obtain the visual similarity score of the primary candidate content relative to the current user, and the score is normalized.
7. The intelligent content recommendation method based on AI visual algorithm according to claim 6, characterized in that: The process of generating the content recommendation list includes: Compare the visual similarity score of each primary candidate content with the generated dynamic threshold in real time, and select the primary candidate content with a score exceeding the dynamic threshold; After screening, the primary candidate content is sorted in descending order according to its visual similarity score to generate an ordered recommended content queue; Based on the ordered recommended content queue, a preset number of candidate contents are intercepted to generate a final content recommendation list.
8. An intelligent content recommendation system based on AI visual algorithm, used to execute the intelligent content recommendation method based on AI visual algorithm according to any one of claims 1 to 7, characterized in that: The system comprises: A weight calculation module is used to calculate the current user's interest weights for the multi-dimensional visual features based on the current user's historical interaction content using an exponential decay function, where the interest weight is the current user's preference strength for each dimension of the multi-dimensional visual features; A threshold dynamic generation module is used to generate a dynamic threshold based on all interest weights and combined with pre-acquired user activity; a primary content screening module, configured to determine anchor content based on the historical interaction content and all interest weights, and determine a primary candidate content set from a plurality of to-be-recommended contents based on a pre-constructed lightweight visual association index table representing a visual relationship matrix between each pair of to-be-recommended contents; a multi-dimensional weighting module for performing a multi-dimensional weighted calculation on each primary candidate content in the primary candidate content set according to all interest weights of the current user to obtain a visual similarity score; The recommended content generation module is configured to screen out primary candidate content whose visual similarity scores exceed the dynamic threshold, and generate a content recommendation list based on the screened primary candidate content.
Citation Information
Patent Citations
Knowledge distillation multi-modal recommendation method based on modal decoupling
CN119003887A
User interest point estimation method and related equipment
CN119691168A