Method for generating a personalized highlight reel of a sports event based on user preferences
By using event-level segmentation and semantic annotation, a causal relationship model is constructed to perform counterfactual inference, remove negative emotional interference, and generate user interest feature vectors. This solves the problem of user profile bias in existing technologies and enables the personalized generation of high-quality sports event highlights.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI NANA TECH CO LTD
- Filing Date
- 2026-04-28
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies lack effective identification and differentiation of behavioral semantics when generating sports highlights that reflect user preferences, leading to systematic biases in user profiles and potentially recommending low-quality or even illegal content.
By using event-level segmentation and semantic annotation, a causal relationship model is constructed, counterfactual inference is performed, semantic interference from negative emotional events is removed, and user interest feature vectors containing semantic correction information are generated for personalized compilation generation.
This improves the accuracy of user interest profiling, prioritizes high-quality segments that match genuine interests, reduces the probability of low-quality or inappropriate content, and enhances content quality and system stability.
Smart Images

Figure CN122364504A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video processing and intelligent recommendation technology, specifically to a method for generating personalized highlights of sports events based on user preferences. Background Technology
[0002] Personalized sports highlight generation based on user preferences involves analyzing user interests and behavioral data (such as favorite teams, players, game types, viewing history, and viewing time) and combining this data with key events in the game (such as goals, dunks, key assists, and fouls). Algorithms then automatically filter, sort, and edit the most relevant and exciting moments from the game to generate a customized highlight video. This ensures that each user sees different highlights, better matching their individual interests and improving the viewing experience and content relevance.
[0003] In existing technologies, when converting user viewing behavior into features, the focus is often on behavioral intensity indicators such as viewing time and click-through rate, while lacking effective identification and differentiation of behavioral semantics. This leads to situations where, when a user repeatedly watches conflict or controversial segments of a match, the system may misjudge this behavior as a preference for "exciting match content," thus incorrectly reinforcing related weights in feature modeling. This semantic mismatch problem can cause systemic biases in user profiles, thereby driving recommendations or highlight generation results to favor low-quality or even potentially illegal content, resulting in higher content distribution risks and compliance hazards. Summary of the Invention
[0004] The purpose of this invention is to provide a method for generating personalized sports highlights based on user preferences, in order to address the shortcomings of the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for generating personalized sports highlights based on user preferences, comprising: Acquire user viewing and interaction data in sports event videos, and locate the corresponding video segments based on the behavior data; The video segments are segmented at the event level and semantically labeled to obtain event types and emotional tendencies that correspond one-to-one with user behavior data, forming user behavior-event semantic association data. Based on the aforementioned user behavior-event semantic association data, a causal relationship model is constructed that includes user real interest variables, event semantic variables, and behavior intensity variables; Using the aforementioned causal relationship model, counterfactual inference is performed, and the intensity of the user's corresponding counterfactual behavior is calculated under the condition of excluding negative semantic events. The behavior weight is calculated based on the difference between the counterfactual behavior intensity and the original behavior intensity, combined with the event semantic type. Based on the aforementioned behavioral weights, user behavior features are reconstructed to generate user interest feature vectors containing semantic correction information. The user interest feature vector is input into the user profile model to obtain the user interest profile, and personalized sports event highlights or content recommendations are generated based on the user interest profile.
[0006] Preferably, the video segment is segmented and semantically labeled at the event level, including: performing preliminary boundary detection on the video segment based on visual feature changes and audio energy changes in the video frame sequence to generate candidate event sub-segments; using a pre-trained multimodal recognition model to identify the event type of the candidate event sub-segments to obtain structured event type labels; and extracting emotional tendency features based on the audio emotion features and narration semantic information corresponding to the candidate event sub-segments, and determining the emotional tendency category through an emotion classification model.
[0007] Preferably, the event type label is associated with the sentiment category and time-aligned with the user behavior data to generate user behavior-event semantic association data in which user behavior and event semantics correspond one-to-one.
[0008] Preferably, the causal relationship model is constructed by: using one-hot encoding for event types, numerical mapping for emotional tendencies, and normalizing behavioral intensity variables; establishing a directed acyclic structure that includes user real interest variables, event semantic variables, and behavioral intensity variables; modeling the behavioral intensity variables as a conditional Gaussian distribution; and optimizing the model parameters through maximum likelihood estimation and gradient descent algorithms.
[0009] Preferably, after the causal relationship model is constructed, it further includes: calculating the influence weights of event semantic variables and user real interest variables on behavior intensity variables; determining event-driven behavior when the weight coefficient of the event semantic variable is greater than 0.6; determining interest-driven behavior when the weight coefficient of the user real interest variable is greater than 0.5; and applying a decay coefficient of 0.7 to the influence path of the event semantic variable.
[0010] Preferably, the counterfactual inference includes: replacing event semantic variables with negative emotional tendencies with neutral emotional values; keeping the event type unchanged and forming counterfactual input data; calculating the expected value of the behavior intensity variable based on a conditional Gaussian distribution; and performing numerical approximation calculation by setting 100 sampling points within the mean ± 3 standard deviations.
[0011] Preferably, the counterfactual behavior intensity includes: normalizing the expected value and mapping it to the interval between 0 and 1; setting the denominator to 0.01 when the difference between the maximum and minimum values is less than 0.01; calculating the difference between the original behavior intensity and the counterfactual behavior intensity, and using 0.3 as the significant deviation judgment threshold.
[0012] Preferably, segmented mapping is performed based on the difference index and emotional tendency; when the difference is greater than 0.3 and the emotional tendency is negative, the weight coefficient is set to 0.5; when the difference is less than or equal to 0.3 and the emotional tendency is negative, the weight coefficient is set to 0.8; when the emotional tendency is non-negative, the weight coefficient is set to 1 to 1.2 based on the difference; the original behavior intensity is multiplied by the weight coefficient and normalized.
[0013] Preferably, the generation of user interest feature vectors includes: weighting event semantic variables and behavioral weights to form a weighted event semantic feature set; dividing the event into 12 groups according to event type and emotional tendency and calculating the average weighted value; normalizing the results of each group and splicing them in a fixed order to form a user interest feature vector; introducing historical interest feature vectors and fusing them with weights of 0.7 and 0.3, while updating them with a time decay coefficient based on 0.9.
[0014] Preferably, the generation or recommendation of personalized sports event highlights includes: inputting user interest feature vectors into a user profile model to obtain user interest profile vectors; calculating the cosine similarity between the user interest profile vectors and the content feature vectors of candidate video segments as a matching score; selecting the top N video segments according to the matching score to form a candidate highlight sequence; and rearranging the candidate highlight sequence based on time continuity constraints, diversity constraints, and the condition that the emotion ratio is not less than 60% to generate the final result.
[0015] The technical effects and advantages provided by the present invention in the above technical solution are as follows: 1. Compared to existing technologies, the core of this invention lies in introducing a causal relationship model involving event semantic variables and a counterfactual inference mechanism. During the user behavior feature construction stage, by intervening in event semantic variables, event semantic variables corresponding to negative emotions are replaced with non-negative emotion values. Counterfactual behavior intensity is calculated based on a conditional Gaussian distribution, thereby stripping away the abnormally enhanced portion of user behavior caused by event semantic stimuli. Unlike existing technologies that model solely based on behavior intensity or statistical features, this invention explicitly models the causal relationship between user's true interest variables and event semantic variables on behavior intensity variables. This allows behavior intensity to be decomposed into interest-driven and semantic-driven components, and the behavior intensity after removing semantic interference is directly obtained through counterfactual inference, effectively solving the problem of negative segments such as conflicts being misjudged as user interests. The direct effect of this technique is that semantic noise in user behavior data is structurally eliminated, making the data foundation upon which subsequent feature construction relies more accurate and reliable.
[0016] 2. This invention employs a segmented weighted mapping mechanism based on the difference between the intensity of counterfactual behavior and the intensity of the original behavior, combined with a semantic correction feature reconstruction method, to differentiate and adjust behaviors under different types of event semantics. Specifically, a decay coefficient of 0.5 is used when the difference is greater than 0.3 for negative emotions, and an enhancement coefficient of 1 to 1.2 is used when the difference is large for non-negative emotions. Grouping and statistical analysis are performed based on event type and emotional tendency, ultimately generating a user interest feature vector containing semantic correction information. Unlike existing technologies that use uniform weighting or simple filtering, this invention achieves refined semantic correction and structured expression at the feature level, suppressing abnormal behaviors driven by negative semantics while strengthening behaviors driven by genuine interests. The direct technical effect is a significant improvement in the accuracy of user interest profiles. In the generation of personalized sports highlights, high-quality segments that match genuine interests are prioritized, while reducing the probability of low-quality or inappropriate content, thus improving content quality and system stability while ensuring recommendation accuracy. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0018] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] For examples, please refer to Figure 1 As shown in this embodiment, the method for generating personalized sports highlights based on user preferences includes: Acquire user viewing and interaction data in sports event videos, and locate the corresponding video segments based on the behavior data.
[0021] The system collects user behavior data during playback by embedding tracking points and generating structured logs, including: video ID, playback start and end times (such as start timestamp and end timestamp), behavior type (play, pause, fast forward, like, etc.), and current playback progress (such as 120 seconds), forming user behavior sequence data.
[0022] Align user behavior data with the video timeline: Determine the time interval of user viewing (e.g., 100s–140s) based on playback progress or timestamps, reconstruct the trajectory of behaviors such as fast forward and rewind to obtain the actual viewing path, and output the set of viewing intervals of the user in the video.
[0023] Preprocess the raw sports video in advance: divide the video into segments by event or fixed window (e.g., every 10 seconds or by goal event), create a time index for each segment (e.g., segment A: 90s–120s), and form a video segment library.
[0024] Matching user viewing intervals with video segments: Determine whether there is a time overlap between the user viewing interval and a certain video segment. If the overlap ratio exceeds a threshold (e.g., ≥50%), it is considered that the user has watched the segment, thus establishing a mapping relationship between user behavior and video segments.
[0025] For highly interactive behaviors such as likes and comments: directly record the playback time when the behavior occurs, and map that time point to the corresponding video segment to improve positioning accuracy.
[0026] The final result is a set of clips that the user has watched, and the behavioral intensity of each clip (watching duration, whether it was liked, etc.), which is used for subsequent semantic analysis and feature construction.
[0027] The video segments are segmented at the event level and semantically labeled to obtain event types and emotional tendencies that correspond one-to-one with user behavior data, forming user behavior-event semantic association data.
[0028] For the input video segment, a continuous video frame sequence and the corresponding audio signal are extracted, and the video segment is subjected to sliding analysis with a fixed time window. The time window length is set to 1 second and the sliding step size is set to 0.5 seconds. This value is based on the characteristic that key events in sports events (such as goals, conflicts, etc.) usually show significant changes within 1 to 3 seconds, so as to control the computational complexity while ensuring detection accuracy.
[0029] Within each time window, the pixel difference between adjacent frames is calculated. The pixel-by-pixel grayscale difference is calculated for two consecutive frames, and the average of all pixel differences is taken to obtain the inter-frame difference. At the same time, the audio energy value within the time window is calculated. The audio energy value is obtained by averaging the squared amplitude of the audio signal.
[0030] When the inter-frame difference between two consecutive time windows exceeds a preset visual threshold of 0.35, and the corresponding audio energy change exceeds a preset audio threshold of 0.4, that time point is marked as a candidate event boundary. These thresholds were obtained through statistical analysis of no fewer than 1000 sports event videos. The visual threshold of 0.35 corresponds to drastic changes in the scene (such as camera cuts or physical contact), and the audio threshold of 0.4 corresponds to sudden changes in audience cheers or commentary volume, thus effectively covering the vast majority of key event boundaries.
[0031] Based on the candidate event boundaries, the video segment is divided to obtain multiple candidate event sub-segments.
[0032] Multimodal features, including visual and audio features, are extracted for each candidate event segment. Visual features are encoded by a convolutional neural network on keyframes, outputting a feature vector of length 128; audio features are extracted by Mel-frequency cepstral coefficients from the audio signal, resulting in an audio feature vector of length 64.
[0033] The visual feature vector and the audio feature vector are concatenated by dimension to form a joint feature vector of length 192, which is then input into a pre-trained multimodal recognition model for event type recognition.
[0034] The multimodal recognition model adopts a classification network based on the Transformer structure. Its input is the joint feature vector mentioned above, and its output is the probability distribution of each event type, wherein the event types include at least four categories: goal, assist, foul, and conflict.
[0035] For each candidate event sub-segment, the event type with the highest probability value is selected as the event type label for that sub-segment. When the maximum probability is less than 0.6, the sub-segment is marked as a non-critical event to avoid low-confidence identification results interfering with subsequent processing.
[0036] Based on the obtained event type labels, sentiment analysis is performed on candidate event sub-segments. First, the audio sentiment features of the sub-segment are extracted. These features include the mean audio energy, the standard deviation of audio energy, and the amplitude of the fundamental frequency variation. The fundamental frequency is obtained by performing autocorrelation analysis on the audio signal.
[0037] Simultaneously, semantic analysis is performed on the narration audio. After converting the audio into text, the frequency of emotional words is statistically analyzed. The emotional words include negative words such as "intense," "conflict," and "controversy," as well as positive words such as "wonderful" and "beautiful." The proportion of negative words and the proportion of positive words are calculated separately.
[0038] Audio sentiment features and semantic sentiment features are fused to construct a sentiment tendency score, which is determined as follows: the mean audio energy is normalized to the range of 0 to 1 as the first weighting factor, and the difference between the proportion of negative words and the proportion of positive words is used as the second weighting factor. These two factors are then linearly combined with a weighting ratio of 0.6 and 0.4 to obtain a comprehensive score. A comprehensive score greater than 0.5 is considered positive sentiment, a comprehensive score less than -0.2 is considered negative sentiment, and all other cases are considered neutral sentiment. These threshold values are based on statistical results from sports commentary corpora, where negative sentiment is typically accompanied by a high proportion of negative words and audio fluctuations.
[0039] The event type labels are associated with sentiment categories to form event semantic information, and user behavior is mapped to corresponding candidate event sub-segments based on the timestamp alignment relationship in user behavior data.
[0040] For each time interval containing a user's behavior, candidate event segments with an overlap ratio greater than 0.5 are identified. These segments are then assigned event type and sentiment categories to corresponding user behavior records, generating a one-to-one semantic correspondence between user behavior and event. This process ensures that each user behavior data point contains clear event type and sentiment information, providing a reliable data foundation for subsequent causal bias correction and semantic adjustment.
[0041] Based on the aforementioned user behavior-event semantic association data, a causal relationship model is constructed that includes user real interest variables, event semantic variables, and behavior intensity variables.
[0042] Each user behavior record includes information on event type, sentiment, and behavior intensity. Event type is represented using one-hot encoding, mapping goals, assists, fouls, and conflicts to vectors of length 4. For example, a goal corresponds to a vector of (1, 0, 0, 0), and a foul corresponds to a vector of (0, 0, 1, 0). Sentiment is represented using numerical mapping, with positive sentiment mapped to 1, neutral sentiment to 0, and negative sentiment to -1. Behavior intensity is obtained by fusing viewing time, playback completion rate, and interaction behavior. Viewing time is in seconds, playback completion rate is the proportion of the user's viewing time to the total video segment duration, and interaction behavior is quantified by assigning a value of 1 to likes, 2 to comments, and 3 to shares.
[0043] The three dimensions mentioned above are normalized: viewing time is normalized by dividing by the corresponding video segment length, and interactive behavior is normalized by dividing by the maximum interaction value of 3. This results in a behavior intensity variable with values ranging from 0 to 1. This process ensures that the event semantic variable and the behavior intensity variable are on a uniform scale, facilitating subsequent modeling.
[0044] After feature vectorization, an initial causal structure graph is established based on the statistical dependency between event semantic variables and behavior intensity variables. In this structure, nodes include user true interest variables, event semantic variables, and behavior intensity variables. User true interest variables, as latent variables, are not directly observed, and their values are estimated through subsequent parameter learning. Event semantic variables, as exogenous variables, are directly determined by the video content. Behavior intensity variables, as observed variables, are influenced by both user true interest variables and event semantic variables.
[0045] Structurally, causal edges are established between user's intrinsic interest variable and behavior intensity variable, and simultaneously between event semantic variable and behavior intensity variable, to reflect the mechanism by which behavior intensity is driven by both "intrinsic interest" and "external stimuli." To avoid structural ambiguity, an acyclic constraint is imposed on the causal graph, meaning there is no path from behavior intensity variable back to either user's intrinsic interest variable or event semantic variable, thus ensuring the model meets the basic requirements of a directed acyclic graph.
[0046] The behavioral intensity variable is treated as a continuous variable and modeled using a conditional Gaussian distribution. Its mean is determined by a linear combination of the user's true interest variable and the event semantic variable, while the variance reflects the degree of behavioral fluctuation. The user's true interest variable is set as a continuous variable taking values between 0 and 1, with initial values obtained by averaging the user's historical behavioral intensity. For the event semantic variable, pre-encoded discrete or continuous representations are directly used in the calculation. During parameter learning, the model parameters are iteratively optimized using the maximum likelihood estimation method. That is, given user behavioral data, the weight coefficients corresponding to the user's true interest variable and the event semantic variable are adjusted to minimize the difference between the behavioral intensity distribution generated by the model and the actual observed data.
[0047] In the specific optimization process, a gradient descent strategy is adopted, and the learning rate is set to 0.01. This value ensures the convergence speed while avoiding parameter oscillation. The number of iterations is set to 100. When the log-likelihood increase is less than 0.001 in 5 consecutive iterations, the iteration is stopped to balance computational efficiency and fitting accuracy.
[0048] After the parameters are learned, the causal structure is constrained and adjusted according to the weight coefficients corresponding to each causal edge.
[0049] The influence weights of event semantic variables on behavior intensity variables and user true interest variables on behavior intensity variables are calculated. When the weight coefficient of event semantic variables is greater than the weight coefficient of user true interest variables and exceeds the threshold of 0.6, it is determined that the current behavior intensity is mainly driven by event semantics. This situation often occurs in conflict or dispute events. When the weight coefficient of user true interest variables is greater than the weight coefficient of event semantic variables and exceeds the threshold of 0.5, it is determined that the current behavior is mainly driven by user intrinsic interests.
[0050] The aforementioned thresholds were obtained through statistical analysis of a large amount of user behavior data from sports events. A threshold of 0.6 corresponds to a scenario driven by significant external stimuli, while 0.5 corresponds to a scenario dominated by stable interests. Based on this determination, constraints are imposed on causal edges. Specifically, in subsequent inference processes, a decay coefficient of 0.7 is applied to paths with a significant impact on event semantic variables to reduce their explanatory power for behavioral intensity, thereby highlighting the role of users' true interest variables.
[0051] The above steps yield a causal model that includes variables related to user intrinsic interest, event semantics, and behavioral intensity. This model clearly distinguishes between the portion of user behavior driven by intrinsic interest and the portion caused by event semantic stimuli, providing a quantifiable basis for subsequent counterfactual inference. In practical applications, when it is necessary to evaluate user behavior under conditions without negative event semantics, this causal model can be used to fix the event semantic variables to non-negative values, and the corresponding behavioral intensity can be calculated through the model, thereby achieving an accurate estimate of the user's intrinsic interest.
[0052] Counterfactual inference is performed using the aforementioned causal relationship model. Under the condition of excluding negative semantic events, the intensity of the user's corresponding counterfactual behavior is calculated.
[0053] In the causal relationship model, intervention operations are performed on the event semantic variables. These event semantic variables are composed of event type and emotional tendency, where the emotional tendency takes values of 1, 0, or -1, corresponding to positive, neutral, and negative emotions, respectively. During counterfactual inference, all event semantic variables with an emotional tendency value of -1 are replaced, uniformly mapping them to a state with an emotional tendency value of 0, i.e., transforming them into non-negative emotional conditions. This replacement operation is not a simple assignment, but rather keeps the event type unchanged, adjusting only the emotional tendency dimension to ensure that the event semantic variables maintain consistency in semantic category.
[0054] For example, for a sample with an event type of conflict and an emotional tendency of -1, after intervention, the event type of conflict is retained, but the emotional tendency changes from -1 to 0, thus simulating the behavioral response that the user might produce without negative emotional interference. This method forms a counterfactual input data set.
[0055] In the causal model, the behavior intensity variable is modeled as a conditional Gaussian distribution, and its mean is determined by a weighted linear combination of the user's true interest variable and the event semantic variable. The weight coefficients corresponding to the user's true interest variable and the event semantic variable have been obtained during the model parameter learning phase.
[0056] In counterfactual inference, the values of the user's true interest variables are kept constant. The replaced event semantic variables are substituted into the model. The mean estimate of the behavior intensity variable is obtained by multiplying the weight coefficients with the variable values and summing the results.
[0057] Simultaneously, to account for behavioral volatility, the variance parameter learned in the model is introduced to extend the mean with a probability distribution, thereby calculating the expected value of the behavioral intensity variable. This expected value is obtained by integrating the conditional Gaussian distribution over the entire domain. In actual calculations, a numerical approximation method is used: dividing the model into 100 equidistant sampling points within a range of 3 standard deviations on both sides of the mean, multiplying the probability density and the value of each sampling point, and then summing the results to obtain an approximate expected value. The sampling range and number are set based on the fact that the Gaussian distribution covers approximately 99.7% of the probability within the range of the mean ± 3 standard deviations, thus controlling computational complexity while ensuring computational accuracy.
[0058] After obtaining the expected value of the behavior intensity variable, the expected value is normalized to eliminate the influence of differences in behavior scale among different users.
[0059] For each user, the minimum and maximum values of the behavior intensity variable are statistically analyzed from their historical behavior data, and a linear mapping relationship is constructed to map the currently calculated expected value to the interval between 0 and 1. During the mapping process, the conversion is performed by subtracting the minimum value from the current value and then dividing by the difference between the maximum and minimum values. When the difference between the maximum and minimum values is less than 0.01, the denominator is uniformly set to 0.01 to avoid numerical instability caused by an excessively small divisor. The selection of the above threshold is based on the analysis of actual user behavior data. When the variation range of behavior intensity is less than 0.01, it indicates that the user behavior is relatively stable. In this case, setting a minimum denominator can prevent abnormal amplification of the normalization result. After normalization, a behavior intensity variable under a uniform scale is obtained.
[0060] The normalized behavioral intensity variable is used as the counterfactual behavioral intensity of users, excluding negative semantic events. To verify the rationality of this counterfactual behavioral intensity, it can be compared with the original behavioral intensity. When the original behavioral intensity is significantly higher than the counterfactual behavioral intensity and the corresponding event semantic variable shows a negative emotional tendency, it indicates that the behavior is mainly driven by negative event stimuli. When the difference between the two is small or the counterfactual behavioral intensity is higher, it indicates that the user's behavior more reflects their true interests. In practical applications, to quantify this difference, a difference index is introduced, which is the original behavioral intensity minus the counterfactual behavioral intensity. When the difference is greater than 0.3, it is judged as a significant deviation. This threshold is obtained through statistical analysis of the distribution of user behavior data. The samples with a difference greater than 0.3 account for approximately 15% of the total data, corresponding to behaviors that are significantly influenced by external events.
[0061] This step achieves a re-estimation of user behavior intensity under the condition of eliminating interference from negative semantic events, enabling the obtained counterfactual behavior intensity to more realistically reflect the user's intrinsic interests. This result not only provides a basis for the subsequent calculation of semantic correction weights but also provides more reliable input features for the user profiling model, thereby effectively reducing the impact of pseudo-interests caused by negative events such as conflicts on the system. In the overall process, the combination of intervention in event semantic variables, probabilistic inference based on causal relationship models, and normalization processing ensures that the counterfactual inference process has a clear mathematical foundation and a stable calculation method, maintaining consistent processing effects across different users and event scenarios.
[0062] The behavior weight is calculated based on the difference between the counterfactual behavior intensity and the original behavior intensity, combined with the event semantic type. The original behavior intensity is the behavior intensity variable recorded by the user during actual viewing, while the counterfactual behavior intensity is the behavior intensity variable inferred through a causal relationship model, excluding negative semantic events.
[0063] For each user behavior record, the original behavior intensity is subtracted from the counterfactual behavior intensity to obtain a difference index. This difference index characterizes the degree to which user behavior is influenced by event semantics. A positive difference indicates that the original behavior intensity is higher than the counterfactual behavior intensity, suggesting that the user behavior may be amplified by event semantics; a negative difference indicates that the original behavior intensity is lower than the counterfactual behavior intensity, suggesting that the user behavior may be inhibited. In actual processing, to avoid extreme values interfering with subsequent calculations, the difference index is truncated: a difference greater than 1 is uniformly set to 1, and a difference less than -1 is uniformly set to -1. This range is determined based on the characteristic that the behavior intensity variable has been normalized to the 0-1 interval, thus ensuring that the difference index is within a reasonable range.
[0064] After obtaining the difference index, the behavioral weights are segmented and mapped by combining the event type and sentiment tendency in the event semantic variables.
[0065] First, the sentiment tendency value in the event semantic variable is determined. A sentiment tendency of -1 indicates a negative emotional event; a sentiment tendency of 0 or 1 indicates a non-negative emotional event. When the sentiment tendency is -1, the magnitude of the difference index is further determined. When the difference is greater than 0.3, it indicates that the user's behavioral intensity during a negative emotional event is significantly higher than their behavioral intensity under conditions excluding such events. This type of behavior is considered to be primarily driven by the event stimulus. The threshold of 0.3 was obtained through statistical analysis of user behavior data from large-scale sports events. In the sample, when the difference exceeds 0.3, the corresponding behavior shows a clear concentrated distribution during the event period and deviates significantly from the user's long-term interest distribution.
[0066] Therefore, under this condition, the behavior weight decay coefficient is set to 0.5, which reduces the original behavior intensity to half of its original value, in order to suppress the impact of this type of behavior on the user profile.
[0067] When the emotional tendency is -1 and the difference is less than or equal to 0.3, it indicates that although there are negative emotional events, their impact on user behavior is limited. In this case, the behavior weight decay coefficient is set to 0.8 to achieve the purpose of moderately reducing the weight, thereby retaining some behavioral information while avoiding completely suppressing possible real interest signals.
[0068] When the emotional tendency is 0 or 1, it indicates that the event is a non-negative emotional event. In this case, no attenuation processing is applied to the behavior; instead, the behavior weight is maintained or enhanced based on the difference index. When the difference is less than 0.1, it indicates that the original behavior intensity and the counterfactual behavior intensity are basically consistent, suggesting that the behavior is mainly driven by the user's genuine interest. In this case, the behavior weight coefficient is set to 1, i.e., the original behavior intensity remains unchanged. When the difference is between 0.1 and 0.3, it indicates that there is a certain degree of event enhancement, but it does not reach a significant level. In this case, the behavior weight coefficient is set to 1.1 to moderately enhance the influence of this type of behavior in the feature. When the difference is greater than 0.3 and the emotional tendency is non-negative, it indicates that the behavior has both high intensity and is not affected by negative semantic interference. This type of behavior usually corresponds to exciting events that users pay close attention to, such as key goals or brilliant combinations. In this case, the behavior weight coefficient is set to 1.2 to highlight the importance of this type of behavior. The weighting coefficients mentioned above range from 1 to 1.2, and are determined based on statistical analysis of the distribution of behavior intensity. This range can enhance the impact of high-quality behaviors while avoiding excessive weights that could lead to feature imbalance.
[0069] After determining the behavior weight coefficients, the initial behavior weight is calculated by multiplying the original behavior intensity by the corresponding weight coefficient. Specifically, for each user behavior record, its original behavior intensity value is multiplied by the corresponding weight coefficient to obtain the semantically corrected behavior weight value. For example, when the original behavior intensity of a certain behavior is 0.8 and the corresponding weight coefficient is 0.5, its initial behavior weight is 0.4; when the original behavior intensity is 0.7 and the weight coefficient is 1.2, its initial behavior weight is 0.84. This method enables differentiated adjustment for different types of behavior.
[0070] After obtaining the initial behavior weights, they are normalized to ensure comparability between different users and video segments. Specifically, for all behavior records of the same user, the maximum and minimum values of the initial behavior weights are calculated, and each initial behavior weight is transformed to the range of 0 to 1 using a linear mapping method. During the mapping process, the calculation is performed by subtracting the minimum value from the current weight and then dividing by the difference between the maximum and minimum values. When the difference between the maximum and minimum values is less than 0.01, the denominator is uniformly set to 0.01 to avoid numerical instability. This processing method ensures the numerical stability of the normalization result while avoiding overall distribution imbalance caused by individual extreme values. The normalized behavior weights are used as the final output for subsequent user behavior feature reconstruction.
[0071] Based on the aforementioned behavioral weights, user behavior features are reconstructed to generate user interest feature vectors containing semantic correction information.
[0072] For each user behavior record, event semantic variables and corresponding behavior weights have been obtained. The event semantic variables consist of event type and sentiment tendency, while the behavior weights are numerical values after difference adjustment and normalization. Each behavior record is represented as an "event semantic variable - behavior weight" pair, where the event type is represented using one-hot encoding, and the sentiment tendency is represented numerically. The event type vector and the sentiment tendency numerical value are concatenated to form a unified-dimensional event semantic feature vector. Then, each element in this vector is multiplied by its corresponding behavior weight to obtain a weighted event semantic feature vector. By performing the above operations on all behavior records, a weighted event semantic feature set is formed, where each element reflects the importance of a particular event semantic in the user's behavior.
[0073] After obtaining the weighted event semantic feature set, it is grouped and statistically analyzed according to event type and emotional tendency. Event types are divided into four categories: goals, assists, fouls, and conflicts. Within each event type, emotional tendencies are further divided into three categories: positive, neutral, and negative, resulting in a total of 12 feature groups. For each group, all feature vectors belonging to that group in the weighted event semantic feature set are traversed, and the values in the corresponding dimensions are accumulated to obtain the weighted cumulative value for that group. To avoid the influence of differences in sample size within groups on the results, after accumulation, the weighted cumulative value for each group is divided by the number of behavior records within that group to obtain the average weighted value. This processing method ensures comparability between different groups while preventing any one group from having excessive weight due to a large sample size.
[0074] In all groups of the same user, the maximum and minimum average weighted values are calculated, and a linear mapping method is used to transform each group value to the interval between 0 and 1. During the mapping process, the calculation is performed by subtracting the minimum value from the current group value and then dividing by the difference between the maximum and minimum values. When the difference between the maximum and minimum values is less than 0.01, the denominator is set to 0.01 to avoid numerical amplification. The above threshold selection is based on the distribution of user behavior data. When all group values are highly similar, it indicates that the user interest distribution is relatively uniform. In this case, setting a minimum denominator ensures the stability of the normalization result. After normalization, the group values are concatenated according to a fixed dimensional order: first sorted by event type, then by emotional tendency, for example, "goal - positive emotion," "goal - neutral emotion," "goal - negative emotion," etc., ultimately forming a user interest feature vector of length 12.
[0075] The system retrieves the user's historical interest feature vector from the previous time period, which can be set to 7 days. This value is based on the fact that sports viewing behavior typically exhibits weekly fluctuations, effectively reflecting short-term changes in user interests. During the fusion process, different weights are assigned to the current user interest feature vector and the historical interest feature vector. The current feature vector has a weight of 0.7, and the historical feature vector has a weight of 0.3. This ratio was obtained through statistical analysis of user interest stability. In most users, recent behavior has a more significant impact on current interests, but historical behavior still has some reference value. Specifically, the fusion method involves multiplying the values of the corresponding dimensions of the two feature vectors by their respective weights and then summing the results to obtain the updated user interest feature vector.
[0076] Furthermore, to avoid excessively lagging influence of historical features on current interests, a time decay coefficient is introduced to further adjust the historical interest feature vector. This time decay coefficient is calculated exponentially based on the time interval. When the time interval corresponding to a historical feature is t days, the decay coefficient is determined by raising t to the power of 0.9. For example, when the time interval is 3 days, the decay coefficient is 0.9³, approximately 0.729. The values of each dimension in the historical interest feature vector are multiplied by the corresponding time decay coefficient before participating in the above fusion calculation, thus minimizing the impact of older historical behavior on current features. This decay method effectively balances the stability and timeliness of interests, allowing the user's interest feature vector to reflect long-term preferences while also responding promptly to short-term changes.
[0077] The final generated feature vector contains semantic correction information for user interests. During its construction, this feature vector fully considers the moderating effect of behavioral weights on the semantics of different events, effectively suppressing abnormal behaviors triggered by negative emotional events while strengthening behaviors driven by genuine interests. Simultaneously, through grouped statistical analysis and normalization, the feature vector achieves structural uniformity and comparability; by introducing historical features and a time decay mechanism, the feature vector possesses smoothness and dynamic adaptability over time. This user interest feature vector can be directly used as input for subsequent user profile modeling and personalized content generation, thereby improving the system's accuracy in depicting users' true interests.
[0078] The user interest feature vector is input into the user profile model to obtain the user interest profile, and personalized sports event highlights or content recommendations are generated based on the user interest profile.
[0079] The user profiling model employs a multi-layer neural network structure, with the input layer dimension consistent with the user interest feature vector dimension. In this embodiment, the user interest feature vector has a length of 12, corresponding to a combination distribution of event type and emotional tendency. Two fully connected layers are sequentially placed after the input layer. The first fully connected layer has 64 neurons, and the second fully connected layer has 32 neurons. A non-linear activation function is applied after each fully connected layer. This non-linear activation function is a modified linear unit function, whose output remains the original value when the input value is greater than 0, and outputs 0 when the input value is less than or equal to 0. This function selection ensures computational efficiency while avoiding the gradient vanishing problem. Weight matrices and bias vectors are introduced between each layer. By linearly transforming the input vector and then applying a non-linear mapping, a high-dimensional expression of user interest features is achieved. Model parameters are obtained through training with historical user behavior data. During training, a cross-entropy loss function is used to measure the difference between the predicted interest distribution and the actual behavior distribution. The weight matrix is iteratively updated using a backpropagation algorithm, with a learning rate set to 0.005. This value strikes a balance between convergence speed and stability during actual training.
[0080] After completing the multi-layer mapping, the output layer yields a user interest profile vector of length 32. This vector is numerically compressed to the range of 0 to 1, achieved by introducing a normalization operation in the output layer. Specifically, after summing all elements in the vector, each element is divided by the sum, ensuring that the sum of all dimensions equals 1. This normalization method imbues the user interest profile vector with probability distribution characteristics, facilitating subsequent matching calculations with content features.
[0081] After obtaining the user interest profile vector, it is matched with the content feature vectors of candidate video segments. The content feature vectors of the candidate video segments are generated in a manner consistent with the user interest feature construction process, i.e., the video segments are feature-encoded based on event type and emotional tendency, and represented by vectors of the same dimension. For each candidate video segment, the cosine similarity between its content feature vector and the user interest profile vector is calculated. The cosine similarity is determined as follows: first, the cumulative value of the product of the corresponding dimensions of the two vectors is calculated; then, the magnitude of each vector is calculated separately, i.e., the squares of each dimension are summed and the square root is taken; finally, the cumulative sum of the products is divided by the product of the two magnitudes to obtain a similarity value between -1 and 1. Since the vectors are all non-negative after normalization, the actual similarity range is concentrated between 0 and 1. This calculation method can effectively measure the directional consistency between user interests and video content, without being affected by the absolute size of the vectors.
[0082] After obtaining the matching score for each candidate video segment, all candidate video segments are sorted according to their matching scores. Specifically, the matching scores are arranged from high to low, and the top N video segments with the highest scores are selected as the candidate highlight sequence. The value of N is set according to the required highlight duration. For example, when the target highlight duration is 120 seconds and the average duration of a single segment is 10 seconds, N can be set to 12. This method can control the overall playback length while ensuring content richness. During the sorting process, to avoid unstable sorting due to excessively small score differences, the similarity value is linearly stretched. This involves subtracting the minimum value from the original similarity and then dividing by the difference between the maximum and minimum values, thereby expanding the difference range and improving the sorting differentiation.
[0083] After obtaining the candidate highlight sequences, they are rearranged to meet constraints on temporal continuity and content diversity. The temporal continuity constraint is achieved by limiting the interval between adjacent video clips on the original match timeline; specifically, the time difference between adjacent clips must not exceed 60 seconds. This threshold is determined based on the rhythm of the sporting event, ensuring strong continuity during viewing. The content diversity constraint is achieved by limiting the number of consecutive occurrences of the same event type. If a certain event type appears more than twice consecutively in the sequence, clips of different event types are selected from subsequent candidate clips for replacement. During replacement, clips with the next highest matching score are prioritized to maintain overall relevance while ensuring diversity.
[0084] Furthermore, an emotional balance constraint can be introduced during the rearrangement process. This constraint controls the ratio of positive to neutral emotional segments in the final sequence, ensuring that positive emotional segments account for no less than 60%. This ratio is determined based on user viewing experience optimization experiments and can improve overall watchability. When implementing this constraint, if the number of positive emotional segments is insufficient, higher-rated positive emotional segments are selected from the candidate sequences to replace some neutral emotional segments.
[0085] The final result is a personalized sports highlights sequence. This sequence is constructed by comprehensively considering the matching degree between user interest profiles and video content features, and is optimized through constraints on temporal continuity and content diversity. This ensures that the generated highlights not only match user interests but also provide a good viewing experience. In content recommendation scenarios, the above ranking results can be directly output as a recommendation list, displayed to users according to matching scores from high to low, thereby achieving personalized content distribution. The entire process, through deep mapping and fine-grained matching of user interest feature vectors, ensures that the recommendation results truly reflect user interests and effectively avoids interference from negative semantic content.
[0086] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for generating personalized sports highlights based on user preferences, characterized by: include: Acquire user viewing and interaction data in sports event videos, and locate the corresponding video segments based on the behavior data; The video segments are segmented at the event level and semantically labeled to obtain event types and emotional tendencies that correspond one-to-one with user behavior data, forming user behavior-event semantic association data. Based on the aforementioned user behavior-event semantic association data, a causal relationship model is constructed that includes user real interest variables, event semantic variables, and behavior intensity variables; Using the aforementioned causal relationship model, counterfactual inference is performed, and the intensity of the user's corresponding counterfactual behavior is calculated under the condition of excluding negative semantic events. The behavior weight is calculated based on the difference between the counterfactual behavior intensity and the original behavior intensity, combined with the event semantic type. Based on the aforementioned behavioral weights, user behavior features are reconstructed to generate user interest feature vectors containing semantic correction information. The user interest feature vector is input into the user profile model to obtain the user interest profile, and personalized sports event highlights or content recommendations are generated based on the user interest profile.
2. The method for generating personalized sports highlights based on user preferences according to claim 1, characterized in that: The video segments are segmented and semantically labeled at the event level, including: performing preliminary boundary detection on the video segments based on visual feature changes and audio energy changes in the video frame sequence to generate candidate event sub-segments; using a pre-trained multimodal recognition model to identify the event type of the candidate event sub-segments to obtain structured event type labels; and extracting emotional tendency features based on the audio emotion features and narration semantic information corresponding to the candidate event sub-segments, and determining the emotional tendency category through an emotion classification model.
3. The method for generating personalized sports highlights based on user preferences according to claim 2, characterized in that: The event type labels are associated with sentiment category and time-aligned with user behavior data to generate user behavior-event semantic association data that corresponds one-to-one with event semantics.
4. The method for generating personalized sports highlights based on user preferences according to claim 1, characterized in that: The causal relationship model is constructed by: using one-hot encoding for event types, numerical mapping for emotional tendencies, and normalizing behavioral intensity variables; establishing a directed acyclic structure that includes user real interest variables, event semantic variables, and behavioral intensity variables; modeling the behavioral intensity variables as a conditional Gaussian distribution; and optimizing the model parameters through maximum likelihood estimation and gradient descent algorithms.
5. The method for generating personalized sports highlights based on user preferences according to claim 4, characterized in that: After the causal relationship model is constructed, it also includes: calculating the influence weights of event semantic variables and user real interest variables on behavior intensity variables; determining event-driven behavior when the weight coefficient of event semantic variables is greater than 0.6; determining interest-driven behavior when the weight coefficient of user real interest variables is greater than 0.5; and applying a decay coefficient of 0.7 to the influence path of event semantic variables.
6. The method for generating personalized sports highlights based on user preferences according to claim 1, characterized in that: The counterfactual inference includes: replacing event semantic variables with negative emotional tendencies with neutral emotional values; keeping the event type unchanged and forming counterfactual input data; calculating the expected value of the behavior intensity variable based on a conditional Gaussian distribution; and performing numerical approximation calculations by setting 100 sampling points within the mean ± 3 standard deviations.
7. The method for generating personalized sports highlights based on user preferences according to claim 1, characterized in that: Counterfactual behavior intensity includes: normalizing the expected value and mapping it to the interval between 0 and 1; setting the denominator to 0.01 when the difference between the maximum and minimum values is less than 0.01; calculating the difference between the original behavior intensity and the counterfactual behavior intensity, and using 0.3 as the significant deviation judgment threshold.
8. The method for generating personalized sports highlights based on user preferences according to claim 1, characterized in that: The system is segmented and mapped based on the difference index and emotional tendency. When the difference is greater than 0.3 and the emotional tendency is negative, the weight coefficient is set to 0.
5. When the difference is less than or equal to 0.3 and the emotional tendency is negative, the weight coefficient is set to 0.
8. When the emotional tendency is non-negative, the weight coefficient is set to 1 to 1.2 based on the difference. The original behavior intensity is multiplied by the weight coefficient and then normalized.
9. The method for generating personalized sports highlights based on user preferences according to claim 1, characterized in that: The process of generating user interest feature vectors includes: weighting event semantic variables and behavioral weights to form a weighted event semantic feature set; dividing the event into 12 groups according to event type and emotional tendency and calculating the average weighted value; normalizing the results of each group and concatenating them in a fixed order to form a user interest feature vector; introducing historical interest feature vectors and fusing them with weights of 0.7 and 0.3, while updating them with a time decay coefficient based on 0.
9.
10. The method for generating personalized sports highlights based on user preferences according to claim 1, characterized in that: The generation or recommendation of personalized sports highlights includes: inputting user interest feature vectors into a user profile model to obtain user interest profile vectors; calculating the cosine similarity between the user interest profile vectors and the content feature vectors of candidate video segments as a matching score; selecting the top N video segments according to the matching score to form a candidate highlight sequence; and rearranging the candidate highlight sequence based on time continuity constraints, diversity constraints, and the condition that the emotion ratio is not less than 60% to generate the final result.