WO2021012493A1 - Short video keyword extraction method and apparatus, and storage medium - Google Patents

Short video keyword extraction method and apparatus, and storage medium Download PDF

Info

Publication number
WO2021012493A1
WO2021012493A1 PCT/CN2019/116933 CN2019116933W WO2021012493A1 WO 2021012493 A1 WO2021012493 A1 WO 2021012493A1 CN 2019116933 W CN2019116933 W CN 2019116933W WO 2021012493 A1 WO2021012493 A1 WO 2021012493A1
Authority
WO
WIPO (PCT)
Prior art keywords
short video
optical flow
keyword extraction
image
neural network
Prior art date
Application number
PCT/CN2019/116933
Other languages
French (fr)
Chinese (zh)
Inventor
许剑勇
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021012493A1 publication Critical patent/WO2021012493A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/74Browsing; Visualisation therefor
    • G06F16/743Browsing; Visualisation therefor a collection of video files or sequences
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/7867Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, title and artist information, manually generated time, location and usage information, user ratings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of artificial intelligence technology, and in particular to a method, device and computer-readable storage medium for extracting related words from short videos.
  • short video data is a type of multimedia data with rich semantics, complex structure, rapid development, and huge data volume. It is also a type of short video data.
  • people are accustomed to implementing video retrieval using text as related words through a human-computer interface, and searching for required video data from various sites distributed on the Internet.
  • it is difficult for people to effectively search for the video data they need from the vast array of video data. The reason is that there is no related word extraction technology based on short videos in the current market.
  • This application provides a short video keyword extraction method, device, and computer-readable storage medium, the main purpose of which is to present the user with accurate extraction results when the user extracts keywords in the short video.
  • a short video keyword extraction method includes: obtaining a short video set, obtaining different frame images of the short video set through timed screenshots, and performing preprocessing operations on the different frame images, Obtain the target image set and tag set and store them in the database; use the difference method to perform target detection on the target image set to obtain a differential image set, and perform posture tracking on the target image set according to the optical flow method to obtain an optical flow atlas Input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, use the training set to train the short video keyword extraction model, and pass the
  • the activation function of the short video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the related word set with all
  • the tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated.
  • the present application also provides a short video keyword extraction device, which includes a memory and a processor, and the memory stores a short video keyword extraction program that can run on the processor.
  • the short video keyword extraction program executes by the processor, the following steps are implemented: obtain a short video set, obtain different frame images of the short video set through timing screenshots, and perform preprocessing operations on the different frame images to obtain
  • the target image set and the tag set are stored in a database;
  • the target image set is detected by a difference method to obtain a difference image set, and the target image set is tracked according to the optical flow method to obtain an optical flow atlas;
  • the activation function of the video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and
  • this application also provides a computer-readable storage medium on which a short video keyword extraction program is stored.
  • the short video keyword extraction program can be used by one or more
  • the processor executes to implement the steps of the short video keyword extraction method as described above.
  • the short video keyword extraction method, device, and computer-readable storage medium proposed in this application obtain a short video set, perform preprocessing operations on the short video set, obtain a training set and a tag set, and compare the pre-built short video keywords
  • the extraction model is trained to obtain a complete model, and the short video input by the user is received according to the trained model for keyword extraction, and the accurate short video keyword extraction result is presented to the user.
  • FIG. 1 is a schematic flowchart of a short video keyword extraction method provided by an embodiment of this application
  • FIG. 2 is a schematic diagram of the internal structure of a short video keyword extraction device provided by an embodiment of the application;
  • FIG. 3 is a schematic diagram of modules of a short video keyword extraction program in a short video keyword extraction device provided by an embodiment of the application.
  • This application provides a short video keyword extraction method.
  • FIG. 1 it is a schematic flowchart of a short video keyword extraction method provided by an embodiment of this application.
  • the method can be executed by a device, and the device can be implemented by software and/or hardware.
  • the short video keyword extraction method includes:
  • the short video collection is obtained by searching a network video library.
  • the timing screenshot is to perform a screenshot operation on the short video at a timing according to the set interval of screenshots to obtain different frame images of the short video.
  • the preprocessing operation includes: performing grayscale, thresholding, median filtering, and scale normalization operations on the image.
  • the specific implementation steps of the preprocessing operation are as follows:
  • the image grayscale processing is to convert a color image into a grayscale image.
  • the brightness information of the grayscale image can fully express the overall and local characteristics of the image, and the grayscale processing of the image can greatly reduce the amount of calculation for subsequent work.
  • the method of image gray-scale processing is to convert the R, G, and B components of the image pixels into the Y component of the YUV color space, that is, the brightness value.
  • the calculation method of the Y component As shown in the following formula:
  • R, G, and B are the R, G, and B values of the image pixel in the RGB color mode.
  • the image thresholding process is an efficient algorithm for binarizing the grayscale image through the OTSU algorithm to obtain a binarized image.
  • the preferred embodiment of the present application presets the gray level t to be the segmentation threshold of the foreground and background of the gray image, and assumes that the proportion of the number of front spots in the image is w 0 , the average gray level is u 0 ; the proportion of background points in the image is w 1 , The average gray level is u 1 , then the total average gray level of the gray image is:
  • the gray scale t at this time is the optimal threshold, and the gray scale value greater than the gray scale t in the gray scale image is set to 255, The gray value smaller than the gray t is set to 0, and the binarized image of the gray image is obtained.
  • the median filter is a non-linear signal processing technique that can effectively suppress noise based on ranking statistical theory.
  • the preferred embodiment of the present application replaces the value of a point in the digital image or digital sequence with the median value of each point in a neighborhood of the point, which is used to approach the surrounding pixel values, thereby Eliminate isolated noise points.
  • the preferred embodiment of the present application performs scale normalization processing on the denoising binarized image points to eliminate the influence of the resolution of the short video on the image.
  • the preferred embodiment of the present application needs to preserve the relative positional relationship of the pose sequence in the time and space dimensions. Therefore, it is necessary to ensure that the translation and zoom scales of the pose in the same video are consistent, and the coordinate components The zoom ratio is also consistent.
  • d max ⁇ w,h ⁇ , w and h are the width and height of the video respectively, after normalization, x,y ⁇ (-1,1).
  • the preferred embodiment of the present application performs target detection on the target image set by the difference method between adjacent frames to obtain a difference image set.
  • the adjacent inter-frame difference method uses the difference between two adjacent frames of images in a video sequence. When the background changes little and no moving target appears, the resulting pixel difference will be small. If the pixel difference is relatively large, then It is believed to be caused by entering the sports target.
  • the specific description formula is as follows:
  • I k (x, y) and I k-1 (x, y) are the current frame image and the previous frame of the video respectively
  • D k (x, y) is the binary image after the difference
  • T is The set threshold for differential segmentation.
  • the difference image is considered to be the background and its value is set to 0; when the pixel value in the obtained difference image is greater than the preset difference segmentation threshold, set The difference image is determined to be a foreground pixel, and its value is set to 1, so as to obtain the foreground moving target, obtain the difference image set, and realize target detection.
  • a preferred embodiment of the present application performs posture tracking on the target image set according to the optical flow method to obtain an optical flow atlas.
  • the optical flow method evaluates the deformation between two adjacent frame images, and calculates the movement of each pixel position of the two adjacent frame images from time T to T+t.
  • the specific calculation formula is as follows:
  • I(x,y) represents the two frames of images x and y
  • I represents the partial derivative of the coordinates
  • t represents the time difference between the two frames of images.
  • the gray-level conservation hypothesis means that the gray-level mode of two adjacent images in the image sequence remains unchanged when the corresponding points are optimally matched.
  • the preferred embodiment of the present application calculates the aperture problem of the image constraint equation through the Horn-Schunck optical flow algorithm:
  • E represents the aperture of the image constraint equation
  • the Horn-Schunck optical flow algorithm refers to the reduction of the optical flow solution to the extreme value of the solution, and the solution is solved by an iterative method.
  • the iterative equation is as follows:
  • is the smoothing control factor.
  • the value of ⁇ is affected by the noise in the image. When the noise is strong, it means that the confidence of the image data itself is low, and it needs to rely more on optical flow constraints, indicating that ⁇ is a larger value at this time.
  • the posture tracking of the target image set is performed to obtain the optical flow atlas.
  • the short video keyword extraction model includes a two-branch convolutional neural network model constructed by a dual-stream method, wherein one of the two-branch convolutional neural network model is a branch model It is a spatial convolutional neural network model, and another branch model is a temporal convolutional neural network model.
  • the literal meaning of the Shuangliu method refers to the fact that two small streams flow separately and finally converge together.
  • the name of one stream is the information of the differential image
  • the name of the other stream is the information of the optical flow diagram.
  • the convolutional neural network is a feed-forward neural network. Its artificial neurons can respond to a part of the surrounding units in the coverage area. Its basic structure includes two layers. One is the feature extraction layer. The input of each neuron is The local receptive fields of the previous layer are connected, and the local features are extracted. Once the local feature is extracted, the positional relationship between it and other features is also determined; the second is the feature mapping layer, each computing layer of the network is composed of multiple feature maps, and each feature map is a plane. The weights of all neurons on the plane are equal.
  • the convolutional neural network model includes an input layer, a convolutional layer, a pooling layer, and an output layer.
  • the differential image is input into the input layer of the spatial convolutional neural network model
  • the optical flow graph is input into the input layer of the temporal convolutional neural network model
  • each In the convolutional layer the differential image and the optical flow graph are respectively convolved by a preset set of filters to extract the feature vector
  • the pooling layer is used to perform the pooling operation on the feature vector and input to the fully connected Layer, normalize and calculate the feature vector through the activation function, and input the calculation result to the output layer
  • the output layer outputs the picture content set in the difference image set and the time series information set in the optical flow atlas to obtain The associated word set of the differential image set and the optical flow atlas.
  • the normalization process is to "compress" a K-dimensional vector containing any real number to another K-dimensional real vector, so that the range of
  • the activation function in the embodiment of this application is the softmax function, and the calculation formula is as follows:
  • O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network
  • I j represents the input value of the jth neuron in the output layer of the convolutional neural network
  • t represents all The total number of neurons in the output layer
  • e is an infinite non-recurring decimal
  • s is the error value of the output picture content and timing information and the differential image and optical flow diagram
  • k is the number of the image set
  • y i is the differential image and optical flow diagram
  • y′ i is the output The picture content and timing information.
  • S4. Receive the input short video, use the short video keyword extraction model to obtain related words of the short video, and perform keyword extraction on the related words to obtain the keywords of the short video.
  • keyword extraction is performed on the related word set through a keyword extraction algorithm.
  • the keyword extraction algorithm uses statistical information, word vector information, and dependency syntax information between words to calculate the correlation strength between words by constructing a dependency relationship graph, and iteratively calculates the importance score of words using the TextRank algorithm, and calculates the importance of words according to the sentence
  • the result of the dependency syntax analysis is to construct an undirected graph for all non-stop words, and calculate the weight of the edge by using the gravity value between the words and the degree of dependency correlation.
  • the TextRank algorithm includes:
  • len(W i , W j ) represents the length of the dependency path between words W i and W j
  • b is a hyperparameter
  • tfidf (W) is a TF-IDF value of word W
  • TF represents term frequency
  • IDF represents inverse document frequency index
  • d is the Euclidean distance between the vectors of words W i and W words of J;
  • W i is associated with a set of vertices
  • is the damping coefficient
  • Sort all words according to the importance score select a preset number of keywords from the words according to the sort, and perform symbolic grammar splicing on the extracted keywords to obtain short video related words.
  • the invention also provides a short video keyword extraction device.
  • FIG. 2 it is a schematic diagram of the internal structure of a short video keyword extraction device provided by an embodiment of this application.
  • the short video keyword extraction device 1 may be a PC (Personal Computer, personal computer), or a terminal device such as a smart phone, a tablet computer, or a portable computer, or a server.
  • the short video keyword extraction device 1 at least includes a memory 11, a processor 12, a communication bus 13, and a network interface 14.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc.
  • the memory 11 may be an internal storage unit of the short video keyword extraction device 1, for example, the hard disk of the short video keyword extraction device 1.
  • the memory 11 may also be an external storage device of the short video keyword extraction device 1, for example, a plug-in hard disk equipped on the short video keyword extraction device 1, a Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc.
  • the memory 11 may also include both an internal storage unit of the short video keyword extraction device 1 and an external storage device.
  • the memory 11 can be used not only to store application software and various data installed in the short video keyword extraction device 1, such as the code of the short video keyword extraction program 01, etc., but also to temporarily store data that has been output or will be output. .
  • the processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip in some embodiments, and is used to run the program code or processing stored in the memory 11 Data, such as execution of short video keyword extraction program 01, etc.
  • CPU central processing unit
  • controller microcontroller
  • microprocessor or other data processing chip in some embodiments, and is used to run the program code or processing stored in the memory 11 Data, such as execution of short video keyword extraction program 01, etc.
  • the communication bus 13 is used to realize the connection and communication between these components.
  • the network interface 14 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is usually used to establish a communication connection between the device 1 and other electronic devices.
  • the device 1 may also include a user interface.
  • the user interface may include a display (Display) and an input unit such as a keyboard (Keyboard).
  • the optional user interface may also include a standard wired interface and a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light emitting diode) touch device, etc.
  • the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the short video keyword extraction device 1 and to display a visualized user interface.
  • Figure 2 only shows the short video keyword extraction device 1 with components 11-14 and short video keyword extraction program 01. Those skilled in the art can understand that the structure shown in Figure 1 does not constitute a key to short video
  • the definition of the word extraction device 1 may include fewer or more components than shown, or a combination of certain components, or a different component arrangement.
  • the short video keyword extraction program 01 is stored in the memory 11; the processor 12 implements the following steps when executing the short video keyword extraction program 01 stored in the memory 11:
  • Step 1 Obtain a short video set, obtain different frame images of the short video set through timing screenshots, perform a preprocessing operation on the different frame images, obtain a target image set and a tag set, and store them in a database.
  • the short video is obtained by searching a network video library.
  • the timing screenshot is to perform a screenshot operation on the short video at a timing according to the set interval of screenshots to obtain different frame images of the short video.
  • the preprocessing operation includes: performing grayscale, thresholding, median filtering, and scale normalization operations on the image.
  • the specific implementation steps of the preprocessing operation are as follows:
  • the image grayscale processing is to convert a color image into a grayscale image.
  • the brightness information of the grayscale image can fully express the overall and local characteristics of the image, and the grayscale processing of the image can greatly reduce the amount of calculation for subsequent work.
  • the method of image gray-scale processing is to convert the R, G, and B components of the image pixels into the Y component of the YUV color space, that is, the brightness value.
  • the calculation method of the Y component As shown in the following formula:
  • R, G, and B are the R, G, and B values of the image pixel in the RGB color mode.
  • the image thresholding process is an efficient algorithm for binarizing the grayscale image through the OTSU algorithm to obtain a binarized image.
  • the preferred embodiment of the present application presets the gray level t to be the segmentation threshold of the foreground and background of the gray image, and assumes that the proportion of the number of front spots in the image is w 0 , the average gray level is u 0 ; the proportion of background points in the image is w 1 , The average gray level is u 1 , then the total average gray level of the gray image is:
  • the gray scale t at this time is the optimal threshold, and the gray scale value greater than the gray scale t in the gray scale image is set to 255, The gray value smaller than the gray t is set to 0, and the binarized image of the gray image is obtained.
  • the median filter is a non-linear signal processing technique that can effectively suppress noise based on ranking statistical theory.
  • the preferred embodiment of the present application replaces the value of a point in the digital image or digital sequence with the median value of each point in a neighborhood of the point, which is used to approach the surrounding pixel values, thereby Eliminate isolated noise points.
  • the preferred embodiment of the present application performs scale normalization processing on the denoising binarized image points to eliminate the influence of the resolution of the short video on the image.
  • the preferred embodiment of the present application needs to preserve the relative positional relationship of the pose sequence in the time and space dimensions. Therefore, it is necessary to ensure that the translation and zoom scales of the pose in the same video are consistent, and the coordinate components The zoom ratio is also consistent.
  • d max ⁇ w,h ⁇ , w and h are the width and height of the video respectively, after normalization, x,y ⁇ (-1,1).
  • Step 2 Perform target detection on the target image set using the difference method to obtain a difference image set, and perform posture tracking on the target image set according to the optical flow method to obtain an optical flow atlas.
  • the preferred embodiment of the present application performs target detection on the target image set by the difference method between adjacent frames to obtain a difference image set.
  • the adjacent inter-frame difference method uses the difference between two adjacent frames of images in a video sequence. When the background changes little and no moving target appears, the resulting pixel difference will be small. If the pixel difference is relatively large, then It is believed to be caused by entering the sports target.
  • the specific description formula is as follows:
  • I k (x, y) and I k-1 (x, y) are the current frame image and the previous frame of the video respectively
  • D k (x, y) is the binary image after the difference
  • T is The set threshold for differential segmentation.
  • the difference image is considered to be the background and its value is set to 0; when the pixel value in the obtained difference image is greater than the preset difference segmentation threshold, set The difference image is determined to be a foreground pixel, and its value is set to 1, so as to obtain the foreground moving target, obtain the difference image set, and realize target detection.
  • a preferred embodiment of the present application performs posture tracking on the target image set according to the optical flow method to obtain an optical flow atlas.
  • the optical flow method evaluates the deformation between two adjacent frame images, and calculates the movement of each pixel position of the two adjacent frame images from time T to T+t.
  • the specific calculation formula is as follows:
  • I(x,y) represents the two frames of images x and y
  • I represents the partial derivative of the coordinates
  • t represents the time difference between the two frames of images.
  • the gray-level conservation hypothesis means that the gray-level mode of two adjacent images in the image sequence remains unchanged when the corresponding points are optimally matched.
  • the preferred embodiment of the present application calculates the aperture problem of the image constraint equation through the Horn-Schunck optical flow algorithm:
  • E represents the aperture of the image constraint equation
  • the Horn-Schunck optical flow algorithm refers to the reduction of the optical flow solution to the extreme value of the solution, and the solution is solved by an iterative method.
  • the iterative equation is as follows:
  • is the smoothing control factor.
  • the value of ⁇ is affected by the noise in the image. When the noise is strong, it means that the confidence of the image data itself is low, and it needs to rely more on optical flow constraints, indicating that ⁇ is a larger value at this time.
  • the posture tracking of the target image set is performed to obtain the optical flow atlas.
  • Step 3 Input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, and use the training set to perform training on the short video keyword extraction model.
  • the activation function of the short video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the related word set with
  • the tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated. When the loss function value is less than the threshold, the short video keyword extraction model exits training.
  • the short video keyword extraction model includes a two-branch convolutional neural network model constructed by a dual-stream method, wherein one of the two-branch convolutional neural network model is a branch model It is a spatial convolutional neural network model, and another branch model is a temporal convolutional neural network model.
  • the literal meaning of the Shuangliu method refers to the fact that two small streams flow separately and finally converge together.
  • the name of one stream is the information of the differential image
  • the name of the other stream is the information of the optical flow diagram.
  • the convolutional neural network is a feed-forward neural network. Its artificial neurons can respond to a part of the surrounding units in the coverage area. Its basic structure includes two layers. One is the feature extraction layer. The input of each neuron is The local receptive fields of the previous layer are connected, and the local features are extracted. Once the local feature is extracted, the positional relationship between it and other features is also determined; the second is the feature mapping layer, each computing layer of the network is composed of multiple feature maps, and each feature map is a plane. The weights of all neurons on the plane are equal.
  • the convolutional neural network model includes an input layer, a convolutional layer, a pooling layer, and an output layer.
  • the differential image is input into the input layer of the spatial convolutional neural network model
  • the optical flow graph is input into the input layer of the temporal convolutional neural network model
  • each In the convolutional layer the differential image and the optical flow graph are respectively convolved by a preset set of filters to extract the feature vector
  • the pooling layer is used to perform the pooling operation on the feature vector and input to the fully connected Layer, normalize and calculate the feature vector through the activation function, and input the calculation result to the output layer
  • the output layer outputs the picture content set in the difference image set and the time series information set in the optical flow atlas to obtain The associated word set of the differential image set and the optical flow atlas.
  • the normalization process is to "compress" a K-dimensional vector containing any real number to another K-dimensional real vector, so that the range of
  • the activation function in the embodiment of this application is the softmax function, and the calculation formula is as follows:
  • O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network
  • I j represents the input value of the jth neuron in the output layer of the convolutional neural network
  • t represents The total amount of neurons in the output layer
  • e is an infinite non-recurring decimal
  • s is the error value of the output picture content and timing information and the differential image and optical flow diagram
  • k is the number of the image set
  • y i is the differential image and optical flow diagram
  • y′ i is the output The picture content and timing information.
  • Step 4 Receive the input short video, use the short video keyword extraction model to obtain related words of the short video, and perform keyword extraction on the related words to obtain the keywords of the short video.
  • keyword extraction is performed on the related word set through a keyword extraction algorithm.
  • the keyword extraction algorithm uses statistical information, word vector information, and dependency syntax information between words to calculate the correlation strength between words by constructing a dependency relationship graph, and iteratively calculates the importance score of words using the TextRank algorithm, and calculates the importance of words according to the sentence
  • the result of the dependency syntax analysis is to construct an undirected graph for all non-stop words, and calculate the weight of the edge by using the gravity value between the words and the degree of dependency correlation.
  • the TextRank algorithm includes:
  • len(W i , W j ) represents the length of the dependency path between words W i and W j
  • b is a hyperparameter
  • tfidf (W) is a TF-IDF value of word W
  • TF represents term frequency
  • IDF represents inverse document frequency index
  • d is the Euclidean distance between the vectors of words W i and W words of J;
  • W i is associated with a set of vertices
  • is the damping coefficient
  • Sort all words according to the importance score select a preset number of keywords from the words according to the sort, and perform symbolic grammar splicing on the extracted keywords to obtain short video related words.
  • the short video keyword extraction program can also be divided into one or more modules, and the one or more modules are stored in the memory 11 and run by one or more processors (this embodiment For example, it is executed by the processor 12) to complete this application.
  • the module referred to in this application refers to a series of computer program instruction segments that can complete specific functions, and is used to describe the short video keyword extraction program in the short video keyword extraction device The implementation process.
  • the short video keyword extraction program can be divided into The short video acquisition module 10, the image preprocessing module 20, the model training module 30, and the keyword extraction module 40 are exemplary:
  • the short video acquisition module 10 is configured to obtain a short video set by searching a network video library, and perform a regular screenshot operation on the short video set.
  • the image preprocessing module 20 is configured to perform target detection on the target image set using a differential method to obtain a differential image set, and perform posture tracking on the target image set according to an optical flow method to obtain an optical flow atlas.
  • the model training module 30 is configured to: input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, and use the training set to compare the short video keyword
  • the extraction model is trained, and the image content set in the differential image set and the time series information set in the optical flow atlas are output through the activation function of the short video keyword extraction model to obtain the associated word set of the differential image set and the optical flow atlas, And input the associated word set and the tag set into the loss function of the short video keyword extraction model, and calculate the loss function value until the loss function value is less than the threshold value, the short video keyword extraction model Quit training.
  • the keyword extraction module 40 is configured to: receive an input short video, use the short video keyword extraction model to obtain related words of the short video, and perform keyword extraction on the related words to obtain the key of the short video word.
  • an embodiment of the present application also proposes a computer-readable storage medium, the computer-readable storage medium stores a short video keyword extraction program, and the short video keyword extraction program can be executed by one or more processors To achieve the following operations:
  • Obtain a short video set obtain different frame images of the short video set through timing screenshots, perform a preprocessing operation on the different frame images to obtain a target image set and a tag set, and store them in a database;
  • the activation function of the video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the associated word set with the
  • the tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated, until the loss function value is less than the threshold, the short video keyword extraction model exits training;
  • Receive the input short video use the short video keyword extraction model to obtain the related words of the short video, and perform keyword extraction on the related words to obtain the keywords of the short video.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Human Computer Interaction (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Library & Information Science (AREA)
  • Image Analysis (AREA)

Abstract

A short video keyword extraction method and apparatus, and a computer-readable storage medium. The method comprises: acquiring a short video set, obtaining different frames of images of the short video set by means of a regular screenshot, performing a pre-processing operation on the different frames of images to obtain a target image set and a tag set, and respectively performing target detection and attitude tracking on the target image set using a difference method and an optical flow method to obtain a difference image set and an optical flow atlas; training a pre-built short video keyword extraction model using the difference image set, the optical flow atlas and the tag set to obtain a trained short video keyword extraction model; and receiving a short video, using the trained short video keyword extraction model to obtain associated words of the short video, and performing keyword extraction on the associated words to obtain keywords of the short video. By means of the method, precise extraction of keywords of a short video is realized.

Description

短视频关键词提取方法、装置及存储介质Short video keyword extraction method, device and storage medium
本申请要求于2019年7月23日提交中国专利局,申请号为201910664967.2、发明名称为“短视频关键词提取方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 23, 2019, the application number is 201910664967.2. The invention title is "short video keyword extraction method, device and storage medium", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及人工智能技术领域,尤其涉及一种从短视频中提取关联词的方法、装置及计算机可读存储介质。This application relates to the field of artificial intelligence technology, and in particular to a method, device and computer-readable storage medium for extracting related words from short videos.
背景技术Background technique
随着数字媒体技术、电子技术、通信技术及互联网络的飞速发展,数据资源如雨后春笋般随之急剧膨胀。在这些海量的数据资源中,短视频数据是一类语义丰富、结构复杂、发展迅猛、数据量庞大的多媒体数据,也是一类长度较短的视频数据。在基于互联网的视频检索系统中,人们习惯于通过人机界面以文本为关联词实现视频检索,从分布在互联网的各站点,搜索所需的视频数据。依据现有的视频检索系统,人们很难从浩如烟海的视频数据中有效地搜索到自己需要的视频数据。究其原因,当前市场并未有基于短视频的关联词提取技术。With the rapid development of digital media technology, electronic technology, communication technology, and the Internet, data resources have sprung up rapidly. Among these massive data resources, short video data is a type of multimedia data with rich semantics, complex structure, rapid development, and huge data volume. It is also a type of short video data. In Internet-based video retrieval systems, people are accustomed to implementing video retrieval using text as related words through a human-computer interface, and searching for required video data from various sites distributed on the Internet. According to the existing video retrieval system, it is difficult for people to effectively search for the video data they need from the vast array of video data. The reason is that there is no related word extraction technology based on short videos in the current market.
发明内容Summary of the invention
本申请提供一种短视频关键词提取方法、装置及计算机可读存储介质,其主要目的在于当用户在短视频中进行关键词提取时,给用户呈现出精准的提取结果。This application provides a short video keyword extraction method, device, and computer-readable storage medium, the main purpose of which is to present the user with accurate extraction results when the user extracts keywords in the short video.
为实现上述目的,本申请提供的一种短视频关键词提取方法,包括:获取短视频集,通过定时截图得到所述短视频集的不同帧图像,对所述不同帧图像进行预处理操作,得到目标图像集和标签集,存入数据库中;利用差分法对所述目标图像集进行目标检测,得到差分图像集,根据光流法对所述目标图像集进行姿态跟踪,得到光流图集;将所述差分图像集和所述光流图集作为训练集输入至预先构建的短视频关键词提取模型中,利用所述训练集对所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,并将所述关联词集和所述标签集输入至所述短视频关键词提取模型的损失函数中,计算出损失函数值,直至所述损失函数值小于阈值时,所述短视频关键词提取模型退出训练;接收输入的短视频,利用所述短视频关键词提取模型得到所述短视频的关联词,并对所述关联词进行关键词提取,得到所述短视频的关键词。In order to achieve the above objective, a short video keyword extraction method provided by this application includes: obtaining a short video set, obtaining different frame images of the short video set through timed screenshots, and performing preprocessing operations on the different frame images, Obtain the target image set and tag set and store them in the database; use the difference method to perform target detection on the target image set to obtain a differential image set, and perform posture tracking on the target image set according to the optical flow method to obtain an optical flow atlas Input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, use the training set to train the short video keyword extraction model, and pass the The activation function of the short video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the related word set with all The tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated. When the loss function value is less than the threshold, the short video keyword extraction model exits training; receiving the input short video Using the short video keyword extraction model to obtain related words of the short video, and perform keyword extraction on the related words to obtain the keywords of the short video.
此外,为实现上述目的,本申请还提供一种短视频关键词提取装置,该装置包括存储器和处理器,所述存储器中存储有可在所述处理器上运行的短视频关键词提取程序,所述短视频关键词提取程序被所述处理器执行时实现如下步骤:获取短视频集,通过定时截图得到所述短视频集的不同帧图像,对所述不同帧图像进行预处理操作,得到目标图像集和标签集,存入数据库中;利用差分法对所述目标图像集进行目标检测,得到差分图像集,根据光流法对所述目标图像集进行姿态跟踪,得到光流图集;将所述差分图像集和所述光流图集作为训练集输入至预先构建的短视频关键词提取模型中,利用所述训练集对所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,并将所述关联词集和所述标签集输入至所述短视频关键词提取模型的损失函数中,计算出损失函数值,直至所述损失函数值小于阈值时,所述短视频关键词提取模型退出训练;接收输入的短视频,利用所述短视频关键词提取模型得到所述短视频的关联词,并对所述关联词进行关键词提取,得到所述短视频的关键词。In addition, in order to achieve the above objective, the present application also provides a short video keyword extraction device, which includes a memory and a processor, and the memory stores a short video keyword extraction program that can run on the processor. When the short video keyword extraction program is executed by the processor, the following steps are implemented: obtain a short video set, obtain different frame images of the short video set through timing screenshots, and perform preprocessing operations on the different frame images to obtain The target image set and the tag set are stored in a database; the target image set is detected by a difference method to obtain a difference image set, and the target image set is tracked according to the optical flow method to obtain an optical flow atlas; Input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, use the training set to train the short video keyword extraction model, and pass the short video The activation function of the video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the associated word set with the The tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated. When the loss function value is less than the threshold, the short video keyword extraction model exits training; receiving the input short video, The short video keyword extraction model is used to obtain related words of the short video, and keyword extraction is performed on the related words to obtain the keywords of the short video.
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有短视频关键词提取程序,所述短视频关键词提取程序可被一个或者多个处理器执行,以实现如上所述的短视频关键词提取方法的步骤。In addition, in order to achieve the above-mentioned object, this application also provides a computer-readable storage medium on which a short video keyword extraction program is stored. The short video keyword extraction program can be used by one or more The processor executes to implement the steps of the short video keyword extraction method as described above.
本申请提出的短视频关键词提取方法、装置及计算机可读存储介质,获短视频集,对所述短视频集进行预处理操作,得到训练集和标签集,对预先构建的短视频关键词提取模型进行训练,得到完整的模型,根据所述训练好的模型接收用户输入的短视频进行关键词提取,给所述用户呈现出精准的短视频关键词提取结果。The short video keyword extraction method, device, and computer-readable storage medium proposed in this application obtain a short video set, perform preprocessing operations on the short video set, obtain a training set and a tag set, and compare the pre-built short video keywords The extraction model is trained to obtain a complete model, and the short video input by the user is received according to the trained model for keyword extraction, and the accurate short video keyword extraction result is presented to the user.
附图说明Description of the drawings
图1为本申请一实施例提供的短视频关键词提取方法的流程示意图;FIG. 1 is a schematic flowchart of a short video keyword extraction method provided by an embodiment of this application;
图2为本申请一实施例提供的短视频关键词提取装置的内部结构示意图;2 is a schematic diagram of the internal structure of a short video keyword extraction device provided by an embodiment of the application;
图3为本申请一实施例提供的短视频关键词提取装置中短视频关键词提取程序的模块示意图。3 is a schematic diagram of modules of a short video keyword extraction program in a short video keyword extraction device provided by an embodiment of the application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the application, and are not used to limit the application.
本申请提供一种短视频关键词提取方法。参照图1所示,为本申请一实施例提供的短视频关键词提取方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。This application provides a short video keyword extraction method. Referring to FIG. 1, it is a schematic flowchart of a short video keyword extraction method provided by an embodiment of this application. The method can be executed by a device, and the device can be implemented by software and/or hardware.
在本实施例中,短视频关键词提取方法包括:In this embodiment, the short video keyword extraction method includes:
S1、获取短视频集,通过定时截图得到所述短视频集的不同帧图像,对所述不同帧图像进行预处理操作,得到目标图像集和标签集,存入数据库中。S1. Obtain a short video set, obtain different frame images of the short video set through timing screenshots, perform a preprocessing operation on the different frame images to obtain a target image set and a tag set, and store them in a database.
本申请较佳实施例中,所述短视频集通过搜索网络视频库得到。所述定时截图是根据设置的截图的间隔时间,对所述短视频定时进行截屏操作,得到所述短视频的不同帧图像。In a preferred embodiment of the present application, the short video collection is obtained by searching a network video library. The timing screenshot is to perform a screenshot operation on the short video at a timing according to the set interval of screenshots to obtain different frame images of the short video.
本申请较佳实施例中,所述预处理操作包含:对图像进行灰度化、阈值化、中值滤波以及尺度归一化操作。所述预处理操作具体实施步骤如下所示:In a preferred embodiment of the present application, the preprocessing operation includes: performing grayscale, thresholding, median filtering, and scale normalization operations on the image. The specific implementation steps of the preprocessing operation are as follows:
a、图像灰度化处理:a. Image grayscale processing:
所述图像灰度化处理是将彩色图像转换为灰度图像。灰度图像的亮度信息完全能够表达图像的整体和局部的特征,并且对图像进行灰度化处理之后可以大大降低后续工作的计算量。The image grayscale processing is to convert a color image into a grayscale image. The brightness information of the grayscale image can fully express the overall and local characteristics of the image, and the grayscale processing of the image can greatly reduce the amount of calculation for subsequent work.
本申请较佳实施例中,所述图像灰度化处理的方法是将图像像素点的R、G、B分量转换为YUV的颜色空间的Y分量,即亮度值,所述Y分量的计算方法如下式所示:In a preferred embodiment of the present application, the method of image gray-scale processing is to convert the R, G, and B components of the image pixels into the Y component of the YUV color space, that is, the brightness value. The calculation method of the Y component As shown in the following formula:
Y=0.3R+0.59G+0.11BY=0.3R+0.59G+0.11B
其中R、G、B分别是RGB色彩模式中图像像素点的R、G、B值。Among them, R, G, and B are the R, G, and B values of the image pixel in the RGB color mode.
b、图像阈值化处理:b. Image thresholding:
所述图像阈值化处理通过OTSU算法对所述灰度图像进行二值化的高效算法,以得到二值化图像。本申请较佳实施例预设灰度t为灰度图像的前景与背景的分割阈值,并假设前景点数占图像比例为w 0,平均灰度为u 0;背景点数占图像比例为w 1,平均灰度为u 1,则灰度图像的总平均灰度为: The image thresholding process is an efficient algorithm for binarizing the grayscale image through the OTSU algorithm to obtain a binarized image. The preferred embodiment of the present application presets the gray level t to be the segmentation threshold of the foreground and background of the gray image, and assumes that the proportion of the number of front spots in the image is w 0 , the average gray level is u 0 ; the proportion of background points in the image is w 1 , The average gray level is u 1 , then the total average gray level of the gray image is:
u=w 0*u 0+w 1*u 1u=w 0 *u 0 +w 1 *u 1 ,
灰度图像的前景和背景图象的方差为:The variance of the foreground and background image of the grayscale image is:
g=w 0*(u 0-u)*(u 0-u)+w 1*(u 1-u)*(u 1-u)=w 0*w 1*(u 0-u 1)*(u 0-u 1), g=w 0 *(u 0 -u)*(u 0 -u)+w 1 *(u 1 -u)*(u 1 -u)=w 0 *w 1 *(u 0 -u 1 )* (u 0 -u 1 ),
其中,当方差g最大时,则此时前景和背景差异最大,此时的灰度t为最佳阈值,并将所述灰度图像中大于所述灰度t的灰度值设置为255,小于所述灰度t的灰度值设置为0,得到所述灰度图像的二值化图像。Wherein, when the variance g is the largest, the difference between the foreground and the background is the largest at this time, the gray scale t at this time is the optimal threshold, and the gray scale value greater than the gray scale t in the gray scale image is set to 255, The gray value smaller than the gray t is set to 0, and the binarized image of the gray image is obtained.
c、中值滤波处理:c. Median filter processing:
所述中值滤波是基于排序统计理论的一种能有效抑制噪声的非线性信号处理技术。本申请较佳实施例通过对所述二值化图像中的数字图像或数字序列中一点的值用该点的一个邻域中各点值的中值代替,用于接近周围的像素值,从而消除孤立的噪声点。The median filter is a non-linear signal processing technique that can effectively suppress noise based on ranking statistical theory. The preferred embodiment of the present application replaces the value of a point in the digital image or digital sequence with the median value of each point in a neighborhood of the point, which is used to approach the surrounding pixel values, thereby Eliminate isolated noise points.
d、图像尺度归一化处理:d. Image scale normalization processing:
本申请较佳实施例通过对所述消噪的二值化图像点进行尺度归一化处理,以消除短视频的分辨率对图像的影响。其中,在进行尺度归一化时,本申请较佳实施例需要保留姿态序列在时间和空间维度的相对位置关系,因此,需要保证同一视频中姿态的平移和缩放尺度是一致的,并且坐标分量缩放比例也是一致的。The preferred embodiment of the present application performs scale normalization processing on the denoising binarized image points to eliminate the influence of the resolution of the short video on the image. Among them, when performing scale normalization, the preferred embodiment of the present application needs to preserve the relative positional relationship of the pose sequence in the time and space dimensions. Therefore, it is necessary to ensure that the translation and zoom scales of the pose in the same video are consistent, and the coordinate components The zoom ratio is also consistent.
预设所述消噪的二值化图像中任意一点的原始坐标为(x 0,y 0),归一化后坐标为(x,y),即: It is preset that the original coordinates of any point in the denoised binarized image are (x 0 , y 0 ), and the normalized coordinates are (x, y), namely:
Figure PCTCN2019116933-appb-000001
Figure PCTCN2019116933-appb-000001
其中,d=max{w,h},w和h分别为视频的宽和高,归一化后,x,y∈(-1,1)。Among them, d=max{w,h}, w and h are the width and height of the video respectively, after normalization, x,y∈(-1,1).
S2、利用差分法对所述目标图像集进行目标检测,得到差分图像集,根据光流法对所述目标图像集进行姿态跟踪,得到光流图集。S2. Perform target detection on the target image set using a difference method to obtain a difference image set, and perform posture tracking on the target image set according to the optical flow method to obtain an optical flow atlas.
本申请较佳实施例通过相邻帧间差分法对所述目标图像集进行目标检测,得到差分图像集。所述相邻帧间差分法通过将视频序列中相邻两帧图像进行差分,当背景变化不大且没有运动目标出现时,得到的像素差值会很小,如果像素差值比较大,则认为是迸入运动目标引起的。具体的描述公式如下:The preferred embodiment of the present application performs target detection on the target image set by the difference method between adjacent frames to obtain a difference image set. The adjacent inter-frame difference method uses the difference between two adjacent frames of images in a video sequence. When the background changes little and no moving target appears, the resulting pixel difference will be small. If the pixel difference is relatively large, then It is believed to be caused by entering the sports target. The specific description formula is as follows:
Figure PCTCN2019116933-appb-000002
Figure PCTCN2019116933-appb-000002
其中,I k(x,y)和I k-1(x,y)分别为视频的当前帧图像和上一帧图像,D k(x,y)为差分后的二值化图像,T为设定的差分分割阈值。当得到的差分图像中像素值小于等于预设的差分分割阈值时,认为所述差分图像是背景,将其值设为0;当得到的差分图像中像素大于预设的差分分割阈值时,设定所述差分图像是前景像素,将其值设为1,从而获取前景运动目标,得到差分图像集,实现目标检测。 Among them, I k (x, y) and I k-1 (x, y) are the current frame image and the previous frame of the video respectively, D k (x, y) is the binary image after the difference, and T is The set threshold for differential segmentation. When the pixel value in the obtained difference image is less than or equal to the preset difference segmentation threshold, the difference image is considered to be the background and its value is set to 0; when the pixel value in the obtained difference image is greater than the preset difference segmentation threshold, set The difference image is determined to be a foreground pixel, and its value is set to 1, so as to obtain the foreground moving target, obtain the difference image set, and realize target detection.
进一步地,本申请较佳实施例根据光流法对所述目标图像集进行姿态跟踪,得到光流图集。所述光流法评估了2幅相邻帧图像的之间的变形,计算出所述2幅相邻帧图像在时间T到T+t之间每个像素点位置的移动。具体计算公式如下所示:Further, a preferred embodiment of the present application performs posture tracking on the target image set according to the optical flow method to obtain an optical flow atlas. The optical flow method evaluates the deformation between two adjacent frame images, and calculates the movement of each pixel position of the two adjacent frame images from time T to T+t. The specific calculation formula is as follows:
根据图像约束方程计算出所述目标图像集的空间和时间坐标偏导数:Calculate the partial derivatives of the space and time coordinates of the target image set according to the image constraint equation:
Figure PCTCN2019116933-appb-000003
Figure PCTCN2019116933-appb-000003
其中,I(x,y)表示两帧图像x和y,I表示坐标的偏导数,t表示两帧图像的时间差。Among them, I(x,y) represents the two frames of images x and y, I represents the partial derivative of the coordinates, and t represents the time difference between the two frames of images.
利用灰度守恒假设,对所述图像约束方程进行变换得到:Using the assumption of conservation of gray level, transform the image constraint equation to obtain:
Figure PCTCN2019116933-appb-000004
Figure PCTCN2019116933-appb-000004
所述灰度守恒假设是指图像序列中的相邻两幅图像在进行相应点的最佳匹配时,其灰度模式保持不变。The gray-level conservation hypothesis means that the gray-level mode of two adjacent images in the image sequence remains unchanged when the corresponding points are optimally matched.
进一步地,本申请较佳实施例通过Horn-Schunck光流算法计算出所述图像约束方程的孔径问题:Further, the preferred embodiment of the present application calculates the aperture problem of the image constraint equation through the Horn-Schunck optical flow algorithm:
Figure PCTCN2019116933-appb-000005
Figure PCTCN2019116933-appb-000005
其中,E表示所述图像约束方程的孔径,
Figure PCTCN2019116933-appb-000006
Figure PCTCN2019116933-appb-000007
分别表示u邻域和v邻域中的均值。所述Horn-Schunck光流算法指的是将光流求解归结成求解极值, 并利用迭代法进行求解,迭代方程如下所示:
Where E represents the aperture of the image constraint equation,
Figure PCTCN2019116933-appb-000006
with
Figure PCTCN2019116933-appb-000007
Denote the mean value in the u neighborhood and v neighborhood respectively. The Horn-Schunck optical flow algorithm refers to the reduction of the optical flow solution to the extreme value of the solution, and the solution is solved by an iterative method. The iterative equation is as follows:
Figure PCTCN2019116933-appb-000008
Figure PCTCN2019116933-appb-000008
其中,λ为平滑控制因子。所述λ的值受图像中存在的噪声的影响,当存在噪声较强,说明图像数据本身的置信度较低,需要更多的依赖光流约束,表明此时λ为较大的值。本申请较佳实施例中通过预设λ为较小的值,对所述目标图像集进行姿态跟踪,得到光流图集。Among them, λ is the smoothing control factor. The value of λ is affected by the noise in the image. When the noise is strong, it means that the confidence of the image data itself is low, and it needs to rely more on optical flow constraints, indicating that λ is a larger value at this time. In a preferred embodiment of the present application, by presetting λ to a smaller value, the posture tracking of the target image set is performed to obtain the optical flow atlas.
S3、将所述差分图像集和所述光流图集作为训练集输入至预先构建的短视频关键词提取模型中,利用所述训练集所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,并将所述关联词集和所述标签集输入至所述短视频关键词提取模型的损失函数中,计算出损失函数值,直至所述损失函数值小于阈值时,所述短视频关键词提取模型退出训练。S3. Input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, and use the training set and the short video keyword extraction model for training. The activation function of the short video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the related word set with all The tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated, until the loss function value is less than a threshold, the short video keyword extraction model exits training.
本申请较佳实施例中,所述短视频关键词提取模型包括利用双流法构建的两个分支的卷积神经网络模型,其中所述两个分支的卷积神经网络模型中的其中一个分支模型为空间卷积神经网络模型,另一个分支模型为时间卷积神经网络模型。所述双流法字面意思指的是两条小溪流各自流动最后汇聚到了一起,本申请实施例中其中一条小溪流的名称为差分图像的信息,另一条小溪流的名称是光流图的信息。In a preferred embodiment of the present application, the short video keyword extraction model includes a two-branch convolutional neural network model constructed by a dual-stream method, wherein one of the two-branch convolutional neural network model is a branch model It is a spatial convolutional neural network model, and another branch model is a temporal convolutional neural network model. The literal meaning of the Shuangliu method refers to the fact that two small streams flow separately and finally converge together. In the embodiment of the present application, the name of one stream is the information of the differential image, and the name of the other stream is the information of the optical flow diagram.
所述卷积神经网络是一种前馈神经网络,它的人工神经元可以响应一部分覆盖范围内的周围单元,其基本结构包括两层,其一为特征提取层,每个神经元的输入与前一层的局部接受域相连,并提取该局部的特征。一旦该局部特征被提取后,它与其它特征间的位置关系也随之确定下来;其二是特征映射层,网络的每个计算层由多个特征映射组成,每个特征映射是一个平面,平面上所有神经元的权值相等。The convolutional neural network is a feed-forward neural network. Its artificial neurons can respond to a part of the surrounding units in the coverage area. Its basic structure includes two layers. One is the feature extraction layer. The input of each neuron is The local receptive fields of the previous layer are connected, and the local features are extracted. Once the local feature is extracted, the positional relationship between it and other features is also determined; the second is the feature mapping layer, each computing layer of the network is composed of multiple feature maps, and each feature map is a plane. The weights of all neurons on the plane are equal.
本申请较佳实施例中,所述卷积神经网络模型包含输入层、卷积层、池化层以及输出层。本申请较佳实施例将所述差分图像输入至所述空间卷积神经网络模型的输入层中,将所述光流图输入至所述时间卷积神经网络模型的输入层中,并在各自的卷积层中通过预设一组过滤器对所述差分图像和光流图分别进行卷积操作,提取出特征向量,并利用池化层对所述特征向量进行池化操作并输入至全连接层,通过激活函数对所述特征向量进行归一化处理和计算,并将计算结果输入至输出层,所述输出层输出所述差分图像集中的图片内容集和光流图集中时序信息集,得到所述差分图像集和光流图集的关联词集。所述归一化处理是将一个含任意实数的K维向量“压缩”到另一个K维实向量,使得每一个元素的范围都在(0,1)之间,并且所有元素的和为1。In a preferred embodiment of the present application, the convolutional neural network model includes an input layer, a convolutional layer, a pooling layer, and an output layer. In the preferred embodiment of the present application, the differential image is input into the input layer of the spatial convolutional neural network model, and the optical flow graph is input into the input layer of the temporal convolutional neural network model, and each In the convolutional layer, the differential image and the optical flow graph are respectively convolved by a preset set of filters to extract the feature vector, and the pooling layer is used to perform the pooling operation on the feature vector and input to the fully connected Layer, normalize and calculate the feature vector through the activation function, and input the calculation result to the output layer, the output layer outputs the picture content set in the difference image set and the time series information set in the optical flow atlas to obtain The associated word set of the differential image set and the optical flow atlas. The normalization process is to "compress" a K-dimensional vector containing any real number to another K-dimensional real vector, so that the range of each element is between (0,1), and the sum of all elements is 1. .
本申请实施例中所述激活函数为softmax函数,计算公式如下所示:The activation function in the embodiment of this application is the softmax function, and the calculation formula is as follows:
Figure PCTCN2019116933-appb-000009
Figure PCTCN2019116933-appb-000009
其中,O j表示所述卷积神经网络输出层第j个神经元的图片内容和时序信息输出值,I j表示所述卷积神经网络输出层第j个神经元的输入值,t表示所述输出层神经元的总量,e为无限不循环小数 Among them, O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network, I j represents the input value of the jth neuron in the output layer of the convolutional neural network, and t represents all The total number of neurons in the output layer, e is an infinite non-recurring decimal
本申请较佳实施例中所述损失函数为最小二乘法:The loss function in the preferred embodiment of this application is the least square method:
Figure PCTCN2019116933-appb-000010
Figure PCTCN2019116933-appb-000010
其中,s为输出的图片内容及时序信息与差分图像及光流图的误差值,k为所述图像集的数量,y i为所述差分图像及光流图,y′ i为所述输出的图片内容及时序信息。 Where s is the error value of the output picture content and timing information and the differential image and optical flow diagram, k is the number of the image set, y i is the differential image and optical flow diagram, and y′ i is the output The picture content and timing information.
S4、接收输入的短视频,利用所述短视频关键词提取模型得到所述短视频的关联词,并对所述关联词进行关键词提取,得到所述短视频的关键词。S4. Receive the input short video, use the short video keyword extraction model to obtain related words of the short video, and perform keyword extraction on the related words to obtain the keywords of the short video.
本申请较佳实施例通过关键词提取算法对所述关联词集进行关键词抽取。所述关键词提取算法是利用统计信息、词向量信息以及词语间的依存句法信息,通过构建依存关系图来计算词语之间的关联强度,利用TextRank算法迭代算出词语的重要度得分,并根据句子的依存句法分析结果对所有非停用词构造无向图,利用词语之间的引力值以及依存关联度计算求得边的权重。In a preferred embodiment of the present application, keyword extraction is performed on the related word set through a keyword extraction algorithm. The keyword extraction algorithm uses statistical information, word vector information, and dependency syntax information between words to calculate the correlation strength between words by constructing a dependency relationship graph, and iteratively calculates the importance score of words using the TextRank algorithm, and calculates the importance of words according to the sentence The result of the dependency syntax analysis is to construct an undirected graph for all non-stop words, and calculate the weight of the edge by using the gravity value between the words and the degree of dependency correlation.
详细地,所述TextRank算法包括:In detail, the TextRank algorithm includes:
计算所述关联词集中的任意两个词语W i和W j的依存关联度: Calculate the dependency correlation degree of any two words W i and W j in the related word set:
Figure PCTCN2019116933-appb-000011
Figure PCTCN2019116933-appb-000011
其中,len(W i,W j)表示词语W i和W j之间的依存路径长度,b是超参数; Among them, len(W i , W j ) represents the length of the dependency path between words W i and W j , and b is a hyperparameter;
计算词语W i和W j的引力: Calculate the gravitational forces of words W i and W j :
Figure PCTCN2019116933-appb-000012
Figure PCTCN2019116933-appb-000012
其中,tfidf(W)是词语W的TF-IDF值,TF表示词频,IDF表示逆文档频率指数,d是词语W i和W j的词向量之间的欧式距离; Wherein, tfidf (W) is a TF-IDF value of word W, TF represents term frequency, IDF represents inverse document frequency index, d is the Euclidean distance between the vectors of words W i and W words of J;
得到词语W i和W j之间的关联度为: The degree of association between words W i and W j is:
weight(W i,W j)=Dep(W i,W j)*f grav(W i,W j) weight(W i ,W j )=Dep(W i ,W j )*f grav (W i ,W j )
建立无向图G=(V,E),其中V是顶点的集合,E是边的集合;Establish an undirected graph G=(V,E), where V is the set of vertices and E is the set of edges;
计算出词语W i的重要度得分: Calculate the importance score of the word W i :
Figure PCTCN2019116933-appb-000013
Figure PCTCN2019116933-appb-000013
其中,
Figure PCTCN2019116933-appb-000014
是与顶点W i有关的集合,η为阻尼系数;
among them,
Figure PCTCN2019116933-appb-000014
W i is associated with a set of vertices, η is the damping coefficient;
根据所述重要度得分,对所有词语进行排序,根据所述排序从所述词语中选择预设数量的关键词,并对所述提取的关键词进行符号语法的拼接,得到短视频关联词。Sort all words according to the importance score, select a preset number of keywords from the words according to the sort, and perform symbolic grammar splicing on the extracted keywords to obtain short video related words.
发明还提供一种短视频关键词提取装置。参照图2所示,为本申请一实施例提供的短视频关键词提取装置的内部结构示意图。The invention also provides a short video keyword extraction device. Referring to FIG. 2, it is a schematic diagram of the internal structure of a short video keyword extraction device provided by an embodiment of this application.
在本实施例中,所述短视频关键词提取装置1可以是PC(Personal Computer,个人电脑),或者是智能手机、平板电脑、便携计算机等终端设备,也可以是一种服务器等。该短视频关键词提取装置1至少包括存储器11、处理器12,通信总线13,以及网络接口14。In this embodiment, the short video keyword extraction device 1 may be a PC (Personal Computer, personal computer), or a terminal device such as a smart phone, a tablet computer, or a portable computer, or a server. The short video keyword extraction device 1 at least includes a memory 11, a processor 12, a communication bus 13, and a network interface 14.
其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是短视频关键词提取装置1的内部存储单元,例如该短视频关键词提取装置1的硬盘。存储器11在另一些实施例中也可以是短视频关键词提取装置1的外部存储设备,例如短视频关键词提取装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括短视频关键词提取装置1的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于短视频关键词提取装置1的应用软件及各类数据,例如短视频关键词提取程序01的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the short video keyword extraction device 1, for example, the hard disk of the short video keyword extraction device 1. In other embodiments, the memory 11 may also be an external storage device of the short video keyword extraction device 1, for example, a plug-in hard disk equipped on the short video keyword extraction device 1, a Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Further, the memory 11 may also include both an internal storage unit of the short video keyword extraction device 1 and an external storage device. The memory 11 can be used not only to store application software and various data installed in the short video keyword extraction device 1, such as the code of the short video keyword extraction program 01, etc., but also to temporarily store data that has been output or will be output. .
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行短视频关键词提取程序01等。The processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip in some embodiments, and is used to run the program code or processing stored in the memory 11 Data, such as execution of short video keyword extraction program 01, etc.
通信总线13用于实现这些组件之间的连接通信。The communication bus 13 is used to realize the connection and communication between these components.
网络接口14可选的可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该装置1与其他电子设备之间建立通信连接。The network interface 14 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is usually used to establish a communication connection between the device 1 and other electronic devices.
可选地,该装置1还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在短视频关键词提取装置1中处理的信息以及用于显示可视化的用户界面。Optionally, the device 1 may also include a user interface. The user interface may include a display (Display) and an input unit such as a keyboard (Keyboard). The optional user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light emitting diode) touch device, etc. Among them, the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the short video keyword extraction device 1 and to display a visualized user interface.
图2仅示出了具有组件11-14以及短视频关键词提取程序01的短视频关键词提取装置1,本领域技术人员可以理解的是,图1示出的结构并不构成对短视频关键词提取装置1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。Figure 2 only shows the short video keyword extraction device 1 with components 11-14 and short video keyword extraction program 01. Those skilled in the art can understand that the structure shown in Figure 1 does not constitute a key to short video The definition of the word extraction device 1 may include fewer or more components than shown, or a combination of certain components, or a different component arrangement.
在图2所示的装置1实施例中,存储器11中存储有短视频关键词提取程序01;处理器12执行存储器11中存储的短视频关键词提取程序01时实现如下步骤:In the embodiment of the device 1 shown in FIG. 2, the short video keyword extraction program 01 is stored in the memory 11; the processor 12 implements the following steps when executing the short video keyword extraction program 01 stored in the memory 11:
步骤一、获取短视频集,通过定时截图得到所述短视频集的不同帧图像,对所述不同帧图像进行预处理操作,得到目标图像集和标签集,存入数据库 中。Step 1: Obtain a short video set, obtain different frame images of the short video set through timing screenshots, perform a preprocessing operation on the different frame images, obtain a target image set and a tag set, and store them in a database.
本申请较佳实施例中,所述短视频通过搜索网络视频库得到。所述定时截图是根据设置的截图的间隔时间,对所述短视频定时进行截屏操作,得到所述短视频的不同帧图像。In a preferred embodiment of the present application, the short video is obtained by searching a network video library. The timing screenshot is to perform a screenshot operation on the short video at a timing according to the set interval of screenshots to obtain different frame images of the short video.
本申请较佳实施例中,所述预处理操作包含:对图像进行灰度化、阈值化、中值滤波以及尺度归一化操作。所述预处理操作具体实施步骤如下所示:In a preferred embodiment of the present application, the preprocessing operation includes: performing grayscale, thresholding, median filtering, and scale normalization operations on the image. The specific implementation steps of the preprocessing operation are as follows:
a、图像灰度化处理:a. Image grayscale processing:
所述图像灰度化处理是将彩色图像转换为灰度图像。灰度图像的亮度信息完全能够表达图像的整体和局部的特征,并且对图像进行灰度化处理之后可以大大降低后续工作的计算量。The image grayscale processing is to convert a color image into a grayscale image. The brightness information of the grayscale image can fully express the overall and local characteristics of the image, and the grayscale processing of the image can greatly reduce the amount of calculation for subsequent work.
本申请较佳实施例中,所述图像灰度化处理的方法是将图像像素点的R、G、B分量转换为YUV的颜色空间的Y分量,即亮度值,所述Y分量的计算方法如下式所示:In a preferred embodiment of the present application, the method of image gray-scale processing is to convert the R, G, and B components of the image pixels into the Y component of the YUV color space, that is, the brightness value. The calculation method of the Y component As shown in the following formula:
Y=0.3R+0.59G+0.11BY=0.3R+0.59G+0.11B
其中R、G、B分别是RGB色彩模式中图像像素点的R、G、B值。Among them, R, G, and B are the R, G, and B values of the image pixel in the RGB color mode.
b、图像阈值化处理:b. Image thresholding:
所述图像阈值化处理通过OTSU算法对所述灰度图像进行二值化的高效算法,以得到二值化图像。本申请较佳实施例预设灰度t为灰度图像的前景与背景的分割阈值,并假设前景点数占图像比例为w 0,平均灰度为u 0;背景点数占图像比例为w 1,平均灰度为u 1,则灰度图像的总平均灰度为: The image thresholding process is an efficient algorithm for binarizing the grayscale image through the OTSU algorithm to obtain a binarized image. The preferred embodiment of the present application presets the gray level t to be the segmentation threshold of the foreground and background of the gray image, and assumes that the proportion of the number of front spots in the image is w 0 , the average gray level is u 0 ; the proportion of background points in the image is w 1 , The average gray level is u 1 , then the total average gray level of the gray image is:
u=w 0*u 0+w 1*u 1u=w 0 *u 0 +w 1 *u 1 ,
灰度图像的前景和背景图象的方差为:The variance of the foreground and background image of the grayscale image is:
g=w 0*(u 0-u)*(u 0-u)+w 1*(u 1-u)*(u 1-u)=w 0*w 1*(u 0-u 1)*(u 0-u 1), g=w 0 *(u 0 -u)*(u 0 -u)+w 1 *(u 1 -u)*(u 1 -u)=w 0 *w 1 *(u 0 -u 1 )* (u 0 -u 1 ),
其中,当方差g最大时,则此时前景和背景差异最大,此时的灰度t为最佳阈值,并将所述灰度图像中大于所述灰度t的灰度值设置为255,小于所述灰度t的灰度值设置为0,得到所述灰度图像的二值化图像。Wherein, when the variance g is the largest, the difference between the foreground and the background is the largest at this time, the gray scale t at this time is the optimal threshold, and the gray scale value greater than the gray scale t in the gray scale image is set to 255, The gray value smaller than the gray t is set to 0, and the binarized image of the gray image is obtained.
c、中值滤波处理:c. Median filter processing:
所述中值滤波是基于排序统计理论的一种能有效抑制噪声的非线性信号处理技术。本申请较佳实施例通过对所述二值化图像中的数字图像或数字序列中一点的值用该点的一个邻域中各点值的中值代替,用于接近周围的像素值,从而消除孤立的噪声点。The median filter is a non-linear signal processing technique that can effectively suppress noise based on ranking statistical theory. The preferred embodiment of the present application replaces the value of a point in the digital image or digital sequence with the median value of each point in a neighborhood of the point, which is used to approach the surrounding pixel values, thereby Eliminate isolated noise points.
d、图像尺度归一化处理:d. Image scale normalization processing:
本申请较佳实施例通过对所述消噪的二值化图像点进行尺度归一化处理,以消除短视频的分辨率对图像的影响。其中,在进行尺度归一化时,本申请较佳实施例需要保留姿态序列在时间和空间维度的相对位置关系,因此,需要保证同一视频中姿态的平移和缩放尺度是一致的,并且坐标分量缩放比例也是一致的。The preferred embodiment of the present application performs scale normalization processing on the denoising binarized image points to eliminate the influence of the resolution of the short video on the image. Among them, when performing scale normalization, the preferred embodiment of the present application needs to preserve the relative positional relationship of the pose sequence in the time and space dimensions. Therefore, it is necessary to ensure that the translation and zoom scales of the pose in the same video are consistent, and the coordinate components The zoom ratio is also consistent.
预设所述消噪的二值化图像中任意一点的原始坐标为(x 0,y 0),归一化后坐标为(x,y),即: It is preset that the original coordinates of any point in the denoised binarized image are (x 0 , y 0 ), and the normalized coordinates are (x, y), namely:
Figure PCTCN2019116933-appb-000015
Figure PCTCN2019116933-appb-000015
其中,d=max{w,h},w和h分别为视频的宽和高,归一化后,x,y∈(-1,1)。Among them, d=max{w,h}, w and h are the width and height of the video respectively, after normalization, x,y∈(-1,1).
步骤二、利用差分法对所述目标图像集进行目标检测,得到差分图像集,根据光流法对所述目标图像集进行姿态跟踪,得到光流图集。Step 2: Perform target detection on the target image set using the difference method to obtain a difference image set, and perform posture tracking on the target image set according to the optical flow method to obtain an optical flow atlas.
本申请较佳实施例通过相邻帧间差分法对所述目标图像集进行目标检测,得到差分图像集。所述相邻帧间差分法通过将视频序列中相邻两帧图像进行差分,当背景变化不大且没有运动目标出现时,得到的像素差值会很小,如果像素差值比较大,则认为是迸入运动目标引起的。具体的描述公式如下:The preferred embodiment of the present application performs target detection on the target image set by the difference method between adjacent frames to obtain a difference image set. The adjacent inter-frame difference method uses the difference between two adjacent frames of images in a video sequence. When the background changes little and no moving target appears, the resulting pixel difference will be small. If the pixel difference is relatively large, then It is believed to be caused by entering the sports target. The specific description formula is as follows:
Figure PCTCN2019116933-appb-000016
Figure PCTCN2019116933-appb-000016
其中,I k(x,y)和I k-1(x,y)分别为视频的当前帧图像和上一帧图像,D k(x,y)为差分后的二值化图像,T为设定的差分分割阈值。当得到的差分图像中像素值小于等于预设的差分分割阈值时,认为所述差分图像是背景,将其值设为0;当得到的差分图像中像素大于预设的差分分割阈值时,设定所述差分图像是前景像素,将其值设为1,从而获取前景运动目标,得到差分图像集,实现目标检测。 Among them, I k (x, y) and I k-1 (x, y) are the current frame image and the previous frame of the video respectively, D k (x, y) is the binary image after the difference, and T is The set threshold for differential segmentation. When the pixel value in the obtained difference image is less than or equal to the preset difference segmentation threshold, the difference image is considered to be the background and its value is set to 0; when the pixel value in the obtained difference image is greater than the preset difference segmentation threshold, set The difference image is determined to be a foreground pixel, and its value is set to 1, so as to obtain the foreground moving target, obtain the difference image set, and realize target detection.
进一步地,本申请较佳实施例根据光流法对所述目标图像集进行姿态跟踪,得到光流图集。所述光流法评估了2幅相邻帧图像的之间的变形,计算出所述2幅相邻帧图像在时间T到T+t之间每个像素点位置的移动。具体计算公式如下所示:Further, a preferred embodiment of the present application performs posture tracking on the target image set according to the optical flow method to obtain an optical flow atlas. The optical flow method evaluates the deformation between two adjacent frame images, and calculates the movement of each pixel position of the two adjacent frame images from time T to T+t. The specific calculation formula is as follows:
根据图像约束方程计算出所述目标图像集的空间和时间坐标偏导数:Calculate the partial derivatives of the space and time coordinates of the target image set according to the image constraint equation:
Figure PCTCN2019116933-appb-000017
Figure PCTCN2019116933-appb-000017
其中,I(x,y)表示两帧图像x和y,I表示坐标的偏导数,t表示两帧图像的时间差。Among them, I(x,y) represents the two frames of images x and y, I represents the partial derivative of the coordinates, and t represents the time difference between the two frames of images.
利用灰度守恒假设,对所述图像约束方程进行变换得到:Using the assumption of conservation of gray level, transform the image constraint equation to obtain:
Figure PCTCN2019116933-appb-000018
Figure PCTCN2019116933-appb-000018
所述灰度守恒假设是指图像序列中的相邻两幅图像在进行相应点的最佳匹配时,其灰度模式保持不变。The gray-level conservation hypothesis means that the gray-level mode of two adjacent images in the image sequence remains unchanged when the corresponding points are optimally matched.
进一步地,本申请较佳实施例通过Horn-Schunck光流算法计算出所述图像约束方程的孔径问题:Further, the preferred embodiment of the present application calculates the aperture problem of the image constraint equation through the Horn-Schunck optical flow algorithm:
Figure PCTCN2019116933-appb-000019
Figure PCTCN2019116933-appb-000019
其中,E表示所述图像约束方程的孔径,
Figure PCTCN2019116933-appb-000020
Figure PCTCN2019116933-appb-000021
分别表示u邻域和v邻域中的均值。所述Horn-Schunck光流算法指的是将光流求解归结成求解极值,并利用迭代法进行求解,迭代方程如下所示:
Where E represents the aperture of the image constraint equation,
Figure PCTCN2019116933-appb-000020
with
Figure PCTCN2019116933-appb-000021
Denote the mean value in the u neighborhood and v neighborhood respectively. The Horn-Schunck optical flow algorithm refers to the reduction of the optical flow solution to the extreme value of the solution, and the solution is solved by an iterative method. The iterative equation is as follows:
Figure PCTCN2019116933-appb-000022
Figure PCTCN2019116933-appb-000022
其中,λ为平滑控制因子。所述λ的值受图像中存在的噪声的影响,当存在噪声较强,说明图像数据本身的置信度较低,需要更多的依赖光流约束,表明此时λ为较大的值。本申请较佳实施例中通过预设λ为较小的值,对所述目标图像集进行姿态跟踪,得到光流图集。Among them, λ is the smoothing control factor. The value of λ is affected by the noise in the image. When the noise is strong, it means that the confidence of the image data itself is low, and it needs to rely more on optical flow constraints, indicating that λ is a larger value at this time. In a preferred embodiment of the present application, by presetting λ to a smaller value, the posture tracking of the target image set is performed to obtain the optical flow atlas.
步骤三、将所述差分图像集和所述光流图集作为训练集输入至预先构建的短视频关键词提取模型中,利用所述训练集所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,并将所述关联词集和所述标签集输入至所述短视频关键词提取模型的损失函数中,计算出损失函数值,直至所述损失函数值小于阈值时,所述短视频关键词提取模型退出训练。Step 3: Input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, and use the training set to perform training on the short video keyword extraction model. The activation function of the short video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the related word set with The tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated. When the loss function value is less than the threshold, the short video keyword extraction model exits training.
本申请较佳实施例中,所述短视频关键词提取模型包括利用双流法构建的两个分支的卷积神经网络模型,其中所述两个分支的卷积神经网络模型中的其中一个分支模型为空间卷积神经网络模型,另一个分支模型为时间卷积神经网络模型。所述双流法字面意思指的是两条小溪流各自流动最后汇聚到了一起,本申请实施例中其中一条小溪流的名称为差分图像的信息,另一条小溪流的名称是光流图的信息。In a preferred embodiment of the present application, the short video keyword extraction model includes a two-branch convolutional neural network model constructed by a dual-stream method, wherein one of the two-branch convolutional neural network model is a branch model It is a spatial convolutional neural network model, and another branch model is a temporal convolutional neural network model. The literal meaning of the Shuangliu method refers to the fact that two small streams flow separately and finally converge together. In the embodiment of the present application, the name of one stream is the information of the differential image, and the name of the other stream is the information of the optical flow diagram.
所述卷积神经网络是一种前馈神经网络,它的人工神经元可以响应一部分覆盖范围内的周围单元,其基本结构包括两层,其一为特征提取层,每个神经元的输入与前一层的局部接受域相连,并提取该局部的特征。一旦该局部特征被提取后,它与其它特征间的位置关系也随之确定下来;其二是特征映射层,网络的每个计算层由多个特征映射组成,每个特征映射是一个平面,平面上所有神经元的权值相等。The convolutional neural network is a feed-forward neural network. Its artificial neurons can respond to a part of the surrounding units in the coverage area. Its basic structure includes two layers. One is the feature extraction layer. The input of each neuron is The local receptive fields of the previous layer are connected, and the local features are extracted. Once the local feature is extracted, the positional relationship between it and other features is also determined; the second is the feature mapping layer, each computing layer of the network is composed of multiple feature maps, and each feature map is a plane. The weights of all neurons on the plane are equal.
本申请较佳实施例中,所述卷积神经网络模型包含输入层、卷积层、池化层以及输出层。本申请较佳实施例将所述差分图像输入至所述空间卷积神经网络模型的输入层中,将所述光流图输入至所述时间卷积神经网络模型的输入层中,并在各自的卷积层中通过预设一组过滤器对所述差分图像和光流图分别进行卷积操作,提取出特征向量,并利用池化层对所述特征向量进行池化操作并输入至全连接层,通过激活函数对所述特征向量进行归一化处理和计算,并将计算结果输入至输出层,所述输出层输出所述差分图像集中的图片内容集和光流图集中时序信息集,得到所述差分图像集和光流图集的关联词集。所述归一化处理是将一个含任意实数的K维向量“压缩”到另一个K维实向量,使得每一个元素的范围都在(0,1)之间,并且所有元素的和为1。In a preferred embodiment of the present application, the convolutional neural network model includes an input layer, a convolutional layer, a pooling layer, and an output layer. In the preferred embodiment of the present application, the differential image is input into the input layer of the spatial convolutional neural network model, and the optical flow graph is input into the input layer of the temporal convolutional neural network model, and each In the convolutional layer, the differential image and the optical flow graph are respectively convolved by a preset set of filters to extract the feature vector, and the pooling layer is used to perform the pooling operation on the feature vector and input to the fully connected Layer, normalize and calculate the feature vector through the activation function, and input the calculation result to the output layer, the output layer outputs the picture content set in the difference image set and the time series information set in the optical flow atlas to obtain The associated word set of the differential image set and the optical flow atlas. The normalization process is to "compress" a K-dimensional vector containing any real number to another K-dimensional real vector, so that the range of each element is between (0,1), and the sum of all elements is 1. .
本申请实施例中所述激活函数为softmax函数,计算公式如下所示:The activation function in the embodiment of this application is the softmax function, and the calculation formula is as follows:
Figure PCTCN2019116933-appb-000023
Figure PCTCN2019116933-appb-000023
其+,O j表示所述卷积神经网络输出层第j个神经元的图片内容和时序信息输出值,I j表示所述卷积神经网络输出层第j个神经元的输入值,t表示所述输出层神经元的总量,e为无限不循环小数 Where +, O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network, I j represents the input value of the jth neuron in the output layer of the convolutional neural network, and t represents The total amount of neurons in the output layer, e is an infinite non-recurring decimal
本申请较佳实施例中所述损失函数为最小二乘法:The loss function in the preferred embodiment of this application is the least square method:
Figure PCTCN2019116933-appb-000024
Figure PCTCN2019116933-appb-000024
其中,s为输出的图片内容及时序信息与差分图像及光流图的误差值,k为所述图像集的数量,y i为所述差分图像及光流图,y′ i为所述输出的图片内容及时序信息。 Where s is the error value of the output picture content and timing information and the differential image and optical flow diagram, k is the number of the image set, y i is the differential image and optical flow diagram, and y′ i is the output The picture content and timing information.
步骤四、接收输入的短视频,利用所述短视频关键词提取模型得到所述短视频的关联词,并对所述关联词进行关键词提取,得到所述短视频的关键词。Step 4: Receive the input short video, use the short video keyword extraction model to obtain related words of the short video, and perform keyword extraction on the related words to obtain the keywords of the short video.
本申请较佳实施例通过关键词提取算法对所述关联词集进行关键词抽取。所述关键词提取算法是利用统计信息、词向量信息以及词语间的依存句法信息,通过构建依存关系图来计算词语之间的关联强度,利用TextRank算法迭代算出词语的重要度得分,并根据句子的依存句法分析结果对所有非停用词构造无向图,利用词语之间的引力值以及依存关联度计算求得边的权重。In a preferred embodiment of the present application, keyword extraction is performed on the related word set through a keyword extraction algorithm. The keyword extraction algorithm uses statistical information, word vector information, and dependency syntax information between words to calculate the correlation strength between words by constructing a dependency relationship graph, and iteratively calculates the importance score of words using the TextRank algorithm, and calculates the importance of words according to the sentence The result of the dependency syntax analysis is to construct an undirected graph for all non-stop words, and calculate the weight of the edge by using the gravity value between the words and the degree of dependency correlation.
详细地,所述TextRank算法包括:In detail, the TextRank algorithm includes:
计算所述关联词集中的任意两个词语W i和W j的依存关联度: Calculate the dependency correlation degree of any two words W i and W j in the related word set:
Figure PCTCN2019116933-appb-000025
Figure PCTCN2019116933-appb-000025
其中,len(W i,W j)表示词语W i和W j之间的依存路径长度,b是超参数; Among them, len(W i , W j ) represents the length of the dependency path between words W i and W j , and b is a hyperparameter;
计算词语W i和W j的引力: Calculate the gravitational forces of words W i and W j :
Figure PCTCN2019116933-appb-000026
Figure PCTCN2019116933-appb-000026
其中,tfidf(W)是词语W的TF-IDF值,TF表示词频,IDF表示逆文档频率指数,d是词语W i和W j的词向量之间的欧式距离; Wherein, tfidf (W) is a TF-IDF value of word W, TF represents term frequency, IDF represents inverse document frequency index, d is the Euclidean distance between the vectors of words W i and W words of J;
得到词语W i和W j之间的关联度为: The degree of association between words W i and W j is:
weight(W i,W j)=Dep(W i,W j)*f grav(W i,W j) weight(W i ,W j )=Dep(W i ,W j )*f grav (W i ,W j )
建立无向图G=(V,E),其中V是顶点的集合,E是边的集合;Establish an undirected graph G=(V,E), where V is the set of vertices and E is the set of edges;
计算出词语W i的重要度得分: Calculate the importance score of the word W i :
Figure PCTCN2019116933-appb-000027
Figure PCTCN2019116933-appb-000027
其中,
Figure PCTCN2019116933-appb-000028
是与顶点W i有关的集合,η为阻尼系数;
among them,
Figure PCTCN2019116933-appb-000028
W i is associated with a set of vertices, η is the damping coefficient;
根据所述重要度得分,对所有词语进行排序,根据所述排序从所述词语中选择预设数量的关键词,并对所述提取的关键词进行符号语法的拼接,得到短视频关联词。Sort all words according to the importance score, select a preset number of keywords from the words according to the sort, and perform symbolic grammar splicing on the extracted keywords to obtain short video related words.
可选地,在其他实施例中,短视频关键词提取程序还可以被分割为一个或者多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行以完成本申请,本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段,用于描述短视频关键词提取程序在短视频关键词提取装置中的执行过程。Optionally, in other embodiments, the short video keyword extraction program can also be divided into one or more modules, and the one or more modules are stored in the memory 11 and run by one or more processors (this embodiment For example, it is executed by the processor 12) to complete this application. The module referred to in this application refers to a series of computer program instruction segments that can complete specific functions, and is used to describe the short video keyword extraction program in the short video keyword extraction device The implementation process.
例如,参照图3所示,为本申请短视频关键词提取装置一实施例中的短视频关键词提取程序的程序模块示意图,该实施例中,所述短视频关键词提取程序可以被分割为短视频获取模块10、图像预处理模块20、模型训练模块30以及关键词提取模块40,示例性地:For example, referring to FIG. 3, a schematic diagram of the program modules of the short video keyword extraction program in an embodiment of the short video keyword extraction device of this application. In this embodiment, the short video keyword extraction program can be divided into The short video acquisition module 10, the image preprocessing module 20, the model training module 30, and the keyword extraction module 40 are exemplary:
所述短视频获取模块10用于:通过搜索网络视频库获取短视频集,并对所述短视频集执行定时截图操作。The short video acquisition module 10 is configured to obtain a short video set by searching a network video library, and perform a regular screenshot operation on the short video set.
所述图像预处理模块20用于:利用差分法对所述目标图像集进行目标检测,得到差分图像集,根据光流法对所述目标图像集进行姿态跟踪,得到光流图集。The image preprocessing module 20 is configured to perform target detection on the target image set using a differential method to obtain a differential image set, and perform posture tracking on the target image set according to an optical flow method to obtain an optical flow atlas.
所述模型训练模块30用于:将所述差分图像集和所述光流图集作为训练集输入至预先构建的短视频关键词提取模型中,利用所述训练集对所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,并将所述关联词集和所述标签集输入至所述短视频关键词提取模型的损失函数中,计算出损失函数值,直至所述损失函数值小于阈值时,所述短视频关键词提取模型退出训练。The model training module 30 is configured to: input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, and use the training set to compare the short video keyword The extraction model is trained, and the image content set in the differential image set and the time series information set in the optical flow atlas are output through the activation function of the short video keyword extraction model to obtain the associated word set of the differential image set and the optical flow atlas, And input the associated word set and the tag set into the loss function of the short video keyword extraction model, and calculate the loss function value until the loss function value is less than the threshold value, the short video keyword extraction model Quit training.
所述关键词提取模块40用于:接收输入的短视频,利用所述短视频关键词提取模型得到所述短视频的关联词,并对所述关联词进行关键词提取,得到所述短视频的关键词。The keyword extraction module 40 is configured to: receive an input short video, use the short video keyword extraction model to obtain related words of the short video, and perform keyword extraction on the related words to obtain the key of the short video word.
上述短视频获取模块10、图像预处理模块20、模型训练模块30以及关键词提取模块40等程序模块被执行时所实现的功能或操作步骤与上述实施例大体相同,在此不再赘述。The functions or operation steps implemented by the program modules such as the short video acquisition module 10, the image preprocessing module 20, the model training module 30, and the keyword extraction module 40 when executed are substantially the same as those in the foregoing embodiment, and will not be repeated here.
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有短视频关键词提取程序,所述短视频关键词提取程序可被一个或多个处理器执行,以实现如下操作:In addition, an embodiment of the present application also proposes a computer-readable storage medium, the computer-readable storage medium stores a short video keyword extraction program, and the short video keyword extraction program can be executed by one or more processors To achieve the following operations:
获取短视频集,通过定时截图得到所述短视频集的不同帧图像,对所述不同帧图像进行预处理操作,得到目标图像集和标签集,存入数据库中;Obtain a short video set, obtain different frame images of the short video set through timing screenshots, perform a preprocessing operation on the different frame images to obtain a target image set and a tag set, and store them in a database;
利用差分法对所述目标图像集进行目标检测,得到差分图像集,根据光流法对所述目标图像集进行姿态跟踪,得到光流图集;Performing target detection on the target image set using a difference method to obtain a difference image set, and performing posture tracking on the target image set according to an optical flow method to obtain an optical flow atlas;
将所述差分图像集和所述光流图集作为训练集输入至预先构建的短视频关键词提取模型中,利用所述训练集对所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内 容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,并将所述关联词集和所述标签集输入至所述短视频关键词提取模型的损失函数中,计算出损失函数值,直至所述损失函数值小于阈值时,所述短视频关键词提取模型退出训练;Input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, use the training set to train the short video keyword extraction model, and pass the short video The activation function of the video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the associated word set with the The tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated, until the loss function value is less than the threshold, the short video keyword extraction model exits training;
接收输入的短视频,利用所述短视频关键词提取模型得到所述短视频的关联词,并对所述关联词进行关键词提取,得到所述短视频的关键词。Receive the input short video, use the short video keyword extraction model to obtain the related words of the short video, and perform keyword extraction on the related words to obtain the keywords of the short video.
本申请计算机可读存储介质具体实施方式与上述短视频关键词提取装置和方法各实施例基本相同,在此不作累述。The specific implementations of the computer-readable storage medium of the present application are basically the same as the foregoing embodiments of the short video keyword extraction device and method, and will not be repeated here.
需要说明的是,上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。并且本文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that the serial numbers of the above embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. And the terms "include", "include" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, but also includes The other elements listed may also include elements inherent to the process, device, article, or method. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, device, article or method that includes the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , Magnetic disk, optical disk), including several instructions to make a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the method described in each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only preferred embodiments of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly used in other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种短视频关键词提取方法,其特征在于,所述方法包括:A method for extracting short video keywords, characterized in that the method includes:
    获取短视频集,通过定时截图得到所述短视频集的不同帧图像,对所述不同帧图像进行预处理操作,得到目标图像集和标签集,存入数据库中;Obtain a short video set, obtain different frame images of the short video set through timing screenshots, perform a preprocessing operation on the different frame images to obtain a target image set and a tag set, and store them in a database;
    利用差分法对所述目标图像集进行目标检测,得到差分图像集,根据光流法对所述目标图像集进行姿态跟踪,得到光流图集;Performing target detection on the target image set using a difference method to obtain a difference image set, and performing posture tracking on the target image set according to an optical flow method to obtain an optical flow atlas;
    将所述差分图像集和所述光流图集作为训练集输入至预先构建的短视频关键词提取模型中,利用所述训练集对所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,并将所述关联词集和所述标签集输入至所述短视频关键词提取模型的损失函数中,计算出损失函数值,直至所述损失函数值小于阈值时,所述短视频关键词提取模型退出训练;Input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, use the training set to train the short video keyword extraction model, and pass the short video The activation function of the video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the associated word set with the The tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated, until the loss function value is less than the threshold, the short video keyword extraction model exits training;
    接收输入的短视频,利用所述短视频关键词提取模型得到所述短视频的关联词,并对所述关联词进行关键词提取,得到所述短视频的关键词。Receive the input short video, use the short video keyword extraction model to obtain the related words of the short video, and perform keyword extraction on the related words to obtain the keywords of the short video.
  2. 如权利要求1所述的短视频关键词提取方法,其特征在于,所述对所述不同帧图像进行预处理操作,得到目标图像集,包括:The method for extracting short video keywords according to claim 1, wherein the preprocessing operation on the different frame images to obtain the target image set comprises:
    利用图像灰度化将所述不同帧图像转化为灰度图像,根据OTSU算法对所述灰度图像进行阈值化操作,得到二值化图像;Converting the different frame images into gray-scale images by using image gray-scale, and thresholding the gray-scale images according to the OTSU algorithm to obtain a binary image;
    通过中值滤波消除所述二值化图像中孤立的噪声点,利用尺度归一化消除短视频中的分辨率对所述二值化图像的影响,从而得到目标图像集。Median filtering is used to eliminate isolated noise points in the binarized image, and scale normalization is used to eliminate the influence of the resolution in the short video on the binarized image, thereby obtaining a target image set.
  3. 如权利要求1所述的短视频关键词提取方法,其特征在于,所述利用所述训练集对所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,包括:The method for extracting short video keywords according to claim 1, wherein the training set is used to train the short video keyword extraction model, and the short video keyword extraction model is output by an activation function The picture content set in the differential image set and the time sequence information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas includes:
    利用双流法构建两个分支的卷积神经网络模型,其中一个分支模型为空间卷积神经网络模型,另一个分支模型为时间卷积神经网络模型;Use the dual-stream method to construct a two-branch convolutional neural network model, one of which is a spatial convolutional neural network model, and the other branch is a temporal convolutional neural network model;
    将所述差分图像集输入至所述空间卷积神经网络模型中,及将所述光流图集输入至所述时间卷积神经网络模型中;Inputting the differential image set into the spatial convolutional neural network model, and inputting the optical flow atlas into the temporal convolutional neural network model;
    利用所述空间卷积神经网络模型及时间卷积神经网络模型分别对所述差分图像集及光流图集提取出特征向量、进行池化操作后通过激活函数对所述特征向量进行归一化处理和计算后,输出所述差分图像集中的图片内容集和光流图集中时序信息集,得到所述差分图像集和光流图集的关联词集。Using the spatial convolutional neural network model and the temporal convolutional neural network model to extract feature vectors from the differential image set and optical flow atlas respectively, perform a pooling operation, and then normalize the feature vectors through an activation function After processing and calculation, output the picture content set and the time sequence information set in the optical flow atlas in the differential image set to obtain the associated word set of the differential image set and the optical flow atlas.
  4. 如权利要求1所述的短视频关键词提取方法,其特征在于,所述激活函数为Softmax函数,所述损失函数为最小二乘函数:The method for extracting short video keywords according to claim 1, wherein the activation function is a Softmax function, and the loss function is a least squares function:
    其中,所述softmax函数为:Wherein, the softmax function is:
    Figure PCTCN2019116933-appb-100001
    Figure PCTCN2019116933-appb-100001
    其中,O j表示所述卷积神经网络输出层第j个神经元的图片内容和时序信息输出值,I j表示所述卷积神经网络输出层第j个神经元的输入值,t表示所述输出层神经元的总量,e为无限不循环小数; Among them, O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network, I j represents the input value of the jth neuron in the output layer of the convolutional neural network, and t represents all State the total amount of neurons in the output layer, e is an infinite non-recurring decimal;
    所述最小二乘法为:The least square method is:
    Figure PCTCN2019116933-appb-100002
    Figure PCTCN2019116933-appb-100002
    其中,s为输出的图片内容及时序信息与差分图像及光流图的误差值,k为所述图像集的数量,y i为所述差分图像及光流图,y′ i为所述输出的图片内容及时序信息。 Where s is the error value of the output picture content and timing information and the differential image and optical flow diagram, k is the number of the image set, y i is the differential image and optical flow diagram, and y′ i is the output The picture content and timing information.
  5. 如权利要求2所述的短视频关键词提取方法,其特征在于,所述激活函数为Softmax函数,所述损失函数为最小二乘函数:The method for extracting short video keywords according to claim 2, wherein the activation function is a Softmax function, and the loss function is a least square function:
    其中,所述softmax函数为:Wherein, the softmax function is:
    Figure PCTCN2019116933-appb-100003
    Figure PCTCN2019116933-appb-100003
    其中,O j表示所述卷积神经网络输出层第j个神经元的图片内容和时序信息输出值,I j表示所述卷积神经网络输出层第j个神经元的输入值,t表示所述输出层神经元的总量,e为无限不循环小数; Among them, O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network, I j represents the input value of the jth neuron in the output layer of the convolutional neural network, and t represents all State the total amount of neurons in the output layer, e is an infinite non-recurring decimal;
    所述最小二乘法为:The least square method is:
    Figure PCTCN2019116933-appb-100004
    Figure PCTCN2019116933-appb-100004
    其中,s为输出的图片内容及时序信息与差分图像及光流图的误差值,k为所述图像集的数量,y i为所述差分图像及光流图,y′ i为所述输出的图片内容及时序信息。 Where s is the error value of the output picture content and timing information and the differential image and optical flow diagram, k is the number of the image set, y i is the differential image and optical flow diagram, and y′ i is the output The picture content and timing information.
  6. 如权利要求3所述的短视频关键词提取方法,其特征在于,所述激活函数为Softmax函数,所述损失函数为最小二乘函数:5. The short video keyword extraction method of claim 3, wherein the activation function is a Softmax function, and the loss function is a least square function:
    其中,所述softmax函数为:Wherein, the softmax function is:
    Figure PCTCN2019116933-appb-100005
    Figure PCTCN2019116933-appb-100005
    其中,O j表示所述卷积神经网络输出层第j个神经元的图片内容和时序信息输出值,I j表示所述卷积神经网络输出层第j个神经元的输入值,t表示所述输出层神经元的总量,e为无限不循环小数; Among them, O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network, I j represents the input value of the jth neuron in the output layer of the convolutional neural network, and t represents all State the total amount of neurons in the output layer, e is an infinite non-recurring decimal;
    所述最小二乘法为:The least square method is:
    Figure PCTCN2019116933-appb-100006
    Figure PCTCN2019116933-appb-100006
    其中,s为输出的图片内容及时序信息与差分图像及光流图的误差值,k为 所述图像集的数量,y i为所述差分图像及光流图,y′ i为所述输出的图片内容及时序信息。 Where s is the error value of the output picture content and timing information and the differential image and optical flow diagram, k is the number of the image set, y i is the differential image and optical flow diagram, and y′ i is the output The picture content and timing information.
  7. 如权利要求1所述的短视频关键词提取方法,其特征在于,所述关键词提取包括:The method for extracting short video keywords according to claim 1, wherein said keyword extraction comprises:
    计算所述关联词集中的任意两个词语W i和W j的依存关联度: Calculate the dependency correlation degree of any two words W i and W j in the related word set:
    Figure PCTCN2019116933-appb-100007
    Figure PCTCN2019116933-appb-100007
    其中,len(W i,W j)表示词语W i和W j之间的依存路径长度,b是超参数; Among them, len(W i , W j ) represents the length of the dependency path between words W i and W j , and b is a hyperparameter;
    计算词语W i和W j的引力: Calculate the gravitational forces of words W i and W j :
    Figure PCTCN2019116933-appb-100008
    Figure PCTCN2019116933-appb-100008
    其中,tfidf(W)是词语W的TF-IDF值,TF表示词频,IDF表示逆文档频率指数,d是词语W i和W j的词向量之间的欧式距离; Wherein, tfidf (W) is a TF-IDF value of word W, TF represents term frequency, IDF represents inverse document frequency index, d is the Euclidean distance between the vectors of words W i and W words of J;
    得到词语W i和W j之间的关联度为: The degree of association between words W i and W j is:
    weight(W i,W j)=Dep(W i,W j)*f grav(W i,W j) weight(W i ,W j )=Dep(W i ,W j )*f grav (W i ,W j )
    建立无向图G=(V,E),其中V是顶点的集合,E是边的集合;Establish an undirected graph G=(V,E), where V is the set of vertices and E is the set of edges;
    计算出词语W i的重要度得分: Calculate the importance score of the word W i :
    Figure PCTCN2019116933-appb-100009
    Figure PCTCN2019116933-appb-100009
    其中,
    Figure PCTCN2019116933-appb-100010
    是与顶点W i有关的集合,η为阻尼系数;
    among them,
    Figure PCTCN2019116933-appb-100010
    W i is associated with a set of vertices, η is the damping coefficient;
    根据所述重要度得分,对所有词语进行排序,根据所述排序从所述词语中选择预设数量的关键词,并对所述提取的关键词进行符号语法的拼接,得到短视频的关键词。Sort all words according to the importance score, select a preset number of keywords from the words according to the sort, and perform symbolic grammar splicing on the extracted keywords to obtain short video keywords .
  8. 一种短视频关键词提取装置,其特征在于,所述装置包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的短视频关键词提取程序,所述短视频关键词提取程序被所述处理器执行时实现如下步骤:A short video keyword extraction device, characterized in that the device includes a memory and a processor, and a short video keyword extraction program that can run on the processor is stored in the memory, and the short video keyword The following steps are implemented when the extraction program is executed by the processor:
    获取短视频集,通过定时截图得到所述短视频集的不同帧图像,对所述不同帧图像进行预处理操作,得到目标图像集和标签集,存入数据库中;Obtain a short video set, obtain different frame images of the short video set through timing screenshots, perform a preprocessing operation on the different frame images to obtain a target image set and a tag set, and store them in a database;
    利用差分法对所述目标图像集进行目标检测,得到差分图像集,根据光流法对所述目标图像集进行姿态跟踪,得到光流图集;Performing target detection on the target image set using a difference method to obtain a difference image set, and performing posture tracking on the target image set according to an optical flow method to obtain an optical flow atlas;
    将所述差分图像集和所述光流图集作为训练集输入至预先构建的短视频关键词提取模型中,利用所述训练集对所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,并将所述关联词集和所述标签集输入至所述短视频关键词提取模型的损失函数中,计算出损失函数值,直至所述损失函数值小于阈值时,所述短视频关键词提取模型退出训练;Input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, use the training set to train the short video keyword extraction model, and pass the short video The activation function of the video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the associated word set with the The tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated, until the loss function value is less than the threshold, the short video keyword extraction model exits training;
    接收输入的短视频,利用所述短视频关键词提取模型得到所述短视频的关联词,并对所述关联词进行关键词提取,得到所述短视频的关键词。Receive the input short video, use the short video keyword extraction model to obtain the related words of the short video, and perform keyword extraction on the related words to obtain the keywords of the short video.
  9. 如权利要求8所述的短视频关键词提取装置,其特征在于,所述对所述不同帧图像进行预处理操作,得到目标图像集,包括:8. The short video keyword extraction device according to claim 8, wherein the preprocessing operation on the different frame images to obtain the target image set comprises:
    利用图像灰度化将所述不同帧图像转化为灰度图像,根据OTSU算法对所述灰度图像进行阈值化操作,得到二值化图像;Converting the different frame images into gray-scale images by using image gray-scale, and thresholding the gray-scale images according to the OTSU algorithm to obtain a binary image;
    通过中值滤波消除所述二值化图像中孤立的噪声点,利用尺度归一化消除短视频中的分辨率对所述二值化图像的影响,从而得到目标图像集。Median filtering is used to eliminate isolated noise points in the binarized image, and scale normalization is used to eliminate the influence of the resolution in the short video on the binarized image, thereby obtaining a target image set.
  10. 如权利要求8所述的短视频关键词提取装置,其特征在于,利用所述训练集对所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,包括:8. The short video keyword extraction device according to claim 8, wherein the short video keyword extraction model is trained using the training set, and the short video keyword extraction model is outputted through the activation function of the short video keyword extraction model. The picture content set in the differential image set and the time sequence information set in the optical flow atlas are obtained to obtain the associated word set of the differential image set and the optical flow atlas, including:
    利用双流法构建两个分支的卷积神经网络模型,其中一个分支模型为空间卷积神经网络模型,另一个分支模型为时间卷积神经网络模型;Use the dual-stream method to construct a two-branch convolutional neural network model, one of which is a spatial convolutional neural network model, and the other branch is a temporal convolutional neural network model;
    将所述差分图像集输入至所述空间卷积神经网络模型中,及将所述光流图集输入至所述时间卷积神经网络模型中;Inputting the differential image set into the spatial convolutional neural network model, and inputting the optical flow atlas into the temporal convolutional neural network model;
    利用所述空间卷积神经网络模型及时间卷积神经网络模型分别对所述差分图像集及光流图集提取出特征向量、进行池化操作后通过激活函数对所述特征向量进行归一化处理和计算后,输出所述差分图像集中的图片内容集和光流图集中时序信息集,得到所述差分图像集和光流图集的关联词集。Using the spatial convolutional neural network model and the temporal convolutional neural network model to extract feature vectors from the differential image set and optical flow atlas respectively, perform a pooling operation, and then normalize the feature vectors through an activation function After processing and calculation, output the picture content set and the time sequence information set in the optical flow atlas in the differential image set to obtain the associated word set of the differential image set and the optical flow atlas.
  11. 如权利要求8所述的短视频关键词提取装置,其特征在于,所述激活函数为Softmax函数,所述损失函数为最小二乘函数:8. The short video keyword extraction device of claim 8, wherein the activation function is a Softmax function, and the loss function is a least square function:
    其中,所述softmax函数为:Wherein, the softmax function is:
    Figure PCTCN2019116933-appb-100011
    Figure PCTCN2019116933-appb-100011
    其中,O j表示所述卷积神经网络输出层第j个神经元的图片内容和时序信息输出值,I j表示所述卷积神经网络输出层第j个神经元的输入值,t表示所述输出层神经元的总量,e为无限不循环小数; Among them, O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network, I j represents the input value of the jth neuron in the output layer of the convolutional neural network, and t represents all State the total amount of neurons in the output layer, e is an infinite non-recurring decimal;
    所述最小二乘法为:The least square method is:
    Figure PCTCN2019116933-appb-100012
    Figure PCTCN2019116933-appb-100012
    其中,s为输出的图片内容及时序信息与差分图像及光流图的误差值,k为所述图像集的数量,y i为所述差分图像及光流图,y′ i为所述输出的图片内容及时序信息。 Where s is the error value of the output picture content and timing information and the differential image and optical flow diagram, k is the number of the image set, y i is the differential image and optical flow diagram, and y′ i is the output The picture content and timing information.
  12. 如权利要求9所述的短视频关键词提取装置,其特征在于,所述激活函数为Softmax函数,所述损失函数为最小二乘函数:The short video keyword extraction device according to claim 9, wherein the activation function is a Softmax function, and the loss function is a least square function:
    其中,所述softmax函数为:Wherein, the softmax function is:
    Figure PCTCN2019116933-appb-100013
    Figure PCTCN2019116933-appb-100013
    其中,O j表示所述卷积神经网络输出层第j个神经元的图片内容和时序信 息输出值,I j表示所述卷积神经网络输出层第j个神经元的输入值,t表示所述输出层神经元的总量,e为无限不循环小数; Among them, O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network, I j represents the input value of the jth neuron in the output layer of the convolutional neural network, and t represents all State the total amount of neurons in the output layer, e is an infinite non-recurring decimal;
    所述最小二乘法为:The least square method is:
    Figure PCTCN2019116933-appb-100014
    Figure PCTCN2019116933-appb-100014
    其中,s为输出的图片内容及时序信息与差分图像及光流图的误差值,k为所述图像集的数量,y i为所述差分图像及光流图,y′ i为所述输出的图片内容及时序信息。 Where s is the error value of the output picture content and timing information and the differential image and optical flow diagram, k is the number of the image set, y i is the differential image and optical flow diagram, and y′ i is the output The picture content and timing information.
  13. 如权利要求10所述的短视频关键词提取装置,其特征在于,所述激活函数为Softmax函数,所述损失函数为最小二乘函数:The short video keyword extraction device of claim 10, wherein the activation function is a Softmax function, and the loss function is a least square function:
    其中,所述softmax函数为:Wherein, the softmax function is:
    Figure PCTCN2019116933-appb-100015
    Figure PCTCN2019116933-appb-100015
    其中,O j表示所述卷积神经网络输出层第j个神经元的图片内容和时序信息输出值,I j表示所述卷积神经网络输出层第j个神经元的输入值,t表示所述输出层神经元的总量,e为无限不循环小数; Among them, O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network, I j represents the input value of the jth neuron in the output layer of the convolutional neural network, and t represents all State the total amount of neurons in the output layer, e is an infinite non-recurring decimal;
    所述最小二乘法为:The least square method is:
    Figure PCTCN2019116933-appb-100016
    Figure PCTCN2019116933-appb-100016
    其中,s为输出的图片内容及时序信息与差分图像及光流图的误差值,k为所述图像集的数量,y i为所述差分图像及光流图,y′ i为所述输出的图片内容及时序信息。 Where s is the error value of the output picture content and timing information and the differential image and optical flow diagram, k is the number of the image set, y i is the differential image and optical flow diagram, and y′ i is the output The picture content and timing information.
  14. 如权利要求8所述的短视频关键词提取装置,其特征在于,所述关键词提取,包括:8. The short video keyword extraction device of claim 8, wherein the keyword extraction includes:
    计算所述关联词集中的任意两个词语W i和W j的依存关联度: Calculate the dependency correlation degree of any two words W i and W j in the related word set:
    Figure PCTCN2019116933-appb-100017
    Figure PCTCN2019116933-appb-100017
    其中,len(W i,W j)表示词语W i和W j之间的依存路径长度,b是超参数; Among them, len(W i , W j ) represents the length of the dependency path between words W i and W j , and b is a hyperparameter;
    计算词语W i和W j的引力: Calculate the gravitational forces of words W i and W j :
    Figure PCTCN2019116933-appb-100018
    Figure PCTCN2019116933-appb-100018
    其中,tfidf(W)是词语W的TF-IDF值,TF表示词频,IDF表示逆文档频率指数,d是词语W i和W j的词向量之间的欧式距离; Wherein, tfidf (W) is a TF-IDF value of word W, TF represents term frequency, IDF represents inverse document frequency index, d is the Euclidean distance between the vectors of words W i and W words of J;
    得到词语W i和W j之间的关联度为: The degree of association between words W i and W j is:
    weight(W i,W j)=Dep(W i,W j)*f grav(W i,W j) weight(W i ,W j )=Dep(W i ,W j )*f grav (W i ,W j )
    建立无向图G=(V,E),其中V是顶点的集合,E是边的集合;Establish an undirected graph G=(V,E), where V is the set of vertices and E is the set of edges;
    计算出词语W i的重要度得分: Calculate the importance score of the word W i :
    Figure PCTCN2019116933-appb-100019
    Figure PCTCN2019116933-appb-100019
    其中,
    Figure PCTCN2019116933-appb-100020
    是与顶点W i有关的集合,η为阻尼系数;
    among them,
    Figure PCTCN2019116933-appb-100020
    W i is associated with a set of vertices, η is the damping coefficient;
    根据所述重要度得分,对所有词语进行排序,根据所述排序从所述词语中选择预设数量的关键词,并对所述提取的关键词进行符号语法的拼接,得到短视频的关键词。Sort all words according to the importance score, select a preset number of keywords from the words according to the sort, and perform symbolic grammar splicing on the extracted keywords to obtain short video keywords .
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有短视频关键词提取程序,所述短视频关键词提取程序可被一个或者多个处理器执行,以实现如下步骤:A computer-readable storage medium, characterized in that a short video keyword extraction program is stored on the computer-readable storage medium, and the short video keyword extraction program can be executed by one or more processors to achieve the following step:
    获取短视频集,通过定时截图得到所述短视频集的不同帧图像,对所述不同帧图像进行预处理操作,得到目标图像集和标签集,存入数据库中;Obtain a short video set, obtain different frame images of the short video set through timing screenshots, perform a preprocessing operation on the different frame images to obtain a target image set and a tag set, and store them in a database;
    利用差分法对所述目标图像集进行目标检测,得到差分图像集,根据光流法对所述目标图像集进行姿态跟踪,得到光流图集;Performing target detection on the target image set using a difference method to obtain a difference image set, and performing posture tracking on the target image set according to an optical flow method to obtain an optical flow atlas;
    将所述差分图像集和所述光流图集作为训练集输入至预先构建的短视频关键词提取模型中,利用所述训练集对所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,并将所述关联词集和所述标签集输入至所述短视频关键词提取模型的损失函数中,计算出损失函数值,直至所述损失函数值小于阈值时,所述短视频关键词提取模型退出训练;Input the differential image set and the optical flow atlas as a training set into a pre-built short video keyword extraction model, use the training set to train the short video keyword extraction model, and pass the short video The activation function of the video keyword extraction model outputs the picture content set in the differential image set and the time series information set in the optical flow atlas to obtain the associated word set of the differential image set and the optical flow atlas, and combine the associated word set with the The tag set is input into the loss function of the short video keyword extraction model, and the loss function value is calculated, until the loss function value is less than the threshold, the short video keyword extraction model exits training;
    接收输入的短视频,利用所述短视频关键词提取模型得到所述短视频的关联词,并对所述关联词进行关键词提取,得到所述短视频的关键词。Receive the input short video, use the short video keyword extraction model to obtain the related words of the short video, and perform keyword extraction on the related words to obtain the keywords of the short video.
  16. 如权利要求15所述的计算机可读存储介质,其特征在于,所述对所述不同帧图像进行预处理操作,得到目标图像集,包括:15. The computer-readable storage medium of claim 15, wherein the preprocessing operation on the different frame images to obtain a target image set comprises:
    利用图像灰度化将所述不同帧图像转化为灰度图像,根据OTSU算法对所述灰度图像进行阈值化操作,得到二值化图像;Converting the different frame images into gray-scale images by using image gray-scale, and thresholding the gray-scale images according to the OTSU algorithm to obtain a binary image;
    通过中值滤波消除所述二值化图像中孤立的噪声点,利用尺度归一化消除短视频中的分辨率对所述二值化图像的影响,从而得到目标图像集。Median filtering is used to eliminate isolated noise points in the binarized image, and scale normalization is used to eliminate the influence of the resolution in the short video on the binarized image, thereby obtaining a target image set.
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,利用所述训练集对所述短视频关键词提取模型进行训练,通过所述短视频关键词提取模型的激活函数输出所述差分图像集中的图片内容集和光流图集中的时序信息集,得到所述差分图像集和光流图集的关联词集,包括:The computer-readable storage medium of claim 16, wherein the training set is used to train the short video keyword extraction model, and the difference is output through the activation function of the short video keyword extraction model The image content set in the image set and the time sequence information set in the optical flow atlas are obtained to obtain the associated word set of the differential image set and the optical flow atlas, including:
    利用双流法构建两个分支的卷积神经网络模型,其中一个分支模型为空间卷积神经网络模型,另一个分支模型为时间卷积神经网络模型;Use the dual-stream method to construct a two-branch convolutional neural network model, one of which is a spatial convolutional neural network model, and the other branch is a temporal convolutional neural network model;
    将所述差分图像集输入至所述空间卷积神经网络模型中,及将所述光流图集输入至所述时间卷积神经网络模型中;Inputting the differential image set into the spatial convolutional neural network model, and inputting the optical flow atlas into the temporal convolutional neural network model;
    利用所述空间卷积神经网络模型及时间卷积神经网络模型分别对所述差分图像集及光流图集提取出特征向量、进行池化操作后通过激活函数对所述特征向量进行归一化处理和计算后,输出所述差分图像集中的图片内容集和 光流图集中时序信息集,得到所述差分图像集和光流图集的关联词集。Using the spatial convolutional neural network model and the temporal convolutional neural network model to extract feature vectors from the differential image set and optical flow atlas respectively, perform a pooling operation, and then normalize the feature vectors through an activation function After processing and calculation, output the picture content set and the time sequence information set in the optical flow atlas in the differential image set to obtain the associated word set of the differential image set and the optical flow atlas.
  18. 如权利要求15所述的计算机可读存储介质,其特征在于,所述激活函数为Softmax函数,所述损失函数为最小二乘函数:The computer-readable storage medium of claim 15, wherein the activation function is a Softmax function, and the loss function is a least squares function:
    其中,所述softmax函数为:Wherein, the softmax function is:
    Figure PCTCN2019116933-appb-100021
    Figure PCTCN2019116933-appb-100021
    其中,O j表示所述卷积神经网络输出层第j个神经元的图片内容和时序信息输出值,I j表示所述卷积神经网络输出层第j个神经元的输入值,t表示所述输出层神经元的总量,e为无限不循环小数; Among them, O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network, I j represents the input value of the jth neuron in the output layer of the convolutional neural network, and t represents all State the total amount of neurons in the output layer, e is an infinite non-recurring decimal;
    所述最小二乘法为:The least square method is:
    Figure PCTCN2019116933-appb-100022
    Figure PCTCN2019116933-appb-100022
    其中,s为输出的图片内容及时序信息与差分图像及光流图的误差值,k为所述图像集的数量,y i为所述差分图像及光流图,y′ i为所述输出的图片内容及时序信息。 Where s is the error value of the output picture content and timing information and the differential image and optical flow diagram, k is the number of the image set, y i is the differential image and optical flow diagram, and y′ i is the output The picture content and timing information.
  19. 如权利要求16或17所述的计算机可读存储介质,其特征在于,所述激活函数为Softmax函数,所述损失函数为最小二乘函数:The computer-readable storage medium according to claim 16 or 17, wherein the activation function is a Softmax function, and the loss function is a least squares function:
    其中,所述softmax函数为:Wherein, the softmax function is:
    Figure PCTCN2019116933-appb-100023
    Figure PCTCN2019116933-appb-100023
    其中,O j表示所述卷积神经网络输出层第j个神经元的图片内容和时序信息输出值,I j表示所述卷积神经网络输出层第j个神经元的输入值,t表示所述输出层神经元的总量,e为无限不循环小数; Among them, O j represents the image content and timing information output value of the jth neuron in the output layer of the convolutional neural network, I j represents the input value of the jth neuron in the output layer of the convolutional neural network, and t represents all State the total amount of neurons in the output layer, e is an infinite non-recurring decimal;
    所述最小二乘法为:The least square method is:
    Figure PCTCN2019116933-appb-100024
    Figure PCTCN2019116933-appb-100024
    其中,s为输出的图片内容及时序信息与差分图像及光流图的误差值,k为所述图像集的数量,y i为所述差分图像及光流图,y′ i为所述输出的图片内容及时序信息。 Where s is the error value of the output picture content and timing information and the differential image and optical flow diagram, k is the number of the image set, y i is the differential image and optical flow diagram, and y′ i is the output The picture content and timing information.
  20. 如权利要求15所述的计算机可读存储介质,其特征在于,所述关键词提取,包括:15. The computer-readable storage medium of claim 15, wherein the keyword extraction includes:
    计算所述关联词集中的任意两个词语W i和W j的依存关联度: Calculate the dependency correlation degree of any two words W i and W j in the related word set:
    Figure PCTCN2019116933-appb-100025
    Figure PCTCN2019116933-appb-100025
    其中,len(W i,W j)表示词语W i和W j之间的依存路径长度,b是超参数; Among them, len(W i , W j ) represents the length of the dependency path between words W i and W j , and b is a hyperparameter;
    计算词语W i和W j的引力: Calculate the gravitational forces of words W i and W j :
    Figure PCTCN2019116933-appb-100026
    Figure PCTCN2019116933-appb-100026
    其中,tfidf(W)是词语W的TF-IDF值,TF表示词频,IDF表示逆文档频率指数,d是词语W i和W j的词向量之间的欧式距离; Wherein, tfidf (W) is a TF-IDF value of word W, TF represents term frequency, IDF represents inverse document frequency index, d is the Euclidean distance between the vectors of words W i and W words of J;
    得到词语W i和W j之间的关联度为: The degree of association between words W i and W j is:
    weight(W i,W j)=Dep(W i,W j)*f grav(W i,W j) weight(W i ,W j )=Dep(W i ,W j )*f grav (W i ,W j )
    建立无向图G=(V,E),其中V是顶点的集合,E是边的集合;Establish an undirected graph G=(V,E), where V is the set of vertices and E is the set of edges;
    计算出词语W i的重要度得分: Calculate the importance score of the word W i :
    Figure PCTCN2019116933-appb-100027
    Figure PCTCN2019116933-appb-100027
    其中,
    Figure PCTCN2019116933-appb-100028
    是与顶点W i有关的集合,η为阻尼系数;
    among them,
    Figure PCTCN2019116933-appb-100028
    W i is associated with a set of vertices, η is the damping coefficient;
    根据所述重要度得分,对所有词语进行排序,根据所述排序从所述词语中选择预设数量的关键词,并对所述提取的关键词进行符号语法的拼接,得到短视频的关键词。Sort all words according to the importance score, select a preset number of keywords from the words according to the sort, and perform symbolic grammar splicing on the extracted keywords to obtain short video keywords .
PCT/CN2019/116933 2019-07-23 2019-11-10 Short video keyword extraction method and apparatus, and storage medium WO2021012493A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910664967.2A CN110532431B (en) 2019-07-23 2019-07-23 Short video keyword extraction method and device and storage medium
CN201910664967.2 2019-07-23

Publications (1)

Publication Number Publication Date
WO2021012493A1 true WO2021012493A1 (en) 2021-01-28

Family

ID=68661703

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/116933 WO2021012493A1 (en) 2019-07-23 2019-11-10 Short video keyword extraction method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN110532431B (en)
WO (1) WO2021012493A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113591853A (en) * 2021-08-10 2021-11-02 北京达佳互联信息技术有限公司 Keyword extraction method and device and electronic equipment
CN113704546A (en) * 2021-08-23 2021-11-26 西安电子科技大学 Video natural language text retrieval method based on space time sequence characteristics

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111274428B (en) * 2019-12-19 2023-06-30 北京创鑫旅程网络技术有限公司 Keyword extraction method and device, electronic equipment and storage medium
CN111553156B (en) * 2020-05-25 2023-08-04 支付宝(杭州)信息技术有限公司 Keyword extraction method, device and equipment
CN112004163A (en) * 2020-08-31 2020-11-27 北京市商汤科技开发有限公司 Video generation method and device, electronic equipment and storage medium
CN113421172B (en) * 2021-07-09 2022-04-05 恒瑞通(福建)信息技术有限公司 Policy information pushing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110182469A1 (en) * 2010-01-28 2011-07-28 Nec Laboratories America, Inc. 3d convolutional neural networks for automatic human action recognition
CN107862291A (en) * 2017-11-14 2018-03-30 河海大学 A kind of people's car automatic classification method based on deep learning
CN108830252A (en) * 2018-06-26 2018-11-16 哈尔滨工业大学 A kind of convolutional neural networks human motion recognition method of amalgamation of global space-time characteristic
CN109558811A (en) * 2018-11-12 2019-04-02 中山大学 A kind of action identification method based on sport foreground concern and non-supervisory key-frame extraction

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304755B (en) * 2017-03-08 2021-05-18 腾讯科技(深圳)有限公司 Training method and device of neural network model for image processing
CN107948585A (en) * 2017-11-13 2018-04-20 西安艾润物联网技术服务有限责任公司 Video recording labeling method, device and computer-readable recording medium
CN109819284B (en) * 2019-02-18 2022-11-15 平安科技(深圳)有限公司 Short video recommendation method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110182469A1 (en) * 2010-01-28 2011-07-28 Nec Laboratories America, Inc. 3d convolutional neural networks for automatic human action recognition
CN107862291A (en) * 2017-11-14 2018-03-30 河海大学 A kind of people's car automatic classification method based on deep learning
CN108830252A (en) * 2018-06-26 2018-11-16 哈尔滨工业大学 A kind of convolutional neural networks human motion recognition method of amalgamation of global space-time characteristic
CN109558811A (en) * 2018-11-12 2019-04-02 中山大学 A kind of action identification method based on sport foreground concern and non-supervisory key-frame extraction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KAREN SIMONYAN, ANDREW ZISSERMAN: "Two-Stream Convolutional Networks for Action Recognition in Videos", 9 June 2014 (2014-06-09), pages 1 - 11, XP055324674, Retrieved from the Internet <URL:http://papers.nips.cc/paper/5353-two-stream-convolutional-networks-for-action-recognition-in-videos.pdf> *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113591853A (en) * 2021-08-10 2021-11-02 北京达佳互联信息技术有限公司 Keyword extraction method and device and electronic equipment
CN113591853B (en) * 2021-08-10 2024-04-19 北京达佳互联信息技术有限公司 Keyword extraction method and device and electronic equipment
CN113704546A (en) * 2021-08-23 2021-11-26 西安电子科技大学 Video natural language text retrieval method based on space time sequence characteristics
CN113704546B (en) * 2021-08-23 2024-02-13 西安电子科技大学 Video natural language text retrieval method based on space time sequence characteristics

Also Published As

Publication number Publication date
CN110532431B (en) 2023-04-18
CN110532431A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
WO2021012493A1 (en) Short video keyword extraction method and apparatus, and storage medium
WO2021238281A1 (en) Neural network training method, image classification system, and related device
Goodfellow et al. Multi-digit number recognition from street view imagery using deep convolutional neural networks
WO2020199468A1 (en) Image classification method and device, and computer readable storage medium
Li et al. Grayscale-thermal object tracking via multitask laplacian sparse representation
WO2021022521A1 (en) Method for processing data, and method and device for training neural network model
Ansari et al. Nearest neighbour classification of Indian sign language gestures using kinect camera
US20220375213A1 (en) Processing Apparatus and Method and Storage Medium
CN111488826A (en) Text recognition method and device, electronic equipment and storage medium
CN112070044B (en) Video object classification method and device
Posner et al. Using text-spotting to query the world
Fu et al. MCFF-CNN: Multiscale comprehensive feature fusion convolutional neural network for vehicle color recognition based on residual learning
WO2023082784A1 (en) Person re-identification method and apparatus based on local feature attention
Geng et al. Combining CNN and MRF for road detection
CN109299303B (en) Hand-drawn sketch retrieval method based on deformable convolution and depth network
WO2021047587A1 (en) Gesture recognition method, electronic device, computer-readable storage medium, and chip
WO2021175278A1 (en) Model updating method and related device
CN109299305A (en) A kind of spatial image searching system based on multi-feature fusion and search method
WO2022156317A1 (en) Video frame processing method and apparatus, electronic device, and storage medium
CN113255557B (en) Deep learning-based video crowd emotion analysis method and system
Chen et al. Multi-SVM based Dempster–Shafer theory for gesture intention understanding using sparse coding feature
Jiang et al. Multi-feature tracking via adaptive weights
CN114937285B (en) Dynamic gesture recognition method, device, equipment and storage medium
CN111522979B (en) Picture sorting recommendation method and device, electronic equipment and storage medium
Lahiani et al. Hand pose estimation system based on Viola-Jones algorithm for android devices

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19938408

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19938408

Country of ref document: EP

Kind code of ref document: A1