Video tag generation method and apparatus, electronic device, and storage medium

Extracting names from videos through face recognition and fuzzy matching technology, and filtering them according to importance, solves the problem of inaccurate video tags in the existing technology, and improves the efficiency and user experience of video recommendation and search.

WO2024188044A1PCT designated stage expired Publication Date: 2024-09-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2024/078647
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-13
Filing Date
2024-02-27
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

It is difficult to accurately label videos with existing technology, resulting in low efficiency of video recommendation and search in multimedia applications and poor user experience.

Method used

Through face recognition technology and fuzzy matching technology, people's names are extracted from the multi-modal information of the video, and sorting and filtering technology is used to filter the names according to their importance to generate accurate name tags.

Benefits of technology

It improves the accuracy and recall rate of video tags, and improves the response efficiency and user experience of downstream services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024078647_19092024_PF_FP_ABST
    Figure CN2024078647_19092024_PF_FP_ABST
Patent Text Reader

Abstract

A video tag generation method and apparatus, an electronic device, and a storage medium. The method comprises: extracting a plurality of key frames from a video; extracting personal names corresponding to the key frames to form a candidate personal name set; extracting personal names from video assistance information to obtain an assistant name set, and using the assistant name set to carry out screening on the candidate personal name set so as to obtain a target personal name set; and separately using each personal name in the target personal name set as a personal name tag of the video.
Need to check novelty before this filing date? Find Prior Art

Description

Video tag generation method, device, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 13, 2023, with application number 202310261084.3, and invention name “Video tag generation method, device, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for generating video tags. Background Art

[0003] In recent years, the increasing maturity of computer network technology, digital television technology, and communication technology has greatly promoted the rise of the multimedia industry. The multimedia industry has formed an industrial cluster with imaging, animation, graphics, and sound technologies at its core, and digital media as its carrier. Its content covers information, communication, advertising, communications, electronic entertainment products, online education, entertainment, publishing, and other fields, involving multiple industries such as computers, film and television, media, and education. It is often called the core industry of the 21st century knowledge economy and a new economic growth point after the IT industry.

[0004] With the rapid development of computer network technology and the promotion of multimedia applications, various videos are continuously generated. Therefore, how to obtain the content of interest to the subject from massive videos has become the focus of current multimedia application research.

[0005] Technical content

[0006] Embodiments of the present application provide a video tag generation method, device, electronic device, and storage medium for generating name tags for video recommendations.

[0007] This embodiment of the present application provides a method for generating video tags, which is executed by a server and includes:

[0008] Acquire a video to be marked, and acquire video auxiliary information, wherein the video auxiliary information includes at least one of text information and image information;

[0009] Extracting multiple key frames from the video, performing face recognition on each key frame to obtain a recognition result corresponding to each key frame, and extracting a name corresponding to each key frame based on each recognition result to obtain a candidate name set consisting of the names corresponding to each key frame;

[0010] Extracting names from the video auxiliary information to obtain an auxiliary name set, wherein the auxiliary name set includes at least one name and a source of each name;

[0011] obtaining, based on the auxiliary name set, an importance feature of each name in the candidate name set, wherein the importance feature of each name includes a feature vector indicating a source of the corresponding name; and filtering a target name set from the candidate name set based on the importance feature of each name;

[0012] Each name in the target name set is used as a name label of the video.

[0013] The present invention provides a video tag generation device, which is applied to a server and includes:

[0014] a multimodal information acquisition module, configured to acquire a video to be labeled and acquire video auxiliary information, wherein the video auxiliary information includes at least one of text information and image information;

[0015] a candidate name extraction module, configured to extract a plurality of key frames from the video, perform face recognition on each key frame to obtain a recognition result corresponding to each key frame, and extract the name corresponding to each key frame based on each recognition result to obtain a candidate name set consisting of the names corresponding to each key frame;

[0016] an auxiliary name extraction module, configured to extract names from the video auxiliary information based on the modality of the video auxiliary information to obtain an auxiliary name set, wherein the auxiliary name set includes at least one name and a source of each name;

[0017] a name screening module configured to obtain, based on the auxiliary name set, an importance feature of each name in the candidate name set, wherein the importance feature of each name includes a feature vector indicating the source of the corresponding name; and to screen a target name set from the candidate name set based on the importance feature of each name;

[0018] The label generation module is used to use each name in the target name set as a name label of the video.

[0019] An embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the above-mentioned video tag generation method are implemented.

[0020] An embodiment of the present application provides a computer-readable storage medium having computer-executable instructions stored thereon. When the computer-executable instructions are executed by an electronic device, the steps of the above-mentioned video tag generation method are implemented.

[0021] An embodiment of the present application provides a computer program product, comprising a computer program, which implements the steps of the above-mentioned video tag generation method when executed by an electronic device.

[0022] The features and advantages of the present application will be described in the following description, and in part will become apparent from the description or be understood by practicing the present application. The objectives and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0023] BRIEF DESCRIPTION OF THE DRAWINGS

[0024] FIG1 is a diagram of an application scenario applicable to an embodiment of the present application;

[0025] FIG2 is a schematic diagram of a video tag application process provided by an embodiment of the present application;

[0026] FIG3 is an overall architecture diagram of a video tag generation method provided by an embodiment of the present application;

[0027] FIG4 is a flow chart of a method for generating video tags according to an embodiment of the present application;

[0028] FIG5 is a schematic diagram of the candidate name extraction process provided in an embodiment of the present application;

[0029] FIG6 is a fuzzy matching process of a name tag provided in an embodiment of the present application;

[0030] FIG7 is a flowchart of extracting names from text information according to an embodiment of the present application;

[0031] FIG8 is a flowchart of extracting a name from a text message according to an embodiment of the present application;

[0032] FIG9 is a schematic diagram of a process for extracting names from text information according to an embodiment of the present application;

[0033] FIG10 is a schematic diagram of a process for extracting names from image information according to an embodiment of the present application;

[0034] FIG11 is a flow chart of a training method for a target screening model provided in an embodiment of the present application;

[0035] FIG12 is a flow chart of a method for updating candidate names in a training sample set according to an embodiment of the present application;

[0036] FIG13 is a schematic diagram of the updating process of candidate names in the training sample set provided by an embodiment of the present application;

[0037] FIG14 is a network structure diagram of a target screening model provided in an embodiment of the present application;

[0038] FIG15 is a flow chart of a method for screening target names provided in an embodiment of the present application;

[0039] FIG16 is a schematic diagram of a process for determining a key person evaluation value according to an embodiment of the present application;

[0040] FIG17 is a schematic diagram of the overall process of adding name tags to videos according to an embodiment of the present application;

[0041] FIG18 is a schematic diagram of a service response process based on a name tag according to an embodiment of the present application;

[0042] FIG19 is a structural diagram of a video tag generating apparatus provided in an embodiment of the present application;

[0043] FIG20 is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of the technical solutions of this application, but not all of them. Based on the embodiments described in this application document, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the technical solutions of this application.

[0045] For ease of understanding, the terms involved in the embodiments of this application are explained below.

[0046] Video: Usually refers to the storage format of various dynamic images. According to the length of the dynamic images, it is divided into long videos and short videos. Among them, the length of long videos is longer than that of short videos.

[0047] Tagging system: refers to a system that can add various rich tags to videos, such as the video's title, song title, object, scene, person's name, etc. The tags are used for downstream recommendation, search, distribution and other services.

[0048] Video auxiliary information: refers to the relevant content associated with the video, which can exist in multiple modes, such as text information, image information and voice information.

[0049] Text information: refers to video auxiliary information in string format, such as text extracted from video titles, subtitles, comments, and images.

[0050] Image information: refers to video auxiliary information in image format, such as video cover images, posters, extracted video frames, etc.

[0051] Multimodal information extraction and fusion: Using machine learning or deep learning methods, the multiple modal information contained in the video auxiliary information is encoded into a dense feature vector, which is called multimodal information extraction and fusion.

[0052] Optical Character Recognition (OCR): It is used to convert image shapes into text characters. That is, for any input image, it can output all the text in the image.

[0053] String edit distance: It is a quantitative measure of the degree of difference between two strings. The measurement method is to count the minimum number of times it takes to transform one string into another.

[0054] The embodiments of the present application relate to artificial intelligence (AI), which is designed based on big data analysis technology and machine learning (ML) technology in artificial intelligence technology. Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0055] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning (DL).

[0056] Machine learning is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0057] The following is an overview of the design concepts of the embodiments of the present application.

[0058] With the rapid development of network technology and the promotion of multimedia applications, a wide variety of videos are being produced in an endless stream. To improve the response efficiency and accuracy of downstream multimedia services (such as video recommendation, video search, and video distribution), most downstream services are implemented based on video tags. Typically, a tagging system is used to label videos with a variety of tags (such as drama title tags, theme tags, and category tags). The tagging results of videos directly affect the accuracy of downstream services.

[0059] In some methods, the tags generated for videos mainly include drama title tags, theme tags, category tags, etc. However, these tags mainly reflect the main content of the video and cannot highlight the key characters in the video. In this way, for the target characters that the subject likes, the downstream business needs to search repeatedly to obtain matching videos, which puts a load on the background server of the multimedia application, reduces response efficiency, and reduces the subject's user experience of the multimedia application.

[0060] Therefore, generating name tags for videos has become an urgent problem to be solved in downstream businesses.

[0061] Some methods for labeling videos in labeling systems include: retrieval-based label recall methods and classification-based label recall methods. Among them, the retrieval-based label recall method adds the corresponding video to the retrieval library when the label is entered into the library. In this way, in actual use, the corresponding label is obtained by retrieving similar videos to achieve the purpose of recall; the classification-based label recall method achieves the purpose of label recall by learning a closed-set label classifier to perform multi-label classification on the video content. However, these two labeling methods are mostly general label recall technologies. Since there are many names in the video, but there are generally only a few key characters (i.e., the protagonists), and different subjects may like different characters, therefore, using general label recall technology, it is impossible to accurately label the video with the name. In this way, downstream businesses need to search repeatedly to obtain videos of the target subject's favorite characters, which puts a load on the background server of the multimedia application, reduces response efficiency, and reduces the subject's experience of using the multimedia application.

[0062] The embodiment of the present application provides a video tag generation method, device, electronic device and storage medium, which can be used to specifically tag videos with accurate names. The method uses face recognition technology and fuzzy matching technology to extract names from multimodal information of the video (such as pictures, text, etc.), and uses sorting and screening technology to sort and screen according to the importance of the names appearing in the video frame to obtain the name labels of the key figures in the video. On the one hand, it can make full use of the rich name information in the video auxiliary information such as the title, cover image, subtitles and comments of the video, provide an important basis for the name screening of key figures, and improve the accuracy of the name label; on the other hand, the attention mechanism is used during screening, which can learn the relationship between the names appearing in the video frame, filter out the wrong name labels well, screen out the correct name labels, and improve the recall rate of the name labels, thereby improving the accuracy and efficiency of the downstream business response.

[0063] It should be noted that the method for adding name tags to videos provided in the embodiment of the present application is applicable to short videos and long videos.

[0064] The following uses a short video as an example to describe the implementation process of generating name tags provided by an embodiment of the present application.

[0065] 1 , which is a schematic diagram of an application scenario provided in an embodiment of the present application, the application scenario includes two terminal devices 110 and a server 120 .

[0066] In an embodiment of the present application, the terminal device 110 includes but is not limited to mobile phones, tablet computers, laptop computers, desktop computers and other devices. The terminal device 110 is installed with a multimedia application that can watch and edit short videos and send short videos to the server 120. The server 120 is the background server of the multimedia application, which is used to tag short videos and is responsible for downstream services such as tag-based video distribution, video search and video recommendation. The server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be 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, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0067] In an embodiment of the present application, the terminal device 110 and the server 120 can communicate with each other through a communication network.

[0068] In some embodiments, the communication network is a wired network or a wireless network.

[0069] The short video tag generation method in the embodiment of the present application can be executed by the server 120 in Figure 1. Specifically, subject A edits a short video through the terminal device 110 and uploads the edited short video to the server 120. The server 120 extracts multiple key frames from the short video and performs face recognition. Based on the face recognition results, a candidate name set is obtained, and an auxiliary name set is extracted from the video auxiliary information such as the cover image and title of the short video. The candidate name set is then screened based on the auxiliary name set to obtain the name tag of the short video. Furthermore, based on the name tag of the short video, the short video is displayed to subject B through the terminal device 110.

[0070] It should be noted that what is shown in FIG1 is only an example. In fact, the number of terminal devices and servers is not limited and is not specifically limited in the embodiments of the present application.

[0071] In an embodiment of the present application, when there are multiple servers, the multiple servers can be combined into a blockchain, and the servers are nodes on the blockchain; as disclosed in the embodiment of the present application, the short video tag generation method, in which the cover image, title, subtitles, key frames and comments and other multimedia information involved can be saved on the blockchain.

[0072] In some application scenarios, the aforementioned multimedia information can be stored using cloud storage technology. Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) is a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (also known as storage nodes) on a network through application software or application interfaces to work together and provide external data storage and service access capabilities.

[0073] The short videos containing human faces collected in the embodiments of the present application are obtained through legal channels and are used to add name tags to short videos after authorization by the person himself, the film producer, etc. They shall not be used for other businesses without authorization and will not affect the personal image of the person in the short video.

[0074] It should be noted that the implementation methods of this application are only shown to facilitate understanding of the spirit and principles of this application and are not intended to limit application scenarios.

[0075] The short video tag generation method provided in the embodiment of the present application can be used in a tag system to enrich the tags in an existing tag system, add name tags to short videos, and provide important information for downstream businesses (such as video distribution, video search, and video recommendation, etc.) based on highly accurate and high-recall video tags.

[0076] Figure 2 shows a schematic diagram of the tagging process for short videos. The tagging system uses existing tagging methods to tag short videos with corresponding drama titles (e.g., [AAA]), theme tags (e.g., [costume drama]), and category tags (e.g., [TV series]). The method provided in this embodiment also tags short videos with corresponding person names (e.g., [XXX] and [YY]). Downstream services perform tasks such as recommending, searching, and distributing short videos based on any one or multiple tags.

[0077] See Figure 3, which is an overall architecture diagram of the short video tag generation method provided in an embodiment of the present application, which mainly includes a multimodal information extraction module, a name tag recall module and a name tag screening module.

[0078] The multimodal information extraction module is used to perform preliminary processing on the original short video, including: extracting video auxiliary information of the short video, including text information (such as text extracted from titles, subtitles, comments, etc.) and image information (such as cover images, posters, etc.); performing OCR recognition on the extracted image information to obtain the text in each image information; and extracting multiple key frames from the short video.

[0079] The name tag recall module includes a face recognition unit and a fuzzy matching unit. The face recognition unit is used to use face recognition technology to identify people in each image information included in the video auxiliary information, and obtain the name of the face in each image information. It also uses face recognition technology to identify people in multiple extracted key frames and obtain the name of the face in the key frames. The fuzzy matching unit is used to use the name obtained in the key frames to match the name in each text information included in the video auxiliary information, and obtain the name contained in each text information.

[0080] The name label screening module is used to uniformly sort the output of the name label recall module, take the names corresponding to the faces in multiple key frames as label candidates, take the names in video auxiliary information such as titles and cover images as auxiliary labels, and combine the category labels of short videos to calculate the key person evaluation values ​​corresponding to the names corresponding to the faces in multiple key frames. Based on the evaluation values ​​of each key person, the names of the key persons are screened out, and the screened names of the key persons are used as the name labels of the short videos.

[0081] Based on the overall architecture diagram shown in FIG3 , the specific implementation process of the short video tag generation method provided in the embodiment of the present application is shown in FIG4 , which mainly includes the following steps:

[0082] S401: The server obtains the short video to be marked and obtains video auxiliary information.

[0083] In some examples, the video auxiliary information includes at least one of text information and image information. The text information includes but is not limited to text extracted from the title, subtitles, and comments of the short video, and the image information includes but is not limited to cover images, posters, and extracted key frames.

[0084] In some examples, the text information can be the original text associated with the short video (such as text extracted from the title of the short video), or it can be the text part extracted from the image information (such as text extracted from the cover image).

[0085] In some examples, the video auxiliary information includes at least one piece of text information, and different text information has different sources. For example, assuming that a piece of text information included in the video auxiliary information is text extracted from the title of a short video, the source of the text information is the title.

[0086] In some examples, the video auxiliary information includes at least one picture information, and different picture information has different information sources. For example, assuming that one picture information included in the video auxiliary information is a cover image, the information source of the picture information is the cover image.

[0087] S402: The server extracts multiple key frames from the short video, performs face recognition on each key frame to obtain recognition results corresponding to each key frame, and extracts the names corresponding to the corresponding key frames based on the obtained recognition results to obtain a candidate name set consisting of the names corresponding to the key frames.

[0088] In some examples, multiple key frames can be extracted from a short video at preset intervals. The number of frames extracted is positively correlated with the total length of the short video. That is, the longer the total length of the short video, the more key frames are extracted. The number of frames extracted each time can be a single frame or multiple consecutive frames.

[0089] Face recognition is performed on each extracted key frame. Taking a key frame as an example, as shown in Figure 5, in the specific implementation, a face detection algorithm is first used to obtain the face area image of the key frame. Considering that different characters in the key frame have different orientations, the face area image may be a side view of the face. To improve the accuracy of face recognition, the front face is generally used for recognition. Therefore, for the detected face area image, the key point detection algorithm is used to extract the feature points of the face in the face area image. The angle of the face is calculated based on the extracted face feature points, and the face is corrected based on the angle to obtain a front face area image. Feature extraction is then performed on the face area image. The extracted face features are compared with the face features of preset faces in the preset face library to obtain face similarity. The name corresponding to the preset face with the highest face similarity is used as the name corresponding to the face area image in the key frame.

[0090] It should be noted that the face recognition algorithm is now relatively mature, so it can accurately identify the faces in the key frames, ensuring the accuracy of name extraction.

[0091] In some examples, the face detection model in face recognition can use the retina-face model, and the face feature extraction process can use the resnet34 model.

[0092] In some examples, a set of candidate names may be obtained based on a name corresponding to at least one face in each key frame.

[0093] When performing face recognition on each key frame, the embodiment of the present application can not only identify the face in each key frame, but also obtain the confidence of the recognized face and the frame number of the key frame where the recognized face is located, as shown in Table 1.

[0094] Table 1. Face information corresponding to each candidate name.

[0095] One or more faces can be identified in a keyframe, and a face can appear in one or more keyframes. Therefore, the same name corresponding to the same face can be associated with multiple frame numbers, and different names can be associated with the same frame number. The confidence level of face recognition can indicate the accuracy of name extraction, and the confidence level ranges from 0 to 1.

[0096] In the embodiment of the present application, face recognition technology can be used to accurately identify the names of people in multiple extracted key frames. However, the names identified in multiple key frames are numerous and complex, and too many name tags are printed, resulting in redundant information and affecting the application of downstream businesses. Therefore, it is necessary to screen the candidate name set, extract the names of key people in the short video, and improve the purity of the name tags.

[0097] S403: The server extracts names from the video auxiliary information to obtain an auxiliary name set, where the auxiliary name set includes at least one name and a source of each name.

[0098] Since the labeling system not only needs to label short videos, but also needs to label them (such as IDs). Unlike the face recognition process of each key frame, which can label each candidate name through the frame number, the auxiliary names extracted from the video auxiliary information cannot be labeled. The names that appear in the video auxiliary information such as the cover image and title play a relatively important role in the name screening of key figures. Therefore, through fuzzy matching, the names in the video auxiliary information can be used as an auxiliary to the name labels to perform label screening on the candidate name set identified by face recognition. That is, it is determined whether the names in the candidate name set appear in the video auxiliary information, and then the source of the corresponding name is determined based on the source of the text information and picture information where the corresponding name appears.

[0099] As shown in Figure 6, the fuzzy matching process of name tags is mainly divided into two parts: text segmentation and string edit distance calculation.

[0100] The text segmentation component is used to extract names from video auxiliary information. In some examples, text extracted from the short video title and the text portion extracted from the cover image are input into the QQSeg segmentation tool to obtain the text segmentation results and the part of speech of each segmented word. From these segmented words, the person noun segmentations are selected. For example, in Figure 6, the person noun segmentations in the title are [b, e, f, g], and the person noun segmentations in the cover image text are [b, d, k].

[0101] The string edit distance calculation section is used to calculate the edit distance between each name in the candidate name set and the name in the text portion of the title and cover image, thereby determining whether the name appears in the title and cover image, and further determining whether the name source includes the text portion of the title and cover image. For example, in Figure 6, the names [b, e] in the candidate name set appear in the title of the short video, and the names [b, d] in the candidate name set appear in the cover image of the short video. This can be used to obtain an auxiliary name set, which contains the following names: b, e, and d. Among them, the name source of name b is the title and cover image, the name source of name e is the title, and the name source of name d is the cover image.

[0102] In an embodiment of the present application, names can be extracted from video auxiliary information to obtain an auxiliary name set. Since video auxiliary information contains multiple modal information such as pictures and texts, the method of extracting names is different for different modal information. Therefore, there can be multiple ways to generate the auxiliary name set.

[0103] Taking the video auxiliary information as text information as an example, as shown in Figure 7, the generation process of the auxiliary name set mainly includes the following steps:

[0104] S4031: In response to at least one text message included in the video auxiliary information, extract names from each text message to obtain the names included in each text message, and use the information sources of each text message as the name sources of each name included in the corresponding text message.

[0105] In the process of tagging short videos with names, whether the name appears in the title, comments, or subtitles of the short video provides an important basis for the importance of the name, so it is necessary to identify the name in the text information. At the same time, for each text information, the information source of the text information is used as the name source of each name identified from the text information.

[0106] Among them, the text extracted from the title, comments, subtitles, etc. of the short video is recorded as the original text associated with the short video, that is, the information is originally described in text and can be directly recognized by text.

[0107] In some examples, the cover image, poster, and other image information of a short video may contain not only images of people but also some text descriptions. These text descriptions also provide important basis for the importance of the person's name, so it is necessary to use OCR technology to recognize the text part of the image information, and use the recognized text part as the text information of the short video.

[0108] In some examples, the information sources of the text information included in the video auxiliary information include, but are not limited to: titles, comments, subtitles, text portions of cover images, text portions of posters, etc.

[0109] S4032: Obtain an auxiliary name set based on the names contained in each text information and the names' sources.

[0110] As shown in FIG8 , the main process of extracting a name from a text message is as follows:

[0111] S4031a, segmenting the text information;

[0112] S4031b. Traverse each name in the candidate name set and calculate the string edit distance between the name and each word.

[0113] Considering that not all characters are related to names, each segmented word in the text information can be further processed through fuzzy matching to obtain the noun segment of each segmented word.

[0114] Considering that the same person's name can have multiple forms (such as abbreviation, full name, alias, etc.), for example, a person's name 'aaa' may appear in the text as his full name 'bbbaaa', his alias 'cc', or mixed with punctuation 'bbb·aaa'. Therefore, directly determining whether the string of each name and each segmentation word is exactly the same may not accurately extract the name from the text. Therefore, in some examples, during the fuzzy matching process, the string edit distance between each name in the candidate name set and the segmentation word can be calculated to filter out the noun segmentation word from each segmentation word, that is, to determine whether each name appears in the text.

[0115] The formula for calculating the string edit distance is as follows:

[0116] Among them, A represents a person's name, B represents a word segmentation, x represents the character length of the person's name, and y represents the character length of the word segmentation.

[0117] In the embodiments of the present application, the string edit distance is used to characterize the degree of match between two strings. Specifically, for each name, the length of the name is compared to the length of any word segmentation character. If the character lengths of the two strings are different, the partial edit distance between the short string and the substring of the long string is calculated. When the partial edit distance is less than a preset distance threshold, it is determined that the short string and the substring of the long string match, that is, the short string appears in the long string. If the character lengths of the two strings are the same, the global edit distance between the two strings is calculated. When the global edit distance is less than the preset distance threshold, it is determined that the two strings match.

[0118] For example, the partial edit distance between 'bbb' and 'bbbaaa' is 0; the partial edit distance between 'mn' and 'mms' is 50.

[0119] It should be noted that the preset distance threshold in the embodiment of the present application can be set according to actual needs. For example, in some embodiments, the preset distance threshold is set to 80.

[0120] S4031c: Among the character string edit distances, the segmented words corresponding to the character string edit distances that meet the preset distance threshold requirement are used as the names of the people included in the text information.

[0121] In some examples, for each name in the candidate name set, the name may appear in the title or in the text part of the cover image, that is, the name may match one or more word segments whose string editing distance is less than a preset distance threshold. The matching word segments in the text information such as the title and the text part of the cover image are used as names in the auxiliary name set, and the name source of the corresponding name is determined based on the information source of the text information and image information in which each name appears.

[0122] For example, Figure 9 illustrates the process of extracting names from text information. Assume that the candidate name set includes Subject X, and the text information includes the text extracted from the short video title, "Subject X stars in a review of the unconventional plot of "Drama A," and the text portion of the cover image, "The plot is logical and reasonable, and Subject Xx and Subject Y perform perfectly." The word segmentation results for the text extracted from the title are: Subject X, starring, review, Drama A, unconventional, plot; and the word segmentation results for the text portion of the cover image are: plot, logical and reasonable, Subject X, Subject Y, performance, perfect. By calculating the string edit distance between Subject X and each segmented word, it is determined that Subject X appears in the text portion of the short video title and cover image. Therefore, Subject X is included in the auxiliary name set, and the text portion of the title and cover image is used as the source of Subject X's name.

[0123] In some examples, the picture information in the video auxiliary information (such as the cover image and poster of the short video, etc.) will also include pictures of the characters in the short video. Therefore, face recognition can be performed separately on each picture information contained in the video auxiliary information, and the names corresponding to the faces contained in each picture information can be identified as the names in the auxiliary name set, and the information source of the corresponding picture information can be used as the name source of the names corresponding to the faces contained in the corresponding picture information.

[0124] Taking the cover image of a short video as an example, as shown in Figure 10, it is a schematic diagram of the process of extracting names from image information. After face detection is performed on the cover image, two face area images are obtained. By correcting the two face area images, corresponding frontal face area images are obtained. Furthermore, feature extraction is performed on the two frontal face area images, and face recognition is performed based on the extracted face features. The names corresponding to the faces in each frontal face area image are determined to be: Object X and Object Y. The identified Object X and Object Y are directly used as names in the auxiliary name set, and the cover image is used as the name source of Object X and Object Y respectively.

[0125] S404: The server obtains the importance features of each name in the candidate name set based on the auxiliary name set, where the importance features of each name include a feature vector indicating the source of the corresponding name; and filters out the target name set from the candidate name set based on the importance features of each name.

[0126] In an embodiment of the present application, there are relatively rich characters in the multiple key frames extracted from the short video. Therefore, the names in the candidate name set can cover the characters in the short video more comprehensively, but may include some characters that are not very critical (such as supporting roles). The names in the auxiliary name set extracted from the cover image, the text part of the cover image, the title and other video auxiliary information are generally the names of key characters with high importance in the short video. Therefore, the names in the candidate name set can be used as candidates for short video labels, and the names in the auxiliary name set can be used as auxiliary to the short video labels. The names in each candidate name set can be sorted according to their importance, so as to screen out the target name set of key characters, and the names in the screened target name set can be used as name labels for the short video.

[0127] Among them, the screening process of the target name set can be executed through the target screening model built by the deep learning algorithm.

[0128] In some examples, the training process of the target screening model is shown in Figure 11 and mainly includes the following steps:

[0129] S4040_1: Generate a training sample set based on a preset short video set and video auxiliary information of each short video.

[0130] Each training sample contains a candidate sample name set, an auxiliary sample name set, and a real sample name label corresponding to a short video. The candidate sample name set includes multiple sample names, and the auxiliary sample name set includes at least one sample name and the name source of each sample name.

[0131] In a specific implementation, a preset short video set (e.g., 100,000 short videos) and auxiliary video information for each short video are obtained from a multimedia application. For each short video, a candidate sample name set is extracted from multiple key frames of the short video, and an auxiliary sample name set is extracted from the auxiliary video information of the short video. Each sample name in the candidate name set is labeled with a real sample name label to obtain a training sample.

[0132] Taking a sample name in a candidate sample name set as an example, when the sample name is the name of a key figure in the short video (such as a celebrity), the true sample name label corresponding to the sample name is 1. When the sample name is not the name of a key figure in the short video (such as the masses), the true sample name label corresponding to the sample name is 0.

[0133] In some examples, the screening model to be trained can be built using a multi-head-attention layer, with a normalization layer (Normal Layer) and an activation function (ReLU) inserted in the middle to extract the key character features of each sample name in the candidate sample name set. Finally, a fully connected (FC) layer and a softmax function are used to map the key character features of each sample name to the range of (0, 1) to obtain the key character evaluation value.

[0134] The embodiment of the present application is based on a target screening model of a multi-layer attention mechanism, which can comprehensively consider the origin of each name, fully learn the relationship between the names in the candidate name set and the names in the auxiliary name set, and can effectively filter out incorrect name labels, thereby enhancing the effectiveness of filtering and improving the accuracy of name label recall.

[0135] A short video typically contains multiple names corresponding to faces. To improve the stability of the sorting and filtering model, the number of names in the candidate name set in each training sample can be limited.

[0136] Taking a training sample in the training sample set as an example, the process of limiting the number of names in the candidate sample name set is shown in Figure 12, which mainly includes the following steps:

[0137] S4040_11: Obtain the number of names in the candidate sample name set corresponding to the training sample.

[0138] S4040_12: Compare the obtained quantity with the preset quantity threshold. If the quantity is greater than the preset quantity threshold, execute S4040_13. If the quantity is less than the preset quantity threshold, execute S4040_15. If the quantity is equal to the preset quantity threshold, execute S4040_17.

[0139] S4040_13: Select some sample names from the candidate sample name set corresponding to the training sample based on the number of frames in which each name in the candidate sample name set corresponding to the training sample appears in the corresponding short video.

[0140] S4040_14: Update the training sample set based on the selected sample names.

[0141] S4040_15: Increase the number of names in the candidate sample name set corresponding to the training sample by padding the vector with zeros.

[0142] S4040_16: Update the training sample set based on the added zero vector.

[0143] S4040_17: Keep the training sample set unchanged.

[0144] For example, as shown in Figure 13, assuming that the preset number threshold is 12, and the number of names corresponding to short video 1 is greater than 12, the number of frames in which each name appears in short video 1 is counted, and the 12 names with the largest number of frames are retained as the names in the candidate sample name set corresponding to the first training sample; if the number of names corresponding to short video 2 is less than 12, then by adding 3 zero vectors, the candidate sample name set of the second training sample contains 12 candidate names; if the number of names corresponding to short video 3 is equal to 12, then these 12 names are directly used as the names in the candidate sample name set of the third training sample.

[0145] S4040_2: Based on the training sample set, perform multiple rounds of iterative training on the screening model to be trained to obtain the target screening model.

[0146] As shown in Figure 14, this is a schematic diagram of the network structure of the screening model. The model is built with three attention layers, and there are 12 names in the candidate sample name set corresponding to each training sample.

[0147] Based on the network structure of the screening model to be trained as shown in FIG14 , multiple rounds of iterative training are performed using the above training sample set to obtain a converged target screening model, wherein each round of iteration performs the following operations on one training sample in the training sample set:

[0148] S4040_21: Based on the auxiliary sample name set corresponding to the training sample, obtain the importance features of each sample name in the candidate sample name set corresponding to the training sample, the importance features of each sample name including a feature vector indicating the source of the corresponding sample name.

[0149] In some examples, the sample names in the auxiliary sample name set are generally the names of key figures. For short videos, these names are relatively important. Therefore, based on the auxiliary sample name set corresponding to each short video, the importance characteristics of each sample name in the candidate sample name set corresponding to the short video can be extracted.

[0150] S4040_22: Using multiple attention layers and normalization layers, based on the importance features of each name in the candidate sample name set corresponding to the training sample, obtain the predicted sample name label of the corresponding sample name.

[0151] The target screening model uses a neural network to extract name information from input data. In order to reduce the complexity of the model, in some examples, the feature vector indicating the source of each sample name can be represented by a multi-dimensional binary vector to obtain the importance feature of the corresponding name.

[0152] S4040_23: Use the mean square error loss function to obtain the label loss value based on the predicted sample name label and the true sample name label of each sample name in the candidate sample name set corresponding to the training sample.

[0153] In some examples, the mean square error (MSE) loss function is used to supervise the training of the screening model to obtain the label loss value of each sample name. The MSE loss function formula is as follows: loss(z i ,z′ i )=(z i -z′ i ) 2 Formula 2

[0154] Among them, z i Represents the predicted sample name label of a sample name, that is, the key person evaluation value in practical applications, z′ i Represents the true sample name label of a sample name.

[0155] S4040_24: Adjust the network parameters of the screening model to be trained based on the label loss value.

[0156] In actual applications, based on the trained target screening model, name labels for short videos are screened from the candidate name set. The specific screening process is shown in Figure 15 and mainly includes the following steps:

[0157] S4041: Based on the auxiliary name set, obtain the name source of each name in the candidate name set.

[0158] For example, a name in the candidate name set is matched against each name in the auxiliary name set. The name source of the matching name in the auxiliary name set is used as the name source of the current name. If all or part of the characters in the name are identical to any name in the auxiliary name set, the two names are considered a match.

[0159] S4042: Based on the name sources of each name in the candidate name set, a feature vector indicating the name source of the corresponding name is obtained, and the feature vector indicating the name source of the corresponding name is added to the importance feature of the corresponding name; the feature vector indicating the name source of the corresponding name includes feature values ​​corresponding to multiple name sources, wherein the feature value corresponding to each name source included in the name source of the corresponding name is set to a first value (such as 1), and the feature value corresponding to each name source not included in the name source of the corresponding name is set to a second value (such as 0).

[0160] Taking the video auxiliary information including text information as the text extracted from the title of the short video and the text part of the cover image of the short video, and the image information included in the video auxiliary information as the cover image as an example, for each name in the candidate name set, a 3-dimensional binary vector is used to represent the feature vector indicating the face source of the name.

[0161] Taking a person's name as an example, the feature vector indicating the facial source of the name is [0,1,1], where 0 means that the name does not appear in the title of the short video, and the clear name source does not include the title. The first 1 means that the name appears in the facial part of the cover image of the short video, and the name source includes the cover image. The second 1 means that the name appears in the text part of the cover image of the short video, and the name source includes the text part of the cover image.

[0162] In the embodiments of the present application, when extracting a set of candidate names by performing face recognition on multiple extracted key frames, the face recognition results also include the confidence level of the recognized faces, as shown in Table 1. Because the confidence level of a face can represent the accuracy of name extraction, and the accuracy of name extraction directly affects the accuracy of name labeling, the importance feature corresponding to each name also includes the confidence level of the face.

[0163] In some examples, based on the recognition results of each key frame, the confidence of the face recognized in the corresponding key frame is obtained, and the confidence of the face corresponding to each name is added to the importance feature of the corresponding name.

[0164] In some embodiments, the confidence level of a face is represented by a 9-dimensional binary vector. In specific implementations, the confidence level of each face recognition is between 0 and 1, and the confidence level interval [0, 1] is evenly divided into 10 segments from low to high: [0, 0.1), [0.1, 0.2), [0.2, 0.3), [0.3, 0.4), [0.4, 0.5), [0.5, 0.6), [0.6, 0.7), [0.7, 0.8), [0.8, 0.9), [0.9, 1], where each segment occupies one dimension.

[0165] Taking a person's name as an example, the confidence score of the face corresponding to the name is 0.85, which is the 9th segment. The value of the 8th dimension is 1, and the value of the other dimensions is 0, that is, [0,0,0,0,0,0,0,0,1,0].

[0166] In the embodiment of the present application, when extracting a set of candidate names by performing face recognition on multiple extracted key frames, the face recognition results also include the frame numbers of the key frames where the recognized faces are located, as shown in Table 1. Since the frame numbers of the key frames can represent the frequency with which names appear in a short video, and names with higher frequency of appearance are more likely to be the names of key figures in the short video, the importance feature corresponding to each name also includes the frame number of the key frame.

[0167] In some examples, based on the recognition results of each key frame, the frame number of the key frame where the face corresponding to each candidate name is located is obtained, and the frame number corresponding to each candidate name is added to the importance feature of the corresponding candidate name.

[0168] Taking the extraction of 60 key frames as an example, a 60-dimensional binary vector can be used to represent the frame number of the key frame, where each key frame corresponds to a dimension. When the vector value of the dimension is 1, it means that the person's name appears in the key frame corresponding to the frame number of the dimension. When the vector value of the dimension is 0, it means that the candidate's name does not appear in the key frame corresponding to the frame number of the dimension.

[0169] In practical applications, famous people generally have a certain image. For example, idol actors generally do not become key characters in comedies. Therefore, in some embodiments, the importance feature of each name also includes the video category of the short video. Specifically, after obtaining the short video, the classification model trained in the labeling system is used to identify the video category of the short video and add the video category to the importance feature of each name.

[0170] In some examples, video categories can be represented by multi-dimensional binary vectors.

[0171] For example, suppose there are 31 video categories, including movies, TV series, anime, variety shows, sports, and news. These categories are represented by 31-dimensional binary vectors, with each dimension representing a video category. For example, a 31-dimensional binary vector [1, 0, 0, ... 0] (with 30 dimensions set to 0) indicates that the short video is a movie.

[0172] S4043: Based on the obtained importance features of each name, obtain a key person evaluation value of the corresponding name.

[0173] The importance features of each name are input into the trained target screening model, which then outputs a key person evaluation value for the corresponding name. The larger the key person evaluation value, the more likely the candidate name is to be the name tag in the short video.

[0174] Taking the process of determining the key person evaluation value of a person's name as an example, as shown in Figure 16, the importance features of each name are represented by a 103-dimensional binary vector. Dimensions 0-30 represent the video category of the short video corresponding to the name, dimensions 31-90 represent the frame number in which the name appears in the 60 extracted key frames, and dimensions 91-93 represent the name source. Based on the name source, it can be determined whether the name appears in the short video title, the text portion of the cover image, or the face portion of the cover image. Dimensions 94-102 represent the confidence level of the face corresponding to the name. These 103-dimensional importance features are input into the target screening model, and through three layers of attention, normalization, and activation functions, the key person evaluation value corresponding to the name is obtained.

[0175] S4044: Based on the obtained evaluation values ​​of each key person, a target name set is screened from the candidate name set.

[0176] In some examples, the key person evaluation values ​​of each name are sorted, and the names corresponding to the first K (K≥1) key person evaluation values ​​are output as target names to obtain a target name set.

[0177] In other examples, an evaluation threshold can be pre-set based on actual needs. The current key person evaluation value is compared with the preset evaluation threshold. If the current key person evaluation value is greater than or equal to the preset evaluation threshold, the name corresponding to the key person evaluation value is output as a target name. Otherwise, the name is not output. After each name in the candidate name set is compared with the preset evaluation threshold, a target name set is obtained.

[0178] S405: The server uses each name in the target name set as a name tag for the short video.

[0179] After selecting the name of at least one key person from the candidate name set, the selected at least one name is used as a name tag for the short video, thereby completing the name tagging of the short video.

[0180] See Figure 17, which is a schematic diagram of the overall process of tagging short videos with names, wherein the video auxiliary information of the short video is the text and cover image extracted from the title, and 60 key frames are extracted from the short video. First, face recognition is performed on each key frame to obtain the name corresponding to the recognized face, and the name obtained in each key frame is used as a candidate for the name label; then, OCR recognition is used to extract the text in the cover image, and the title "Subject X starred in, reviewing the anti-routine plot of "Drama A"" and the text part of the cover image "The plot is reasonable, and Subject Xx and Subject Y performed perfectly" are segmented. By fuzzy matching with the names in the key frames, the names appearing in the text part of the title and cover image are obtained. At the same time, face recognition is performed on the cover image to obtain the name of the face in the cover image; finally, the names extracted from the cover image and the names extracted from the title are used as the names in the auxiliary name set obtained by screening the names in the key frames. The correlation between the names is learned through a multi-layer attention mechanism to purify the names in the candidate name set and obtain names that can be used as name labels for short videos.

[0181] The short video label generation method provided in the embodiment of the present application, in the process of labeling short videos with names, extracts a set of candidate names from multiple key frames extracted from the short video to obtain the candidate name labels of the short video. Since the names in the candidate name set are numerous and complex and cannot be used directly as name labels, a screening method based on multimodal information extraction and fusion is designed, and video auxiliary information of multiple modalities such as titles and cover images is introduced. Since these video auxiliary information generally contain key figures in the short video, they provide an important basis for screening target name labels, so as to screen out correct name labels from the candidate name set, thereby improving the recall rate of name labels; at the same time, in the screening process, a multi-layer attention mechanism is introduced, which can fully learn the candidate names and the auxiliary names extracted from the video auxiliary information, as well as the relationship between the candidate names, and can well filter out incorrect name labels, thereby improving the accuracy of the video labeling system.

[0182] After accurately tagging short videos with names, the name tags can be used in downstream services (such as video recommendation, video search, and video distribution). Specifically, the server responds to a target service request and matches the target name associated with the target service request with the name tags of each short video in the multimedia application. Based on the matching results, the server displays at least one matching target short video to the target user.

[0183] Taking video search as an example, as shown in Figure 18, the target user enters the name "Object X" in the search bar of a multimedia application and clicks the "Search" option. The terminal device then sends a search request to the multimedia application's server, carrying the name "Object X" entered by the target user. Using the aforementioned screening method based on multimodal information extraction and fusion, the server has already pre-tagged each short video in the short video collection with a name. Upon receiving the search request, the server matches "Object X" with the name tags of each short video in the collection, obtains Short Videos 1 and 2 related to Object X, and displays Short Videos 1 and 2 to the target user via the terminal device.

[0184] In actual applications, by accurately tagging short videos with names, downstream businesses can quickly and accurately respond to short videos of people that the target object likes, thereby improving the response effect of downstream businesses and enhancing the target object's experience of using multimedia applications.

[0185] Based on the same technical concept, an embodiment of the present application provides a structural schematic diagram of a short video tag generation device, which can implement the above-mentioned short video tag generation method and achieve the same technical effect.

[0186] 19 , the generating device includes: a multimodal information acquisition module 1901, a candidate name extraction module 1902, an auxiliary name extraction module 1903, a name screening module 1904, and a label generation module 1905, wherein:

[0187] The multimodal information acquisition module 1901 is used to acquire the video to be marked and acquire video auxiliary information, wherein the video auxiliary information includes at least one of text information and image information;

[0188] The candidate name extraction module 1902 is configured to extract a plurality of key frames from the video, perform face recognition on each key frame to obtain recognition results for each key frame, and extract the names corresponding to the key frames based on the obtained recognition results to obtain a candidate name set consisting of the names corresponding to the key frames;

[0189] An auxiliary name extraction module 1903 is configured to extract names from the video auxiliary information to obtain an auxiliary name set, wherein the auxiliary name set includes at least one name and a source of each name;

[0190] Name screening module 1904 is configured to obtain, based on the auxiliary name set, an importance feature of each name in the candidate name set, wherein the importance feature of each name includes a feature vector indicating the source of the corresponding name; and to screen a target name set from the candidate name set based on the importance feature of each name;

[0191] The label generation module 1905 is used to use each name in the target name set as a name label of the video.

[0192] The video tag generation device provided by the embodiment of the present application takes into account that the names contained in the video auxiliary information such as the video title and cover image are of high importance, but there may be a problem of incomplete names of key figures, and the names in each video frame contained in the video are numerous and complex. Therefore, a candidate name set can be obtained based on multiple key frames extracted from the video, and the candidate name set can be used to enrich the names in the video auxiliary information such as the title and cover image. At the same time, the names in the video auxiliary information such as the title and cover image are used as auxiliary to the important names in the key frames to obtain an auxiliary name set, thereby making full use of the importance of the names in the video auxiliary information such as the title and cover image, screening the name labels in multiple key frames, improving the purity of the name labels, and thereby improving the accuracy of the downstream business corresponding to the name labels.

[0193] Based on the same inventive concept as the above-mentioned method embodiment, an electronic device is also provided in an embodiment of the present application. In one embodiment, the electronic device may be the server in Figure 1 . In this embodiment, the structure of the electronic device may be as shown in Figure 20 , including a memory 2001, a communication module 2003, and one or more processors 2002.

[0194] Memory 2001 is used to store computer programs executed by processor 2002. Memory 2001 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and programs required for running instant messaging functions, while the data storage area may store various instant messaging messages and operating instruction sets.

[0195] Memory 2001 may be a volatile memory, such as random-access memory (RAM); a non-volatile memory, such as read-only memory, flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or any other medium capable of carrying or storing a desired computer program in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 2001 may be a combination of the aforementioned memories.

[0196] The processor 2002 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 2002 is configured to implement the above-mentioned video tag generation method when calling the computer program stored in the memory 2001 .

[0197] The communication module 2003 is used to communicate with terminal devices and other servers.

[0198] The specific connection medium between the memory 2001, communication module 2003, and processor 2002 is not limited in the embodiments of the present application. In Figure 20, the embodiment of the present application shows that the memory 2001 and processor 2002 are connected via bus 2004. Bus 2004 is depicted as a bold line in Figure 20. The connection methods between other components are merely schematic and are not intended to be limiting. Bus 2004 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Figure 20 depicts only one bold line, but does not represent only one bus or one type of bus.

[0199] The memory 2001 stores a computer storage medium, which stores computer executable instructions for implementing the video tag generation method of the embodiment of the present application. The processor 2002 is used to execute the steps of the above-mentioned video tag generation method.

[0200] In some possible implementations, various aspects of the video tag generation method provided in the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to perform the steps of the video tag generation method according to various exemplary embodiments of the present application described above in this specification.

[0201] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0202] The program product of the embodiment of the present application may be a portable compact disc read-only memory (CD-ROM) and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with a command execution system, apparatus, or device.

[0203] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a readable computer program. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with a command execution system, apparatus, or device.

[0204] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0205] The computer program for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The computer program can be executed entirely on the electronic device, partially on the electronic device, as a separate software package, partially on the electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (for example, using an Internet service provider to connect through the Internet).

[0206] It should be noted that although several units or subunits of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, depending on the embodiment of the application, the features and functions of two or more units described above can be embodied in a single unit. Conversely, the features and functions of a single unit described above can be further divided and embodied by multiple units.

[0207] Furthermore, although the operations of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0208] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0209] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.

[0210] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0211] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0212] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A method for generating a video tag, the method being executed by a server, the method comprising: Acquire a video to be marked, and acquire video auxiliary information, wherein the video auxiliary information includes at least one of text information and picture information; Extracting multiple key frames from the video, performing face recognition on each key frame to obtain recognition results corresponding to each key frame, and extracting names corresponding to corresponding key frames based on each recognition result to obtain a candidate name set consisting of names corresponding to each key frame; Extracting names from the video auxiliary information to obtain an auxiliary name set, wherein the auxiliary name set includes at least one name and a source of each name; Based on the auxiliary name set, obtaining importance features of each name in the candidate name set, wherein the importance features of each name include a feature vector indicating a source of the corresponding name; and based on the importance features of each name, selecting a target name set from the candidate name set; Each name in the target name set is used as a name label of the video.

2. The method of claim 1, wherein: The step of extracting names from the video auxiliary information to obtain an auxiliary name set includes the following operations: In response to at least one piece of text information being included in the video auxiliary information, extracting names from each piece of text information to obtain names contained in each piece of text information, and using the information source of each piece of text information as the name source of each name contained in the corresponding text information; wherein the at least one piece of text information includes the original text associated with the video and the text part extracted from the picture information; Based on the names contained in each piece of text information and the sources of the corresponding names, an auxiliary name set is obtained.

3. The method according to claim 2, wherein: Extract a person's name from a text message, including: Segmenting the text information; Traversing each name in the candidate name set, and calculating the string edit distance between the name and each word; Among the character string edit distances, the word segment corresponding to the character string edit distance that meets the preset distance threshold requirement is used as the name of the person included in the piece of text information.

4. The method of claim 2, wherein: The extracting of names from the video auxiliary information to obtain an auxiliary name set also includes the following operations: In response to at least one picture information being included in the video auxiliary information, face recognition is performed on each picture information to obtain a recognition result corresponding to each picture information, and a name corresponding to the corresponding picture information is extracted based on each obtained recognition result, and the information source of each picture information is used as a name source of each name corresponding to the corresponding picture information; Based on the names corresponding to the image information and the names' sources, an auxiliary name set is obtained.

5. The method of claim 1, wherein: The obtaining, based on the auxiliary name set, the importance characteristics of each name in the candidate name set includes: Based on the auxiliary name set, obtaining the name source of each name in the candidate name set; Based on the name sources of each of the names, a feature vector indicating the name sources of the corresponding names is obtained, and the feature vector indicating the name sources of the corresponding names is added to the importance feature of the corresponding names; the feature vector indicating the name sources of the corresponding names includes feature values ​​corresponding to multiple name sources, wherein the feature value corresponding to each name source included in the name source of the corresponding name is set to a first value, and the feature value corresponding to each name source not included in the name source of the corresponding name is set to a second value.

6. The method of claim 1, wherein: The process of obtaining the importance features of the names of the persons further includes at least one of the following operations: Based on the recognition results of the key frames, the confidence of the face recognized in the corresponding key frame is obtained, and the confidence of the face corresponding to each name is added to the importance feature of the corresponding name; Based on the recognition results of the key frames, the frame numbers of the key frames where the faces corresponding to the names are located are obtained, and the frame numbers corresponding to the names are added to the importance features of the corresponding names.

7. The method of claim 1, wherein: The process of obtaining the importance features of each name also includes the following operations: The video category of the video is identified, and the video category is added to the importance feature of each of the names.

8. The method according to any one of claims 1, 6 and 7, wherein: The step of selecting a target name set from the candidate name set based on the importance characteristics of each name includes: Based on the importance characteristics of each name, obtain a key person evaluation value of the corresponding name; Based on the key person evaluation value of each name, a target name set is screened out from the candidate name set.

9. The method according to claim 8, wherein: The screening process of the target name set is performed through a target screening model.

10. The method of claim 9, wherein: The target screening model is trained in the following way: Based on a preset video set and video auxiliary information of each video, a training sample set is generated, wherein each training sample in the training sample set includes a candidate sample name set, an auxiliary sample name set and a real sample name label corresponding to a video; the candidate sample name set includes multiple sample names; the auxiliary sample name set includes at least one sample name and the name source of each sample name; Based on the training sample set, multiple rounds of iterative training are performed on the screening model to be trained to obtain the target screening model, wherein each round of iteration performs the following operations on a training sample in the training sample set: Based on the auxiliary sample name set corresponding to the one training sample, obtaining the importance feature of each sample name in the candidate sample name set corresponding to the one training sample, wherein the importance feature of each sample name includes a feature vector indicating the source of the corresponding sample name; Using multiple attention layers and normalization layers, based on the importance characteristics of each sample name, obtain the predicted sample name label of the candidate sample name set corresponding to the one training sample; Using a mean square error loss function, based on the predicted sample name labels and the actual sample name labels of the candidate sample name set corresponding to the one training sample, a label loss value is obtained; Based on the label loss value, the network parameters of the screening model to be trained are adjusted.

11. The method of claim 10, wherein: After generating the training sample set and before model training, the method further includes: For each training sample in the training sample set, the following operations are performed respectively: Get the number of sample names in the candidate sample name set corresponding to a training sample; If the number is greater than a preset number threshold, based on the number of frames in which each sample name in the candidate sample name set corresponding to the one training sample appears in the corresponding video, select some sample names in the candidate sample name set corresponding to the one training sample; If the number is less than the preset number threshold, increasing the number of sample names in the candidate sample name set corresponding to the one training sample by means of a zero-filling vector; The training sample set is updated based on the selected partial sample names or the added zero vectors.

12. The method according to any one of claims 1 to 7, wherein: After obtaining the name tag of the video, the method further includes: Responding to the target service request, and matching the target person name associated with the target service request with the name tags of each video in the multimedia application; Based on each obtained matching result, at least one matching target video is displayed to the target object.

13. The method according to any one of claims 1 to 7, wherein: The text information includes at least one of the title, subtitles, and comments of the video; The picture information includes at least one of a cover image and a poster of the video.

14. A video tag generation device, applied to a server, comprising: A multimodal information acquisition module, used to acquire a video to be marked and acquire video auxiliary information, wherein the video auxiliary information includes at least one of text information and picture information; A candidate name extraction module is used to extract multiple key frames from the video, perform face recognition on each key frame to obtain a recognition result corresponding to each key frame, and extract the name corresponding to the corresponding key frame based on each recognition result to obtain a candidate name set consisting of the names corresponding to each key frame; An auxiliary name extraction module, used to extract names from the video auxiliary information to obtain an auxiliary name set, wherein the auxiliary name set includes at least one name and a source of each name; a name screening module, for obtaining, based on the auxiliary name set, respective importance features of the names in the candidate name set, wherein the respective importance features of the names include feature vectors indicating the source of the corresponding names; and screening out a target name set from the candidate name set based on the respective importance features of the names; The label generation module is used to use each name in the target name set as a name label of the video.

15. An electronic device comprising a processor and a memory, wherein: The memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to perform the steps of any one of the methods of claims 1-13.

16. A computer-readable storage medium comprising a computer program, wherein when the computer program is run on an electronic device, the computer program is used to cause the electronic device to execute the steps of the method according to any one of claims 1 to 13.

17. A computer program product, comprising a computer program, wherein the computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs the steps of any of the methods described in claims 1-13.

Citation Information

Patent Citations

  • Method for determining video label, server and storage medium

    CN111314732A

  • Video tag generation method and device, electronic equipment and storage medium

    CN111831854A

  • Label identification method and device

    CN113407778A

  • Short video tag determination method, system and device and storage medium

    CN114297439A

  • Video tag generation method and device, electronic equipment and storage medium

    CN116975363A

Cited By

  • Video recommendation method and system based on large language model, electronic equipment and storage medium

    CN119537701A