Method, apparatus, device and storage medium for generating a set of labels
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING YOUZHUJU NETWORK TECH CO LTD
- Filing Date
- 2023-03-14
- Publication Date
- 2026-08-07
AI Technical Summary
[0007]应当理解,该部分中所描述的内容并非旨在限定本公开的实施例的关键特征或重要特征,也不用于限制本公开的范围。本公开的其他特征将通过以下的描述而变得容易理解。
Smart Images

Figure CN116186434B_ABST
Abstract
Description
Technical Field
[0001] The exemplary embodiments disclosed herein relate generally to the field of computers, and in particular to methods, apparatus, devices, and computer-readable storage media for generating sets of tags. Background Technology
[0002] With the rapid development of internet technology, more and more applications and websites require tag-related functions, such as tag matching, tag categorization, and tag filtering. For example, after an application matches content with tags, it can push content to users based on their interest tags that match their preferences. People expect to be able to easily and conveniently generate accurate tag sets to improve the accuracy of tag matching, content push, and other functions. Summary of the Invention
[0003] In a first aspect of this disclosure, a method for generating a set of tags is provided. The method includes: obtaining a set of candidate tags, the set including at least one candidate tag; generating at least one text query based on the at least one candidate tag; determining at least one query response corresponding to the at least one text query using a trained language model; and determining a set of target interest tags from the at least one candidate tag based on the at least one query response.
[0004] In a second aspect of this disclosure, an apparatus for generating a tag set is provided. The apparatus includes: a candidate set acquisition module configured to acquire a candidate tag set, the candidate tag set including at least one candidate tag; a text query generation module configured to generate at least one text query based on at least one candidate tag; a query response determination module configured to determine at least one query response corresponding to at least one text query using a trained language model; and a target set determination module configured to determine a target interest tag set from at least one candidate tag based on at least one query response.
[0005] In a third aspect of this disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the electronic device to perform the method of the first aspect.
[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. A computer program is stored on the medium, which, when executed by a processor, implements the method of the first aspect.
[0007] It should be understood that the description in this section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0008] 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. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0009] Figure 1 A schematic diagram of an example environment in which embodiments of the present disclosure can be implemented is shown;
[0010] Figure 2 A schematic diagram of an example architecture for generating a set of tags according to some embodiments of the present disclosure is shown;
[0011] Figure 3 A flowchart is shown illustrating a process for generating a set of tags according to some embodiments of the present disclosure;
[0012] Figure 4 A block diagram of an apparatus for generating a set of tags according to some embodiments of the present disclosure is shown; and
[0013] Figure 5 A block diagram of an electronic device that may implement one or more embodiments of the present disclosure is shown. Detailed Implementation
[0014] 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.
[0015] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below. As used herein, the term "model" can represent the relationship between various data. For example, the above-mentioned relationship can be obtained based on various technical solutions that are currently known and / or will be developed in the future.
[0016] In this document, unless explicitly stated otherwise, performing a step in response to A does not mean that the step is performed immediately after A, but may include one or more intermediate steps.
[0017] 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.
[0018] 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 through appropriate means in accordance with relevant laws and regulations, and user authorization should be obtained.
[0019] 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.
[0020] As an optional but non-limiting embodiment, in response to receiving a user's active request, a prompt message can be sent to the user, for example, 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 whether to "agree" or "disagree" to provide personal information to the electronic device.
[0021] It is understood that the above notification and user authorization acquisition process is merely illustrative and does not constitute a limitation on the embodiments of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the embodiments of this disclosure.
[0022] As used in this paper, the term "model" refers to a model that learns the relationship between inputs and outputs from training data, enabling it to generate corresponding outputs for a given input after training. Model generation can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs using multiple layers of processing units. A neural network model is an example of a deep learning-based model. In this paper, "model" may also be referred to as a "machine learning model," "learning model," "machine learning network," or "learning network," and these terms are used interchangeably.
[0023] A neural network is a machine learning network based on deep learning. A neural network processes input and provides a corresponding output, typically consisting of an input layer, an output layer, and one or more hidden layers between the input and output layers. Neural networks used in deep learning applications often include many hidden layers, thus increasing the network's depth. The layers of a neural network are connected sequentially, so that the output of the previous layer is provided as the input to the next layer. The input layer receives the input to the neural network, while the output layer's output serves as the final output. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each node processing the input from the layer above.
[0024] Machine learning typically comprises three phases: training, testing, and application (also known as inference). In the training phase, a given model is trained using a large amount of training data, iteratively updating its parameter values until the model can consistently generate inferences that meet the expected goals from the training data. Through training, the model can be considered to have learned the relationship between inputs and outputs (also known as the input-output mapping) from the training data. The parameter values of the trained model are determined. In the testing phase, test inputs are applied to the trained model to test whether it can provide the correct output, thus determining the model's performance. In the application phase, the model can be used to process actual inputs based on the trained parameter values to determine the corresponding output.
[0025] As briefly mentioned earlier, people expect to be able to easily and conveniently generate accurate sets of tags (also known as tag systems), especially sets of interest tags. Interest tags refer to tags used to describe interests.
[0026] Traditionally, tag construction primarily relies on manual methods, such as expert definition and operational mining, to generate tag sets. However, due to limitations in human energy, knowledge, and time, the granularity of the mined tags is often coarse, with the total number of tags typically ranging from tens to hundreds, making it difficult to adapt to more refined recommendation and operational scenarios. Another approach is to automate tag mining using pre-trained tag mining models. For example, in mining interest tags, a large number of interest tags can be obtained by mining interest circles, content tag systems, hashtag candidate sets, search queries, text keywords, vertical category tags (such as games, automobiles), encyclopedia entries, etc. However, because human interests are complex and abstract, automated mining methods, without extensive manual filtering, often contain a lot of noise and are unsuitable as tags for "interests."
[0027] Embodiments of this disclosure provide an improved scheme for generating tag sets. According to this scheme, a text query is generated based on candidate tags in a candidate tag set, and the query response corresponding to the text query is determined using a trained language model. A target interest tag set is then determined from the candidate tag set based on the query response. In this way, an accurate interest tag set can be generated automatically and conveniently, filtering out unwanted tags and improving the efficiency of interest tag generation.
[0028] Figure 1 A schematic diagram of an example environment 100 that can be implemented according to embodiments of the present disclosure is shown. Environment 100 may be an example application scenario of a set of interest tags.
[0029] like Figure 1 As shown, environment 100 may include electronic device 110. Electronic device 110 can access interest tag set 105, which includes N tags associated with interests (referred to as interest tags), where N is greater than 1. In some embodiments, electronic device 110 may also run an application with interest tag association functionality, such as a content sharing application. Electronic device 110 may present the application's user interface 112 through a display device. In some embodiments, electronic device 110 may also present interest tags associated with content in user interface 112 within user interface 112.
[0030] Interest tags are tags that describe the interests of a group. As just some examples, interest tags can include tags belonging to various categories such as anime / manga, traditional Chinese culture, music, videos, objects, talents (dance, singing, etc.), food, sports, and so on. In some embodiments, the interest tags tagged in the content can be pre-set by the user, for example, by selecting from a predefined set of interest tags 105.
[0031] The interest tags associated with the content in the user interface 112 used for content presentation can be selected by the electronic device 110 from the interest tag set 105 and automatically associated with the content itself, or they can be selected by the user from the interest tag set 105 or manually entered by the user when publishing the content.
[0032] In some embodiments, the electronic device 110 can also automatically select interest tags from the interest tag set 105 that match the content's points of interest, and use these tags to tag the content. This allows for recommendations to be made to the user based on the matching of the tagged content's interest tags with the user's interests.
[0033] In some embodiments, the interest tag set 105 can be remotely stored in a database, which can be connected to an electronic device 110. The electronic device 110 can access the database, thereby accessing the interest tag set 105. In embodiments of this disclosure, the electronic device 110 and the database can interact via a communication connection.
[0034] In some embodiments, the interest tag set 105 can be directly stored in the electronic device 110, and the electronic device 110 can directly obtain interest tags based on the interest tag set 105 and perform related operations.
[0035] In some embodiments, the interest tag set 105 may be updated, and the electronic device 110 may obtain the updated interest tag set 105 and replace the previous interest tag set 105.
[0036] Electronic device 110 can include any computing system with computing capabilities, such as various computing devices / systems, terminal devices, server devices, etc. Terminal devices can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, virtual reality (VR) all-in-one machines, game consoles, gaming laptops, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. Server devices can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. Server devices can include, for example, computing systems / servers, such as mainframes, edge computing nodes, computing devices in cloud environments, etc.
[0037] While some example application scenarios of interest tag sets have been discussed above, it should be understood that this is only one of the many application scenarios of this disclosure. The embodiments of this disclosure are also applicable to other application scenarios. Therefore, the embodiments of this disclosure are not limited in this respect.
[0038] It should also be understood that the environment 100 and its structure and function are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. In some embodiments, the environment 100 may include components that are compatible with... Figure 1The same, fewer, more, or different systems, devices, components, and / or elements arranged or configured in the same or different ways as shown.
[0039] The following description will continue with reference to the accompanying drawings, which will provide some exemplary embodiments of this disclosure.
[0040] Figure 2 A schematic diagram of an example architecture 200 for generating a tag set according to some embodiments of the present disclosure is shown. Generally, architecture 200 may include a candidate set acquisition unit 210, a text query generation unit 220, a query response determination unit 2530, and a target tag determination unit 240. These units and other units not shown in architecture 200 may be implemented, for example, at electronic device 110, or may be implemented at other devices, and the determined set of interest tags 105 may be provided to electronic device 110 for use. Hereinafter, for ease of description, the example of architecture 200 being implemented at electronic device 110 will be used.
[0041] The candidate set acquisition unit 210 is configured to acquire a candidate tag set 201, which includes at least one candidate tag. The candidate tags included in the candidate tag set 201 can be tags that can be candidates for interest tags, obtained in any suitable manner. The methods for obtaining candidate tags may include manual construction, automated mining, etc. The candidate tags included in the candidate tag set 201 may contain candidate tags that satisfy the target interest tag set, or candidate tags that do not satisfy the target interest tag set.
[0042] In some embodiments, the candidate set acquisition unit 210 may acquire a first candidate label set including at least one candidate label, wherein the candidate labels in the first candidate label set may be manually mined. The candidate set acquisition unit 210 then generates a second candidate label set based on the first candidate label set using a trained label mining model, and generates a candidate label set based on the first and second candidate label sets. For example, the trained label mining model can extract feature words from the candidate labels in the first candidate label set to mine other candidate labels similar to the candidate labels in the first candidate label set, thus obtaining the second candidate label set.
[0043] The candidate set acquisition unit 210 provides the acquired candidate tag set 201 to the text query generation unit 220, which generates at least one text query 203 based on at least one candidate tag. Each text query 203 can be constructed to query whether one or more associated candidate tags can express interest, and / or to determine whether two or more candidate tags are similar to each other. Thus, as described below, based on the query response corresponding to the text query 203, the candidate tags in the candidate tag set 201 can be effectively filtered to extract target interest tags and reduce redundancy caused by similar tags.
[0044] In some embodiments, the text query generation unit 220 can directly generate a text query 203 based on candidate tags. For example, the text query generation unit 220 can utilize a model with text query generation capabilities, with candidate tags as input to the model, and the model can output the text query 203 corresponding to the candidate tags.
[0045] To improve the usability and generation efficiency of text queries, in some embodiments, the text query generation unit 220 can obtain at least one query sentence template 202. The text query generation unit 200 can generate at least one text query 203 by populating the query sentence template 202 with at least one or more candidate tags from the candidate tag set. It should be noted that each query sentence template 202 can be populated with at least one candidate tag. In some embodiments, the text query generation unit 220 can pre-store at least one query sentence template 202 and can update and / or expand more sentence templates on the at least one query sentence template 202.
[0046] In some embodiments, at least one query sentence template 202 may be preset by the user. In some embodiments, the text query generation unit 220 may receive new query sentence templates set by the user in real time, or update stored query sentence templates in response to user settings. In some embodiments, the text query generation unit 220 may also generate new query sentence templates based on at least one stored query sentence template 202.
[0047] In some embodiments, to ensure the accuracy of the interest tags determined by the subsequent query response determination unit 230 based on the query response 204, the query sentence template 202 can be set to include keywords such as "interest", "like", "interested", "preference", and "hobby", or it can be set to allow the query response determination unit 230 to give a query response 204 indicating affirmation or negation, so that the target tag determination unit 240 can determine the interest tags more quickly.
[0048] like Figure 2As shown, the query template 202 can include, for example, "Is __ an interest?", "Is __ an interest?", "Which of __, __, and __ are interests?", etc., where each blank in the query template can be filled with candidate tags from the candidate tag set 201. The text query generation unit 220 can fill the query template 202 with the candidate tags from the obtained candidate tag set 201. For example, if the candidate tag is "frisbee", the text query generation unit 220 can fill "frisbee" into the query template 202 for "Is __ an interest?", generating the text query 203 for "Is frisbee an interest?". As another example, if the candidate tags are "stray bird", "gesture dance", and "Today is a good day", the text query generation unit 220 can fill "stray bird", "gesture dance", and "Today is a good day" into the query template 202 for "Which of __, __, and __ are interests?", generating the text query 203 for "Stray bird, gesture dance, Today is a good day, which are interests?".
[0049] The query response determination unit 230 is configured to determine at least one query response 204 corresponding to at least one text query 203 using a trained language model 235. The trained language model 235 is able to understand the semantics of the input text sequence and provide a reasonable answer. In other words, in embodiments of this disclosure, by leveraging the semantic understanding capabilities of the language model, query responses can be quickly obtained through question-and-answer formats to aid in the selection of candidate tags.
[0050] Language models (LMs) learn from large amounts of corpora, enabling them to perform reasoning and question-answering. Language models can include statistical language models and neural network language models, with neural network language models exhibiting stronger generalization and predictive capabilities compared to statistical language models. In some embodiments, to better achieve the function of determining the query response 204, the query response determination unit 230 utilizes a trained language model 235 that is a neural network language model.
[0051] Furthermore, since the predictive power of a neural network language model can increase with the amount of data used for training and the number of model parameters, in some embodiments, in order to determine a more accurate query response 204, the query response determination unit 230 utilizes a large language model (LLM) as the trained language model 235, i.e., a neural network language model with larger parameters, larger data volume, and greater computational cost. When the scale of the language model reaches a certain level (e.g., trained with more data), the large language model will possess a certain degree of cognitive, common-sense, and logical reasoning capabilities.
[0052] In some embodiments, the model's parameter weights can be determined through pre-training to ensure the model's performance. In some embodiments, since the large language model obtained through pre-training has good predictive ability, in order to further improve the accuracy of the determined query response 204, the query response determination unit 230 utilizes the trained language model 235, which is the large language model obtained through pre-training.
[0053] In some embodiments, after the text query generation unit 220 provides at least one generated text query 203 to the query response determination unit 230, the query response determination unit 230 inputs the at least one text query 203 into the trained language model 235 respectively, and determines at least one query response 204 corresponding to the at least one text query 203 by obtaining at least one query response 204 output by the trained language model 235.
[0054] The query response 204 output by language model 235 is an answer to the query indicated by the corresponding text query 203. As mentioned earlier, text query 203 is constructed to determine whether candidate labels can express interest and / or whether candidate labels are similar. Accordingly, the expected answer can be parsed from query response 204.
[0055] exist Figure 2 In the example shown, if the input text query 203 is "Is frisbee a hobby?", the query response 204 output by the trained language model 235 can be "Yes, frisbee is a hobby, frisbee is a sport, ...", etc.
[0056] At least one query response 204 is provided to the target tag determination unit 240. The target tag determination unit 240 is configured to determine a set of target interest tags 205 from at least one candidate tag based on at least one query response 204.
[0057] In some embodiments, if a text query in at least one of the text queries 203 (e.g., a first text query) indicates whether a first candidate tag belongs to an interest tag (e.g., "Is Ultraman an interest?"), the corresponding first query response determined by the query response determining unit 230 can indicate whether the first candidate tag belongs to an interest tag or not. In response to the first query response indicating that the first candidate tag belongs to an interest tag, the target tag determining unit 240 can determine the first candidate tag as a target interest tag. In response to the first query response indicating that the first candidate tag does not belong to an interest tag, the target tag determining unit 240 determines the first candidate tag as a non-target interest tag.
[0058] In some embodiments, the target tag determining unit 240 can analyze the query response 204 to determine whether the candidate tags associated with the query response 204 belong to interest tags. For example, if the query response 204 is "Ultraman is an interest," the target tag determining unit 240 can determine that the candidate tag "Ultraman" belongs to interest tags. If the query response 204 is "Today is a good day is lyrics, not an interest," the target tag determining unit 240 can determine that the candidate tag "Today is a good day" does not belong to interest tags.
[0059] In some embodiments, at least one text query in at least one text query 203 (e.g., a second text query) may be configured to indicate whether multiple candidate tags (e.g., a second candidate tag and a third candidate tag) are similar. In some embodiments, the multiple candidate tags in the second text query may include one or more candidate tags that have been identified as interest tags, or they may all be candidate tags whose status as interest tags has not yet been confirmed. The second query response corresponding to the second text query determined by the query response determining unit 230 may indicate that the second candidate tag is similar to the third candidate tag, or indicate that the second candidate tag is not similar to the third candidate tag.
[0060] In some embodiments, in response to a second query response indicating that the second candidate label and the third candidate label are dissimilar, the target label determination unit 240 can determine the candidate label that belongs to the interest label category as the target interest label and include the determined target interest label in the target interest label set 205. It should be noted that since the second and third candidate labels are dissimilar at this time, both can be determined as target interest labels simultaneously, or only one can be determined as a target interest label; the two do not affect each other. For candidate labels whose belonging to the interest label category is not yet known, other text queries can be constructed to further confirm their status using a language model.
[0061] In some embodiments, in response to a second query response indicating that the second candidate label is similar to the third candidate label, to avoid redundancy in the target interest label set 205, the target label determination unit 240 may discard one of the second and third candidate labels, and prevent the discarded candidate label from being determined as a target interest label. Specifically, the target label determination unit 240 may determine whether the second or third candidate label belongs to the interest label, and if it determines that a candidate label belongs to the interest label, it may discard the other candidate label. For example, if the second candidate label is "paper cup" and the third candidate label is "disposable cup", and the target label determination unit 240 determines that they are similar and belong to the interest label, it may discard either "paper cup" or "disposable cup" or select from the two according to other predetermined principles.
[0062] It should be noted that the above description, using second and third candidate tags as examples, does not limit the number of candidate tags to be determined. The second text query can indicate whether any number of candidate tags are similar, and the second query response can indicate whether any number of candidate tags are similar, as well as which candidate tags are similar and which candidate tags belong to interest tags, etc.
[0063] In some embodiments, after determining at least one candidate tag belonging to an interest tag based on at least one query response 204, the target tag determining unit 240 can construct a target interest tag set 205 based on these candidate tags belonging to interest tags. For example, if the candidate tags include a total of 7 candidate tags A, B, C, D, E, F, and G, and at least one query response 204 indicates that candidate tags A, B, C, and D belong to interest tags, while candidate tags E, F, and G do not belong to interest tags, then the target tag determining unit 240 can determine that candidate tags A, B, C, and D are target interest tags, and then construct the target interest tag set 205 based on the target interest tags.
[0064] In addition to filtering out similar tags by constructing a text query in the above embodiments, in some embodiments, the target tag determination unit 240 can also perform similarity detection on the target interest tag set 205 on its own. The target tag determination unit 240 can detect whether the target interest tag set 205 contains similar target interest tags, and discard at least one of them if similar target interest tags are detected.
[0065] In some embodiments, since the query response 204 output by the language model is associated with the input text query 203, the target tag determination unit 240 may send a feedback message to the text query generation unit 220 in response to the inability to determine whether a candidate tag belongs to an interest tag based on the query response 204. The text query generation unit 220 may adjust the query sentence template 202 in response to this feedback message so that the query response determination unit 230 can output the correct query response 204.
[0066] In this way, the electronic device 110 can filter the candidate tag set 201 containing non-interest tags through the trained language model 235, and easily obtain a concise and accurate target interest tag set 205, which helps to improve the accuracy of subsequent tag matching and other related tasks performed by the electronic device 110 or other electronic devices based on the target interest tag set 205.
[0067] Figure 3 A flowchart of a process 300 for generating a tag set according to some embodiments of the present disclosure is shown. Process 300 may be implemented at electronic device 110. For ease of discussion, reference will be made to... Figure 1 The environment 100 is used to describe the process 300.
[0068] In box 310, electronic device 110 acquires a candidate tag set, which includes at least one candidate tag.
[0069] In box 320, electronic device 110 generates at least one text query based on at least one candidate label.
[0070] In box 330, electronic device 110 uses a trained language model to determine at least one query response corresponding to at least one text query.
[0071] In box 340, electronic device 110 determines a set of target interest tags from at least one candidate tag based on at least one query response.
[0072] In some embodiments, generating at least one text query based on at least one candidate label includes: obtaining at least one query sentence template; and generating at least one text query by filling at least one query sentence template with at least one candidate label.
[0073] In some embodiments, determining at least one query response corresponding to at least one text query includes: inputting at least one text query into a language model; and obtaining at least one query response output by the language model.
[0074] In some embodiments, a first text query in at least one text query indicates whether a first candidate tag belongs to an interest tag, and determining the target interest tag set includes: if a first query response corresponding to the first text query indicates that the first candidate tag belongs to an interest tag, then the first candidate tag is determined as a target interest tag.
[0075] In some embodiments, a second text query in at least one text query indicates whether a second candidate tag and a third candidate tag are similar, and determining the target interest tag set includes: if a second query response corresponding to the second text query indicates that a second candidate tag and a third candidate tag are similar, discarding one of the second candidate tag and the third candidate tag, so that the discarded candidate tag is not determined as a target interest tag.
[0076] In some embodiments, discarding one of the second candidate tag and the third candidate tag includes: if the second candidate tag has been determined to be an interest tag, discarding the third candidate tag.
[0077] In some embodiments, obtaining a candidate label set includes: obtaining a first candidate label set, the first candidate label set including at least one candidate label; generating a second candidate label set based on the first candidate label set using a trained label mining model; and generating a candidate label set based on the first candidate label set and the second candidate label set.
[0078] Figure 4 A block diagram of an apparatus 400 for generating a tag set according to some embodiments of the present disclosure is shown. The apparatus 400 may be implemented in or included in an electronic device 110, for example. Various modules / components in the apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.
[0079] As shown in the figure, the device 400 includes a candidate set acquisition module 410, configured to acquire a candidate tag set, the candidate tag set including at least one candidate tag. The device 400 also includes a text query generation module 420, configured to generate at least one text query based on at least one candidate tag. The device 400 further includes a query response determination module 430, configured to determine at least one query response corresponding to at least one text query using a trained language model. The device 400 also includes a target set determination module 440, configured to determine a target interest tag set from at least one candidate tag based on at least one query response.
[0080] In some embodiments, the text query generation module 420 includes: a template acquisition module configured to acquire at least one query sentence template; and a template filling module configured to generate at least one text query by filling at least one query sentence template with at least one candidate label.
[0081] In some embodiments, the query response determination module 430 includes: a model input module configured to input at least one text query into a language model; and an output acquisition module configured to acquire at least one query response output by the language model.
[0082] In some embodiments, the first text query in at least one text query indicates whether the first candidate tag belongs to the interest tag, and the target set determination module 440 includes: a tag determination module, configured to determine the first candidate tag as the target interest tag if the first query response corresponding to the first text query indicates that the first candidate tag belongs to the interest tag.
[0083] In some embodiments, a second text query in at least one text query indicates whether a second candidate tag and a third candidate tag are similar, and the target set determination module 440 includes a tag discarding module configured to discard one of the second candidate tag and the third candidate tag if the second query response corresponding to the second text query indicates that the second candidate tag and the third candidate tag are similar, so that the discarded candidate tag is not determined as a target interest tag.
[0084] In some embodiments, the tag discarding module is further configured to discard the third candidate tag if the second candidate tag has been determined to belong to the interest tag.
[0085] In some embodiments, the candidate set acquisition module 410 includes: a tag set acquisition module configured to acquire a first candidate tag set, the first candidate tag set including at least one candidate tag; a tag set generation module configured to generate a second candidate tag set based on the first candidate tag set using a trained tag mining model; and a candidate set generation module configured to generate a candidate tag set based on the first candidate tag set and the second candidate tag set.
[0086] Figure 5 A block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that... Figure 5 The electronic device 500 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. Figure 5 The electronic device 500 shown can be used to achieve Figure 1 Electronic devices 110.
[0087] like Figure 5As shown, electronic device 500 is in the form of a general-purpose electronic device or computing device. Components of electronic device 500 may include, but are not limited to, one or more processors or processing units 510, memory 520, storage device 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. Processing unit 510 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 520. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 500.
[0088] Electronic device 500 typically includes multiple computer storage media. Such media can be any accessible media that is accessible to electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 520 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 530 can be a removable or non-removable medium and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within electronic device 500.
[0089] Electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 5 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 520 may include computer program product 525 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.
[0090] Communication unit 540 enables communication with other electronic devices via a communication medium. Additionally, the functionality of components of electronic device 500 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, electronic device 500 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
[0091] Input device 550 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 560 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 500 can also communicate with one or more external devices (not shown) via communication unit 540 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 500, or with any device that enables electronic device 500 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).
[0092] According to exemplary embodiments of the present disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to exemplary embodiments of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.
[0093] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0094] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0095] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0096] 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 an instruction, which contains one or more executable instructions for implementing the specified logical function. 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 consecutive 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, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0097] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various embodiments disclosed herein.
Claims
1. A method for generating a set of tags, comprising: Obtain a candidate tag set, wherein the candidate tag set includes at least one candidate tag; At least one text query is generated based on the at least one candidate label, and the at least one text query is used to query whether the at least one candidate label can express an interest; Using a trained language model, semantic understanding is performed on the at least one text query, and at least one query response corresponding to the at least one text query is determined. as well as The target interest tag set is determined from the at least one candidate tag based on the at least one query response. The first text query in the at least one text query indicates whether a first candidate tag belongs to an interest tag, and determining the target interest tag set includes: If the first query response corresponding to the first text query indicates that the first candidate tag belongs to the interest tag, the first candidate tag is determined as the target interest tag.
2. The method of claim 1, wherein generating at least one text query based on the at least one candidate tag comprises: Obtain at least one query statement template; as well as The at least one text query is generated by filling the at least one query sentence template with at least one candidate label.
3. The method of claim 1, wherein determining at least one query response corresponding to the at least one text query comprises: Input the at least one text query into the language model respectively; as well as Obtain the at least one query response output by the language model.
4. The method of claim 1, wherein the second text query in the at least one text query indicates whether the second candidate tag and the third candidate tag are similar, and determining the target interest tag set includes: If the second query response corresponding to the second text query indicates that the second candidate tag is similar to the third candidate tag, then discard one of the second candidate tag and the third candidate tag, so that the discarded candidate tag is not identified as the target interest tag.
5. The method of claim 4, wherein discarding one of the second candidate label and the third candidate label comprises: If the second candidate tag has been determined to be an interest tag, the third candidate tag is discarded.
6. The method according to any one of claims 1 to 5, wherein obtaining the candidate tag set comprises: Obtain a first candidate tag set, wherein the first candidate tag set includes at least one candidate tag; Based on the first candidate label set, a second candidate label set is generated using a trained label mining model; as well as The candidate tag set is generated based on the first candidate tag set and the second candidate tag set.
7. An apparatus for generating a set of tags, comprising: The candidate set acquisition module is configured to acquire a candidate tag set, wherein the candidate tag set includes at least one candidate tag; The text query generation module is configured to generate at least one text query based on the at least one candidate tag, wherein the at least one text query is used to query whether the at least one candidate tag can express an interest; The query response determination module is configured to use a trained language model to perform semantic understanding on the at least one text query and determine at least one query response corresponding to the at least one text query. as well as The target set determination module is configured to determine a target interest tag set from the at least one candidate tag based on the at least one query response. The first text query in the at least one text query indicates whether a first candidate tag belongs to an interest tag, and the target set determination module is further configured to: If the first query response corresponding to the first text query indicates that the first candidate tag belongs to the interest tag, the first candidate tag is determined as the target interest tag.
8. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the method according to any one of claims 1 to 6.