CN116894188A - Service tag set updating method and device, medium and electronic equipment - Google Patents

Service tag set updating method and device, medium and electronic equipment Download PDF

Info

Publication number
CN116894188A
CN116894188A CN202310876887.XA CN202310876887A CN116894188A CN 116894188 A CN116894188 A CN 116894188A CN 202310876887 A CN202310876887 A CN 202310876887A CN 116894188 A CN116894188 A CN 116894188A
Authority
CN
China
Prior art keywords
tag
candidate
label
classification
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310876887.XA
Other languages
Chinese (zh)
Inventor
杜正印
袁泽寰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202310876887.XA priority Critical patent/CN116894188A/en
Publication of CN116894188A publication Critical patent/CN116894188A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/338Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The disclosure relates to a service tag set updating method, a device, a medium and electronic equipment, wherein the method comprises the following steps: inputting a first prompt word constructed based on target content and a first template into a pre-trained large language model to obtain a first answer text, wherein the first answer text comprises a first candidate tag set, the first candidate tag set comprises at least one first candidate tag, and each first candidate tag is a keyword of the target content; inputting a second prompt word constructed based on the classified label in the service label set, the second template and the first candidate label into the large language model to obtain a second answer text, wherein the second answer text is used for representing whether the first candidate label is a target candidate label or not, and the target candidate label is a classified label missing in the service label set; and writing the first candidate label belonging to the target candidate label into the service label set by using the large language model, so as to update the service label set based on the large language model of the full link.

Description

Service tag set updating method and device, medium and electronic equipment
Technical Field
The disclosure relates to the technical field of electronic information, in particular to a service tag set updating method, a device, a medium and electronic equipment.
Background
Tags may be used to categorize content, and multiple tags may form a tag system. The tag system is an important basis for an internet product related to content, and the internet product may provide different services, for example, may include a content recommendation service, a content search service, a content operation service, a content analysis service, a content creation service, and the like. As the content uploaded to the internet is continuously transmitted and changed, in order to improve the processing capacity of the service related to the content, the tag representing the content needs to iterate.
Therefore, how to implement the updating of the tags in the tag system is of great importance.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a service tag set updating method, including:
acquiring target content;
constructing a first prompt word based on the target content and the first template;
Inputting the first prompt word into a pre-trained large language model to obtain a first answer text, wherein the first answer text comprises a first candidate tag set, the first candidate tag set comprises at least one first candidate tag, and each first candidate tag is a keyword of the target content;
constructing a second prompting word based on the classification tags in the service tag set, the second template and the first candidate tag;
inputting the second prompt word into the large language model to obtain a second answer text, wherein the second answer text is used for representing whether the first candidate label is a target candidate label or not, and the target candidate label is a classification label missing in the service label set;
and writing the first candidate labels belonging to the target candidate labels into the service label set by using the large language model.
In a second aspect, the present disclosure provides a service tag set updating apparatus, including:
the acquisition module is used for acquiring target content;
the first construction module is used for constructing a first prompt word based on the target content and the first template;
the first processing module is used for inputting the first prompt word into a pre-trained large language model to obtain a first answer text, wherein the first answer text comprises a first candidate tag set, the first candidate tag set comprises at least one first candidate tag, and each first candidate tag is a keyword of the target content;
The second construction module is used for constructing a second prompt word based on the classification labels in the service label set, the second template and the first candidate labels;
the second processing module is used for inputting the second prompt word into the large language model to obtain a second answer text, wherein the second answer text is used for representing whether the first candidate tag is a target candidate tag or not, and the target candidate tag is a classification tag missing in the service tag set;
and the writing module is used for writing the first candidate labels belonging to the target candidate labels into the service label set by utilizing the large language model.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which when executed by a processing device implements the steps of the service tab set updating method of the first aspect.
In a fourth aspect, the present disclosure provides an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to implement the steps of the service tag set updating method in the first aspect.
Through the technical scheme, the text understanding capability of the large language model is utilized, the large language model based on the full link is used for updating the service tag set, the integrity of the tags in the service tag set is ensured, and good data support is provided for realizing service processing based on the service tag set.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale. In the drawings:
fig. 1 is a flowchart illustrating a method of service tab set update according to an exemplary embodiment of the present disclosure.
Fig. 2 is a schematic diagram illustrating a service labelset presented in a tree structure according to an exemplary embodiment of the present disclosure.
Fig. 3 is another schematic diagram illustrating a service labelset presented in a tree structure according to an exemplary embodiment of the present disclosure.
Fig. 4 is a block diagram illustrating a traffic labelset updating apparatus according to an exemplary embodiment of the present disclosure.
Fig. 5 is a schematic structural view of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part 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. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
Meanwhile, it can be understood that the data (including but not limited to the data itself, the acquisition or the use of the data) related to the technical scheme should conform to the requirements of the corresponding laws and regulations and related regulations.
A tag system, which may also be referred to as a tag set. In the related art, content is usually analyzed and marked manually, content tags corresponding to the content are obtained, and content tags which do not appear in the tag set are searched manually. However, this approach based on manual analysis and tag lookup is inefficient to process.
In view of the above, the embodiments of the present disclosure disclose a method, an apparatus, a medium, and an electronic device for updating a service tag set, which utilize text understanding capability of a large language model to update the service tag set based on a large language model of a full link, so as to ensure integrity of tags in the service tag set, and provide good data support for implementing service processing based on the service tag set.
For ease of understanding, the terms involved in the present disclosure are explained first as follows:
the large language model (Large language model, LLM) is a neural network model that can be used for development after training of massive text data. The large language model can understand the input text data, generate human-like responses using deep learning techniques, and can be applied to various tasks including language translation, question answering, text generation, and the like. The large language model used in the present disclosure is a model obtained through pre-training, and the use of the large language model can be realized by providing an external interface for calling the model.
Embodiments of the present disclosure are explained below with reference to the drawings.
Fig. 1 is a flowchart illustrating a service tag set updating method according to an exemplary embodiment of the present disclosure, which may be applied to an electronic device such as a server or a mobile terminal, as shown in fig. 1, the service tag set updating method may include the steps of:
step 110, obtaining target content.
Taking an internet product as an example of a content platform, the content platform can provide services such as content recommendation, content search, content operation, content analysis, content creation and the like.
The target content may be a text of the content newly uploaded to the content platform, or may be a title corresponding to the content newly uploaded to the content platform. Further, the target content may be obtained from the content platform in a streaming manner or in a periodic manner. It should be noted that, the streaming mode can obtain streaming data, and real-time performance and integrity of the updated service tag set can be ensured by extracting keywords from the streaming data. However, because the information amount of the internet is growing too fast, and considering that the hot spots corresponding to the uploaded content of the user may be consistent within a period of time, the hot spots can be understood as classified tags in the service tag set, and if the uploaded target content is acquired and analyzed in real time, the obtained tags have a high probability of being consistent. Thus, in order to reduce the amount of data analysis, the target content may be acquired from the content platform in a periodic manner. As one example, the target content may be obtained from the content platform every other week.
Step 120, based on the target content and the first template, constructing a first cue word.
It should be noted that the first prompt word is a request text for characterizing a keyword in the acquisition target content. And filling the target content into the first template to obtain a corresponding first prompt word.
For example, the first template may be: "what is the embodied point of interest in the video titled ___? The target content may be filled in the underline in the first template, thereby obtaining a corresponding first prompt.
For another example, the first template may be: what is the main content of the video summarized by keywords in the video titled ___? The target content may be filled in the underline in the first template, thereby obtaining a corresponding first prompt.
Step 130, inputting the first prompt word into the pre-trained large language model to obtain a first answer text, wherein the first answer text comprises a first candidate tag set, the first candidate tag set comprises at least one first candidate tag, and each first candidate tag is a keyword of target content.
It is worth to say that the pre-trained large language model can respond to the input prompt words, and the corresponding answer text is output based on the text understanding capability of the large language model.
By way of example, for a first cue word "what is entitled" do you dance today "in a video, what is its main content summarized with keywords? The resulting first answer text may be "dancing".
And 140, constructing a second prompt word based on the classification labels in the service label set, the second template and the first candidate labels.
It should be noted that, the second hint word is a request text for determining whether the first candidate tag is a target candidate tag, and the target candidate tag is a classification tag missing in the service tag set. And filling the classification labels and the first candidate labels in the service label set into a first template to obtain corresponding first prompt words.
For example, the second template may be: "___ tag is a synonymous tag with or is encompassed by the following tag, and if so, please indicate the corresponding tag: the following labels include: ___. The first candidate tag may be populated at a first underline in the first template and the category tag in the business tag set may be populated at a second underline in the first template.
And 150, inputting a second prompt word into the large language model to obtain a second answer text, wherein the second answer text is used for representing whether the first candidate tag is a target candidate tag or not.
For example, for the second hint word "whether the dancing tag is a synonymous tag with or is encompassed by the following tag, if so, please indicate the corresponding tag: the following labels include: singing, playing chess, running and long jump. The second answer text obtained may be "dancing tag is not a synonymous tag of the following tag, nor is it included in the following tag," dancing "belongs to the target candidate tag".
Step 160, writing the first candidate tag belonging to the target candidate tag into the service tag set by using the large language model.
It is worth to say that, the classification labels of the service label set have a father-son relationship, and the son classification labels in the pair of classification labels with father-son relationship belong to the field of the father classification labels.
For example, at least one root classification label and at least one descendant classification label of the root classification label in the service label set, where the descendant classification labels of the root classification label belong to the domain of the root classification label, the descendant classification labels may include sub-classification labels of the root classification label, sub-classification labels of the sub-classification label may exist, and so on.
Referring to a service tag set shown in a tree structure in fig. 2, tag 1 and tag 2 are root classification tags, and tag 3, tag 4, tag 5, tag 7, tag 8 and tag 11 are offspring classification tags of tag 1. Tag 6, tag 9 and tag 10 are offspring classification tags of tag 2, and in fig. 2, there is a parent-child relationship between two tags connected on the same side.
Therefore, since the classified tags of the service tag set have a parent-child relationship, a large language model can be utilized to determine the parent tag of the first candidate tag belonging to the target candidate tag, and writing is performed. For the specific implementation of step 160, reference may be made to the following related embodiments, which are not described herein.
Through the scheme, the text understanding capability of the large language model is utilized, the large language model based on the full link is used for updating the service tag set, the integrity of the tags in the service tag set is ensured, and good data support is provided for realizing service processing based on the service tag set.
In some embodiments, the step of constructing the second hint word based on the classification tag, the second template, and the first candidate tag in the service tag set may be implemented by: constructing a third prompting word based on the third template and the first candidate tag set; inputting a third prompt word into the large language model to obtain a third answer text, wherein the third answer text comprises a second candidate tag set, and the second candidate tag set comprises second candidate tags for rewriting each first candidate tag in the first candidate tag set; and constructing a second prompt word based on the classified tags in the service tag set, the second template and the second candidate tags, and using a second answer text obtained based on the second prompt word to represent whether the second candidate tags are target candidate tags or not.
It should be noted that the third hint word is used to characterize the text of the request for overwriting the first candidate tag in the first candidate tag set. And filling the first candidate labels in the first candidate label set into a first template to obtain corresponding first prompt words.
The third template may include a sample correspondence, where the sample correspondence includes a first sample tag and a second sample tag obtained by rewriting the first sample tag. For example, the third template may be:
the following two columns represent the correspondence between the original keywords and their tag words:
super fire gesture dance-gesture dance
Big flower tortoise with diamond pattern
Custom automobile seat cover-automobile seat cover
Melon planting-melon planting
Rabbit breeding base-breeding rabbit breeding
Then what the tag word corresponding to the original keyword is:
_____。”
as with the third template of the above example, the first candidate tags in the first candidate tag set may be filled in the underline, and the third hint word may be obtained. When the large language model is utilized, the sample corresponding relation can play a role in fine tuning the pre-trained large language model, so that the quality of the label rewritten by the large language model is higher.
Continuing with the example of the third template, if the first candidate tag in the first candidate tag set is a small original stream flower arrangement, head-to-hand inversion, and a girl writing a handwriting. Correspondingly, the third answer text may be:
according to the above correspondence, the tag words corresponding to the following original keywords may be:
Small original flow flower arrangement-flower arrangement
Head-hand handstand-handstand
Girl-handwriting capable of writing handwriting "
That is, flower arrangement, inversion, and handwriting can be used as the second candidate tag for rewriting each of the first candidate tags in the first candidate tag set.
It should be noted that, when the first candidate tag is sufficiently refined, the result of rewriting the first candidate tag in the third answer text is to output the first candidate tag itself.
In the present embodiment, compared with the embodiment shown in fig. 1, the constructed second hint word replaces the first candidate tag with a second candidate tag that is obtained by rewriting the first candidate tag.
On the basis of the third answer text, the step of writing the first candidate tag belonging to the target candidate tag into the service tag set by using the large language model may be implemented as follows: and writing the second candidate labels belonging to the target candidate labels into the service label set by using the large language model.
Because the extracted keywords are often not refined and summarized, the extracted keywords cannot be used as labels directly, so that the extracted keywords can be rewritten, and then the second candidate labels belonging to the target candidate labels are written into the service label set, thereby improving the quality of the labels in the service label set.
In some embodiments, the step of constructing the second hint word based on the classification tag, the second candidate tag, and the second template in the service tag set may be implemented as follows: constructing a fourth prompting word based on the second candidate tag, all root classification tags in the service tag set and a fourth template; inputting a fourth prompt word into the large language model to obtain a fourth answer text, wherein the fourth answer text is used for representing target root classification labels of the second candidate labels in all root classification labels; and constructing a second prompt word based on the classification tags in the classification tag subset, the second candidate tags and the second template, wherein the classification tag subset comprises all offspring classification tags of the target root classification tags.
Among them, the class labels where the parent class label does not exist are root class labels, such as label 1 and label 2 shown in fig. 2. The class labels in the set of business labels may carry attributes of whether they are root class labels, so that it may be determined whether the class labels are root class labels according to such attributes. In addition, the classification tag may also have attributes identifying its parent classification tag and child classification tag, so that all offspring classification tags of the target root classification tag may be identified.
It should be noted that, the fourth prompt word is used for characterizing a request text for obtaining the target root class label to which the second candidate label belongs in all the root class labels.
For example, the fourth template may be:
"___ belongs to which of the following labels: ___).
The second candidate tag may be filled in to a first underline in the fourth template and the root class tag may be filled in to a second underline in the fourth template, resulting in a constructed fourth hint word.
Taking the second candidate tag as a gesture thunderbolt dance, and taking the root classification tag as an example, the root classification tag comprises dancing, singing and playing, and the fourth answer text can be: the target root classification label of the gesture thunderbolt dance is dancing.
In contrast to the above embodiment, in the present embodiment, the second hint word is constructed to replace the service tag set with the subset of classification tags that includes all the offspring classification tags that are the target root classification tags to which the second candidate classification tag belongs.
Because it is necessary to determine whether the second candidate tag is a missing classified tag in the service tag set, comparison between the second candidate tag and the classified tag in the service tag set is necessarily involved, and as the number of classified tags in the service tag set increases, if a full amount of classified tags are compared with the second candidate tag, the calculation amount is increased, which is not friendly for the service with higher update real-time requirement, and the full amount comparison occupies more resources.
Therefore, the target root classification labels of the second candidate labels in all the root classification labels can be determined first, rough classification of the labels is carried out, and on the basis, the second candidate labels are only compared with all the offspring classification labels of the target root classification labels, so that the times of comparison are reduced, and the purposes of improving instantaneity and reducing resource occupation are achieved.
In some embodiments, the large language model determines the second answer text by calculating semantic similarity of the classification tag from the subset of classification tags to the second candidate tag and based on a magnitude relationship of a preset similarity threshold to the semantic similarity.
The magnitude relation herein means that the preset similarity threshold is greater than or equal to the semantic similarity, or that the preset similarity threshold is less than the semantic similarity.
For example, the large language model sequentially calculates the semantic similarity between the classification labels in the classification label subset and the second candidate labels until the semantic similarity obtained by calculation is greater than or equal to a preset similarity threshold, or all the classification labels in the classification label subset complete the calculation of the semantic similarity. Under the condition that the calculated semantic similarity is greater than or equal to a preset similarity threshold, the determined second answer text is a text used for representing that the second candidate tag belongs to the target candidate tag; after the semantic similarity calculation is completed for all the classification labels in the classification label subset, the condition that the semantic similarity is larger than or equal to the preset similarity threshold still does not exist, and the determined second answer text is a text used for representing that the second candidate label does not belong to the target candidate label.
The preset similarity threshold may be set based on actual situations, which is not limited herein.
Through the scheme, the second answer text is determined by using similarity calculation.
In some embodiments, the large language model determines the second answer text by calculating whether the text of the class label in the subset of class labels is identical to the text of the second candidate label and based on whether the text is identical.
In the case that the text of the classification tag is identical to the text of the second candidate tag, the determined second answer text is a text used to characterize that the second candidate tag is a text belonging to the target candidate tag; after all the classification tags in the subset of classification tags complete the calculation of whether the text is identical, the classification tags which are identical to the second candidate tag do not exist, and the determined second answer text is the text used for representing that the second candidate tag does not belong to the target candidate tag.
By the scheme, whether the texts are identical or not is used for determining the second answer text.
In some embodiments, the step of writing the second candidate tag belonging to the target candidate tag into the service tag set using the large language model may be implemented by: constructing a fifth prompt word based on the fifth template, the second candidate tag belonging to the target candidate tag and the classification tag in the service tag set; inputting a fifth prompt word into the large language model to obtain a fifth answer text, wherein the fifth answer text is used for representing whether the second candidate label is a sub-label of the classification label or not; and writing the second candidate label serving as a sub-label of the classified label into the service label set.
As can be seen from the above, since the classification tags of the service tag set have a parent-child relationship, it is necessary to determine the parent classification tag of the first candidate tag belonging to the target candidate tag by using a large language model, and then write the parent classification tag.
It should be noted that the fifth hint word is a request text for requesting to obtain a sub-tag that characterizes whether the second candidate tag is a category tag.
For example, the fifth template may be: "__ is a sub-label of __? The second candidate label belonging to the target candidate label may be filled in the first underline in the fifth template, and the classification label in the service label set may be filled in the second underline in the fifth template, so as to obtain a fifth prompt word.
As an example, the fifth answer text may be "if the gesture thunderbolt dance is a sub-label of dance". The fifth answer text characterizes that the second candidate tag gesture thunderbolt dance is a sub-tag of the class tag dance.
It should be noted that writing the second candidate tag as a sub-tag of the classification tag into the service tag set may be understood as adding not only the tag into the service tag set, but also an attribute characterizing the parent-child relationship.
Referring to fig. 2 and 3, in fig. 3, a tag 12 is added as a sub-tag of a tag 4 to the original service tag set shown in fig. 2, so as to implement updating of the tag in the original service tag set.
Through the scheme, the large language model is utilized to determine the father-son relationship of the newly added classification labels, and the newly added classification labels are written into the service label set according to the determined father-son relationship, so that the service based on the service label set can be better processed.
Based on the same inventive concept, an embodiment of the present disclosure provides a service tag set updating apparatus, and fig. 4 is a block diagram of a service tag set updating apparatus according to an exemplary embodiment of the present disclosure. Referring to fig. 4, the apparatus 400 includes:
an acquisition module 401, configured to acquire target content;
a first construction module 402, configured to construct a first hint word based on the target content and the first template;
a first processing module 403, configured to input the first prompt word into a pre-trained large language model, to obtain a first answer text, where the first answer text includes a first candidate tag set, the first candidate tag set includes at least one first candidate tag, and each first candidate tag is a keyword of the target content;
A second construction module 404, configured to construct a second hint word based on the classification tag in the service tag set, the second template, and the first candidate tag;
a second processing module 405, configured to input the second prompt word to the large language model, to obtain a second answer text, where the second answer text is used to characterize whether the first candidate tag is a target candidate tag, and the target candidate tag is a classification tag missing in the service tag set;
a writing module 406, configured to write, using the large language model, a first candidate tag belonging to the target candidate tag into the service tag set.
Optionally, the second construction module 404 includes:
a first construction sub-module for constructing a third hint word based on a third template and the first candidate tag set;
the first processing sub-module is used for inputting the third prompt word into the large language model to obtain a third answer text, wherein the third answer text comprises a second candidate tag set, and the second candidate tag set comprises a second candidate tag for rewriting each first candidate tag in the first candidate tag set;
the second construction submodule is used for constructing a second prompt word based on the classified tags in the service tag set, a second template and the second candidate tag, and a second answer text obtained based on the second prompt word is used for representing whether the second candidate tag is a target candidate tag or not;
The writing module 406 is specifically configured to write, using the large language model, a second candidate tag belonging to the target candidate tag into the service tag set.
Optionally, the service tag set includes at least one root classification tag and a descendant classification tag belonging to the root classification tag, and the second construction submodule is specifically configured to:
constructing a fourth prompting word based on the second candidate tag, all root classification tags in the service tag set and a fourth template;
inputting the fourth prompt word into the large language model to obtain a fourth answer text, wherein the fourth answer text is used for representing target root classification labels of the second candidate labels in all the root classification labels;
and constructing a second prompt word based on the classification tags in the classification tag subset, the second candidate tags and a second template, wherein the classification tag subset comprises all the offspring classification tags of the target root classification tag.
Optionally, the third template includes a sample correspondence, where the sample correspondence includes a first sample tag and a second sample tag obtained by rewriting the first sample tag.
Optionally, the large language model calculates the semantic similarity between the classification tag and the second candidate tag in the classification tag subset, and determines the second answer text based on the magnitude relation between a preset similarity threshold and the semantic similarity.
Optionally, the large language model determines the second answer text by calculating whether text of a class label in the subset of class labels is identical to text of the second candidate label and based on whether text is identical.
Optionally, the writing module 406 is specifically configured to:
constructing a fifth prompt word based on a fifth template, a second candidate tag belonging to the target candidate tag and the classification tags in the service tag set;
inputting the fifth prompt word into the large language model to obtain a fifth answer text, wherein the fifth answer text is used for representing whether the second candidate label is a sub-label of the classification label or not;
and writing the second candidate tag serving as a sub-tag of the classification tag into the service tag set.
The implementation of each module in the apparatus 400 may also refer to the above related embodiments, which are not described herein.
Based on the same inventive concept, the embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the above-described method.
Based on the same inventive concept, an embodiment of the present disclosure provides an electronic device including:
A storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the above method.
Referring now to fig. 5, a schematic diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the electronic device may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring target content; constructing a first prompt word based on the target content and the first template; inputting the first prompt word into a pre-trained large language model to obtain a first answer text, wherein the first answer text comprises a first candidate tag set, the first candidate tag set comprises at least one first candidate tag, and each first candidate tag is a keyword of the target content; constructing a second prompting word based on the classification tags in the service tag set, the second template and the first candidate tag; inputting the second prompt word into the large language model to obtain a second answer text, wherein the second answer text is used for representing whether the first candidate label is a target candidate label or not, and the target candidate label is a classification label missing in the service label set; and writing the first candidate labels belonging to the target candidate labels into the service label set by using the large language model.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. The name of a module does not in some cases define the module itself.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims. The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.

Claims (10)

1. A method for updating a service tag set, comprising:
acquiring target content;
constructing a first prompt word based on the target content and the first template;
inputting the first prompt word into a pre-trained large language model to obtain a first answer text, wherein the first answer text comprises a first candidate tag set, the first candidate tag set comprises at least one first candidate tag, and each first candidate tag is a keyword of the target content;
constructing a second prompting word based on the classification tags in the service tag set, the second template and the first candidate tag;
inputting the second prompt word into the large language model to obtain a second answer text, wherein the second answer text is used for representing whether the first candidate label is a target candidate label or not, and the target candidate label is a classification label missing in the service label set;
And writing the first candidate labels belonging to the target candidate labels into the service label set by using the large language model.
2. The method of claim 1, wherein constructing a second hint word based on the category label in the set of business labels, the second template, and the first candidate label comprises:
constructing a third prompting word based on a third template and the first candidate tag set;
inputting the third prompt word into the large language model to obtain a third answer text, wherein the third answer text comprises a second candidate tag set, and the second candidate tag set comprises a second candidate tag for rewriting each first candidate tag in the first candidate tag set;
constructing a second prompting word based on the classified tags in the service tag set, a second template and the second candidate tag, and using a second answer text obtained based on the second prompting word to represent whether the second candidate tag is a target candidate tag or not;
the writing, by using the large language model, the first candidate tag belonging to the target candidate tag into the service tag set includes:
and writing a second candidate tag belonging to the target candidate tag into the service tag set by using the large language model.
3. The method of claim 2, wherein the set of business labels includes at least one root class label and a descendant class label that belongs to the root class label, wherein constructing a second hint word based on the class label in the set of business labels, the second candidate label, and a second template comprises:
constructing a fourth prompting word based on the second candidate tag, all root classification tags in the service tag set and a fourth template;
inputting the fourth prompt word into the large language model to obtain a fourth answer text, wherein the fourth answer text is used for representing target root classification labels of the second candidate labels in all the root classification labels;
and constructing a second prompt word based on the classification tags in the classification tag subset, the second candidate tags and a second template, wherein the classification tag subset comprises all the offspring classification tags of the target root classification tag.
4. The method of claim 2, wherein the third template comprises a sample correspondence comprising a first sample tag and a second sample tag that is rewritten to the first sample tag.
5. A method according to claim 3, wherein the large language model determines the second answer text by calculating semantic similarity of the classification tags in the subset of classification tags to the second candidate tags and based on a pre-set similarity threshold and a magnitude relation of the semantic similarity.
6. A method according to claim 3, wherein the large language model determines the second answer text by calculating whether the text of a class label in the subset of class labels is identical to the text of the second candidate label and based on whether the text is identical.
7. The method of claim 3, wherein writing a second candidate tag belonging to the target candidate tag into the business tag set using the large language model comprises:
constructing a fifth prompt word based on a fifth template, a second candidate tag belonging to the target candidate tag and the classification tags in the service tag set;
inputting the fifth prompt word into the large language model to obtain a fifth answer text, wherein the fifth answer text is used for representing whether the second candidate label is a sub-label of the classification label or not;
And writing the second candidate tag serving as a sub-tag of the classification tag into the service tag set.
8. A traffic label set updating apparatus, comprising:
the acquisition module is used for acquiring target content;
the first construction module is used for constructing a first prompt word based on the target content and the first template;
the first processing module is used for inputting the first prompt word into a pre-trained large language model to obtain a first answer text, wherein the first answer text comprises a first candidate tag set, the first candidate tag set comprises at least one first candidate tag, and each first candidate tag is a keyword of the target content;
the second construction module is used for constructing a second prompt word based on the classification labels in the service label set, the second template and the first candidate labels;
the second processing module is used for inputting the second prompt word into the large language model to obtain a second answer text, wherein the second answer text is used for representing whether the first candidate tag is a target candidate tag or not, and the target candidate tag is a classification tag missing in the service tag set;
and the writing module is used for writing the first candidate labels belonging to the target candidate labels into the service label set by utilizing the large language model.
9. A computer readable medium on which a computer program is stored, characterized in that the program, when being executed by a processing device, carries out the steps of the method according to any one of claims 1-7.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 1-7.
CN202310876887.XA 2023-07-17 2023-07-17 Service tag set updating method and device, medium and electronic equipment Pending CN116894188A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310876887.XA CN116894188A (en) 2023-07-17 2023-07-17 Service tag set updating method and device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310876887.XA CN116894188A (en) 2023-07-17 2023-07-17 Service tag set updating method and device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116894188A true CN116894188A (en) 2023-10-17

Family

ID=88311839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310876887.XA Pending CN116894188A (en) 2023-07-17 2023-07-17 Service tag set updating method and device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116894188A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117708340A (en) * 2024-02-06 2024-03-15 阿里健康科技(杭州)有限公司 Label text determining method, model training and adjusting method, device and medium
CN117827178A (en) * 2024-03-04 2024-04-05 深圳市法本信息技术股份有限公司 Code automatic generation method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117708340A (en) * 2024-02-06 2024-03-15 阿里健康科技(杭州)有限公司 Label text determining method, model training and adjusting method, device and medium
CN117827178A (en) * 2024-03-04 2024-04-05 深圳市法本信息技术股份有限公司 Code automatic generation method

Similar Documents

Publication Publication Date Title
CN110321958B (en) Training method of neural network model and video similarity determination method
CN116894188A (en) Service tag set updating method and device, medium and electronic equipment
CN110278447B (en) Video pushing method and device based on continuous features and electronic equipment
CN112163076B (en) Knowledge question bank construction method, question and answer processing method, device, equipment and medium
CN113868538B (en) Information processing method, device, equipment and medium
CN110457325B (en) Method and apparatus for outputting information
CN113033707B (en) Video classification method and device, readable medium and electronic equipment
US20230315990A1 (en) Text detection method and apparatus, electronic device, and storage medium
CN112380883B (en) Model training method, machine translation method, device, equipment and storage medium
CN110300329B (en) Video pushing method and device based on discrete features and electronic equipment
CN116912734A (en) Video abstract data set construction method, device, medium and electronic equipment
CN116186545A (en) Training and application methods and devices of pre-training model, electronic equipment and medium
CN116258911A (en) Training method, device, equipment and storage medium for image classification model
CN113033682B (en) Video classification method, device, readable medium and electronic equipment
CN116072108A (en) Model generation method, voice recognition method, device, medium and equipment
CN111339770B (en) Method and device for outputting information
CN111680754B (en) Image classification method, device, electronic equipment and computer readable storage medium
CN113177176A (en) Feature construction method, content display method and related device
CN113033680A (en) Video classification method and device, readable medium and electronic equipment
CN112182179A (en) Entity question-answer processing method and device, electronic equipment and storage medium
CN111950572A (en) Method, apparatus, electronic device and computer-readable storage medium for training classifier
CN113177174B (en) Feature construction method, content display method and related device
CN116503849B (en) Abnormal address identification method, device, electronic equipment and computer readable medium
CN116027946B (en) Picture information processing method and device in interactive novel
CN116541421B (en) Address query information generation method and device, electronic equipment and computer medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination