Feedback processing method and device for video
Patent Information
- Application Number
- CN202110990446.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-26
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2041-08-26
AI Technical Summary
[0018]本公开实施例提供了一种视频的反馈处理方法及设备,该方法包括:确定目标关键词,所述目标关键词用于表示对视频的至少一个主题的异常反馈;根据语义向量的匹配关系,确定所述目标关键词的同义词,其中,所述目标关键词的语义向量与所述同义词的语义向量相匹配,所述语义向量是通过机器模型和多组训练样本预先训练得到的,所述训练样本包括:两个反馈文本和用于表示所述两个反馈文本是否针对同一视频的标签,所述机器模型用于在训练过程中生成所述反馈文本中的各个词语的语义向量,并根据所述语义向量确定所述反馈文本之间的相似度,以及根据所述相似度和所述标签对所述语义向量进行调整;根据所述目标关键词和所述同义词,对多个视频的反馈文本进行匹配得到目标视频,所述目标视频的反馈文本中包括所述目标关键词和/或所述同义词。本公开可以对训练样本的标签进行设置,该标签用于表示训练样本中的两个反馈文本是否针对同一视频。从而通过大量训练样本训练得到评论文本中的词语的语义向量,基于该词语的语义向量可以获取到目标关键词的同义词。进而,通过目标关键词和同义词可以更加准确的获取到与目标关键词匹配的目标视频,提高了反馈的目标视频的识别准确度。
Smart Images

Figure CN115730102B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer processing technology, and more particularly to a video feedback processing method and apparatus. Background Technology
[0002] With the rapid development of electronic devices, their functions are becoming increasingly powerful. Electronic devices can run applications with video playback capabilities, allowing users to play videos. Users can provide feedback on videos that exhibit abnormalities. For example, users can report videos containing targeted content or videos that are choppy. Application providers typically need to analyze and statistically process the feedback text entered by users to handle different videos differently. For instance, they can identify videos with targeted content and address them accordingly. This helps avoid negative impacts on the video's dissemination.
[0003] Therefore, improving the accuracy of target video recognition in feedback is an urgent problem to be solved. Summary of the Invention
[0004] This disclosure provides a video feedback processing method and apparatus, which can improve the recognition accuracy of the target video in the feedback.
[0005] In a first aspect, embodiments of this disclosure provide a video feedback processing method, comprising:
[0006] Identify target keywords, which are used to indicate abnormal feedback on at least one topic of the video;
[0007] Based on the matching relationship of semantic vectors, synonyms of the target keyword are determined, wherein the semantic vector of the target keyword matches the semantic vector of the synonym. The semantic vectors are obtained by pre-training a machine model and multiple sets of training samples. The training samples include: two feedback texts and labels indicating whether the two feedback texts refer to the same video. The machine model is used to generate semantic vectors of each word in the feedback texts during training, determine the similarity between the feedback texts based on the semantic vectors, and adjust the semantic vectors based on the similarity and the labels.
[0008] The target video is obtained by matching the feedback text of multiple videos based on the target keywords and the synonyms. The feedback text of the target video includes the target keywords and / or the synonyms.
[0009] Secondly, embodiments of this disclosure provide a video feedback processing apparatus, comprising:
[0010] The target keyword determination module is used to determine target keywords, which are used to represent abnormal feedback on at least one theme of the video;
[0011] The synonym acquisition module is used to determine the synonyms of the target keyword based on the matching relationship of semantic vectors. The semantic vectors of the target keyword and the semantic vectors of the synonyms are matched. The semantic vectors are obtained by pre-training a machine model and multiple sets of training samples. The training samples include two feedback texts and labels indicating whether the two feedback texts refer to the same video. The machine model is used to generate the semantic vectors of each word in the feedback texts during training, determine the similarity between the feedback texts based on the semantic vectors, and adjust the semantic vectors based on the similarity and the labels.
[0012] The target video acquisition module is used to match the feedback text of multiple videos to obtain the target video based on the target keywords and the synonyms, wherein the feedback text of the target video includes the target keywords and / or the synonyms.
[0013] Thirdly, embodiments of this disclosure provide an electronic device, including: at least one processor and a memory;
[0014] The memory stores computer-executed instructions;
[0015] The at least one processor executes computer execution instructions stored in the memory, causing the electronic device to perform the method as described in the first aspect.
[0016] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause a computing device to implement the method described in the first aspect.
[0017] Fifthly, embodiments of this disclosure provide a computer program for implementing the method as described in the first aspect.
[0018] This disclosure provides a video feedback processing method and apparatus. The method includes: determining a target keyword, which represents abnormal feedback on at least one topic of a video; determining synonyms of the target keyword based on semantic vector matching relationships, wherein the semantic vectors of the target keyword and the semantic vectors of the synonyms are matched, and the semantic vectors are pre-trained by a machine model and multiple sets of training samples, the training samples including: two feedback texts and labels indicating whether the two feedback texts refer to the same video, the machine model generating semantic vectors of each word in the feedback texts during training, determining the similarity between the feedback texts based on the semantic vectors, and adjusting the semantic vectors based on the similarity and the labels; matching the feedback texts of multiple videos based on the target keyword and the synonyms to obtain a target video, wherein the feedback texts of the target video include the target keyword and / or the synonyms. This disclosure allows setting labels for the training samples, which indicate whether two feedback texts in the training samples refer to the same video. This allows for the training of semantic vectors for words in the comment text using a large number of training samples. Based on these semantic vectors, synonyms for the target keywords can be obtained. Furthermore, by using the target keywords and their synonyms, target videos that match the target keywords can be more accurately identified, thus improving the accuracy of target video recognition in the feedback. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the interactive process of video acquisition;
[0021] Figure 2 This is a flowchart of the steps of a video feedback processing method provided in an embodiment of this disclosure;
[0022] Figure 3 This is a schematic diagram of a data processing flow during the training process provided in an embodiment of this disclosure;
[0023] Figure 4 This is a structural block diagram of a video feedback processing device provided for an embodiment of this disclosure;
[0024] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0026] This disclosure can be applied to a video acquisition process, wherein the video acquisition process is used to obtain target videos from a large number of videos provided by an application, where the feedback text matches the target keywords. Figure 1 This is a schematic diagram illustrating the interactive flow of a video acquisition process. (Refer to...) Figure 1 As shown, maintenance personnel can operate the video management device to input target keywords. The video management device sends the target keywords to the server, and the server sends the target video that matches the target keywords back to the video management device. The video management device can then display information about the target video, allowing maintenance personnel to process it.
[0027] The video management device can be a personal computer, mobile phone, tablet computer, etc.
[0028] The server stores feedback text, which is the text that provides feedback on any issues with the video provided by the application. In other words, the server is the storage device for the application, and the application is the one that provides video functionality; it can also be called a video application.
[0029] In the video acquisition process described above, the server obtains the target video based on text matching. Specifically, for each video, the target keywords are matched with each feedback text of that video. If the target keywords successfully match at least one feedback text of that video, then that video is identified as the target video; if the target keywords fail to match any of the feedback texts of that video, then that video is not identified as the target video.
[0030] However, different feedback texts can be input by different users, and different users may express the same semantic meaning differently. Therefore, different feedback texts can correspond to the same semantic meaning, meaning different feedback texts correspond to the same target keyword. But when matching the target keyword with these two different feedback texts, some feedback texts may not match because the target keyword is not present in their expression. For example, for videos V1 and V2, the feedback text for video V1 includes the word W1, and the feedback text for video V2 includes the word W2. Therefore, the target video obtained through the target keyword W1 is V1, not V2. However, since W1 and W2 are synonyms, W2 should also be the target video. It can be seen that the above scheme cannot accurately identify the feedback video.
[0031] To address the aforementioned issues, the applicant analyzed the feedback text of videos and discovered that feedback text for the same video typically shares the same theme, while feedback text for different videos has different themes. Based on this finding, embodiments of this disclosure can set labels for training samples, which indicate whether two feedback texts in the training samples refer to the same video. This allows for the training of semantic vectors for words in the comment text using a large number of training samples. Based on these semantic vectors, synonyms of the target keywords can be obtained. Furthermore, by using the target keywords and synonyms, the target video matching the target keywords can be more accurately identified, improving the accuracy of target video recognition in feedback.
[0032] The technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present disclosure will now be described with reference to the accompanying drawings.
[0033] Figure 2 This is a flowchart illustrating the steps of a video feedback processing method provided in an embodiment of this disclosure. (Refer to...) Figure 2 As shown, the feedback processing method for this video includes:
[0034] S101: Determine target keywords, which are used to indicate abnormal feedback on at least one topic of the video.
[0035] The target keywords are either entered by maintenance personnel in real time or pre-configured by the maintenance team. Each target keyword corresponds to at least one topic of anomaly feedback, and the target video obtained through that keyword can be identified as pirated. For example, if the target keyword is "piracy," then the target video obtained through that keyword will be a pirated video. Alternatively, if the target keyword is "violation," then the target video obtained through that keyword will be a violation video.
[0036] S102: Based on the matching relationship of semantic vectors, determine the synonyms of the target keywords. The semantic vectors of the target keywords are matched with the semantic vectors of the synonyms. The semantic vectors are obtained by pre-training a machine model and multiple sets of training samples. The training samples include two feedback texts and labels used to indicate whether the two feedback texts refer to the same video. The machine model is used to generate the semantic vectors of each word in the feedback texts during the training process, determine the similarity between the feedback texts based on the semantic vectors, and adjust the semantic vectors based on the similarity and labels.
[0037] Semantic vectors are numerical representations of words in terms of meaning. When the similarity of semantic vectors is high, it means that the two words are likely to be synonyms; conversely, when the similarity of semantic vectors is low, it means that the two words are likely to be synonyms.
[0038] Based on the similarity of the above words, the synonyms of the target keywords can be determined through the following steps: First, obtain the semantic vector of the target keyword from the preset thesaurus. The semantic vectors of multiple words included in the preset thesaurus are obtained through the machine model and the training samples mentioned above. Then, calculate the similarity between the semantic vector of the target keyword and the semantic vector of each word in the preset thesaurus. Finally, obtain words from the preset thesaurus whose similarity meets the preset conditions as synonyms of the target keyword. The preset conditions include at least one of the following: the similarity is greater than or equal to the preset similarity threshold, and the similarity is located at the beginning of the descending list.
[0039] Understandably, a pre-defined thesaurus can use words as indexes and semantic vectors as values. The pre-defined thesaurus must include at least the semantic vectors of the target keywords, allowing the corresponding semantic vectors to be retrieved based on the target keywords.
[0040] After obtaining the semantic vector of the target keyword, the similarity between the semantic vector of the target keyword and the semantic vectors of other words in the preset thesaurus can be calculated. This similarity can be achieved using cosine similarity, distance-based similarity, etc. Calculating the similarity between vectors is a well-known technique, and this disclosure does not limit its application.
[0041] After obtaining the similarity scores, you can sort them in descending order of similarity and select the words with the highest similarity scores as synonyms of the target keyword. Alternatively, you can select words with similarity scores greater than or equal to a preset similarity threshold as synonyms of the target keyword. You can also select words with similarity scores both at the top of the list and greater than or equal to a preset similarity threshold as synonyms of the target keyword.
[0042] The semantic vectors of the words in the aforementioned lexicon are obtained through pre-training using a machine model and training samples. The labels in the training samples are used to supervise the training process. In this embodiment, the labels can be used not only to indicate whether two feedback texts refer to the same video, but also to indicate whether the publication time difference between the two feedback texts is less than or equal to a preset time difference threshold. This embodiment considers feedback texts with a publication time difference less than or equal to the preset time difference threshold to be semantically similar. Therefore, two feedback texts referring to the same video and with a publication time difference less than or equal to the preset time difference threshold can be combined into one training sample, and their corresponding labels can be set to 1. Conversely, two feedback texts referring to different videos or with a publication time difference greater than the preset time difference threshold can be combined into one training sample, and their corresponding labels can be set to 0.
[0043] The publication time difference refers to the time difference between publishing two feedback texts. The time of publishing the feedback text is the time when the user provides abnormal feedback on the video.
[0044] Specifically, the process of training semantic vectors using the aforementioned training samples can include the following main steps: First, in each round of iterative training, for each set of training samples and two feedback texts, semantic vectors of the words included in the feedback texts are generated; then, for each set of training samples, the similarity between the two feedback texts is predicted based on the semantic vectors of the words; finally, if the loss value between the similarity of the training samples and the labels does not meet the preset convergence condition, the semantic vectors of the words are adjusted for the next round of iterative training; if the loss value between the similarity of the training samples and the labels meets the preset convergence condition, the semantic vectors of the words included in the feedback texts are used as the semantic vectors of the trained words.
[0045] The semantic vectors of words can be generated through the following steps: First, each feedback text is segmented to obtain at least one word; then, each word is mapped into a vector using distributed word representation technology.
[0046] Specifically, for each set of training samples, predicting the similarity between two feedback texts based on the semantic vectors of the words can be achieved through the following steps: First, determine the word vector matrices corresponding to the two feedback texts in each set of training samples, where the word vector matrices include the semantic vectors of the words included in the feedback texts; then, determine the word interaction matrix of the training samples based on the word vector matrices corresponding to the two feedback texts; finally, perform convolution, max pooling, and full connection on the word interaction matrix of each set of training samples in sequence to obtain the similarity between the two feedback texts in the training samples.
[0047] Each feedback text corresponds to a word vector matrix, where each row of the matrix constitutes the semantic vector of a word in the feedback text. For example, consider the word vector matrix A for the following feedback text TA:
[0048]
[0049] In the matrix A above, there are three rows, representing the feedback text TA corresponding to A, which includes three words: Ai = [ai1, ai2, ai3, ai4, ai5, ai6, ai7, ai8], where i is 1, 2, or 3. The elements in the first row constitute the semantic vector A1 = [a11, a12, a13, a14, a15, a16, a17, a18] of the first word; the elements in the second row constitute the semantic vector A2 = [a21, a22, a23, a24, a25, a26, a27, a28] of the second word; and the elements in the third row constitute the semantic vector A3 = [a31, a32, a33, a34, a35, a36, a37, a38] of the third word.
[0050] Similarly, the word vector matrix B corresponding to the other feedback text TB can be:
[0051]
[0052] In the matrix B above, there are three rows, representing the feedback text TB corresponding to B, which includes three words: Bj = [bj1, bj2, bj3, bj4, bj5, bj6, bj7, bj8], where j is 1, 2, or 3. Specifically, the elements in the first row constitute the semantic vector B1 = [b11, b12, b13, b14, b15, b16, b17, b18] of the first word, the elements in the second row constitute the semantic vector B2 = [b21, b22, b23, b24, b25, b26, b27, b28] of the second word, and the elements in the third row constitute the semantic vector B3 = [b31, b32, b33, b34, b35, b36, b37, b38] of the third word.
[0053] Based on A and B above, the following word interaction matrix C can be obtained:
[0054]
[0055] In C, cij represents the similarity between Ai and Bj. c11 represents the similarity between A1 and B1, c12 represents the similarity between A1 and B2, c13 represents the similarity between A1 and B3, c21 represents the similarity between A2 and B1, c22 represents the similarity between A2 and B2, c23 represents the similarity between A2 and B3, c31 represents the similarity between A3 and B1, c32 represents the similarity between A3 and B2, and c33 represents the similarity between A3 and B3.
[0056] It is understood that the similarity between Ai and Bj is the similarity between vectors, and the similarity between vectors can be calculated using existing well-known techniques, which are not limited in this disclosure.
[0057] Optionally, the machine model may include: an embedding layer, an interaction sublayer, a convolutional layer, a pooling layer, and a fully connected layer. The embedding layer is used to generate the semantic vector of each word. The interaction layer is used to generate a word interaction matrix based on the semantic vectors of each word in the two feedback texts. The element in the i-th row and j-th column of the word interaction matrix represents the vector similarity between the i-th word in one feedback text and the j-th word in the other feedback text. The convolutional layer is used to convolve the word interaction matrix to obtain a convolutional matrix. The pooling layer is used to pool the convolutional matrix to obtain a pooling matrix. The fully connected layer is used to fully connect the pooling matrix to obtain the similarity between the two feedback texts.
[0058] Figure 3 This is a schematic diagram of a data processing flow during a training process provided in an embodiment of this disclosure. (Refer to...) Figure 3 As shown, firstly, vectors are generated for each word in the two feedback texts in the training sample through the embedding layer, resulting in two word vector matrices A and B respectively. Then, for each training sample, A and B are interacted through the interaction layer to obtain the word interaction matrix C. After that, a convolutional layer is used to convolve it to obtain the convolutional matrix C1. Then, a pooling layer is used to pool C1 to obtain the pooling matrix C2. Finally, a fully connected layer is used to fully connect the pooled C2 to obtain the similarity SIM between the two feedback texts in the training sample.
[0059] The convolutional layers mentioned above can be performed using a convolutional neural network, and the pooling layers can be max pooling layers or average pooling layers, etc. After obtaining the similarity corresponding to each training sample, the similarity and label corresponding to the training samples used in this iteration can be input into the loss function to obtain the loss value. The loss function is used to evaluate the degree of difference between the similarity and the label. The loss function can be an existing cross-entropy loss function, squared loss function, etc., and this embodiment of the disclosure is not limited to it.
[0060] After obtaining the loss value, if the loss value does not continuously decrease after multiple iterations, or if the loss value in the current iteration is less than or equal to a preset threshold, then the loss value is determined to meet the preset condition, and training ends to obtain the semantic vectors of each word. If the loss value continuously decreases after multiple iterations, and the loss value in the current iteration is greater than the preset threshold, then the loss value is determined to not meet the preset condition, and the next iteration of training continues.
[0061] After obtaining the semantic vectors of each word through the above training process, these vectors can be normalized and then stored in a K-dimensional tree (KD-tree). This reduces the complexity of calculating the similarity between vectors. The normalization process divides each element of a semantic vector by its modulus to obtain a new semantic vector. This new semantic vector is stored in the K-dimensional tree for retrieval of synonyms via S102.
[0062] The aforementioned K-dimensional tree has the characteristic of low complexity in vector retrieval. The average time complexity of a single vector retrieval can be... Higher-order infinitesimals: Where N is the dimension of each semantic vector.
[0063] S103: Match the feedback text of multiple videos with target keywords and synonyms to obtain the target video. The feedback text of the target video includes target keywords and / or synonyms.
[0064] After obtaining the target video, an anomaly report can be displayed indicating that the video contains at least one topic corresponding to the target keyword. This allows maintenance personnel to easily process the target video according to that topic, with different topics requiring different processing methods.
[0065] Specifically, the information of the target video can be displayed on the screen so that maintenance personnel can process all or part of the target video.
[0066] Corresponding to the video feedback processing method in the above embodiments, Figure 4 This is a structural block diagram of a video feedback processing apparatus provided in an embodiment of this disclosure. For ease of explanation, only the parts relevant to the embodiments of this disclosure are shown. (Refer to...) Figure 4 The video feedback processing device 200 includes: a target keyword determination module 201, a synonym acquisition module 202, and a target video acquisition module 203.
[0067] The target keyword determination module 201 is used to determine target keywords, which are used to represent abnormal feedback on at least one theme of the video.
[0068] The synonym acquisition module 202 is used to determine the synonyms of the target keyword based on the matching relationship of semantic vectors, wherein the semantic vector of the target keyword matches the semantic vector of the synonym, and the semantic vector is obtained by pre-training a machine model and multiple sets of training samples. The training samples include: two feedback texts and labels used to indicate whether the two feedback texts refer to the same video. The machine model is used to generate the semantic vectors of each word in the feedback texts during the training process, determine the similarity between the feedback texts based on the semantic vectors, and adjust the semantic vectors based on the similarity and the labels.
[0069] The target video acquisition module 203 is used to match the feedback text of multiple videos to obtain the target video based on the target keywords and the synonyms, wherein the feedback text of the target video includes the target keywords and / or the synonyms.
[0070] Optionally, the aforementioned synonym acquisition module 202 is also used for:
[0071] The semantic vector of the target keyword is obtained from a preset lexicon, wherein the semantic vectors of multiple words included in the preset lexicon are obtained through pre-training by the machine model and the training samples; the similarity between the semantic vector of the target keyword and the semantic vectors of each word in the preset lexicon is calculated; words whose similarity satisfies preset conditions are obtained from the preset lexicon as synonyms of the target keyword, wherein the preset conditions include at least one of the following: the similarity is greater than or equal to a preset similarity threshold, or the similarity is located at the beginning of a descending list.
[0072] Optionally, the machine model includes: an embedding layer, an interaction sublayer, a convolutional layer, a pooling layer, and a fully connected layer. The embedding layer is used to generate a semantic vector for each word. The interaction layer is used to generate a word interaction matrix based on the semantic vectors of each word in the two feedback texts. The element in the i-th row and j-th column of the word interaction matrix represents the vector similarity between the i-th word in one feedback text and the j-th word in the other feedback text. The convolutional layer is used to convolve the word interaction matrix to obtain a convolutional matrix. The pooling layer is used to pool the convolutional matrix to obtain a pooling matrix. The fully connected layer is used to fully connect the pooling matrix to obtain the similarity between the two feedback texts.
[0073] Optionally, the semantic vectors of the words are obtained through training using the following modules:
[0074] The vector generation module is used to generate semantic vectors of words included in the feedback text for each set of training samples in each round of training iteration.
[0075] A similarity determination module is used to predict the similarity between two feedback texts based on the semantic vectors of the words for each set of training samples.
[0076] The next iteration module is used to adjust the semantic vector of the word to perform the next round of iterative training if the loss value between the similarity and the label of the training sample does not meet the preset convergence condition.
[0077] The training termination module is used to take the semantic vectors of the words included in the feedback text as the semantic vectors of the trained words if the loss value between the similarity and the label of the training samples meets a preset convergence condition.
[0078] Optionally, the similarity determination module is further configured to:
[0079] Determine the word vector matrix corresponding to the two feedback texts in each group of training samples, wherein the word vector matrix includes the semantic vectors of the words included in the feedback text; determine the word interaction matrix of the training samples based on the word vector matrices corresponding to the two feedback texts; perform convolution, max pooling and full connection on the word interaction matrix of each group of training samples in sequence to obtain the similarity between the two feedback texts in the training samples.
[0080] Optionally, the above-mentioned device further includes:
[0081] The vector normalization module is used to normalize the semantic vectors of each word obtained during training and then store them in a K-dimensional tree.
[0082] Optionally, the tag is also used to indicate whether the time difference between the publication of the two feedback texts is less than or equal to a preset time difference threshold.
[0083] Optionally, the device further includes:
[0084] The prompting module is used to provide feedback indicating that the target video contains at least one topic corresponding to the target keyword.
[0085] The video feedback processing device provided in this embodiment can be used to perform the above-mentioned... Figure 2 The technical solutions of the method embodiments shown are similar in implementation principle and technical effect, and will not be described again here.
[0086] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present disclosure. The electronic device 600 includes a memory 602 and at least one processor 601;
[0087] Among them, memory 602 stores computer-executed instructions.
[0088] At least one processor 601 executes computer execution instructions stored in memory 602, causing electronic device 601 to perform the aforementioned functions. Figure 2 The method in the middle.
[0089] In addition, the electronic device may also include a receiver 603 and a transmitter 604, wherein the receiver 603 is used to receive information from other devices or equipment and forward it to the processor 601, and the transmitter 604 is used to send information to other devices or equipment.
[0090] In a first example of the first aspect, embodiments of this disclosure provide a video feedback processing method, including:
[0091] Identify target keywords, which are used to indicate abnormal feedback on at least one topic of the video;
[0092] Based on the matching relationship of semantic vectors, synonyms of the target keyword are determined, wherein the semantic vector of the target keyword matches the semantic vector of the synonym. The semantic vectors are obtained by pre-training a machine model and multiple sets of training samples. The training samples include: two feedback texts and labels indicating whether the two feedback texts refer to the same video. The machine model is used to generate semantic vectors of each word in the feedback texts during training, determine the similarity between the feedback texts based on the semantic vectors, and adjust the semantic vectors based on the similarity and the labels.
[0093] The target video is obtained by matching the feedback text of multiple videos based on the target keywords and the synonyms. The feedback text of the target video includes the target keywords and / or the synonyms.
[0094] Based on the first example of the first aspect, in the second example of the first aspect, determining the synonyms of the target keyword according to the matching relationship of semantic vectors includes:
[0095] The semantic vectors of the target keywords are obtained from a preset lexicon, wherein the semantic vectors of multiple words included in the preset lexicon are obtained through pre-training of the machine model and the training samples;
[0096] Calculate the similarity between the semantic vector of the target keyword and the semantic vector of each word in the preset thesaurus;
[0097] Words whose similarity meets the preset conditions are obtained from the preset word library and used as synonyms of the target keyword. The preset conditions include at least one of the following: the similarity is greater than or equal to a preset similarity threshold, or the similarity is located at the beginning of the descending list.
[0098] Based on the first or second example of the first aspect, in the fourth example of the first aspect, the machine model includes: an embedding layer, an interaction sublayer, a convolutional layer, a pooling layer, and a fully connected layer. The embedding layer is used to generate a semantic vector for each word. The interaction layer is used to generate a word interaction matrix based on the semantic vectors of each word in the two feedback texts. The element in the i-th row and j-th column of the word interaction matrix represents the vector similarity between the i-th word in one feedback text and the j-th word in the other feedback text. The convolutional layer is used to convolve the word interaction matrix to obtain a convolutional matrix. The pooling layer is used to pool the convolutional matrix to obtain a pooling matrix. The fully connected layer is used to fully connect the pooling matrix to obtain the similarity between the two feedback texts.
[0099] Based on the fourth example of the first aspect, in the fifth example of the first aspect, the semantic vector of the word is obtained through the following steps:
[0100] In each round of training iteration, for each set of training samples, two feedback texts are generated, and semantic vectors of the words included in the feedback texts are generated.
[0101] For each set of training samples, the similarity between the two feedback texts is predicted based on the semantic vectors of the words;
[0102] If the loss value between the similarity and the label of the training samples does not meet the preset convergence condition, the semantic vector of the word is adjusted for the next round of iterative training.
[0103] If the loss value between the similarity and the label of the training sample satisfies the preset convergence condition, then the semantic vector of the words included in the feedback text is used as the semantic vector of the trained words.
[0104] Based on the fourth example of the first aspect, in the fifth example of the first aspect, predicting the similarity between the two feedback texts based on the semantic vectors of the words for each set of training samples includes:
[0105] Determine the word vector matrix corresponding to the two feedback texts in each group of training samples, wherein the word vector matrix includes the semantic vectors of the words included in the feedback text;
[0106] The word interaction matrix of the training samples is determined based on the word vector matrices corresponding to the two feedback texts respectively;
[0107] For each group of training samples, the word interaction matrix is sequentially subjected to convolution, max pooling, and full connection to obtain the similarity between two feedback texts in the training samples.
[0108] Based on the first example of the first aspect, in the sixth example of the first aspect, the method further includes:
[0109] The semantic vectors of each word obtained during training are normalized and then stored in a K-dimensional tree.
[0110] Based on the first example of the first aspect, in the seventh example of the first aspect, the label is also used to indicate whether the time difference between the publication of the two feedback texts is less than or equal to a preset time difference threshold.
[0111] Based on the first example of the first aspect, in the eighth example of the first aspect, the method further includes:
[0112] The system indicates that the target video contains at least one topic corresponding to the target keyword, which is an anomaly.
[0113] In a first example of the second aspect, a video feedback processing apparatus is provided, comprising:
[0114] The target keyword determination module is used to determine target keywords, which are used to represent abnormal feedback on at least one theme of the video;
[0115] The synonym acquisition module is used to determine the synonyms of the target keyword based on the matching relationship of semantic vectors. The semantic vectors of the target keyword and the semantic vectors of the synonyms are matched. The semantic vectors are obtained by pre-training a machine model and multiple sets of training samples. The training samples include two feedback texts and labels indicating whether the two feedback texts refer to the same video. The machine model is used to generate the semantic vectors of each word in the feedback texts during training, determine the similarity between the feedback texts based on the semantic vectors, and adjust the semantic vectors based on the similarity and the labels.
[0116] The target video acquisition module is used to match the feedback text of multiple videos to obtain the target video based on the target keywords and the synonyms, wherein the feedback text of the target video includes the target keywords and / or the synonyms.
[0117] Based on the first example of the second aspect, in the second example of the second aspect, the aforementioned synonym acquisition module is also used for:
[0118] The semantic vectors of the target keywords are obtained from a preset lexicon, wherein the semantic vectors of multiple words included in the preset lexicon are obtained through pre-training of the machine model and the training samples;
[0119] Calculate the similarity between the semantic vector of the target keyword and the semantic vector of each word in the preset thesaurus;
[0120] Words whose similarity meets the preset conditions are obtained from the preset word library and used as synonyms of the target keyword. The preset conditions include at least one of the following: the similarity is greater than or equal to a preset similarity threshold, or the similarity is located at the beginning of the descending list.
[0121] Based on the first or second example of the second aspect, in the third example of the second aspect, the machine model includes: an embedding layer, an interaction sublayer, a convolutional layer, a pooling layer, and a fully connected layer. The embedding layer is used to generate a semantic vector for each word. The interaction layer is used to generate a word interaction matrix based on the semantic vectors of each word in the two feedback texts. The element in the i-th row and j-th column of the word interaction matrix represents the vector similarity between the i-th word in one feedback text and the j-th word in the other feedback text. The convolutional layer is used to convolve the word interaction matrix to obtain a convolutional matrix. The pooling layer is used to pool the convolutional matrix to obtain a pooling matrix. The fully connected layer is used to fully connect the pooling matrix to obtain the similarity between the two feedback texts.
[0122] Based on the third example of the second aspect, in the fourth example of the second aspect, the semantic vector of the word is obtained by training the following module:
[0123] The vector generation module is used to generate semantic vectors of words included in the feedback text for each set of training samples in each round of training iteration;
[0124] A similarity determination module is used to predict the similarity between two feedback texts based on the semantic vectors of the words for each group of training samples.
[0125] The next iteration module is used to adjust the semantic vector of the word to perform the next iteration training if the loss value between the similarity and the label of the training sample does not meet the preset convergence condition.
[0126] The training termination module is used to take the semantic vectors of the words included in the feedback text as the semantic vectors of the trained words if the loss value between the similarity and the label of the training samples meets a preset convergence condition.
[0127] Based on the fourth example of the second aspect, in the fifth example of the second aspect, the similarity determination module is further configured to:
[0128] Determine the word vector matrix corresponding to the two feedback texts in each group of training samples, wherein the word vector matrix includes the semantic vectors of the words included in the feedback text;
[0129] The word interaction matrix of the training samples is determined based on the word vector matrices corresponding to the two feedback texts respectively;
[0130] For each group of training samples, the word interaction matrix is sequentially subjected to convolution, max pooling, and full connection to obtain the similarity between two feedback texts in the training samples.
[0131] Based on the first example of the second aspect, in the sixth example of the second aspect, the above-mentioned device further includes:
[0132] The vector normalization module is used to normalize the semantic vectors of each word obtained during training and then store them in a K-dimensional tree.
[0133] Based on the first example of the second aspect, in the seventh example of the second aspect, the label is also used to indicate whether the time difference between the publication of the two feedback texts is less than or equal to a preset time difference threshold.
[0134] Based on the first example of the second aspect, in the eighth example of the second aspect, the device further includes:
[0135] The prompting module is used to provide feedback indicating that the target video contains at least one topic corresponding to the target keyword.
[0136] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0137] The memory stores computer-executed instructions;
[0138] The at least one processor executes computer execution instructions stored in the memory, causing the electronic device to implement the method described in any of the first aspects.
[0139] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, the computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause a computing device to implement the method described in any one of the first aspects.
[0140] Fifthly, according to one or more embodiments of the present disclosure, a computer program is provided for implementing the method described in any of the first aspects.
[0141] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0142] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0143] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A video feedback processing method, characterized in that, The method includes: Identify target keywords, which are used to indicate abnormal feedback on at least one topic of the video; Based on the semantic vector matching relationship, synonyms of the target keyword are determined, wherein the semantic vector of the target keyword matches the semantic vector of the synonym. The semantic vectors are pre-trained using a machine model and multiple sets of training samples. The training samples include two feedback texts and labels indicating whether the two feedback texts refer to the same video. The machine model generates semantic vectors for each word in the feedback texts during training, determines the similarity between the feedback texts based on the semantic vectors, and adjusts the semantic vectors based on the similarity and the labels. Feedback texts for the same video share the same topic, while feedback texts for different videos have different themes. The machine model comprises: an embedding layer, an interaction sub-layer, a convolutional layer, a pooling layer, and a fully connected layer. The embedding layer generates a semantic vector for each word. The interaction sub-layer generates a word interaction matrix based on the semantic vectors of each word in the two feedback texts. The element in the i-th row and j-th column of the word interaction matrix represents the vector similarity between the i-th word in one feedback text and the j-th word in the other feedback text. The convolutional layer convolves the word interaction matrix to obtain a convolutional matrix. The pooling layer pools the convolutional matrix to obtain a pooling matrix. The fully connected layer fully connects the pooling matrix to obtain the similarity between the two feedback texts. The target video is obtained by matching the feedback text of multiple videos based on the target keywords and the synonyms. The feedback text of the target video includes the target keywords and / or the synonyms. The label is also used to indicate whether the time difference between the publication of the two feedback texts is less than or equal to a preset time difference threshold.
2. The method according to claim 1, characterized in that, The step of determining the synonyms of the target keyword based on the matching relationship of semantic vectors includes: The semantic vectors of the target keywords are obtained from a preset lexicon, wherein the semantic vectors of multiple words included in the preset lexicon are obtained through pre-training of the machine model and the training samples; Calculate the similarity between the semantic vector of the target keyword and the semantic vector of each word in the preset thesaurus; Words whose similarity meets the preset conditions are obtained from the preset word library and used as synonyms of the target keyword. The preset conditions include at least one of the following: the similarity is greater than or equal to a preset similarity threshold, or the similarity is located at the beginning of the descending list.
3. The method according to claim 1, characterized in that, The semantic vectors of the words are obtained through the following steps: In each round of training iteration, for each set of training samples, two feedback texts are generated, and semantic vectors of the words included in the feedback texts are generated. For each set of training samples, the similarity between the two feedback texts is predicted based on the semantic vectors of the words; If the loss value between the similarity and the label of the training samples does not meet the preset convergence condition, the semantic vector of the word is adjusted for the next round of iterative training. If the loss value between the similarity and the label of the training sample satisfies the preset convergence condition, then the semantic vector of the words included in the feedback text is used as the semantic vector of the trained words.
4. The method according to claim 3, characterized in that, For each set of training samples, predicting the similarity between the two feedback texts based on the semantic vectors of the words includes: Determine the word vector matrix corresponding to the two feedback texts in each group of training samples, wherein the word vector matrix includes the semantic vectors of the words included in the feedback text; The word interaction matrix of the training samples is determined based on the word vector matrices corresponding to the two feedback texts respectively; For each group of training samples, the word interaction matrix is sequentially subjected to convolution, max pooling, and full connection to obtain the similarity between two feedback texts in the training samples.
5. The method according to claim 1, characterized in that, The method further includes: The semantic vectors of each word obtained during training are normalized and then stored in a K-dimensional tree.
6. The method according to claim 1, characterized in that, The method further includes: The system indicates that the target video contains at least one topic corresponding to the target keyword, which is an anomaly.
7. A video feedback processing device, characterized in that, include: The target keyword determination module is used to determine target keywords, which are used to represent abnormal feedback on at least one theme of the video; A synonym acquisition module is used to determine synonyms of the target keyword based on the matching relationship of semantic vectors. The semantic vectors of the target keyword and the synonyms are matched. These semantic vectors are pre-trained using a machine model and multiple sets of training samples. The training samples include two feedback texts and tags indicating whether the two feedback texts refer to the same video. The machine model generates semantic vectors for each word in the feedback texts during training, determines the similarity between the feedback texts based on the semantic vectors, and adjusts the semantic vectors based on the similarity and the tags. Feedback texts for the same video are on the same topic, while feedback texts for different videos... The texts are on different topics; the machine model includes: an embedding layer, an interaction sub-layer, a convolutional layer, a pooling layer, and a fully connected layer. The embedding layer is used to generate a semantic vector for each word. The interaction sub-layer is used to generate a word interaction matrix based on the semantic vectors of each word in the two feedback texts. The element in the i-th row and j-th column of the word interaction matrix represents the vector similarity between the i-th word in one feedback text and the j-th word in the other feedback text. The convolutional layer is used to convolve the word interaction matrix to obtain a convolutional matrix. The pooling layer is used to pool the convolutional matrix to obtain a pooling matrix. The fully connected layer is used to fully connect the pooling matrix to obtain the similarity between the two feedback texts. The target video acquisition module is used to match the feedback text of multiple videos to obtain the target video based on the target keywords and the synonyms, wherein the feedback text of the target video includes the target keywords and / or the synonyms; The label is also used to indicate whether the time difference between the publication of the two feedback texts is less than or equal to a preset time difference threshold.
8. An electronic device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the electronic device to perform the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, cause a computing device to implement the method as described in any one of claims 1 to 6.
10. A computer program, characterized in that, The computer program is used to implement the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Video search method, server, client, and storage medium
CN109299328A
Short text similarity calculation method based on multi-dimensional convolution feature
CN109299462A
Video query method and device
CN109783690A