Label generation method and device, electronic equipment and storage medium
By obtaining video identification and description data, generating a collection of candidate tags, and entering a preset classification model, the problems of low efficiency and poor accuracy of manual tagging in long video platforms are solved, and automated tag generation is realized, which improves accuracy and consistency .
Patent Information
- Application Number
- CN202411646552.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-25
Smart Images

Figure CN119513361A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a label generation method, device, electronic device and storage medium. Background Art
[0002] In the process of distributing long videos on video platforms, better understanding of long video content can help the recommendation system distribute content in a more personalized way. Mainstream content platforms classify content in multiple dimensions through content tags. Accurate tags represent a more accurate understanding of the content.
[0003] At present, on long video platforms, content labeling is mainly done by professional channel manual editors on the content management platform to label relevant content. This cannot be achieved by machines, consumes a lot of manpower, and is very inefficient. In addition, because different people may label the same content differently, the accuracy and consistency of video content labeling are low. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a label generation method, device, electronic device and storage medium.
[0005] In a first aspect, the present application provides a label generation method, comprising:
[0006] Obtain the video identification and description data of the target video;
[0007] Acquire classification reference data of the target video according to the video identifier;
[0008] Generate a candidate tag set based on the description data and the classification reference data;
[0009] The description data and the candidate tag set are input into a preset classification model to obtain a classification tag for the target video.
[0010] Optionally, obtaining classification reference data of the target video according to the video identifier includes:
[0011] Acquire attribute data and catalog data of the target video according to the video identifier;
[0012] Get the graph data in the station;
[0013] Acquire off-site data associated with the target video according to the video identifier;
[0014] The attribute data, the catalog data, the on-site graph data and the off-site data are determined as the classification reference data.
[0015] Optionally, generating a candidate tag set based on the description data and the classification reference data includes:
[0016] Remove the names of people from the description data and the classification reference data to obtain first intermediate data;
[0017] Perform word segmentation on the first intermediate data to obtain second intermediate data;
[0018] Scoring the words in the second intermediate data to obtain third intermediate data;
[0019] The third intermediate data is post-processed to obtain the candidate tag set.
[0020] Optionally, post-processing the third intermediate data to obtain the candidate tag set includes:
[0021] Perform blacklist filtering on the third intermediate data, filter out words in the blacklist, and obtain fourth intermediate data;
[0022] adjusting the scores of the words that meet the conditions in the fourth intermediate data to obtain fifth intermediate data;
[0023] Matching the fifth intermediate data with a preset label system to obtain a classification label set and a text label set;
[0024] The first first preset number of category labels in the category label set and the first second preset number of text labels in the text label set are determined as the candidate label set.
[0025] Optionally, post-processing the third intermediate data to obtain the candidate tag set includes:
[0026] Determining the type of the target video;
[0027] If the target video is of the first type, generating a multi-dimensional label based on the description data;
[0028] The labels obtained by the post-processing and the multi-dimensional labels are determined as a candidate label set.
[0029] Optionally, the description data and the candidate tag set are input into a preset classification model to obtain a classification tag of the target video, including:
[0030] Determine a candidate tag based on the candidate tag set;
[0031] The description data and the candidate tags are input into a large model so that the large model outputs a classification tag of the target video.
[0032] Optionally, determining a candidate tag based on the candidate tag set includes:
[0033] Determining a classification label in the candidate label set;
[0034] The labels whose dimension is type in the classification labels are determined as candidate labels.
[0035] In a second aspect, the present application provides a label generation device, comprising:
[0036] A first acquisition module, used to acquire a video identifier and description data of a target video;
[0037] A second acquisition module, used to acquire classification reference data of the target video according to the video identifier;
[0038] A generating module, configured to generate a candidate tag set based on the description data and the classification reference data;
[0039] The input module is used to input the description data and the candidate tag set into a preset classification model to obtain the classification tag of the target video.
[0040] Optionally, the second acquisition module includes:
[0041] A first acquisition unit, configured to acquire attribute data and catalog data of the target video according to the video identifier;
[0042] The second acquisition unit is used to acquire the graph data in the station;
[0043] A third acquisition unit, configured to acquire off-site data associated with the target video according to the video identifier;
[0044] The first determination unit is used to determine the attribute data, the catalog data, the on-site graph data and the off-site data as the classification reference data.
[0045] Optionally, the generating module includes:
[0046] A first processing unit, configured to remove names from the description data and the classification reference data to obtain first intermediate data;
[0047] A second processing unit, configured to perform word segmentation processing on the first intermediate data to obtain second intermediate data;
[0048] A third processing unit, configured to score the words in the second intermediate data to obtain third intermediate data;
[0049] The third intermediate data is post-processed to obtain the candidate tag set, which is used to post-process the third intermediate data to obtain the candidate tag set.
[0050] Optionally, the fourth processing unit includes:
[0051] A filtering subunit, configured to perform blacklist filtering on the third intermediate data, filter out words in the blacklist, and obtain fourth intermediate data;
[0052] an adjusting subunit, configured to adjust the scores of the words meeting the conditions in the fourth intermediate data to obtain fifth intermediate data;
[0053] A matching subunit, used for matching the fifth intermediate data with a preset label system to obtain a classification label set and a text label set;
[0054] The first determining subunit is used to determine the first first preset number of category labels in the category label set and the first second preset number of text labels in the text label set as the candidate label set.
[0055] Optionally, the fourth processing unit includes:
[0056] A second determining subunit, used to determine the type of the target video;
[0057] A generating subunit, configured to generate a multi-dimensional label based on the description data if the target video is of the first type;
[0058] The third determining subunit is used to determine the labels obtained by post-processing and the multi-dimensional labels as a candidate label set.
[0059] Optionally, the input module includes:
[0060] A second determining unit, configured to determine a candidate tag based on the candidate tag set;
[0061] An input unit is used to input the description data and the candidate tags into a large model so that the large model outputs a classification tag of the target video.
[0062] Optionally, the second determining unit includes:
[0063] A fourth determination subunit, configured to determine a classification label in the candidate label set;
[0064] The fifth determining subunit is used to determine the label with the dimension of type in the classification label as the candidate label.
[0065] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0066] Memory, used to store computer programs;
[0067] The processor is used to implement any label generation method described in the first aspect when executing the program stored in the memory.
[0068] In a fourth aspect, the present application provides a computer-readable storage medium, on which a program of a label generation method is stored. When the program of the label generation method is executed by a processor, the steps of any label generation method described in the first aspect are implemented.
[0069] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0070] The embodiment of the present application achieves expansion of the description data of the target video by acquiring the classification reference data of the target video, and achieves expansion of the candidate tags generated based on the description data by generating a candidate tag set based on the description data and the classification reference data. Therefore, the preset classification model can select the classification tags of the target video according to the description data from a richer candidate tag set, thereby automatically generating the classification tags of the target video. Furthermore, by selecting the classification tags that are closer to the description data of the target video from the richer candidate tag set after expansion, the accuracy of tag generation is improved. Moreover, since the classification tags are generated based on the same standard, the errors caused by individual differences in manual labeling are avoided, thereby improving the consistency of the tags. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0073] Figure 1 A flowchart of a label generation method provided in an embodiment of the present application;
[0074] Figure 2 A schematic diagram of a labeling system provided in an embodiment of the present application;
[0075] Figure 3A schematic diagram of the principle of a label generation method provided in an embodiment of the present application;
[0076] Figure 4 A structural diagram of a label generation device provided in an embodiment of the present application;
[0077] Figure 5 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0079] In long video platforms, content labeling cannot be automatically achieved by machines. The main reason is that traditional NLP natural language processing (NLP) services cannot summarize content well based on a large amount of content, and the effect is usually poor. Therefore, professional channel manual editors are mainly used to label relevant content on the content management platform. The current labeling method consumes a lot of manpower and is very inefficient. In addition, different people may label the same content differently, resulting in low label accuracy and consistency of video content. To this end, in an embodiment of the present application, a label generation method, device, electronic device and storage medium are provided, which can automatically generate labels for videos, improve label generation efficiency, and improve label accuracy and consistency.
[0080] The present application embodiment provides a label generation method, such as Figure 1 As shown, including:
[0081] Step S101, obtaining the video identification and description data of the target video;
[0082] In an embodiment of the present application, the target video may refer to a long video for which a tag is to be generated, and the target video may refer to a movie, a TV series, etc. The long video may refer to a video whose length exceeds a preset time length. For example, the preset time length may be 10 minutes, 30 minutes, etc. The video identifier may refer to a video title, such as: Journey to the West, Outlaws of the Marsh, etc. The description data includes: release year, video description and recommendation, etc., wherein the video description may refer to a plot summary, etc.
[0083] In this step, after the target video is determined, the video identification and description data of the target video may be automatically acquired, or the video identification and description data of the target video may be acquired manually.
[0084] Step S102, obtaining classification reference data of the target video according to the video identifier;
[0085] In the embodiment of the present application, the classification reference data refers to data related to the target video in and outside the site, including: catalog data, site graphs and external data. The site graph can refer to the knowledge graph of the target video in the site, and the external data exemplarily includes: video descriptions and video tags of the xx website;
[0086] In this step, the catalog data and on-site graph of the target video can be obtained on the site, and the off-site data can be obtained outside the site according to the video identifier.
[0087] Step S103, generating a candidate tag set based on the description data and the classification reference data;
[0088] In this step, while generating candidate tags based on the description data, candidate tags are also generated based on the classification reference data, thereby obtaining a candidate tag set including multiple candidate tags.
[0089] Step S104: input the description data and the candidate tag set into a preset classification model to obtain a classification tag for the target video.
[0090] In an embodiment of the present application, the preset classification model may refer to a GPT large language model, and the preset classification model may select a preset number of labels from a candidate label set as classification labels for the target video based on the description data.
[0091] In practical applications, such as Figure 2 As shown in the figure, a high-quality tag set (hereinafter referred to as the tag system) can be sorted out according to the characteristics of different video contents. Different channels such as movies, TV series, documentaries, and variety shows have different tag systems. The tag system is composed of tag dimensions (type, subject matter, style) and tag values (comedy, romance, and plot). The "dimension-tag value" of different channels is different. A tag system for long videos can be pre-built. Long video tags include: classification tags and custom tags. Among them, classification tags include: multiple sub-tags and tag values. The tag value is a fixed set. Custom tags also include tags and tag values. The tag value is an open set. The classification tag finally determined by the preset classification model can be used as the main tag under the type tag in the tag system.
[0092] In this step, the preset classification model can be called through the prompt word (Prompt), and the description data and candidate label set can be input into the preset classification model. The prompt template is as follows:
[0093] {{release_date}}year{{region}}{{channel}}《{{title}}》
[0094] Plot summary: {{description}}
[0095] Among them, release_date: release year, Region: region, Channel: channel, Title: title, Description: introduction, typeTag1: type tag.
[0096] 1. Please select the most appropriate 1-2 type labels from the following type labels based on the above content
[0097] Type tag: {{typeTag1}}
[0098] 2. Please only output legal JSON (the format is given below)
[0099] Sample output:
[0100] {"tags":[{"dimension":"type","top_tag":"action","score":0.98},
[0101] {"dimension":"Type","top_tag":"B","score":0.97}]}
[0102] A complete prompt is as follows:
[0103] 2024 TV series "Flowers Bloom Sometimes Silently"
[0104] Plot introduction: Jin Xiaobao, the young master of the Jin family, is a playboy and a womanizer. Although he is greedy for beauty, he is also funny and considerate. He always longs for a good marriage. On a dark and windy night, this good man unexpectedly appears in front of him! Unexpectedly, the girl Huai En, who has a peerless beauty and a cold temperament, is in a fatal disaster. How can Xiaobao miss the opportunity to be a hero and save the beauty! But this move not only failed to marry the beauty as his young wife, but also made himself lose his virginity! This "beauty" is not only a mystery of gender, but even her life experience is inseparable from the Jin family... When Xiaobao and Huai En recognize each other, can they still have the courage to continue their good relationship?
[0105] Task:
[0106] 1. Please select the most appropriate 1-2 type labels from the following type labels based on the above content
[0107] Type tags: drama, romance, costume
[0108] 2. Please only output legal JSON (the format is given below)
[0109] Sample output:
[0110] {"tags":[{"dimension":"type","top_tag":"action","score":0.98},
[0111] {"dimension":"Type","top_tag":"B","score":0.97}]}
[0112] LLM returns:
[0113] {"tags":[{"dimension":"Type","top_tag":"Plot","score":0.98},
[0114] {"dimension":"Type","top_tag":"Love","score":0.97}]}
[0115] This application provides more accurate label generation capabilities through the powerful summarization and content extraction capabilities of the preset classification model. Combine the content knowledge graph and the knowledge construction of the whole network to build prompt words to ensure that the large language model has enough data for reference summary. Through well-designed prompt words, combined with the small sample (Few-shot) learning ability in the prompt word engineering, it is ensured that the generated tags are more in line with the manual style of the editor, and the behavior of professional editors setting tags can be better simulated. Automatically set tags for long video content, thereby saving a lot of manpower. In the daily use of the label system, in order to meet the needs of the business, it is often necessary to adjust the structure of the label or add new dimensions of labels. Each label adjustment requires a lot of manpower. The automatic labeling method of the preset classification model can greatly reduce the consumption of manpower, and can achieve better consistency and accuracy.
[0116] The embodiment of the present application achieves expansion of the description data of the target video by acquiring the classification reference data of the target video, and achieves expansion of the candidate tags generated based on the description data by generating a candidate tag set based on the description data and the classification reference data. Therefore, the preset classification model can select the classification tags of the target video according to the description data from a richer candidate tag set, thereby automatically generating the classification tags of the target video. Furthermore, by selecting the classification tags that are closer to the description data of the target video from the richer candidate tag set after expansion, the accuracy of tag generation is improved. Moreover, since the classification tags are generated based on the same standard, the errors caused by individual differences in manual labeling are avoided, thereby improving the consistency of the tags.
[0117] In another embodiment of the present application, step S102 of acquiring classification reference data of the target video according to the video identifier includes:
[0118] Step S201, acquiring attribute data and cataloging data of the target video according to the video identifier;
[0119] In the application embodiment, attribute data may refer to Meta data, including: basic information of long videos, such as name, description, actors, and release date, etc. Cataloging data includes basic information of target videos, such as title, director, actors, etc., and also includes: technical parameters, such as resolution, frame rate, bit rate, etc. Through cataloging data, videos can be classified according to different standards and requirements, such as by type, age, region, etc.
[0120] Step S202, obtaining the graph data in the station;
[0121] In this step, the in-site graph data can be obtained from the database. The in-site knowledge graph is used to store resource information related to film and television content, such as actors, award-winning works, original works, shooting locations and other information. The in-site graph data is constructed based on the label data of the content. For example, the labels of "Wolf Warrior" are action and war.
[0122] Step S203, acquiring off-site data associated with the target video according to the video identifier;
[0123] In this step, the off-site data of the target video can be obtained in the database according to the video identifier. Exemplarily, the off-site data includes the video description and video tags of the AA website, the video tags of the BB website, the video tags of the CC website, etc.
[0124] Step S204, determining the attribute data, the cataloging data, the on-site graph data and the off-site data as the classification reference data.
[0125] In this step, a combination of attribute data, catalog data, on-site graph data, and off-site data can be used as classification reference data to expand the description data of the target video.
[0126] In another embodiment of the present application, step S103 generates a candidate tag set based on the description data and the classification reference data, including:
[0127] Step S301, removing names from the description data and the classification reference data to obtain first intermediate data;
[0128] In this step, the names of the description data and the classification reference data are removed to obtain the first intermediate data.
[0129] Step S302, performing word segmentation processing on the first intermediate data to obtain second intermediate data;
[0130] In this step, an open source word segmentation model (such as Jieba, HanNLP, and pkuseg, etc.) can be used to perform word segmentation processing on the first intermediate data to obtain second intermediate data.
[0131] Step S303, scoring the words in the second intermediate data to obtain third intermediate data;
[0132] In this step, the Bert model can be used to score the words in the second intermediate data to obtain third intermediate data, which includes multiple words and the score corresponding to each word.
[0133] Step S304: post-process the third intermediate data to obtain the candidate tag set.
[0134] In this step, the third intermediate data can be post-processed. Post-processing refers to processing the scoring results of specific word segmentation according to business needs, including filtering, reducing / increasing scores, matching the full text of the word with the label rules and fuzzy matching, generating classification labels and text labels, and controlling the number of labels output. According to the configuration center, the maximum number of labels returned is 16, and the maximum number of text labels is 6. A candidate label set is constructed based on all labels obtained after post-processing.
[0135] In one implementation of the present application, post-processing the third intermediate data to obtain the candidate tag set includes:
[0136] Perform blacklist filtering on the third intermediate data, filter out the words in the blacklist, and obtain fourth intermediate data; adjust the scores of qualified words in the fourth intermediate data to obtain fifth intermediate data; match the fifth intermediate data with a preset label system to obtain a classification label set and a text label set; determine the first first preset number of classification labels in the classification label set and the first second preset number of text labels in the text label set as the candidate label set.
[0137] The implementation method of the present application performs a series of processing on the description data and the classification reference data to eliminate the interference of words that are not suitable as labels, obtain a rich set of candidate labels, and expand the candidate labels generated based on the description data.
[0138] In another embodiment of the present application, the third intermediate data is post-processed to obtain the candidate tag set, including:
[0139] Determine the type of the target video; if the target video is of the first type, generate a multi-dimensional label based on the description data; and determine the label obtained by post-processing and the multi-dimensional label as a candidate label set.
[0140] In an embodiment of the present application, the first type may be a TV series type. Since TV series video content is richer and more diverse, when the target video is of a TV series type, a multi-dimensional label may be generated based on the description data to fully reflect the classification of multiple dimensions of the target video. A candidate label set may be constructed based on the multi-dimensional label and the label obtained through post-processing to obtain a richer candidate label set, thereby further expanding the candidate labels generated based on the description data.
[0141] In another embodiment of the present application, step S104 inputs the description data and the candidate tag set into a preset classification model to obtain a classification tag of the target video, including:
[0142] Step S401, determining a candidate tag based on the candidate tag set;
[0143] In this step, classification labels may be determined in the candidate label set; labels with a dimension of type in the classification labels may be determined as candidate labels.
[0144] Step S402: the description data and the candidate tags are input into a large model so that the large model outputs a classification tag of the target video.
[0145] The embodiment of the present application can determine the label with the dimension of type as the candidate label in the candidate label set, eliminate the interference of the text label that does not meet the preset label system, and input the description data and the candidate label into the big model, so that the big model selects the classification label of the target video from the candidate label according to the description data, so as to achieve that on the basis of automatically generating labels, the classification label that is closer to the description data of the target video can be selected from a richer candidate label set, thereby improving the accuracy of label generation. Moreover, since the classification labels are generated based on the same standard, the errors caused by individual differences in manual labeling are avoided, thereby improving the consistency of labels.
[0146] For ease of understanding, the present application also provides an embodiment in practical application, such as Figure 3 As shown, the following steps are included:
[0147] 1. Manually fill in the title, content release year, description, recommendation and other information of the long video to be marked in the front-end interface of the system;
[0148] 2. The front-end asynchronously calls the back-end marking service;
[0149] 3. The tag interface will match the same content crawled from the external site according to the title, that is, the description information and video tags of the long video (movie, TV series, etc.) to be tagged on other websites (such as Douban, Baidu v1905 Movie Network, etc.);
[0150] 4. If the long video to be labeled exists in the company's internal system, the Meta data, catalog description, and knowledge graph data on the site will be obtained;
[0151] 5. Use the NER model to remove names, segment words based on the existing information, call the Bert model for scoring and sorting, and perform post-processing according to the post-processing rules; the post-processing rules include the following logic: blacklist filtering, score adjustment strategy to reduce / increase weight, match the generated tags to the tag system in the site, generate classification tags, text tags, and control the number of spit tags. For example, the maximum number of tags returned is 16, and the maximum number of text tags is 6;
[0152] 6. Based on the sorted labels, classify them according to the label system;
[0153] 7. The labels in the label system are classification labels, otherwise they are text labels;
[0154] 8. Select the label with the dimension of "type" in the classification label to call the large model and select the main label.
[0155] Usually, Internet companies will build databases outside their websites. For example, iQiyi will record Douban / Baidu Encyclopedia's film and television content database. The same content refers to the description information of the same film and television content (movies, TV series, etc.) on other websites.
[0156] In another embodiment of the present application, a label generating device is also provided. Figure 4 As shown, including:
[0157] A first acquisition module 11 is used to acquire a video identifier and description data of a target video;
[0158] A second acquisition module 12, used to acquire classification reference data of the target video according to the video identifier;
[0159] A generating module 13, configured to generate a candidate tag set based on the description data and the classification reference data;
[0160] The input module 14 is used to input the description data and the candidate tag set into a preset classification model to obtain a classification tag for the target video.
[0161] Optionally, the second acquisition module includes:
[0162] A first acquisition unit, configured to acquire attribute data and catalog data of the target video according to the video identifier;
[0163] The second acquisition unit is used to acquire the graph data in the station;
[0164] A third acquisition unit, configured to acquire off-site data associated with the target video according to the video identifier;
[0165] The first determination unit is used to determine the attribute data, the catalog data, the on-site graph data and the off-site data as the classification reference data.
[0166] Optionally, the generating module includes:
[0167] A first processing unit, configured to remove names from the description data and the classification reference data to obtain first intermediate data;
[0168] A second processing unit, configured to perform word segmentation processing on the first intermediate data to obtain second intermediate data;
[0169] A third processing unit, configured to score the words in the second intermediate data to obtain third intermediate data;
[0170] The third intermediate data is post-processed to obtain the candidate tag set, which is used to post-process the third intermediate data to obtain the candidate tag set.
[0171] Optionally, the fourth processing unit includes:
[0172] A filtering subunit, configured to perform blacklist filtering on the third intermediate data, filter out words in the blacklist, and obtain fourth intermediate data;
[0173] an adjusting subunit, configured to adjust the scores of the words meeting the conditions in the fourth intermediate data to obtain fifth intermediate data;
[0174] A matching subunit, used for matching the fifth intermediate data with a preset label system to obtain a classification label set and a text label set;
[0175] The first determining subunit is used to determine the first preset number of category labels in the category label set and the first preset number of text labels in the text label set as the candidate label set.
[0176] Optionally, the fourth processing unit includes:
[0177] A second determining subunit, used to determine the type of the target video;
[0178] A generating subunit, configured to generate a multi-dimensional label based on the description data if the target video is of the first type;
[0179] The third determining subunit is used to determine the labels obtained by post-processing and the multi-dimensional labels as a candidate label set.
[0180] Optionally, the input module includes:
[0181] A second determining unit, configured to determine a candidate tag based on the candidate tag set;
[0182] An input unit is used to input the description data and the candidate tags into a large model so that the large model outputs a classification tag of the target video.
[0183] Optionally, the second determining unit includes:
[0184] A fourth determination subunit, configured to determine a classification label in the candidate label set;
[0185] The fifth determining subunit is used to determine the label with the dimension of type in the classification label as the candidate label.
[0186] In another embodiment of the present application, an electronic device is provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
[0187] Memory, used to store computer programs;
[0188] The processor is used to implement the label generation method described in any of the above method embodiments when executing the program stored in the memory.
[0189] In the electronic device provided by the embodiment of the present invention, the processor acquires the classification reference data of the target video by executing the program stored in the memory, thereby expanding the description data of the target video, and generates a candidate label set based on the description data and the classification reference data, thereby expanding the candidate labels generated based on the description data, thereby enabling the preset classification model to select the classification labels of the target video according to the description data from a richer candidate label set, thereby automatically generating the classification labels of the target video, and further, by selecting the classification labels that are closer to the description data of the target video from the richer candidate label set after expansion, the accuracy of label generation is improved, and because the classification labels are generated based on the same standard, errors caused by individual differences in manual labeling are avoided, thereby improving the consistency of labels.
[0190] The communication bus 1140 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0191] The communication interface 1120 is used for communication between the above electronic device and other devices.
[0192] The memory 1130 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0193] The above-mentioned processor 1110 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0194] In another embodiment of the present application, a computer-readable storage medium is provided, on which a program of the label generation method is stored. When the program of the label generation method is executed by a processor, the steps of the label generation method described in any of the aforementioned method embodiments are implemented.
[0195] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0196] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A label generation method, characterized in that: include: Obtain the video identification and description data of the target video; Acquire classification reference data of the target video according to the video identifier; Generate a candidate tag set based on the description data and the classification reference data; The description data and the candidate tag set are input into a preset classification model to obtain a classification tag for the target video.
2. The label generation method according to claim 1, characterized in that: Acquiring classification reference data of the target video according to the video identifier includes: Acquire attribute data and catalog data of the target video according to the video identifier; Get the graph data in the station; Acquire off-site data associated with the target video according to the video identifier; The attribute data, the catalog data, the on-site graph data and the off-site data are determined as the classification reference data.
3. The label generation method according to claim 1, characterized in that: Generating a candidate tag set based on the description data and the classification reference data includes: Remove the names of people from the description data and the classification reference data to obtain first intermediate data; Perform word segmentation on the first intermediate data to obtain second intermediate data; Scoring the words in the second intermediate data to obtain third intermediate data; The third intermediate data is post-processed to obtain the candidate tag set.
4. The label generation method according to claim 3, characterized in that: Post-processing the third intermediate data to obtain the candidate tag set includes: Perform blacklist filtering on the third intermediate data, filter out words in the blacklist, and obtain fourth intermediate data; adjusting the scores of the words that meet the conditions in the fourth intermediate data to obtain fifth intermediate data; Matching the fifth intermediate data with a preset label system to obtain a classification label set and a text label set; The first first preset number of category labels in the category label set and the first second preset number of text labels in the text label set are determined as the candidate label set.
5. The label generation method according to claim 3, characterized in that: Post-processing the third intermediate data to obtain the candidate tag set includes: Determining the type of the target video; If the target video is of the first type, generating a multi-dimensional label based on the description data; The labels obtained by post-processing and the multi-dimensional labels are determined as a candidate label set.
6. The label generation method according to claim 1, characterized in that: Inputting the description data and the candidate tag set into a preset classification model to obtain a classification tag of the target video includes: Determine a candidate tag based on the candidate tag set; The description data and the candidate tags are input into a large model so that the large model outputs a classification tag of the target video.
7. The label generation method according to claim 6, characterized in that: Determining a candidate tag based on the candidate tag set includes: Determining a classification label in the candidate label set; The labels whose dimension is type in the classification labels are determined as candidate labels.
8. A label generating device, characterized in that: include: A first acquisition module, used to acquire a video identifier and description data of a target video; A second acquisition module, used to acquire classification reference data of the target video according to the video identifier; A generating module, configured to generate a candidate tag set based on the description data and the classification reference data; The input module is used to input the description data and the candidate tag set into a preset classification model to obtain the classification tag of the target video.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the label generation method according to any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program of the label generation method, and when the program of the label generation method is executed by a processor, the steps of the label generation method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Work order generation method and device based on large model intelligent classification, equipment and medium
CN120524374A
Work order generation method and device based on large model intelligent classification, equipment and medium
CN120524374B