Method, device, electronic device and storage medium for generating tag description information

By obtaining the correlation degree value of the object set and sorting and splicing title, using the description information generation model, the problem of manual generation of label description information in the prior art is solved, and efficient and accurate label description information generation is achieved.

CN114610867BActive Publication Date: 2025-08-15TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210194040.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-01
Publication Date
2025-08-15
Estimated Expiration
2042-03-01

AI Technical Summary

Technical Problem

In the prior art, generating label description information is labor-intensive and has poor results, and it is impossible to efficiently and accurately understand label semantics.

Method used

By obtaining the correlation degree values of each object in the object set regarding the label to be described, sorting and splicing the object titles, using the trained description information generation model for semantic understanding, and generating Chinese semantic information of the label.

Benefits of technology

It improves the efficiency and accuracy of label description information generation, reduces the time and cost of manual labeling, and improves the friendliness of downstream applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114610867B_ABST
    Figure CN114610867B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device, and storage medium for generating label description information. The method comprises: obtaining an object set corresponding to a label to be described and a correlation value of each object in the object set with respect to the label to be described; the object set includes multiple different objects; each object is characterized by the label to be described; sorting the objects in the object set based on the correlation value to obtain a sorting result; concatenating the titles of the first preset number of objects in the sorting result to obtain a concatenated title; and performing semantic understanding on the concatenated title based on a trained description information generation model to obtain description information corresponding to the label to be described; the description information includes Chinese semantic information of the label to be described. The present application can solve the problems of labor-intensive and ineffective manual generation of label description information in the prior art, and can improve the efficiency and accuracy of label description information generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device, and storage medium for generating tag description information. Background Art

[0002] In personalized article recommendations, tags are an important dimension for understanding the content of information flow articles. Typically, each information flow article is assigned at least one tag during the article content understanding process. This tag is used for subsequent tag-based recall and also serves as an article feature in coarse and fine ranking models. Generally speaking, the industry's common methods are to construct multi-dimensional topic models using methods such as LDA or BERT. Multi-dimensional topic models can predict the probability distribution of an article based on multiple given dimensions of tags, resulting in each article being assigned at least one tag. Tags, however, are a form of text-free semantic understanding. Currently, the semantic information of tags still needs to be manually annotated, which is not only very labor-intensive but also has poor results. Summary of the Invention

[0003] In order to solve the problem that the existing technology of generating label description information is labor-intensive and ineffective, the present application provides a method, device, electronic device and storage medium for generating label description information:

[0004] According to a first aspect of the present application, a method for generating tag description information is provided, comprising:

[0005] Obtaining an object set corresponding to a label to be described and a correlation value of each object in the object set with respect to the label to be described; the object set includes a plurality of different objects; each object is represented by a label to be described; the label to be described is in a preset character form;

[0006] Sort the objects in the object set based on the association degree value to obtain a sorting result;

[0007] Concatenate the titles of the first preset number of objects in the sorting result to obtain concatenated titles;

[0008] According to the trained description information generation model, the spliced titles are semantically understood to obtain description information corresponding to the tags to be described; the description information includes Chinese semantic information of the tags to be described.

[0009] According to a second aspect of the present application, a device for generating tag description information is provided, comprising:

[0010] an acquisition module, configured to acquire an object set corresponding to a label to be described and a correlation value of each object in the object set with respect to the label to be described; the object set includes a plurality of different objects; each object is characterized by a label to be described; the label to be described is in a preset character form;

[0011] A sorting module is used to sort the objects in the object set based on the association degree value to obtain a sorting result;

[0012] A processing module, configured to concatenate the titles of the first preset number of objects in the sorting result to obtain concatenated titles;

[0013] The generation module is used to generate a model based on the trained description information, perform semantic understanding on the spliced titles, and obtain the description information corresponding to the label to be described; the description information includes the Chinese semantic information of the label to be described.

[0014] According to a third aspect of the present application, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for generating label description information as described in the first aspect.

[0015] According to a fourth aspect of the present application, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement the method for generating label description information as described in the first aspect.

[0016] According to a fifth aspect of the present application, a computer program product is provided, which includes at least one instruction or at least one program segment, and the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the method for generating label description information as described in the first aspect.

[0017] The method, device, electronic device, and storage medium for generating tag description information provided in this application have the following technical effects:

[0018] The present application obtains an object set corresponding to a label to be described and a correlation value of each object in the object set with respect to the label to be described; the object set includes a plurality of different objects; each object is represented by a label to be described; the label to be described is in a preset character form; based on the correlation value, each object in the object set is sorted to obtain a sorting result; the titles of the first preset number of objects in the sorting result are spliced to obtain a spliced title; based on a trained description information generation model, the spliced title is semantically understood to obtain description information corresponding to the label to be described; the description information includes Chinese semantic information of the label to be described. The present application determines the most representative object under the label to be described based on the correlation value of different objects with respect to the label to be described, and uses the title of the most representative object as the input of a subsequent model to automatically generate corresponding description information through the model. In this way, the problem of labor-intensive and poor results in manually generating label description information in the prior art can be solved, and the generation efficiency and accuracy of label description information can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present application;

[0021] Figure 2 This is a flowchart of a method for generating tag description information provided in an embodiment of the present application;

[0022] Figure 3 This is a flow chart of a method for generating a description information generation model provided in an embodiment of the present application;

[0023] Figure 4 This is a schematic diagram of the structure of a language model provided in an embodiment of the present application;

[0024] Figure 5 This is a flow chart of obtaining a pre-trained language model provided in an embodiment of the present application;

[0025] Figure 6 This is a schematic diagram of a fine-tuning stage model provided in an embodiment of the present application;

[0026] Figure 7 This is a flowchart of another method for generating a description information generation model provided in an embodiment of the present application;

[0027] Figure 8 This is a block diagram of a device for generating label description information provided by an embodiment of the present application;

[0028] Figure 9 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0030] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0031] See also Figure 1 , Figure 1 This is a schematic diagram of an application environment provided by an embodiment of the present application, which may include a server 01 and a client 02. The client 02 and the server 01 may be connected directly or indirectly via wired or wireless communication. The server 01 may perform relevant calculations and send the calculation results to the client 02, which may be displayed on a designated page in the client 02. It should be noted that Figure 1 Just an example.

[0032] In an optional embodiment, the server 01 obtains an object set corresponding to a tag to be described and a correlation value of each object in the object set with respect to the tag to be described; the object set includes a plurality of different objects; each object is characterized by the tag to be described; the tag to be described is in a preset character format; based on the correlation value, the objects in the object set are sorted to obtain a sorting result; the server 01 concatenates the titles of the first preset number of objects in the sorting result to obtain a concatenated title; the server 01 generates a model for the trained description information, performs semantic understanding on the concatenated title, and obtains description information corresponding to the tag to be described; the description information includes Chinese semantic information of the tag to be described. After obtaining the description information corresponding to the tag to be described, the server 01 can use it in a recommendation scenario for related objects corresponding to the tag to be described, that is, the description information can be displayed while displaying the related object on a page specified by the client 02.

[0033] Among them, the designated page can be provided by a designated Internet product, and the designated Internet product can be a cloud technology product, artificial intelligence product, smart transportation product, assisted driving product, live broadcast product, online office product, e-commerce product, game product, local life product, instant messaging product, social product, etc.

[0034] Client 02 can be a physical device such as a smartphone, a computer (e.g., a desktop computer, tablet computer, or laptop computer), an augmented reality (AR) / virtual reality (VR) device, a digital assistant, an intelligent voice interaction device (e.g., a smart speaker), a smart wearable device, a smart home appliance, or an in-vehicle terminal. It can also be software running on a physical device, such as a computer program. The operating system supported by Client 02 can be Android, iOS (a mobile operating system developed by Apple), Linux, or Microsoft Windows.

[0035] The server side 01 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server can include a network communication unit, a processor, and a memory, etc. The server side can provide background services for the corresponding client.

[0036] The following describes a specific embodiment of a method for generating tag description information of the present application. Figure 2 It is a flow chart of a method for generating label description information provided by an embodiment of the present application. The present application provides method operation steps as described in the embodiment or flow chart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many, and does not represent the only execution order. When the actual system or product is executed, it can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method may include:

[0037] In step S201, an object set corresponding to a label to be described and a correlation value of each object in the object set with respect to the label to be described are obtained; the object set includes multiple different objects; each object is represented by a label to be described; and the label to be described is in a preset character form.

[0038] In the embodiments of the present application, a label refers to a subject label of an object, which is a characteristic of an object and a short sentence indicating the content of the object, so that users can understand the main content and theme of the object. An object is content that matches the actual application scenario; in some possible application scenarios, objects may include articles, music, short videos, commodities, advertisements, etc., and articles may be any type of text article, such as news or other types of information flow articles. A subject label reflects a class of objects, that is, objects of this class are characterized by the same subject label, while objects of different classes are characterized by different subject labels.

[0039] The server side can determine the label of the object through a preset algorithm or model; for example, the server side predicts the probability distribution of an object on a given topic label (hereinafter referred to as label) through a trained label recognition model, that is, the probability of the predicted object belonging to label 1, label 2, etc.; it can be understood that the more given labels there are, the more accurate the predicted label of the object. At present, the number of given labels can reach 5,000, 10,000 or even 100,000. However, the label of the object predicted by the current label recognition model is expressed in a preset character form, and the preset character form includes numbers and / or letters, that is, the label is in a form without textual semantic understanding. It is usually impossible to directly understand the meaning of the label output by the label recognition model, which causes inconvenience to the daily routine maintenance of products and operations in actual applications.

[0040] In related technologies, descriptive information is manually annotated for each tag, that is, by manually browsing the representation objects under each tag, such as representation words and representation articles, and then manually determining the Chinese semantic information of the tag, thereby obtaining the descriptive information of the tag. However, this method is not only costly but also has poor annotation quality.

[0041] In order to solve the problems of high labor cost and poor labeling quality in related technologies, this application uses steps S201 to S207, which can not only save a lot of manual labeling time and cost, but also improve the accuracy of label description information, and is more friendly to the use of downstream description information.

[0042] Specifically, in an embodiment of the present application, since the server can store the label recognition results of objects predicted by the label recognition model, that is, the labels to which the objects belong and the corresponding probabilities, in a preset storage area, when in use, it can directly determine all objects belonging to the label to be described from the preset storage area based on the label to be described, forming an object set corresponding to the label to be described; that is, each object in the object set is characterized by the label to be described. At the same time, it is also possible to obtain the association degree value of each object in the object set with respect to the label to be described. The association degree value of each object with respect to the label to be described is the probability that the object belongs to the description label.

[0043] In an optional embodiment, the object includes an article in text form; the title is the article title representing the content of the article; accordingly, the tag can be obtained by identifying the content of the article and / or the article title according to the tag recognition model.

[0044] In step S203, the objects in the object set are sorted based on the association degree value to obtain a sorting result.

[0045] In an embodiment of the present application, after obtaining the association degree value of each object in the object set with respect to the label to be described, the objects in the object set are sorted in order from large to small or from small to large based on the size of the association degree value to obtain a sorting result.

[0046] For example, if the label to be described is label 1, the object set corresponding to label 1 includes object 1, object 2, object 3, object 4, and object 5. The probability that object 1 belongs to label 1 is 0.98, the probability that object 2 belongs to label 1 is 0.95, the probability that object 3 belongs to label 1 is 0.92, the probability that object 4 belongs to label 1 is 0.88, and the probability that object 5 belongs to label 1 is 0.85. Accordingly, the ranking result can be object 1, object 2, object 3, object 4, and object 5. It should be noted that in actual applications, the number of objects in an object set is very large, and this is only used as an example.

[0047] In the above embodiment, after obtaining the ranking results of the objects based on the degree of association values, it is convenient to subsequently select the most representative ones, that is, the topics of the objects that best match the labels to be described, to form the input of the subsequent model; thereby, the model can output more accurate semantic information and improve the accuracy of the label description information.

[0048] In step S205, the titles of the first preset number of objects in the sorting result are spliced together to obtain spliced titles.

[0049] The preset number can be determined according to actual needs. For example, in the above embodiment, the titles of the first two objects (object 1 and object 2) are selected from the five objects, and the resulting title set includes title 1 of object 1 and title 2 of object 2.

[0050] In step S207, semantic understanding is performed on the concatenated titles based on the trained description information generation model to obtain description information corresponding to the tags to be described; the description information includes Chinese semantic information of the tags to be described.

[0051] In an embodiment of the present application, the server side uses a trained description information generation model to perform semantic understanding on the spliced title and obtains description information corresponding to the tag to be described; the description information includes Chinese semantic information of the tag to be described, that is, the description information is equivalent to a phrase description about the tag.

[0052] In an optional embodiment, the above step S205 may include: concatenating the titles of the first preset number of objects in the sorting result with a preset separator to obtain a concatenated title. The preset separator may include a period, a semicolon, or other punctuation marks.

[0053] In a specific scenario, the object may be an article, and the label is formed by a number, as shown in Table 1 below. Table 1 exemplarily gives several possible description information.

[0054]

[0055] Table 1 Examples of labels and description information

[0056] Assuming that the article titles shown in Table 1 above are the titles of the first preset number of objects in the sorting results, the article titles corresponding to label 1 can be spliced with periods, and the resulting spliced title is "Three sentences that couples should not say when they are together. Three little tricks to coax your girlfriend, boys, come and learn them...". The spliced title is input into the trained description information generation model, and the corresponding output is "Things to note for couples".

[0057] In an optional embodiment, if the previous title ends with a delimiter, it can be directly concatenated with the next title without adding a delimiter. For example, the two article titles corresponding to label 2 are directly concatenated, and the resulting concatenated title is "Deep Learning and Artificial Intelligence Practice Begins! This series of AI books has the best reviews, come and check it out." This concatenated title is input into the trained description information generation model, and the corresponding output is "Artificial Intelligence Learning."

[0058] In the embodiment of the present application, the trained description information generation model is trained based on a pre-trained language model, target description information corresponding to the training labels, and a set of training titles corresponding to the training labels. Specifically, the description information generation model needs to be trained through a pre-training phase and a fine-tuning phase. The pre-training phase is to pre-train the initial model using a large-scale information flow text corpus, and then fine-tune the model based on the pre-trained model. During the fine-tuning phase, the input and output of the model are different from those in the pre-training phase.

[0059] Accordingly, in an optional embodiment, the generation method of the description information generation model may include: Figure 3 The following steps are shown:

[0060] In step S301, a pre-trained language model is obtained.

[0061] Specifically, first build an untrained language model, Figure 4 This is a structural diagram of a language model provided in an embodiment of the present application. The model structure adopts a BART model structure, including a bidirectional encoder and an autoregressive decoder. The untrained language model is pre-trained to obtain a pre-trained language model. The pre-trained language model is a language model that has completed the pre-training stage.

[0062] A pre-trained language model is a neural network model specifically designed to learn semantic information from large-scale unlabeled corpora in an unsupervised manner. It is a complex learning model composed of multiple layers of neural networks. A pre-trained language model can more accurately capture the semantic information in the text, improve the accuracy of the model in downstream tasks, and avoid the need to manually label large amounts of data.

[0063] In step S303, a training object set corresponding to a training label and a correlation degree value of each training object in the training object set with respect to the training label are obtained; the training object set includes a plurality of different training objects; each training object in the training object set is represented by a training label; and the training label is in a preset character form.

[0064] In step S305 , the training objects are sorted based on their association levels with respect to the training labels to obtain a sorting result.

[0065] In step S307, the titles of the first preset number of training objects in the sorting result are spliced together to obtain spliced training titles.

[0066] Here, the same preset delimiters used in actual applications are used to concatenate the titles of multiple different training objects to obtain concatenated training titles. For example, using the data in Table 1 above as training data, the training title set might include "Three things you shouldn't say when you're together" and "Three little tricks to coax your girlfriend, boys, learn these..." Accordingly, the concatenated training title might be "Three things you shouldn't say when you're together. Three little tricks to coax your girlfriend, boys, learn these..."

[0067] The above steps S305 to S307 are similar to the process of model application, and refer to the above steps S203 to S205, which will not be repeated here.

[0068] In step S309, the pre-trained language model is fine-tuned according to the target description information and training titles corresponding to the acquired training tags, and a description information generation model is obtained when a preset fine-tuning end condition is met.

[0069] Specifically, steps S303 to S309 are the model fine-tuning stage, in which the training title is used as the input of the pre-trained language model, the target description information is used as the prediction target, and supervised learning is performed to fine-tune the parameters to optimize the model parameters of the language model.

[0070] In the above embodiment, a pre-trained language model is used and fine-tuning is performed on the basis of the pre-trained language model. During the fine-tuning process, only a small amount of target description information needs to be manually labeled. This small amount of target description information is used for training to obtain a description information generation model. In this way, the time and cost of manual labeling can be greatly reduced, and a description information generation model with higher accuracy can be obtained with a small amount of manpower.

[0071] In an optional embodiment, the above step S301 obtains a pre-trained language model, which may include: Figure 5 The following steps are shown:

[0072] In step S501, a pre-trained text corpus and an untrained language model are obtained.

[0073] When the object is an article, the pre-trained text corpus is tens of millions of information flow text corpus, specifically including the title and / or body of the article. As mentioned above, the untrained language model can adopt the BART model structure, including an encoder and a decoder.

[0074] In step S503, the pre-training text corpus is processed by at least one processing method.

[0075] In step S505 , the processed pre-trained text corpus is used as input to the untrained language model to obtain the predicted text output by the untrained language model.

[0076] The above processing methods include: randomly replacing some continuous or non-continuous texts in the pre-training text corpus, randomly deleting some texts in the pre-training text corpus, and shuffling the pre-training text corpus. Figure 4 As shown, the original input text is ABCDE, and at least one of the following processing methods is adopted for the original input text: randomly select some words and replace them with [MASK], such as A_C_E; or; randomly delete some words, such as ADE; replace a continuous text segment with [MASK], and the length of the text segment follows the Poisson distribution; randomly shuffle, such as ADBCE; in addition, two processing methods are also adopted, such as shuffling and replacement, to obtain A_B_E.

[0077] After the pre-training text corpus has been processed using at least one of the above methods, it is used as the input to the encoder. The encoder's output is used as the input to the decoder. The decoder aims to predict the original pre-training text corpus and output the predicted text. For example, if A_B_E is used as the encoder input, the decoder is trained to predict ABCDE.

[0078] In step S507, a loss value is determined based on the predicted text and the original pre-trained text corpus, and the model parameters of the untrained language model are trained based on the loss value. When the preset pre-training end condition is reached, a pre-trained language model is obtained.

[0079] Specifically, the loss value between the predicted text and the original pre-training text corpus is determined according to a loss function; wherein the loss function may be a cross entropy loss function.

[0080] When the loss value exceeds a preset threshold, backpropagation is performed based on the loss value to update the untrained language model to obtain an updated untrained language model. The following steps are repeated: using the processed pre-trained text corpus as input to the untrained language model to obtain predicted text output by the untrained language model; determining a loss value based on the predicted text and the original pre-trained text corpus; and finally, obtaining a pre-trained language model when the loss value falls below a preset threshold. The preset threshold represents the allowable error between the predicted text and the original pre-trained text corpus, and its specific value can be determined based on the actual application.

[0081] In addition, in addition to setting a preset threshold for the loss value in the above embodiment, the preset pre-training end condition can also set the number of iterations, that is, when the number of iterations reaches the preset number, the pre-trained language model is terminated. Here, the preset number represents the maximum number of training times for the language model, that is, the maximum number of times the following steps are performed: processing the pre-trained text corpus through at least one processing method; using the processed pre-trained text corpus as input for the untrained language model to obtain predicted text output by the untrained language model; determining the loss value based on the predicted text and the original pre-trained text corpus, and when the loss value is greater than the preset threshold, performing backpropagation based on the loss value to update the untrained language model.

[0082] In an optional embodiment, the above step S309 may include the following steps:

[0083] In step S3091, the training title is input into the pre-trained language model to obtain predicted description information.

[0084] In step S3093, the loss value is determined based on the target description information and the prediction description information.

[0085] In step S0395, the model parameters of the pre-trained language model are adjusted based on the loss value for training, and when the preset fine-tuning end condition is reached, a description information generation model is obtained.

[0086] like Figure 6 As shown, Figure 6 This is a schematic diagram of a fine-tuning model provided in an embodiment of the present application. The concatenated training title, "Three things you shouldn't say when you're together. Three tricks to coax your girlfriend, guys, learn these...", is fed into a pre-trained language model. The model structure adopts the BART model structure, and the model is trained with the goal of outputting "Things couples should pay attention to."

[0087] Specifically, the loss value between the target description information and the predicted description information is determined according to the loss function; wherein the loss function can be a cross entropy loss function.

[0088] When the loss value exceeds a preset threshold, backpropagation is performed based on the loss value to update the pretrained language model to obtain an updated pretrained language model. The following steps are repeated: The training title is input into the pretrained language model to obtain predicted description information; the loss value is determined based on the target description information and the predicted description information. This process continues until the loss value falls below a preset threshold, resulting in a description information generation model. The preset threshold represents the allowable loss value between the target description information and the predicted description information, and its specific value can be determined based on the actual application.

[0089] In addition to setting a preset threshold for the loss value in the above embodiment, the preset fine-tuning termination condition can also include setting a number of iterations, that is, when the number of iterations reaches the preset number, the description information generation model is obtained. Here, the preset number represents the maximum number of training times for the description information generation model, that is, the maximum number of times the following steps are performed: concatenating the titles of multiple different training objects to obtain concatenated training titles; inputting the concatenated training titles into a pre-trained language model to obtain predicted description information; determining a loss value based on the target description information and the predicted description information; and when the loss value exceeds the preset threshold, performing backpropagation based on the loss value to update the pre-trained language model.

[0090] In another optional embodiment, the generation method of the description information generation model may also include: Figure 7 The following steps are shown:

[0091] In step S701, a pre-trained language model is obtained.

[0092] Specifically, this step may refer to the embodiment of the above-mentioned step S301 and will not be described in detail here.

[0093] In step S703, a training object set corresponding to a training label and an object set and a correlation degree value of each training object in the training object set with respect to the training label are obtained; the training object set includes a plurality of different training objects; each object in the training object set is represented by a training label; and the training label is in a preset character form.

[0094] In step S705 , the training objects are sorted based on their association levels with respect to the training labels to obtain a sorting result.

[0095] In step S707, the titles of the first preset number of training objects in the sorting result are spliced together to obtain spliced training titles.

[0096] Here, the same preset separator as in the actual application process is used to splice the titles of multiple different training objects to obtain the spliced training titles.

[0097] The above steps S705 to S707 are similar to the process of model application, and refer to the above steps S203 to S205, which will not be repeated here.

[0098] In step S709, feature extraction is performed on the training title according to a preset feature extraction algorithm to obtain feature information of the training title; the feature information includes classification information and / or keyword information.

[0099] Specifically, the difference of this embodiment is that the acquired training data also includes feature information of the training titles. The feature information may include classification information and / or keyword information. The classification information and keyword information may be obtained by extracting features from the training titles using a preset feature extraction algorithm; the preset feature extraction algorithm may include a classification algorithm or a keyword extraction algorithm. For example, in Table 1 above, when used as training data, the training titles include "Three sentences you shouldn't say when you're together as a couple" and "Three tricks to coax your girlfriend, boys, come and learn them..." The corresponding classification algorithm is used to classify the spliced training titles, i.e., "Three sentences you shouldn't say when you're together as a couple." "Three tricks to coax your girlfriend, boys, come and learn them...", and the corresponding classification information is obtained as "emotion." The corresponding keyword extraction algorithm is used to extract keywords from the spliced training titles, i.e., "Three sentences you shouldn't say when you're together as a couple." "Three tricks to coax your girlfriend, boys, come and learn them...", and the corresponding keyword information may include "couple" and "tricks."

[0100] In step S711, the pre-trained language model is fine-tuned according to the target description information, training title and feature information corresponding to the acquired training tags, and a description information generation model is obtained when a preset fine-tuning end condition is met.

[0101] Specifically, steps S703 to S711 are the model fine-tuning stage, where the training titles and their feature information are used as inputs to the pre-trained language model, and the target description information is used as the prediction target, and supervised learning is performed to fine-tune the parameters to optimize the model parameters of the language model.

[0102] In the above embodiment, a pre-trained language model is utilized and fine-tuned based on the pre-trained language model. During the fine-tuning process, only a small amount of target description information needs to be manually annotated. This small amount of target description information is used for training to obtain a description information generation model. This can greatly reduce the time and cost of manual annotation, and a highly accurate description information generation model can be obtained with a small amount of manpower. In addition, adding feature information corresponding to the training title set as model input can enable the model to better learn semantic relationships.

[0103] In an optional embodiment, the above step S711 may include the following steps:

[0104] In step S7111, the training title and training feature information are input into the pre-trained language model to obtain predicted description information.

[0105] Specifically, the spliced training title can be re-joined with the feature information using a preset delimiter, and the whole spliced together can be used as the input to the pre-trained language model. For example, based on the example in the above embodiment, the spliced training title can be re-joined with the feature information to represent "Emotions | Tips for Couples | Three Things You Shouldn't Say When You're Together. Three Tips for Coaxing Your Girlfriend, Boys, Come and Learn These..."

[0106] In step S7113, the loss value is determined based on the target description information and the predicted description information.

[0107] In step S7115, the model parameters of the pre-trained language model are adjusted based on the loss value for training, and when the preset fine-tuning end condition is reached, a description information generation model is obtained.

[0108] Specifically, a loss value is determined based on the target description information and the predicted description information. When the loss value is greater than a preset threshold, back propagation is performed based on the loss value to update the pre-trained language model to obtain an updated pre-trained language model; the steps are repeated: the feature information corresponding to the spliced training title and the training title set is input into the pre-trained language model to obtain the predicted description information; the loss value is determined based on the target description information and the predicted description information until the loss value is less than the preset threshold, thereby obtaining a description information generation model.

[0109] In summary, the embodiment of the present application first obtains the object set corresponding to the label to be described and the association degree value of each object in the object set with respect to the label to be described; the object set includes multiple different objects; each object is characterized by the label to be described; then, based on the association degree value, the objects in the object set are sorted to obtain a sorting result; the titles of the first preset number of objects in the sorting result are spliced to obtain a spliced title; thus, based on the association degree values of different objects with respect to the label to be described, the most representative object under the label to be described is determined, and the title of the most representative object is used as the input of the subsequent model; finally, through the pre-trained description information generation model, the spliced title is semantically understood to obtain the description information corresponding to the label to be described. In this way, the problem of labor-intensive and poor results in manually generating label description information in the prior art can be solved, and the generation efficiency and accuracy of label description information can be improved.

[0110] The present application also provides a device for generating label description information, such as Figure 8 As shown, the device 800 for generating tag description information includes:

[0111] Acquisition module 801, acquires an object set corresponding to a label to be described and a correlation value of each object in the object set with respect to the label to be described; the object set includes a plurality of different objects; each object is represented by a label to be described; the label to be described is in a preset character form;

[0112] A sorting module 802 is used to sort the objects in the object set based on the association degree value to obtain a sorting result;

[0113] Processing module 803, configured to concatenate the titles of the first preset number of objects in the sorting result to obtain concatenated titles;

[0114] The generation module 804 is used to generate a model based on the trained description information, perform semantic understanding on the spliced titles, and obtain description information corresponding to the tags to be described; the description information includes Chinese semantic information of the tags to be described.

[0115] In an optional embodiment, the apparatus further includes a training module for generating a description information generation model; the training module includes:

[0116] The first acquisition submodule is used to obtain a pre-trained language model;

[0117] The second acquisition submodule is configured to acquire a training object set corresponding to a training label and a correlation value of each training object in the training object set with respect to the training label; the training object set includes a plurality of different training objects; each training object in the training object set is represented by a training label; and the training label is in a preset character form;

[0118] The processing submodule is used to sort the training objects based on the correlation degree value of each training object with respect to the training label to obtain a sorting result; and to splice the titles of the first preset number of training objects in the sorting result to obtain a spliced training title;

[0119] The training submodule is used to fine-tune the pre-trained language model according to the target description information and training titles corresponding to the obtained training labels, and obtain the description information generation model when the preset fine-tuning end conditions are met.

[0120] In an optional embodiment, the training submodule is also used to input the training title into a pre-trained language model to obtain predicted description information; determine the loss value based on the target description information and the predicted description information; adjust the model parameters of the pre-trained language model based on the loss value for training, and obtain a description information generation model when the preset fine-tuning end conditions are met.

[0121] In another optional embodiment, the apparatus further includes a training module for generating a description information generation model; the training module includes:

[0122] The first acquisition submodule is used to obtain a pre-trained language model;

[0123] The second acquisition submodule is configured to obtain a training object set and an object set corresponding to a training label and a correlation degree value of each training object in the training object set with respect to the training label; the training object set includes a plurality of different training objects; each object in the training object set is represented by a training label; and the training label is in a preset character form;

[0124] The processing submodule is configured to sort the training objects based on their association levels with the training labels to obtain sorting results; concatenate the titles of the first preset number of training objects in the sorting results to obtain concatenated training titles; and extract features from the training titles using a preset feature extraction algorithm to obtain feature information of the training titles; the feature information includes classification information and / or keyword information.

[0125] The training submodule is used to fine-tune the pre-trained language model based on the target description information, training title and feature information corresponding to the acquired training labels, and obtain the description information generation model when the preset fine-tuning end conditions are met.

[0126] In an optional embodiment, the first acquisition submodule is also used to obtain pre-trained text corpus and an untrained language model; the pre-trained text corpus is processed by at least one processing method; the processing method includes: randomly replacing part of the continuous or non-continuous text in the pre-trained text corpus, randomly deleting part of the text in the pre-trained text corpus, and shuffling the pre-trained text corpus; using the processed pre-trained text corpus as the input of the untrained language model to obtain the predicted text output by the untrained language model; determining the loss value based on the predicted text and the original pre-trained text corpus, training the model parameters of the untrained language model based on the loss value, and obtaining a pre-trained language model when the preset pre-training end condition is met.

[0127] In an optional embodiment, the processing module 803 is further configured to concatenate the titles of the first preset number of objects in the sorting result using a preset separator to obtain concatenated titles.

[0128] In an optional embodiment, the object includes an article in text form; the title is the article title representing the article content; and the tag is obtained by identifying the article content and / or the article title according to a tag recognition model.

[0129] It should be noted that the device embodiment and method embodiment in the embodiments of the present application are based on the same inventive concept.

[0130] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for generating label description information provided in the above method embodiment.

[0131] Furthermore, Figure 9 The hardware structure diagram of an electronic device for implementing the method for generating tag description information provided in the embodiment of the present application is shown. The electronic device may participate in or include the device for generating tag description information provided in the embodiment of the present application. Figure 9 As shown, the electronic device 90 may include one or more (902a, 902b, ..., 902n are used to illustrate) processors 902 (the processor 902 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 904 for storing data, and a transmission device 906 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 9 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 9 More or fewer components than shown, or with Figure 9 Different configurations shown.

[0132] It should be noted that the one or more processors 902 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the electronic device 90 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0133] The memory 904 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for generating label description information described in the embodiments of the present application. The processor 902 executes various functional applications and data processing by running the software programs and modules stored in the memory 904, that is, implementing the above-mentioned method of classifying an operation path. The memory 904 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 904 may further include a memory remotely located relative to the processor 902, and these remote memories may be connected to the electronic device 90 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0134] The transmission device 906 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by the communication provider of the electronic device 90. In one embodiment, the transmission device 906 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, the transmission device 906 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0135] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 90 (or mobile device).

[0136] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one instruction or at least one program. The at least one instruction or the at least one program is loaded and executed by a processor to implement the method for generating label description information provided in the method embodiment of the present application.

[0137] Optionally, in this embodiment, the storage medium may be located in at least one of a plurality of network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0138] An embodiment of the present application also provides a computer program product, which includes at least one instruction or at least one program segment, and the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the method for generating label description information provided by the method embodiment of the present application.

[0139] It should be noted that the order of the embodiments of the present application described above is for descriptive purposes only and does not represent the superiority or inferiority of the embodiments. The above description is of specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0140] The various embodiments in this application are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device and electronic device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the partial description of the method embodiments.

[0141] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0142] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A method for generating tag description information, characterized in that: include: Obtaining an object set corresponding to a label to be described and a correlation value of each object in the object set with respect to the label to be described; the object set includes a plurality of different objects belonging to the same class; each object is characterized by the label to be described; the label to be described is in a preset character form, and the label to be described is in a form without textual semantic understanding; sorting the objects in the object set based on the association degree value to obtain a sorting result; splicing the titles of the first preset number of objects in the sorting result to obtain spliced titles; According to the trained description information generation model, the semantic understanding of the spliced title is performed to obtain the description information corresponding to the tag to be described; the description information includes the Chinese semantic information of the tag to be described.

2. The method for generating tag description information according to claim 1, characterized in that: The generation method of the description information generation model includes: Get a pre-trained language model; Obtaining a training object set corresponding to a training label and a correlation value of each training object in the training object set with respect to the training label; the training object set includes a plurality of different training objects; each training object in the training object set is characterized by the training label; the training label is in a preset character form; sorting the training objects based on the association degree values of the training objects with respect to the training labels to obtain a sorting result; splicing the titles of the first preset number of training objects in the sorting results to obtain spliced training titles; The pre-trained language model is fine-tuned according to the target description information corresponding to the acquired training label and the training title, and the description information generation model is obtained when a preset fine-tuning end condition is met.

3. The method for generating tag description information according to claim 2, characterized in that: The method further comprises: fine-tuning the pre-trained language model according to the target description information corresponding to the obtained training label and the training title, and obtaining the description information generation model when a preset fine-tuning end condition is met. Inputting the training title into the pre-trained language model to obtain predicted description information; Determine a loss value based on the target description information and the prediction description information; The model parameters of the pre-trained language model are adjusted based on the loss value for training, and when the preset fine-tuning end condition is reached, the description information generation model is obtained.

4. The method for generating tag description information according to claim 1, wherein: The generation method of the description information generation model includes: Get a pre-trained language model; Obtaining a training object set corresponding to a training label and a correlation value between the object set and each training object in the training object set with respect to the training label; the training object set includes a plurality of different training objects; each object in the training object set is characterized by the training label; the training label is in a preset character form; sorting the training objects based on the association degree values of the training objects with respect to the training labels to obtain a sorting result; splicing the titles of the first preset number of training objects in the sorting results to obtain spliced training titles; Extract features from the training titles according to a preset feature extraction algorithm to obtain feature information of the training titles; the feature information includes classification information and / or keyword information; The pre-trained language model is fine-tuned based on the target description information corresponding to the acquired training label, the training title and the feature information, and the description information generation model is obtained when a preset fine-tuning end condition is met.

5. The method for generating tag description information according to claim 2 or 4, characterized in that: The obtaining of the pre-trained language model includes: Get pre-trained text corpus and untrained language model; The pre-training text corpus is processed by at least one processing method; the processing method includes: randomly replacing part of the continuous or non-continuous text in the pre-training text corpus, randomly deleting part of the text in the pre-training text corpus, and shuffling the pre-training text corpus; Using the processed pre-trained text corpus as input to the untrained language model to obtain predicted text output by the untrained language model; A loss value is determined according to the predicted text and the original pre-trained text corpus, and the model parameters of the untrained language model are trained based on the loss value. When a preset pre-training end condition is reached, the pre-trained language model is obtained.

6. The method for generating tag description information according to claim 1, wherein: The step of splicing the titles of the first preset number of objects in the sorting result to obtain the spliced titles includes: The titles of the first preset number of objects in the sorting result are spliced together using a preset separator to obtain spliced titles.

7. The method for generating label description information according to any one of claims 1 to 4 or 6, characterized in that: The objects include articles in text form; The title is the title of the article representing the content of the article; The tag is obtained by identifying the article body content and / or the article title according to a tag identification model.

8. A device for generating label description information, characterized in that: include: an acquisition module, configured to acquire an object set corresponding to a label to be described and a correlation value of each object in the object set with respect to the label to be described; the object set includes a plurality of different objects belonging to the same class; each object is characterized by the label to be described; the label to be described is in a preset character format and is in a format without textual semantic understanding; A sorting module, configured to sort the objects in the object set based on the association degree value to obtain a sorting result; A processing module, configured to concatenate the titles of the first preset number of objects in the sorting result to obtain concatenated titles; The generation module is used to generate a model based on the trained description information, perform semantic understanding on the spliced title, and obtain description information corresponding to the label to be described; the description information includes Chinese semantic information of the label to be described.

9. The device for generating tag description information according to claim 8, characterized in that: The device further includes a training module for generating a description information generation model; the training module includes: The first acquisition submodule is used to obtain a pre-trained language model; A second acquisition submodule is configured to acquire a training object set corresponding to a training label and a correlation value of each training object in the training object set with respect to the training label; the training object set includes a plurality of different training objects; each training object in the training object set is represented by the training label; and the training label is in a preset character form; a processing submodule, configured to sort the training objects based on their association levels with the training labels to obtain sorting results; and concatenate the titles of a predetermined number of training objects in the sorting results to obtain concatenated training titles; The training submodule is used to fine-tune the pre-trained language model according to the target description information corresponding to the obtained training label and the training title, and obtain the description information generation model when the preset fine-tuning end condition is met.

10. The device for generating tag description information according to claim 9, characterized in that: The training submodule is further used to: Inputting the training title into the pre-trained language model to obtain predicted description information; Determine a loss value based on the target description information and the prediction description information; The model parameters of the pre-trained language model are adjusted based on the loss value for training, and when the preset fine-tuning end condition is reached, the description information generation model is obtained.

11. The device for generating tag description information according to claim 8, characterized in that: The device further includes a training module for generating a description information generation model; the training module includes: The first acquisition submodule is used to obtain a pre-trained language model; a second acquisition submodule, configured to acquire a training object set corresponding to a training label and a correlation value between the object set and each training object in the training object set with respect to the training label; the training object set includes a plurality of different training objects; each object in the training object set is represented by the training label; the training label is in a preset character form; a processing submodule, configured to sort the training objects based on their association levels with the training labels to obtain sorting results; concatenate the titles of a predetermined number of training objects in the sorting results to obtain concatenated training titles; and extract features from the training titles using a predetermined feature extraction algorithm to obtain feature information of the training titles; the feature information including classification information and / or keyword information; The training submodule is used to fine-tune the pre-trained language model based on the target description information corresponding to the acquired training label, the training title and the feature information, and obtain the description information generation model when the preset fine-tuning end condition is met.

12. The device for generating tag description information according to claim 9 or 11, characterized in that: The first acquisition submodule is further configured to: Get pre-trained text corpus and untrained language model; Processing the pre-training text corpus by at least one processing method; The processing method includes: randomly replacing part of the continuous or non-continuous text in the pre-training text corpus, randomly deleting part of the text in the pre-training text corpus, and performing random processing on the pre-training text corpus; Using the processed pre-trained text corpus as input to the untrained language model to obtain predicted text output by the untrained language model; A loss value is determined according to the predicted text and the original pre-trained text corpus, and the model parameters of the untrained language model are trained based on the loss value. When a preset pre-training end condition is reached, the pre-trained language model is obtained.

13. The device for generating tag description information according to claim 8, characterized in that: The processing module is further configured to: The titles of the first preset number of objects in the sorting result are spliced together using a preset separator to obtain spliced titles.

14. The device for generating tag description information according to any one of claims 8 to 11 or 13, characterized in that: The objects include articles in text form; The title is the title of the article representing the content of the article; The tag is obtained by identifying the article body content and / or the article title according to a tag identification model.

15. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for generating label description information according to any one of claims 1 to 7.

16. A computer storage medium, characterized in that The storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the method for generating label description information according to any one of claims 1 to 7.

17. A computer program product, characterized in that The computer program product includes at least one instruction or at least one program segment, and the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the method for generating label description information according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Title generation method and device based on concept extraction, equipment and medium

    CN113988057A