Search text recommendation method and text recommendation model training method

By combining near-line and real-time recall scenarios in e-commerce platforms with deep learning models, a text recommendation sequence is constructed, which solves the problem of inaccurate user behavior mapping, realizes the personalization and real-time nature of recommended text, and improves the user experience.

CN122432266APending Publication Date: 2026-07-21TAOBAO CHINA SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TAOBAO CHINA SOFTWARE
Filing Date
2026-03-13
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing e-commerce platform recommendation systems fail to deeply understand user intent when constructing the mapping relationship between user behavior and recommendation text, leading to inaccurate recommendations.

Method used

A deep learning model is used to recommend text that matches the user's interests and preferences in near-line recall scenarios through a first recommendation model, and to quickly respond to the user's search intent in real-time recall scenarios by combining a second recommendation model, thus constructing a text recommendation sequence.

Benefits of technology

It improves the accuracy of recommended text, ensures that recommended text matches user interests and preferences, enhances the diversity and personalization of the search experience, and improves response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432266A_ABST
    Figure CN122432266A_ABST
Patent Text Reader

Abstract

The application provides a recommendation method of search text and a training method of a text recommendation model, and relates to the fields of artificial intelligence technology and natural language processing. The method comprises the following steps: in response to detecting a search behavior, obtaining behavior parameters of the search behavior and a plurality of first recommended texts; inputting the behavior parameters into a second recommendation model, performing text recommendation on the search behavior by using the second recommendation model, and obtaining a plurality of second recommended texts; and based on the plurality of first recommended texts and the plurality of second recommended texts, constructing a text recommendation sequence corresponding to the search behavior. The application solves the technical problem that the search text recommended to the user according to the search behavior of the user is inaccurate in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence technology and natural language processing, and more specifically, to a method for recommending searched text and a method for training a text recommendation model. Background Technology

[0002] In e-commerce platforms, recommendation systems that use text to recommend content based on user search behavior mostly employ collaborative filtering or shallow semantic matching models based on users' historical clicks, searches, and interactions. This aims to infer the search text through the co-occurrence relationship between "behavior" and "text," achieving personalized retrieval of the search text. However, current mapping mechanisms for "user behavior → recommended text" often directly map clicked products or browsed categories to recommended text without deeply understanding the user's intent. This can lead to a disconnect between the constructed mapping relationship between user behavior and recommended text and the user's actual search intent, resulting in text recommendation errors when the recommendation system makes recommendations based on new user-triggered search behaviors. Summary of the Invention

[0003] This application provides a method for recommending search text and a method for training a text recommendation model, so as to at least solve the technical problem in related technologies that the search text recommended to users based on their search behavior is inaccurate.

[0004] According to one aspect of the embodiments of this application, a method for recommending search text is provided, comprising: in response to detecting a search behavior, obtaining behavioral parameters of the search behavior and a plurality of first recommended texts, wherein the plurality of first recommended texts are obtained by a first recommendation model based on entity information corresponding to the search behavior and a historical behavior sequence, and the entity information is used to characterize the information of the target entity that triggered the search behavior; inputting the behavioral parameters into a second recommendation model, and using the second recommendation model to recommend text for the search behavior to obtain a plurality of second recommended texts, wherein the response speed of the second recommendation model is greater than the response speed of the first recommendation model; and constructing a text recommendation sequence corresponding to the search behavior based on the plurality of first recommended texts and the plurality of second recommended texts.

[0005] According to another aspect of the embodiments of this application, a method for training a text recommendation model is also provided, comprising: constructing first training data based on text recommendation results corresponding to multiple recommendation requests within a first test time period, and constructing second training data based on sample behavior sequences corresponding to multiple recommendation requests, wherein the text recommendation results are used to characterize a set of sample texts recommended to a test entity based on multiple recommendation requests, and the text interaction results of multiple sample texts contained in the sample text set, and the sample behavior sequences are used to characterize the behavior sequences generated by the test entity within the first test time period; training a first initial model based on the first training data to obtain a first recommendation model; and training a second initial model based on the second training data, and the reasoning thought chain and reasoning results of a teacher model to obtain a second recommendation model, wherein the reasoning thought chain and reasoning results are obtained by the teacher model processing the second training data, and the first recommendation model and the second recommendation model are used to perform the method of any one of the above.

[0006] According to another aspect of the embodiments of this application, a method for recommending search text is also provided, comprising: responding to an input command applied to an operation interface, displaying behavior parameters of a search behavior and a plurality of first recommended texts on the operation interface, wherein the input command is triggered by a search behavior, and the plurality of first recommended texts are obtained by a first recommendation model based on entity information corresponding to the search behavior and a historical behavior sequence, wherein the entity information is used to characterize the information of the entity that triggered the search behavior; responding to a processing command applied to the operation interface, displaying a text recommendation sequence on the operation interface, wherein the text recommendation sequence is constructed from a plurality of first recommended texts and a plurality of second recommended texts, and the plurality of second recommended texts are obtained by a second recommendation model based on the behavior parameters for text recommendation of the search behavior, wherein the response speed of the second recommendation model is greater than the response speed of the first recommendation model.

[0007] According to another aspect of the embodiments of this application, a text recommendation device for search is also provided, comprising: a first acquisition module, configured to acquire behavioral parameters of the search behavior and a plurality of first recommended texts in response to detecting a search behavior, wherein the plurality of first recommended texts are obtained by a first recommendation model based on entity information corresponding to the search behavior and historical behavior sequences, and the entity information is used to characterize the information of the target entity that triggered the search behavior; a text recommendation module, configured to input the behavioral parameters into a second recommendation model, and use the second recommendation model to perform text recommendation on the search behavior to obtain a plurality of second recommended texts, wherein the response speed of the second recommendation model is greater than the response speed of the first recommendation model; and a sequence construction module, configured to construct a text recommendation sequence corresponding to the search behavior based on the plurality of first recommended texts and the plurality of second recommended texts.

[0008] According to another aspect of the embodiments of this application, a training apparatus for a text recommendation model is also provided, comprising: a second acquisition module, configured to construct first training data based on text recommendation results corresponding to multiple recommendation requests within a first test time period, and to construct second training data based on sample behavior sequences corresponding to multiple recommendation requests, wherein the text recommendation results are used to characterize a set of sample texts recommended to a test entity based on multiple recommendation requests, and the text interaction results of multiple sample texts contained in the sample text set, and the sample behavior sequences are used to characterize the behavior sequences generated by the test entity within the first test time period; a first training module, configured to train a first initial model based on the first training data to obtain a first recommendation model; and a second training module, configured to train a second initial model based on the second training data, and the reasoning thought chain and reasoning results of a teacher model to obtain a second recommendation model, wherein the reasoning thought chain and reasoning results are obtained by the teacher model processing the second training data, and the first recommendation model and the second recommendation model are used to execute the method of any one of the above.

[0009] According to another aspect of the embodiments of this application, a text recommendation device for search is also provided, comprising: a first display module, configured to respond to an input command applied to an operation interface, displaying behavior parameters of a search behavior and a plurality of first recommended texts on the operation interface, wherein the input command is triggered by a search behavior, and the plurality of first recommended texts are obtained by a first recommendation model based on entity information corresponding to the search behavior and a historical behavior sequence, wherein the entity information is used to characterize the information of the entity that triggered the search behavior; and a second display module, configured to respond to a processing command applied to the operation interface, displaying a text recommendation sequence on the operation interface, wherein the text recommendation sequence is constructed from a plurality of first recommended texts and a plurality of second recommended texts, and the plurality of second recommended texts are obtained by a second recommendation model based on the behavior parameters for text recommendation of the search behavior, wherein the response speed of the second recommendation model is greater than the response speed of the first recommendation model.

[0010] According to another aspect of the embodiments of this application, a computing device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0011] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor connected to the memory via a bus for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0012] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.

[0013] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.

[0014] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the methods in various embodiments of this application.

[0015] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this application.

[0016] In this embodiment, in response to the detection of search behavior, behavioral parameters of the search behavior and multiple first recommended texts are obtained; the behavioral parameters are input into a second recommendation model, which then performs text recommendation on the search behavior to obtain multiple second recommended texts; based on the multiple first recommended texts and multiple second recommended texts, a text recommendation sequence corresponding to the search behavior is constructed. By obtaining multiple first recommended texts recommended by the first recommendation model in near-line recall scenarios based on the user's entity information and historical behavior, the matching degree between the search text recommended to the user and the user's interests and preferences, as well as the diversity and personalization of the search text, can be guaranteed. Simultaneously, by utilizing multiple second recommended texts recommended by the second recommendation model in real-time recall scenarios based on the behavioral parameters of the search behavior, the real-time nature of the search text recommended to the user and the matching degree between the search text and the user's search intent can be guaranteed. Therefore, constructing a text recommendation sequence for display to the user based on multiple first recommended texts and multiple second recommended texts can effectively improve the accuracy of the text recommendation sequence recommended to the user, thereby solving the technical problem of inaccurate search text recommended to the user based on the user's search behavior in related technologies.

[0017] The above general description and the following detailed description are for illustrative and explanatory purposes only and do not constitute a limitation thereof. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0019] Figure 1 This is a schematic diagram illustrating a search text recommendation scenario according to an embodiment of this application;

[0020] Figure 2 This is a flowchart illustrating a method for recommending search text according to embodiments of this application;

[0021] Figure 3 This is a flowchart illustrating a training method for a text recommendation model according to an embodiment of this application;

[0022] Figure 4 This is a schematic diagram illustrating a second text tag list construction process according to an embodiment of this application;

[0023] Figure 5 This is a schematic diagram illustrating a recommended priority according to an embodiment of this application;

[0024] Figure 6 This is a schematic diagram illustrating the deployment process of a text recommendation model according to an embodiment of this application;

[0025] Figure 7 This is a schematic diagram illustrating a search text recommendation process according to an embodiment of this application;

[0026] Figure 8 This is a flowchart illustrating another method for recommending search text according to embodiments of this application;

[0027] Figure 9 This is a structural block diagram of a text recommendation device according to an embodiment of this application;

[0028] Figure 10 This is a structural block diagram of a training device for a text recommendation model according to an embodiment of this application;

[0029] Figure 11 This is a structural block diagram of a text recommendation device according to an embodiment of this application;

[0030] Figure 12 This is a structural block diagram of a computing device according to an embodiment of this application;

[0031] Figure 13 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some, not all, of the embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort should fall within the scope of protection of the present application.

[0033] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in other orders. Wherein, "other orders" refers to orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such as a process, method, system, product, or apparatus that comprises a series of steps or units, not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed, or inherent to such processes, methods, products, or apparatus.

[0034] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0035] The technical solution provided in this application is mainly implemented using a deep learning model. Deep learning models can be widely applied in fields such as Natural Language Processing (NLP), computer vision, and speech processing. Specifically, they can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and image generation, as well as to natural language processing tasks such as text-based sentiment classification, text summarization, and machine translation. Therefore, the main application scenarios of this application include, but are not limited to, digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design. In this application's embodiments, the data processing using a text recommendation model in a text recommendation scenario is used as an example for explanation.

[0036] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0037] u2q: User-to-Query, a recall method that generates personalized queries based on user profiles and behavioral sequences.

[0038] x2q: Trigger-to-Query, a coordinated filtering method based on user behavior triggers to recall searchable queries, often used to build co-occurrence relationships offline.

[0039] According to embodiments of this application, a method for recommending search text is provided. The steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than that shown here.

[0040] The technical solutions provided in this application can employ deep learning models with relatively large parameter scales, such as large models containing billions or even more model parameters. Here, "large model" is just one example; this application does not limit the number of model parameters supported by the deep learning model used, aiming to meet actual needs. The deep learning models involved in this application can be artificial intelligence-based language models (LM) or multimodal models (MM).

[0041] Considering the limited computing resources of mobile terminals, the methods described above in this application embodiment can be applied to, for example... Figure 1 The application scenarios shown. Figure 1 This is a schematic diagram illustrating a search text recommendation scenario according to an embodiment of this application, in which... Figure 1 In the illustrated application scenario, the deep learning model is deployed on server 10. Server 10 can connect to one or more client devices 20 via a local area network (LAN), wide area network (WAN), internet connection, or other types of data network. Client devices 20 may include, but are not limited to, smartphones, tablets, laptops, PDAs, personal computers, smart home devices, and in-vehicle devices. Client devices 20 can interact with users through a graphical user interface to invoke the deep learning model, thereby implementing the method provided in this embodiment.

[0042] In this embodiment, the system consisting of a client device and a server can perform the following steps: The client device, in response to detecting a search behavior, obtains the behavior parameters of the search behavior and multiple first recommended texts; and outputs a text recommendation sequence corresponding to the search behavior. The server inputs the behavior parameters into a second recommendation model, uses the second recommendation model to perform text recommendation on the search behavior, and obtains multiple second recommended texts; based on the multiple first recommended texts and the multiple second recommended texts, it constructs a text recommendation sequence corresponding to the search behavior.

[0043] With the rapid development of high-performance computing units, the methods provided in this application embodiment can also be applied to model-in-the-loop machines in other application scenarios. In one optional embodiment, the model-in-the-loop machine has multiple built-in models. Users can select a model to adjust as needed to obtain their own model. The high-performance computing unit built into the model-in-the-loop machine can then directly call the adjusted model to execute the methods provided in this application embodiment. In another optional embodiment, the deep learning model-in-the-loop machine has a pre-trained model built-in. The high-performance computing unit built into the model-in-the-loop machine can then directly call this model to execute the methods provided in this application embodiment.

[0044] Furthermore, when users need to train their own models, they can upload their own datasets via the client. This dataset is sent from the client to the server. The server can then use this dataset to fine-tune the pre-trained model, resulting in the user's customized model, which can then be deployed to the production environment. To facilitate user adjustments, the server provides complete adjustment tools, development frameworks, and processes, supporting various adjustment strategies. This allows the adjusted model to better adapt to different application domains and achieve a high degree of customization.

[0045] Under the aforementioned operating environment, this application provides the following: Figure 2 The recommended method for the search text shown. Figure 2 This is a flowchart illustrating a method for recommending search text according to embodiments of this application. For example... Figure 2 As shown, the method may include the following steps:

[0046] Step S202: In response to detecting search behavior, obtain the behavior parameters of the search behavior and multiple first recommended texts.

[0047] Among them, multiple first recommended texts are obtained by the first recommendation model based on the entity information corresponding to the search behavior and the historical behavior sequence. The entity information is used to represent the information of the target entity that triggered the search behavior.

[0048] The target entity mentioned above can refer to the entity that triggers the search behavior, such as a user, an AI (Artificial Intelligence) assistant, or a smart device. For ease of understanding, the following description will use the user as the entity that triggers the search behavior.

[0049] The aforementioned search behavior refers to the user's proactive search for objects within the interactive interface based on their own needs or task objectives. For example, this could involve entering the object characteristics of the target object into a search box, or quickly searching for the target object by clicking on links or suggestions displayed in the interactive interface. The target object can include, but is not limited to, goods, virtual services, and virtual courses.

[0050] The aforementioned behavioral parameters can refer to the relevant parameters entered by the user when triggering the search behavior. For example, these could be the prefix text entered by the user in the search box, or the user's deletion of the prefix text, the trajectory generated when the user moves the cursor with the mouse, and the cursor's stopping position, among other characteristic parameters.

[0051] The aforementioned first recommended text can refer to the search text that matches the user's interests and preferences, recommended to the user by the first recommendation model in near-line recall scenarios. It can be used to assist users in searching for objects that they are interested in.

[0052] The aforementioned entity information may refer to the identity attributes and interest preferences information obtained with the authorization of the target entity, which is used to characterize the target entity.

[0053] In one optional embodiment, considering the process of users searching for objects in the search box, in order to reduce the input cost and cognitive load of users and improve search efficiency, the recommendation system usually recommends some search text to users below the search box. Whether these search texts can meet the user's interests and preferences, and whether they are accurate, often affects the user's satisfaction with the current search platform. For example, if a user wants to buy a folding chair, when the user only enters "folding" in the search box, the recommendation system can expand the word "folding" to recommend matching search texts to the user, such as "folding bed," "folding chair," and "folding phone." If the search text recommended by the recommendation system contains the content that the user wants to search for, such as the aforementioned folding chair, the user can directly start the search operation by clicking on the search text, reducing the cost of manually entering complete keywords and improving the user experience. Conversely, if the search text recommended by the recommendation system does not contain the content that the user wants to search for, the user still needs to spend some time to enter complete content, which affects the user's satisfaction with the search platform.

[0054] Therefore, the ability to accurately recommend search texts that meet the user's interests and preferences when the user triggers the above search behavior is one of the core capabilities that recommendation systems need to continuously feature.

[0055] Considering the scenario where a recommendation system recommends search text to a user, it can generally be divided into near-line recall scenario and real-time recall scenario.

[0056] In the near-line recall scenario, the recommender system can analyze user entity information or historical behavior before the user triggers the aforementioned search behavior, constructing and caching recommendation results that match the user's interests and preferences. For example, a personalized search suggestion vector library can be built for all users every morning, or the semantic association model output based on user click sequences and session paths can be updated hourly. In the near-line recall scenario, the recommender system can perform in-depth analysis of user entity information and historical behavior to determine user interests and preferences, recommending search texts that highly match the user's interests and preferences while possessing diversity and personalization. This improves the relevance and coverage of the search texts recommended by the recommender system to the user's intent, enhancing the user's ability to discover long-tail needs.

[0057] Real-time retrieval scenarios refer to the process of quickly determining a user's immediate interests based on behavioral parameters of their search behavior—that is, the search intent that triggered the search—and completing the online response process of retrieval and ranking within milliseconds. For example, as soon as a user enters a character in the search box, the system immediately generates search text based on the current prefix text, combined with contextual information such as real-time clickstream, trending topics, and geographic location. In real-time retrieval scenarios, recommendation systems can quickly match pre-set keyword templates, spell-correction dictionaries, and other relevant content based on the behavioral parameters of the user's search behavior, such as the prefix text entered in the search box. This improves the efficiency of recommending search text to the user while ensuring a good match between the recommended search text and the user's search intent, thereby effectively capturing the user's search intent and improving the response speed and smoothness of the search text recommendation process.

[0058] While recommendation systems can recommend search texts that highly match users' interests and preferences, and are diverse and personalized, in near-line recall scenarios, the data update process is delayed, and the analysis and reasoning cycle of received data is long. This means they cannot detect subtle changes in the prefix text of the user's current input, resulting in a typically long response time and low recommendation efficiency in near-line recall scenarios. Furthermore, they cannot accurately reflect the user's search intent. For example, if a user has just searched for "yoga courses" and then enters "Pilates," the recommendation system might still recommend old intent-related terms like "yoga mat" and "yoga clothes," failing to capture the intent shift in a timely manner. While real-time search engine optimization (REMO) systems can reduce response time and improve efficiency in text recommendation, ensuring that recommended search text matches the user's search intent, the system suffers from several drawbacks. First, it relies heavily on short-term context and lacks modeling of user interests and preferences. Second, the pool of search texts provided is often limited to high-frequency or popular terms. This results in a low match between recommended search texts and user interests, and a lack of diversity and personalization. For example, if a user enters "Nordic style," the system might only recommend generic and popular terms like "Nordic style sofa" and "Nordic style lighting," ignoring past user preferences such as "Nordic style handmade furniture" and "Nordic style designer brands," leading to highly homogenized recommended search texts.

[0059] If only near-line recall scenarios or only real-time recall scenarios are used to recommend search text based on user-triggered search behavior, the recommendation efficiency may be low or mismatched with the user's search behavior, resulting in failure to meet the user's search intent. This could lead to user churn, increased search bounce rate, and decreased conversion rate. Alternatively, the recommended search text may not match the user's interests and preferences, lacking diversity and personalization, resulting in a monotonous user experience, weakened discovery capabilities, and reduced perceived platform value.

[0060] Therefore, to ensure the matching degree between the search text recommended to users and their interests and preferences, as well as the diversity and personalization of the search text, and to improve the efficiency of the recommendation system in recommending search text to users and the matching degree between search text and users' search intent, the recommendation system can recommend search text to users simultaneously in near-line recall and real-time recall scenarios when it detects that a user has triggered a search behavior. In the near-line recall scenario, the search text recommended can accurately match the user's interests and preferences, providing users with diverse and personalized text recommendations. At the same time, the search text recommended in the real-time recall scenario can quickly respond to the user's search behavior, providing accurate and low-latency supplementary text to the user's search intent, thereby improving the user's experience when triggering a search behavior to search for objects.

[0061] Based on this, upon detecting a user-triggered search behavior, the recommendation system can first obtain the behavioral parameters of the search behavior. These parameters can then be used to provide real-time input features and contextual signals for the text recommendation process in real-time recall scenarios. Simultaneously, the recommendation system can obtain the search text recommended to the user in near-line recall scenarios—that is, the aforementioned multiple first-recommendation texts—to construct a semantic foundation for the user's long-term interests and a personalized candidate text pool.

[0062] In order to ensure the matching degree between the multiple first-recommendation texts and the user's interests and preferences, as well as the diversity and personalization of the multiple first-recommendation texts, the recommendation system can deploy the above-mentioned first-recommendation model for near-line recall scenarios. The first-recommendation model can be used to conduct in-depth analysis of the entity information and historical behavior sequences corresponding to the above-mentioned search behavior, extract the perception of user interests and preferences, and ensure that the multiple first-recommendation texts recommended to the user can accurately match the user's interests and preferences, providing the user with diversified and personalized search texts.

[0063] Step S204: Input the behavioral parameters into the second recommendation model, and use the second recommendation model to recommend texts based on the search behavior to obtain multiple second recommendation texts.

[0064] The response speed of the second recommendation model is greater than that of the first recommendation model.

[0065] The aforementioned second recommendation model can refer to a text recommendation model deployed in real-time retrieval scenarios. Compared with the first recommendation model, the second recommendation model has a faster response speed and can complete the semantic understanding of the user's search intent and the efficient retrieval of search text within milliseconds. It avoids recommendation delays due to excessive computational complexity and can significantly improve the fluency and real-time interaction of users when searching for objects.

[0066] In one optional embodiment, in order to provide highly relevant and semantically accurate instant recommendations the moment a user enters keywords, reduce user waiting time, and guide them to quickly focus on effective information, after obtaining the behavioral parameters of the search behavior, the recommendation system can further input the behavioral parameters into the aforementioned second recommendation model. The second recommendation model uses the behavioral parameters to identify the user's search intent and quickly recalls multiple second recommendation texts that match the behavioral parameters, thereby achieving a seamless interactive experience of "input as recommendation" and improving the user's search conversion rate and satisfaction.

[0067] Step S206: Based on multiple first recommended texts and multiple second recommended texts, construct a text recommendation sequence corresponding to the search behavior.

[0068] In one optional embodiment, after multiple first recommended texts recommended by the first recommendation model in the near-line recall scenario and multiple second recommended texts recommended by the second recommendation model in the real-time recall scenario, in order to facilitate user viewing, the recommendation system can construct a text recommendation sequence corresponding to the search behavior based on the multiple second recommended texts, thereby achieving the synergistic fusion of the user's static preferences and dynamic intentions, improving the relevance of the output text recommendation sequence, and ensuring user satisfaction.

[0069] For example, in order to ensure the personalization of the search text recommended to users while enhancing the responsiveness to users' search intent, the recommendation system can adopt a weighted fusion strategy when constructing a text recommendation sequence based on multiple second-recommended texts. The first-recommended text is given a higher stability weight (e.g., 0.6), while the second-recommended texts are given a lower timeliness weight (e.g., 0.4). Then, based on the assigned weights, the multiple first-recommended texts and multiple second-recommended texts are deduplicated and sorted according to coordinates such as text confidence, expected click score, and semantic redundancy of different recommended texts, forming a text recommendation sequence that combines users' static preferences and dynamic interests.

[0070] Alternatively, the recommendation system can employ a dynamic ranking model based on an attention mechanism. This model performs joint representation learning on multiple first-recommendation texts and multiple second-recommendation texts. It captures the semantic associations and interaction strengths between the first-recommendation texts and the second-recommendation texts through a self-attention module. Then, it combines the user's historical behavior sequence (such as clicks, dwell times, conversions, etc.) as contextual conditions to determine the priority scores of different recommendation texts. Finally, it constructs the above-mentioned text recommendation sequence based on the priority scores, arranged from high to low.

[0071] In this embodiment, in response to the detection of a search behavior, behavioral parameters of the search behavior and multiple first recommended texts are obtained; the behavioral parameters are input into a second recommendation model, which then performs text recommendation on the search behavior to obtain multiple second recommended texts; based on the multiple first recommended texts and multiple second recommended texts, a text recommendation sequence corresponding to the search behavior is constructed. By obtaining multiple first recommended texts recommended by the first recommendation model in near-line recall scenarios based on the user's entity information and historical behavior, the matching degree between the search text recommended to the user and the search behavior, as well as the diversity and personalization of the search text, can be guaranteed. Simultaneously, by utilizing the multiple second recommended texts recommended by the second recommendation model in real-time recall scenarios based on the behavioral parameters of the search behavior, the real-time nature of the search text recommended to the user and the matching degree between the search text and the user's search intent can be guaranteed. Therefore, constructing a text recommendation sequence for display to the user based on multiple first recommended texts and multiple second recommended texts can effectively improve the accuracy of the text recommendation sequence recommended to the user, thereby solving the technical problem of inaccurate search text recommended to the user based on the user's search behavior in related technologies.

[0072] In this embodiment of the application, the method further includes: extracting features from the entity information and the multiple historical behaviors contained in the historical behavior sequence to obtain entity features of the entity information and behavioral features of the multiple historical behaviors; generating text from the entity features to obtain entity description text of the target entity, and generating text from the behavioral features to obtain behavioral description text of the multiple historical behaviors; compressing the entity description text, behavioral description text, and recommendation prompt information to obtain entity compressed text, behavioral compressed text, and recommendation compressed text, wherein the recommendation prompt information is used to prompt the second recommendation model to make text recommendations; inputting the entity compressed text, behavioral compressed text, and recommendation compressed text into the first recommendation model, and using the first recommendation model to make text recommendations to obtain multiple first recommendation texts.

[0073] In one optional solution of this embodiment, considering that whether it is a near-line recall scenario or a real-time recall scenario, the process of recommending search text to users using a text recommendation model is actually a natural language text processing process. The model uses a unified modeling of entity information, discrete fields in behavioral parameters, and temporal behaviors in behavioral sequences as a coherent semantic expression to support the text recommendation model in end-to-end text generation and intent understanding.

[0074] Therefore, in order to improve the semantic understanding of user intent and candidate content by text recommendation models and enhance the relevance and interpretability of recommendation results, the recommendation system can first generate text from the data received by the text recommendation model during the process of recommending search text to users, and then make text recommendations based on the text generation results. This transforms low semantic density structured features into high semantic density natural language descriptions that conform to human language habits, enabling the text recommendation model to accurately understand users' interests and search intent.

[0075] Based on this, in the near-line recall scenario, when recommending multiple first recommendation texts to users using the first recommendation model, the recommendation system can first extract features from the input parameters of the first recommendation model, namely the aforementioned entity information and the multiple historical behaviors contained in the historical behavior sequence, to obtain entity features of the entity information and behavioral features of the multiple historical behaviors. Then, text generation is performed on the entity features and behavioral features to obtain the entity description text of the target entity and the behavioral description text of the multiple historical behaviors.

[0076] For example, when generating text, the recommendation system can call a pre-trained text generation model to convert the user's entity features and the behavioral features of the search behavior, such as search time, search action, and search object, into corresponding descriptive text. This transforms discrete feature vectors into text content with rich contextual semantics, thereby enhancing the text recommendation model's ability to semantically align user preferences with product attributes.

[0077] Furthermore, considering that the generated entity description text and behavior description text, although semantically rich, are usually quite long, and may contain a lot of redundant information due to the redundant superposition of multi-source heterogeneous features, if the first recommendation system is used to process these description texts directly, it may lead to excessive consumption of computing resources, increased model inference latency, drift of text recommendation results, or decreased accuracy due to reasons such as excessively long input sequences, semantic sparsity, and failure of attention mechanisms.

[0078] Therefore, in order to reduce the input dimension of the first recommendation model and improve its inference efficiency, after generating the entity description text and behavior description text mentioned above, the recommendation system can compress the entity description text and behavior description text respectively to obtain the corresponding entity compressed text and behavior compressed text. Then, the entity compressed text and behavior compressed text are input into the first recommendation model, which uses the first recommendation model to make text recommendations based on the user's search behavior, thereby improving the inference efficiency of the first recommendation model and avoiding the waste of computing resources and response delay caused by redundant information.

[0079] However, considering that the primary recommendation model may exhibit overly generalized behavior and deviate from the user's true interests when generating recommended texts due to overly broad entity or behavioral descriptions lacking clear task orientation or target intent, the recommendation system can construct recommendation prompts that match the user's interests and preferences based on the input parameters of the primary recommendation model. These prompts can then guide the model to focus on the user's explicit or implicit needs, thereby improving the accuracy of the multiple primary recommendation texts recommended to the user.

[0080] For example, the recommendation prompt could be something like, "Based on the user's recent behavior with electronic product A, please recommend three of the most relevant search phrases, which should be concise, accurate, and consistent with daily search habits," or "You are an e-commerce query recommendation expert. Based on the user profile and the user's historical behavior sequence, please recommend 10 queries that the user is likely to click next." Through these prompts, the first recommendation model can clearly define the current task as generating "search suggestions," rather than generating "product recommendations" or "advertising copy," thereby effectively constraining the output space, suppressing irrelevant generation, and enhancing task consistency and result interpretability.

[0081] Based on this, the recommendation system can compress the recommendation prompts simultaneously while compressing the entity description text and behavior description text, obtaining the corresponding compressed recommendation text. Then, the compressed recommendation text, along with the aforementioned compressed entity text and behavior text, is input into the first recommendation model. This allows the first recommendation model to clearly define the core objectives and constraints of the current recommendation task based on the compressed recommendation text, such as recommendation type, semantic boundaries, and output format. This enables the model to quickly generate semantically focused and intent-precise candidate search text based on the compressed entity text and behavior text, thereby improving the recommendation quality of the first recommendation model.

[0082] For example, the recommendation prompt "You are an e-commerce query recommendation expert. Based on user profile and user history behavior sequence, please recommend 10 queries that the user may click next" can be compressed into "Recommend 10 queries that the user may click next".

[0083] In this embodiment, the behavioral features include: the trigger time, behavior type, and behavior content of multiple historical behaviors; text generation is performed on the behavioral features to obtain behavioral description text for multiple historical behaviors, including: obtaining the time text corresponding to the trigger time and the type text corresponding to the behavior type based on text association; parsing the behavior content to obtain the input text and target object corresponding to the behavior content, wherein the input text is used to characterize the text entered by the target entity when triggering multiple historical behaviors, and the target object is used to characterize the object viewed by the target entity based on multiple historical behaviors; the object information of the target object is input into the text generation model, and the text generation model is used to generate text for the target object to obtain the object description text of the target object; and behavioral description text is constructed based on the time text, type text, input text, and object description text.

[0084] The trigger time mentioned above can refer to the time information when the user triggered the aforementioned historical behavior. For example, it could be the specific trigger time of the historical behavior, or the time length from the specific trigger time of the historical behavior to the current time. In order to improve the first recommendation model's ability to perceive time and the order of different historical behaviors, the time length from the specific trigger time of the historical behavior to the current time can be used as the trigger time mentioned above, such as "30 minutes ago", "2 days ago", or "1 week ago".

[0085] The aforementioned behavior types refer to the types of actions triggered by users during the process of searching for a target object, and can be divided into search type and click type. Search type refers to the behavior of a user actively entering keywords and submitting a query in the search box, such as entering semantically clear queries like "wireless Bluetooth headphones" or "English speaking class," which can reflect the user's active interests and information needs. Click type refers to the behavior of a user clicking on an object, such as a product, course, or video, on the search results page or recommendation list, which can reflect the user's interests and attention distribution. In comparison, historical search behavior more directly and explicitly expresses user interests and preferences, possessing stronger semantic directionality and interpretability, while click behavior has a stronger implicit ability to reveal user search intent and preferences.

[0086] The aforementioned behavioral content can refer to the specific interaction data associated with a user when triggering a certain historical behavior. This can include unique identifiers of target objects such as products or virtual courses that the user clicked to view when triggering the historical behavior, such as product IDs and course IDs, as well as contextual information related to the search behavior, such as search keywords and filter conditions.

[0087] The text generation model described above can be a reverse word model, which can be used to automatically convert structured object attributes into natural language descriptions, thereby achieving semantic mapping from data to semantics.

[0088] In one optional scheme of this embodiment, considering that features such as trigger time and behavior type have strong semantic structure and limited value space, they can be directly mapped and transformed through a preset vocabulary. However, information related to the target object in the behavior content, such as product ID and course ID, may not be directly understood by the text recommendation model due to the lack of natural language semantics.

[0089] Therefore, in order to accurately generate text from the behavioral features of historical behaviors, the recommendation system can, during the text generation process, first obtain the time text corresponding to the trigger time and the type text corresponding to the behavior type, according to the aforementioned text association relationships. For example, the recommendation system can construct a time-text mapping dictionary and accurately generate the time text corresponding to the trigger time based on the currently analyzed trigger time.

[0090] Simultaneously, the recommendation system can parse behavioral content to determine the corresponding input text and target object. This includes identifying the prefix text entered by the user in the search box when triggering historical behavior, and the objects such as products and virtual courses clicked to view based on the search behavior. Then, the recommendation system can input the target object's information into a text generation model to generate text for the target object, obtaining the corresponding object description text. Finally, based on the generated time text, type text, input text, and object description text, the aforementioned behavioral description text is constructed. For example, when generating text for a product using a text generation model, the recommendation system can obtain information such as the product's title, category, trending keywords, and CV (CV). Then, the text generation model summarizes this information and outputs descriptive text that highlights the product's selling points.

[0091] In this embodiment, the second recommendation model includes: an interest point summarization module and a text determination module; inputting behavioral parameters into the second recommendation model, and using the second recommendation model to perform text recommendation on the search behavior to obtain multiple second recommended texts, including: summarizing the interest points of the target entity based on the interest point summarization module and behavioral parameters to obtain the target interest points of the target entity; and determining multiple second recommended texts according to a preset association relationship based on the text determination module and the target interest points, wherein the preset association relationship is used to characterize the association relationship between the target interest points and the multiple second recommended texts.

[0092] In one optional embodiment, to accurately identify the user's search intent and ensure that the multiple second recommended texts highly match the user's search intent, thereby improving the relevance and conversion rate of the recommendations, the second recommendation model may include at least the aforementioned interest point summarization module and text determination module. Correspondingly, in the process of using the second recommendation model to recommend texts based on search behavior, the recommendation system can first use the interest point summarization module and behavioral parameters to summarize the user's current interests, thus obtaining the user's search intent, i.e., the aforementioned target interest points.

[0093] To make it easier to understand, for example, in the process of summarizing a user's target interests, the recommendation system can analyze the prefix text that the user is currently entering in the search box, such as "wireless Bluetooth", and analyze the prefix text, combined with popular text and product category tags, to determine that the user's target interests may be information such as wireless Bluetooth headphones or wireless Bluetooth gamepads.

[0094] After summarizing the target interest points, the text recommendation system can then use the text determination module and the target interest points to determine multiple recommended texts that match the target interest points based on the preset association relationship, that is, the association relationship between the interest points and different recommended texts, thus obtaining the aforementioned multiple second recommended texts.

[0095] Similar to the processing of the first recommendation model, in the process of using the second recommendation model for text recommendation, the recommendation system can first generate text from the behavioral parameters of the search behavior to obtain the corresponding parameter text, and then use the second recommendation model to make text recommendations based on the generated parameter text, resulting in the aforementioned multiple second recommendation texts. Furthermore, the input parameters of the second recommendation model can also include corresponding recommendation hints to improve the accuracy of the second recommendation model when making text recommendations.

[0096] According to another aspect of the embodiments of this application, in order to improve the accuracy of recommending search text to users using a text recommendation model, a training method for a text recommendation model is also provided. Figure 3 This is a flowchart illustrating a training method for a text recommendation model according to an embodiment of this application, such as... Figure 3 As shown, the method may include the following steps:

[0097] Step S302: Based on the text recommendation results corresponding to multiple recommendation requests within the first test time period, construct the first training data, and based on the sample behavior sequences corresponding to multiple recommendation requests, construct the second training data.

[0098] Among them, the text recommendation result is used to characterize the set of sample texts recommended to the test entity based on multiple recommendation requests, as well as the text interaction results of multiple sample texts contained in the sample text set, and the sample behavior sequence is used to characterize the behavior sequence generated by the test entity during the first test time period.

[0099] The aforementioned first training data may refer to the data used to train the first recommendation model. The aforementioned second training data may refer to the data used to train the second recommendation model. Similar to the target entity, the aforementioned test entity will also be described using the user as the test entity for ease of understanding.

[0100] In one optional embodiment, considering that the first recommendation model is deployed in a near-line recall scenario, the model recommends diverse and personalized first recommendation texts to users based on their interests and preferences. The first recommendation model usually relies on multi-dimensional features such as users' historical behavior, contextual semantics, and content tags to perform offline or near real-time text recall and ranking. The goal of the first recommendation model is to balance the accuracy, coverage, and diversity of recommendations and avoid excessive homogenization of recommendation results.

[0101] Therefore, to improve the accuracy of training the first recommendation model, the recommendation system can focus on the sample quality and feature representation capabilities of the constructed first training samples. Based on this, the recommendation system can utilize the text recommendation results corresponding to multiple recommendation requests within the first test period to construct corresponding first training data, thereby more accurately capturing user interests and contextual semantic relationships, and improving the model's generalization ability and ranking accuracy.

[0102] The first test period can be a timeframe set during the independent training of the first recommendation model to acquire training data. Considering that the first recommendation model can be updated periodically during application to adapt to the slow drift of user interests and the dynamic updates of the content library, the aforementioned first test period can also be a timeframe with rolling time windows and representativeness of the task cycle. For example, it could be the past 7 days, or an 11-day rolling window covering the weekend / weekday bi-peak traffic pattern. By setting the aforementioned first test period for training data construction, the use of outdated or unrepresentative training data can be avoided, preventing overfitting and concept drift problems in the first recommendation model, thereby improving the generalization ability of the first recommendation model in near-line recall scenarios.

[0103] Multiple recommendation requests triggered during the first test period can refer to text recommendation requests generated when a user triggers search behavior multiple times during the first test period. For example, this could include, but is not limited to, text recommendation requests generated by the recommendation system for search behaviors such as: a user entering and searching for "spring outfit recommendations" in the search box, a user clicking on the keyword "fitness tutorial," or a user opening and browsing the search for "pet supplies." The corresponding text recommendation results for these multiple recommendation requests can refer to the set of sample texts recommended to the user by the recommendation system for different recommendation requests, as well as the text interaction results between the user and the multiple sample texts contained in the sample text set. Different recommendation requests correspond to different text recommendation results. Each text recommendation result can include multiple search texts recommended to the user by the recommendation system for that recommendation request, and the user's click behavior on these multiple search texts. For example, after the user enters prefix text in the search box, whether they click on the recommended search text below the search box to search for products, or whether the user directly uses the prefix text as input to search for products after entering the prefix.

[0104] Furthermore, considering that the second recommendation model is deployed in a real-time recall scenario, and is a model that quickly recommends second-recommendation text to users based on their search intent, the second recommendation model typically relies heavily on dynamic signals such as the prefix text entered by the user in the current search box and the real-time click stream of different products, in order to complete the recall and coarse ranking of search text within milliseconds. If some discrete static signals, such as the first training data mentioned above, are simply used to train the second recommendation model, it may lead to reduced generalization of the second recommendation model because it ignores the temporal dependence and contextual sensitivity of the sample behavior generated by the user during the first test period. This makes it difficult to overcome the bottlenecks of "weak long-tail interest capture ability and real-time response lag," and inaccurate second-recommendation text may occur in scenarios such as cold start or sudden traffic surges.

[0105] Therefore, in order to improve the temporal modeling capability of training the second recommendation model and the accuracy of parsing user search intent, the recommendation system is triggered from the perspective of constructing full-domain samples. Based on the behavioral sequences generated by users during the first test period, that is, the sample behavioral sequences corresponding to the multiple recommendation requests mentioned above, the corresponding second training data is constructed. This fully restores the user's interest evolution path in the real usage process, providing the second recommendation model with positive and negative sample sequences with strong temporal consistency, and supporting its learning of the dynamic closed-loop relationship of "interest-behavior-feedback".

[0106] For example, the second training data mentioned above could be a complete sequence of user A's behaviors during the first test period: [search for "yoga" → click "yoga videos for beginners" → stay for 80 seconds → scroll down to browse "yoga mat recommendations" → click "anti-slip yoga mat A" → add to cart → search for "meditation music" → click "natural white noise" audio → do not click "meditation app recommendations"].

[0107] Step S304: Train the first initial model based on the first training data to obtain the first recommendation model.

[0108] In one optional embodiment, considering that in near-line recall scenarios, the first recommendation model focuses on the user's long-term interests and preferences to accurately model those preferences, the first recommendation model can adopt an end-to-end direct push architecture when recommending multiple first recommendation texts to the user. This architecture directly generates multiple unstructured first recommendation texts based on the user's entity information and historical behavior sequences, thereby improving the diversity and personalization of the multiple first recommendation texts recommended to the user.

[0109] Therefore, during the training of the first recommendation model, the recommendation system can directly train the first initial model based on the first training data to obtain the aforementioned first recommendation model, thereby improving the first recommendation model's ability to recommend searched texts based on users' interests and preferences.

[0110] Step S306: Based on the second training data, as well as the reasoning thought chain and reasoning results of the teacher model, the second initial model is trained to obtain the second recommendation model.

[0111] Among them, the reasoning chain and reasoning result are obtained by the teacher model processing the second training data, and the first recommendation model and the second recommendation model are used to execute any of the above methods.

[0112] In one optional embodiment, considering that the second recommendation model focuses on the accurate capture and dynamic evolution of the user's search intent in real-time retrieval scenarios, to ensure the accuracy of the multiple second recommendation texts recommended to the user, the second recommendation model typically needs to think like a human: why is the user's search intent interest A? Based on this thinking, it then selects appropriate second recommendation texts to recommend to the user, thereby improving the relevance, interpretability, and user satisfaction of the recommended second recommendation texts to the user's search intent. That is, in the process of text recommendation, the second recommendation model typically needs to adopt an explicit thought chain architecture, first summarizing the user's multiple target interests, and then generating corresponding recommendation texts for each interest point, thereby achieving multi-dimensional, precise, and causally driven recommendation decisions.

[0113] Therefore, in order to enhance the reasoning ability and interpretability of the recommendation results of the second recommendation model, the recommendation system can introduce supervision and guidance on the reasoning thought chain during the training process of the second recommendation model using the second training data, thereby enabling the second recommendation model to learn a recommendation reasoning path that conforms to human cognitive logic.

[0114] Based on this, the recommendation system can first use the teacher model to process the second training data to determine the reasoning thought chain and reasoning results of the teacher model. Then, using the second training data, combined with the reasoning thought chain and reasoning results of the teacher model, the second initial model is trained to obtain the aforementioned second recommendation model. This allows the second recommendation model to plan a structured, traceable, and high-precision reasoning thought chain without human rule intervention, and to output second recommendation text that is closer to the user's search intent based on the planned reasoning thought chain.

[0115] In this embodiment of the application, based on the text recommendation results corresponding to multiple recommendation requests within a first test time period, a first training data is constructed, including: constructing a first text tag list corresponding to multiple recommendation requests based on the sample text set and text interaction results corresponding to multiple recommendation requests, wherein the first text tag list corresponding to multiple recommendation requests is used to characterize the reference results output by the first recommendation model based on the multiple recommendation requests respectively; based on the text interaction results corresponding to multiple recommendation requests and the list length of the first text tag list corresponding to multiple recommendation requests, the text stored in the first text tag list corresponding to multiple recommendation requests is sampled respectively to obtain a first sampled tag list set corresponding to multiple recommendation requests, wherein the multiple recommendation requests correspond to The first sampled label list set contains multiple first sampled label lists, each containing target text corresponding to multiple recommendation requests. These target texts represent texts in the sample text set corresponding to multiple recommendation requests that interact with the test entity. Based on the test entity's interest points and sample behavior sequences, the multiple first sampled label lists contained in the first sampled label list set corresponding to multiple recommendation requests are rearranged to obtain a first rearranged label list set. Based on the first rearranged label list set, the entity information of the test entity, and the target behavior sequence of the test entity in the second test time period, the first training data is constructed, wherein the end time of the second test time period is the start time of the first test time period.

[0116] The aforementioned text label list can refer to a label list, which is the sequence of search texts output by the first recommendation model in a single forward inference. The order of the texts stored in the text label list can reflect the relative attractiveness, relevance, and diversity among different texts. Using the text label list format to construct training data can ensure that the trained recommendation model can conform to the output format of an end-to-end list generation recommendation architecture.

[0117] The aforementioned sample text set may include multiple sample texts, which may be search texts that staff actively configure in the recommendation request, or search texts that the first initial model automatically recommends in response to the recommendation request.

[0118] In one optional embodiment, considering the online deployment of generative models, if production models, such as the aforementioned first and second recommendation models, are integrated into the recommendation system as recall modules, a minimum recall requirement must typically be met to ensure downstream ranking and user experience. Therefore, the text recommendation model can generate a candidate search text list in a single forward inference, combined with a preset inference strategy, reducing online inference latency and computational overhead while meeting the recall requirement. This allows the trained text recommendation model to adjust the attractiveness, diversity, and relevance of the entire recommendation result within a single recommendation request, from the user's overall decision-making perspective.

[0119] Therefore, in the process of constructing the first training data, the recommendation system can construct a first text label list corresponding to multiple recommendation requests in the form of a label list, based on the sample text set and text interaction results corresponding to multiple recommendation requests. This first text label list reflects the reference results output by the first recommendation model based on the multiple recommendation requests.

[0120] Furthermore, considering that training the model using only the complete list of text labels may lead to the trained text search model overfitting to high-frequency samples and failing to effectively learn the generalization ability under candidate sets of different lengths.

[0121] Therefore, in order to improve the generalization ability of the first recommendation model, the recommendation system can also start from the perspective of sequence length adaptation and positive sample guided sampling. Based on the text interaction results corresponding to multiple recommendation requests and the list length of the first text tag list corresponding to multiple recommendation requests, the system samples the text stored in the first text tag list corresponding to multiple recommendation requests respectively, and obtains the set of the first sampled tag list corresponding to the above multiple recommendation requests.

[0122] Since user interactions with text in the text tag list storage (such as clicking, saving, and searching) are the most direct signals reflecting users' true interests and preferences, they should be used as key positive samples in training. Therefore, the first sample tag list set corresponding to multiple recommendation requests should contain the target text corresponding to each recommendation request, that is, the text in the sample text set corresponding to multiple recommendation requests that has interacted with the user, such as text clicked or directly searched by the user. By using the target text as positive samples in the sampling process, the first recommendation model can be forced to prioritize highly relevant content during the generation process, constraining the generation space to align with the real user's interests and preferences, thereby improving the accuracy of the first recommendation model in capturing user interests and preferences, as well as the interpretability of the first recommendation text recommended to the user.

[0123] To facilitate understanding, during the sampling process for any first text label list, assuming that the first text label list A corresponding to recommendation request A stores 10 texts, and the user interacts with the third text (text A), then to improve the generalization ability of the trained first recommendation model, the recommendation system can use text A as a base and perform sampling of lengths from 1 to 10 according to the length of the first text label list A. This ensures that the sampling results can comprehensively cover various recommendation granularities from a single highly relevant item to a complete candidate sequence. For example, in any sampling process with a length of 4, the recommendation system can first construct a sampling label list A based on text A, and then randomly sample 3 texts from the other texts stored in the first text label list A to fill the sampling label list A, thus obtaining the corresponding first sampling label list.

[0124] After sampling the text stored in the first text tag list corresponding to multiple recommendation requests, considering that different texts may contribute differently to the model training process, for example, high click-through rate texts, long dwell texts or multiple interaction texts usually have higher semantic relevance and user value, while low frequency or random candidates may have more noise, if the first sampled tag list set obtained by sampling is directly used to train the first recommendation model, it may cause the first recommendation model to overfit to the noise term, making it difficult to distinguish between high value and low value candidates, thus weakening the first recommendation model's ability to prioritize outputting recommendation texts with a high degree of matching with user interests and preferences in near-line recall scenarios.

[0125] Therefore, in order for the first recommendation model to perceive the importance of different first recommendation texts when recommending multiple first recommendation texts to users, and to prioritize the output of highly relevant and reliable first recommendation texts during inference, the recommendation system can rearrange the multiple first sampled label lists contained in the first sampled label list set corresponding to multiple recommendation requests, resulting in the aforementioned first rearranged label list set. To improve the accuracy of the rearrangement process, the recommendation system can be triggered by the interest points and sample behavior sequences of the test entity to evaluate the importance of multiple first sampled labels in any first sampled label list, obtain the corresponding evaluation results, and then use the evaluation results to rearrange the multiple first sampled labels to obtain a new first sampled label list.

[0126] Finally, the recommendation system can use the first rearranged label list obtained from the rearrangement as the basis to construct the first training data for the first recommendation model. To ensure the integrity of the first training data, similar to the input parameters of the first recommendation model, user entity information and the user's historical behavior sequence during the second test period can also be incorporated into the first training data. This includes the entity information of the test entity and the target behavior sequence of the test entity during the second test period. The second test period begins before the first test period; that is, the end time of the second test period is the start time of the first test period.

[0127] In this embodiment, a first text tag list corresponding to multiple recommendation requests is constructed based on a sample text set corresponding to multiple recommendation requests and text interaction results. This includes: determining target texts corresponding to multiple recommendation requests from the sample text set corresponding to multiple recommendation requests based on the text interaction results; inputting the sample texts from the sample text set corresponding to multiple recommendation requests into a text evaluation model, and evaluating the sample texts corresponding to multiple recommendation requests using the text evaluation model to obtain text evaluation results; filtering the sample text set corresponding to multiple recommendation requests based on the text evaluation results to obtain a filtered text set corresponding to multiple recommendation requests; and constructing the first text tag list corresponding to multiple recommendation requests based on the text evaluation results, the filtered text set corresponding to multiple recommendation requests, and the target texts corresponding to multiple recommendation requests.

[0128] The text evaluation model described above can be a fine-ranking model, which can be used to evaluate the degree of matching between different sample texts and users' interests and preferences when triggering corresponding recommendation requests.

[0129] In one optional embodiment, to improve the accuracy of the trained first recommendation model, during the construction of the first text tag list, the recommendation system can determine the target text corresponding to multiple recommendation requests—that is, the sample text that has interacted with the user—from the sample text set corresponding to multiple recommendation requests based on the text interaction results corresponding to multiple recommendation requests. Then, the recommendation system can use the aforementioned text evaluation model to evaluate the sample texts corresponding to multiple recommendation requests respectively, obtaining text evaluation results for different sample texts. The text evaluation results are then used to filter the sample text set corresponding to multiple recommendation requests, obtaining a filtered text set corresponding to multiple recommendation requests. For example, the top 10 sample texts with the highest matching degree are selected to construct the corresponding filtered text set.

[0130] Finally, based on the text evaluation results, the set of filtered texts corresponding to multiple recommendation requests, and the target texts corresponding to multiple recommendation requests, the recommendation system can construct a first text label list corresponding to multiple recommendation requests. This provides high-quality, fine-grained supervision signals for the subsequent training of the first recommendation model, effectively improving the model's ability to model the relationship between user interests and text content matching, and enhancing the accuracy and relevance of the recommendation results.

[0131] In this embodiment, based on the interest points and sample behavior sequences of the test entity, the multiple first sampled label lists contained in the first sampled label list set corresponding to multiple recommendation requests are rearranged to obtain a first rearranged label list set. This includes: matching the interest points of the test entity with any first sampled label in the first sampled label list to obtain a label matching result, wherein the label matching result is used to characterize the semantic consistency between the interest points of the test entity and the first sampled label; determining the label level of the first sampled label based on the sample behavior sequence, wherein the label level is used to characterize the freshness of the first sampled label; and rearranging the multiple first sampled label lists contained in the first sampled label list set corresponding to multiple recommendation requests based on the label matching result and label level corresponding to the first sampled label to obtain a first rearranged label list set.

[0132] In one optional embodiment, to ensure the accuracy of rearranging the text in multiple first sampling lists, during the rearrangement process, the recommendation system can first match the user's interests with any first sampling tag in the first sampling tag list to obtain the aforementioned tag matching result. This tag matching result reflects the semantic consistency between the user's interests and the first sampling tag. Simultaneously, the recommendation system can determine the recommendation time of the sample text corresponding to the first sampling tag based on the sample behavior sequence, thereby determining the tag level of the first sampling tag through the recommendation time, and reflecting the freshness of the first sampling tag through the tag level. Finally, the recommendation system can rearrange the multiple first sampling tag lists contained in the set of first sampling tag lists corresponding to multiple recommendation requests based on the tag matching result and tag level corresponding to the first sampling tag, obtaining a first rearranged tag list set.

[0133] For example, a recommendation system can use a weighted fusion of the tag matching results and tag levels corresponding to the first sampled tag to determine the importance of the first sampled tag. Alternatively, it can score the tag matching results and tag levels separately, then select the higher score to determine the importance of the first sampled tag. After determining the importance of multiple first sampled tags in the first sampled tag list, the recommendation system can sort these multiple first sampled tags according to their importance to obtain a new list of first sampled tags.

[0134] In this embodiment, a second training data is constructed based on sample behavior sequences corresponding to multiple recommendation requests, including: constructing a second text label list based on the sample behaviors contained in the sample behavior sequences, wherein the second text label list is used to store the association between the interest points of the test entity and the target texts corresponding to multiple recommendation requests; performing bucket sampling on the associations stored in the second text label list based on the sequence length of the sample behavior sequences to obtain a second sampled label list set; rearranging the multiple second sampled label lists contained in the second sampled label list set based on the recommendation priority of the target texts corresponding to multiple recommendation requests to obtain a second rearranged label list set; and constructing the second training data based on the second rearranged label list set and the sample behavior sequences.

[0135] In an optional embodiment, as described above, to improve the generalization ability of the trained second recommendation model, the recommendation system can also construct second training data in the form of a label list. However, unlike the first training data, since the second recommendation model is deployed in a real-time recall scenario and has high requirements for recall speed, the constructed second text label list can store the association between the user's interests and the target text corresponding to multiple recommendation requests.

[0136] Based on this, the recommendation system can analyze the sample behaviors contained in the user's sample behavior sequence to determine the user's interest points when interacting with different target objects, thereby constructing the aforementioned second text tag list.

[0137] After constructing the second text tag list, similar to the process of constructing the first training data, the recommender system can also sample and rearrange the associations stored in the second text tag list to improve the accuracy of the trained second recommender model in recognizing the user's search intent. Specifically, the recommender system can rearrange the second text tag list based on two aspects: relevance score and efficiency score. The relevance score is determined based on the frequency of different text occurrences, while the efficiency score refers to the deviation value generated during the calculation of the relevance score.

[0138] Based on this, and considering that user sample behavior sequences are key contextual features, the sequence length of these sequences directly affects the amount of data in the input parameters and the ability of the trained second recommendation model to model users' long-term and short-term interests. Therefore, to avoid the trained second recommendation model being biased towards behavior sequences of a specific length, the recommendation system can use bucket sampling to sample the association relationships stored in the second text label list based on the sequence length of the sample behavior sequence, obtaining a corresponding set of second sampled label lists. This balances the contributions of behavior sequences of different lengths during the training process, improves the generalization ability of the trained second recommendation model to long-tail sequences and diverse user interests, and enhances the stability and robustness of multiple second recommendation texts recommended to users.

[0139] After obtaining the second sampled label list set, in order to improve the efficiency of constructing the second training data, the recommendation system can directly rearrange the multiple second sampled label lists contained in the second sampled label list set according to the recommendation priority of the target text corresponding to multiple recommendation requests, and obtain the corresponding second rearranged label list set.

[0140] Finally, based on the second rearranged label list and the user's sample behavior sequence, the recommendation system can construct the corresponding second training data.

[0141] In this embodiment, constructing a second text tag list based on the sample behaviors contained in the sample behavior sequence includes: obtaining multiple sample objects corresponding to the sample behavior sequence, wherein the multiple sample objects are used to represent objects that the test entity interacts with based on the sample behaviors; constructing multiple points of interest for the test entity and object text of the multiple sample objects based on the object features of the multiple sample objects; clustering the target text corresponding to multiple recommendation requests based on the sample behavior sequence and the multiple points of interest to construct an initial text tag list, wherein the initial text tag list is used to represent the association between the multiple points of interest and the target text corresponding to the multiple recommendation requests; and expanding the initial text tag list based on the object text of the multiple sample objects to obtain a second text tag list.

[0142] In one alternative embodiment, in order to improve the accuracy of the constructed second text tag list, the recommendation system can focus on collecting multi-interest samples across the entire domain to construct the corresponding second text tag list.

[0143] Specifically, the recommender system can first obtain multiple sample objects corresponding to the sample behavior sequence, that is, the objects that the user interacts with based on the sample behaviors in the sample behavior sequence. By analyzing the object features of these multiple sample objects, the recommender system can construct multiple points of interest for the user in the first test period, and at the same time construct the object text of these multiple sample objects.

[0144] Then, the recommendation system can cluster the target texts corresponding to multiple recommendation requests based on the sample behavior sequence and multiple points of interest, and construct an initial text label list to store the association between the target texts corresponding to multiple recommendation requests and multiple points of interest.

[0145] Considering that the target text corresponding to multiple recommendation requests may not be sufficient to fully summarize the object features of the sample objects, resulting in a relatively scarce number of associations stored in the initial text label list, the recommendation system can also use the object text of multiple sample objects to expand the initial text label list. That is, the object text is matched with the interest points matched by the sample object to add new associations to the initial text label list, thus obtaining the second text label list mentioned above.

[0146] For ease of understanding, Figure 4 This is a schematic diagram illustrating a second text label list construction process according to an embodiment of this application. For example... Figure 4 As shown, in the process of constructing the second text tag list, the recommendation system can first construct a global session based on the user's domain trajectory, that is, taking the user's click on the recommended text on the homepage of the interactive interface or entry into the activation page as the starting point of the session, for example... Figure 4T1 and T2 in the code take the user's last exit from the interactive interface on that day as the session termination point, for example... Figure 4 T3 in the context of a global session. Within a global session, it can include sequences of sample behaviors, such as... Figure 4 The user mentioned clicked on recommended text q1 on the homepage of the interactive interface, such as "men's trendy running shoes," clicked on the sorted recommended text q2 below the search box, such as "new running shoes," clicked on recommended text q3 through the drop-down interactive interface, such as "breathable men's shoes," and entered and searched for text q4 in the search box, such as "men's summer pants." Through these actions, the user viewed multiple sample objects, including shoes 1, shoes 2, shoes 3, pants 4, pants 5, and hat 6.

[0147] After constructing a global session, the recommendation system can categorize multiple sample objects based on their object features to obtain multiple points of interest. For example, for shoes 1, 2, and 3, the user's point of interest 1 can be determined to be men's summer shoes; for pants 4 and 5, the user's point of interest 2 can be determined to be men's pants; and for hat 6, the user's point of interest can be determined to be men's sun hats.

[0148] Next, the recommendation system can cluster the target text based on the relationship between the target text clicked by the user in the sample behavior sequence and multiple sample objects. This allows for the initial determination of the association between multiple user interests and the target text corresponding to multiple recommendation requests, thus constructing a corresponding initial text label list. For example, based on interest point 1, recommended texts q1, q2, and q3 can be grouped into one category, and based on interest point 2, search text q4 can be grouped into another category.

[0149] After obtaining the initial list of text labels, the recommendation system can further expand the target text corresponding to different points of interest using a natural language model based on the object characteristics of the sample objects, thus obtaining a second list of text labels with richer associations. For example, for point of interest 1, additional target texts such as men's cotton and linen shoes can be added; for point of interest 2, additional target texts such as work shorts, thin casual pants, and men's ice silk pants can be added; and for point of interest 3, additional target texts such as breathable sun-protective visor hats, ice silk sun-protective hats, men's sun-shading fisherman hats, and outdoor fishing hats can be added.

[0150] In this embodiment of the application, the method further includes: obtaining the text type of the target text corresponding to multiple recommendation requests; and determining the recommendation priority of the target text corresponding to multiple recommendation requests based on the text type.

[0151] In one optional solution of this embodiment, considering that different text types (such as news information, product descriptions, user comments, announcements, etc.) have significant differences in user attention, timeliness requirements, and task value, if all recommendation requests are sorted and pushed in the same way, high-value or high-timeliness content may be overwhelmed by low-priority content, thereby reducing the overall effect of the recommendation system and the user experience.

[0152] Therefore, the recommendation system can first obtain the text type of the target text corresponding to multiple recommendation requests, and then determine the recommendation priority of the target text corresponding to multiple recommendation requests based on the text type.

[0153] In this embodiment, determining the recommendation priority of target texts corresponding to multiple recommendation requests based on text type includes: determining the recommendation priority of target texts corresponding to multiple recommendation requests as a first priority in response to the text type indicating that the target texts corresponding to multiple recommendation requests are texts clicked by the test entity in the first line; determining the recommendation priority of target texts corresponding to multiple recommendation requests as a second priority in response to the text type indicating that the target texts corresponding to multiple recommendation requests are texts clicked by the test entity in the second line, wherein the complexity of the triggering process of the second line is greater than the complexity of the triggering process of the first line; determining the recommendation priority of target texts corresponding to multiple recommendation requests as a third priority in response to the text type indicating that the target texts corresponding to multiple recommendation requests belong to a filter text set; and determining the recommendation priority of target texts corresponding to multiple recommendation requests as a fourth priority in response to the text type indicating that the target texts corresponding to multiple recommendation requests belong to object text, wherein the first priority is greater than the second priority, the second priority is greater than the third priority, and the third priority is greater than the fourth priority.

[0154] In one optional embodiment, if the text type displays target text corresponding to multiple recommendation requests, and the target text is the text that the user clicked on the first line, that is, the recommended text that the user clicked directly on the homepage of the interactive interface, then the recommendation priority of the target text can be determined as the first priority.

[0155] If the text type displays target text corresponding to multiple recommendation requests, and this text is the text clicked by the user in the second line (e.g., text clicked by the user through a drop-down interface), then the recommendation priority of this target text can be determined to be the second priority. The triggering process for the second line is more complex than the triggering process for the first line.

[0156] If the text type displays the target text corresponding to multiple recommendation requests, and it is a text in the filtered text set, then the recommendation priority of the target text can be determined as the third priority.

[0157] If the text type displays target text corresponding to multiple recommendation requests, and the target text is generated based on the object characteristics of the sample object, then the recommendation priority of the target text can be determined as the fourth priority.

[0158] Among them, the first priority is greater than the second priority, the second priority is greater than the third priority, and the third priority is greater than the fourth priority.

[0159] Figure 5 This is a schematic diagram illustrating a recommended priority according to an embodiment of this application, such as... Figure 5 As shown, taking the recommended texts q1, q2, and q3 clustered by the aforementioned recommendation system for interest point 1 (men's summer shoes), and qllm "men's cotton and linen shoes" expanded by the natural language model as an example, the recommendation priority of these four texts can be q1: men's running trendy shoes, q3: breathable men's shoes, q2: new running shoes, and qllm: men's cotton and linen shoes.

[0160] In this embodiment of the application, training a first initial model based on first training data to obtain a first recommendation model includes: training a first initial model based on first training data to obtain a first training model; and updating the model parameters of the first training model based on a first reward function to obtain a first recommendation model.

[0161] In one optional embodiment, considering that traditional recommendation models are trained solely on supervised signals (such as clicks, favorites, ratings, etc.), it is difficult to fully capture users' multidimensional preferences and long-term satisfaction with recommended content, and they are prone to getting stuck in local optima or producing short-sighted recommendations. Therefore, during the training of the text recommendation model, a reward function can be introduced to update the trained recommendation model, thereby guiding the first recommendation model to generate first recommended text that better matches users' true preferences and has greater long-term value, thus improving the diversity, relevance, and user stickiness of the first recommended text.

[0162] Based on this, during the process of training the first initial model using the first training data, the recommendation system can first train the first initial model using the first training data to obtain the corresponding first training model, and then use the first reward function to update the model parameters of the first training model to obtain the aforementioned first recommendation model.

[0163] In this embodiment of the application, the method further includes: inputting sample training data into a first training model to obtain a first text recommendation result output by the first training model; and constructing a first reward function based on the first text recommendation result and the text evaluation model.

[0164] In one optional embodiment, to construct a reasonable first reward function, the recommendation system can first input sample training data into a first training model to obtain the first text recommendation result output by the first training model, and then construct the first reward function based on the first text recommendation result. However, considering that relying solely on language fluency or semantic relevance during text recommendation may not be sufficient to guarantee the recommendation effect of the first recommended texts recommended by the first recommendation model to the user in relation to the user's interests and preferences—for example, it may only recommend some first recommended texts that match the user's interests and preferences, but cannot guarantee the user's level of interest in the first recommended texts—the recommendation system can introduce the aforementioned text evaluation model. Based on the click-through rate of the recommended texts and combined with the aforementioned first text recommendation result, the text evaluation model can construct the aforementioned first reward function, thereby ensuring that the multiple first recommended texts recommended by the first recommendation model to the user are aligned with the user's actual interests and preferences.

[0165] In this embodiment of the application, a first reward function is constructed based on a first text recommendation result and a text evaluation model, including: performing quality detection on multiple texts contained in the first text recommendation result to obtain multiple quality detection results; inputting the multiple texts contained in the first text recommendation result into the text evaluation model, and using the text evaluation model to evaluate the multiple texts contained in the first text recommendation result to obtain multiple first evaluation results; constructing a quality reward function for a first training model based on the multiple quality detection results, and constructing a model reward function for the first training model based on the multiple first evaluation results; and constructing a first reward function based on the quality reward function and the model reward function.

[0166] In one optional embodiment, in order to construct an accurate first reward function, the recommendation system can first perform quality checks on the multiple texts contained in the first text recommendation result to obtain multiple quality check results, and then input the multiple texts contained in the first text recommendation result into the text evaluation model to evaluate the multiple texts contained in the first text recommendation result to obtain multiple first evaluation results.

[0167] Based on multiple quality detection results and multiple first evaluation results, the recommendation system can construct a quality reward function and a model reward function for the first training model. Finally, by fusing the quality reward function and the model reward function, the aforementioned first reward function can be obtained.

[0168] In order to comprehensively evaluate the multiple texts included in the first text recommendation result, the recommendation system can perform text quality detection from multiple aspects such as compliance, text length, Rouge-L F1 score (an indicator for evaluating the similarity between automatically generated text and reference text), and repetition penalty.

[0169] Specifically, to ensure that the generated results meet predefined structured format requirements (such as punctuation usage or field integrity), compliance rewards for text formatting can be introduced.

[0170] To avoid generating invalid recommendation texts that are too long or too short, a length-adaptation reward can be introduced. The first training model is only given a positive incentive when the length of the generated recommendation text falls within a preset effective range.

[0171] To enable the first trained model to express ground-truth queries, a Rouge-LF1 score that integrates multiple word segmentation strategies can be used as the main reward signal. This not only preserves key word order information in the reference recommendation text but also provides reasonable gradient feedback when the model makes correct inferences. Specifically, given a list of generated recommendation texts and a set of reference recommendation texts, the recommendation system can first calculate the Rouge-LF1 score between each pair of generated and reference recommendation texts based on different word segmentation granularities. Then, it solves the one-to-one correspondence between the two pairs through bipartite graph matching and takes the average matching score as the final semantic accuracy reward.

[0172] Furthermore, since large language models like the first recommendation model tend to "sneak" in by repeating phrases to improve their Rouge-L F1 scores, thus weakening the readability and diversity of the generated content, a repetition penalty can be imposed at two levels: (i) lexical repetition within the recommendation text: quantified by n-gram repetition rate; (ii) semantic redundancy between different recommendation texts within the same generation batch: if any two generated recommendation texts are identical at the text level, a fixed negative reward is applied to the repetitive pair. This design aims to explicitly penalize the model's behavior of repeatedly outputting the same content due to a lack of diversity, thereby encouraging it to generate more differentiated and information-rich candidate recommendation texts while meeting the task objectives. This penalty term complements the n-gram repetition penalty within the recommendation text, together forming a multi-layered repetition suppression strategy, effectively mitigating the bias problem caused by a single reward signal.

[0173] In addition, the input parameters of the above text evaluation model may include, but are not limited to: 1. Query features: the query term itself, its category, historical exposure, historical click-through rate, etc.; 2. User entity information; 3. Contextual features: current session behavior sequence, time window, entry scenario; 4. Cross features: user-query historical interaction (such as whether similar words have been searched / clicked), and the matching degree between the query and the user profile. This model, trained on large-scale click logs, can accurately predict the probability of a given user clicking a query in a specific context.

[0174] To avoid excessively sparse or noisy reward signals, the original CTR prediction can be linearly scaled and truncated. Since CTR values ​​are typically small, using them directly would result in a reward close to zero and a weak gradient signal. Therefore, a scaling factor can be used to amplify the differences and improve training stability. Simultaneously, to prevent a very small number of high-scoring samples from dominating the reward signal and to maintain numerical stability, an upper bound can be set for truncation.

[0175] In this embodiment of the application, a second initial model is trained based on the second training data and the reasoning thought chain and reasoning results of the teacher model to obtain a second recommendation model. This includes: inputting the second training data into the teacher model and using the teacher model to construct the reasoning thought chain and reasoning results of the second training data; training the second initial model based on the second training data, the reasoning thought chain, and the reasoning results to obtain a second training model; and updating the model parameters of the second training model based on the second reward function to obtain a second recommendation model.

[0176] In one optional embodiment, similar to the training process of the first recommendation model, when training the second initial model, the recommendation system can first input the second training data into the teacher model, use the teacher model to construct the reasoning chain and reasoning result of the second training data, and then train the second initial model according to the second training data, the reasoning chain and reasoning result to obtain the second training model. Finally, the model parameters of the second training model are updated according to the second reward function to obtain the second recommendation model.

[0177] In this embodiment of the application, the above method further includes: inputting sample training data into a second training model, obtaining the interest point summarization result obtained by the second training model from the interest point summarization of the sample training data; and constructing a second reward function based on the interest point summarization result and the first reward function.

[0178] In one optional embodiment, to more comprehensively evaluate the structured accuracy of the results generated by the second recommendation model, the recommendation system can further introduce explicit supervision of the multi-interest point generation quality based on the first reward function. Based on this, the recommendation system can input sample training data into the second training model, obtain the interest point summarization results obtained by the second training model from the sample training data, and then construct the second reward function based on the interest point summarization results and the first reward function.

[0179] In this embodiment of the application, constructing a second reward function based on the interest point induction result and the first reward function includes: matching the interest point induction result with the reference interest points corresponding to the sample training data to obtain the interest point matching result; and constructing the second reward function based on the interest point matching result and the first reward function.

[0180] In one optional embodiment, the recommendation system can match the interest point summarization results with the reference interest points corresponding to the sample training data to obtain the interest point matching results, and then construct a second reward function based on the interest point matching results and the first reward function.

[0181] The interest point matching results can be used to supervise the generation quality of the second training model. Specifically, the output of the second training model can be organized into several structured entries in the form of "behavior number list → query list", for example: 1|2|3->cargo shorts, thin casual pants, men's ice silk pants; 4|5|6|7->game console, game console A, game console B.

[0182] Each item corresponds to an independently summarized interest point and its associated query set. To separately measure the quality of interest point summarization and query recommendation, the recommendation system can decouple the reward calculation: the query part uses the aforementioned composite reward function based on CTR model scoring, Rouge-L semantic matching, repetition penalty, format compliance, and length reasonableness; while the interest point part calculates the alignment degree between each item and the reference interest point independently. Let the total number of interest point items generated by the model be , the interest point string generated by the i-th item be (e.g., "1|2|3"), and the corresponding reference interest point be . Correspondingly, the recommendation system can treat each as a token sequence separated by "|", and use Rouge-L to capture the longest common subsequence to balance order sensitivity and partial matching robustness. Finally, the overall reward for the interest point is the average score of all valid items: this design ensures that the model not only generates semantically reasonable queries, but also accurately clusters user behavior and constructs correctly structured interest-triggered behaviors. By explicitly incorporating the interest point summarization error into the reinforcement signal, the recommendation bias caused by ambiguous behavior attribution or fragmented interests is effectively mitigated. The remaining reward components (including Rouge-L, CTR-model rewards, duplication penalties, format and length constraints, etc.) remain consistent with the original mechanism, together forming a multi-granular, structure-aware joint reward system.

[0183] Figure 6 This is a schematic diagram illustrating the deployment process of a text recommendation model according to an embodiment of this application, such as... Figure 6 As shown, the entire deployment process can be divided into three parts: model design, model training, and model deployment.

[0184] In the model design section, the recommender system can consider understanding user characteristics and designing text recommendation models, including how to select high-confidence features, how to understand and express products, and how to organize and compress Prompt information.

[0185] In the model training phase, the recommendation system can divide the training process of the text recommendation model into two stages: SFT (Supervised Fine-Tuning) and RL (Reinforcement Learning from Human Feedback). In the SFT stage, the system can utilize a first and a second recommendation model to model the accuracy and diversity objectives of the recommended text, respectively, and train the SFT based on a tag list generation paradigm that is perceptive to interest intensity. In the RL stage, the system can design a multi-objective reward mechanism and a GRPO (Generalized Reward Policy Optimization) reinforcement learning training method for various recommendation requests. Unlike traditional sequence-level reward mechanisms, this method refines the reward signal to each generated query, combining Rouge-L semantic matching, CTR model click-through rate prediction, and repetition penalties to construct a fine-grained evaluation system. This effectively alleviates the problems of reward sparsity and pattern collapse, ultimately making the generated queries more semantically accurate, more aligned with user interests, and more diverse, adapting to high-quality query recommendations in complex scenarios such as background textures.

[0186] Regarding the GRPO reinforcement learning training method, in traditional reinforcement learning-based generative adjustment methods, the reward function is usually designed to evaluate the entire rollout sequence, i.e., taking the entire generated sequence as input and outputting a global scalar reward value. While this sequence-level reward mechanism can effectively capture the overall quality of the generated results, it has significant limitations in multi-candidate query generation tasks: since the ultimate goal is to generate a high-quality, diverse set of candidate queries with high click-through potential, the overall score of a single rollout cannot accurately reflect the independent contribution and relative merits of each query within the set. Especially when multiple queries are semantically similar or repetitive, relying solely on sequence-level rewards prevents the model from distinguishing subtle differences between individual queries, thus weakening the granularity and effectiveness of policy adjustment. To address these issues, we propose a query-level reward modeling framework that introduces fine-grained reward signals on top of the GRPO algorithm, enabling independent adjustment of each query in the candidate query set.

[0187] Specifically, the recommendation system can move beyond applying rewards only to the entire rollout sequence. Instead, it can start from the query dimension, calculating the reward value for each query at the same position in the sequence individually. Based on this, a hybrid advantage function is constructed by combining the overall sequence reward, driving the policy network to pay more attention to the quality performance of individual queries during the generation process. During GRPO training, the second training model can generate multiple rollouts, each containing candidate queries. We introduce a Query Level Reward module to independently evaluate each query from multiple perspectives. Rewards are calculated separately at the query level and then aggregated for each query. These are subsequently used to construct the query-level advantage function. Unlike traditional GRPO's advantage estimation based on the overall sequence reward, we calculate the advantage function for queries at the same position.

[0188] The response is divided into subsequences (queries) based on punctuation marks, where each subsequence represents the start and end positions of a query. A fine-grained reward is then assigned to each query and broadcast to all tokens corresponding to that query. When calculating the advantage function, the advantage function for the query at position i can be obtained by subtracting the benchmark value and dividing by the variance. This design allows the policy network to explicitly perceive the relative merits of different queries at the same position during training, thereby enhancing its tendency to generate high-quality queries.

[0189] In terms of model deployment, the recommendation system can comprehensively consider personalized expression capabilities and online deployment costs, and use the first recommendation model and the second recommendation model in online u2q and offline x2q recall scenarios, respectively.

[0190] The model design and training sections can refer to the aforementioned content. Regarding model deployment, considering that recommended text often serves as a search entry point on the homepage of some e-commerce platforms, carrying a huge amount of traffic, the scoring capacity of the fine-ranking model in an online system has an upper limit (hundreds of points) under conditions of low latency requirements and machine resource constraints. Therefore, in order to improve the coverage of user interests on the recall side, the recommendation system can asynchronously call the near-line recall scenario in the real-time recall scenario, using the near-line scenario results as a single recall path for consumption in the real-time scenario.

[0191] Therefore, under the 150ms response time (RT) requirement, relying solely on the real-time deployment of the first recommendation model may not be able to effectively and promptly recommend search text to users. Fortunately, the existence of near-line scenarios theoretically allows for the deployment of any complex model architecture. Therefore, the first recommendation model can be deployed in near-line recall scenarios, triggered under specific conditions, and its current inference results can be used as a lead for the user's next visit. To compensate for the potential loss of real-time trigger information in near-line recall scenarios, the aforementioned second recommendation model can be deployed in real-time recall scenarios, leveraging both models to achieve efficient and accurate search text retrieval.

[0192] Based on the above deployment of the text recommendation model, Figure 7 This is a schematic diagram illustrating a text recommendation process based on an embodiment of this application. For example... Figure 7 As shown, when a user triggers a search through the client, the recommendation system can first analyze the search behavior using the behavior parsing module in a real-time recall scenario to obtain the corresponding behavior parameters. Simultaneously, it asynchronously invokes multiple first-recommendation texts generated by the first recommendation model in the near-line recall scenario. During the invocation of these multiple first-recommendation texts, the recommendation system can analyze the behavior parameters of the search behavior using a second recommendation model to generate multiple second-recommendation texts. Then, based on the multiple second-recommendation texts retrieved in real-time and the multiple first-recommendation texts obtained through asynchronous invocation, the recommendation system can construct a corresponding text recommendation sequence using a preset ranking strategy and display it to the user through the client.

[0193] Specifically, for the near-line recall scenario where the first recommendation model is located, it can include two parts: cache construction and platform online services.

[0194] Cache construction: Create a new CacheiGraph (cache) table to record the time of the last call to the first recommendation model and the inference result of the first recommendation model at the user granularity. In order to meet the recall requirements, the inference results are constructed into a first-in-first-out queue of length .

[0195] Platform Online Service: The trained non-thought chain first recommendation model is deployed on the target platform. The online service receives the Prompt assembled from near-line scenarios, executes online BeamSearch inference, and outputs a candidate query list. Currently, the online platform service has an average input token count of approximately 400 and an output token count of approximately 60. With nBeam set to 2 (meaning 2 parallel inferences), the end-to-end average response time is approximately 5 seconds under a QPS (Queries Per Second) of 500. Triggering Call Logic: Considering QPS pressure, specific triggering conditions are set based on prior knowledge and field knowledge. Specifically, within the time window since the last call, if [3 product clicks occur | 1 search occurs | the leaf category of the currently clicked product is different from the most recently clicked product], a call is triggered.

[0196] For the real-time recall scenario where the second recommendation model operates, since the real-time and near-line scenarios are asynchronously called, and the first recommendation model's call depends on specific triggering conditions, when a user requests background information, the near-line recall results of the first recommendation model may not necessarily cover all recent real-time interests. Therefore, the recommendation system can construct an offline x2q table based on the output of the second recommendation model—Trigger number list -> Query list—as a real-time recall channel to compensate for the real-time trigger information lost online.

[0197] Furthermore, to construct the final x2q table, model inference needs to be performed to obtain a large number of output results, as well as the preparation of input data and the processing of output data. Therefore, the entire process can be constructed as an offline daily push pipeline, packaged into nodes of a preset format, and scheduled daily for Device-to-Device operation to record prompt data points, schedule inference daily, process the results to construct the x2q table, and provide results for online consumption.

[0198] According to another aspect of the embodiments of this application, this application also provides another method for recommending search text. Figure 8 This is a flowchart illustrating another method for recommending search text according to embodiments of this application, such as... Figure 8 As shown, the method includes the following steps:

[0199] In step S802, in response to the input command applied to the operation interface, the behavior parameters of the search behavior and multiple first recommended texts are displayed on the operation interface.

[0200] The input command is triggered by the search behavior, and multiple first recommended texts are obtained by the first recommendation model based on the entity information corresponding to the search behavior and the historical behavior sequence. The entity information is used to represent the information of the entity that triggered the search behavior.

[0201] Step S804: In response to the processing instructions applied to the operation interface, display the text recommendation sequence on the operation interface.

[0202] The text recommendation sequence is constructed from multiple first recommendation texts and multiple second recommendation texts. The multiple second recommendation texts are obtained by the second recommendation model based on the behavioral parameters to recommend texts to the search behavior. The response speed of the second recommendation model is greater than that of the first recommendation model.

[0203] In one optional embodiment, upon receiving an input command applied to the user interface, the recommendation system can first obtain the behavioral parameters of the user's current search behavior, as well as multiple first recommended texts recommended to the user by the first recommendation model based on the user's entity information and historical behavior sequences. The behavioral parameters and multiple first recommended texts are then displayed on the user interface for easy viewing. The input command can be triggered by the user through a search behavior.

[0204] Upon receiving a processing instruction applied to the user interface, the recommendation system can first utilize a second recommendation model to recommend multiple second-recommendation texts to the user based on the user's entity information and historical behavior sequence. Then, based on the multiple first-recommendation texts and multiple second-recommendation texts, it can construct a text recommendation sequence and display the text recommendation sequence on the user interface for easy viewing.

[0205] For the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions. This is because, according to this application, certain steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0206] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms, or by hardware. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0207] According to an embodiment of this application, a search text recommendation apparatus for implementing the above-described search text recommendation method is also provided. Figure 9 This is a structural block diagram of a text recommendation device according to an embodiment of this application, such as... Figure 9 As shown, the device includes: a first acquisition module 902, a text recommendation module 904, and a sequence construction module 906.

[0208] The first acquisition module 902 is used to acquire the behavior parameters of the search behavior and multiple first recommended texts in response to the detection of search behavior. The multiple first recommended texts are obtained by the first recommendation model based on the entity information corresponding to the search behavior and the historical behavior sequence. The entity information is used to represent the information of the target entity that triggered the search behavior. The text recommendation module 904 is used to input the behavior parameters into the second recommendation model and use the second recommendation model to perform text recommendation on the search behavior to obtain multiple second recommended texts. The response speed of the second recommendation model is greater than that of the first recommendation model. The sequence construction module 906 is used to construct the text recommendation sequence corresponding to the search behavior based on the multiple first recommended texts and the multiple second recommended texts.

[0209] The first acquisition module 902, text recommendation module 904, and sequence construction module 906 described above correspond to steps S202 to S206 in the above embodiments. The three modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. The modules or units described above may be hardware or software components stored in memory and processed by one or more processors. The modules may also be part of a device and may run in the server 10 provided in the above embodiments.

[0210] In this embodiment, the apparatus further includes: a feature extraction module, used to extract features from entity information and multiple historical behaviors contained in historical behavior sequences, respectively, to obtain entity features of entity information and behavioral features of multiple historical behaviors; a text generation module, used to generate text from entity features to obtain entity description text of the target entity, and to generate text from behavioral features to obtain behavioral description text of multiple historical behaviors; a text compression module, used to compress entity description text, behavioral description text, and recommendation prompt information, respectively, to obtain entity compressed text, behavioral compressed text, and recommendation compressed text, wherein the recommendation prompt information is used to prompt the second recommendation model to make text recommendations; and a text recommendation module, used to input entity compressed text, behavioral compressed text, and recommendation compressed text into the first recommendation model, and use the first recommendation model to make text recommendations to obtain multiple first recommendation texts.

[0211] In this embodiment, the behavioral features include: the trigger time, behavior type, and behavior content of multiple historical behaviors; the text generation module is further used to: obtain the time text corresponding to the trigger time and the type text corresponding to the behavior type based on text association; parse the behavior content to obtain the input text and target object corresponding to the behavior content, wherein the input text is used to characterize the text entered by the target entity when triggering multiple historical behaviors, and the target object is used to characterize the object viewed by the target entity based on multiple historical behaviors; input the object information of the target object into the text generation model, and use the text generation model to generate text for the target object to obtain the object description text of the target object; construct the behavior description text based on the time text, type text, input text, and object description text.

[0212] In this embodiment of the application, the second recommendation model includes: an interest point summarization module and a text determination module; the text recommendation module is further used to: summarize the interest points of the target entity based on the interest point summarization module and behavioral parameters to obtain the target interest points of the target entity; and determine multiple second recommendation texts according to a preset association relationship based on the text determination module and the target interest points, wherein the preset association relationship is used to characterize the association relationship between the target interest points and the multiple second recommendation texts.

[0213] According to an embodiment of this application, a training apparatus for a text recommendation model is also provided for implementing the training method of the above-described text recommendation model. Figure 10 This is a structural block diagram of a training device for a text recommendation model according to an embodiment of this application, as shown in the diagram. Figure 10 As shown, the device includes: a second acquisition module 1002, a first training module 1004, and a second training module 1006.

[0214] The second acquisition module 1002 is used to construct first training data based on the text recommendation results corresponding to multiple recommendation requests within the first test time period, and to construct second training data based on the sample behavior sequences corresponding to multiple recommendation requests. The text recommendation results represent the set of sample texts recommended to the test entity based on multiple recommendation requests, and the text interaction results of multiple sample texts contained in the sample text set. The sample behavior sequences represent the behavior sequences generated by the test entity within the first test time period. The first training module 1004 is used to train the first initial model based on the first training data to obtain the first recommendation model. The second training module 1006 is used to train the second initial model based on the second training data, and the reasoning thought chain and reasoning results of the teacher model to obtain the second recommendation model. The reasoning thought chain and reasoning results are obtained by the teacher model processing the second training data. The first recommendation model and the second recommendation model are used to execute any of the methods described above.

[0215] The second acquisition module 1002, the first training module 1004, and the second training module 1006 described above correspond to steps S302 to S306 in the above embodiments. The three modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. The modules or units described above may be hardware or software components stored in memory and processed by one or more processors. The modules may also be part of a device and may run in the server 10 provided in the above embodiments.

[0216] In this embodiment, the second acquisition module is further configured to: construct a first text tag list corresponding to multiple recommendation requests based on a sample text set and text interaction results corresponding to multiple recommendation requests, wherein the first text tag list corresponding to multiple recommendation requests is used to characterize the reference results output by the first recommendation model based on the multiple recommendation requests respectively; sample the text stored in the first text tag list corresponding to multiple recommendation requests based on the text interaction results and the list length of the first text tag list corresponding to multiple recommendation requests respectively, to obtain a set of first sampled tag lists corresponding to multiple recommendation requests, wherein the set of first sampled tag lists corresponding to multiple recommendation requests contains multiple first sampled tag lists, each containing target text corresponding to multiple recommendation requests, and the target text corresponding to multiple recommendation requests is used to characterize the text in the sample text set corresponding to multiple recommendation requests that has interactive behavior with the test entity; rearrange the multiple first sampled tag lists contained in the set of first sampled tag lists corresponding to multiple recommendation requests based on the interest points and sample behavior sequences of the test entity, to obtain a first rearranged tag list set; and construct first training data based on the first rearranged tag list set, the entity information of the test entity, and the target behavior sequence of the test entity in the second test time period, wherein the end time of the second test time period is the start time of the first test time period.

[0217] In this embodiment, the second acquisition module is further configured to: determine the target text corresponding to the multiple recommendation requests from the sample text set corresponding to the multiple recommendation requests based on the text interaction results corresponding to the multiple recommendation requests; input the sample text in the sample text set corresponding to the multiple recommendation requests into a text evaluation model, and evaluate the sample text corresponding to the multiple recommendation requests using the text evaluation model to obtain text evaluation results; filter the sample text set corresponding to the multiple recommendation requests based on the text evaluation results to obtain a filtered text set corresponding to the multiple recommendation requests; and construct a first text tag list corresponding to the multiple recommendation requests based on the text evaluation results, the filtered text set corresponding to the multiple recommendation requests, and the target text corresponding to the multiple recommendation requests.

[0218] In this embodiment of the application, the second acquisition module is further configured to: match the interest points of the test entity with any first sampled label in the first sampled label list to obtain a label matching result, wherein the label matching result is used to characterize the semantic consistency between the interest points of the test entity and the first sampled label; determine the label level of the first sampled label based on the sample behavior sequence, wherein the label level is used to characterize the freshness of the first sampled label; and rearrange the multiple first sampled label lists contained in the set of first sampled label lists corresponding to multiple recommendation requests based on the label matching result and label level of the first sampled label to obtain a first rearranged label list set.

[0219] In this embodiment, the second acquisition module is further configured to: construct a second text label list based on the sample behaviors contained in the sample behavior sequence, wherein the second text label list is used to store the association between the interest points of the test entity and the target texts corresponding to multiple recommendation requests; perform bucket sampling on the associations stored in the second text label list based on the sequence length of the sample behavior sequence to obtain a second sample label list set; rearrange the multiple second sample label lists contained in the second sample label list set based on the recommendation priority of the target texts corresponding to multiple recommendation requests to obtain a second rearranged label list set; and construct second training data based on the second rearranged label list set and the sample behavior sequence.

[0220] In this embodiment, the second acquisition module is further configured to: acquire multiple sample objects corresponding to the sample behavior sequence, wherein the multiple sample objects are used to characterize the objects that the test entity interacts with based on the sample behavior; construct multiple points of interest for the test entity and object text of the multiple sample objects based on the object features of the multiple sample objects; cluster the target text corresponding to the multiple recommendation requests based on the sample behavior sequence and the multiple points of interest to construct an initial text tag list, wherein the initial text tag list is used to characterize the association between the multiple points of interest and the target text corresponding to the multiple recommendation requests; and expand the initial text tag list based on the object text of the multiple sample objects to obtain a second text tag list.

[0221] In this embodiment of the application, the second acquisition module is further configured to: acquire the text type of the target text corresponding to the multiple recommendation requests; and determine the recommendation priority of the target text corresponding to the multiple recommendation requests based on the text type.

[0222] In this embodiment, the second acquisition module is further configured to: determine the recommendation priority of the target text corresponding to the multiple recommendation requests as a first priority in response to the text type indicating that the target text corresponding to the multiple recommendation requests is the text clicked by the test entity under the first line; determine the recommendation priority of the target text corresponding to the multiple recommendation requests as a second priority in response to the text type indicating that the target text corresponding to the multiple recommendation requests is the text clicked by the test entity under the second line, wherein the complexity of the triggering process of the second line is greater than the complexity of the triggering process of the first line; determine the recommendation priority of the target text corresponding to the multiple recommendation requests as a third priority in response to the text type indicating that the target text corresponding to the multiple recommendation requests belongs to the filter text set; and determine the recommendation priority of the target text corresponding to the multiple recommendation requests as a fourth priority in response to the text type indicating that the target text corresponding to the multiple recommendation requests belongs to the object text, wherein the first priority is greater than the second priority, the second priority is greater than the third priority, and the third priority is greater than the fourth priority.

[0223] In this embodiment of the application, the first training module is further configured to: train the first initial model based on the first training data to obtain the first training model; and update the model parameters of the first training model based on the first reward function to obtain the first recommendation model.

[0224] In this embodiment of the application, the first training module is further configured to: input sample training data into the first training model, obtain the first text recommendation result output by the first training model, and construct a first reward function based on the first text recommendation result and the text evaluation model.

[0225] In this embodiment of the application, the first training module is further configured to: perform quality detection on the multiple texts contained in the first text recommendation result respectively to obtain multiple quality detection results; input the multiple texts contained in the first text recommendation result into the text evaluation model respectively, and use the text evaluation model to evaluate the multiple texts contained in the first text recommendation result to obtain multiple first evaluation results; construct a quality reward function of the first training model based on the multiple quality detection results, and construct a model reward function of the first training model based on the multiple first evaluation results; and construct a first reward function based on the quality reward function and the model reward function.

[0226] In this embodiment, the second training module is further configured to: input the second training data into the teacher model, and use the teacher model to construct the reasoning thought chain and reasoning result of the second training data; train the second initial model based on the second training data, the reasoning thought chain and the reasoning result to obtain the second training model; and update the model parameters of the second training model based on the second reward function to obtain the second recommendation model.

[0227] In this embodiment of the application, the second training module is further configured to: input sample training data into the second training model, obtain the interest point summarization result obtained by the second training model from the interest point summarization of the sample training data; and construct a second reward function based on the interest point summarization result and the first reward function.

[0228] In this embodiment of the application, the second training module is further configured to: match the interest point summarization result with the reference interest points corresponding to the sample training data to obtain the interest point matching result; and construct a second reward function based on the interest point matching result and the first reward function.

[0229] According to an embodiment of this application, a search text recommendation apparatus for implementing the above-described search text recommendation method is also provided. Figure 11 This is a structural block diagram of a text recommendation device according to an embodiment of this application, such as... Figure 11 As shown, the device includes: a first display module 1102 and a second display module 1104.

[0230] The first display module 1102 is used to respond to input commands applied to the operation interface and display the behavior parameters of the search behavior and multiple first recommended texts on the operation interface. The input command is triggered by the search behavior, and the multiple first recommended texts are obtained by the first recommendation model based on the entity information corresponding to the search behavior and the historical behavior sequence. The entity information is used to represent the information of the entity that triggered the search behavior. The second display module 1104 is used to respond to processing commands applied to the operation interface and display a text recommendation sequence on the operation interface. The text recommendation sequence is constructed from multiple first recommended texts and multiple second recommended texts. The multiple second recommended texts are obtained by the second recommendation model based on the behavior parameters to recommend texts for the search behavior. The response speed of the second recommendation model is greater than that of the first recommendation model.

[0231] The first display module 1102 and the second display module 1104 described above correspond to steps S802 to S806 in the above embodiments. The two modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. The modules or units described above may be hardware or software components stored in memory and processed by one or more processors. The modules may also be part of a device and may run in the server 10 provided in the above embodiments.

[0232] The preferred embodiments involved in the above embodiments of this application are the same as the solutions, application scenarios and implementation processes provided in the above embodiments, and will not be repeated here.

[0233] Embodiments of this application may provide a computing device. Figure 12 This is a structural block diagram of a computing device according to an embodiment of this application. Figure 12 As shown, the computing device 1200 may include one or more (one shown in the figure) processors 1202, memory 1204, memory controller, and peripheral interfaces.

[0234] The aforementioned computing device can be understood as an integrated intelligent terminal, including but not limited to servers, desktop computers, PCs (Personal Computers), and all-in-one model machines. Furthermore, the computing device may have the model described in the above embodiments of this application pre-installed.

[0235] Specifically, this computing device can pre-install various types of models, including but not limited to models in fields such as natural language processing, visual processing, speech processing, code processing, and multimodal task processing, thus providing diverse model choices. In different product forms, this computing device can support one or more model usage methods, including but not limited to model training, model invocation, model fine-tuning, model deployment, model inference, and application. In some product forms, this computing device also supports model management, including but not limited to multi-type model management (supporting the management of discriminative, generative, and other model types), model version control (supporting the control of different model versions), and model evaluation (evaluating model performance and effectiveness based on model evaluation tools). In other product forms, this computing device can also create applications based on models, providing API calling capabilities. Models can be called into created applications through API interfaces, and application management tools are provided to control and manage applications.

[0236] Furthermore, this computing device can also include data management (supporting the creation and management of model tuning datasets), a training center (providing abundant training resources to help users learn and master AI technologies), and basic control capabilities (providing enterprise-level basic control capabilities to ensure system security and efficient operation). Through these functions, it provides a comprehensive, integrated device for AI development, training, deployment, and application.

[0237] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the methods in the above embodiments. The memory may include high-speed random access memory (RAM) and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to terminal A via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks (LANs), mobile communication networks, and combinations thereof.

[0238] The processor can invoke an executable program stored in memory via a transmission device to execute any of the methods described in the above embodiments.

[0239] Embodiments of this application may provide an electronic device. Figure 13 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 13As shown, the electronic device may include: an input / output device 1302; a memory 1304; and a processor 1306, wherein the processor 1306 is connected to the input / output device 1302 and the memory 1304 via a bus 1308.

[0240] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the methods in the above embodiments. The memory may include high-speed random access memory (RAM) and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to terminal A via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks (LANs), mobile communication networks, and combinations thereof.

[0241] The processor can invoke an executable program stored in memory via a transmission device to execute any of the methods described in the above embodiments.

[0242] Those skilled in the art will understand that, Figure 12 The structure shown is illustrative. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 12 This does not limit the structure of the aforementioned electronic device. For example, the electronic device may also include components that are larger than those described above. Figure 12 The figure may contain more or fewer components (such as network interfaces, display devices, etc.) or have a different configuration than that shown in the figure.

[0243] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: a flash drive, read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0244] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the aforementioned computer-readable storage medium can be used to store program code executed by the method provided in the above embodiments.

[0245] Optionally, in this embodiment, the storage medium may be located in a computing device or an electronic device.

[0246] Optionally, in this embodiment, the computer-readable storage medium is configured to store an executable program. When the executable program runs, it controls the device where the computer-readable storage medium is located to perform any of the methods described in the above embodiments.

[0247] Embodiments of this application also provide a computer program product. Optionally, in this embodiment, the computer program product may include a computer program. When executed by a processor, the computer program implements the methods provided in the above embodiments.

[0248] Embodiments of this application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium can be used to store a computer program. When the computer program is executed by a processor, it implements the method provided in the above embodiments.

[0249] Embodiments of this application also provide a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it implements the method provided in the above embodiments.

[0250] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0251] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are illustrative; for example, the division of units is a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined, integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling, direct coupling, or communication connection shown or discussed may be through some interfaces, indirect coupling of units or modules, or communication connection, and may be electrical or other forms.

[0252] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of this embodiment.

[0253] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0254] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0255] The above are preferred embodiments of this application. For those skilled in the art, various improvements and modifications can be made without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for recommending searched text, characterized in that, include: In response to detecting a search behavior, the behavior parameters of the search behavior and multiple first recommended texts are obtained, wherein the multiple first recommended texts are obtained by a first recommendation model based on the entity information corresponding to the search behavior and the historical behavior sequence, and the entity information is used to characterize the information of the target entity that triggered the search behavior; The behavioral parameters are input into the second recommendation model, and the second recommendation model is used to recommend text for the search behavior to obtain multiple second recommendation texts. The response speed of the second recommendation model is greater than that of the first recommendation model. Based on the plurality of first recommended texts and the plurality of second recommended texts, a text recommendation sequence corresponding to the search behavior is constructed.

2. The method according to claim 1, characterized in that, The method further includes: Feature extraction is performed on the entity information and the multiple historical behaviors contained in the historical behavior sequence to obtain the entity features of the entity information and the behavioral features of the multiple historical behaviors; Text generation is performed on the entity features to obtain the entity description text of the target entity, and text generation is performed on the behavioral features to obtain the behavioral description text of the multiple historical behaviors; The entity description text, the behavior description text, and the recommendation prompt information are compressed respectively to obtain entity compressed text, behavior compressed text, and recommendation compressed text, wherein the recommendation prompt information is used to prompt the second recommendation model to make text recommendations; The entity compressed text, the behavior compressed text, and the recommendation compressed text are input into the first recommendation model, and the first recommendation model is used to perform text recommendation to obtain the plurality of first recommendation texts.

3. The method according to claim 2, characterized in that, The behavioral features include: the trigger time, behavior type, and behavior content of the multiple historical behaviors; the step of generating text from the behavioral features to obtain behavioral description text of the multiple historical behaviors includes: Based on text association, obtain the time text corresponding to the trigger time and the type text corresponding to the behavior type; The behavior content is parsed to obtain the input text and target object corresponding to the behavior content. The input text is used to represent the text entered by the target entity when the multiple historical behaviors are triggered, and the target object is used to represent the object viewed by the target entity based on the multiple historical behaviors. The object information of the target object is input into the text generation model, and the text generation model is used to generate text for the target object to obtain the object description text of the target object. The behavior description text is constructed based on the time text, the type text, the input text, and the object description text.

4. The method according to claim 1, characterized in that, The second recommendation model includes: an interest point summarization module and a text determination module; the behavioral parameters are input into the second recommendation model, and the second recommendation model is used to perform text recommendation on the search behavior to obtain multiple second recommendation texts, including: Based on the interest point summarization module and the behavior parameters, the interest points of the target entity are summarized to obtain the target interest points of the target entity; Based on the text determination module and the target interest point, the plurality of second recommended texts are determined according to a preset association relationship, wherein the preset association relationship is used to characterize the association relationship between the target interest point and the plurality of second recommended texts.

5. A training method for a text recommendation model, characterized in that, include: Based on the text recommendation results corresponding to multiple recommendation requests within the first test time period, a first training data is constructed, and based on the sample behavior sequences corresponding to the multiple recommendation requests, a second training data is constructed. The text recommendation results are used to characterize the set of sample texts recommended to the test entity based on the multiple recommendation requests, and the text interaction results of multiple sample texts contained in the sample text set. The sample behavior sequences are used to characterize the behavior sequences generated by the test entity within the first test time period. The first initial model is trained based on the first training data to obtain the first recommendation model; Based on the second training data, and the reasoning thought chain and reasoning results of the teacher model, the second initial model is trained to obtain the second recommendation model, wherein the reasoning thought chain and the reasoning results are obtained by the teacher model processing the second training data, and the first recommendation model and the second recommendation model are used to perform the method described in any one of claims 1-4.

6. The method according to claim 5, characterized in that, The first training data is constructed based on the text recommendation results corresponding to multiple recommendation requests within the first test time period, including: Based on the sample text set and text interaction results corresponding to the multiple recommendation requests, a first text tag list corresponding to the multiple recommendation requests is constructed, wherein the first text tag list corresponding to the multiple recommendation requests is used to characterize the reference results output by the first recommendation model based on the multiple recommendation requests respectively; Based on the text interaction results corresponding to the multiple recommendation requests and the list length of the first text tag list corresponding to the multiple recommendation requests, the text stored in the first text tag list corresponding to the multiple recommendation requests is sampled to obtain the first sampled tag list set corresponding to the multiple recommendation requests. The first sampled tag list set corresponding to the multiple recommendation requests contains multiple first sampled tag lists, each containing the target text corresponding to the multiple recommendation requests. The target text corresponding to the multiple recommendation requests is used to characterize the text in the sample text set corresponding to the multiple recommendation requests that has interactive behavior with the test entity. Based on the interest points of the test entity and the sample behavior sequence, the multiple first sampled label lists contained in the first sampled label list set corresponding to the multiple recommendation requests are rearranged to obtain the first rearranged label list set; Based on the first rearranged label list set, the entity information of the test entity, and the target behavior sequence of the test entity in the second test time period, the first training data is constructed, wherein the end time of the second test time period is the start time of the first test time period.

7. The method according to claim 6, characterized in that, The step of constructing a first text tag list corresponding to the multiple recommendation requests based on the sample text set and text interaction results corresponding to the multiple recommendation requests includes: Based on the text interaction results corresponding to the multiple recommendation requests, the target text corresponding to the multiple recommendation requests is determined from the sample text set corresponding to the multiple recommendation requests; The sample texts in the sample text set corresponding to the multiple recommendation requests are input into the text evaluation model, and the text evaluation model is used to evaluate the sample texts corresponding to the multiple recommendation requests respectively to obtain the text evaluation results; Based on the text evaluation results, the sample text set corresponding to the multiple recommendation requests is filtered to obtain the filtered text set corresponding to the multiple recommendation requests. Based on the text evaluation results, the set of filtered texts corresponding to the multiple recommendation requests, and the target texts corresponding to the multiple recommendation requests, a first list of text tags corresponding to the multiple recommendation requests is constructed.

8. The method according to claim 6, characterized in that, Based on the interest points of the test entities and the sample behavior sequences, the multiple first sampled label lists contained in the first sampled label list set corresponding to the multiple recommendation requests are rearranged to obtain a first rearranged label list set, including: The interest points of the test entity are matched with the first sampled labels in any first sampled label list to obtain the label matching result, wherein the label matching result is used to characterize the semantic consistency between the interest points of the test entity and the first sampled labels; The label level of the first sampling label is determined based on the sample behavior sequence, wherein the label level is used to characterize the freshness of the first sampling label; Based on the tag matching result and tag level corresponding to the first sampling tag, the multiple first sampling tag lists contained in the set of first sampling tag lists corresponding to the multiple recommendation requests are rearranged to obtain the first rearranged tag list set.

9. The method according to claim 5, characterized in that, The construction of the second training data based on the sample behavior sequences corresponding to the multiple recommendation requests includes: Based on the sample behaviors contained in the sample behavior sequence, a second text tag list is constructed, wherein the second text tag list is used to store the association between the interest points of the test entity and the target text corresponding to multiple recommendation requests; Based on the sequence length of the sample behavior sequence, the association relationship stored in the second text tag list is sampled by bucketing to obtain the second sampled tag list set; Based on the recommendation priority of the target text corresponding to the multiple recommendation requests, the multiple second sampled tag lists contained in the second sampled tag list set are rearranged to obtain the second rearranged tag list set; Based on the second rearranged label list set and the sample behavior sequence, a second training data is constructed.

10. The method according to claim 9, characterized in that, The construction of a second text label list based on the sample behaviors contained in the sample behavior sequence includes: Obtain multiple sample objects corresponding to the sample behavior sequence, wherein the multiple sample objects are used to characterize the objects that the test entity interacts with based on the sample behavior; Based on the object features of the multiple sample objects, multiple points of interest of the test entity and object text of the multiple sample objects are constructed; Based on the sample behavior sequence and the multiple points of interest, the target texts corresponding to the multiple recommendation requests are clustered to construct an initial text label list, wherein the initial text label list is used to characterize the association between the multiple points of interest and the target texts corresponding to the multiple recommendation requests; The initial text tag list is expanded based on the object text of the multiple sample objects to obtain the second text tag list.

11. The method according to claim 9, characterized in that, The method further includes: Obtain the text type of the target text corresponding to the multiple recommendation requests; The recommendation priority of the target text corresponding to the multiple recommendation requests is determined based on the text type.

12. The method according to claim 11, characterized in that, The step of determining the recommendation priority of the target text corresponding to the multiple recommendation requests based on the text type includes: In response to the text type indicating that the target text corresponding to the multiple recommendation requests is the text clicked by the test entity in the first line, the recommendation priority of the target text corresponding to the multiple recommendation requests is determined to be the first priority; In response to the text type characterizing the target text corresponding to the multiple recommendation requests as the text clicked by the test entity under the second line, the recommendation priority of the target text corresponding to the multiple recommendation requests is determined to be the second priority, wherein the complexity of the triggering process of the second line is greater than the complexity of the triggering process of the first line. In response to the text type indicating that the target text corresponding to the multiple recommendation requests belongs to the filter text set, the recommendation priority of the target text corresponding to the multiple recommendation requests is determined to be the third priority; In response to the text type indicating that the target text corresponding to the plurality of recommendation requests belongs to object text, the recommendation priority of the target text corresponding to the plurality of recommendation requests is determined to be the fourth priority, wherein the first priority is greater than the second priority, the second priority is greater than the third priority, and the third priority is greater than the fourth priority.

13. The method according to claim 5, characterized in that, The step of training the first initial model based on the first training data to obtain the first recommendation model includes: The first initial model is trained based on the first training data to obtain the first training model; The model parameters of the first trained model are updated based on the first reward function to obtain the first recommendation model.

14. The method according to claim 13, characterized in that, The method further includes: Input the sample training data into the first training model and obtain the first text recommendation result output by the first training model; Based on the first text recommendation result and the text evaluation model, the first reward function is constructed.

15. The method according to claim 14, characterized in that, The construction of the first reward function based on the first text recommendation result and the text evaluation model includes: Quality checks are performed on multiple texts included in the first text recommendation result to obtain multiple quality check results; The multiple texts contained in the first text recommendation result are respectively input into the text evaluation model, and the multiple texts contained in the first text recommendation result are evaluated by the text evaluation model to obtain multiple first evaluation results; The quality reward function of the first training model is constructed based on the multiple quality detection results, and the model reward function of the first training model is constructed based on the multiple first evaluation results; Based on the quality reward function and the model reward function, the first reward function is constructed.

16. The method according to claim 5, characterized in that, The second initial model is trained based on the second training data, as well as the reasoning thought chain and reasoning results of the teacher model, to obtain the second recommendation model, including: The second training data is input into the teacher model, and the teacher model is used to construct the reasoning thought chain and reasoning result of the second training data. The second initial model is trained based on the second training data, the inference thought chain, and the inference result to obtain the second training model; The model parameters of the second trained model are updated based on the second reward function to obtain the second recommendation model.

17. The method according to claim 16, characterized in that, The method further includes: Input the sample training data into the second training model, and obtain the interest point summarization result obtained by the second training model from the sample training data; Based on the interest point induction results and the first reward function, the second reward function is constructed.

18. The method according to claim 17, characterized in that, The construction of the second reward function based on the interest point induction result and the first reward function includes: The interest point summarization results are matched with the reference interest points corresponding to the sample training data to obtain the interest point matching results; Based on the interest point matching results and the first reward function, the second reward function is constructed.

19. A method for recommending searched text, characterized in that, include: In response to an input command applied to the operation interface, the operation interface displays the behavior parameters of the search behavior and multiple first recommended texts, wherein the input command is triggered by the search behavior, and the multiple first recommended texts are obtained by a first recommendation model based on the entity information corresponding to the search behavior and the historical behavior sequence, wherein the entity information is used to characterize the information of the entity that triggered the search behavior; In response to a processing instruction applied to the operation interface, a text recommendation sequence is displayed on the operation interface. The text recommendation sequence is constructed from a plurality of first recommended texts and a plurality of second recommended texts. The plurality of second recommended texts are obtained by a second recommendation model performing text recommendations on the search behavior based on the behavioral parameters. The response speed of the second recommendation model is greater than that of the first recommendation model.

20. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor, connected to a memory via a bus, is used to run the program, wherein the program, when running, performs the method according to any one of claims 1 to 19.

21. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the method according to any one of claims 1 to 19.

22. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 19.