Generative video recommendation method based on preference and diversity collaborative optimization

By supervising and fine-tuning a large language model and optimizing generative video recommendation using diversity bundle search, and combining prefix tree constraints and hierarchical index retrieval, the problem of balancing accuracy and diversity in generative video recommendation is solved, thus improving the practicality of the recommendation system.

CN121880600APending Publication Date: 2026-04-17ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG UNIV OF TECH
Filing Date
2025-12-31
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing generative video recommendation methods struggle to effectively balance the accuracy and diversity of recommendation results, easily leading to content homogenization, and failing to cover users' potential diverse interests when generating long recommendation lists.

Method used

By supervising and fine-tuning the large language model, combining diversity bundle search and prefix tree constraints, we optimize generative video recommendation and supplement the diverse video recommendation results with hierarchical index retrieval.

Benefits of technology

It significantly reduces the computational overhead of large models, effectively balances the accuracy and diversity of video recommendation results, and enhances the practicality of generative video recommendation systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121880600A_ABST
    Figure CN121880600A_ABST
Patent Text Reader

Abstract

A generative video recommendation method based on preference and diversity collaborative optimization belongs to the field of network recommendation, and comprises the following steps: firstly, finely tuning a large language model to adapt to a generative video recommendation task; then, generating an initial video recommendation list by using diversity beam search, and meanwhile, guiding a text identifier generated by a large language model to align a video set by using prefix tree constraint; and finally, videos corresponding to the hierarchical index retrieval text identifier are added into the selected set, videos not in the influence range of the selected set are mined as supplementary recommendation videos, and a final video recommendation list is obtained. According to the method, supervision and fine tuning of a large language model are optimized, the accuracy and diversity of video recommendation results are balanced by utilizing diversity beam search and prefix tree constraint, and diversified video recommendation results are quickly supplemented through retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Internet recommendation technology, and in particular, it is a generative video recommendation method based on the collaborative optimization of preferences and diversity. Background Technology

[0002] Online video media platforms, such as Douyin and iQiyi, provide users with a massive amount of video content and services, occupying a core position in the current internet information ecosystem. Video content carries multiple values, including information, entertainment, and education, helping to meet users' spiritual and cultural needs and promoting the dissemination of knowledge and the prosperity of culture. The massive amounts of user, video content, and user behavior data within these platforms can form complex video recommendation networks. Data analysis of this network can uncover user video preferences, optimize content distribution strategies, and thus improve user experience and platform commercial value, thus possessing a very broad market prospect.

[0003] Generative video recommendation aims to leverage generative artificial intelligence to directly generate video content recommendation lists or descriptions that match user preferences, representing an emerging technological path in the development of recommendation systems. On one hand, users can interact with the system using natural language, gaining a more intuitive and personalized content discovery experience. On the other hand, platforms can enhance the interactivity and user satisfaction of recommendations, thereby strengthening their competitiveness. However, while satisfying user preferences, the generation process struggles to effectively control the accuracy and diversity of recommendation results, easily leading to homogenized content and negatively impacting user experience. Furthermore, existing methods, when generating long recommendation lists, often lack semantic or thematic differentiation, making it difficult to cover users' potential diverse interests while ensuring relevance. Therefore, effectively synergistically optimizing user preferences and result diversity in recommendations is a key issue that needs to be addressed in practical applications. Summary of the Invention

[0004] To overcome the problems of difficulty in balancing accuracy and diversity of recommendation results and homogenization in existing generative video recommendation methods, this invention proposes a generative video recommendation method based on the collaborative optimization of preferences and diversity. It optimizes the method by supervising and fine-tuning a large language model, balances the accuracy and diversity of video recommendation results by using diversity bundle search and prefix tree constraints, and quickly supplements diverse video recommendation results through retrieval.

[0005] The technical solution adopted by this invention to solve its technical problem is: A generative video recommendation method based on the collaborative optimization of preferences and diversity is proposed. First, a large language model is fine-tuned to adapt to the generative video recommendation task. Then, a diversity bundle search is used to generate an initial video recommendation list, while a prefix tree constraint is used to guide the text tags generated by the large language model to align with the video set. Finally, a hierarchical index is used to retrieve the videos corresponding to the text tags and add them to the selected set. Videos that are not within the influence of the selected set are also mined as supplementary recommendation videos to obtain the final video recommendation list.

[0006] Furthermore, the method includes the following steps: Step 1: Obtain a user base through video media platforms Video collection ,in Indicates the number of users. Indicates the number of videos; from a video collection Get the text identifiers for all videos The embedding vectors of all text identifiers are obtained using a pre-trained text encoder. For any user Obtain the time-sequence sequence of user-video interactions within the platform. ,in , Indicates the number of user interactions. Indicates user The first interaction The text identifier corresponding to each video ; Step 2: From the video collection Choose any video and its corresponding text identifier embedding vector Then from the embedding vector of the text identifier Select distance The largest set of embedding vectors, randomly select one of the embedding vectors. Corresponding text identifier As negative samples ; Traverse the video collection This yields the negative samples for each video. Step 3: Select any user Construct text prompts for its recommended tasks: ; in For predefined prompt template functions, For task instructions, For user video interaction sequence Center front One video; user-video interaction sequence The text identifier corresponding to the last video in the middle The target recommended video, and the positive sample to be generated. Thus gaining users Positive and negative sample pairs ; Traverse the user set This yields the positive and negative sample pairs for each user. Step 4: For any user The computational large language model is based on text prompts Text identifiers for generating positive samples The advantages, ; in ; Text identifiers for generating positive samples The probability of , where, For text identifiers The word sequence obtained by the word segmenter encoding length, For word sequence The Middle Each word element, For word sequence The former Each word; similarly, a large language model can be obtained based on text prompts. Text identifiers for generating negative samples Advantages ; Traverse the user set This allows us to obtain the positive and negative sample advantages for each user.

[0007] Furthermore, the method also includes the following steps: Step 5: Calculate the advantage ratio loss: ; in, It is the sigmoid function; Step 6: Calculate the supervised fine-tuning loss: ; Step 7: Calculate the total loss of single-stage collaborative optimization: ; in, To control the hyperparameters of preference alignment strength; Step 8: Repeat steps 4 through 7 until the loss function is reached. If the value is less than a specified threshold, the large language model after fine-tuning is obtained.

[0008] Furthermore, the method also includes the following steps: Step 9: For any video Corresponding text identifier The corresponding word sequence is obtained by encoding using a word segmenter. , lexical sequence Each word element As a node in the prefix tree; traversing the video collection Following this method, a prefix tree is obtained by constructing the word sequence corresponding to the text identifiers of all videos. ; Step 10: For any user The total width of the diversity beam search is The number of groups is The search width for each beam is For the first Group, calculate the first The highest-scoring candidate word sequence is selected based on its score during the step. The candidate lexical sequences are used as the set of lexical sequences for the next step. ; in, For large language models based on the first Group front The set of lexical sequences of steps The set of all possible candidate word sequences for the next step generated. For a set of word sequences The number of sequences, ; For the first Group scoring function For the diversity penalty intensity hyperparameter, For the front Group 1 in The set of word sequences selected during the step, ; Here is the overlap penalty term based on Hamming distance, where, For the first Group 1 in The set of word sequences selected during the step. For indicator functions, For the current candidate word sequence The Each word element, For the first The first lexical sequence in any lexical sequence set selected by the group Each word element,

[0009] The logical value after being constrained by the prefix tree, where, This represents the original output logical value of the large language model. For the constraint strength hyperparameter, For word sequence The former Each word element, ; For the prefix tree constrained score, where, For a valid score, For word sequence The Each word element, To be based on the word sequence Query prefix tree The resulting set of legal candidate lexical elements; Step 11: Repeat step 10 until all groups have generated a complete set of word sequences. Set up each word sequence The corresponding set of text identifiers is obtained by decoding using a word segmenter. The text identifiers from each group are merged to form the initial text identifier set for the video recommendation list. .

[0010] The method further includes the following steps: Step 12: Collect the videos Text tag embedding vectors for all videos As nodes, a hierarchical index is constructed using the Hierarchical Navigable Small World (HNSW) algorithm; Step 13: Calculate users Query vector: ; in, For the initial video recommendation list Chinese text identifier The corresponding embedding vector; Step Fourteen: Initial video recommendation list Chinese arbitrary text identifier Embedded vector By using hierarchical indexing, the nearest video text identifier embedding vector node is found, and the corresponding node is added to the selected set. Iterate through the initial video recommendation list. Add the nearest node to the embedding vector corresponding to all text identifiers to the selected set using hierarchical indexing. ; Distance query vector Recently added video text identifier embedded vector nodes to the candidate set Use access sets Mark the selected set All nodes in the list have been visited.

[0011] The method further includes the following steps: Step 15: From the candidate set Select and remove distance The nearest node Use access collection Mark Node Visited, and the node Add all unvisited neighbor nodes to the candidate set in the bottom layer graph of the hierarchical index. ; Step Sixteen: Calculate Nodes Is it in the selected set? any node Scope of influence Within, when node Not any node in the selected set When it comes to the sphere of influence, that is: ; Will Add to selected collection ,in For the influence range hyperparameter, It is a vector distance metric; Step 17: Repeat steps 15 and 16 until a set has been selected. The size reaches the preset expansion quantity. Or the candidate set is empty, where Selected set As a user The final video recommendation list, in which The expected length of the video recommendation list.

[0012] The technical concept of this invention is to fully utilize the collaborative optimization mechanism of preferences and diversity in a generative video recommendation method based on a large language model, so that the generative video recommendation system can improve the diversity of results while maintaining accuracy.

[0013] The beneficial effects of this invention are: it can significantly reduce the computational overhead of large models, effectively balance the accuracy and diversity of video recommendation results, and enhance the practicality of generative video recommendation systems. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating a generative video recommendation method based on the collaborative optimization of preferences and diversity. Detailed Implementation

[0015] The present invention will now be further described with reference to the accompanying drawings.

[0016] Reference Figure 1 A generative video recommendation method based on the collaborative optimization of preferences and diversity includes the following steps: Step 1: Obtain a user base through video media platforms Video collection ,in Indicates the number of users. Indicates the number of videos; from a video collection Get the text identifiers for all videos The embedding vectors of all text identifiers are obtained using a pre-trained text encoder. For any user Obtain the time-sequence sequence of user-video interactions within the platform. ,in , Indicates the number of user interactions. Indicates user The first interaction The text identifier corresponding to each video; In this embodiment, the video media platform has 1000 users. For {Xiaoming, Xiaoqiang, ..., Xiaohong} and 10,000 videos For the dataset {Guitar Beginner Tutorial, Introduction to Deep Learning, ..., Frontier Lectures on Artificial Intelligence}, extract the text identifier for each video from the video collection. The text tag corresponding to the video "Introduction to Deep Learning" For an introduction to deep learning, a pre-trained text encoder is used to convert the text identifiers corresponding to all videos into embedding vectors, resulting in a set of embedding vectors. Taking user "Xiaoming" as an example, his user-video interaction sequence in chronological order. The sequence is titled "[Frontiers in Artificial Intelligence Lectures, Smart Home Reviews, Introduction to Deep Learning]", and its length is [length missing]. ,in For "Smart Home Evaluation"; Step 2: From the video collection Choose any video and its corresponding text identifier embedding vector Then from the embedding vector of the text identifier Select distance The largest set of embedding vectors, randomly select one of the embedding vectors. Corresponding text identifier As negative samples ; Traverse the video collection This yields the negative samples for each video. In this embodiment, from the video collection The video "Introduction to Deep Learning" and its corresponding embedding vector were selected. In the set of embedding vectors of text identifiers Find with The set of embedding vectors with the largest Euclidean distance The corresponding text identifiers are {makeup tutorials, home cooking, fitness exercises for beginners}, from which embedding vectors are randomly selected. The corresponding text label "makeup tutorial" serves as a negative sample for the video "Introduction to Deep Learning". ; Traverse the video collection This yields the negative samples for each video. Step 3: Select any user Construct text prompts for its recommended tasks. ; in, For predefined prompt template functions, For task instructions, For user video interaction sequence Center front One video; user-video interaction sequence The text identifier corresponding to the last video in the middle The target recommended video, and the positive sample to be generated. Thus gaining users Positive and negative sample pairs ; Traverse the user set This yields the positive and negative sample pairs for each user. In this embodiment, the task instruction Given a list of recently viewed videos by a user: [SEQUENCES], please recommend videos the user might like: based on the user-video interaction sequence of user "Xiaoming". Select the first two videos [Frontiers in Artificial Intelligence Lecture, Smart Home Review] to construct text prompts for the recommendation task. Get text prompts Given a user's recently viewed video list: "Frontiers in Artificial Intelligence Lectures," "Smart Home Review," please recommend videos the user might like: The last video, "Introduction to Deep Learning," is selected as the target recommended video and used as a positive sample. Based on the negative samples obtained in step two Obtain positive and negative sample pairs from user "Xiaoming". ; Traverse the user set This yields the positive and negative sample pairs for each user. Step 4: For any user The computational large language model is based on text prompts Text identifiers for generating positive samples Advantages ; in, Text identifiers for generating positive samples The probability of , where, For text identifiers The word sequence obtained by the word segmenter encoding length, For word sequence The Middle Each word element, For word sequence The former Each word; similarly, a large language model can be obtained based on text prompts. Text identifiers for generating negative samples Advantages ; Traverse the user set This allows us to obtain the positive and negative sample advantages for each user. In this embodiment, the large language model is the Qwen3 model, with positive samples. The corresponding text identifier "Introduction to Deep Learning" is encoded by a word segmenter to obtain a sequence of tokens. For [Introduction, In-depth, Learning], text prompts will be provided. Given a large language model, the conditional probabilities of generating corresponding word units sequentially are {0.25, 0.60, 0.90}. Then, the generated... The probability of: ; Then positive samples are generated. Advantages are Using the same method, we calculate the advantages of generating negative samples of "makeup tutorials". Its lexical sequence... For [beauty, tutorial], a large language model generates text tags. The probability is: ; Then negative samples are generated. Advantages are ; Traverse the user set This allows us to obtain the positive and negative sample advantages for each user. Step 5: Calculate the advantage ratio loss: ; in, It is the sigmoid function; Step 6: Calculate the supervised fine-tuning loss: ; Step 7: Calculate the total loss of single-stage collaborative optimization: ; in, To control the hyperparameters of preference alignment strength; Step 8: Repeat steps 4 through 7 until the loss function is reached. If the value is less than a specified threshold, the fine-tuned large language model is obtained. Step 9: For any video Corresponding text identifier The corresponding word sequence is obtained by encoding using a word segmenter. , lexical sequence Each word element As a node in the prefix tree; traversing the video collection Following this method, a prefix tree is obtained by constructing the word sequence corresponding to the text identifiers of all videos. ; In this embodiment, the video collection Text identifiers corresponding to medium-length videos For the phrase "makeup tutorial", a word segmenter is used to encode the corresponding word sequence. For the term "[beauty, tutorial]", each lexical element in the lexical sequence is used as a prefix tree in turn. Starting from the root node, take "Beauty" as a child node of the root node, and "Tutorials" as a child node of the "Beauty" node; traverse all video collections using the same method. Construct a complete prefix tree ; Step 10: For any user The total width of the diversity beam search is The number of groups is The search width for each beam is For the first Group, calculate the first The highest-scoring candidate word sequence is selected based on its score during the step. The candidate lexical sequences are used as the set of lexical sequences for the next step; ; in, For large language models based on the first Group front The set of lexical sequences of steps The set of all possible candidate word sequences for the next step generated. For a set of word sequences The number of sequences, ; For the first Group scoring function For the diversity penalty intensity hyperparameter, For the front Group 1 in The set of word sequences selected during the step. ; Here is the overlap penalty term based on Hamming distance, where, For the first Group 1 in The set of word sequences selected during the step. For indicator functions, For the current candidate word sequence The Each word element, For the first The first lexical sequence in any lexical sequence set selected by the group Each word element, ; The logical value after being constrained by the prefix tree, where, This represents the original output logical value of the large language model. For the constraint strength hyperparameter, For word sequence The former Each word element, ; For the prefix tree constrained score, where, For a valid score, For word sequence The Each word element, To be based on the word sequence Query prefix tree The resulting set of legal candidate lexical elements; In this embodiment, the total width of the diversity beam search is... Number of groups Width of each bundle For user "Xiaoming", in the first... Step, for the first Group, large language model with The set of word sequences generated step by step As a condition, each word sequence The sequence of lexical units that can be used in the next step is called the candidate lexical sequence set. The next step involves selecting any lexical unit from the vocabulary of the large language model; for the first group, the candidate lexical unit sequence set is used. Choose any word sequence Its score is based on the score of the previous step. According to the scoring function Calculate word sequence The score, its logical value after prefix tree constraints For large language models, use word sequences The former The word element of step Generate lexical units for conditions logical value Under the constraints of the prefix tree, if the lexical If a node is a valid node in the prefix tree, then the constraint score is... Otherwise, the value is 0, and the set of candidate word sequences is calculated. After scoring all word sequences, select the two word sequences with the highest scores as the second sequence. The set of lexical sequences of steps ,in for The The word element of step, The value is 1; for group 2, its scoring function is... Based on scoring function Calculate diversity penalty If word element Compared to the group before group 2, in the The set of word sequences generated step by step The first word sequence in any word sequence If each word element is matched, then It is 1 if it is not 0 otherwise, where it is set The value is 0.1; the calculation method for group 3 is the same as that for group 2; Step 11: Repeat step 10 until all groups have generated a complete set of word sequences. Set up each word sequence The corresponding set of text identifiers is obtained by decoding using a word segmenter. The text identifiers from each group are merged to form the initial text identifier set for the video recommendation list. ; In this embodiment, for user "Xiaoming", step ten is repeated until all groups generate a complete set of word sequence. The first set of generated word sequence sets Group 2 is for {[Introduction, In-depth, Learning], [Machine Learning, Beginner, To, Mastery]}. For {[depth, learning, tutorial], [depth, learning, basic, knowledge]}, Group 3 The set is defined as {[AI, Introduction, Course], [AI, Basics, Tutorial]}. These word sequences are decoded using a word segmenter to obtain the corresponding set of text identifiers. For those new to deep learning, machine learning from beginner to expert. This is for {deep learning tutorials, deep learning fundamentals}. For {AI introductory courses, AI basic tutorials}, merge the text identifiers of all groups to obtain the initial text identifier set for the video recommendation list. This section covers {Introduction to Deep Learning, Machine Learning from Beginner to Expert, Deep Learning Tutorials, Deep Learning Fundamentals, AI Introductory Courses, AI Basic Tutorials}. Step 12: Collect the videos Text tag embedding vectors for all videos As nodes, a hierarchical index is constructed using the Hierarchical Navigable Small World (HNSW) algorithm; In this embodiment, a hierarchical index structure is initialized, with a maximum number of connections for each node in each layer of the index, and the video collection is traversed. Text tag embedding vectors for all videos A hierarchical index is constructed based on the Hierarchical Navigable Small World (HNSW) algorithm. Step 13: Calculate users Query vector: ; in, For the initial video recommendation list Chinese text identifier The corresponding embedding vector; In this embodiment, the initial recommendation list of user "Xiaoming" is used. Choose any text identifier To introduce deep learning, a pre-trained text encoder is used. Encode to obtain the corresponding embedding vector Iterate through the initial recommendation list We obtain the embedding vectors corresponding to the text identifiers of all recommended videos, and calculate the mean of all embedding vectors. As a query vector; Step Fourteen: Initial video recommendation list Chinese arbitrary text identifier Embedded vector By using hierarchical indexing, the nearest video text identifier embedding vector node is found, and the corresponding node is added to the selected set. Iterate through the initial video recommendation list. Add the nearest node to the embedding vector corresponding to all text identifiers to the selected set using hierarchical indexing. ; Distance query vector Recently added video text identifier embedded vector nodes to the candidate set Use access sets Mark the selected set All nodes in the list have been visited; In this embodiment, a set has been selected. Candidate set Access collection Initially, everything is empty; start from the initial video recommendation list. Take any text identifier For the title "Introduction to Deep Learning", its embedding vector is: Find the distance using the HNSW hierarchical index. The most recent node, "Introduction to Deep Learning," is added to the selected set. Using the same method, traverse the initial video recommendation list and add the node with the closest distance to the embedding vector corresponding to each text identifier, found through the HNSW hierarchical index, to the selected set. Find the distance query vector in the index. The most recent node, "Overview of Artificial Intelligence," has been added to the candidate set. Use access sets mark All nodes in the list have been visited; Step 15: From the candidate set Select and remove distance The nearest node Use access collection Mark Node It has been visited, and will Add all unvisited neighbor nodes to the candidate set in the bottom layer graph of the hierarchical index. ; In this embodiment, from the candidate set Select and remove distance The most recent node, "Overview of Artificial Intelligence", is denoted as Use it to access the set Mark it, and then find it in the underlying graph of the HNSW index. All neighboring nodes [Introduction to Machine Learning, Introduction to Neural Networks], check whether these neighboring nodes have been... Mark, add unmarked neighbor nodes to the candidate set. middle; Step Sixteen: Calculate Nodes Is it in the selected set? any node Scope of influence Within, when node Not any node in the selected set When it comes to the sphere of influence, that is: ; Will Add to selected collection ,in, For the influence range hyperparameter, It is a vector distance metric; In this embodiment, the node is determined. Is it in the selected set? any node Within the scope of influence of "Introduction to Deep Learning", its influence range hyperparameter is... The value is 0.1, and L2 distance is used as the vector distance metric. , ,but Iterate through the selected set , satisfy the node It is not within the influence range of any node in the selected set, therefore... Add to selected collection ; Step 17: Repeat steps 15 and 16 until a set has been selected. The size reaches the preset expansion quantity. Or the candidate set is empty, where Selected set As a user The final video recommendation list, in which The expected length of the video recommendation list.

[0017] In this embodiment, for a user's interactive behavior on a video media platform, the user-video interaction sequence is converted into text prompts through a predefined prompt template function. The text identifier generated by the large language model based on the text prompts is calculated, and the selected set is used as the final video recommendation list through retrieval and supplementation.

[0018] The embodiments described in this specification are merely illustrative examples of implementations of the inventive concept. The scope of protection of this invention should not be considered limited to the specific forms described in these embodiments, but also extends to equivalent technical means conceived by those skilled in the art based on the inventive concept.

Claims

1. A generative video recommendation method based on the collaborative optimization of preferences and diversity, characterized in that, First, the large language model is fine-tuned to adapt to the generative video recommendation task. Then, a diversity bundle search is used to generate an initial video recommendation list, while a prefix tree constraint is used to guide the text tags generated by the large language model to align with the video set. Finally, a hierarchical index is used to retrieve the videos corresponding to the text tags and add them to the selected set. Videos that are not within the influence of the selected set are also mined as supplementary recommended videos to obtain the final video recommendation list.

2. The generative video recommendation method based on the collaborative optimization of preferences and diversity as described in claim 1, characterized in that, The method includes the following steps: Step 1: Obtain a user base through video media platforms Video collection From video collection Get the text identifiers for all videos The embedding vectors of all text identifiers are obtained using a pre-trained text encoder. For any user Obtain the time-sequence sequence of user-video interactions within the platform. ; Step 2: From the video collection Choose any video and its corresponding text identifier embedding vector Then from the embedding vector of the text identifier Select distance The largest set of embedding vectors, randomly select one of the embedding vectors. Corresponding text identifier As negative samples ; Traverse the video collection This yields the negative samples for each video. Step 3: Select any user Construct text prompts for its recommendation tasks, and incorporate user-video interaction sequences. The text identifier corresponding to the last video in the middle The target recommended video, and the positive sample to be generated. Thus gaining users Positive and negative sample pairs ; Traverse the user set This yields the positive and negative sample pairs for each user. Step 4: For any user The computational large language model is based on text prompts Text identifiers for generating positive samples Advantages Then, based on the text prompts, a large language model is obtained. Text identifiers for generating negative samples Advantages ; Traverse the user set This allows us to obtain the positive and negative sample advantages for each user.

3. The generative video recommendation method based on the collaborative optimization of preferences and diversity as described in claim 2, characterized in that, The method further includes the following steps: Step 5: Calculate the advantage ratio loss; Step 6: Calculate the monitoring and fine-tuning loss; Step 7: Calculate the total loss of single-stage collaborative optimization; Step 8: Repeat steps 4 through 7 until the loss function is reached. If the value is less than a specified threshold, the large language model after fine-tuning is obtained.

4. The generative video recommendation method based on the collaborative optimization of preferences and diversity as described in claim 3, characterized in that, The method further includes the following steps: Step 9: For any video Corresponding text identifier The corresponding word sequence is obtained by encoding using a word segmenter. , lexical sequence Each word element As a node in the prefix tree; traversing the video collection Following this method, a prefix tree is obtained by constructing the word sequence corresponding to the text identifiers of all videos. ; Step 10: For any user The total width of the diversity beam search is The number of groups is The search width for each beam is For the first Group, calculate the first The highest-scoring candidate word sequence is selected based on its score during the step. The candidate word sequence is used as the next word sequence set; wherein, the score is obtained through a scoring function. Calculate; when At that time, the scoring function is the word sequence from the previous step. The score is the sum of the current logical value after adjustment by the prefix tree constraints; when When, the scoring function is minus The overlap penalty term with the Hamming distance of the selected sequences in the preceding groups; the logical value after adjustment by the prefix tree constraint is obtained by adding a prefix tree constraint score corresponding to the prefix of the current sequence to the original output logical value of the large language model; Step 11: Repeat step 10 until all groups have generated a complete set of word sequences. Set up each word sequence The corresponding set of text identifiers is obtained by decoding using a word segmenter. The text identifiers of each group are merged to form the text identifier set of the initial video recommendation list.

5. The generative video recommendation method based on the collaborative optimization of preferences and diversity as described in claim 4, characterized in that, The method further includes the following steps: Step 12: Collect the videos Text tag embedding vectors for all videos As nodes, a hierarchical index is constructed using the Hierarchical Navigable Small World (HNSW) algorithm; Step 13: Calculate users The query vector; Step Fourteen: Initial video recommendation list Chinese arbitrary text identifier Embedded vector By using hierarchical indexing, the nearest video text identifier embedding vector node is found, and the corresponding node is added to the selected set. ; Distance query vector Recently added video text identifier embedded vector nodes to the candidate set Use access sets Mark the selected set All nodes in the list have been visited.

6. The generative video recommendation method based on the collaborative optimization of preferences and diversity as described in claim 5, characterized in that, The method further includes the following steps: Step 15: From the candidate set Select and remove distance The nearest node Use access collection mark It has been visited, and will Add all unvisited neighbor nodes to the candidate set in the bottom-level graph of the hierarchical index. ; Step Sixteen: Calculate Nodes Is it in the selected set? any node Scope of influence Within, when node Not any node in the selected set When considering the scope of influence, Add to selected collection ; Step 17: Repeat steps 15 and 16 until a set has been selected. The size reaches the preset expansion quantity. Or the candidate set is empty, where Selected set As a user The final video recommendation list, in which The expected length of the video recommendation list.