Fine-grained short video recommendation method and system based on cross-fragment attention fusion

By combining cross-segment attention fusion and named data networks, the problems of temporal dependence and waste of transmission resources in short video recommendation are solved, achieving high-precision recommendation and dynamic transmission adjustment, thereby improving user experience and network efficiency.

CN122045502APending Publication Date: 2026-05-15NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
Filing Date
2026-01-08
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing short video recommendation models and network transmission systems lack adaptive judgment of the importance of video segments and temporal dependency modeling, resulting in limited recommendation accuracy and wasted transmission resources. Existing named data networks have failed to deeply integrate recommendation semantics, making it impossible to achieve intelligent routing and dynamic adjustment.

Method used

A cross-segment attention fusion method is adopted, which captures the temporal dependence of video segments through sinusoidal positional coding and multi-head self-attention network. An interest model is constructed by combining dynamic fusion strategy and dual-graph convolutional network to generate fine-grained interest scores. Recommendation metadata is embedded in the named data network to achieve semantically aware transmission.

Benefits of technology

It significantly improved recommendation accuracy, reduced invalid transmissions, enhanced user viewing smoothness, and saved network bandwidth resources, achieving millisecond-level transmission adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122045502A_ABST
    Figure CN122045502A_ABST
Patent Text Reader

Abstract

The invention discloses a fine-grained short video recommendation method and system based on cross-fragment attention fusion, and belongs to the technical field of multimedia content recommendation and network transmission. The method comprises the following steps: firstly, performing fragmentation processing on a short video and extracting fragment visual features; then constructing a cross-fragment attention fusion module, introducing sine position coding to inject time sequence information, and capturing global dependence among fragments by using a multi-head self-attention mechanism; a dynamic fusion strategy is designed based on the user viewing rate, a positive and negative preference graph is constructed in combination with a double-graph convolutional network, user positive interest embedding and negative rejection embedding are learned, and fragment-level fine-grained interest scores are output through a multi-layer perceptron; and finally, defining an NDN semantic naming format containing interest scores and similar video identifiers, and realizing semantic packaging of a sending end and dynamic transmission truncation and seamless switching of a receiving end. The method can accurately capture the dynamic interest of the user, remarkably improves the recommendation precision, greatly saves the network bandwidth, improves the watching fluency of the user, and is suitable for efficient recommendation and transmission scenes of a short video platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multimedia content recommendation and network transmission technology, and in particular to a fine-grained short video recommendation method based on cross-segment attention fusion in named data networks. Background Technology

[0002] With the rapid development of mobile internet, short video platforms (such as TikTok and Kuaishou) have become a primary way for users to obtain information and entertainment. Accurately capturing users' fine-grained interests is crucial in short video recommendation systems. The closest existing technology is the FRAME model, which for the first time introduced fine-grained modeling concepts, utilizing graph neural networks to process the interaction between users and video clips. However, existing FRAME models and similar technologies have the following significant drawbacks: 1) Limited fragment fusion strategy: Existing methods typically use simple mean pooling or static graph convolution to aggregate fragment features, lacking adaptive judgment of the importance of different fragments, and cannot effectively distinguish between the "highlight moments" that users are truly interested in and the "boring fragments" that are skipped.

[0003] 2) Insufficient temporal dependency modeling: Existing models often treat video segments as independent nodes, ignoring the narrative coherence and temporal evolution of video content. User interests in short videos often change dynamically over time (e.g., engaging at the beginning, climax in the middle, skipped at the end), and the lack of temporal modeling limits recommendation accuracy.

[0004] 3) Disconnect between transmission and recommendation: Traditional TCP / IP network transmission is not semantically aware of video content, resulting in wasted bandwidth and an inability to dynamically adjust transmission strategies based on users' real-time interest scores. While existing Named Data Networks (NDNs) support content-based routing, they have not yet been deeply integrated with the semantic scoring of fine-grained recommendation algorithms.

[0005] The rapid development of deep learning technology has provided powerful feature extraction capabilities for multimedia recommendations, leading many researchers to propose various fine-grained modeling methods to capture user preferences for short video content. However, although existing models such as FRAME attempt to improve recommendation granularity to the clip level, most existing fine-grained recommendation methods are still based on static feature aggregation strategies or independent graph node interactions, ignoring the inherent temporal dependencies and contextual relationships between video clips. This makes it difficult for the model to capture the dynamic changes in user interests as the video playback progresses, and it also suffers from feature confusion when distinguishing between highlight clips that users "actually watch" and negative sample clips that they "quickly skip," limiting further improvements in recommendation accuracy.

[0006] Given the aforementioned issues, the trend of deeply integrating recommendation semantics with network transmission is becoming increasingly urgent. However, directly applying existing recommendation algorithms to network transmission optimization faces numerous challenges. First, traditional network transmission protocols (including the underlying Named Data Network, NDN) lack the ability to perceive semantic information at the application layer (such as interest scores), causing network devices to be unable to intelligently route and cache content based on its "recommendation value," resulting in a large amount of ineffective prefetching of low-interest content and wasted bandwidth. Second, due to the extremely rapid switching of user interests in short video scenarios, without an efficient semantic computation and transmission linkage mechanism, the receiving end cannot dynamically adjust its request strategy based on real-time parsed interest semantics within milliseconds, causing transmission resources to be unable to be concentrated on highly similar content that users are truly interested in. Furthermore, existing recommendation models and transmission systems are usually optimized independently, lacking a unified semantic interface, making it impossible to directly translate the prediction results of the recommendation system into transmission decision-making criteria at the network layer. Summary of the Invention

[0007] Purpose of the invention: In order to solve the above problems, the present invention provides a fine-grained short video recommendation method and system based on cross-segment attention fusion and named data network (NDN).

[0008] Technical solution: A fine-grained short video recommendation method based on cross-segment attention fusion, suitable for named networks, comprising the following steps: S1. Short video preprocessing and fine-grained feature extraction, including obtaining a short video dataset containing user fine-grained interaction logs, uniformly dividing a short video of arbitrary length into N segments of fixed length, using a pre-trained deep neural network to extract the visual features of each segment, and mapping them to the hidden space to obtain the initial feature sequence E. S2. Construct a fine-grained recommendation model with cross-segment attention fusion, including the initial feature sequence. E Perform sinusoidal positional encoding embedding to obtain an input vector H with heterogeneous temporal information; then convert the input vector... H Input the multi-head self-attention module and calculate the query matrix. Q Key matrix K Sum matrix V The interaction captures global dependencies across fragments in multiple semantic subspaces and outputs a context-enhanced feature sequence H'. S3. Interest modeling based on dynamic fusion and dual-graph convolution, the implementation steps of which include: Based on user history or model-predicted viewership Dynamically calculate the number of key segments that need to be retained. ; Utilize attention weights to select the most important feature sequence H' The segments are weighted and aggregated to generate a representation of the viewed portion. Simultaneously, pooling is performed on the remaining segments to obtain the skipped features. ; Construct positive and negative preference graphs. The nodes of the positive preference graph consist of users and the videos they watch, and the features are... The nodes of the negative preference graph consist of users and the videos they skipped, and the features are adopted. By performing graph convolution propagation operations on the two graphs respectively, the user's positive interest embedding is obtained. and negative repulsion embedding ; S4. Model training and generation of fine-grained interest scores, embedding positive interests. Negative repulsion embedding Enhanced representation of the current video After concatenation, the data is input into a multilayer perceptron, which outputs fine-grained interest scores for each segment of the video. ; S5. Construct an NDN semantic enhancement transmission mechanism to embed recommendation metadata into the data packet name, defining a hierarchical semantic naming format as follows: / ndn / video / <video_name> / <seg_no> / <interest_score> / <similar_vid> in, and Used to uniquely identify video content segments and maintain basic routing functionality;<similar_vid > The identifier of the top-1 similar video in the semantic space for the current video. <interest_score> carries the fine-grained interest score obtained in step S4. ; S6. Construct collaborative transmission control logic between the sender and receiver: When the sender receives an Interest request, it will assign a fine-grained interest score. Similar video identifiers are encapsulated in the Data packet name and digitally signed; The receiving end parses the interest score in the data packet name; if the score is higher than a preset threshold... Then continue requesting the next segment, if it is less than or equal to Then, transmission is stopped and seamless switching is achieved by prefetching the first frame of similar video data based on <similar_vid>.

[0009] Furthermore, step S2 enhances the expressive power of the features by adding sinusoidal positional encoding and a multi-head self-attention module after feature extraction; For the sequence in the th The feature vector of the i-th segment, which is the i-th segment and The formula for calculating the positional encoding in a given dimension is as follows:

[0010]

[0011] Finally, the positional encoding is added to the initial features to obtain an input vector with heterogeneous temporal information. ,in It is any initial feature vector in the initial feature sequence. and They represent the first time. and Position encoding in dimensions Indicates the spatial dimension of the hidden layer; The scaling dot product attention in the multi-head self-attention module is calculated as follows:

[0012] in, The scaling factor is used to perform the method in parallel. Each attention head concatenates the outputs of different subspaces and performs a linear transformation to obtain the context-enhanced feature sequence. .

[0013] Furthermore, the number of key segments in step S3 The calculation expression is:

[0014] in, The total number of segments after video segmentation. It's the viewership; Viewing part representation The modeling expression is:

[0015] In the formula, For attention weights, It is the first feature sequence after context enhancement. Features of each segment; Skip some features The modeling expression is:

[0016] In the formula, This is a pooling operation; Positive interest embedding The calculation expression is:

[0017] Negative repulsion embedding The calculation expression is:

[0018] in, For forward graph convolution operation, This represents a positive preference graph. It is a negative graph convolution operation. It is a negative preference graph.

[0019] Further, step S4 includes designing a hybrid supervised loss function to train the interest model constructed in step S3, with the overall objective function being:

[0020] in, It's a point-level loss. It is a paired loss. It is the balance coefficient. It is a regularization parameter. For the set of model parameters; Point-level loss The calculation method is as follows:

[0021] in, For user-video interaction pairs in the training set, For real labels, It is a predicted probability; Paired loss The calculation method is as follows:

[0022] in, A collection of videos. For viewing a collection of clips, It is a set of skipped segments. For the Sigmoid function, , Fine-grained interest score for watching segment i and skipping segments j Interest score.

[0023] Enhanced representation of the current video The calculation method is as follows:

[0024] Each segment in the short video Fine-grained interest scores The calculation method is as follows:

[0025] in, The first feature sequence after context enhancement Features of each segment.

[0026] Furthermore, step S5 involves similar videos. The current video is calculated by the sending end. With candidate video set Semantic embedding vectors of other videos The cosine similarity between them is determined by the following calculation method:

[0027] Current video semantic embedding vector, Videos in the candidate video collection The semantic embedding vector.

[0028] Based on the implementation of the above method, the present invention also provides a system for a fine-grained short video recommendation method based on cross-segment attention fusion, the system including a cloud server, edge nodes and user terminals; The cloud server is equipped with a cross-segment attention fusion fine-grained recommendation model and index library, which are used for model training, storing fine-grained interest scores and similar video IDs of video segments, and receiving interest requests and encapsulating the fine-grained interest scores and similar video IDs into a Data packet name before sending it. The edge nodes and user terminals are equipped with an NDN protocol stack. The user terminal acts as the receiving end, used to parse the semantic interest in the data packet name and execute dynamic transmission and switching logic. The edge nodes are used to assist in data transmission and routing in the NDN network.

[0029] In the system, the temporal position encoding module in the cross-segment attention fusion fine-grained recommendation model is used to implement the sinusoidal position encoding function; the multi-head self-attention module is used to calculate the interaction of the query matrix, key matrix, and value matrix to capture the global dependency relationship across segments; the dynamic feature aggregation module is used to determine the number of key segments based on the viewing rate and generate the viewing part representation and skipped part features; and the user interest modeling module based on the dual-graph convolutional network is used to construct positive preference graphs and negative preference graphs and perform graph convolution propagation operations to obtain the user's positive interest embedding and negative repulsion embedding.

[0030] Furthermore, the user terminal is also used to acquire fine-grained user interaction logs and upload them to the cloud server to provide data support for model training on the cloud server.

[0031] The cloud server is also used to preprocess the short video data after receiving it from the user terminal, including segmentation and feature extraction, to provide basic data for subsequent model training and fine-grained interest score calculation.

[0032] Beneficial effects: Compared with the prior art, the present invention has the following substantial features and significant progress: (1) The method described in this invention adopts a cross-segment attention fusion mechanism. By introducing sinusoidal position coding and multi-head self-attention network, it breaks through the limitation of traditional models that process video segments independently. It can effectively capture the temporal evolution of video content, thereby more accurately identifying the user's dynamic interest focus.

[0033] (2) The present invention designs a dynamic fusion strategy based on viewing rate, which explicitly distinguishes and splices the fusion features of the watched segments and the original features of the skipped segments. This differentiated feature construction method significantly enhances the model’s ability to distinguish between positive and negative samples and solves the problem of key information being submerged due to traditional average pooling.

[0034] (3) The present invention directly maps the semantic prediction results of the recommendation system to the NDN network packet name, so that the network transmission layer has semantic awareness. The receiving end does not need to run a complex model to achieve millisecond-level transmission truncation and content switching based on interest scores, which fundamentally reduces the invalid transmission of content that users are not interested in, and greatly saves network bandwidth resources while improving the user's viewing smoothness. Attached Figure Description

[0035] Figure 1 This is a flowchart of the method described in this invention; Figure 2 This is a schematic diagram of the CCAF model and interest modeling structure; Figure 3 This is a schematic diagram of dynamic fusion and dual-graph GCN structure; Figure 4 This is an NDN semantic naming and transmission logic interaction diagram. Detailed Implementation

[0036] 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, and 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.

[0037] Example 1

[0038] like Figure 1As shown, this embodiment of the invention provides a fine-grained short video recommendation method based on cross-segment attention fusion and named data networks, including the following steps: (1) Obtain the short video dataset and perform preprocessing.

[0039] A short video dataset containing fine-grained user interaction logs (such as viewing duration, skipped positions, and swiping behavior) is obtained and divided into training and testing sets. To better capture the temporal features of the short videos, this invention first performs a fragmentation preprocessing operation on the short video data: short videos of arbitrary length... It is evenly divided into 4 clips of fixed duration.

[0040] To extract high-quality multimodal features, this invention utilizes a ResNet-50 network pre-trained on ImageNet to extract visual features for each segment, resulting in an initial segment feature sequence. .

[0041] (2) Construct a cross-segment attention fusion fine-grained recommendation model (CCAF). The overall structure of the model is as follows: Figure 2 As shown. The CCAF model design includes a feature embedding layer, a temporal position encoding module, a multi-head self-attention module, a dynamic feature aggregation module, and a user interest modeling module based on a dual-graph convolutional network (GCN).

[0042] Because short video recommendations need to accurately capture users' instantaneous changes in interest, and video content has a significant narrative logic (such as setup-climax-ending), existing recommendation models often treat segments as independent nodes, ignoring the temporal dependencies between segments, thus limiting recommendation accuracy. Therefore, temporal enhancement of segment features is necessary. Attention mechanisms primarily work on sequential data; therefore, by fusing positional encoding and self-attention mechanisms after feature embedding, the model's ability to perceive temporal context can be effectively improved.

[0043] In this invention, the expressive power of features is enhanced by adding sinusoidal positional encoding and a multi-head self-attention module after feature extraction.

[0044] Specifically, the initial feature sequence obtained in step (1) is first... By superimposing sinusoidal position codes, an input vector with heterogeneous temporal information is obtained. Secondly, Input the multi-head self-attention module and calculate the query matrix. Key matrix Sum matrix The interaction captures global dependencies across fragments in multiple semantic subspaces, outputting context-enhanced feature sequences. .

[0045] (3) Design an interest modeling module based on dynamic fusion and dual-graph convolution, the specific processing flow and structure of which are as follows: Figure 3 As shown.

[0046] First, based on user historical behavior or model-predicted viewership. Dynamically calculate the number of key segments that need to be retained. Next, attention weights are applied to the most important elements in the sequence. The segments are weighted and aggregated to generate a representation of the viewed portion of the content that the user is interested in. At the same time, the remaining skipped features are explicitly preserved. .

[0047] Further construct positive and negative preference graphs. The nodes of the positive graph consist of users and the videos they watched (features used). The nodes of the negative graph consist of the user and the video they skipped (feature usage). By performing graph convolution propagation operations on two separate graphs, the user's positive interest embedding is computed. and negative repulsion embedding .

[0048] (4) Model training and fine-grained interest score generation.

[0049] The forward embedding obtained in step (3) Negative embedding Enhanced representation of the current video The video is stitched together, input into a multilayer perceptron (MLP), and outputs each segment of the video. Fine-grained interest scores .

[0050] During the training phase, a hybrid supervised loss function is designed to calculate point-wise loss and pair-wise loss. The model parameters are updated through joint optimization to complete model training. After training, the loss function of all video segments in the video library is calculated offline. and Top-1 similar video IDs ( And store it in the index.

[0051] (5) Design of NDN semantic naming format and sending logic. The semantic naming format was redefined under the Named Data Network (NDN) architecture.

[0052] The naming structure is designed as follows: / ndn / video / <video_name> / <seg_no> / <interest_score> / <similar_vid> in,<interest_score> It carries the segment-level interest score calculated in step (4). ;<similar_vid> This is a similar video identifier for the current video.

[0053] On the sending end, when an Interest request is received, the server queries the index in real time and retrieves the corresponding... and It is encapsulated in the Data package name and digitally signed.

[0054] (6) Receiver-side dynamic transmission and switching logic. The client utilizes the receive driver characteristics of NDN to receive the first... After processing each data packet from a fragment, immediately parse the semantic interest in the name.<interest_score> (recorded as) Thresholds in the preset transmission decision logic. ,like The client continues to construct targets for the first The Interest packets of the fragment maintain the stream transmission. If Immediately stop sending subsequent Interest packets to truncate the transmission. Meanwhile, the client directly utilizes the information carried in the name.<similar_vid> Construct a new Interest package / ndn / video / <similar_vid> / 0 / ... prefetches the first frame of highly relevant video data to achieve seamless content switching.

[0055] (7) Use the system to distribute short videos. Deploy the trained model on a cloud server and deploy the NDN protocol stack on edge nodes and user terminals to provide actual short video streaming services.

[0056] Example 2: Example 2 describes the short video recommendation and transmission collaboration implementation process from the perspective of constructing a fine-grained interest modeling framework based on the method of the present invention. It also further introduces the specific process of the implementation scheme of the present invention, making the above technical solution easier to understand.

[0057] The fine-grained interest modeling framework mainly consists of a video fine-grained feature extraction module, a cross-segment attention fusion module (CCAF), a dynamic feature aggregation module, an interest score prediction module, and an NDN semantic transmission control module. The input short video is processed by a backbone network to extract multi-layer segment feature sequences. These sequences are then fed into the CCAF module, where temporal information is embedded through positional encoding, and a multi-head self-attention mechanism is used to capture global dependencies between segments. The resulting enhanced video representation is then fed into the dynamic feature aggregation module, which adaptively divides the video into critical and redundant parts based on the predicted viewing probabilities and performs differential fusion. The resulting enhanced video representation is input into the prediction head for fine-grained score calculation. Finally, the calculated clip-level interest score is mapped to the NDN data packet namespace. The receiving end parses this semantic name and executes a dynamic transmission truncation and content switching strategy.

[0058] (I) Fine-grained feature extraction and cross-segment attention fusion in video

[0059] This part consists of three stages: feature embedding, positional encoding embedding, and multi-head self-attention interaction.

[0060] The feature embedding stage uses deep neural networks to extract visual and textual features; the positional encoding embedding stage is to solve the temporal loss problem caused by traditional segment independent modeling; and the multi-head self-attention interaction stage is responsible for capturing long-distance segment dependencies in multiple semantic subspaces.

[0061] Feature embedding: Dividing the input video V into N segments of fixed duration. Visual feature vectors for each segment are extracted using a pre-trained ResNet-50 as the backbone network. And it is mapped to a dimension of through a fully connected layer. The hidden layer space yields the initial feature sequence. .

[0062] Positional Encoding Embedding: Traditional graph neural networks or average pooling methods ignore the sequential order of video segments, such as the narrative structure of setup-climax-ending. This invention introduces sinusoidal positional encoding to explicitly inject temporal information. For the first segment in the sequence... The feature vector of the i-th segment, which is the i-th segment and The formula for calculating the positional encoding in a given dimension is as follows:

[0063]

[0064] Finally, the positional encoding is added to the initial features to obtain an input vector with heterogeneous temporal information. .

[0065] Multi-head self-attention interaction: To capture contextual dependencies across segments (e.g., a foreshadowing at the beginning might be related to the climax at the end), a multi-head attention mechanism from the Transformer architecture is employed. First, the input... Linear projection as query matrix Key matrix Sum matrix The scaling dot product attention calculation is as follows:

[0066] in This is the scaling factor. This invention is executed in parallel. Each attention head concatenates the outputs of different subspaces and performs a linear transformation to obtain the context-enhanced feature sequence. This eliminates feature ambiguity caused by isolated fragments.

[0067] (ii) Interest modeling based on dynamic fusion

[0068] Traditional fusion strategies typically involve average pooling across all segments, which can lead to the highlights that users are truly interested in being drowned out by noise from a large number of skipped segments. This invention proposes a dynamic fusion strategy based on watch ratio, and combines it with a graph convolutional network (GCN) to construct a bidirectional graph to refine the modeling of user interests and preferences.

[0069] Phase 1: Dynamic Feature Fusion

[0070] First, based on user historical behavior or model-predicted viewership. Dynamically calculate the number of key segments that need to be retained. :

[0071] Next, attention weights are used to assign the most important values ​​in the sequence. The segments are weighted and aggregated to generate a representation of the viewed portion of the content that the user is interested in. Meanwhile, in order to preserve negative sample information and enhance discriminative power, the remaining skipped features are explicitly preserved. The formula is as follows:

[0072]

[0073] Phase Two: User Interest Modeling Based on GCN

[0074] To capture deep, fine-grained user preferences from the enhanced fragment features described above, this invention utilizes a Graph Convolutional Network (GCN) framework to construct two distinct preference graphs: a positive preference graph and a negative preference graph. Nodes in the positive preference graph consist of users and videos they have actually engaged with. For videos viewed in the user's history, the aforementioned dynamic fusion method is used... This serves as the feature representation of the video node. Nodes in the negative preference graph consist of users and videos that were skipped. For skipped videos in history, the aforementioned retention method is used. This serves as the feature representation of the video node. By performing graph convolutional propagation operations in both graphs respectively, the feature information of neighboring nodes is aggregated, thereby deriving the user's positive interest embedding. and negative repulsion embedding :

[0075] This process enables the model to capture fine-grained user preferences by distinguishing between content fragments that align with user interests and those that evoke user aversion, effectively bridging the gap between dynamic fragment fusion and personalized recommendations.

[0076] Phase Three: Interest Score Prediction

[0077] Finally, the learned user positive embeddings Negative embedding Enhanced representation of the currently recommended video .

[0078] The video segments are stitched together, input into a multilayer perceptron (MLP) for interactive computation, and output as individual segments from the video. Fine-grained interest scores :

[0079] (III) Design of Hybrid Supervised Loss Function

[0080] To address the issue of sparse explicit user feedback in short video scenarios, this invention employs a hybrid supervision strategy, utilizing point-level loss to optimize overall video click-through rate prediction and pairwise loss to optimize segment-level fine-grained ranking.

[0081] Point-wise Loss: Used to supervise the model's overall prediction of whether a user will watch a video. It is based on the predicted probability of the output. and real labels (1 indicates watching, 0 indicates not watching), using the binary cross-entropy loss function:

[0082] in, For user-video interaction pairs in the training set.

[0083] Pair-wise loss at the segment level: This enhances the model's ability to distinguish between highlight segments and redundant segments. For a video being viewed, its segments are divided into viewing sets. and skip set Using BPR loss to force positive sample fragment scores. Higher than negative sample segment score :

[0084] in For the Sigmoid function, , This refers to the fine-grained segment interest scores output by the CCAF model.

[0085] Overall objective function: The final loss function is composed of the weighted sum of the above two parts, and introduces... Regularization term:

[0086] in For balance coefficient, For regularization parameters, This is the set of model parameters.

[0087] (iv) NDN semantic enhancement transmission mechanism

[0088] To address the issue of the network transport layer being unaware of the application layer's recommended semantics, this invention designs a semantic name mapping and dynamic transmission logic based on NDN (Network Name Domain). (See...) Figure 4 NDN semantic naming and transmission logic interaction diagram.

[0089] This invention first redefines a hierarchical semantic naming format conforming to the NDN specification, embedding recommended metadata into the packet name. The naming structure is designed as follows:

[0090] in, and Used to uniquely identify video content segments and maintain basic routing functionality; This carries the segment-level interest score predicted in real time by the CCAF model based on the user's historical behavior and current context. (Quantified as an integer from 0 to 100), directly reflecting the value of the content to the current user; The identifier of the top-1 similar video in the semantic space is used as a potential switching target.

[0091] Based on this, the present invention designs a collaborative transmission control logic for the sending end and the receiving end.

[0092] At the sender end, when the content source server responds to the Interest packet, it not only retrieves the corresponding video data block but also queries the CCAF inference engine in real time. For similar videos... The sending end calculates the current video. With candidate video set Semantic embedding vectors of other videos Calculate the cosine similarity between the two values ​​and select the video ID corresponding to the maximum value:

[0093] The server will calculate and Encapsulated in the Data package name<interest_score> and The components are then signed to ensure the authenticity of the semantic information.

[0094] At the receiver, the client utilizes the receive driver features of NDN to receive the first... After processing each data packet from a fragment, immediately parse the semantic interest in the name.<interest_score> The transmission decision logic is as follows:

[0095] in This is a preset interest threshold. If the interest score is higher than the preset threshold... This indicates that users have a strong desire to watch, and the client continues to develop strategies targeting the first... The segment's Interest packets maintain the stream transmission; conversely, when the score falls below a threshold, the transport layer policy module determines the content as low-value redundant information and immediately truncates the transmission by rejecting the request by stopping the sending of subsequent Interest packets, thus avoiding bandwidth waste in traditional push streaming modes. Simultaneously, the client directly utilizes the information carried in the name... Construct a new Interest package Within milliseconds of the user's scrolling action, the system pre-fetches the first frame of highly relevant video data and leverages the connectionless nature of NDN to achieve seamless content switching, thereby significantly reducing unnecessary traffic while improving the user's viewing experience.

[0096] This invention is applicable to fine-grained short video (usually no more than 5 minutes) recommendation scenarios in naming networks, and has the following scenario adaptability: Dynamic fusion strategy matches fragmented behavior: Based on the "average viewing ratio" of the video, dynamically determine the number of segments to be fused (e.g., only 1 segment is fused when the viewing ratio is < 25%, and 4 segments are fused when the viewing ratio is ≥ 75%), accurately aligning with users' fragmented viewing habits; Cross-segment attention captures temporal relationships: By using multi-head attention with positional encoding, dynamic semantic relationships between segments (such as visual and narrative relationships between different segments) are modeled to adapt to the temporal content structure of short videos; Preserving skipped segment features enhances discriminative power: Only "watched segments" are fused and enhanced, while "skipped segments" retain their original features, constructing a clear feature comparison between "likes and dislikes," thereby improving the granularity and interpretability of recommendations; Efficiency adapted for large-scale deployment: The documentation verifies through experiments that CCAF only increases training time by 2.9% and single-video inference latency by 3.8% compared to the baseline model (FRAME). Resource overhead is controllable and can meet the actual deployment needs of short video platforms for "high concurrency and low latency" (such as daily interaction scenarios with hundreds of millions of users).

Claims

1. A fine-grained short video recommendation method based on cross-segment attention fusion, which can be applied to named data networks, characterized in that... The method includes the following steps: S1. Short video preprocessing and fine-grained feature extraction, including obtaining a short video dataset containing user fine-grained interaction logs, uniformly dividing a short video of arbitrary length into N segments of fixed length, using a pre-trained deep neural network to extract the visual features of each segment, and mapping them to the hidden space to obtain the initial feature sequence E. S2. Construct a fine-grained recommendation model with cross-segment attention fusion, including the initial feature sequence. E Perform sinusoidal positional encoding embedding to obtain an input vector H with heterogeneous temporal information; then convert the input vector... H Input the multi-head self-attention module and calculate the query matrix. Q Key matrix K Sum matrix V The interaction captures global dependencies across fragments in multiple semantic subspaces and outputs a context-enhanced feature sequence H'. S3. Interest modeling based on dynamic fusion and dual-graph convolution, the implementation steps of which include: Based on user history or model-predicted viewership Dynamically calculate the number of key segments that need to be retained. ; Utilize attention weights to select the most important feature sequence H' The segments are weighted and aggregated to generate a representation of the viewed portion. Simultaneously, pooling is performed on the remaining segments to obtain the skipped features. ; Construct positive and negative preference graphs. The nodes of the positive preference graph consist of users and the videos they watch, and the features are... The nodes of the negative preference graph consist of users and the videos they skipped, and the features are adopted. By performing graph convolution propagation operations on the two graphs respectively, the user's positive interest embedding is obtained. and negative repulsion embedding ; S4. Model training and generation of fine-grained interest scores, embedding positive interests. Negative repulsion embedding Enhanced representation of the current video After concatenation, the data is input into a multilayer perceptron, which outputs fine-grained interest scores for each segment of the video. ; S5. Construct an NDN semantic enhancement transmission mechanism to embed recommendation metadata into the data packet name, defining a hierarchical semantic naming format as follows: / ndn / video / <video_name> / <seg_no> / <interest_score> / <similar_vid> , in, and Used to uniquely identify video content segments and maintain basic routing functionality;<similar_vid > The identifier of the top-1 similar video in the semantic space for the current video.<interest_score > Bearing the fine-grained interest score obtained in step S4 ; S6. Construct collaborative transmission control logic between the sender and receiver: When the sender receives an Interest request, it will assign a fine-grained interest score. Similar video identifiers are encapsulated in the Data packet name and digitally signed; The receiving end parses the interest score in the data packet name; if the score is higher than a preset threshold... Then continue requesting the next segment, if it is less than or equal to Then, transmission is stopped and seamless switching is achieved by prefetching the first frame of similar video data based on <similar_vid>.

2. The fine-grained short video recommendation method based on cross-segment attention fusion according to claim 1, characterized in that, Step S2 enhances the expressive power of features by adding sinusoidal positional encoding and multi-head self-attention modules after feature extraction; For the sequence in the th The feature vector of the i-th segment, which is the i-th segment and The formula for calculating the positional encoding in a given dimension is as follows: Finally, the positional encoding is added to the initial features to obtain an input vector with heterogeneous temporal information. ,in It is any initial feature vector in the initial feature sequence. and They represent the first time. and Position encoding in dimensions Indicates the spatial dimension of the hidden layer; The scaling dot product attention in the multi-head self-attention module is calculated as follows: in, The scaling factor is used to perform the method in parallel. Each attention head concatenates the outputs of different subspaces and performs a linear transformation to obtain the context-enhanced feature sequence. .

3. The fine-grained short video recommendation method based on cross-segment attention fusion according to claim 1, characterized in that, Number of key segments in step S3 The calculation expression is: in, The total number of segments after video segmentation. It's the viewership; Viewing part representation The modeling expression is: In the formula, For attention weights, It is the first feature sequence after context enhancement. Features of each segment; Skip some features The modeling expression is: In the formula, This is a pooling operation; Positive interest embedding The calculation expression is: Negative repulsion embedding The calculation expression is: in, For forward graph convolution operation, This represents a positive preference graph. It is a negative graph convolution operation. It is a negative preference graph.

4. The fine-grained short video recommendation method based on cross-segment attention fusion according to claim 1, characterized in that, Step S4 involves designing a hybrid supervised loss function to train the interest model constructed in step S3, with the overall objective function being: in, It's a point-level loss. It is a paired loss. It is the balance coefficient. It is a regularization parameter. For the set of model parameters; Point-level loss The calculation method is as follows: in, For user-video interaction pairs in the training set, For real labels, It is a predicted probability; Paired loss The calculation method is as follows: in, A collection of videos. For viewing a collection of clips, It is a set of skipped segments. For the Sigmoid function, , Fine-grained interest score for watching segment i and skipping segments j Interest score.

5. The fine-grained short video recommendation method based on cross-segment attention fusion according to claim 1 or 4, characterized in that, Enhanced representation of the current video The calculation method is as follows: Each segment in the short video Fine-grained interest scores The calculation method is as follows: in, The first feature sequence after context enhancement Features of each segment.

6. The fine-grained short video recommendation method based on cross-segment attention fusion according to claim 1, characterized in that, Step S5 for similar videos The current video is calculated by the sending end. With candidate video set Semantic embedding vectors of other videos The cosine similarity between them is determined by the following calculation method: Current video semantic embedding vector, Videos in the candidate video collection The semantic embedding vector.

7. A system for implementing the fine-grained short video recommendation method based on cross-segment attention fusion as described in any one of claims 1-6, characterized in that, This includes cloud servers, edge nodes, and user terminals; The cloud server is equipped with a cross-segment attention fusion fine-grained recommendation model and index library, which are used for model training, storing fine-grained interest scores and similar video IDs of video segments, and receiving interest requests and encapsulating the fine-grained interest scores and similar video IDs into a Data packet name before sending it. The edge nodes and user terminals are equipped with an NDN protocol stack. The user terminal acts as the receiving end, used to parse the semantic interest in the data packet name and execute dynamic transmission and switching logic. The edge nodes are used to assist in data transmission and routing in the NDN network.

8. The system according to claim 7, characterized in that, The temporal position encoding module in the cross-segment attention fusion fine-grained recommendation model is used to implement sinusoidal position encoding. The multi-head self-attention module is used to calculate the interaction of the query matrix, key matrix, and value matrix to capture cross-segment global dependencies. The dynamic feature aggregation module is used to determine the number of key segments based on the viewing rate and generate the viewing part representation and skipped part features. The user interest modeling module based on the dual-graph convolutional network is used to construct positive preference graphs and negative preference graphs and perform graph convolutional propagation operations to obtain the user's positive interest embedding and negative repulsion embedding.

9. The system according to claim 7, characterized in that, The user terminal is also used to acquire fine-grained user interaction logs and upload them to the cloud server to provide data support for model training on the cloud server.

10. The system according to claim 7, characterized in that, The cloud server is also used to preprocess the short video data after receiving it from the user terminal, including segmentation and feature extraction, to provide basic data for subsequent model training and fine-grained interest score calculation.