A method for establishing content tags based on e-commerce data and social media marketing content data
By combining the RaNER model and the large language model, using information extraction and thought chain summary prompts to extract entities, and constructing a content tag tree, the problems of low accuracy and slow efficiency of entity extraction in the existing technology are solved, and high efficiency and accuracy are achieved. The content label construction and labeling process.
Patent Information
- Application Number
- CN202311478490.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-07
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-11-07
AI Technical Summary
The existing technology has low accuracy and slow efficiency in the entity extraction process. Especially when processing e-commerce data and social media marketing content, entity extraction with a single model has problems of inaccurate recognition and incomplete recall.
Use the RaNER model to identify concrete entities, and combine it with the large language model to use information extraction and thought chain summary Prompt to identify abstract entities. Through the fusion of multiple model results, a content tag tree is constructed for labeling, and the text vectorization model and aggregation are used. Class algorithms improve the accuracy and efficiency of entity extraction.
It significantly improves the accuracy and efficiency of entity extraction, reduces labor costs and time, enhances the accuracy and recall rate of content tags, reduces storage costs, and at the same time makes up for the shortcomings of a single model through multi-model fusion.
Smart Images

Figure CN117786103B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of content marketing, and more specifically, relates to a method for establishing content tags based on e-commerce data and social media marketing content data. Background Art
[0002] In the process of data processing, adding labels to data is an important link. Labels can not only improve the readability and usability of data, but also facilitate data retrieval, analysis and utilization. Generally, data labeling is mostly done manually. Although the accuracy is high, it takes a lot of manpower and time, especially when the amount of data is large. There is also automatic labeling. Automatic labeling is a method of data labeling using computer technology. It is efficient, but it is prone to mislabeling or missing labels. As we all know, entity extraction is required before labeling, and the complexity of entity extraction is very high. This is not only due to the complex documents, but also to the difficulty of understanding the language itself. In some scenarios, even humans will be puzzled. For example, professional background knowledge, invisible or explicit context, the same text expresses completely different concepts, and the same concept has a variety of language expressions. These combined reasons make understanding language the jewel in the crown of artificial intelligence, and extracting entities from text inevitably requires understanding language, and the effect of entity extraction depends on the degree of understanding of language. The entity extraction operation is directly related to the accuracy of labeling.
[0003] Corresponding improvements have also been made to the above problems, such as China's patent application number CN111985237A, published on November 24, 2020. The patent discloses an entity extraction method, device and equipment, the method comprising: obtaining information to be processed, the information to be processed includes at least two groups of interactive information data of interactions between a first object and a second object; performing multi-label classification and recognition on each interactive information data in the information to be processed, so as to label the information to be processed with different functional types of labels respectively, and obtain label labeling results; according to the label labeling results, entity extraction is performed on the message to be processed in layers; the label labeling results at least include entity labels for indicating that the corresponding interactive information data contains entity blocks. The shortcoming of this patent is that although it can effectively identify complete entity information, the recognition accuracy is poor.
[0004] Another example is Chinese patent application number CN116610869A, published on August 18, 2023. The patent discloses a recommended content management method and device, an electronic device and a storage medium, the method comprising: sending a content recommendation request to a server, wherein the content recommendation request is used to request the server to generate and return recommended content for multiple display areas of a display interface; receiving multiple recommended contents returned by the server, and a data label of each recommended content in the multiple recommended contents, wherein the data label of each recommended content in the multiple recommended contents is obtained by extracting NER entities from each recommended content of the server, and the multiple recommended contents correspond to the multiple display areas one by one; deduplication is performed on the multiple recommended contents according to the data label of each recommended content in the multiple recommended contents, and at least one recommended content remaining after deduplication is exposed to the corresponding display area. The disadvantage of this patent is that there is a certain deviation when the data label is only obtained by NER entity extraction, and the accuracy is poor. Summary of the invention
[0005] 1. Problems to be solved
[0006] In view of the problem that the existing labeling entity extraction results are inaccurate and inefficient, the present invention provides a method for establishing content labels based on e-commerce data and social media marketing content data. The present invention uses the RaNER model to identify concrete entities when extracting information from the content category database, and then uses a large language model combined with information extraction prompt and thinking chain summary prompt to identify abstract entities, and integrates the results of entity extraction from multiple models, effectively compensating for the problems of inaccurate extraction and recognition and incomplete entity recall caused by entity extraction using a single model, and the entity extraction accuracy is high and the efficiency is fast.
[0007] 2. Technical solution
[0008] To solve the above problems, the present invention adopts the following technical solutions.
[0009] A method for establishing content tags based on e-commerce data and social media marketing content data comprises the following steps:
[0010] S1: Build a product knowledge graph;
[0011] S2: Build a content category database; obtain a media content database, use the product knowledge graph to filter out the content data related to the category of each product from the media content database, and build a content category database;
[0012] S3: extract information from the content category database to build a category content label tree, and label the data in the content category database according to the category content label tree; this step specifically includes the following steps:
[0013] S31: First, use the named entity recognition model to extract person entities, category entities, brand entities, and product attribute entities from the content category database; then use the large language model combined with the information extraction prompt and the thinking chain summary prompt to perform semantic recognition on the content category database and extract person entities, network hot word entities, user pain point entities, product feature entities, and applicable entities; finally, perform entity result fusion to obtain the final entity;
[0014] S32: Convert the entity words of the final entity into word vectors through the text vectorization model; then obtain several categories of word vectors through the clustering algorithm; then summarize the words in each category into one or more tags through the large language model, and use the keyword types output by the large language model to build a content tag tree with a tree structure and the keywords of each tag;
[0015] S33: Tagging the content text in the content category database according to the category content tag tree.
[0016] Furthermore, the specific process of step S33 is as follows:
[0017] When labeling the content text, determine whether the content text has been subjected to entity extraction; if entity extraction has been performed, the entity word becomes a candidate tag; if entity extraction has not been performed, after entity extraction, the tag corresponding to the identified entity word is added to the candidate tag set;
[0018] And for the keywords or regular expressions corresponding to each tag in the tag tree, keyword matching and regular expression matching are used, and the matched tags are also added to the candidate tag set of the content text;
[0019] Use the large language model to use the discriminant prompt to judge all the candidate tags that have been screened out for the content text to determine whether the candidate tags match the meaning of the corresponding content text; if they match, confirm the candidate tag, if not, modify it.
[0020] Furthermore, after the tree-structured content tag tree is constructed, manual review and correction of the content tag tree is also included.
[0021] Furthermore, the step S1 specifically includes the following steps:
[0022] Collect product information from various e-commerce platforms to form a product database;
[0023] The RaNER model is used to perform entity recognition on commodity text information in the commodity database to construct a commodity knowledge graph; the structure of the commodity knowledge graph is in the form of a triple of (entity, relationship, entity).
[0024] Furthermore, the step S2 specifically includes the following steps:
[0025] S21: Collecting content information of various social media to form a media content database;
[0026] S22: Use the product knowledge graph to perform text matching on the text information in the media content database to establish a preliminary screening database for product categories;
[0027] S23: Convert the image type content and video type content in the preliminary screening database into text content respectively;
[0028] S24: Perform fine screening and classification on the primary screening database to determine whether the text content is related to the data of the product category.
[0029] Furthermore, in the step S21, only original text description information is stored in the media content database: for graphic content, its content title, content text and picture link content are stored; for video content, its content title and video link content are stored.
[0030] Furthermore, in step S23, for the image content, the OCR technology is used to convert the text in the image into text content; for the video content, the video is first converted into an image, and the OCR technology is used to convert the text in the image into text content; and the ASR technology is used to convert the video voice into text content, and the two text contents are combined to obtain the final text content of the video content.
[0031] Furthermore, the fine screening and classification in step S24 specifically includes: after matching the brand and category keywords of the preliminary screening data in the preliminary screening database, if both the brand and category entities are matched, it is determined that the text content is related to the data of the product category; if only the brand or category keywords are matched, the large language model is used to classify the text content.
[0032] 3. Beneficial effects
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] (1) The present invention constructs a commodity knowledge graph and uses entities and relationships in the commodity knowledge graph to construct a content category database from a media content database, so that the construction efficiency of the content category database is fast and work efficiency is effectively improved; after the construction of the content category database is completed, information is extracted from it to construct a content tag tree. When extracting information, the RaNER model is used to identify concrete entities, and then the large language model is combined with information extraction prompt and thinking chain summary prompt to identify abstract entities. Different types of entities are identified and extracted using different models, which effectively compensates for the problems of inaccurate extraction and recognition and incomplete entity recall caused by entity extraction using a single model; finally, the content text is labeled using the content tag tree; the entire process is simple and uncomplicated, the entity extraction accuracy is high, and the overall labeling accuracy is high; at the same time, the efficiency is high, reducing labor costs and time costs;
[0035] (2) When labeling a content text, the present invention first determines whether to perform entity extraction on the content text to improve work efficiency and save time; entity words that have been subjected to entity extraction become candidate tags, and entity words that have not been subjected to entity extraction become candidate tags after entity extraction. At the same time, the obtained candidate tag set is judged to avoid the possibility of potential errors, and the recall rate is improved as much as possible (reducing omissions). At the same time, the semantic understanding ability of the large language model is used to filter out entities that are matched by keywords but are semantically incorrect, and to filter out entity words that do not exist in the original text that may be given by the large language model as much as possible, thereby improving the precision rate;
[0036] (3) When constructing a content category database, the present invention includes firstly screening the media content database to obtain a preliminary screening database, then converting the pictures and video contents in the preliminary screening database into text contents respectively, and finally performing fine screening and classification to obtain a final content category database; the process of first performing low-cost and fast preliminary screening, narrowing the data range and then performing fine screening reduces costs while improving efficiency while ensuring overall accuracy; and only the original text description information is stored in the media content database, which greatly reduces storage costs;
[0037] (4) When converting video content into text content, the present invention first extracts frames from the video at a certain time interval, converts the video into a group of pictures, performs OCR processing on the pictures to extract text, and uses the position and size information of the text to filter out secondary text information in the background as much as possible, while retaining important content text such as subtitles; then uses ASR to convert the video voice into text. The combination of OCR and ASR is conducive to a more complete analysis of the language information in the video. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1It is a schematic diagram of the process of the present invention;
[0039] Figure 2 This is a schematic structural diagram of the commodity knowledge graph;
[0040] Figure 3 A flowchart for building a content tag tree;
[0041] Figure 4 A flowchart for labeling content text. DETAILED DESCRIPTION
[0042] The present invention is further described below in conjunction with specific embodiments and drawings.
[0043] See also Figures 1 to 3 , Figure 1 This is a flowchart of the application; Figure 2 This is a schematic structural diagram of the commodity knowledge graph; Figure 3 A flowchart for building a content tag tree; Figure 4 A flowchart for labeling content text.
[0044] like Figure 1 As shown, a method for establishing content tags based on e-commerce data and social media marketing content data includes the following steps:
[0045] S1: Build a product knowledge graph;
[0046] In one example, step S1 includes the following steps:
[0047] S11: Collect product information from various e-commerce platforms to form a product database. The product information includes platform, product ID, product name, specifications, product parameters, etc. Therefore, an example of product data in the product database is shown in Table 1 below:
[0048] Table 1: Product data table
[0049]
[0050] S12: Use the RaNER model to perform entity recognition on the commodity text information in the commodity database to obtain brand, category, commodity attribute entities and related keywords, and use the co-occurrence relationship of the entities in the commodities to construct a commodity knowledge graph; the structure of the commodity knowledge graph is in the form of a triple of (entity, relationship, entity);
[0051] In one example, RaNER is a named entity recognition model in the Chinese e-commerce field. The structure of the RaNER model can be referenced in the following paper: Improving Named Entity Recognition byExternal Context Retrieving and Cooperative Learning , the entity types that can be recognized by the RaNER model are shown in Table 2 below:
[0052] Table 2 Entity types that can be recognized by the RaNER model
[0053]
[0054]
[0055] For example, the RaNER model is used to identify the product title "Brand A Double Retinol Night Cream 2.0 Retinol Face Cream Morning C Evening A Firming Anti-wrinkle", and the following results can be obtained, as shown in Table 3:
[0056] Table 3 Recognition results
[0057]
[0058]
[0059] Among them, product_core product is a sub-category of the product; based on the recognized entity words and the relationship between the co-occurrence of entity words in the product, a product knowledge graph is constructed. An example of constructing a product knowledge graph based on the above entity recognition results is as follows: Figure 2 As shown;
[0060] S2: Build a content category database; obtain a media content database, use the product knowledge graph to filter out the content data related to the category of each product from the media content database, and build a content category database;
[0061] Specifically, step S2 includes the following steps:
[0062] S21: Collect and integrate content information from various social media to form a media content database; the forms of content on social media mainly include graphic content and video; in this step, only original text description information is stored in the media content database: for graphic content, its content title, content text and picture link content are stored; for video content, its content title and video link content are stored; the media content database only stores original text description information and does not include multimedia data such as pictures and videos, thereby achieving the purpose of significantly reducing storage costs;
[0063] In one example, the content data of the media content database may be shown in Table 4 below:
[0064] Table 4 Content data table of media content database
[0065]
[0066] S22: Use the product knowledge graph to perform text matching on the text information in the media content database to establish a preliminary screening database for product categories. It is explained here that since the content information on social media contains topics in various fields, including those related to or unrelated to the products, it is necessary to screen out content related to a certain category of products. At the same time, since the media content database contains a large amount of data (more than 1 billion items), and the content type includes not only text but also video type content, which needs to be converted into text for further processing, and the computing cost of video-to-text conversion is high and time-consuming, and the cost of using AI models to classify massive data is also high. Therefore, text matching is first performed on the text information to obtain a preliminary screening database. Low-cost and fast preliminary screening narrows the data range, which ensures efficiency and reduces costs.
[0067] In the initial screening stage, the keywords of various entities in the product knowledge graph, including keywords of related entities such as brand, category, and attribute, are used to perform text matching on the text information in the media content database. This step only matches the video title of the video content, so that content data related to a certain category of goods can be quickly screened out from massive content data to establish an initial screening database for a certain category. A category initial screening database can be established for all target categories required by the business, such as a category initial screening database for beauty and personal care products.
[0068] S23: Convert the image type content and video type content in the preliminary screening database into text content respectively; since the preliminary screening database in step S22 contains image and video type content, only the text information such as the title is determined, in order to further analyze the commodity-related text information contained in the images and videos, it is necessary to convert the content in the images and videos into text;
[0069] Specifically, for image content, OCR technology is used to convert the text in the image into text content; for video content, OCR technology and ASR technology are used to convert the video into text content: before OCR processing, the video is framed at a certain time interval, such as one frame per second, and the video is converted into a group of images. The OCR technology is used to convert the text in the image into text content for this group of images, and the position and size information of the text is used to filter out the secondary text information in the background as much as possible, while retaining important content text such as subtitles; and the ASR technology is used to convert the video voice into text content, so as to add an (OCR text, ASR text) field to each video content; the two text contents are combined to obtain the video content and converted into the final text content; because the text and voice on the screen in the video respectively contain part of the language information, and each of them lacks some language information, and the OCR and ASR technologies may have a certain error rate, converting a video into text using OCR and ASR at the same time, and using them together in the future, is conducive to a more complete analysis of the language information in the video;
[0070] S24: Perform fine screening and classification on the primary screening database to determine whether the text content is related to the data of the commodity category;
[0071] After obtaining the text content of the image content and video content in the preliminary screening database in step S23, it is necessary to further determine whether the content is related to the commodity data of this category; because the preliminary screening uses keywords to quickly match in massive data to narrow the data range and recall potentially relevant content, there will be ambiguous keywords. For example, the milk brand "Guangming" may match "sunny" with keywords. Therefore, it is necessary to further refine and classify the category preliminary screening database. The traditional method is to first perform manual data annotation, and then train a supervised text classification model to determine whether the content text is related to a certain category of goods. Due to the large number of commodity categories that need to be processed, it is costly to use manually annotated data and then train the classification model.
[0072] In step S24, the fine screening classification specifically includes: after matching the brand and category keywords of the preliminary screening data in the preliminary screening database, if both the brand and category entities are matched, it is determined that the text content is related to the data of the commodity category; if both the brand and category entities are matched, there is no need to use a model to judge, thereby increasing the speed and reducing the computing power consumption; for only matching the brand or category keywords, due to the high possibility of ambiguity, a large language model is used to use prompt words such as "Does the above text describe a product in the skin care category?" to build a text classifier, classify the content text into the corresponding category, and then build a content category database to complete; Prompt is a prompt text that guides the model to generate a targeted answer;
[0073] S3: extract information from the content category database to build a category content label tree, and label the data in the content category database according to the category content label tree; this step specifically includes the following steps: Figure 3 As shown:
[0074] S31: First, use the RaNER model to extract person entities, category entities, brand entities, and product attribute entities from the content category database; then use the large language model combined with information extraction prompt and thought chain summary prompt to perform semantic recognition on the content category database and extract person entities, network hot word entities, user pain point entities, product feature entities, applicable population entities, and applicable scenario entities; finally, perform entity result fusion to obtain the final entity;
[0075] In this step, the following examples are given: For example, an example of converting short video content into text:
[0076] OCR Text:
[0077] Hello everyone, I am **~ A beauty blogger who has been in the industry for four years. I strongly recommend this foundation brand. There are different choices for new year and year makeup. I started with their foundation cream and now all the products. I have really fallen in love with it. Without saying too much, let's put it on without makeup and see the effect directly. Primer is a must. Then use a self-bandage air cushion. I use 574. It is suitable for those with healthy skin color. You can choose 564 natural color three-layer high-elastic powder puff. And the makeup is applied quickly. It is very docile, just like the skin with good natural skin. It makes my dry skin docile. Finally, use water loose powder to set the makeup. The texture of this water loose powder is very delicate. It can set the makeup for a long time and replenish moisture for the skin. It is the perfect foundation cp of foundation air cushion. The makeup effect and lasting power are excellent when used together. The whole foundation is very good. And the products of brand B are mainly tested for allergy-sensitive skin. The ingredients used for beauty repair are none. Friends, hurry up and buy them during the event;
[0078] ASR Text:
[0079] Hello, everyone. I am **, a beauty blogger who has been in the industry for 4 years. I strongly recommend this foundation brand. You don’t have to use it. It is the only choice for the new year makeup. From the beginning, I bought their foundation cream to the current full line of products. I have really fallen in love with it. Without saying too much, let’s look at the effect directly without makeup. Primer must be used. This tender and non-greasy quality is very easy to spread, and almost even hides the pores. There is a 7% point. I use 574, which is suitable for fair skin. For healthy skin, you can choose 564. For natural color, the matching three-layer high-elastic powder puff is fast and fits well. It will not get powder stuck and will make it white. It looks like all the good reviews make my dry skin fit well. Finally, use water loose powder to set the makeup. It is the perfect foundation cp of electricity. The combination of makeup effect and long-lasting makeup secret plus the whole foundation is very clear, fit, clean and natural, and I am in a good state and hurry up to get it;
[0080] In an example, using RaNER to extract entity effects:
[0081] Retouching_Other: Makeup
[0082] Modification_Other: Blogger
[0083] Scope of application_Applicable scenario: Year
[0084] Products_Core products: Foundation cream
[0085] Scope of application_Other: No makeup
[0086] Scope of application_Other: Face
[0087] Product_Core product: Primer
[0088] Style_Other: Self-bandage
[0089] Products_Core products: air cushion
[0090] Dimensions: 574
[0091] Color_Color: Skin color
[0092] Color_Other: Healthy color
[0093] Color_Color: 564 natural color
[0094] Dimensions_Other: Three layers
[0095] Modification_Product attributes: High elasticity
[0096] Products_Core products: Powder puff
[0097] Scope of application_Others: Dry skin
[0098] Product_Core product: The texture of water loose powder is particularly fine
[0099] Function: Makeup setting
[0100] Function and efficacy: for skin
[0101] Function: replenish moisture
[0102] Products_Core products: loose powder
[0103] Products_Core products: air cushion
[0104] Brand: Brand B
[0105] Scope of application_Applicable people: partners
[0106] It should be noted that RaNER is relatively accurate in extracting category information, brand information, and some product attribute-related information. Its extraction performance on some semantically rich content texts is average, and its ability to understand the semantics of long content texts is insufficient. For example, the meanings of words such as "desert dryness" and "for skin" are unclear. Therefore, a large language model (LLM model) is used for entity recognition, and multiple prompts are used for extraction. The LLM model can be used for various NLP tasks, including entity recognition; the LLM model is an artificial intelligence model designed to understand and generate human language. They are trained on large amounts of text data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, etc.; however, there are still some problems when using LLM extraction, such as incomplete entity recall. This solution uses multiple types of prompts for entity recognition on a piece of content text, and fuses the results;
[0107] Among them, the information extraction prompt, prompt words such as "extract product selling points, user pain points, etc. in the text" use the LLM model combined with the information extraction prompt extraction result example as shown in Table 5:
[0108] Table 5 LLM model combined with information extraction prompt extraction results
[0109]
[0110]
[0111] The extraction results of LLM reflect its semantic understanding ability. For example, "long-lasting makeup" and other phrases are valid content label phrases, and the corresponding types are also relatively accurate.
[0112] It should be noted that the LLM model has the problem of generating "hallucinations", such as "Internet hot words-Internet hot words". There are also some problems such as some valid meanings not being extracted, or the extracted keywords are too long;
[0113] Therefore, we further adopt the chain of thought summary prompt to extract and calibrate entities through the LLM model. Chain of Thought is a prompt word pattern of the LLM large language model. By decomposing a multi-step reasoning problem into multiple intermediate steps, it guides the large model to gradually give answers to the question, thereby improving the accuracy and interpretability of the large model's answer to the question. This solution uses the chain of thought prompt to guide the large model to answer questions step by step and summarize them into the final required content label. The prompt method is called the chain of thought summary prompt. Different from the information extraction prompt that allows LLM to give answers directly, the chain of thought guides LLM to gradually give the intermediate process and summarize the answer, which can effectively avoid the problem of hallucination generation in a single answer, and can also perform more complex tasks. Prompt structure, such as "First find the text that describes the product selling points, user pain points... in the above text, and then summarize them into content labels..." The result example of using the LLM large model combined with the chain of thought summary prompt extraction:
[0114] {
[0115] "Product selling point - popular recommendation": "Popular base makeup brand, different choices for new year makeup",
[0116] "Product selling point - full line of products": "From the foundation cream I bought at the beginning to the full line of products now",
[0117] "Product selling point - essential primer":"Primer is a must-have texture",
[0118] "Product selling point - multiple color options": "I use 574 for the self-bandage air cushion, and those who are more healthy in skin color can choose 564 natural color",
[0119] "Product selling point - fit makeup effect": "Three-layer high-elastic powder puff and makeup is applied quickly and fits very well. It makes my dry skin fit perfectly",
[0120] "Product selling point - fine texture and hydration": "The texture of the water loose powder is very fine, it can set makeup for a long time and can also replenish moisture for the skin",
[0121] "Product selling point - excellent lasting power": "The perfect base makeup CP of the foundation cushion has excellent makeup effect and lasting power",
[0122] "Product selling point - tested for allergy and sensitive skin":"Brand B's products focus on ingredients tested for allergy and sensitive skin, and Beauty Repair uses ingredients with caution","Ingredients - Beauty Repair Ingredients":"Brand B's products focus on ingredients tested for allergy and sensitive skin, and Beauty Repair uses ingredients with caution",
[0123] "User pain point - dry skin moisturizing": "It moisturizes my dry skin",
[0124] "Applicable scenarios - use before makeup": "Primer is a must-have texture",
[0125] "Applicable scenarios - Use to set makeup": "Finally, use water and loose powder to set the makeup",
[0126] "Applicable skin type - dry skin": "It can make my dry skin smooth and docile",
[0127] "Applicable roles - Makeup tools": "Three-layer high-elastic powder puff, and makeup is applied quickly and adheres perfectly, just like naturally good skin. It makes my dry skin smooth and docile",
[0128] "Sales promotion - sensitive skin tested, beauty repair ingredients": "Brand B's products feature ingredients that have been tested on allergy-sensitive skin and are used with caution in beauty repair"
[0129] }
[0130] Therefore, the thought chain summary prompt enables LLM to summarize some complex statements. Compared with the information extraction prompt, its effect has some advantages and disadvantages, as shown in Table 6:
[0131] Table 6 Description of different types of prompts
[0132]
[0133] By combining these two methods, we can achieve better label word extraction effect than a single prompt, and then further ensure the accuracy of entity extraction, thereby ensuring the accuracy of subsequent content label tree construction; and the entity words extracted from the content text by the RaNER model and the LLM model, including the correspondence between the content id and the entity word id, are stored in the word extraction database table, and the results can be reused in the subsequent content labeling according to the structured label tree;
[0134] S32: The final entity (entity word and entity word type, plus the attribute words extracted from the product, such as entity words of the function and efficacy type) is converted into a word vector through a text vectorization model; then a clustering algorithm is used to obtain several types of word vectors (word vectors with high similarity are clustered into one category); due to certain limitations of the clustering algorithm, after simple word vector clustering, words in the same category may still correspond to different meanings, so then through the semantic understanding ability of the large language model, the words in each category are summarized into one or more labels, and the keyword type output by the large language model is used to construct a tree-structured content label tree and the keywords of each label; the content label tree is shown in Table 7 as an example of a structured label tree for beauty and personal care products:
[0135] Table 7 Structured label table of beauty and personal care products
[0136]
[0137] After the content tag tree is built, it also includes manual review and correction of the content tag tree; the manual review and correction includes adding tags, modifying tags, merging tags, adding keywords or regular expressions to tags, etc. After the manual review and correction of the tag tree, since the tag tree has changed, the content text needs to be re-labeled according to the revised tag tree; the manual review and correction steps further ensure the accuracy of tag establishment.
[0138] S33: Tag the content text in the content category database according to the category content tag tree; traditional methods for tagging content text according to the content tag tree include keyword matching, using a word segmentation model, using a NER (named entity recognition) model, and other methods. Keyword matching can accurately identify the keywords in the tag tree contained in the content text, and the speed is very fast, but there will be some problems that the text ambiguity cannot be distinguished, the problem that the negative meaning is recognized as the positive meaning, and there may be different expressions of the same meaning that are not recognized due to incomplete vocabulary. The use of a word segmentation model has a high dependence on the vocabulary, and some words that are not in the vocabulary may be misclassified, and the different segmentation granularity of the word may affect the recognition of subsequent tags. When using the NER named entity recognition model, a trained open source model or supervised training for a specific field can be used, but the NER model will also have certain accuracy problems, or the cost of manually annotated data used to train the model to improve the accuracy of a specific field is high, or the recognized entity words cannot correspond to the existing tag tree. Using the LLM large model, entity recognition can also be performed on the content text. Compared with traditional methods, the large model has better semantic understanding ability and is more likely to correctly identify the semantics of a word in context. However, each time a question is answered, there is a certain probability of missing the required entity, and there may also be a large model "hallucination" problem, where the given entity does not exist in the original text; therefore, this application adopts an integrated method of combining rules, RaNER, and LLM models with multiple prompts in this step to give full play to the semantic understanding ability of the LLM model and avoid some shortcomings of the LLM model;
[0139] like Figure 4 As shown, the specific process of step S33 is as follows:
[0140] S331: When labeling the content text, determine whether the content text has been subjected to entity extraction (i.e., whether it has been extracted using the RaNER and LLM models); if entity extraction has been performed, the entity words become candidate tags; if entity extraction has not been performed, perform entity extraction (including RaNER entity recognition, and use the LLM large model to use information extraction prompts and thought chain summary prompts for recognition), and then add the tags corresponding to the recognized entity words to the candidate tag set;
[0141] S332: keyword matching and regular expression matching are used for the keywords or regular expressions corresponding to each tag in the tag tree, and the matched tags are also added to the candidate tag set of the content text;
[0142] S333: The candidate tag set obtained through the first two steps may have potential errors. For the tags identified by keywords, there may be some semantic errors, such as actually having a negative meaning, such as recognizing "comfortable" in "not very comfortable", or containing keywords but actually having another meaning, such as recognizing "dry skin" (a description of skin quality) in "wipe dry skin", or recognizing "olive skin" may refer to a description of skin color or olive skin. For tags identified by the LLM model, semantic understanding errors are generally rare, but there may be a certain probability that there are actually no mentions in the original text (the "hallucination" problem of the large model), and it is also possible that entity words, keywords, and other steps that are omitted when the LLM model is output are recognized; therefore, this step uses the large language model to use the discriminant Prompt to judge all the candidate tags that have been screened out by the content text, and the prompt word is such as "Judge whether the content text mentions the following content tags..." to determine whether the candidate tag matches the meaning of the corresponding content text; if it matches, the candidate tag is confirmed, and if it does not match, it is corrected. In this way, while improving the recall rate (reducing omissions) through various means, the semantic understanding ability of the LLM model is used to filter out entities that are matched by keywords but are semantically incorrect as much as possible, and to filter out entity words that do not exist in the original text that may be given by the LLM model in the previous link as much as possible, thereby achieving the effect of improving both precision and recall.
[0143] After identifying the content tags of each content text (title, video / image OCR text, video ASR text, etc.) of each content id, the tag id identified for the content id is stored in the database table.
[0144] After determining whether all the content in the content database is related to certain product categories, performing tag identification and storing the tag identification results, the various interactive indicators of each content tag can be counted, including the number of likes, comments, reposts, etc., so as to evaluate the performance of the content tags that appear in the marketing content of a certain product category and provide guidance on content tags for customers when producing product marketing content.
[0145] For the product database, the same structured tag tree and the same method are used for tag identification. In addition to using RaNER to identify entities in the product in the previous step, some content tag words may not be recognized. For example, in the earlier product example "A Brand Bi-A Alcohol Night Cream 2.0 Retinol Cream Morning C Evening A Firming Anti-Wrinkle", RaNER did not recognize the content tag "Morning C Evening A". Combined with the constructed tag tree, the tag can be identified if it already contains the "Morning C Evening A" tag. The tag identification results for all products in the product database are also stored in the product tag result database table.
[0146] The examples described in the present invention are merely descriptions of the preferred implementation modes of the present invention, and are not intended to limit the concept and scope of the present invention. Without departing from the design concept of the present invention, various modifications and improvements made to the technical solutions of the present invention by engineers and technicians in this field should all fall within the protection scope of the present invention.
Claims
1. A method for establishing content tags based on e-commerce data and social media marketing content data, Features: The steps include: S1: Build a product knowledge graph; S2: Build a content category database; obtain a media content database, use the product knowledge graph to filter out the content data related to the category of each product from the media content database, and build a content category database; S3: extract information from the content category database to build a category content label tree, and label the data in the content category database according to the category content label tree; this step specifically includes the following steps: S31: First, use the named entity recognition model to extract person entities, category entities, brand entities, and product attribute entities from the content category database; then use the large language model combined with the information extraction prompt and the thinking chain summary prompt to perform semantic recognition on the content category database and extract person entities, network hot word entities, user pain point entities, product feature entities, and applicable entities; finally, perform entity result fusion to obtain the final entity; S32: Convert the entity words of the final entity into word vectors through the text vectorization model; then obtain several categories of word vectors through the clustering algorithm; then summarize the words in each category into one or more tags through the large language model, and use the keyword types output by the large language model to build a content tag tree with a tree structure and the keywords of each tag; S33: Tagging the content text in the content category database according to the category content tag tree.
2. A method for establishing content tags based on e-commerce data and social media marketing content data according to claim 1, Features: The specific process of step S33 is as follows: When labeling the content text, determine whether the content text has been subjected to entity extraction; if entity extraction has been performed, the entity word becomes a candidate tag; if entity extraction has not been performed, after entity extraction, the tag corresponding to the identified entity word is added to the candidate tag set; And for the keywords or regular expressions corresponding to each tag in the tag tree, keyword matching and regular expression matching are used, and the matched tags are also added to the candidate tag set of the content text; Use the large language model to use the discriminant prompt to judge all the candidate tags that have been screened out for the content text to determine whether the candidate tags match the meaning of the corresponding content text; if they match, confirm the candidate tag, if not, modify it.
3. A method for establishing content tags based on e-commerce data and social media marketing content data according to claim 2, Features: When the tree-structured content tag tree is constructed, manual review and correction of the content tag tree is also included.
4. The method for establishing content tags based on e-commerce data and social media marketing content data according to claim 1, Features: The step S1 specifically includes the following steps: Collect product information from various e-commerce platforms to form a product database; The RaNER model is used to perform entity recognition on commodity text information in the commodity database to construct a commodity knowledge graph; the structure of the commodity knowledge graph is in the form of a triple of (entity, relationship, entity).
5. A method for establishing content tags based on e-commerce data and social media marketing content data according to claim 1 or 4, Features: The step S2 specifically includes the following steps: S21: Collecting content information of various social media to form a media content database; S22: Use the product knowledge graph to perform text matching on the text information in the media content database to establish a preliminary screening database for product categories; S23: Convert the image type content and video type content in the preliminary screening database into text content respectively; S24: Perform fine screening and classification on the primary screening database to determine whether the text content is related to the data of the product category.
6. A method for establishing content tags based on e-commerce data and social media marketing content data according to claim 5, Features: In step S21, the media content database only stores original text description information: for graphic content, the content title, content text and picture link content are stored; for video content, the content title and video link content are stored.
7. The method for establishing content tags based on e-commerce data and social media marketing content data according to claim 5, Features: In step S23, for the image content, the OCR technology is used to convert the text in the image into text content; for the video content, the video is first converted into an image, and the OCR technology is used to convert the text in the image into text content; and the ASR technology is used to convert the video voice into text content, and the two text contents are combined to obtain the final text content of the video content.
8. The method for establishing content tags based on e-commerce data and social media marketing content data according to claim 5, Features: The fine screening and classification in step S24 specifically includes: after matching the initial screening data in the initial screening database with brand and category keywords, if both brand and category entities are matched, it is determined that the text content is related to the data of the product category; if only brand or category keywords are matched, the large language model is used to classify the text content.
Citation Information
Patent Citations
Entity extraction method, device and equipment
CN111985237A
Recommended content management method and device, electronic equipment and storage medium
CN116610869A
Video-centered convergence media content recommendation method and device
CN113010701A
Aviation system knowledge graph construction method based on fusion and semi-supervised information extraction
CN116127090A
Cited By
Hierarchical Knowledge Extraction and Tag Association Methods for Large Models Targeting Business Text
CN123070288A
