Video tag generation method, video processing method, device and storage medium
By evaluating the importance of the video to decide whether to generate a tag, the problem of inapplicability of video tag generation in the existing technology is solved, the accuracy of video recommendation and advertisement delivery is improved, and the user experience is improved.
Patent Information
- Application Number
- CN202210194529.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-03-01
Smart Images

Figure CN114661944B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to artificial intelligence (AI), and in particular to a video tag generation method, a video processing method, a device, and a storage medium. Background Art
[0002] In the fields of video recommendation, video retrieval, video advertising, etc., video tags determine the accuracy of these applications. For example: in the field of video recommendation, electronic devices can effectively summarize the video vertical categories that users are interested in based on video tags, and subsequently recommend videos with the same or similar tags to users; in the field of video retrieval, video tags can directly determine the accuracy of retrieval results; in the field of video advertising, video tags play a role in accurately locating users, associating advertisements and delivery of content that users are interested in, and achieving precise and personalized advertising.
[0003] The current video tag generation method is based on a multimodal tag classification model of vision and text to generate corresponding tags for videos. However, the generated tags may not be suitable for video recommendation, video retrieval, and video advertising. For example, in the automobile vertical category, if a video is labeled Toyota, users are more inclined to see exhibitions and driving videos about Toyota cars in video recommendations, and do not want to see driving skills about Toyota cars. Based on this, the video tags generated by the current video tag generation method may lead to low accuracy in video recommendation, video retrieval, and video advertising. Summary of the invention
[0004] The present application provides a video tag generation method, a video processing method, a device and a storage medium, so as to improve the accuracy of video recommendation, video retrieval, video advertising delivery, etc., and thus improve the user experience.
[0005] In a first aspect, the present application provides a video tag generation method, including: obtaining a video tag generation task and a test video; determining the importance of the test video to the video tag generation task; and determining whether to perform the video tag generation task for the test video based on the importance of the test video to the video tag generation task.
[0006] In a second aspect, the present application provides a video processing method, comprising: obtaining at least one video, and determining whether to perform a video tag generation task for each video according to the first aspect or an optional method of the first aspect; and processing at least one video according to the tag result of at least one video.
[0007] In a third aspect, a video label generation device is provided, comprising: a first acquisition module, a first determination module and a second determination module, wherein the first acquisition module is used to acquire a video label generation task and a test video; the first determination module is used to determine the importance of the test video to the video label generation task; and the second determination module is used to determine whether to execute the video label generation task for the test video based on the importance of the test video to the video label generation task.
[0008] In a fourth aspect, a video processing device is provided, comprising: an acquisition module, a first processing module and a second processing module, wherein the acquisition module is used to acquire at least one video; the first processing module is used to determine whether to perform a video tag generation task for each video according to the first aspect or an optional method of the first aspect; and the second processing module is used to process at least one video according to the tag result of at least one video.
[0009] In a fifth aspect, an electronic device is provided, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the method in the first aspect, the second aspect or their respective implementations.
[0010] In a sixth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method in the first aspect, the second aspect or any implementation thereof.
[0011] In a seventh aspect, a computer program product is provided, comprising computer program instructions, wherein the computer program instructions enable a computer to execute the method in the first aspect, the second aspect or any implementation thereof.
[0012] In an eighth aspect, a computer program is provided, which enables a computer to execute the method in the first aspect, the second aspect or each implementation manner thereof.
[0013] Through the technical solution provided by this application, the electronic device can determine whether to perform the video tag generation task for the test video according to whether the test video is important for the video tag generation task. This can improve the accuracy of video recommendation, video retrieval, video advertising delivery, etc., and further improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0015] Figure 1A flowchart of a method for generating video tags provided in an embodiment of the present application;
[0016] Figure 2 A flowchart of another method for generating video tags provided in an embodiment of the present application;
[0017] Figure 3 A flowchart of another method for generating video tags provided in an embodiment of the present application;
[0018] Figure 4 A flowchart of another method for generating video tags provided in an embodiment of the present application;
[0019] Figure 5 A flowchart of a video processing method provided in an embodiment of the present application;
[0020] Figure 6 A schematic diagram of a video tag generating device 600 provided in an embodiment of the present application;
[0021] Figure 7 A schematic diagram of a video processing device 700 provided in an embodiment of the present application;
[0022] Figure 8 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0025] Before introducing the technical solution of this application, the relevant knowledge of the technical solution of this application will be explained below:
[0026] Video tag: a tag for a video, which is used to facilitate subsequent video recommendations, video retrieval, video advertising, etc. A video can include at least one first-level tag. For example, the first-level tag of a video is "car show", and the second-level tag is "car show of a certain car". The first-level tag is the coarsest category to which the video belongs under the corresponding vertical category of the video, which can be "car show", "vehicle maintenance", "car anecdotes", etc. These first-level tags are usually provided directly by the user who uploaded the video on the video client, or identified by the video general tag service. Based on this, the second-level tag is a relatively finer category to which the video belongs under the first-level tag. The higher the level of the tag, the finer the category to which the corresponding video belongs.
[0027] The technical problems and inventive concepts to be solved by this application are described below:
[0028] At present, the video tag generation method is implemented based on the multimodal tag classification model of vision and text, as follows: the electronic device extracts frames from the video content, wherein the electronic device can extract a fixed number of frames randomly or at equal intervals; further, the electronic device can forward through the backbone network (backbone) to obtain the local feature vector of each extracted frame; all the local feature vectors obtained in the previous step are sent to the feature clustering module as a whole for inter-frame feature fusion to obtain the video global feature vector; some methods will also extract the image-level features of each video frame separately, and fuse them with the local feature vector above; or extract the text features of the video title, and fuse them with the global feature vector above; finally, multi-label classification is performed based on the global feature vector, that is, the video label is generated. However, the generated labels may not be suitable for video recommendation, video retrieval, and video advertising. For example, in the automobile vertical category, assuming that the label of a video is Toyota, in the video recommendation, users are more inclined to see exhibitions and maintenance of Toyota cars, etc., and do not want to see driving skills of Toyota cars, etc. For another example: suppose that in the automobile vertical category, video 1 shows the side parking skills, and video 2 shows the uniform style of police cars. However, based on the existing label generation method, the electronic device labels video 1 as Volkswagen Jetta and video 2 as Toyota Prado. If a user uses a specific car model as a search condition for video retrieval, the user's original purpose is to learn about the exhibition or maintenance video of the car, so it is more appropriate to have the exhibition video or vehicle maintenance video of the corresponding car model in the search results; and if the side parking skills shown in the above video 1 or the uniform style of police cars shown in video 2 appear, the user experience will be greatly reduced. Based on this, the video tags generated by the current video tag generation method may result in low accuracy in video recommendation, video retrieval, and video advertising.
[0029] In order to solve the above technical problems, the present application considers the importance of the video to the video tag generation task, that is, based on the importance of the tag of the video generated by the video tag generation task in the video, and determines whether to perform the video tag generation task for the video based on the importance. In other words, assuming that a certain video is not important for the video tag generation task, then the electronic device does not need to generate a tag for the video under the video tag generation task, and will not recommend, retrieve or deliver the video in subsequent video recommendation, video retrieval, and video advertising delivery.
[0030] It should be understood that the video tag generation method provided in the present application can be applied to fields such as video recommendation, video retrieval, and video advertising, but is not limited thereto.
[0031] This application relates to AI technology, which 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.
[0032] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0033] Computer Vision (CV) is a science that studies how to make machines "see". To put it more specifically, it refers to the use of cameras and computers to replace human eyes to identify, track and measure targets, and further perform graphics processing so that the computer processes the images into images that are more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and mapping, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.
[0034] The technical solution of this application will be described in detail below:
[0035] Figure 1 A flowchart of a method for generating video tags provided in an embodiment of the present application, which can be executed by electronic devices such as desktop computers, laptop computers, tablet computers, cloud servers, etc., includes:
[0036] S110: Obtain a video label generation task and a test video;
[0037] S120: Determine the importance of the test video for the video label generation task;
[0038] S130: Determine whether to execute the video tag generation task for the test video according to the importance of the test video to the video tag generation task.
[0039] It should be understood that the video tag generation task refers to the task of generating a certain type of tag. For example, in the automobile vertical category, the task of generating automobile style tags.
[0040] It should be understood that the test video can be any video, and this application does not impose any limitation on this.
[0041] It should be understood that the importance of the test video to the video label generation task can also be referred to as the importance of the label of the test video generated based on the video label generation task in the test video. For example: Assume that the video label generation task is a task to generate car style labels under the car vertical category, and the test video is the above-mentioned video 1, which shows the side parking skills. The label of the video 1 generated based on the task is Volkswagen Jetta. Based on this, in this application, the importance of the video 1 for the task of generating car style labels under the car vertical category is considered, that is, the importance of Volkswagen Jetta in video 1 is considered.
[0042] Optionally, if the test video is important for the video tag generation task, it is determined to perform the video tag generation task for the test video; if the test video is not important for the video tag generation task, it is determined not to perform the video tag generation task for the test video. In other words, if the test video is important for the video tag generation task, a tag for the test video under the video tag generation task is generated; if the test video is not important for the video tag generation task, a tag for the test video under the video tag generation task is not generated.
[0043] For example, suppose the video label generation task is to generate car style labels under the car vertical category, and the test video is the above-mentioned video 1, which shows the parallel parking technique. The label of video 1 generated based on the task is Volkswagen Jetta. Suppose the electronic device determines that video 1 is not important for the task, then the electronic device does not need to generate the label Volkswagen Jetta for video 1.
[0044] In summary, in this application, the electronic device can determine whether to perform the video tag generation task for the test video based on whether the test video is important for the video tag generation task. In other words, if a video is not important for the video tag generation task, then the electronic device does not need to generate a tag for the video under the video tag generation task, and will not recommend, retrieve or place the video during subsequent video recommendation, video retrieval, and video advertising delivery, thereby improving the accuracy of video recommendation, video retrieval, video advertising delivery, etc., and thus improving the user experience.
[0045] Figure 2 A flowchart of another method for generating video tags provided in an embodiment of the present application, which can be executed by electronic devices such as desktop computers, laptop computers, tablet computers, cloud servers, and vehicle-mounted terminals, includes:
[0046] S210: Obtaining a video label generation task and a test video;
[0047] S220: Obtain a video training set and a video title set;
[0048] S230: Obtaining attributes of each video in the video training set;
[0049] S240: Dividing the video training set into a first video subset and a second video subset according to the attributes of each video in the video training set and the video label generation task;
[0050] S250: Determine the importance of the test video for the video tag generation task according to the first video subset, the second video subset, and the video title set;
[0051] S260: Determine whether to perform the video tag generation task for the test video according to the importance of the test video to the video tag generation task.
[0052] It should be understood that the video training set includes at least one video. The video title set consists of the titles of each video in the video training set.
[0053] It should be understood that the attributes of each video in the first video subset are not important to the video tag generation task, and the attributes of each video in the second video subset are important to the video tag generation task.
[0054] Optionally, the attribute of each video is any of the following: the Nth level label, type, and duration of the video, where N is a positive integer.
[0055] For example, assuming that the attribute of each video is the primary label of the video, and the video label generation task is to generate a car style label under the car vertical category, since the primary labels such as "driving skills" and "car model" are not important for the task of generating car style labels under the car vertical category, the electronic device can form the videos with these primary labels in the video training set into a first video subset. And since the primary labels such as "driving show" and "vehicle maintenance" are important for the task of generating car style labels under the car vertical category, the electronic device can form the videos with these primary labels in the video training set into a second video subset.
[0056] Optionally, in the present application, manual labeling may be used to label the importance of the primary label of each video, but is not limited thereto.
[0057] The above S250 may be implemented in any of the following achievable ways, but is not limited thereto:
[0058] One possible implementation method is: Figure 3 As shown, the S250 includes:
[0059] S2501a: Perform word segmentation processing on each title in the video title set to obtain at least one word segmentation corresponding to each title;
[0060] S2502a: Determine the occurrence probability of each word in the first video subset and the second video subset;
[0061] S2503a: Determine a keyword set according to the occurrence probability of each word segment in the first video subset and the second video subset;
[0062] S2504a: Determine the importance of the test video for the video tag generation task based on the keyword set.
[0063] Optionally, the electronic device can use the open source Python open source library jieba or qqseg to segment a video title into at least one word segmentation, for example, segmenting "I came to Tsinghua University in Beijing" into "I", "come", "Beijing", and "Tsinghua University". Other word segmentation methods can also be used to segment the video title, and this application does not limit the word segmentation method.
[0064] It should be understood that the first video subset and the second video subset are both composed of at least one video, and each video may include some text information, such as subtitles and titles in the video. The electronic device may recognize the text information in the video by text recognition, and respectively count the text in the first video subset and the second video subset. For example, statistics show that the first video subset includes a total of 1,000 segmented words, which may include repeated segmented words, among which "skills" appears 300 times, "exhibition" appears 80 times, and "maintenance" appears 80 times... Statistics show that the second video subset includes a total of 1,000 segmented words, which may include repeated segmented words, among which "skills" appears 60 times, "exhibition" appears 400 times, and "maintenance" appears 300 times... Based on this, assuming that the title of a video is "Toyota Trade Show", after segmentation, it is determined that the probability of "exhibition" appearing in the first video subset is 0.08, and the probability of appearing in the second video subset is 0.4.
[0065] Optionally, the electronic device may determine as a keyword a segmentation whose occurrence probability in the first video subset is relatively different from that in the second video subset. Specifically, the following achievable method may be used to determine whether a target segmentation is a keyword. The target segmentation may be any segmentation obtained after segmentation processing of each title in the video title set:
[0066] Method 1: The electronic device calculates the difference between the probability of occurrence of the target word in the second video subset and the probability of occurrence in the first video subset; if the difference is greater than a preset threshold, the target word is determined to be a keyword.
[0067] Optionally, the preset threshold may be predefined or configured by the electronic device, which is not limited in the present application.
[0068] Optionally, the value of the preset threshold may be 0.2 or 0.3, etc., which is not limited in this application.
[0069] Method 2: If the occurrence probability of the target word in the second video subset is greater than the first preset threshold, and the occurrence probability of the target word in the first video subset is less than or equal to the second preset threshold, the target word is determined to be a keyword.
[0070] Optionally, the first preset threshold is greater than or equal to the second preset threshold.
[0071] Optionally, the first preset threshold and the second preset threshold may be predefined or configured by the electronic device, which is not limited in the present application.
[0072] Optionally, the value of the first preset threshold may be 0.2 or 0.3, etc., which is not limited in this application.
[0073] Optionally, the value of the second preset threshold may be 0.05 or 0.1, etc., which is not limited in this application.
[0074] It should be understood that the keywords corresponding to all the segmented words in the video title set will constitute the above keyword set. For example, the keyword set may include: exhibition, maintenance, car wash, repair shop, novice, engine oil, etc.
[0075] It should be understood that the electronic device can determine the keyword set according to the occurrence frequency of each word in the first video subset and the second video subset in addition to determining the keyword set according to the occurrence probability of each word in the first video subset and the second video subset.
[0076] Optionally, the electronic device may determine as a keyword a segmentation whose appearance frequency in the first video subset is significantly different from that in the second video subset. Specifically, the electronic device may determine whether a target segmentation is a keyword in the following achievable manner. The target segmentation may be any segmentation obtained after segmentation processing of each title in the video title set:
[0077] Method 1: The electronic device calculates the difference between the frequency of occurrence of the target word in the second video subset and the frequency of occurrence in the first video subset; if the difference is greater than a third preset threshold, the target word is determined to be a keyword.
[0078] Optionally, the third preset threshold may be predefined or configured by the electronic device, which is not limited in the present application.
[0079] Optionally, the value of the third preset threshold may be 200 or 300, etc., which is not limited in this application.
[0080] Method 2: If the occurrence frequency of the target word in the second video subset is greater than the fourth preset threshold, and the occurrence frequency of the target word in the first video subset is less than or equal to the fifth preset threshold, the target word is determined to be a keyword.
[0081] Optionally, the fourth preset threshold is greater than or equal to the fifth preset threshold.
[0082] Optionally, the fourth preset threshold and the fifth preset threshold may be predefined or configured by the electronic device, which is not limited in the present application.
[0083] Optionally, the value of the fourth preset threshold may be 200 or 300, etc., which is not limited in this application.
[0084] Optionally, the value of the fifth preset threshold may be 50 or 100, etc., which is not limited in this application.
[0085] Exemplarily, it is assumed that statistics show that the first video subset includes a total of 1,000 segmented words, which may include repeated segmented words, among which "skills" appears 300 times, "sales exhibition" appears 80 times, and "maintenance" appears 80 times... Statistics show that the second video subset includes a total of 1,000 segmented words, which may include repeated segmented words, among which "skills" appears 60 times, "sales exhibition" appears 400 times, and "maintenance" appears 300 times... Based on this, it is assumed that the title of a video is "Toyota Prado Trade Show". After segmentation, it is determined that the frequency of appearance of "sales exhibition" in the first video subset is 80 times and the frequency of appearance in the second video subset is 400 times. Then the electronic device can calculate the difference between the frequency of appearance of "sales exhibition" in the second video subset and the frequency of appearance in the first video subset, and the difference is 320 times; if the difference is greater than the preset threshold, "sales exhibition" is determined to be a keyword.
[0086] Optionally, since the video title may include some meaningless participles after word segmentation, such as "like this", "myself", "today", etc., in the present application, these meaningless participles can be deleted manually. In other words, even if a meaningless participle is determined to belong to a keyword according to the above method, these meaningless participles can be deleted from the keyword set manually.
[0087] Optionally, after the electronic device obtains the keyword set, if the title of the test video includes at least one keyword in the keyword set, the test video is determined to be important for the video tag generation task. Alternatively, the electronic device may obtain a historical tag set corresponding to the video tag generation task; and determine the importance of the test video for the video tag generation task based on the keyword set and the historical tag set.
[0088] Optionally, the historical label set can be the labels of other videos under the video label generation task. For example, assuming that the video label generation task is a task of generating car style labels under the car vertical category, the historical label set includes: Jetta, Camry, Toyota, BMW, etc.
[0089] Optionally, if the title of the test video includes at least one keyword in the keyword set and at least one historical tag in the historical tag set, the electronic device can determine that the test video is important for the video tag generation task; otherwise, the test video is determined to be unimportant for the video tag generation task, for example: if the title of the test video only includes at least one keyword in the keyword set, but does not include at least one historical tag in the historical tag set, the test video is determined to be unimportant for the video tag generation task. Alternatively, if the title of the test video does not include at least one keyword in the keyword set, but only includes at least one historical tag in the historical tag set, the test video is determined to be unimportant for the video tag generation task. Alternatively, if the title of the test video does not include at least one keyword in the keyword set, and does not include at least one historical tag in the historical tag set, the test video is determined to be unimportant for the video tag generation task.
[0090] For example, assuming that the title of the test video includes the keyword "exhibition" and "Toyota" in the historical tag set, the electronic device can determine that the test video is important for the video tag generation task. Assuming that the title of the test video includes the keyword "exhibition" but does not include any tags in the historical tag set, the electronic device can determine that the test video is not important for the video tag generation task.
[0091] The second possible implementation method is as follows: Figure 4 As shown, the S250 includes:
[0092] S2501b: Determine the category of each title in the video title set according to the first video subset and the second video subset;
[0093] S2502b: Perform word segmentation processing on each title in the video title set to obtain at least one word segmentation corresponding to each title;
[0094] S2503b: training a text classification model using at least one word segment corresponding to each title and the category of each title;
[0095] S2504b: Segment the title of the test video to obtain at least one segmentation corresponding to the title of the test video;
[0096] S2505b: Input at least one word segment corresponding to the title of the test video into the text classification model to obtain the importance of the test video for the video tag generation task.
[0097] It should be understood that each heading is classified as either an important or unimportant category.
[0098] It should be understood that the attributes of each video in the first video subset are not important to the video tag generation task, and the attributes of each video in the second video subset are important to the video tag generation task. Then, if the first video is determined to belong to the first video subset based on the attributes of the first video, such as the first-level tag, then the title category of the first video is determined to be a non-important category; if the second video is determined to belong to the second video subset based on the attributes of the second video, such as the first-level tag, then the title category of the second video is determined to be an important category. Based on this, the electronic device establishes a mapping relationship between each title in the video title set and the title category.
[0099] Optionally, the electronic device can use the open source Python open source library jieba or qqseg to segment a video title into at least one word segmentation, for example, segmenting "I came to Tsinghua University in Beijing" into "I", "come", "Beijing", and "Tsinghua University". Other word segmentation methods can also be used to segment the video title, and this application does not limit the word segmentation method.
[0100] Optionally, the electronic device may train a binary classification model of an important or unimportant category for each title in the video title set based on any text classification model and the category annotations defined therein.
[0101] Optionally, the text classification model can be a bidirectional encoder representation (Bidirectional Encoder Representations from Transformers, BERT), a convolutional neural network-based text classification TextCNN, TextRCNN, etc., and this application does not impose any restrictions on this.
[0102] Optionally, the text classification model can be a deep learning model, a support vector machine (SVM) or other machine learning models such as a decision tree, and this application does not impose any restrictions on this.
[0103] It should be understood that the input of the text classification model is at least one word segmentation, and the output is a binary classification result, for example: the probability that the title of the test video is an important type and the probability that it is an unimportant type.
[0104] Optionally, if the probability that the title of the test video is of a non-important type is greater than a first preset probability, the test video is determined to be unimportant for the video tag generation task, and if the probability that the title of the test video is of an important type is greater than a second preset probability, the test video is determined to be important for the video tag generation task. Alternatively, if the probability that the title of the test video is of a non-important type is less than or equal to a third preset probability, the test video is determined to be important for the video tag generation task, and if the probability that the title of the test video is of an important type is less than or equal to a fourth preset probability, the test video is determined to be unimportant for the video tag generation task.
[0105] Optionally, the first preset probability, the second preset probability, the third preset probability and the fourth preset probability may be predefined or configured by the electronic device, and the present application does not impose any limitation on this.
[0106] Optionally, the value of the first preset threshold may be 80%, 90%, etc., which is not limited in the present application.
[0107] Optionally, the value of the second preset threshold may be 80%, 90%, etc., which is not limited in the present application.
[0108] Optionally, the value of the third preset threshold may be 20%, 30%, etc., which is not limited in the present application.
[0109] Optionally, the value of the fourth preset threshold may be 20%, 30%, etc., which is not limited in the present application.
[0110] It should be noted that, in addition to determining the importance of the test video for the video label generation task based on the first video subset, the second video subset, and the video title set, the electronic device can also directly determine the importance of the test video for the video label generation task based on the primary label of the test video, for example: if the primary label of the test video is important, then the test video is determined to be important for the video label generation task. If the primary label of the test video is unimportant, then the test video is determined to be unimportant for the video label generation task.
[0111] Optionally, in the present application, manual labeling may be used to label the importance of the primary labels of the test video, but is not limited thereto.
[0112] In summary, the present application provides several implementable methods for determining the importance of a test video for a video tag generation task. Furthermore, the electronic device can determine whether to perform a video tag generation task for the test video based on whether the test video is important for the video tag generation task. In other words, assuming that a certain video is not important for the video tag generation task, then the electronic device does not need to generate a tag for the video under the video tag generation task, and will not recommend, retrieve or place the video during subsequent video recommendation, video retrieval, and video advertising delivery, thereby improving the accuracy of video recommendation, video retrieval, video advertising delivery, etc., and further improving the user experience.
[0113] Figure 5 A flowchart of a video processing method provided in an embodiment of the present application, which can be executed by electronic devices such as desktop computers, laptops, tablets, cloud servers, etc., includes:
[0114] S510: Obtain a video tag generation task and at least one video;
[0115] S520: Determine the importance of each video for the video tag generation task;
[0116] S530: Determine whether to perform the video tag generation task for each video according to the importance of each video to the video tag generation task;
[0117] S540: For at least one video that needs to perform the video tag generation task, generate a tag corresponding to the video, and for at least one video that does not need to perform the video tag generation task, do not generate a tag corresponding to the video;
[0118] S550: Process at least one video according to the label result of the at least one video.
[0119] It should be understood that Figure 5 The embodiment shown is based on Figure 1 The video processing method is implemented based on the embodiment. In fact, the video processing method can also be implemented based on any of the above-mentioned video tag generation methods, and this application does not limit this.
[0120] It should be understood that the explanation of S510 to S530 can be found in Figure 1 The corresponding embodiments are not described in detail in this application. In addition, this application does not limit the way in which the electronic device generates video tags.
[0121] Optionally, for any one of the at least one video, the electronic device may recommend, retrieve, deliver, etc. the video, and this application does not impose any restrictions on this.
[0122] The following are some examples to illustrate the video processing method:
[0123] Example 1: Assume that video 1 shows parallel parking skills, video 2 shows the uniform style of police cars, and video 3 shows a Toyota Prado trade show. Through the above video label generation method, it is determined that for the task of generating car style labels under the car vertical category, video 1 and video 2 are non-important videos, and video 3 is an important video. At this time, the electronic device may not label video 1 and video 2, but label video 3 "Toyota Prado". When the electronic device determines that a user is interested in Toyota Prado, it can recommend videos with the label "Toyota Prado" to the user.
[0124] Example 2: Assume that video 1 shows parallel parking skills, video 2 shows the uniform style of police cars, and video 3 shows a Toyota Prado trade show. Through the above video label generation method, it is determined that for the task of generating car style labels under the car vertical category, video 1 and video 2 are non-important videos, and video 3 is an important video. At this time, the electronic device may not label video 1 and video 2, but label video 3 "Toyota Prado". When a user searches for Toyota Prado, the electronic device can present search results for videos with the label "Toyota Prado".
[0125] Example 3: Assume that Video 1 shows parallel parking skills, Video 2 shows the uniform style of police cars, and Video 3 shows a Toyota Prado trade show. Through the above video label generation method, it is determined that for the task of generating car style labels under the car vertical category, Video 1 and Video 2 are non-important videos, and Video 3 is an important video. At this time, the electronic device may not label Video 1 and Video 2, but label Video 3 "Toyota Prado". When a user is interested in Toyota Prado, the electronic device can target the user with a video advertisement labeled "Toyota Prado".
[0126] Figure 6 A schematic diagram of a video tag generation device 600 provided in an embodiment of the present application, the device 600 includes: a first acquisition module 610, a first determination module 620 and a second determination module 630, wherein the first acquisition module 610 is used to acquire a video tag generation task and a test video; the first determination module 620 is used to determine the importance of the test video to the video tag generation task; the second determination module 630 is used to determine whether to perform the video tag generation task for the test video according to the importance of the test video to the video tag generation task.
[0127] Optionally, the device 600 also includes: a second acquisition module 640, a third acquisition module 650, and a division module 660, wherein the second acquisition module 640 is used to acquire a video training set and a video title set; the video title set is composed of the titles of each video in the video training set; the third acquisition module 650 is used to acquire the attributes of each video in the video training set; the division module 660 is used to divide the video training set into a first video subset and a second video subset according to the attributes of each video in the video training set and the video label generation task; the attributes of each video in the first video subset are not important to the video label generation task, and the attributes of each video in the second video subset are important to the video label generation task; accordingly, the first determination module 620 is specifically used to: determine the importance of the test video for the video label generation task according to the first video subset, the second video subset and the video title set.
[0128] Optionally, the first determination module 620 is specifically used to: perform word segmentation processing on each title in the video title set to obtain at least one word segmentation corresponding to each title; determine the probability of occurrence of each word segmentation in the first video subset and the second video subset; determine the keyword set based on the probability of occurrence of each word segmentation in the first video subset and the second video subset; determine the importance of the test video for the video tag generation task based on the keyword set.
[0129] Optionally, the first determination module 620 is specifically used to: calculate the difference between the probability of occurrence of a target word in at least one word segmentation in the second video subset and the probability of occurrence in the first video subset; if the difference is greater than a preset threshold, determine that the target word segmentation is a keyword; wherein the keywords corresponding to each word in at least one word segmentation constitute a keyword set.
[0130] Optionally, the device 600 further includes: a fourth acquisition module 670, used to acquire a historical tag set corresponding to the video tag generation task; accordingly, the first determination module 620 is specifically used to determine the importance of the test video to the video tag generation task based on the keyword set and the historical tag set.
[0131] Optionally, the first determination module 620 is specifically used to: if the title of the test video includes at least one keyword in the keyword set and includes at least one history tag in the history tag set, then determine that the test video is important for the video tag generation task; otherwise, determine that the test video is not important for the video tag generation task.
[0132] Optionally, the first determination module 620 is specifically used to: determine the category of each title in the video title set according to the first video subset and the second video subset; the category of each title is an important or unimportant category; perform word segmentation processing on each title in the video title set to obtain at least one word segmentation corresponding to each title; train a text classification model through at least one word segmentation corresponding to each title and the category of each title; perform word segmentation on the title of the test video to obtain at least one word segmentation corresponding to the title of the test video; input at least one word segmentation corresponding to the title of the test video into the text classification model to obtain the importance of the test video for the video label generation task.
[0133] Optionally, the first determination module 620 is specifically configured to: if the first video belongs to the first video subset, determine that the title category of the first video is a non-important category; if the second video belongs to the second video subset, determine that the title category of the second video is an important category.
[0134] Optionally, the second determination module 630 is specifically used to: if the test video is important for the video tag generation task, determine to perform the video tag generation task for the test video; if the test video is not important for the video tag generation task, determine not to perform the video tag generation task for the test video.
[0135] Optionally, the attribute of each video is any of the following: the Nth level label, type, and duration of the video, where N is a positive integer.
[0136] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 6 The device 600 shown may perform Figures 1 to 4 The corresponding method embodiments, and the aforementioned and other operations and / or functions of each module in the device 600 are respectively to implement Figures 1 to 4 For the sake of brevity, the corresponding processes in each method are not repeated here.
[0137] The above describes the device 600 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0138] Figure 7 A schematic diagram of a video processing device 700 provided in an embodiment of the present application, the device 700 includes: an acquisition module 710, a first processing module 720 and a second processing module 730, wherein the acquisition module 710 is used to acquire at least one video; the first processing module 720 is used for the above-mentioned video tag generation method to determine whether to perform a video tag generation task for each video; the second processing module 730 is used to process at least one video according to the tag result of at least one video.
[0139] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 7 The device 700 shown may perform Figure 5 The corresponding method embodiments, and the aforementioned and other operations and / or functions of each module in the device 700 are respectively to implement Figure 5 For the sake of brevity, the corresponding processes in each method are not repeated here.
[0140] The above describes the device 700 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0141] Figure 8 It is a schematic block diagram of an electronic device provided in an embodiment of the present application.
[0142] like Figure 8 As shown, the electronic device may include:
[0143] The memory 810 and the processor 820, the memory 810 is used to store the computer program and transmit the program code to the processor 820. In other words, the processor 820 can call and run the computer program from the memory 810 to implement the method in the embodiment of the present application.
[0144] For example, the processor 820 may be configured to execute the above method embodiments according to instructions in the computer program.
[0145] In some embodiments of the present application, the processor 820 may include but is not limited to:
[0146] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0147] In some embodiments of the present application, the memory 810 includes but is not limited to:
[0148] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0149] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 810 and executed by the processor 820 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0150] like Figure 8 As shown, the electronic device may also include:
[0151] The transceiver 830 may be connected to the processor 820 or the memory 810 .
[0152] The processor 820 may control the transceiver 830 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 830 may include a transmitter and a receiver. The transceiver 830 may further include an antenna, and the number of antennas may be one or more.
[0153] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0154] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.
[0155] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0156] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0157] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0158] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0159] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A video tag generation method, characterized in that: include: Get the video label generation task and test video; Determining the importance of the test video to the video label generation task; Determining whether to perform the video tag generation task for the test video according to the importance of the test video to the video tag generation task; Before determining the importance of the test video to the video tag generation task, the method further includes: Obtain a video training set and a video title set; the video title set is composed of titles of each video in the video training set; Obtaining attributes of each video in the video training set; The video training set is divided into a first video subset and a second video subset according to the attributes of each video in the video training set and the video label generation task; the attributes of each video in the first video subset are not important to the video label generation task, and the attributes of each video in the second video subset are important to the video label generation task; Determining the importance of the test video to the video tag generation task includes: The importance of the test video to the video tag generation task is determined according to the first video subset, the second video subset, and the video title set.
2. The method according to claim 1, characterized in that The determining the importance of the test video for the video tag generation task according to the first video subset, the second video subset, and the video title set includes: Performing word segmentation processing on each title in the video title set to obtain at least one word segmentation corresponding to each title; Determining the occurrence probability of each of the segmented words in the first video subset and the second video subset; Determine a keyword set according to the occurrence probability of each of the segmented words in the first video subset and the second video subset; The importance of the test video to the video tag generation task is determined according to the keyword set.
3. The method according to claim 2, characterized in that The determining of the keyword set according to the occurrence probability of each of the segmented words in the first video subset and the second video subset includes: Calculating a difference between an appearance probability of a target word in the at least one word segment in the second video subset and an appearance probability of the target word in the first video subset; If the difference is greater than a preset threshold, determining that the target word is a keyword; Among them, the keywords corresponding to each participle in the at least one participle constitute the keyword set.
4. The method according to claim 2 or 3, characterized in that: Before determining the importance of the test video to the video tag generation task according to the keyword set, the method further includes: Obtaining a historical tag set corresponding to the video tag generation task; Determining the importance of the test video to the video tag generation task according to the keyword set includes: The importance of the test video to the video tag generation task is determined according to the keyword set and the historical tag set.
5. The method according to claim 4, characterized in that The determining the importance of the test video to the video tag generation task according to the keyword set and the historical tag set includes: If the title of the test video includes at least one keyword in the keyword set and includes at least one history tag in the history tag set, then determining that the test video is important for the video tag generation task; Otherwise, it is determined that the test video is not important for the video tag generation task.
6. The method according to claim 1, characterized in that The determining the importance of the test video for the video tag generation task according to the first video subset, the second video subset, and the video title set includes: Determine the category of each title in the video title set according to the first video subset and the second video subset; the category of each title is an important or unimportant category; Performing word segmentation processing on each title in the video title set to obtain at least one word segmentation corresponding to each title; Training a text classification model by using at least one word segment corresponding to each title and the category of each title; Segmenting the title of the test video to obtain at least one segmentation corresponding to the title of the test video; At least one word segment corresponding to the title of the test video is input into the text classification model to obtain the importance of the test video to the video tag generation task.
7. The method according to claim 6, characterized in that Determining the category of each title in the video title set according to the first video subset and the second video subset includes: If the first video belongs to the first video subset, determining that the title category of the first video is a non-important category; If the second video belongs to the second video subset, it is determined that the title category of the second video is an important category.
8. The method according to any one of claims 1 to 3, characterized in that: The determining whether to perform the video tag generation task for the test video according to the importance of the test video to the video tag generation task includes: If the test video is important to the video tag generation task, determining to perform the video tag generation task for the test video; If the test video is not important for the video tag generation task, it is determined not to perform the video tag generation task for the test video.
9. The method according to any one of claims 1 to 3, characterized in that: The attribute of each of the videos is any one of the following: the Nth level label, type, and duration of the video, where N is a positive integer.
10. A video processing method, characterized in that: include: Acquire at least one video, and determine whether to perform a video tag generation task for each of the videos according to the method described in any one of claims 1 to 9; The at least one video is processed according to the label result of the at least one video.
11. A video tag generation device, characterized in that: include: The first acquisition module is used to acquire video label generation tasks and test videos; A first determination module, used to determine the importance of the test video to the video tag generation task; A second determination module is used to determine whether to perform the video tag generation task for the test video according to the importance of the test video to the video tag generation task; Wherein, the video tag generating device further includes: A second acquisition module is used to acquire a video training set and a video title set; the video title set is composed of the titles of each video in the video training set; A third acquisition module is used to obtain the attributes of each video in the video training set; A division module, used for dividing the video training set into a first video subset and a second video subset according to the attributes of each video in the video training set and the video label generation task; the attributes of each video in the first video subset are not important to the video label generation task, and the attributes of each video in the second video subset are important to the video label generation task; Accordingly, the first determination module is specifically used for: The importance of the test video to the video tag generation task is determined according to the first video subset, the second video subset, and the video title set.
12. A video processing device, characterized in that: include: An acquisition module, used for acquiring at least one video; A first processing module, configured to determine whether to perform a video tag generation task for each of the videos according to the method described in any one of claims 1 to 9; The second processing module is used to process the at least one video according to the label result of the at least one video.
13. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 10.
14. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Education video recommendation method and device
CN105404698A
Method and apparatus for generating information
CN109325148A
