Wine scene recommendation method and device based on user generated content and electronic equipment
By obtaining user-generated content and extracting and linking information based on prompt words, combined with the knowledge base and relevance scoring model, it solves the problem of traditional methods being incompatible with multiple entity categories and improves the click-through rate of wine scene resources.
Patent Information
- Application Number
- CN202410761286.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-10-18
AI Technical Summary
The traditional rule-based wine scene recommendation method is not compatible with multiple entity categories, resulting in a low click-through rate for recommended wine scene resources.
By obtaining user-generated content, information is extracted based on preset prompt words to form multiple entity combinations, which are linked to the knowledge base, and the relevance scoring model is used to recommend optimal wine scene resources.
It implements recommendations that are compatible with multiple entity categories, improves the click-through rate of wine scene resources, and recommends resources that are more in line with user needs.
Smart Images

Figure CN118798186A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of wine scene recommendation, and in particular to a wine scene recommendation method, device and electronic device based on user-generated content. Background Art
[0002] Wine scene refers to the abbreviation of scenic spots and hotels. Wine scene recommendation refers to the process of extracting scenic spots and hotel resources contained in user-generated content, processing the scenic spots and hotel resources, and then recommending the resources. The traditional rule-based entity extraction method uses scenic spot dictionaries and hotel dictionaries to build rules and perform text processing and rule matching to extract wine scene information from the text, and then directly recommend it. Commonly used rule methods include word segmentation of text, calculation of text overlap, etc. This method can only identify entity categories in the rules, and cannot be compatible with multiple entity categories that do not appear. The recommended entity category is relatively single, and a single entity category may not meet the user's viewing needs, resulting in a low click-through rate for the recommended wine scene resources. Summary of the invention
[0003] The present application provides a wine scene recommendation method, device and electronic device based on user-generated content, which can be compatible with multiple entity categories and recommend the best wine scene resources from multiple entity categories to improve the click-through rate of wine scene resources.
[0004] The technical solution of the embodiment of the present application is as follows: In a first aspect, an embodiment of the present application provides a wine scene recommendation method based on user-generated content, the method comprising: Obtaining user-generated content, wherein the user-generated content is content published by a user on a preset platform; Based on the preset prompt word, extract information from the user-generated content to obtain multiple information entities, each of which forms multiple entity combinations according to the format of the prompt word; Linking each entity combination with a preset knowledge base to obtain a link result corresponding to each entity combination; Calculating the relevance between the text segments corresponding to each of the link results and the user-generated content to obtain a relevance score; Wine scene resources are recommended based on the relevance score.
[0005] In the above technical scheme, user-generated content is obtained, wherein the user-generated content is content published by users on a preset platform, and the user-generated content can provide a data reference basis for subsequent recommendations; based on preset prompt words, information extraction is performed on the user-generated content without the help of external annotation data to obtain multiple information entities, and each information entity forms a plurality of entity combinations according to the format of the prompt words. By extracting information from the user-generated content based on the prompt words, multiple different categories of entities that meet the description can be extracted for subsequent recommendations; each entity combination is linked to a preset knowledge base to obtain a link result corresponding to each entity combination, and by linking the entity combinations, a recommended link can be found; the text fragment corresponding to each link result is calculated for correlation with the user-generated content to obtain a correlation score, so as to recommend qualified wine scene resources from multiple information entities; wine scene resources are recommended based on the correlation score, and the optimal wine scene resources can be recommended to improve the click-through rate of wine scene resources.
[0006] In some embodiments of the present application, linking each entity combination with a preset knowledge base to obtain a link result corresponding to each entity combination includes: Using each entity combination as a search input of a preset big search interface, searching the wine scene information in the knowledge base, and obtaining multiple search resources corresponding to each entity combination; A similarity calculation is performed between the entity combination and a plurality of search resources corresponding to the entity combination, and the search resource is selected as a link result corresponding to the entity combination according to the obtained similarity value.
[0007] In the above technical solution, each entity combination is first input into the big search interface, and a search is performed in the wine scene information in the knowledge base to obtain multiple search resources corresponding to each entity combination, and then similarity calculation is performed. By linking through the entity combination, the search scope can be narrowed and the recommended links can be found more accurately.
[0008] In some embodiments of the present application, the calculating similarity between the entity combination and a plurality of search resources corresponding to the entity combination, and selecting the search resource as the link result corresponding to the entity combination according to the obtained similarity value, includes: Using a text similarity algorithm, similarity is calculated between the entity combination and the plurality of search resources corresponding to the entity combination to obtain a similarity value; The similarity values are sorted, and the search resource corresponding to the similarity value ranked first or last is selected as the link result corresponding to the entity combination.
[0009] In the above technical solution, by using a text similarity algorithm to calculate similarity and then sorting the similarity values, link results that correspond to the entity combination can be quickly obtained.
[0010] In some embodiments of the present application, the user-generated content is extracted based on a preset prompt word to obtain a plurality of information entities, each of which forms a plurality of entity combinations according to the format of the prompt word, including: Based on the preset prompt words, using the preset large language model, information extraction is performed on the user-generated content to obtain multiple entity names and addresses corresponding to each of the entity names; taking each of the entity names and the addresses corresponding to the entity names as a plurality of the information entities; According to the format of the prompt word, each of the entity names and the addresses corresponding to the entity names are combined into a plurality of entity combinations.
[0011] In the above technical solution, according to the prompt words, a large language model is used to extract information from user-generated content without the help of external annotation data, so that different categories of entities that meet the task description in the prompt words can be obtained, and then combined according to the format of the prompt words to provide a search basis for subsequent recommendations.
[0012] In some embodiments of the present application, the calculating the relevance between the text segment corresponding to each link result and the user-generated content to obtain a relevance score includes: The preset target relevance scoring model is used to calculate the relevance between the text segment corresponding to each link result and the user-generated content to obtain a relevance score.
[0013] In the above technical solution, the relevance score is calculated by the target relevance scoring model, so as to recommend wine scene resources with high user click rate.
[0014] In some embodiments of the present application, the training process of the preset target relevance scoring model includes: Acquire multiple text pairs, and perform text start and text end marking on each of the text pairs to obtain a first marked text and a second marked text; Scoring the first marked text and the second marked text using a preset initial relevance scoring model to obtain a relevance value; The parameters of the initial correlation scoring model are adjusted according to the correlation value, and the initial correlation scoring model is iteratively trained until a preset training end condition is met, so as to obtain the target correlation scoring model.
[0015] In the above technical solution, a target relevance scoring model is obtained by training multiple text pairs, so that the target relevance scoring model is more stable, has better generalization, and can adapt to different text contents.
[0016] In some embodiments of the present application, after recommending wine scene resources based on the relevance score, the method further includes: When the user-generated content is newly added, a timed update process is set to dynamically update the user-generated content, and the wine scene resources are recommended based on the updated user-generated content, and the wine scene resources corresponding to the updated user-generated content are displayed on the front-end page.
[0017] In some embodiments of the present application, scheduled updates are performed by setting a scheduled update process, without the need for manual updates, and user-generated content can be updated in a timely manner. Recommended wine scene resources are displayed on the front-end page for users to view, and users can select the wine scene resources they are interested in to view.
[0018] In a second aspect, an embodiment of the present application provides a wine scene recommendation device based on user-generated content, the device comprising: A data acquisition module, used to acquire user-generated content, wherein the user-generated content is content published by a user on a preset platform; An entity extraction module, configured to extract information from the user-generated content based on a preset prompt word to obtain a plurality of information entities, wherein each of the information entities forms a plurality of entity combinations according to the format of the prompt word; A search link module, used to link each entity combination with a preset knowledge base to obtain a link result corresponding to each entity combination; A correlation calculation module, used to calculate the correlation between the text fragments corresponding to each of the link results and the user-generated content to obtain a correlation score; A recommendation module is used to recommend wine scene resources based on the relevance score.
[0019] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a user interface, a communication bus and a network interface, wherein the processor, the memory, the user interface and the network interface are respectively connected to the communication bus, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods provided in the first aspect.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any one of the methods provided in the first aspect is executed.
[0021] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The method adopts the method of obtaining user-generated content, extracting information from the user-generated content based on prompt words, and then linking the extracted information entities for subsequent recommendation, calculating the correlation between the text fragments corresponding to the link results and the user-generated content, and recommending qualified wine scene resources from multiple information entities. Therefore, the problem that the related technologies are incompatible with multiple entity categories that do not appear, resulting in a low click-through rate for the recommended wine scene resources, is effectively solved. By extracting information, multiple entities of different categories that meet the description can be extracted, and multiple entity categories can be compatible. Then, linking and correlation calculations are performed, and the best wine scene resources are recommended from multiple entity categories, thereby improving the click-through rate of wine scene resources.
[0022] 2. By calculating the correlation through the correlation scoring model, we can obtain the matching degree between the link results and the user-generated content, recommend the link results with high matching degree, and recommend the description that is more consistent with the user-generated content from different types of entities to improve the click-through rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flowchart of a wine scene recommendation method based on user-generated content provided by an embodiment of the present application; Figure 2 yes Figure 1 A schematic flow chart of a sub-step of step S200; Figure 3 yes Figure 1 A schematic flow chart of a sub-step of step S300; Figure 4 yes Figure 3 A schematic flow chart of a sub-step of step S320; Figure 5 is a flowchart of a wine scene recommendation method based on user-generated content provided by another embodiment of the present application; Figure 6 It is a schematic diagram of text annotation of a wine scene recommendation method based on user-generated content provided by an embodiment of the present application; Figure 7 This is a schematic diagram of click-through rate of a wine scene recommendation method based on user-generated content provided by an embodiment of the present application; Figure 8It is a structural schematic diagram of a wine scene recommendation device based on user-generated content provided by an embodiment of the present application; Fig. 9 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0025] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0026] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0027] First, the terms involved in this application are explained.
[0028] User Generated Content (UGC): refers to content uploaded, published, shared, commented on, etc. by users. In this application, UGC mainly refers to text content published by users.
[0029] Large Language Model (LLM): is a natural language processing technology based on deep learning. By building a large and complex neural network model, it can learn and predict the probability distribution of natural language, thereby generating natural, fluent and coherent sentences and paragraphs.
[0030] Prompt: refers to the initial text input to the model when using a large language model. By inputting a suitable prompt, the large language model can generate relevant text that matches the input content and context.
[0031] Entity extraction: It is a basic task in natural language processing, which is used to discover and extract specific types of entities from text data, such as names of people, places, organization names, time, numbers, currencies, etc. The entities extracted in this application refer to scenic spots and hotels. Wine and scenery extraction refers to extracting scenic spots and hotel resources contained in UGC content posted by users, and associating the resources with information in the own library, such as ID, tickets, addresses, etc.
[0032] Click-Through-Rate (CTR): A term in the Internet industry. In this article, it refers to the number of users who actually click on a resource divided by the number of users who are actually exposed to the resource. CTR is an important indicator for measuring the effectiveness of recommendations.
[0033] AB experiment: a part of online users are cut out and divided into two or more groups completely randomly (to ensure the consistency of the population). One group keeps the existing plan, called the control group, and the other group uses the improved plan, called the experimental group. Statistical methods are used to analyze the differences in indicators between the two groups to evaluate whether they meet expectations.
[0034] The embodiment of the present application provides a wine scene recommendation method, device, electronic device and readable storage medium based on user-generated content. The wine scene recommendation method based on user-generated content first obtains user-generated content, wherein the user-generated content is content published by the user on a preset platform, and the user-generated content can provide a data reference basis for subsequent recommendation; based on preset prompt words, information extraction is performed on the user-generated content without the help of external annotation data to obtain multiple information entities, each of which forms multiple entity combinations according to the format of the prompt words, and by extracting information from the user-generated content based on the prompt words, multiple different categories of entities that meet the description can be extracted for subsequent recommendation; each entity combination is linked to a preset knowledge base to obtain a link result corresponding to each entity combination, and by linking the entity combination, a recommended link can be found; the text fragment corresponding to each link result is calculated for the user-generated content to obtain a correlation score, so as to recommend qualified wine scene resources from multiple information entities; wine scene resources are recommended based on the correlation score, and the optimal wine scene resources can be recommended to improve the click rate of wine scene resources.
[0035] It should be noted that the wine and scenic spot recommendation method based on user-generated content is not only applied to the recommendation of scenic spots and hotels, but can also be applied to the recommendation of entities in other fields, for example, food recommendations based on personal preferences published by users.
[0036] The technical solution provided in the embodiments of the present application is further described below in conjunction with the accompanying drawings.
[0037] Reference Figure 1 , Figure 1 It is a flowchart of a wine scene recommendation method based on user-generated content provided by an embodiment of the present application. The wine scene recommendation method based on user-generated content is applied to a wine scene recommendation device based on user-generated content, and is executed by a processor in an electronic device or a readable storage medium. The wine scene recommendation method based on user-generated content includes steps S100, S200, S300, S400, and S500.
[0038] Step S100, obtaining user-generated content, wherein the user-generated content is content published by a user on a preset platform.
[0039] In one embodiment, the preset platform may be a WeChat applet, or a specially developed information publishing platform, on which users can publish information. User-generated content is content published by users on the preset platform. After the user publishes the content, the user-generated content can be obtained from the front-end page of the platform through a preset interface. The user-generated content can provide a data reference basis for subsequent recommendations. Among them, the preset interface can be an API request to transmit the content published by the user through an HTTP request to obtain the text content from the back-end server, or a persistent connection can be established through a websocket to obtain updated text content in real time.
[0040] For example, the user-generated content is: Suzhou Hanshan Temple is famous for the seven-character quatrain "Night Mooring at Maple Bridge" by Tang Dynasty poet Zhang Ji. Although Hanshan Temple is not large in scale, covering an area of only 13,000 square meters, it has become one of the top ten famous temples in China, comparable to Shaolin Temple in Songshan, Lingyin Temple in Hangzhou, Daxiangguo Temple in Kaifeng, Famen Temple in Baoji, and White Horse Temple in Luoyang. Based on the above published content, subsequent links and recommendations are made.
[0041] Step S200: extract information from user-generated content based on preset prompt words to obtain multiple information entities, each of which forms multiple entity combinations according to the format of the prompt words.
[0042] In one embodiment, the preset prompt words are set by professionals according to the task requirements of the user-generated content, and the preset prompt words can be [title of the user-generated content + body of the user-generated content] + task description + return format requirements. Based on the preset prompt words, the user-generated content is extracted using the preset large language model, that is, the hotel and scenic spot entities are extracted to obtain multiple information entities, which is conducive to the subsequent formation of multiple entity combinations based on the information entities for search.
[0043] For example, according to the above user-generated content, the prompt word is [Hanshan Temple Travel Notes\nHanshan Temple in Suzhou is famous for the seven-character quatrain "Night Mooring at Maple Bridge" by the Tang Dynasty poet Zhang Ji. Although Hanshan Temple is not large in scale, covering an area of only 13,000 square meters, it has become one of the top ten famous temples in China, comparable to Shaolin Temple in Songshan, Lingyin Temple in Hangzhou, Daxiangguo Temple in Kaifeng, Famen Temple in Baoji, and White Horse Temple in Luoyang. ]\nPlease read the notes in [] carefully, first find out the scenic spot and the city where the scenic spot is located, then find out the hotel and the city where the hotel is located, and the final result is output in JSON format. The specific format of the output is as follows: {"Scenic Spot": [{"Scenic Spot":"×××","Scenic Spot City":"×××"},...], "Hotel": [{"Hotel":"×××","Hotel City":"×××"},...]}'.
[0044] like Figure 2 As shown, based on the preset prompt words, information is extracted from the user-generated content to obtain multiple information entities, and each information entity forms multiple entity combinations according to the format of the prompt words, including but not limited to the following steps: Step S210 , based on the preset prompt words, using the preset large language model to extract information from the user-generated content, to obtain multiple entity names and addresses corresponding to each entity name.
[0045] In one embodiment, according to the above prompt words and task description, a preset large language model is used to extract information from user-generated content to obtain entity names and addresses corresponding to entity names. In user-generated content, there may be multiple scenic spots, multiple hotels, and multiple scenic spot addresses corresponding to scenic spots and hotel addresses corresponding to hotels. Based on prompt words, information extraction of user-generated content is achieved without the help of external annotation data, and multiple different categories of entities that meet the description can be extracted, and multiple entity categories are compatible, so that multiple entity combinations can be formed for recommendation later.
[0046] Step S220: taking each entity name and the address corresponding to each entity name as a plurality of information entities.
[0047] In one embodiment, the extracted information entities include scenic spots, hotels, scenic spot addresses corresponding to the scenic spots, and hotel addresses corresponding to the hotels. The scenic spots and hotels correspond to entity names, the scenic spot addresses corresponding to the scenic spots and the hotel addresses corresponding to the hotels correspond to addresses, and both entity names and addresses are information entities. By determining the information entities, subsequent combination recommendations can be made.
[0048] Step S230: combining each entity name and the address corresponding to each entity name into a plurality of entity combinations according to the format of the prompt word.
[0049] In one embodiment, each information entity combines each entity name and the address corresponding to the entity name into an entity combination according to the format of the prompt word. For example, a scenic spot and its corresponding scenic spot address are combined into an entity combination, and a hotel and its corresponding hotel address are combined into an entity combination. This allows resources to be linked based on the entity combination in the future, thereby making accurate wine and scenic spot resource recommendations.
[0050] Step S300, linking each entity combination with a preset knowledge base to obtain a link result corresponding to each entity combination.
[0051] In one embodiment, the preset knowledge base is information on scenic spots, hotels and their corresponding addresses that are collected and counted, or corresponding entities in a semantic network. The preset knowledge base stores entities and link results corresponding to the entities, and the link results exist in the form of identifiers such as IDs and uniform resource locators (URLs). Linking each entity combination with the preset knowledge base is a process of linking the entities mentioned in the natural language text with the corresponding entities in a knowledge base or semantic network. It is necessary to determine whether the entity combination obtained based on the user-generated content exists in the knowledge base. If so, find the identifier of the corresponding entity in the knowledge base to obtain the link result. By linking the entity combination, the recommended link can be found.
[0052] like Figure 3 As shown, linking each entity combination with a preset knowledge base to obtain a link result corresponding to each entity combination includes but is not limited to the following steps: Step S310, using each entity combination as a search input of a preset big search interface, searching the wine scene information in the knowledge base, and obtaining multiple search resources corresponding to each entity combination.
[0053] In some possible embodiments of the present application, the preset big search interface is a search engine interface, which refers to an interface for interacting with these large search engines (such as Baidu, Google, local travel, etc.) to obtain search results, advertising data or other related information. First, the input of the big search interface is determined, and each entity combination is used as the search input of the preset big search interface. Since the entity combination includes both the entity name and the address, when searching in the wine scene information in the knowledge base, not only the entity name can be matched, but also the corresponding address can be matched, so that the search results are more accurate.
[0054] Exemplarily, the entity combination is Suzhou Shuxiang Shijia, the scenic spot name is Shuxiang Shijia, and the address is Suzhou. When searching, you can search for Shuxiang Shijia and limit it by the address Suzhou, dividing the scope into Shuxiang Shijia in Suzhou, rather than Shuxiang Shijia in other areas. By narrowing the search scope, the matching accuracy of the search can be improved.
[0055] Step S320 , calculating similarity between the entity combination and a plurality of search resources corresponding to the entity combination, and selecting a search resource as a link result corresponding to the entity combination according to the obtained similarity value.
[0056] In one embodiment, similarity is calculated between an entity combination and multiple search resources corresponding to the entity combination, and the one with the highest similarity is selected from the multiple search resources as a link result. The linked search resource can fully reflect the content of the entity combination to facilitate subsequent recommendations that better meet user needs.
[0057] like Figure 4 As shown, similarity calculation is performed between the entity combination and the multiple search resources corresponding to the entity combination, and the search resource is selected as the link result corresponding to the entity combination according to the obtained similarity value, including but not limited to the following steps: Step S321 , using a text similarity algorithm, similarity is calculated between the entity combination and the multiple search resources corresponding to the entity combination to obtain a similarity value.
[0058] In some possible embodiments of the present application, a text similarity algorithm is used to calculate the similarity between an entity combination and multiple search resources corresponding to the entity combination to obtain a similarity value, wherein the text similarity algorithm may be a cosine similarity algorithm, a Euclidean distance, or a semantic-based similarity. Exemplarily, a cosine similarity algorithm is used to calculate the similarity between an entity combination and multiple search resources, firstly, the entity combination and each search resource are vectorized, and then a cosine calculation is performed on the converted vectors to obtain a similarity value, which is beneficial for obtaining a link result of a subsequent search based on the similarity value.
[0059] Step S322 , sorting the similarity values, and selecting the search resource corresponding to the first or last similarity value as the link result corresponding to the entity combination.
[0060] In some possible embodiments of the present application, the similarity values are sorted, either in ascending order or in descending order. In the case of ascending order, the search resource corresponding to the last similarity value is selected as the link result corresponding to the entity combination; in the case of descending order, the search resource corresponding to the first similarity value is selected as the link result corresponding to the entity combination. The link result is in the form of a uniform resource locator, ID, entity identifier, etc.
[0061] Step S400 , calculating the relevance between the text segment corresponding to each link result and the user-generated content to obtain a relevance score.
[0062] In one embodiment, the correlation between the text segment corresponding to each link result and the user-generated content is calculated to obtain a correlation score, including but not limited to: using a preset target correlation scoring model to calculate the correlation between the text segment corresponding to each link result and the user-generated content to obtain a correlation score.
[0063] Among them, the target relevance scoring model can score the SimBERT similarity. SimBERT is a text semantic matching model based on a pre-trained language model (Bidirectional Encoder Representations from Transformers, BERT). It uses two BERT models to encode the input text pairs respectively, and then merge them into a score to measure the semantic similarity between the two texts. The pre-training model used by SimBERT is the same as BERT. Both are deep bidirectional representation learning models based on Transformer, pre-trained on a large-scale corpus. Through the SimBERT similarity scoring model for correlation calculation, the similarity between two texts can be accurately calculated, so as to recommend qualified wine scene resources from multiple information entities.
[0064] like Figure 5 As shown, the training process of the preset target relevance scoring model includes but is not limited to the following steps: Step S610, obtaining multiple text pairs, marking the beginning and the end of each text pair, and obtaining a first marked text and a second marked text.
[0065] In one embodiment, a text pair is two text sentences that express the same meaning but have different text order or text structure. For example, in the text pair, one of the texts is How to cook boiled chicken? The other text can be How to make a delicious boiled chicken. Then the text pair is manually annotated, and the CLS identifier is at the beginning of one of the texts, and the end mark of the text is SEP, and it is used as the text start of the other text in the text pair, and the end mark of the other text is SEP mark, to obtain the first marked text and the second marked text. It is beneficial to subsequently score the first marked text and the second marked text to determine the degree of association between the texts. It is also possible to obtain annotated text pairs from the Internet through crawler technology, so that the above multiple texts can be used to train the algorithm model later.
[0066] For each text pair, the above manual annotation method is used to annotate the text pair. Figure 6 As shown, each text is represented by an identifier.
[0067] Step S620: score the first marked text and the second marked text using a preset initial relevance scoring model to obtain a relevance value.
[0068] In one embodiment, the initial relevance scoring model may be a SimBERT similarity scoring model. First, the first marked text and the second marked text vectors are processed, and then the first marked text and the second marked text are scored using the SimBERT similarity scoring model, and the relevance between the first marked text and the second marked text is calculated to obtain a relevance value, so that the relevance value can be used to train the initial relevance scoring model later.
[0069] For example, input: ["How is the weather today", "How is the weather today"], output: 0.99, indicating that the meanings of the two texts are highly similar; input: ["How is the weather today", "Today is Monday"], output: 0.59, indicating that the meanings of the two texts are quite different. By scoring multiple different types of text pairs, the parameters of the initial relevance scoring model can be adjusted later to increase the generalization of the model.
[0070] Step S630, adjusting the parameters of the initial correlation scoring model according to the correlation value, and iteratively training the initial correlation scoring model until the preset training end condition is met, thereby obtaining a target correlation scoring model.
[0071] In one embodiment, the preset training end condition can be that the loss function tends to be stable, or that a preset number of training times is reached, or a combination of the two. The relevance values corresponding to each text pair are summed up, that is, the loss function (sum function) is used for calculation, and the result of the calculation is used as the loss function value. The loss function value is used to adjust the parameters of the initial relevance scoring model. If the preset training end condition is not met, the initial relevance scoring model is continuously iterated until the preset training end condition is met to obtain the target relevance scoring model. This is conducive to the subsequent use of the target relevance scoring model to calculate the similarity between texts in order to recommend wine and scene resources.
[0072] Step S500: recommending wine scene resources based on the relevance score.
[0073] In one embodiment, according to the relevance score obtained in step S400, a higher score indicates that the recommended wine scene resource link is closer to the user-generated content and is more likely to be clicked by the user, and the relevance scores are arranged from large to small, and the top N wine scene resources are recommended. N may be 2, 3, etc. For user-generated content, if there are multiple entity names, the relevant ID or URL corresponding to the entity name with the highest relevance score is recommended as the link result.
[0074] In one embodiment, after recommending wine scene resources based on relevance scores, the wine scene recommendation method based on user-generated content also includes but is not limited to: when new user-generated content is added, setting a scheduled update process, dynamically updating the user-generated content, and recommending wine scene resources based on the updated user-generated content, and displaying the wine scene resources corresponding to the updated user-generated content on the front-end page.
[0075] In some possible embodiments of the present application, there may be users posting content on the platform every day, so the user-generated content may be added or edited and changed every day. In the case of editing, changing or adding the user-generated content, a timed update process is set to execute the storage of the updated user-generated content in the backend library. After the user-generated content is dynamically updated, it is detected that the backend library has updated the content, and then the user-generated content is extracted, and entity extraction is performed according to the above steps S100 to S500, and wine scene resources are recommended according to the updated user-generated content, and the wine scene resources corresponding to the updated user-generated content are displayed on the front-end page so that users can click to view.
[0076] In one embodiment, in the front-end user interface, users generate content to mount wine scene resources, and the click rate of the recommended wine scene resources is calculated based on the clicks and views of users on the front-end page. An AB experiment is set up, A is the control group, which is the click rate before the launch, and B is the experimental group, which is the click rate after the launch. Figure 7As shown, through the wine scene resources recommended by the embodiment of the present application, the first half of the curve is before the launch, and the second half of the curve is after the launch. The click rate before and after the launch is relatively increased by 73%.
[0077] like Figure 8 As shown, the embodiment of the present application provides a wine scene recommendation device 100 based on user-generated content. The wine scene recommendation device 100 based on user-generated content obtains user-generated content through a data acquisition module 110, wherein the user-generated content is content published by the user on a preset platform, and the user-generated content can provide a data reference basis for subsequent recommendations; then, the entity extraction module 120 extracts information from the user-generated content based on preset prompt words to obtain multiple information entities, and each information entity forms multiple entity combinations according to the format of the prompt words. By extracting information from the user-generated content based on the prompt words, it is possible to extract Extract various entities of different categories that meet the description for subsequent recommendation; utilize the search link module 130 to link each entity combination with the preset knowledge base to obtain the link results corresponding to each entity combination, and by linking the entity combinations, find the recommended links; calculate the correlation between the text fragments corresponding to each link result and the user-generated content through the relevance calculation module 140 to obtain the relevance score, so as to recommend qualified wine scene resources from multiple information entities; finally, use the recommendation module 150 to recommend wine scene resources based on the relevance score, so as to recommend the best wine scene resources and improve the click-through rate of wine scene resources.
[0078] It should be noted that the data acquisition module 110 is connected to the entity extraction module 120, the entity extraction module 120 is connected to the search link module 130, the search link module 130 is connected to the correlation calculation module 140, and the correlation calculation module 140 is connected to the recommendation module 150. The above-mentioned wine scene recommendation method based on user-generated content is applied to the wine scene recommendation device 100 based on user-generated content. The wine scene recommendation device 100 based on user-generated content can extract multiple different categories of entities that meet the description by performing information extraction, is compatible with multiple entity categories, and then performs link and correlation calculations to recommend the best wine scene resources from multiple entity categories, thereby improving the click rate of wine scene resources.
[0079] It should also be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0080] The present application also discloses an electronic device. Fig. 9 , Fig. 9 The electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .
[0081] The communication bus 502 is used to realize the connection and communication between these components.
[0082] The user interface 503 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.
[0083] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0084] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.
[0085] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. Refer to Fig. 9 , the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program of a wine scene recommendation method based on user-generated content.
[0086] exist Fig. 9 In the electronic device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 501 can be used to call the application program stored in the memory 505 for a wine scene recommendation method based on user-generated content, and when executed by one or more processors 501, the electronic device 500 executes one or more methods in the above-mentioned embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0087] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0088] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0089] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0090] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0091] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, 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, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0092] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0093] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A wine scene recommendation method based on user-generated content, It is characterized in that The method comprises: Obtaining user-generated content, wherein the user-generated content is content published by a user on a preset platform; Based on the preset prompt word, extract information from the user-generated content to obtain multiple information entities, each of which forms multiple entity combinations according to the format of the prompt word; Linking each entity combination with a preset knowledge base to obtain a link result corresponding to each entity combination; Calculating the relevance between the text segments corresponding to each of the link results and the user-generated content to obtain a relevance score; Wine scene resources are recommended based on the relevance score.
2. The method according to claim 1, It is characterized in that The linking of each entity combination with a preset knowledge base to obtain a link result corresponding to each entity combination includes: Using each entity combination as a search input of a preset big search interface, searching the wine scene information in the knowledge base, and obtaining multiple search resources corresponding to each entity combination; A similarity calculation is performed between the entity combination and a plurality of search resources corresponding to the entity combination, and the search resource is selected as a link result corresponding to the entity combination according to the obtained similarity value.
3. The method according to claim 2, It is characterized in that The calculating similarity between the entity combination and a plurality of search resources corresponding to the entity combination, and selecting the search resource as the link result corresponding to the entity combination according to the obtained similarity value, includes: Using a text similarity algorithm, similarity is calculated between the entity combination and the plurality of search resources corresponding to the entity combination to obtain a similarity value; The similarity values are sorted, and the search resource corresponding to the similarity value ranked first or last is selected as the link result corresponding to the entity combination.
4. The method according to claim 1, It is characterized in that The method further comprises extracting information from the user-generated content based on the preset prompt word to obtain a plurality of information entities, wherein each of the information entities forms a plurality of entity combinations according to the format of the prompt word, including: Based on the preset prompt words, using the preset large language model, information extraction is performed on the user-generated content to obtain multiple entity names and addresses corresponding to each of the entity names; taking each of the entity names and the addresses corresponding to the entity names as a plurality of the information entities; According to the format of the prompt word, each of the entity names and the addresses corresponding to the entity names are combined into a plurality of entity combinations.
5. The method according to claim 1, It is characterized in that The calculating the relevance between the text segments corresponding to the link results and the user-generated content to obtain a relevance score includes: The preset target relevance scoring model is used to calculate the relevance between the text segment corresponding to each link result and the user-generated content to obtain a relevance score.
6. The method according to claim 5, It is characterized in that The training process of the preset target relevance scoring model includes: Acquire multiple text pairs, and perform text start and text end marking on each of the text pairs to obtain a first marked text and a second marked text; Scoring the first marked text and the second marked text using a preset initial relevance scoring model to obtain a relevance value; The parameters of the initial correlation scoring model are adjusted according to the correlation value, and the initial correlation scoring model is iteratively trained until a preset training end condition is met, so as to obtain the target correlation scoring model.
7. The method according to claim 1, It is characterized in that After recommending wine scene resources based on the relevance score, the method further includes: When the user-generated content is newly added, a timed update process is set to dynamically update the user-generated content, and the wine scene resources are recommended based on the updated user-generated content, and the wine scene resources corresponding to the updated user-generated content are displayed on the front-end page.
8. A wine scene recommendation device based on user-generated content, It is characterized in that The device comprises: A data acquisition module, used to acquire user-generated content, wherein the user-generated content is content published by a user on a preset platform; An entity extraction module, configured to extract information from the user-generated content based on a preset prompt word to obtain a plurality of information entities, wherein each of the information entities forms a plurality of entity combinations according to the format of the prompt word; A search link module, used to link each entity combination with a preset knowledge base to obtain a link result corresponding to each entity combination; A correlation calculation module, used to calculate the correlation between the text fragments corresponding to each of the link results and the user-generated content to obtain a correlation score; A recommendation module is used to recommend wine scene resources based on the relevance score.
9. An electronic device, It is characterized in that The electronic device (500) comprises a processor (501), a memory (505), a user interface (503), a communication bus (502) and a network interface (504), wherein the processor (501), the memory (505), the user interface (503) and the network interface (504) are respectively connected to the communication bus (502), the memory (505) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (505) so that the electronic device (500) executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is executed.
