Object tag recommendation method and device and medium
By constructing a tag library using a large language model and sorting it by combining tag popularity information, the problem of high generation cost and low accuracy in existing tag recommendation schemes is solved, achieving more efficient tag recommendation and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2026-03-10
AI Technical Summary
In existing tag recommendation schemes, the combination of tag information depends on object information, resulting in high generation and verification costs. Furthermore, the diversity of query terms leads to low accuracy in similar feature retrieval, failing to effectively cover different query needs.
By using a large language model to classify and identify tags in data sources containing object description information, a tag library with multiple pre-stored tag information is constructed. The tags are then ranked using the tag recognition results and tag popularity information, and a second large language model is used for recommendation ranking.
It improves the accuracy and comprehensiveness of tag recommendations, reduces tag generation costs, can adapt to tag mining from diverse data sources, covers various query needs, and enhances user experience.
Smart Images

Figure CN121636797A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to an object tag recommendation method, apparatus and medium. Background Technology
[0002] E-commerce platforms and other object recommendation platforms typically employ tag-based recommendation schemes, which facilitate rapid application deployment and business performance verification. Existing tag recommendation schemes usually utilize object information from the object provider (such as product information from a product provider) to obtain object tags, thereby generating tag features to be recommended. These features are then retrieved based on query terms, or query terms combined with user-related information, to obtain recommendable tag information. While this approach has low computational time, the combination of object tags in the tag information depends on the object information itself, resulting in high generation and verification costs. Furthermore, query terms are diverse; for example, there may be similar query terms with different search targets, or different query terms with the same search target. This leads to low accuracy in similarity feature retrieval and an inability to effectively cover diverse query needs. Summary of the Invention
[0003] This application provides an object tag recommendation method, apparatus, and medium that can significantly improve the accuracy of object tag recommendation.
[0004] On the one hand, this application provides an object tag recommendation method, the method comprising:
[0005] Retrieve query information;
[0006] The query information is subjected to object tag recognition to obtain tag recognition results;
[0007] Based on the tag recognition results, multiple candidate tag information is retrieved from the tag library. The tag library includes multiple pre-stored tag information, at least one object tag for describing an object and the tag value of the object tag. The pre-stored tag information is obtained by tag classification and recognition of a data source containing object description information based on the first language model.
[0008] Obtain the tag popularity information for each of the candidate tags;
[0009] The query information, multiple candidate tag information, and tag popularity information of the candidate tag information are added to the instruction template of the second language model to sort the tags based on the second language model and obtain the recommended sort of the multiple candidate tag information.
[0010] On the other hand, an object tag recommendation device is provided, the device comprising:
[0011] First acquisition module: used to acquire query information;
[0012] Tag recognition module: used to perform object tag recognition on the query information and obtain tag recognition results;
[0013] Tag retrieval module: used to retrieve multiple candidate tag information from the tag library based on the tag recognition result. The tag library includes multiple pre-stored tag information, at least one object tag for describing an object and the tag value of the object tag. The pre-stored tag information is obtained by tag classification and recognition of a data source containing object description information based on the first language model.
[0014] The second acquisition module is used to acquire the tag popularity information of each of the candidate tag information;
[0015] The sorting module is used to add the query information, multiple candidate tag information, and the tag popularity information of the candidate tag information to the instruction template of the second language model, so as to sort the tags based on the second language model and obtain the recommended sort of the multiple candidate tag information.
[0016] On the other hand, a computer device is provided, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the object tag recommendation method as described above.
[0017] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the object tag recommendation method as described above.
[0018] On the other hand, a server is provided, the server including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the object tag recommendation method as described above.
[0019] On the other hand, a terminal is provided, the terminal including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the object tag recommendation method as described above.
[0020] On the other hand, a computer program product or computer program is provided, which includes computer instructions that, when executed by a processor, implement the object tag recommendation method as described above.
[0021] The object tag recommendation method, apparatus, device, storage medium, server, terminal, computer program, and computer program product provided in this application have the following technical effects:
[0022] The technical solution of this application uses a large language model to classify and identify tags in data sources containing object description information, thereby creating a tag library with multiple pre-stored tag information. This adapts to tag mining from diverse data sources and reduces tag generation costs. Furthermore, after obtaining query information, object tag recognition is performed to map diverse and complex query information into tag recognition results. Candidate tag information is then retrieved from the tag library based on the tag recognition results. This avoids the problem of inaccurate feature retrieval caused by the diversity of query terms, enabling tag queries to cover query needs with different query information and improving the accuracy and comprehensiveness of tag recall. In addition, query information, candidate tag information, and tag popularity information are used as inputs to a second large language model for recommendation ranking. This is combined with the original input query for fine-tuning, further improving the fit between the output results and the input query, and enhancing the user experience.
[0023] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0024] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application;
[0026] Figure 2 This is a flowchart illustrating an object tag recommendation method provided in an embodiment of this application;
[0027] Figure 3 This is a partial diagram of an association relationship map provided in an embodiment of this application;
[0028] Figure 4 This is a flowchart illustrating another object tag recommendation method provided in an embodiment of this application;
[0029] Figure 5 This is a flowchart illustrating another object tag recommendation method provided in an embodiment of this application;
[0030] Figure 6This is a schematic diagram illustrating the principle of tag mining and tag information recommendation in an object tag recommendation method provided in this application embodiment;
[0031] Figure 7 This is a schematic diagram illustrating the principle and flow of tag information recommendation provided in an embodiment of this application;
[0032] Figure 8 This is a schematic diagram of the framework of an object tag recommendation device provided in an embodiment of this application;
[0033] Figure 9 This is a hardware structure block diagram of an electronic device that performs an object tag recommendation method according to an embodiment of this application. Detailed Implementation
[0034] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or sub-modules is not necessarily limited to those steps or sub-modules explicitly listed, but may include other steps or sub-modules not explicitly listed or inherent to such processes, methods, products, or devices.
[0036] Please see Figure 1 , Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application, such as... Figure 1 As shown, this application environment may include at least server 01.
[0037] In this application embodiment, server 01 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0038] Specifically, the server 01 mentioned above may include a physical device, which may include a network communication submodule, a processor and a memory, etc., and may also include software running on the physical device, which may include applications, etc.
[0039] In this embodiment, server 01 can be used to obtain query information, perform object tag recognition on the query information, obtain tag recognition results, and then retrieve multiple candidate tag information from the tag library based on the tag recognition results; call the second language model, add the tag recognition results, multiple candidate tag information and the popularity information of the candidate tag information to the instruction template of the second language model, sort the tags, and obtain the recommended sort of multiple candidate tag information.
[0040] Furthermore, it is understandable that Figure 1 The illustration only depicts an application environment for an object tag recommendation method. This environment may include more or fewer nodes, and this application does not impose any limitations on it. For example, it may also include a terminal, and the terminal and server 01 may be directly or indirectly connected via wired or wireless communication, and this application does not impose any limitations on that either. Specifically, the terminal may include physical devices such as smartphones, desktop computers, tablets, laptops, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart voice interaction devices, smart home appliances, smart wearable devices, and in-vehicle terminal devices, and may also include software running on the physical device, such as applications.
[0041] It is understood that in the specific implementation of this application, data such as query information, data source, and tag popularity information are involved. When the embodiments of this application are applied to specific products or technologies, permission or consent from users or related parties is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0042] The technical solution of this application is described below based on the aforementioned application environment. The embodiments of this application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving. Please refer to... Figure 2, Figure 2 This is a flowchart illustrating an object tag recommendation method provided in an embodiment of this application. This specification provides method operation steps as shown in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual system or server product execution, the method can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as... Figure 2 As shown, the method may include the following steps S201-S205:
[0043] S201: Obtain query information.
[0044] Specifically, query information can be text containing query terms, image information including pictures, or multimodal information including at least two of the following: text, images, and voice. In some cases, query information can be generated based on query data submitted online in real time; in other cases, query information can be historically submitted query information or information generated through offline simulation. For example, the query information for a product object is "knitted vest".
[0045] S203: Perform object label recognition on the query information to obtain the label recognition result.
[0046] Specifically, the query information is input into the intelligent model for object label recognition. If the query information is text, the model identifies the object labels or label values corresponding to the object labels in the query information, or identifies words related to the object labels or label values in the query information and maps them to object labels or label values. If the query information includes speech, it is first recognized as text, and then the aforementioned text object label recognition process is performed. If the query information includes images, machine vision-based object recognition is first performed on the images to obtain object recognition results representing object categories and names. Then, the object recognition results are mapped to object labels and label values to obtain label recognition results. That is, the label recognition results are used to represent the target object labels to be searched corresponding to the query information and the label values of each target object label.
[0047] Specifically, object tags can be a collective term for entity words in a relevant knowledge domain, such as the collective term for entity words in the e-commerce field. Object tags can include tag words. In the e-commerce field, tag words can include, but are not limited to, product words, brand words, and different attribute words. Product words include categories, brand words include brands, and attribute words include style, function, color, material, ingredients, style, place of origin, target audience, applicable scenarios, and applicable seasons. Each tag word can correspond to one or more tag values. For example, style values under the clothing, footwear, and bag category include Maillard, dopamine, and girly style, while style values include long, short, and mid-length. A tag word paired with one of its tag values can form an atomic piece of information, such as <product word, down jacket>, <brand word, XX>, or attribute words related to <style, long>, <target audience, children>, etc. In some cases, object tags also include categories. A category is a description of the class attribute to which the tag term belongs. For example, in e-commerce, product objects are further divided into categories; for instance, down jackets belong to the clothing category. Categories can also be multi-level descriptions; for example, lipsticks are categorized as "Makeup - Lip Makeup - Lipstick / Lip Gloss." In some cases, for the effectiveness of object tags, the atomic information of a tag term and tag value can belong to multiple categories. For example, "product term - longan" belongs to both the categories "Fruit" and "Traditional Chinese Medicine." This ensures that the tag recognition results include not only the tag term but also category information, facilitating more accurate matching of candidate tag information.
[0048] Understandably, query information may contain tag values, or tag values may be obtained by directly mapping the query information to text, such as "knitted vest". During object tag recognition, the identified tag values also need to be classified to determine the object tag to which the tag value belongs. For example, the tag recognition result for the query "knitted vest" is "Material: Knit, Product: Vest", where "Material" and "Product" are object tags, and "Knit" and "Vest" are tag values. In some cases, the classification result also includes the category recognition result of tag words and tag values, such as the tag recognition result for "knitted vest" being "Category: Clothing, Material: Knit, Product: Vest".
[0049] Specifically, object tag recognition can be achieved based on entity recognition or large language models, as well as knowledge from knowledge bases related to the application scenario. For example, the knowledge base in the e-commerce field can be a domain-wide knowledge graph or a tag library built using the first large language model discussed later. Based on the entity recognition model, the association relationships between tag words / tag values in the knowledge graph or tag library, or the association relationships between categories / tag words / tag values, can be used as entity recognition knowledge to perform object tag recognition on the query information, obtaining tag recognition results. Alternatively, the query information can be input into the first large language model for object tag recognition, yielding tag recognition results. The entity recognition model is obtained through constrained training based on the knowledge graph of the application scenario; large language models (LLMs) are natural language processing models based on deep learning. They learn general language patterns and knowledge through pre-training on massive amounts of text data, or they can be combined with machine vision modules to obtain the ability to recognize multimodal information through fine-tuning training of image-text mapping; the first large language model is obtained through fine-tuning training of data sources containing object description information based on the knowledge graph of the application scenario for object tag classification and recognition. In a preferred embodiment, the first language model is used for object label recognition to improve the matching between the label recognition results and the pre-stored label information in the label library constructed by the first language model.
[0050] S205: Retrieve information on multiple candidate tags from the tag library based on the tag recognition results.
[0051] Specifically, the tag library includes multiple pre-stored tag information entries, used to describe at least one object tag and the tag value of the object tag. The object described by the pre-stored tag information refers to the entity object to be recommended, such as products, advertisements, articles, videos, etc. The pre-stored tag information can include one or more object tags and corresponding values, and each pre-stored tag can correspond to one or more objects. Similar to the tag recognition results, the pre-stored tag information can include tag words and tag values in the object tags, or it can include categories and tag words in the object tags, as well as corresponding tag values. For example, the pre-stored tag information can be, for instance, "{Category: Lipstick, Brand: XXX, Attribute: {Target Audience: Adults, Suitable Skin Type: Any Skin Type, Makeup Finish: [Matte, Matte]}}", or "{Category: Makeup - Lip Makeup - Lipstick / Lipstick, Category: Lipstick, Brand: XXX, Attribute: {Target Audience: Adults, Suitable Skin Type: Any Skin Type, Makeup Finish: [Matte, Matte]}}", or "{Category: Entertainment, Category: Movie, Product Keyword: XXX, Attribute: {Target Audience: 15+, Genre: Horror}}" (where the product keyword is the movie title).
[0052] Specifically, the pre-stored tag information is obtained by classifying and identifying tags in data sources containing object description information based on the first major language model. Data sources may include, but are not limited to, reference query information, object attribute information, or object recommendation articles; reference query information can be query information generated from historically searched query data, including historical query terms, or simulated query information; object attribute information includes detailed information about the object description, which can be provided by the object provider, such as product information or product manuals provided by the product provider; object recommendation articles can be articles used to describe or promote the object, such as WeChat official account promotion articles or advertising copy.
[0053] Accordingly, in some embodiments, references Figure 4 The methods for obtaining pre-stored tag information include S301-S305:
[0054] S301: Obtain multiple data sources;
[0055] S303: Based on the first major language model, perform knowledge graph-based tag classification and recognition on multiple data sources to obtain initial tag information from multiple data sources;
[0056] S305: Filter out the pre-stored tag information from each initial tag information.
[0057] Specifically, a knowledge graph includes multiple object tags and the relationships between multiple tag values used to describe objects. For example, in the e-commerce field, a knowledge graph can include the relationships between product object categories, tags, and tag values. Correspondingly, to better identify product terms, brand terms, and attribute terms in data sources such as query terms and product information, tens of thousands of labeled data points can be pre-processed on a general-purpose model to obtain the first major language model. The labeled data includes data sources that have labeled the true values of the object tag-tag value recognition results.
[0058] After acquiring the first large language model, using data sources and tag mining-related instruction templates as input, and based on the association knowledge of object tags and tag values recorded in the knowledge graph, tag classification and identification are performed in the data source to obtain object tags and tag values semantically related to the data source. This includes tag words, tag values, and categories contained in or with the same meaning within the data source, such as product terms, brand terms, and attributes of product objects. Initial tag information is generated, and results that meet the tag requirements are selected from the generated initial tag information to serve as pre-stored tag information for constructing a tag library. The instruction templates can be set based on the application scenario requirements of tag mining. In this way, combining knowledge graphs to provide knowledge assistance and guidance for tag mining of the large language model, and using diverse data sources as input, collaboratively improves the diversity, domain comprehensiveness, and accuracy of pre-stored tag information in the tag library.
[0059] For example, the following table shows an example of using the first major language model for product label classification and recognition.
[0060]
[0061]
[0062] The form of a query can vary; some may have different descriptive text formats but the same search intent. Figure 1 For example, the text expressions for "down jacket for children" and "children's down jacket" are very similar, but the search intents are very different. Similarly, "milk chocolate" and "chocolate milk" are different; the former refers to milk-flavored chocolate, while the latter refers to chocolate-flavored milk. Object-side descriptions are also diverse. The tag values for object descriptions may differ, but the associated tag words and objects may be consistent. For example, "cherry nail polish" and "cherry-colored nail polish" both describe the same color of nail polish. The semantic understanding capabilities of large language models can effectively identify query information with different forms but the same intent, or query information with similar forms but different intents, avoiding tag mismatch.
[0063] In some embodiments, after generating multiple pre-stored tag information based on the first language large model and adding them to the tag library, a relationship graph between object tags and tag values is further constructed in the tag library based on each pre-stored tag information. For example, a relationship graph between category, tag word, and tag value is constructed, where each node is atomic information formed by tag word and tag value pairs. For example, in the e-commerce field, relationships between product words and tag values, brand words and tag values, and various attribute words and tag values can be constructed. For example, each attribute word and tag value must belong to one or more product words and tag values to ensure the validity of attribute tag words. For example, if the attribute word and tag value is "style-long", it can belong to "product word-down jacket" or "product word-dress". This relationship graph can be used in the aforementioned S203 as auxiliary knowledge for object tag recognition, and can also be used as auxiliary knowledge for object tag recognition of target query information in S403 below to improve the accuracy of tag recognition.
[0064] In one example, refer to Figure 3The diagram shows a portion of the nodes in the generated relationship graph. Each node carries its type, such as belonging to a product term, brand term, or attribute term. Each node only shows the specific tag value. Goose down and duck down belong to the attribute term "material," down jacket belongs to the product term "category," long, short, and mid-length belong to the attribute term "style," dress belongs to the product term "category," and Maillard, dopamine, and girly style belong to the attribute term "style." By matching each tag value with a type and associating each attribute value, the problem of tag values with the same description belonging to different attribute terms simultaneously, or belonging to both product terms and attribute terms, can be solved. As mentioned earlier, on the query side, there are cases where the query information is similar but the search intent is very different (such as milk chocolate and chocolate milk). On the object side, there are also cases where the object description is similar but the object type is completely different, such as the product "cherry nail polish." In this case, the tag value "cherry" is the attribute term "color," while in "imported Chilean cherries," "cherry" is a product term. By constructing the aforementioned relationship graph, the relationships between each tag value and different object tags can be clearly bound. During matching and recognition, the type information of the tag value can be directly read, effectively identifying and distinguishing the meaning and target of the same text word belonging to different tag words in the current search, thereby improving the accuracy of tag retrieval and recommendation.
[0065] In some embodiments, S305, which filters pre-stored tag information from the initial tag information, may include S3051-S3054:
[0066] S3051: Based on a preset regular expression matching algorithm, invalid labels are filtered out from each initial label information to obtain multiple valid label information;
[0067] Specifically, the regular expressions in the preset regular expression matching algorithm can be set based on tag cleaning requirements to filter initial tag information that does not meet the tag recommendation conditions. For example, filtering object tags that are purely numeric, have approval numbers, or have a tag character length exceeding a preset length can be done based on regular expressions. Specifically, a single initial tag information can be filtered as a whole, or a portion of the object tags in the initial tag information can be filtered to obtain the tag filtering result for that initial tag information. For example, filtering the following object tags in the initial tag information: price range ["0-100", "101-200", "201-300"], activity type ["regular promotion", "New Year's shopping festival", "March 8th Women's Day"], etc.
[0068] S3052: Obtain the tag popularity information for each valid tag;
[0069] Specifically, tag popularity information indicates the recommendation value of tag information. The higher the popularity indicated by the tag popularity information, the higher the recommendation value, and vice versa. More specifically, tag popularity information can reflect the level of attention tag information receives, such as search frequency, conversion rate, or exposure.
[0070] In a possible implementation, obtaining tag popularity information for each valid tag includes: obtaining key performance indicator (KPI) data from at least one of the following: reference query information, object attribute information, and object recommendation articles corresponding to the valid tag information; calculating popularity based on the KPI data to obtain a popularity value from at least one of the reference query information, object attribute information, and object recommendation articles; and fusing the popularity values from at least one of the reference query information, object attribute information, and object recommendation articles to obtain tag popularity information. Thus, calculating the final popularity of a tag using the popularity data from various sources for valid tags can improve the data dimensionality and comprehensiveness of popularity information representation, thereby improving retrieval and ranking accuracy.
[0071] Specifically, key performance indicator (KPI) data quantifies the exposure or conversion rate of reference query information, object attribute information, and object-recommended articles. Examples include the number of reads of object-recommended articles, the clicks and conversions (such as sales or downloads) of objects belonging to the object attribute information, and the search volume of the reference query. For each data source, a popularity value is calculated based on its KPI data. This popularity value is obtained after normalizing the KPI data; for example, dividing the number of reads of object-recommended articles by the total number of reads of all object-recommended articles on the platform yields the popularity value. Then, the popularity values are merged. This merging can refer to simple summation, weighted summation, or normalization after summation.
[0072] S3053: Sort each valid tag information by popularity based on tag popularity information to obtain the popularity ranking result;
[0073] S3054: Based on the popularity ranking results, filter out the pre-stored tag information from each valid tag information.
[0074] Specifically, ranking by popularity allows for the identification of effective tags with higher popularity values, while filtering out tags with lower popularity. Thus, by using a pre-defined regular expression matching algorithm and tag popularity information to filter and clean the tags mined by the large language model, tag quality is improved, thereby enhancing the accuracy of subsequent tag retrieval and recommendation.
[0075] Specifically, in the popularity ranking process, effective tag information under different category-tag combinations can be sorted and filtered to ultimately obtain the top n popular pre-stored tag information for each category-tag pair. The number of tags (n) for filtering different category-tag pairs can be the same or different. The filtering rules based on the popularity ranking results can be the same or different; for example, the top 40% of the sorted tags can be selected, or effective tag information with a popularity value greater than a preset threshold can be used. For instance, in the e-commerce frequency domain, for each category-product word pair, relevant effective tag information is sorted and filtered to obtain the top n pre-stored tag information for each category-product word.
[0076] In practical applications, the accuracy of pre-stored label information can also be evaluated through manual sampling. If the verification fails, the information can be adjusted and re-filtered.
[0077] Thus, before identifying object tags for information retrieval, pre-processing steps such as offline tag mining and tag cleaning are performed through S301-S305 to build a tag library. This provides pre-stored tag information for retrieval and matching, as well as a relational graph of object tags, enabling tag recommendation ranking based on a large language model. The tag mining process utilizes existing knowledge graph information and the large language model to identify object tags / tag values such as product words, brand words, and attribute words from various data sources as corpus supplements, improving the tag library and ensuring the quality of tag recommendations.
[0078] In some embodiments, the tag library includes multiple pre-stored tag vectors corresponding to pre-stored tag information. Each pre-stored tag vector can be stored in a sub-library of the tag library. The pre-stored tag vector is obtained by vectorizing the pre-stored tag information. Accordingly, S205 retrieves multiple candidate tag information from the tag library based on the tag recognition result, including S2051-S2053:
[0079] S2051: Vectorize the tag recognition results to obtain the query tag vector;
[0080] S2052: Using the query tag vector as the retrieval target, perform a similar vector retrieval in the tag library to obtain a pre-stored tag vector that matches the query tag vector;
[0081] S2053: Determine the pre-stored label information corresponding to the matched pre-stored label vector as candidate label information.
[0082] Specifically, vectorized representation refers to feature mapping on the concatenated text containing tag recognition results or pre-stored tag information. The vectorized representation of tag recognition results and pre-stored tag information can use the same feature mapping model, such as semantic vector models like BGE (BAAI General Embedding) or Text2Vec.
[0083] Specifically, similarity vector retrieval can include: determining similarity index data between the query tag vector and each pre-stored tag vector; and based on the similarity index data, identifying multiple pre-stored tag vectors that match the query tag vector from among the pre-stored tag vectors. Matched pre-stored tag vectors refer to pre-stored tag vectors whose similarity index data meets the similarity condition. For example, if the similarity index data is vector similarity, and it is higher than a preset similarity, then the similarity condition is met; otherwise, it is not. Understandably, other methods can also be used to determine the similarity condition, such as the top 10% with the highest similarity satisfying the similarity condition. These can be set based on actual business needs and will not be enumerated here. In this way, by using the vectorization of tag recognition results for similarity vector retrieval and recall, rather than directly using query information for vectorized querying, the information dimensions of the recall target and the vectors to be recalled are unified, improving the accuracy and comprehensiveness of the recall, and avoiding the risk of erroneous or missed similar query information recall.
[0084] In one example, the format of a pre-stored tag information is as follows: the parent tag can be a tag word used by the user when searching. The parent tag can be multi-level, such as product word - tag value, or product word + tag value and other tags under it.
[0085] {
[0086] Category: "Beauty & Skincare - Makeup - Lip Makeup - Lip Balm / Lipstick"
[0087] "Tag": "fashion"
[0088] "Tag popularity": "10000"
[0089] "Tag type": "style"
[0090] "Parent tag":[
[0091] {
[0092] Category: Lipstick
[0093] },
[0094] {
[0095] Makeup finish: Matte
[0096] }
[0097] ],
[0098] "Popularity of parent tag": "50000"
[0099] }
[0100] Pre-stored tag information can be converted into complete tag-concatenated text, and then the feature mapping model can be used for vectorization representation. The tag-concatenated text in the example above is: Category: Beauty & Skincare - Makeup - Lip Makeup - Lipstick / Lip Gloss; Product: Lipstick; Finish: Matte; Style: Fashion.
[0101] Specifically, the tag popularity information is stored in the tag library as metadata along with the pre-stored tag vectors. In a preferred embodiment, the stored tag popularity information includes the popularity value of the pre-stored tag information itself and the popularity value of the parent tag to which the pre-stored tag information belongs, as reference information for subsequent information sorting.
[0102] S207: Obtain the tag popularity information for each candidate tag.
[0103] In some cases, only the popularity value of the pre-stored tag information itself is used as the tag popularity information of the candidate tag information. In other cases, the popularity value of the pre-stored tag information itself and the popularity value of its parent tag are used as the tag popularity information of the candidate tag information.
[0104] S209: Add the query information, multiple candidate tag information, and the tag popularity information of the candidate tag information to the instruction template of the second language model, so as to sort the tags based on the second language model and obtain the recommended sort of multiple candidate tag information.
[0105] Specifically, the query information and candidate label information are obtained by concatenating the aforementioned label text to obtain their respective query concatenated text and label concatenated text, which are used as model inputs to ensure that the retrieved text is consistent with the vector text, so as to better identify similar label information. This input does not require text segmentation, and the length of each set of inputs is basically the same, avoiding the impact of text segmentation methods on the model performance.
[0106] In some cases, before inputting into the second language model, the reasonableness of each candidate label information retrieved is also verified based on the query information. For example, rule-based filtering can be used to filter out label information with low-level errors. Rule-based filtering can, for example, compare the object label and label value corresponding to the query information in the label recognition results with the matching object label and label value in the candidate label information. If the comparison result indicates that the similarity condition is not met, the candidate label information is filtered out. For example, if the label recognition results include brand A - lipstick, but the candidate label information is brand B - lipstick, then that information is filtered out to ensure the reasonableness of the recommended labels.
[0107] Specifically, the instruction template for the second-largest language model guides the model to rank tags based on the input tag recognition results, candidate tag information, and tag popularity information, and returns the ranking results in a specified format. For example, the instruction template for the second-largest language model could be as follows:
[0108] You are an expert in the e-commerce field. Sort the user's query and candidate product tags in descending order based on similarity, popularity, and other factors. Return the results as a list, where each element is a dictionary containing an ID and a reason. Irrelevant content should not be output.
[0109] Query information: {query}
[0110] Tag list:{content}
[0111] Accordingly, the completed model input can be, for example:
[0112] You are an expert in e-commerce. Sort the candidate product tags in descending order based on factors such as similarity and popularity, and return the list as a list. Each element should be a dictionary containing an ID and a reason explanation. Irrelevant content should not be output.
[0113] Query information: Beauty & Skincare - Facial Cleansing & Care - Lotion & Cream - Lotion; Category: Lotion; Brand: Brand A
[0114] Tag list: id:0, Beauty & Skincare - Facial Cleanser & Conditioner - Lotion & Cream - Lotion; Category: Moisturizing Lotion; Series: Skincare; Attribute Type Popularity: 23000; Tag Popularity: 19001
[0115] ID: 1, Beauty & Skincare - Facial Cleanser & Conditioner - Lotion & Cream - Lotion; Category: Moisturizing Lotion; Series: Skincare; Attribute Type Popularity: 23000; Tag Popularity: 18797
[0116] ID: 2, Beauty & Skincare - Facial Cleanser & Conditioner - Lotion & Cream - Lotion; Category: Nourishing Lotion; Brand: Melaleuca; Attribute Type Popularity: 30045; Tag Popularity: 5006
[0117] ID: 3, Beauty & Skincare - Facial Cleanser & Cream - Lotion; Category: Moisturizing Lotion; Applicable Area: Face; Attribute Type Popularity: 1; Tag Popularity: 10003
[0118] ID: 4, Beauty & Skincare - Facial Cleanser & Cream - Lotion; Category: Moisturizing Lotion; Series: Soothing & Special Care; Attribute Type Popularity: 23000; Tag Popularity: 2022
[0119] ID: 5, Beauty & Skincare - Facial Cleanser & Cream - Lotion; Category: Moisturizing Lotion; Series: Soothing & Special Care; Attribute Popularity: 23000; Tag Popularity: 3999
[0120] ID: 6, Beauty & Skincare - Facial Cleanser & Cream - Lotion; Category: Moisturizing Lotion; Texture: Lightweight; Attribute Popularity: 4005; Tag Popularity: 3034
[0121] ...
[0122] Next, the second language model performs recommendation ranking based on the above input, outputting the recommended ranking of each candidate tag information. The result of the recommendation ranking is in JSON format, and the ID can be directly parsed out to obtain its detailed information from the search results. The model can also output the recommendation reason, which will be removed in the application but will be used as reference information when evaluating the ranking effect.
[0123] Taking e-commerce as an example, the main steps of existing tag-based recommendation schemes are as follows: First, product terms, brand terms, and some important attributes, such as category, brand, style, function, color, material, ingredients, design, origin, target audience, applicable scenarios, and applicable season, are mined to form a cold start tag library. Then, attribute words and tag values are paired with commonly used tags, primarily product terms and brand terms. When a user searches for a query, the tags are identified; for example, if the query is for "children's down jacket," tags under "style" and "design" can be recommended, followed by tag sorting. However, user search queries are diverse. Some queries may have different forms but the same intent, such as "down jacket for children" and "children's down jacket." Others may have similar expressions but vastly different search intents, such as "milk chocolate" and "chocolate milk." Still others may have tags corresponding to the same product but expressed differently, such as "cherry nail polish" and "cherry-colored nail polish." The query information and tag information are diverse and complex, and the tag pairing methods described above cannot solve this diverse matching problem. Furthermore, tag recommendations require reasonable tag combinations to avoid conflicts. For example, the tag "<style, long>" is suitable for adult down jackets, but not "<pattern, cartoon>" (it's more appropriate for children's down jackets). This demonstrates the high complexity of tag combinations, leading to excessively high tag information generation costs. The technical solution in this application uses a large language model to classify and identify tags from data sources containing object description information, creating a tag library with multiple pre-stored tag information. This adapts to tag mining from diverse data sources and reduces tag generation costs. Moreover, after obtaining query information, object tag recognition is performed to map diverse and complex query information to tag recognition results. Candidate tag information is then retrieved from the tag library based on the tag recognition results. This avoids inaccurate feature retrieval caused by query term diversity, enabling tag queries to cover query needs with different query information, improving the accuracy and comprehensiveness of tag recall. In addition, query information, candidate tag information, and tag popularity information are used as input to a second large language model for recommendation ranking. Combined with the original input query, fine-tuning is performed to further improve the fit between the output results and the input query, enhancing the user experience.
[0124] Understandably, the above technical solution is based on Retrieval-Augmented Generation (RAG), which assists a large language model in generating answers by retrieving information from a corpus. It combines search techniques with the hinting capabilities of the large language model, using the information found by the search algorithm as context to answer the query question. The corpus used in this application includes the aforementioned knowledge graph, tag library, and relational graph. In addition to the corpus information retrieved above, the information found by the search algorithm also includes tag popularity information to guide tag ranking.
[0125] Optionally, after the second language model outputs the recommended ranking, the candidate label information with higher ranking can be selected as the target label information and fed back to the user according to the recommended ranking. Alternatively, the candidate label information can be directly fed back to the user according to the recommended ranking.
[0126] Understandably, there may be situations where the tag information output by the second language model cannot be parsed in the correct format. For example, if the prompt explicitly states that the returned result is JSON and can be parsed, but a small amount of tag information cannot be read in JSON format, then regular expression matching is used to match the corresponding order and increment the order. Unparsable results are reprocessed by calling the second language model and output. If the tag cannot be parsed correctly for m consecutive times, then the tag record is discarded. For example, m can be 3.
[0127] refer to Figure 6 The diagram illustrates the flowchart of tag mining and tag recommendation. It uses data sources stored in a data source library as input to the first language model, and leverages knowledge corpora from a knowledge graph as auxiliary information to enhance retrieval. This process mines initial tag information, then calculates the popularity of each initial tag. Combining this popularity information with pre-defined regular expression matching rules, the tags are cleaned to obtain high-quality pre-stored tag information, which, along with the popularity information, is stored in the tag library. In essence, by first labeling objects (such as products) with corresponding object tags, cleaning the object tags in the mined initial tag information, and then statistically analyzing the popularity of tag words, low-frequency, low-quality object tags are further filtered out, improving overall quality.
[0128] Furthermore, a tag index is built for the tag library, query information is received, and then the top candidate tag information is retrieved in the tag library. Then, the second language model is called to sort the tag information to obtain a sorted tag list.
[0129] refer to Figure 7 The diagram illustrates the flowchart of another tag recommendation process. It receives query information, extracts key information, and inputs the extracted results into the first language model for object tag recognition, obtaining the tag recognition results. A feature mapping model is used to vectorize the tag recognition results, and top tag information is retrieved from a tag vector library. The vectors in this tag vector library are obtained by the feature mapping model through vectorization of pre-stored tag information. A second language model is used, taking the query text, the retrieved top tag information, and tag popularity information as input, to perform tag ranking based on instruction templates and tag rationality verification, yielding the returned results.
[0130] In some cases, additional subject attribute information can be used as auxiliary input, or a combination of subject attribute information and user historical operation information can be used as auxiliary input. Specifically, subject attribute information and / or user historical operation information are vectorized and combined with query information to input into the second language model as user-side information for ranking candidate tag information, thereby improving ranking accuracy. Subject attribute information can include the user's authorized location, device model, etc., while user historical operation information can include the user's authorized historical search information, historical click information, etc. Subject attribute information is used to describe the user's attributes, etc.
[0131] In some embodiments, the query information involved in S201 above may be generated based on query data submitted online in real time, and the resulting recommendation ranking and candidate tag information are also generated online and fed back to the user as the target recommendation result.
[0132] In other embodiments, the recommendation ranking of multiple candidate label information is generated offline. Accordingly, the method further includes S211: using the label recognition result as key data and the multiple candidate label information and recommendation ranking corresponding to the label recognition result as value data, generating label recommendation entries and adding them to the recommendation database, the recommendation database including multiple pre-stored label recommendation entries.
[0133] Specifically, after constructing the tag library, the second largest language model is used offline to perform object tag recognition, candidate tag information retrieval, and recommendation ranking generation on the query information submitted offline, in order to generate tag recommendation entries and construct a recommendation database. The query information submitted offline can be historical query information or simulated query information, etc. The tag recommendation entries can be in key-value pair format, where the key is the tag recognition result and the value is a candidate tag information table based on the recommendation ranking. Each tag recommendation entry in the recommendation database is used for tag retrieval and matching during online queries. In this way, the capabilities of the large model are leveraged for accurate tag matching, while avoiding the problems of low computational efficiency and excessive online resource consumption caused by large-scale online recommendation models.
[0134] Accordingly, refer to Figure 5 The method also includes S401-S409:
[0135] S401: Obtain target query information;
[0136] Specifically, the target query information is generated based on the query data submitted online, that is, the target query information is the information submitted by the current user, corresponding to the online query and retrieval scenario.
[0137] S403: Perform object tag recognition on the target query information to obtain the target recognition result;
[0138] Specifically, object tag recognition here can be similar to object tag recognition in S203 above. In some embodiments, S403 may include: performing tag entity recognition on the target query information to obtain target recognition results; in other embodiments, S403 may include: inputting the target query information into a first language model for tag classification recognition to obtain target recognition results. In practical applications, tag entity recognition or tag classification recognition of the first language model can be implemented using the aforementioned knowledge graph and / or the association graph in the tag library as corpus knowledge. The target recognition result is similar to the tag recognition result, including at least one object tag and the tag value of the object tag. Thus, query alignment through object tag recognition can reconcile different expressions but with the same search intent. Figure 1 Unify the query to the object tag level to improve query accuracy.
[0139] S405: Based on the target recognition results, query the tag recognition results of multiple pre-stored tag recommendation items in the recommendation database to obtain tag matching results;
[0140] Specifically, the target identification result is matched with the key of the recommended tag entry in the recommendation database. If a relevant tag identification result is matched, the tag matching result indicates that a matching tag recommendation entry exists; otherwise, it indicates that no such entry exists. A relevant tag identification result can refer to an exact match between the target identification result and the tag recommendation entry's tag identification result, a fuzzy match, or other matching methods, depending on the actual needs. These methods are not enumerated here.
[0141] S407: If the tag matching result indicates that there is a tag recommendation entry that matches the target identification result, the matched tag recommendation entry shall be used as the target recommendation result corresponding to the target query information.
[0142] Specifically, after retrieving matching tag recommendations, these recommendations are directly sent to the user for object recommendation. In this way, offline tag mining, tag information searching, and sorting enable the pre-arrangement of recommendation results. This leverages the capabilities of large models to achieve accurate recommendations while addressing the issue of low online inference efficiency. The scheme of aligning offline data construction with online tag recognition improves online recommendation efficiency and reduces resource costs. For example, the recommendation database can be implemented based on Redis, etc.
[0143] Understandably, the deployment of the model consists of two parts. One part involves building the tag library for the large language model and generating tag recommendation entries, which needs to be done offline. When a user's query request is received, the online system aligns the tag recognition results with entity recognition or object tag recognition from the first large language model to obtain the target recognition result. After recognition, the result is concatenated into a key according to pre-agreed rules, and then the offline-calculated tag recommendation entries are retrieved from the recommendation database.
[0144] S409: If the tag matching result indicates that there is no tag recommendation item that matches the target identification result, the target query information is retrieved and sorted based on the online retrieval system to obtain the target recommendation result.
[0145] Specifically, if no corresponding tag recommendation is found, a real-time online calculation is performed to retrieve and rank the results, generating a number of top tags to be recommended. For example, the real-time online retrieval can employ multi-path retrieval techniques, including vector retrieval and tag retrieval, while ranking can use methods such as Logistic Regression (LR) or eXtreme Gradient Boosting (XGBoost). This approach, combined with the online retrieval system, supplements the recommendation database with actual query needs, avoiding retrieval omissions and improving user experience. The online recommendation system can also use pre-stored tag information from a tag library for recommendations.
[0146] Specifically, online search systems can employ relatively simple popularity-based recommendations and traditional algorithm-based tag recommendations to balance performance and real-time requirements.
[0147] In one embodiment, the input to the online retrieval system is the target query information. In another embodiment, the input also includes subject attribute information or user historical operation information. The feature vectors of <subject attribute information, search query target information, pre-stored tag information, tag popularity information> can be used as model inputs in the online retrieval system to calculate scores for the pre-stored tag information, and then recommendations are made in order of score.
[0148] Query information executed through the online retrieval system can be added to the data source database for tag mining updates and recommendation database updates.
[0149] This application embodiment also provides an object tag recommendation device 500, such as... Figure 8 As shown, Figure 8 The diagram shows a structural schematic of an object tag recommendation device provided in an embodiment of this application. The device may include the following modules:
[0150] First acquisition module 10: Used to acquire query information;
[0151] Tag recognition module 20: Used to perform object tag recognition on the query information and obtain tag recognition results;
[0152] Tag retrieval module 30: used to retrieve multiple candidate tag information from the tag library based on tag recognition results. The tag library includes multiple pre-stored tag information, at least one object tag and the tag value of the object tag used to describe the object. The pre-stored tag information is obtained by tag classification and recognition of data sources containing object description information based on the first language model.
[0153] The second acquisition module 40 is used to acquire the tag popularity information of each candidate tag;
[0154] Sorting module 50: This module adds query information, multiple candidate tag information, and tag popularity information of the candidate tag information to the instruction template of the second language model, so as to sort the tags based on the second language model and obtain the recommended sorting of multiple candidate tag information.
[0155] In some embodiments, the recommended ranking of multiple candidate label information is generated offline. The device also includes a recommendation data storage module: used to generate label recommendation entries and add them to the recommendation database with the label recognition result as the key data and the multiple candidate label information and recommendation ranking corresponding to the label recognition result as the value data. The recommendation database includes multiple pre-stored label recommendation entries.
[0156] In some embodiments, the first acquisition module 10 is further configured to: acquire target query information, which is generated based on query data submitted online;
[0157] The tag recognition module 20 is also used to: perform object tag recognition on the target query information to obtain the target recognition result;
[0158] The device also includes a recommendation item retrieval module, which is used to query the tag recognition results of multiple pre-stored tag recommendation items in the recommendation database based on the target recognition results to obtain tag matching results; if the tag matching results indicate that there are tag recommendation items that match the target recognition results, the matched tag recommendation items are used as the target recommendation results corresponding to the target query information.
[0159] In some embodiments, the recommended item retrieval module is further configured to: if the tag matching result indicates that there is no tag recommendation item matching the target identification result, perform tag retrieval recall and sorting on the target query information based on the online retrieval system to obtain the target recommendation result.
[0160] In some embodiments, the tag recognition module 20 may be specifically used for:
[0161] Tag entity recognition is performed on the target query information to obtain the target recognition result;
[0162] or,
[0163] The target query information is input into the first language model for label classification and recognition to obtain the target recognition result.
[0164] In some embodiments, the tag library includes multiple pre-stored tag vectors corresponding to pre-stored tag information, and the tag retrieval module 30 can be specifically used for:
[0165] The tag recognition results are vectorized to obtain the query tag vector;
[0166] Using the query tag vector as the retrieval target, a similar vector retrieval is performed in the tag library to obtain a pre-stored tag vector that matches the query tag vector;
[0167] The pre-stored label information corresponding to the matched pre-stored label vector is determined as candidate label information.
[0168] In some embodiments, the apparatus further includes a tag mining module for:
[0169] Retrieve multiple data sources, including reference query information, object attribute information, or recommended articles about the object;
[0170] Based on the first major language model, tag classification and recognition based on knowledge graph are performed on multiple data sources to obtain initial tag information from multiple data sources. The knowledge graph includes multiple object tags used to describe objects and the association relationships between multiple tag values.
[0171] Select the pre-stored tag information from each initial tag information.
[0172] In some embodiments, the tag mining module may specifically be used for:
[0173] Based on a preset regular expression matching algorithm, invalid labels are filtered out from each initial label information to obtain multiple valid label information;
[0174] Obtain the tag popularity information for each valid tag;
[0175] Based on the popularity information of the tags, the popularity ranking of each valid tag information is obtained;
[0176] Based on the popularity ranking results, pre-stored tag information is selected from each valid tag information.
[0177] In some embodiments, the second acquisition module 40 may include a tag popularity calculation submodule, specifically used for:
[0178] Obtain at least one of the following key performance indicator data from the reference query information, object attribute information, and object recommendation articles corresponding to valid tag information;
[0179] Based on key performance indicator data, the popularity is calculated to obtain the popularity value of at least one of the following: reference query information, object attribute information, and object recommended articles.
[0180] Tag popularity information is obtained by integrating reference query information, object attribute information, and popularity values from at least one of the recommended articles for the object.
[0181] It should be noted that the above-described device embodiments and method embodiments are based on the same implementation methods.
[0182] This application provides a device, which can be a terminal or a server, including a processor and a memory. The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the object tag recommendation method provided in the above method embodiments.
[0183] Memory is used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and detect anomalies. Memory can primarily consist of a program storage area and a data storage area. The program storage area stores the operating system, application programs required for functionality, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.
[0184] The methods and embodiments provided in this application can be executed in electronic devices such as mobile terminals, computer terminals, servers, or similar computing devices. Figure 9 This is a hardware structure block diagram of an electronic device for an object tag recommendation method provided in an embodiment of this application. For example... Figure 9As shown, the electronic device 900 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 910 (CPUs 910 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 930 for storing data, and one or more storage media 920 (e.g., one or more mass storage devices) for storing application programs 923 or data 922. The memory 930 and storage media 920 may be temporary or persistent storage. The program stored in the storage media 920 may include one or more modules, each module including a series of instruction operations on the electronic device. Furthermore, the CPU 910 may be configured to communicate with the storage media 920 and execute a series of instruction operations in the storage media 920 on the electronic device 900. The electronic device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input / output interfaces 940, and / or one or more operating systems 921, such as Windows Server. TM Mac OS X TM Unix TM Linux™, FreeBSD™, etc.
[0185] The input / output interface 940 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 900. In one example, the input / output interface 940 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 940 may be a radio frequency (RF) module for wireless communication with the Internet.
[0186] Those skilled in the art will understand that Figure 9 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 900 may also include... Figure 9 The more or fewer components shown, or having the same Figure 9 The different configurations shown.
[0187] Embodiments of this application also provide a computer-readable storage medium, which can be disposed in an electronic device to store at least one instruction or at least one program related to implementing an anomaly detection method in the method embodiments. The at least one instruction or the at least one program is loaded and executed by the processor to implement the anomaly detection method provided in the above method embodiments.
[0188] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0189] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
[0190] The object tag recommendation method, apparatus, device, storage medium, server, terminal, and program products provided in this application, utilize a large language model to classify and identify tags from data sources containing object description information. This creates a tag library with multiple pre-stored tag information, adapting to tag mining from diverse data sources and reducing tag generation costs. Furthermore, after obtaining query information, object tag identification is performed to map diverse and complex query information into tag identification results. Candidate tag information is then retrieved from the tag library based on the tag identification results. This avoids inaccurate feature retrieval caused by query term diversity, enabling tag queries to cover query needs for different query information and improving the accuracy and comprehensiveness of tag recall. In addition, query information, candidate tag information, and tag popularity information are used as input to a second large language model for recommendation ranking. Combined with the original input query, fine-tuning is performed to further improve the fit between the output results and the input query, enhancing the user experience.
[0191] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0192] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, equipment, and storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0193] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing the relevant hardware to implement them. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0194] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. An object label recommendation method characterized by comprising: The method comprises: obtaining query information; performing object label identification on the query information to obtain a label identification result; retrieving a plurality of candidate label information from a label library based on the label identification result, the label library comprising a plurality of pre-stored label information for describing at least one object label of an object and a label value of the object label, the pre-stored label information being obtained based on a first large language model performing label classification identification on a data source containing object description information; obtaining label heat information of each of the candidate label information; adding the query information, the plurality of candidate label information, and the label heat information of the candidate label information to an instruction template of a second large language model to perform label sorting based on the second large language model to obtain a recommended sorting of the plurality of candidate label information.
2. The method of claim 1, wherein, The recommended sorting of the plurality of candidate label information is generated offline, and the method further comprises: using the label identification result as key data and using the plurality of candidate label information and the recommended sorting corresponding to the label identification result as value data to generate a label recommendation entry and add it to a recommendation database, the recommendation database comprising a plurality of pre-stored label recommendation entries.
3. The method of claim 2, wherein, The method further comprises: obtaining target query information, the target query information being generated based on online submitted query data; performing object label identification on the target query information to obtain a target identification result; performing label identification result query on a plurality of pre-stored label recommendation entries in the recommendation database based on the target identification result to obtain a label matching result; if the label matching result indicates that there is a label recommendation entry matching the target identification result, using the matching label recommendation entry as a target recommendation result corresponding to the target query information.
4. The method of claim 3, wherein, The method further comprises: if the label matching result indicates that there is no label recommendation entry matching the target identification result, performing label retrieval recall and sorting on the target query information based on an online retrieval system to obtain a target recommendation result.
5. The method of claim 3, wherein, Performing object label identification on the target query information to obtain a target identification result comprises: performing label entity identification on the target query information to obtain the target identification result; or, inputting the target query information into the first large language model to perform label classification identification to obtain the target identification result.
6. The method according to any one of claims 1-5, characterized in that, The label library comprises a plurality of pre-stored label vectors corresponding to the pre-stored label information, and the retrieving a plurality of candidate label information from the label library based on the label identification result comprises: vectorizing the label identification result to obtain a query label vector; performing similar vector retrieval in the label library with the query label vector as a retrieval target to obtain a pre-stored label vector matching the query label vector; determining the pre-stored label information corresponding to the matching pre-stored label vector as the candidate label information.
7. The method according to any one of claims 1-5, characterized in that, The method for obtaining the pre-stored label information comprises: obtaining a plurality of data sources, the data sources comprising reference query information, object attribute information, or object recommendation articles; obtaining initial label information of the plurality of data sources based on knowledge graph-based label classification identification of the plurality of data sources by the first large language model, the knowledge graph comprising an association relationship between a plurality of object labels and a plurality of label values for describing an object; filtering the pre-stored label information from each of the initial label information.
8. The method of claim 7, wherein, The filtering of the pre-stored label information from each of the initial label information comprises: filtering invalid labels from each of the initial label information based on a preset regular matching algorithm to obtain a plurality of valid label information; obtaining label heat information of each of the valid label information; performing heat sorting on each of the valid label information based on the label heat information to obtain a heat sorting result; filtering the pre-stored label information from each of the valid label information based on the heat sorting result.
9. The method of claim 8, wherein, The obtaining of the label heat information of each of the valid label information comprises: obtaining key performance indicator data of at least one of reference query information, object attribute information and object recommended articles corresponding to the valid label information; performing heat calculation based on the key performance indicator data to obtain a heat value of at least one of the reference query information, the object attribute information and the object recommended articles; fusing the heat value of at least one of the reference query information, the object attribute information and the object recommended articles to obtain the label heat information.
10. An object label recommendation apparatus characterized by comprising: The device comprises: a first obtaining module for obtaining query information; a label identification module for identifying object labels of the query information to obtain a label identification result; a label retrieval module for retrieving a plurality of candidate label information from a label library based on the label identification result, the label library comprising a plurality of pre-stored label information, at least one object label and a label value of the object label for describing an object, the pre-stored label information being obtained based on a first large language model for label classification identification of a data source containing object description information; a second obtaining module for obtaining label heat information of each of the candidate label information; a sorting module for adding the query information, a plurality of the candidate label information and the label heat information of the candidate label information to an instruction template of a second large language model to perform label sorting based on the second large language model to obtain a recommended sorting of a plurality of the candidate label information.
11. A computer device, the device comprising a processor and a memory, characterized in that, The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the object label recommendation method of any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the object label recommendation method of any one of claims 1-9.
13. A computer program product, characterised in that, The computer program product comprises computer instructions which, when executed by a processor, implement the object label recommendation method of any one of claims 1-9.