Text generation method and device and computer readable storage medium
By obtaining the theme and user portrait of the aggregated page, using the cross-domain text generation model and correlation and confusion model, to generate and select personalized aggregated page text, the problem of lack of personalization of text generation in the prior art is solved, and the user experience and conversion rate are improved.
Patent Information
- Application Number
- CN202411908639.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, the text generation of aggregated pages lacks personalization and cannot be distinguished in fine-grained manner according to user preferences, resulting in poor user experience.
By obtaining the theme and user portrait of the item aggregation page, multiple texts are generated using a cross-domain-trained text generation model, combining the correlation and confusion model, selecting candidate text from it, and determining the target text displayed on the aggregation page based on the user portrait.
It realizes the generation of personalized aggregated page text based on user preferences, improving user browsing experience and click-through rate and conversion rate of aggregated pages.
Smart Images

Figure CN119829841A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, and in particular to a text generation method and device, and a computer-readable storage medium. Background Art
[0002] Aggregation pages are a way of recommending items. By recommending topics that users may be interested in, after users click on the aggregation page, they will be redirected to the inner page containing items under the topic, so that users can focus on the items they are interested in. Compared with traditional recommendation methods, aggregation pages are more intuitive and easy to understand, allowing users to find items of interest faster.
[0003] In the related art, when generating text displayed on an aggregate page, a corresponding text is usually provided for an aggregate page, and the same text is displayed when all users see the aggregate page. Summary of the invention
[0004] According to a first aspect of the present disclosure, a text generation method is provided, comprising: obtaining a theme of an item aggregation page; determining prompt information according to the theme of the item aggregation page and a user portrait; generating, according to the prompt information, a plurality of texts describing the item aggregation page using a first text generation model, wherein the first text generation model is trained using a cross-domain training set; selecting, according to a relevance model, a plurality of candidate texts from the plurality of texts based on the relevance of each of the plurality of texts to the theme; and in response to receiving a request to display the item aggregation page to a user, determining, according to the user portrait, a target text to be displayed on the item aggregation page from the plurality of candidate texts.
[0005] In some embodiments, the text generation method further includes: using a second text generation model to correct at least one of the multiple texts, multiple candidate texts and the target text, wherein the second text generation model is trained using a training set of the field to which the article belongs.
[0006] In some embodiments, the using of a relevance model to select a plurality of candidate texts from the plurality of texts according to the relevance of each of the plurality of texts to the topic comprises: using the relevance model to calculate the relevance of each of the texts to the topic; using a confusion model to calculate the confusion degree of each of the texts; and selecting a plurality of candidate texts from the plurality of texts according to the relevance of each of the texts to the topic and the confusion degree of each of the texts.
[0007] In some embodiments, selecting a plurality of candidate texts from the plurality of texts based on the relevance of each text to the topic and the confusion degree of each text comprises: selecting a plurality of candidate texts from the plurality of texts based on the relevance of each text to the topic, the confusion degree of each text, and the format of each text.
[0008] In some embodiments, the text generation method further includes: determining a theme of the item aggregation page by clustering the multiple items.
[0009] In some embodiments, determining the theme of the item aggregation page by clustering multiple items includes: clustering the multiple items to obtain a set of items corresponding to the item aggregation page; and using a clustering model to determine the theme of the set of items corresponding to the item aggregation page as the theme of the item aggregation page.
[0010] In some embodiments, selecting multiple candidate texts from the multiple texts based on the relevance of each text to the topic and the confusion degree of each text includes: determining a score for each text of the multiple texts based on the relevance of each text of the multiple texts to the topic and the confusion degree of each text; and selecting texts among the multiple texts whose scores are higher than a first threshold as the multiple candidate texts.
[0011] In some embodiments, the text generation method also includes: when the number of the multiple candidate texts is less than a second threshold, repeatedly performing the steps of generating multiple texts describing the item aggregation page and selecting multiple candidate texts from the multiple texts until the number of the multiple candidate texts is greater than the second threshold.
[0012] In some embodiments, each of the multiple candidate texts corresponds to a preference of the user, and determining the target text displayed on the item aggregation page from the multiple candidate texts based on the user portrait includes: determining the user's current preference based on a current event and the user portrait; and determining the candidate text corresponding to the user's current preference as the target text displayed on the item aggregation page.
[0013] In some embodiments, the determining of prompt information according to the theme and user portrait of the item aggregation page includes: determining prompt information according to the theme of the item aggregation page, the user portrait, and information of multiple items corresponding to the item aggregation page. According to the second aspect of the present disclosure, a text generation device is provided, including: an acquisition module configured to acquire the theme of the item aggregation page; a first determination module configured to determine prompt information according to the theme and user portrait of the item aggregation page; a generation module configured to generate multiple texts describing the item aggregation page according to the prompt information using a first text generation model, wherein the first text generation model is obtained by training a cross-domain training set; a selection module configured to select multiple candidate texts from the multiple texts according to the relevance of each text of the multiple texts to the theme using a relevance model; and a second determination module configured to determine, in response to receiving a request to display the item aggregation page to the user, a target text to be displayed on the item aggregation page from the multiple candidate texts according to the user portrait.
[0014] According to a third aspect of the present disclosure, a text generation device is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the text generation method according to any embodiment of the present disclosure based on instructions stored in the memory.
[0015] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the instructions are executed by a processor, the text generation method described in any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0017] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0018] Figure 1 A flowchart showing a text generation method according to some embodiments of the present disclosure;
[0019] Figure 2 A schematic diagram showing an outer page of an aggregated page according to some embodiments of the present disclosure;
[0020] Figure 3 A schematic diagram showing an item recommendation list page according to some embodiments of the present disclosure;
[0021] Figure 4 A schematic diagram of a SKU according to some embodiments of the present disclosure is shown;
[0022] Figure 5 A schematic diagram showing text review according to some embodiments of the present disclosure;
[0023] Figure 6 A schematic diagram showing a push target text according to some embodiments of the present disclosure;
[0024] Figure 7 A schematic diagram showing a text generation framework according to some embodiments of the present disclosure;
[0025] Figure 8 A schematic diagram showing a text generation framework according to some other embodiments of the present disclosure;
[0026] Fig. 9 A block diagram showing a text generation device according to some embodiments of the present disclosure;
[0027] Fig.10 A block diagram showing a text generation device according to some other embodiments of the present disclosure;
[0028] Fig.11 A block diagram of a computer system for implementing some embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0029] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0030] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0031] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0032] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0033] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0034] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0035] In the related art, when generating the text displayed on the aggregation page, usually only one corresponding text is provided for one aggregation page, and all users will see the same text when they see the aggregation page. This method lacks fine-grained distinction of potential conversion users, that is, the copy that users see lacks personalized distinction based on user preferences. In addition, in the related art, general text is manually written and then randomly assigned to the topic by the system. This solution can be called rule-based topic copy generation, and the relevance between the text and the topic is poor.
[0036] Figure 1 A flowchart of a text generation method according to some embodiments of the present disclosure is shown.
[0037] like Figure 1 As shown, the text generation method includes steps S1 to S5. In some embodiments, the text generation method is executed by a text generation device.
[0038] In step S1, the subject of the item aggregation page is obtained.
[0039] An aggregation page represents a theme. A theme is a collection of item attributes. Items that match these attributes are members of the theme. The aggregation page is designed to contain two parts: the display card on the outer page and the item recommendation list on the detail page.
[0040] Figure 2 A schematic diagram showing an outer page of an aggregated page according to some embodiments of the present disclosure.
[0041] like Figure 2 As shown, the display card of the external page is located in the recommendation list of the external page. The visual elements are the same as other display cards, including pictures and text. The text part includes, for example, the aggregation page logo, aggregation page theme, aggregation page copy, etc.
[0042] For example, the items corresponding to the aggregation page are latex pillows of different models and brands, and the aggregation page logo can also be used as the aggregation page title, such as "Quality Selection". The theme of the aggregation page is, for example, "latex pillow", and the copy of the aggregation page is, for example, "Carefully Selected Only for the Best You".
[0043] At the same time, a "View" button is also displayed on the aggregation page, and users can jump to the item recommendation list after clicking it.
[0044] Figure 3 A schematic diagram showing an item recommendation list page according to some embodiments of the present disclosure.
[0045] like Figure 3 As shown, the aggregation page logo and multiple items corresponding to the aggregation page are displayed on the item recommendation list page, such as pictures and descriptions of the items.
[0046] In some embodiments, the text generation method further includes: determining a theme of the item aggregation page by clustering multiple items.
[0047] For example, multiple items are clustered, similar items form a topic, and the similarity of the items is evaluated by a machine learning algorithm, for example.
[0048] In some embodiments, items are clustered based on their stock keeping units (SKUs).
[0049] Figure 4 A schematic diagram of a SKU according to some embodiments of the present disclosure is shown.
[0050] like Figure 4 As shown, the SKU of an item includes the item's information, such as the item's title, item's subtitle, item's name, store, original price, sales price, inventory quantity, virtual inventory quantity, barcode, item thumbnail, promotional activities, item's specifications, etc. Some image files used on the page can be obtained from the image library.
[0051] In some embodiments, the theme of the item aggregation page is determined by clustering multiple items, including: clustering multiple items to obtain a set of items corresponding to the item aggregation page; using a clustering model to determine the theme of the set of items corresponding to the item aggregation page as the theme of the item aggregation page.
[0052] For example, when mining topics, clustering models are used to cluster items based on sku to obtain a collection of items, thereby determining the topic of the aggregation page. Based on sku clustering, the model can be provided with item information such as item specifications and attributes, providing more dimensions for clustering algorithms to choose from, thereby improving the accuracy of clustering. Clustering models include K-means, hierarchical clustering algorithms, density-based spatial clustering of applications with noise (DBSCAN), mean shift, etc.
[0053] When mining topics, you can use multiple clustering algorithms at the same time to obtain item divisions of different granularities and angles, thereby determining topics of different granularities and angles. After the clustering algorithm is completed, the topic of each aggregated page corresponds to a collection of item skus for use in subsequent steps.
[0054] In step S2, prompt information is determined according to the theme of the item aggregation page and the user portrait.
[0055] For example, prompt information is used to give prompts to the model and help the pre-trained model migrate to downstream tasks. By adding user portraits to prompt information, the original rough prompt sentences are upgraded to more business-specific fine-grained sentences, making the generated text content more in line with user needs.
[0056] In some embodiments, the prompt information is determined based on the theme of the item aggregation page and the user portrait, including: determining the prompt information based on the theme of the item aggregation page, the user portrait and information of multiple items corresponding to the item aggregation page.
[0057] For example, extract the item names and item descriptions from the collection of items corresponding to the aggregation page theme, and generate prompt statements based on the characteristics and relevance of these similar items. An example of prompt information is given below.
[0058] "Your job is to provide us with a theme generation service for the item aggregation page. Next, we will provide you with a list of items and user information. Based on the given item descriptions, please summarize ${output: total number} very literary Chinese marketing phrase descriptions, one per line. Each phrase should not contain the name of a specific item and must be within ${output: maximum length} characters.
[0059] ${sku:title}
[0060] ${user information}"
[0061] The part of the prompt that looks like ${…} is an extended interpolation. When the program is running, this token will be parsed into the set value. The user information is generated based on the user profile.
[0062] In step S3, according to the prompt information, a first text generation model is used to generate multiple texts describing the item aggregation page, wherein the first text generation model is trained by a cross-domain training set.
[0063] The first text generation model is, for example, a model based on artificial intelligence generated content (AIGC) technology. Through the AIGC framework, the prompt sentence is continuously adjusted to obtain a series of texts describing the item collection corresponding to the aggregation page.
[0064] The first text generation model can be a generative large language model, for example, a conversational generative pre-trained model (ChatGenerative Pre-trained Transformer, ChatGPT), a large-scale language model (Large LanguageModel Meta AI, LLaMA), a large-scale open science open-access multilingual model (BigScience Large Open-science Open-access Multilingual, BLOOM). Generating text using a model trained with a cross-domain knowledge base can produce more diverse and personalized texts, and each aggregation page will match texts of multiple styles (such as exclamation, resonance, rhetorical question, positive, guiding, etc.).
[0065] In some embodiments, a distributed multi-machine multi-threaded approach is used to generate multiple texts describing the item aggregation page. For example, multiple machines are set up to distribute and call large-scale online real-time streaming data, thereby increasing the text generation rate and ensuring timeliness.
[0066] In some embodiments, the text generation method further includes: using a second text generation model to correct at least one of the multiple texts, multiple candidate texts and the target text, the second text generation model being trained using a training set of the field to which the article belongs.
[0067] Since the text generated by the first text generation model is uncontrollable and the first text generation model's empowerment is too broad across fields, while increasing diversity, it may also cause the text information to deviate from the scope of the field to which the item belongs and become too divergent. Through the second text generation model that has been fine-tuned in the field to which the item belongs, the text generated by the first text generation model is adapted and corrected for the field to which the item belongs, thereby achieving refined control of the text and reducing or avoiding the situation where the text information deviates from the scope of the field to which the item belongs. The second text generation model is, for example, a generative large language model.
[0068] According to some embodiments of the present disclosure, in the dataset of the field to which the items belong, the subject data such as the subject, copywriting, attribute description, and the first-level category name, second-level category name, and third-level category name of the labeled goods are used as label samples. By using transfer learning, the pre-trained second text generation model is retrained on the dataset of the field to which the items belong, so that the text polished by the trained second text generation model is more in line with the language expression of the field to which the item collection belongs.
[0069] In some embodiments, correcting at least one of the multiple texts, multiple candidate texts, and target texts includes: improving the relevance of at least one of the multiple texts, multiple candidate texts, and target texts to the topic; and improving the accuracy of at least one of the multiple texts, multiple candidate texts, and target texts.
[0070] For example, after fine-tuning training on e-commerce datasets, the text information modified by the second text generation model is not only more relevant to the theme of the aggregation page, but also takes into account semantic rationality. Compared with the first text generation model that is universal across fields, the fine-tuned text has significantly improved the controllability and adaptability of the system.
[0071] In step S4, a plurality of candidate texts are selected from the plurality of texts according to the relevance of each of the plurality of texts to the topic using the relevance model.
[0072] For example, since all the generation processes of the copywriting rely on the model for control, there will inevitably be a small amount of erroneous text (bad case) that is irrelevant to the topic or the sentences are not smooth. By calculating the relevance between the text and the topic, the above generated corrected text is reviewed, thereby improving the accuracy of the text, improving the service stability of the system, and ensuring the user experience. Models for calculating relevance include, for example, pre-trained bidirectional encoder representation models (Bidirectional Encoder Representations from Transformers, BERT), term frequency-inverse document frequency models (Term Frequency-Inverse Document Frequency, TF-IDF), etc.
[0073] In some embodiments, a relevance model is used to select multiple candidate texts from multiple texts based on the relevance of each text of the multiple texts to the topic, including: using the relevance model to calculate the relevance of each text to the topic; using the confusion model to calculate the confusion degree of each text; and selecting multiple candidate texts from multiple texts based on the relevance and confusion degree.
[0074] Perplexity is an evaluation indicator of text generation quality, which is used to indicate the complexity of text and the difficulty of understanding. Perplexity can be used to evaluate whether the text is likely to cause confusion or misunderstanding to readers. Highly perplexing text may contain complex sentence structures, uncommon vocabulary, ambiguous expressions, or other factors that make it difficult to understand. The lower the perplexity value, the smoother the text.
[0075] The confusion model is, for example, a neural network model, an open source neural machine translation model (Open Source Neural Machine Translation, OpenNMT), etc.
[0076] Candidate texts can be selected based on the confusion of the text and its relevance to the topic.
[0077] In some embodiments, a relevance model is used to select multiple candidate texts from multiple texts based on at least one of the relevance of each text to the topic and the confusion degree of each text, including: determining a score for each text based on the relevance of each text of the multiple texts to the topic and the confusion degree of each text; and selecting texts with scores higher than a first threshold as multiple candidate texts.
[0078] For example, relevance and confusion are weighted to calculate the score of each text, and texts with scores higher than a first threshold are used as multiple candidate texts. For another example, relevance and confusion are used as two different scores, and only texts that meet both scores are used as candidate texts.
[0079] In some embodiments, utilizing a relevance model, based on the relevance of each text of the multiple texts to the topic, the method includes: selecting multiple candidate texts from the multiple texts based on the relevance of each text of the multiple texts to the topic, at least one item of the confusion degree of each text, and the format of each text.
[0080] For example, the format of the generated text is judged by rules, such as whether it is too long or contains special symbols. Only candidate texts that meet the requirements will be further evaluated for relevance and confusion, so as to determine whether the text is a candidate text.
[0081] The format of each text includes, for example, the length, font, layout, types of characters included, etc. of each text.
[0082] In some embodiments, when the number of multiple candidate texts is less than a second threshold, the steps of generating multiple texts describing the item aggregation page and selecting multiple candidate texts from the multiple texts are repeated until the number of multiple candidate texts is greater than the second threshold.
[0083] For example, if the number of candidate texts left after screening is small, some more texts will be generated until the number of texts that meet the requirements is sufficient, thereby enriching the number of candidate texts, providing more options when selecting target texts, and providing more personalized and varied target texts for display on the aggregation page.
[0084] Figure 5 A schematic diagram showing text review according to some embodiments of the present disclosure.
[0085] Figure 5The circle on the left in the figure represents the text generation model of step S3, which includes AIGC empowerment (the first machine learning model) and the text fine-tuning model (the third machine learning model). The discriminant model on the right (the second machine learning model) is a text quality review model based on natural language processing technology. The discriminant model replaces the role of the human review team and evaluates the topic text generated by the generation model based on multiple factors.
[0086] The process of text generation and review includes text pre-processing and text post-processing. Text pre-processing mainly involves text input processing of the text to be generated so that it can meet the form that GPT can understand. Text post-processing is some adjustments made based on the generated text, including AIGC prompt adjustment, AIGC call capability modification and NLP correction. These processing methods are all natural language processing performed on the input and output text of the generation model. According to different usage scenarios and needs, they include natural language processing technologies such as text cropping, splicing, replacement, style conversion, etc.
[0087] In step S5, in response to receiving a request to display an item aggregation page to a user, a target text to be displayed on the item aggregation page is determined from a plurality of candidate texts according to the user portrait.
[0088] For example, for the same aggregation page topic, multiple candidate texts have been obtained in steps S1-S4. The generated target text will be bound to the aggregation page topic. When a user sends a request and the system recommends the user to the aggregation page topic containing the current content, the system will analyze the user profile of the requester (for example, the user's age, gender, shopping preferences, etc.) and filter out suitable target texts for the user from the candidate text library based on the user profile.
[0089] The front-end aggregation page theme window displays the target text to users to increase their willingness to click.
[0090] In some embodiments, the target text includes at least one of the title and text of the item aggregation page; the user portrait includes at least one of the user's age, gender, and browsing log. For example, the title and text displayed on the aggregation page can be generated by the text generation method disclosed in the present invention. The user portrait includes the user's age, gender, occupational hobbies, shopping preferences, browsing logs, browsing interests, etc.
[0091] In some embodiments, each candidate text of a plurality of candidate texts corresponds to a preference of the user, and based on the user portrait, a target text displayed on the item aggregation page is determined from the plurality of candidate texts, including: determining the user's current preference based on the current event and the user portrait; and determining the candidate text corresponding to the user's current preference as the target text displayed on the item aggregation page.
[0092] For example, for the same aggregation page topic, multiple candidate texts have been obtained in steps S1-S4, each of which corresponds to different user preferences under the current topic. When a user sends a request, the system will analyze the user profile of the requester (for example, the user's age, gender, shopping preferences, etc.), extract current events (such as various festivals, morning, noon, and evening, etc.), match the user's behavioral habits, and filter out the text that best suits the user's current situation.
[0093] The user's preferences are related to current events. For example, if a holiday is coming, the user's current preferences may be holiday greetings, gifts, etc.
[0094] The user's preference is also a reflection of the user's emotions (eg, happiness, expectation, sadness, anxiety, etc.). For example, if the user's current emotion is happy, the user's preference may be fashion and trend information.
[0095] Figure 6 A schematic diagram showing a push target text according to some embodiments of the present disclosure.
[0096] The generated texts for various preferences are all related to the aggregation page topic. Figure 6 As shown, when the system receives a request from a user and recommends to the user the topic of an aggregation page containing the current content, the system selects the target text that meets the user's preference in the current situation from the candidate text library corresponding to the topic of the aggregation page, and displays the text to the user through the front-end aggregation page topic window to further enhance the user's willingness to click.
[0097] In some embodiments, each candidate text of multiple candidate texts corresponds to a preference of the user, and based on the user portrait, a target text displayed on the item aggregation page is determined from the multiple candidate texts, including: based on the current event and the user portrait, using a classification model to determine the target text displayed on the item aggregation page from the multiple candidate texts.
[0098] Classification models include, for example, the user click rate prediction neural network (DeepFM) based on factorization machine, the deep cross network (DCN), etc. The classification model is used to perform multi-classification output according to the user portrait in a parameterized manner to obtain the text that best suits the current user's interests as the target text.
[0099] Figure 7 A schematic diagram showing a text generation framework according to some embodiments of the present disclosure.
[0100] like Figure 7As shown, after the process starts, the recommendation system retrieves a batch of items that users may browse from the item library and clusters them to obtain a preliminary item set, performs topic mining on the item set to obtain the theme, and generates an aggregation page text based on the theme.
[0101] The clustering rule information of the aggregation page topic is extracted from the offline clustering rules. The clustering rule information includes the clustering method, clustering label, etc. The extracted information is processed and integrated (for example, some irrelevant words are eliminated) to obtain purer item attribute words.
[0102] Extract item information from the item library to form a site-wide item database.
[0103] The first text generation model generates a series of descriptive texts that match the current item set based on the acquired item attribute words, topics, and user portraits.
[0104] The second text generation model is trained using the item data of the entire site. The second text generation model is used to perform domain adaptation and correction on the text generated by the first text generation model.
[0105] The relevance model and confusion model review the generated text to obtain a candidate text library.
[0106] For texts that have passed the relevance model and confusion model, we conduct manual cross-examination and screening, and regenerate batches of non-compliant texts based on the results of the cross-examination. At the same time, we conduct text compliance assessments. Only when the error rate of texts corresponding to a certain style or preference is less than 1%, will the texts corresponding to that style or preference be allowed to go online. Relevant information is recorded during the review process to improve the accuracy of subsequent text generation.
[0107] Finally, the user portrait is found in the database, and the classification model matches the preferred text that best matches the current user's interests and preferences based on the user portrait, and finally selects the most suitable personalized topic text for different users.
[0108] Figure 8 A schematic diagram showing a text generation framework according to some other embodiments of the present disclosure.
[0109] like Figure 8As shown, K-means, hierarchical clustering algorithm, density-based spatial clustering of applications with noise (DBSCAN), mean shift, etc. are used to cluster items. The item names and item descriptions under the aggregation theme are extracted through big data technology such as spark technology. According to the item description, the first text generation model is used to generate text and update the text in real time, and the second text generation model is used to fine-tune the text. In addition, the error between the fine-tuned text obtained from the item data pool and the text label obtained by the second text generation model is calculated to train the second text generation model. The error summation uses, for example, a multi-classification loss function.
[0110] Then input the fine-tuned text into the copy decorator. The copy decorator is a system-automated text tool based on natural language processing technology. It can detect whether the item has descriptive words under the attributes of the currently recommended items. If it is detected that there are no such descriptive words, the decorator will add some descriptions that match the classification attributes of the item to the item. By using the copy decorator, the vividness of the language description of the theme copy can be enhanced.
[0111] The text recognition service framework performs semantic cleaning, keyword filtering, text enhancement and other operations on the text output by the copy decorator, and uses the obtained text as the candidate text. The text recognition service framework automatically reviews the topics generated in each specified time period while ensuring that the error copy rate (bad case) meets the threshold requirements of the system, thereby ensuring the dynamic and real-time update of the copy.
[0112] Text Enhancement is an advanced version of the copy modifier, which is a copy replacer consisting of a predefined set of modifiers. Text Enhancement will extract some colloquial words that appear in the current copy and replace them with predefined advanced words.
[0113] The text screening model selects target texts that match the current user's interests and preferences based on user characteristics, and displays them on the terminal's aggregation page.
[0114] for Figure 8 Some or all of the models in the program are packaged into a systematic and configurable program and encapsulated into a unified framework, so as to achieve parallelization and unified calling of multiple interfaces, transforming the original small modular AIGC calls into systematic AIGC empowerment and improving text generation efficiency.
[0115] According to some embodiments of the present disclosure, the text generation method includes: obtaining the theme of the item aggregation page; determining prompt information according to the theme of the item aggregation page and the user portrait; generating multiple texts describing the item aggregation page according to the prompt information using a first text generation model, wherein the first text generation model is obtained by training a cross-domain training set; using a relevance model, selecting multiple candidate texts from multiple texts according to the relevance of each text of the multiple texts to the theme; in response to receiving a request to display the item aggregation page to the user, determining a target text to be displayed on the item aggregation page from the multiple candidate texts according to the user portrait.
[0116] According to the above technical solution, the text is screened based on at least one of the relevance of each text to the topic and the degree of confusion of each text, so that the text of the aggregated page is more fluent and more relevant to the topic, thereby improving the user's browsing experience. The prompt information is determined by the user portrait, and a more personalized text that better meets the user's needs is generated. In addition, multiple candidate texts are generated for a topic, which increases the choice, so that when the target text is determined from multiple candidate texts based on the user portrait, a personalized text that is more suitable for the user's needs can be selected for the user, thereby improving the user's willingness to browse the aggregated page and improving the click-through rate and conversion rate of the aggregated page.
[0117] Fig. 9 A block diagram of a text generating device according to some embodiments of the present disclosure is shown.
[0118] like Fig. 9 As shown, the text generating device 9 includes an acquiring module 91 , a first determining module 92 , a generating module 93 , a selecting module 94 and a second determining module 95 .
[0119] The acquisition module 91 is configured to acquire the subject of the item aggregation page, for example, by executing Figure 1 Step S1 is shown.
[0120] The first determination module 92 is configured to determine prompt information according to the theme of the item aggregation page and the user portrait, for example, Figure 1 Step S2 is shown.
[0121] The generation module 93 is configured to generate multiple texts describing the item aggregation page based on the prompt information using the first text generation model, wherein the first text generation model is trained by a cross-domain training set, for example, by executing Figure 1 Step S3 shown.
[0122] The selection module 94 is configured to select multiple candidate texts from the multiple texts based on the relevance of each text of the multiple texts to the topic by using the relevance model, for example, performing the following steps: Figure 1 Step S4 is shown.
[0123] The second determination module 95 is configured to, in response to receiving a request to display an item aggregation page to a user, determine a target text to be displayed on the item aggregation page from a plurality of candidate texts according to the user portrait, for example, by performing the following steps: Figure 1 Step S5 is shown.
[0124] In some embodiments, the text generation device also includes: a correction module, configured to use a second text generation model to correct at least one of multiple texts, multiple candidate texts and target texts, and the second text generation model is trained using a training set of the field to which the article belongs.
[0125] In some embodiments, the selection module 94 is further configured to select a plurality of candidate texts from the plurality of texts according to the relevance of each text of the plurality of texts to the topic, the degree of confusion of each text, and the format of each text.
[0126] In some embodiments, the text generation device further includes: a third determination module configured to determine a theme of the item aggregation page by clustering a plurality of items.
[0127] In some embodiments, the third determination module is further configured to: cluster multiple items to obtain a set of items corresponding to the item aggregation page; and use a clustering model to determine a theme of the set of items corresponding to the item aggregation page as the theme of the item aggregation page.
[0128] In some embodiments, the selection module is further configured to: determine a score for each of the multiple texts based on the relevance of each text to the topic and the confusion level of each text; and select texts in the multiple texts whose scores are higher than a first threshold as multiple candidate texts.
[0129] In some embodiments, the text generation device also includes: a repeated execution module, which is configured to repeatedly execute the steps of generating multiple texts describing the item aggregation page and selecting multiple candidate texts from the multiple texts when the number of multiple candidate texts is less than a second threshold, until the number of multiple candidate texts is greater than the second threshold.
[0130] In some embodiments, each of the multiple candidate texts corresponds to a preference of the user, and the second determination module is configured to: determine the user's current preference based on the current event and the user portrait; and determine the candidate text corresponding to the user's current preference as the target text displayed on the item aggregation page.
[0131] In some embodiments, the first determination module is configured to determine prompt information based on the theme of the item aggregation page, the user portrait, and information of multiple items corresponding to the item aggregation page.
[0132] Fig.10 A block diagram of a text generating device according to some other embodiments of the present disclosure is shown.
[0133] like Fig.10 As shown, the text generation device 10 includes a memory 101; and a processor 102 coupled to the memory 101, the memory 101 is used to store and execute the text generation method. The processor 102 is configured to execute the text generation method in any of the embodiments of the present disclosure based on the instructions stored in the memory 101.
[0134] Fig.11 A block diagram of a computer system for implementing some embodiments of the present disclosure is shown.
[0135] like Fig.11 As shown, the computer system 110 may be embodied in the form of a general-purpose computing device. The computer system 110 includes a memory 1110, a processor 1120, and a bus 1100 that connects the various system components.
[0136] The memory 1110 may include, for example, a system memory, a non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs. The system memory may include a volatile storage medium, such as a random access memory (RAM) and / or a cache memory. The non-volatile storage medium may store, for example, instructions for executing the text generation method in any of the embodiments of the present disclosure. The non-volatile storage medium may include, but is not limited to, a disk memory, an optical memory, a flash memory, etc.
[0137] The processor 1120 can be implemented by a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistors, etc. Discrete hardware components. Accordingly, each module such as the judgment module and the determination module can be implemented by a central processing unit (CPU) running instructions in a memory that execute corresponding steps, or can be implemented by a dedicated circuit that executes corresponding steps.
[0138] The bus 1100 may use any of a variety of bus architectures, including, but not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, and a Peripheral Component Interconnect (PCI) bus.
[0139] The computer system 110 may also include an input / output interface 1130, a network interface 1140, a storage interface 1150, etc. These interfaces 1130, 1140, 1150, the memory 1110, and the processor 1120 may be connected via a bus 1100. The input / output interface 1130 may provide a connection interface for input / output devices such as a display, a mouse, and a keyboard. The network interface 1140 provides a connection interface for various networked devices. The storage interface 1150 provides a connection interface for external storage devices such as a floppy disk, a USB flash drive, and an SD card.
[0140] Here, various aspects of the present disclosure are described with reference to flowcharts and / or block diagrams of methods, devices, and computer program products according to embodiments of the present disclosure. It should be understood that each frame of the flowchart and / or block diagram and the combination of frames can be implemented by computer-readable program instructions.
[0141] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable device to produce a machine, so that the processor executes the instructions to produce means for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.
[0142] These computer-readable program instructions can also be readable and stored in a computer-readable memory, which cause the computer to work in a specific manner to produce a product, including instructions for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.
[0143] The present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.
[0144] Through the text generation method and device and computer-readable storage medium in the above embodiments, it is possible to select personalized text that is more suitable for the user's needs for the user, thereby improving the click rate and conversion rate of the aggregation page.
[0145] So far, the text generation method and device, and computer-readable storage medium according to the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed herein.
Claims
1. A text generation method, comprising: Get the theme of the item aggregation page; Determine prompt information according to the theme and user portrait of the item aggregation page; According to the prompt information, a first text generation model is used to generate a plurality of texts describing the item aggregation page, wherein the first text generation model is trained by a cross-domain training set; Selecting a plurality of candidate texts from the plurality of texts according to the relevance of each of the plurality of texts to the topic using a relevance model; In response to receiving a request to display the item aggregation page to a user, a target text to be displayed on the item aggregation page is determined from the multiple candidate texts according to the user portrait.
2. The text generation method according to claim 1, further comprising: At least one of the plurality of texts, the plurality of candidate texts and the target text is corrected using a second text generation model, wherein the second text generation model is trained using a training set of the field to which the article belongs.
3. The text generation method according to claim 1, wherein: The method of selecting a plurality of candidate texts from the plurality of texts by using a relevance model according to the relevance of each of the plurality of texts to the topic comprises: Calculate the relevance of each text to the topic using a relevance model; Calculating the confusion degree of each text using a confusion degree model; A plurality of candidate texts are selected from the plurality of texts according to the relevance of each of the texts to the topic and the confusion degree of each of the texts.
4. The text generation method according to claim 3, wherein: The selecting a plurality of candidate texts from the plurality of texts according to the relevance of each text to the topic and the confusion degree of each text comprises: A plurality of candidate texts are selected from the plurality of texts according to the relevance of each of the texts to the topic, the confusion degree of each of the texts, and the format of each of the texts.
5. The text generation method according to claim 3, wherein: The selecting a plurality of candidate texts from the plurality of texts according to the relevance of each of the plurality of texts to the topic and the confusion degree of each of the plurality of texts comprises: Determine a score for each text according to the relevance of each text to the topic and the confusion degree of each text; The texts with scores higher than a first threshold among the multiple texts are used as the multiple candidate texts.
6. The text generation method according to claim 1, further comprising: By clustering multiple items, the theme of the item aggregation page is determined.
7. The text generation method according to claim 6, wherein: The step of clustering the plurality of items to determine the theme of the item aggregation page includes: Clustering the multiple items to obtain a set of items corresponding to the item aggregation page; The clustering model is used to determine the theme of the set of items corresponding to the item aggregation page as the theme of the item aggregation page.
8. The text generation method according to claim 1, further comprising: When the number of the multiple candidate texts is less than the second threshold, the steps of generating multiple texts describing the item aggregation page and selecting multiple candidate texts from the multiple texts are repeated until the number of the multiple candidate texts is greater than the second threshold.
9. The text generation method according to claim 1, wherein: Each of the plurality of candidate texts corresponds to a preference of the user, and determining, based on the user portrait, a target text to be displayed on the item aggregation page from the plurality of candidate texts includes: Determine the user's current preferences based on current events and user profiles; The candidate text corresponding to the user's current preference is determined as the target text displayed on the item aggregation page.
10. The text generation method according to claim 1, wherein: Determining prompt information according to the subject and user portrait of the item aggregation page includes: Prompt information is determined based on the theme of the item aggregation page, the user portrait, and information of multiple items corresponding to the item aggregation page.
11. A text generation device, comprising: An acquisition module, configured to acquire the subject of the item aggregation page; A first determination module is configured to determine prompt information according to the subject of the item aggregation page and the user portrait; A generation module is configured to generate a plurality of texts describing the item aggregation page according to the prompt information by using a first text generation model, wherein the first text generation model is trained by a cross-domain training set; A selection module is configured to select a plurality of candidate texts from the plurality of texts according to the relevance of each of the plurality of texts to the topic by using a relevance model; The second determination module is configured to determine, in response to receiving a request to display the item aggregation page to the user, a target text to be displayed on the item aggregation page from the multiple candidate texts according to the user portrait.
12. A text generation device, comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the text generation method according to any one of claims 1 to 10 based on instructions stored in the memory.
13. A computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the text generation method according to any one of claims 1 to 10.