Service tag set updating method and apparatus, medium, and electronic device
By automatically updating the business tag set using a large language model, the problem of low tag update efficiency was solved, the integrity and accuracy of the tag system were achieved, and business processing capabilities were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING YOUZHUJU NETWORK TECH CO LTD
- Filing Date
- 2023-07-17
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, the efficiency of label updates is low, making it difficult to achieve efficient updates and integrity maintenance of the label system.
By leveraging the text understanding capabilities of large language models, prompt words are constructed and input into a pre-trained model to automatically update the business label set, ensuring the completeness and accuracy of the labels.
It enabled efficient updates to the tagging system, ensuring the integrity and quality of tags, providing strong data support, and improving business processing capabilities.
Smart Images

Figure CN116894188B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of electronic information technology, and more specifically, to a method, apparatus, medium, and electronic device for updating a business tag set. Background Technology
[0002] Tags are used to categorize content, and multiple tags can form a tag system. The tag system is a crucial foundation for content-related internet products, which can offer various services such as content recommendation, content search, content operation, content analysis, and content creation. As the content uploaded to the internet constantly changes, the tags representing content need to iterate accordingly to improve the processing capabilities of content-related services.
[0003] Therefore, how to update tags in the tagging system is crucial. Summary of the Invention
[0004] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] Firstly, this disclosure provides a method for updating a business tag set, including:
[0006] Obtain the target content;
[0007] Based on the target content and the first template, construct the first prompt word;
[0008] The first prompt word is input into a pre-trained large language model to obtain a first answer text. The first answer text includes a first candidate tag set, which includes at least one first candidate tag. Each first candidate tag is a keyword of the target content.
[0009] Based on the category tags in the business tag set, the second template, and the first candidate tags, a second prompt word is constructed;
[0010] The second prompt word is input into the large language model to obtain the second response text. The second response text is used to characterize whether the first candidate label is the target candidate label. The target candidate label is the missing category label in the business label set.
[0011] Using the large language model, the first candidate tag belonging to the target candidate tag is written into the business tag set.
[0012] Secondly, this disclosure provides a service tag set updating device, comprising:
[0013] The acquisition module is used to acquire the target content;
[0014] The first construction module is used to construct the first prompt word based on the target content and the first template;
[0015] The first processing module is used to input the first prompt word into a pre-trained large language model to obtain a first answer text. The first answer text includes a first candidate tag set, which includes at least one first candidate tag. Each first candidate tag is a keyword of the target content.
[0016] The second construction module is used to construct a second prompt word based on the category tags in the business tag set, the second template, and the first candidate tag;
[0017] The second processing module is used to input the second prompt word into the large language model to obtain the second response text. The second response text is used to characterize whether the first candidate label is the target candidate label. The target candidate label is the missing category label in the business label set.
[0018] The writing module is used to write the first candidate tag belonging to the target candidate tag into the business tag set using the large language model.
[0019] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the service tag set update method described in the first aspect.
[0020] Fourthly, this disclosure provides an electronic device, comprising:
[0021] A storage device on which computer programs are stored;
[0022] A processing device is configured to execute the computer program in the storage device to implement the steps of the service tag set update method in the first aspect.
[0023] By utilizing the text understanding capabilities of the large language model described above, the business tag set can be updated based on the full-link large language model, ensuring the integrity of the tags in the business tag set and providing good data support for business processing based on the business tag set.
[0024] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0025] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings:
[0026] Figure 1 This is a flowchart illustrating a service tag set update method according to an exemplary embodiment of the present disclosure.
[0027] Figure 2 This is a schematic diagram illustrating a set of business tags displayed in a tree structure according to an exemplary embodiment of this disclosure.
[0028] Figure 3 This is another schematic diagram illustrating a set of business tags displayed in a tree structure according to an exemplary embodiment of this disclosure.
[0029] Figure 4 This is a block diagram illustrating a service tag set updating apparatus according to an exemplary embodiment of the present disclosure.
[0030] Figure 5 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0031] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0032] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0033] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0034] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0035] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0036] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0037] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0038] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0039] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0040] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0041] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0042] A tagging system, also known as a tag set, typically involves manually analyzing and annotating content to obtain corresponding tags, and then manually searching for tags not found in the tag set. However, this method, based on manual analysis and tag searching, is inefficient.
[0043] In view of this, this disclosure presents a method, apparatus, medium, and electronic device for updating a business tag set. By utilizing the text understanding capabilities of a large language model, it enables the updating of the business tag set based on a full-link large language model, ensuring the integrity of the tags in the business tag set and providing good data support for business processing based on the business tag set.
[0044] To facilitate understanding, the terms used in this disclosure are explained below:
[0045] A large language model (LLM) is a neural network model that can be developed after being trained on massive amounts of text data. LLMs can understand input text data and generate human-like responses using deep learning techniques. They can be applied to various tasks, including language translation, question answering, and text generation. The LLM used in this disclosure is a pre-trained model, and its use can be achieved by providing an external interface for calling the model.
[0046] The embodiments of this disclosure will be explained and described below with reference to the accompanying drawings.
[0047] Figure 1 This is a flowchart illustrating a service tag set update method according to an exemplary embodiment of the present disclosure. This service tag set update method can be applied to electronic devices such as servers or mobile terminals. Figure 1 As shown, the business tag set update method may include the following steps:
[0048] Step 110: Obtain the target content.
[0049] Taking internet products as a content platform as an example, this content platform can provide services such as content recommendation, content search, content operation, content analysis, and content creation.
[0050] The target content can be the main text of newly uploaded content to the content platform, or it can be the title of the content being uploaded. Furthermore, the target content can be retrieved from the content platform using either a streaming or periodic approach. It's worth noting that a streaming approach can acquire streaming data, and by extracting keywords from this data, the real-time nature and completeness of updating the business tag set can be ensured. However, due to the rapid growth of information on the internet, and considering that the trending topics corresponding to user-uploaded content may be consistent over a period of time (these trending topics can be understood as category tags in the business tag set), if the uploaded target content is retrieved and analyzed in real time, the resulting tags are likely to be consistent. Therefore, to reduce the amount of data analysis, a periodic approach can be used to retrieve the target content from the content platform. As an example, the target content can be retrieved from the content platform every week.
[0051] Step 120: Based on the target content and the first template, construct the first prompt word.
[0052] It's worth noting that the first prompt word is a request text used to represent keywords in the target content. The target content is then filled into the first template to obtain the corresponding first prompt word.
[0053] For example, the first template could be: "What are the points of interest reflected in the video titled ___?" The target content can be filled into the underlined part of the first template to obtain the corresponding first prompt word.
[0054] For example, the first template could be: "In the video titled ___, what is its main content summarized using keywords?" The target content can be filled into the underlined part of the first template to obtain the corresponding first prompt word.
[0055] Step 130: Input the first prompt word into the pre-trained large language model to obtain the first answer text. The first answer text includes a first candidate tag set, which includes at least one first candidate tag. Each first candidate tag is a keyword of the target content.
[0056] It is worth noting that the pre-trained large language model can respond to input prompts and output corresponding answer text based on the large language model's text understanding capabilities.
[0057] For example, in response to the prompt "What is the main content of the video titled 'Are you going to dance today?'" the first answer text could be "dance".
[0058] Step 140: Construct a second prompt word based on the category tags, the second template, and the first candidate tags in the business tag set.
[0059] It's worth noting that the second prompt word is the request text used to determine whether the first candidate tag is the target candidate tag. The target candidate tag is the missing category tag in the business tag set. The category tags from the business tag set and the first candidate tag are filled into the second template to obtain the corresponding second prompt word.
[0060] For example, the second template could be: "Is the ___ tag a synonym of the following tags, or is it contained by the following tags? If so, please indicate the corresponding tags: The following tags include: ___." The first candidate tag can be filled in the first underscore of the second template, and the category tags in the business tag set can be filled in the second underscore of the second template.
[0061] Step 150: Input the second prompt word into the large language model to obtain the second response text. The second response text is used to characterize whether the first candidate label is the target candidate label.
[0062] For example, in response to the second prompt, "Is the 'dance' tag a synonym of the following tags, or is it contained in the following tags? If so, please indicate the corresponding tags: The following tags include: singing, playing chess, running, and long jump," the second response text could be, "The 'dance' tag is not a synonym of the following tags, nor is it contained in the following tags. 'Dance' is a target candidate tag."
[0063] Step 160: Using the large language model, write the first candidate tag belonging to the target candidate tag into the business tag set.
[0064] It is worth noting that the category tags in the business tag set have a parent-child relationship. In a pair of category tags with a parent-child relationship, the child category tag belongs to the domain of the parent category tag.
[0065] For example, a business tag set may contain at least one root category tag and at least one descendant category tag of the root category tag. The descendant category tags of the root category tag belong to the domain to which the root category tag belongs. These descendant category tags may include sub-category tags of the root category tag, and may also include sub-category tags of the sub-category tag, and so on.
[0066] Reference Figure 2 The diagram shows a business tag set displayed in a tree structure. Tag 1 and Tag 2 are both root category tags, and Tag 3, Tag 4, Tag 5, Tag 7, Tag 8, and Tag 11 are descendant category tags of Tag 1. Tag 6, Tag 9, and Tag 10 are descendant category tags of Tag 2. Figure 2 In this context, two tags connected on the same side have a parent-child relationship.
[0067] Therefore, since the classification tags in the business tag set have parent-child relationships, a large language model can be used to determine the parent tag of the first candidate tag belonging to the target candidate tag before writing it. The specific implementation process of step 160 can be referred to the following related embodiments, which will not be elaborated upon here.
[0068] The above approach leverages the text understanding capabilities of a large language model to update the business tag set based on the full-link large language model, ensuring the integrity of the tags in the business tag set and providing strong data support for business processing based on the business tag set.
[0069] In some embodiments, the step of constructing a second prompt word based on the category tags, second template, and first candidate tags in the business tag set can be implemented as follows: constructing a third prompt word based on the third template and the first candidate tag set; inputting the third prompt word into a large language model to obtain a third answer text, the third answer text including a second candidate tag set, the second candidate tag set including second candidate tags that are rewritten from each first candidate tag in the first candidate tag set; constructing a second prompt word based on the category tags, second template, and second candidate tags in the business tag set, the second answer text obtained based on the second prompt word is used to characterize whether the second candidate tag is a target candidate tag.
[0070] It is worth noting that the third prompt word is used to represent the request text for rewriting the first candidate tag in the first candidate tag set. The first candidate tag in the first candidate tag set is filled into the third template to obtain the corresponding third prompt word.
[0071] The third template may include a sample correspondence, which includes a first sample label and a second sample label obtained by rewriting the first sample label. For example, the third template could be:
[0072] The following two columns show the correspondence between the original keywords and their tag words:
[0073] Super popular hand gesture dance - hand gesture dance
[0074] Large-flowered diamond-patterned turtle - Large-flowered diamond-patterned turtle
[0075] Custom car seat covers - Car seat covers
[0076] Melon cultivation - Melon planting
[0077] Rabbit breeding base - Rabbit breeding
[0078] So what are the tag words corresponding to the original keywords below?
[0079] _____.
[0080] As shown in the third template above, the first candidate label from the first candidate label set can be filled into the underlined area to obtain the third prompt word. When using a large language model, the sample correspondence can play a role in fine-tuning the pre-trained large language model, thereby improving the quality of the labels rewritten by the large language model.
[0081] Continuing with the example of the third template above, if the first candidate tags in the first candidate tag set are Ohara-ryu flower arranging, headstand, and girls who can write calligraphy, then the corresponding third answer text could be:
[0082] Based on the above correspondence, the tag words corresponding to the original keywords below might be:
[0083] Ohara School of Ikebana - Flower Arrangement
[0084] Headstand - Handstand
[0085] Girls who can write calligraphy - calligraphy
[0086] That is, flower arrangement, handstand, and calligraphy can be used as second candidate tags to rewrite each of the first candidate tags in the first candidate tag set.
[0087] It is worth noting that when the first candidate label is sufficiently refined, the rewriting of the first candidate label in the third answer text will output the first candidate label itself.
[0088] and Figure 1 Compared to the illustrated embodiment, in this embodiment, the constructed second prompt word replaces the first candidate tag with a second candidate tag obtained by rewriting the first candidate tag.
[0089] Based on the third response text obtained above, the step of using a large language model to write the first candidate tag belonging to the target candidate tag into the business tag set can be implemented in the following way: using a large language model to write the second candidate tag belonging to the target candidate tag into the business tag set.
[0090] Since the extracted keywords are often not concise and comprehensive enough, they cannot be directly used as tags. Therefore, the extracted keywords can be rewritten, and the second candidate tags belonging to the target candidate tags can be written into the business tag set to improve the quality of the tags in the business tag set.
[0091] In some embodiments, the above-described step of constructing a second prompt word based on the category tags, second candidate tags, and second template in the business tag set can be implemented as follows: constructing a fourth prompt word based on the second candidate tags, all root category tags in the business tag set, and the fourth template; inputting the fourth prompt word into a large language model to obtain a fourth response text, the fourth response text being used to characterize the target root category tag to which the second candidate tag belongs among all root category tags; constructing a second prompt word based on the category tags in the category tag subset, the second candidate tags, and the second template, the category tag subset including all descendant category tags of the target root category tag.
[0092] Among them, the category label that has no parent category label is the root category label, for example. Figure 2The labels shown are 1 and 2. Category labels in the business label set can carry an attribute indicating whether they are root category labels, allowing the determination of whether a category label is a root category label. Additionally, category labels can also have attributes identifying their parent and child category labels, thus allowing the identification of all descendant category labels of the target root category label.
[0093] It is worth noting that the fourth cue word is used to characterize the request text for obtaining the target root category label to which the second candidate label belongs among all root category labels.
[0094] For example, the fourth template could be:
[0095] "___ belongs to which of the following tags? The following tags include: ___".
[0096] The second candidate label can be filled into the first underline in the fourth template, and the root category label can be filled into the second underline in the fourth template, thus obtaining the constructed fourth prompt word.
[0097] Taking the second candidate label as breakdancing gestures, and the root category labels as dancing, singing, and playing ball, the fourth response text could be: "The target root category label for breakdancing gestures is dancing."
[0098] Compared with the above embodiments, in this embodiment, the business tag set is replaced with a category tag subset in the constructed second prompt word. The category tag subset includes all descendant category tags of the target root category tag to which the second candidate category tag belongs.
[0099] Since it is necessary to determine whether the second candidate label is a missing category label in the business label set, it is inevitable to compare the second candidate label with the category labels in the business label set. As the number of category labels in the business label set increases, comparing all category labels with the second candidate label will increase the amount of computation. This is not friendly to businesses with high real-time update requirements, and a full comparison will consume a lot of resources.
[0100] Therefore, the target root classification label to which the second candidate label belongs among all the root classification labels can be determined first, and a coarse classification of the labels can be performed. Based on this, the second candidate label is compared only with all the descendant classification labels of the target root classification label, reducing the number of comparisons required, thereby improving real-time performance and reducing resource consumption.
[0101] In some embodiments, the large language model calculates the semantic similarity between the category label in the category label subset and the second candidate label, and determines the second answer text based on the relationship between the preset similarity threshold and the semantic similarity.
[0102] The "size relationship" here means that the preset similarity threshold is greater than or equal to the semantic similarity, or the preset similarity threshold is less than the semantic similarity.
[0103] For example, the large language model sequentially calculates the semantic similarity between the category labels in the category label subset and the second candidate label until the calculated semantic similarity is greater than or equal to a preset similarity threshold, or until the semantic similarity calculation is completed for all category labels in the category label subset. If the calculated semantic similarity is greater than or equal to the preset similarity threshold, the determined second response text is used to characterize that the second candidate label belongs to the target candidate label. If, after calculating the semantic similarity for all category labels in the category label subset, there is still no case where the semantic similarity is greater than or equal to the preset similarity threshold, then the determined second response text is used to characterize that the second candidate label does not belong to the target candidate label.
[0104] The preset similarity threshold can be set according to the actual situation, and this embodiment does not limit it.
[0105] The above method uses similarity calculation to determine the second response text.
[0106] In some embodiments, the large language model determines the second response text by calculating whether the text of the classification label in the classification label subset is exactly the same as the text of the second candidate label.
[0107] If the text of the category label is exactly the same as the text of the second candidate label, the determined second response text is the text used to characterize that the second candidate label belongs to the target candidate label; if after all category labels in the category label subset have completed the calculation of whether their texts are exactly the same, there is still no category label that is the same as the second candidate label, then the determined second response text is the text used to characterize that the second candidate label does not belong to the target candidate label.
[0108] The above method uses the fact that the texts are completely identical to determine the second response text.
[0109] In some embodiments, the step of using a large language model to write the second candidate label belonging to the target candidate label into the business label set can be implemented in the following way: based on the fifth template, the second candidate label belonging to the target candidate label, and the category label in the business label set, a fifth prompt word is constructed; the fifth prompt word is input into the large language model to obtain the fifth response text, which is used to characterize whether the second candidate label is a sub-label of the category label; the second candidate label is written into the business label set as a sub-label of the category label.
[0110] As can be seen from the above, since the classification tags of the business tag set have parent-child relationships, it is necessary to use a large language model to determine the parent classification tag of the first candidate tag belonging to the target candidate tag before writing it.
[0111] It is worth noting that the fifth prompt word is the request text used to request the sub-labels that indicate whether the second candidate label is a category label.
[0112] For example, the fifth template could be: "Is __ a sub-tag of __?". The second candidate tag belonging to the target candidate tag can be filled into the first underline in the fifth template, and the category tag in the business tag set can be filled into the second underline in the fifth template, thus obtaining the fifth prompt word.
[0113] As an example, the fifth response text could be "Is breakdancing a sub-label of dancing?". This fifth response text indicates that the second candidate label, breakdancing, is a sub-label of the category label dancing.
[0114] It is worth noting that writing the second candidate label as a sub-label of the category label into the business label set can be understood as not only adding labels to the business label set, but also adding attributes that represent parent-child relationships.
[0115] Combination Figure 2 and Figure 3 ,exist Figure 3 In the text, tag 12 is added as a child tag of tag 4. Figure 2 The existing business tag set shown is used to update the tags in the existing business tag set.
[0116] The above approach utilizes a large language model to determine the parent-child relationship of newly added category tags. Based on the determined parent-child relationship, the newly added category tags are written into the business tag set to better handle business based on the business tag set.
[0117] Based on the same inventive concept, embodiments of this disclosure provide a business tag set updating device. Figure 4 This is a block diagram illustrating a service tag set updating apparatus according to an exemplary embodiment of the present disclosure. (Refer to...) Figure 4 The device 400 includes:
[0118] Module 401 is used to acquire target content;
[0119] The first construction module 402 is used to construct the first prompt word based on the target content and the first template;
[0120] The first processing module 403 is used to input the first prompt word into a pre-trained large language model to obtain a first answer text. The first answer text includes a first candidate tag set, which includes at least one first candidate tag. Each first candidate tag is a keyword of the target content.
[0121] The second construction module 404 is used to construct a second prompt word based on the classification tags in the business tag set, the second template, and the first candidate tag;
[0122] The second processing module 405 is used to input the second prompt word into the large language model to obtain the second response text. The second response text is used to characterize whether the first candidate label is the target candidate label. The target candidate label is the missing category label in the business label set.
[0123] The writing module 406 is used to write the first candidate tag belonging to the target candidate tag into the business tag set using the large language model.
[0124] Optionally, the second construction module 404 includes:
[0125] The first construction submodule is used to construct a third prompt word based on the third template and the first candidate tag set;
[0126] The first processing submodule is used to input the third prompt word into the large language model to obtain the third answer text. The third answer text includes a second candidate tag set, which includes second candidate tags that are rewritten from each of the first candidate tags in the first candidate tag set.
[0127] The second construction submodule is used to construct a second prompt word based on the classification label, the second template and the second candidate label in the business label set. The second answer text obtained based on the second prompt word is used to characterize whether the second candidate label is the target candidate label.
[0128] The writing module 406 is specifically used to use the large language model to write the second candidate tag belonging to the target candidate tag into the business tag set.
[0129] Optionally, the business tag set includes at least one root category tag and descendant category tags belonging to the root category tag, and the second construction submodule is specifically used for:
[0130] Based on the second candidate label, all root category labels in the business label set, and the fourth template, a fourth prompt word is constructed;
[0131] The fourth prompt word is input into the large language model to obtain the fourth response text, which is used to characterize the target root classification label to which the second candidate label belongs among all the root classification labels;
[0132] Based on the classification labels in the classification label subset, the second candidate label, and the second template, a second prompt word is constructed, wherein the classification label subset includes all the descendant classification labels of the target root classification label.
[0133] Optionally, the third template includes a sample correspondence relationship, which includes a first sample label and a second sample label obtained by rewriting the first sample label.
[0134] Optionally, the large language model calculates the semantic similarity between the classification labels in the classification label subset and the second candidate labels, and determines the second answer text based on the relationship between a preset similarity threshold and the semantic similarity.
[0135] Optionally, the large language model determines the second response text based on whether the text of the classification label in the classification label subset is completely identical to the text of the second candidate label.
[0136] Optionally, the writing module 406 is specifically used for:
[0137] Based on the fifth template, the second candidate tag belonging to the target candidate tag, and the category tag in the business tag set, a fifth prompt word is constructed;
[0138] The fifth prompt word is input into the large language model to obtain the fifth response text, which is used to characterize whether the second candidate label is a sub-label of the classification label;
[0139] The second candidate label is written into the business label set as a sub-label of the category label.
[0140] The implementation methods of each module in the device 400 can also refer to the above-mentioned related embodiments, and will not be repeated here.
[0141] Based on the same inventive concept, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the above-described method.
[0142] Based on the same inventive concept, embodiments of this disclosure provide an electronic device, including:
[0143] A storage device on which computer programs are stored;
[0144] A processing device for executing the computer program in the storage device to implement the steps of the above method.
[0145] The following is for reference. Figure 5 This diagram illustrates a structural schematic of an electronic device 500 suitable for implementing embodiments of the present disclosure. The terminal devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0146] like Figure 5 As shown, electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. RAM 503 also stores various programs and data required for the operation of electronic device 500. Processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0147] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0148] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0149] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0150] In some implementations, electronic devices can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communications (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0151] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0152] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the following actions: acquiring target content; constructing a first prompt word based on the target content and a first template; inputting the first prompt word into a pre-trained large language model to obtain a first response text, the first response text including a first candidate tag set, the first candidate tag set including at least one first candidate tag, each first candidate tag being a keyword of the target content; constructing a second prompt word based on a category tag in a business tag set, a second template, and the first candidate tag; inputting the second prompt word into the large language model to obtain a second response text, the second response text being used to characterize whether the first candidate tag is a target candidate tag, the target candidate tag being a missing category tag in the business tag set; and using the large language model to write the first candidate tag belonging to the target candidate tag into the business tag set.
[0153] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0154] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0155] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules are not, in some cases, intended to limit the functionality of the module itself.
[0156] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0157] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0158] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0159] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0160] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.
Claims
1. A method for updating a business tag set, characterized in that, include: Obtain the target content; Based on the target content and the first template, a first prompt word is constructed, wherein the first prompt word represents the request text for obtaining keywords in the target content; The first prompt word is input into a pre-trained large language model to obtain a first answer text. The first answer text includes a first candidate tag set, which includes at least one first candidate tag. Each first candidate tag is a keyword of the target content. Based on the category tags in the business tag set, the second template, and the first candidate tags, a second prompt word is constructed; The second prompt word is input into the large language model to obtain the second response text. The second response text is used to characterize whether the first candidate label is the target candidate label. The target candidate label is the missing category label in the business label set. Using the large language model, the first candidate tag belonging to the target candidate tag is written into the business tag set.
2. The method according to claim 1, characterized in that, The construction of the second prompt word based on the classification tags in the business tag set, the second template, and the first candidate tags includes: Based on the third template and the first candidate tag set, a third prompt word is constructed; The third prompt word is input into the large language model to obtain the third answer text. The third answer text includes a second candidate tag set, which includes second candidate tags that are rewritten from each of the first candidate tags in the first candidate tag set. Based on the classification tags, the second template, and the second candidate tags in the business tag set, a second prompt word is constructed, and the second response text obtained based on the second prompt word is used to characterize whether the second candidate tag is the target candidate tag; The step of using the large language model to write the first candidate tag belonging to the target candidate tag into the business tag set includes: Using the large language model, the second candidate tag belonging to the target candidate tag is written into the business tag set.
3. The method according to claim 2, characterized in that, The business tag set includes at least one root category tag and descendant category tags belonging to the root category tag. The construction of the second prompt word based on the category tags in the business tag set, the second candidate tag, and the second template includes: Based on the second candidate label, all root category labels in the business label set, and the fourth template, a fourth prompt word is constructed; The fourth prompt word is input into the large language model to obtain the fourth response text, which is used to characterize the target root classification label to which the second candidate label belongs among all the root classification labels; Based on the classification labels in the classification label subset, the second candidate label, and the second template, a second prompt word is constructed, wherein the classification label subset includes all the descendant classification labels of the target root classification label.
4. The method according to claim 2, characterized in that, The third template includes a sample correspondence relationship, which includes a first sample label and a second sample label obtained by rewriting the first sample label.
5. The method according to claim 3, characterized in that, The large language model calculates the semantic similarity between the category label in the category label subset and the second candidate label, and determines the second answer text based on the relationship between the preset similarity threshold and the semantic similarity.
6. The method according to claim 3, characterized in that, The large language model calculates whether the text of the category label in the category label subset is exactly the same as the text of the second candidate label, and determines the second answer text based on whether the text is exactly the same.
7. The method according to claim 3, characterized in that, The step of using the large language model to write the second candidate tag belonging to the target candidate tag into the business tag set includes: Based on the fifth template, the second candidate tag belonging to the target candidate tag, and the category tag in the business tag set, a fifth prompt word is constructed; The fifth prompt word is input into the large language model to obtain the fifth response text, which is used to characterize whether the second candidate label is a sub-label of the classification label; The second candidate label is written into the business label set as a sub-label of the category label.
8. A service tag set updating device, characterized in that, include: The acquisition module is used to acquire the target content; The first construction module is used to construct a first prompt word based on the target content and the first template, wherein the first prompt word represents the request text for obtaining keywords in the target content; The first processing module is used to input the first prompt word into a pre-trained large language model to obtain a first answer text. The first answer text includes a first candidate tag set, which includes at least one first candidate tag. Each first candidate tag is a keyword of the target content. The second construction module is used to construct a second prompt word based on the category tags in the business tag set, the second template, and the first candidate tag; The second processing module is used to input the second prompt word into the large language model to obtain the second response text. The second response text is used to characterize whether the first candidate label is the target candidate label. The target candidate label is the missing category label in the business label set. The writing module is used to write the first candidate tag belonging to the target candidate tag into the business tag set using the large language model.
9. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by the processing device, the program implements the steps of the method described in any one of claims 1-7.
10. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1-7.