Method for training model used for audio / video matching, audio / video matching method, and apparatus

By building an audio and video matching model, using contrastive learning and timing augmentation technology to personalize background music recommendations, the problem of unsuitable recommendations in existing technologies is solved, and the hit rate of recommendations and user experience are improved.

WO2024179037A9PCT designated stage expired Publication Date: 2024-10-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/131206
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-28
Filing Date
2023-11-13
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

When the existing technology recommends background music, it is usually recommended based on popularity, which results in the recommended background music not being suitable for the content of the video to be released by the user, resulting in a low hit rate of the recommended background music.

Method used

By constructing a model training method for audio and video matching, using contrastive learning technology to extract feature information of video and audio, constructing pairs of positive and negative samples, adjusting model parameters to improve matching, and combining time series augmentation and user interests to achieve personalized recommendations .

Benefits of technology

It improves the hit rate of background music and the proportion of released music, improves the quality and user experience of videos, and enhances the accuracy of audio recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023131206_17102024_PF_FP_ABST
    Figure CN2023131206_17102024_PF_FP_ABST
Patent Text Reader

Abstract

A method for training a model used for audio / video matching. The method is executed by a computer device, and comprises: constructing a set of sample pairs on the basis of at least one video sample and at least one audio sample, the set of sample pairs comprising at least one positive sample pair and at least one negative sample pair, the positive sample pair comprising a video sample and an audio sample having a matching relationship, and the negative sample pair comprising a video sample and an audio sample which do not have a matching relationship (310); with regard to a video sample and an audio sample in the same sample pair, using a video feature extraction model to extract feature information corresponding to the video sample, and using an audio feature extraction model to extract feature information corresponding to the audio sample (320); according to the feature information corresponding to each of the video sample and the audio sample in the same sample pair, determining a value of a contrastive loss function, wherein the contrastive loss function is used to represent the degree of matching of the sample pair (330); and according to the value of the contrastive loss function, adjusting the parameters of the video feature extraction model and audio feature extraction model so as to obtain a trained video feature extraction model and a trained audio feature extraction model (340).
Need to check novelty before this filing date? Find Prior Art

Description

Model training method, audio and video matching method and device for audio and video matching

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 202310230025X, filed on February 28, 2023, entitled “Model training method, audio and video matching method and device for audio and video matching,” the entire text of which is hereby incorporated by reference. Technical Field

[0003] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular to a model training method, an audio and video matching method, and an apparatus for audio and video matching. Background Art

[0004] With the popularity of video software such as short videos, user accounts can edit and publish videos by themselves. Generally speaking, when user accounts publish videos, they will also add background music to the videos.

[0005] In the related art, background music is recommended for the videos of the user account based on the popularity of the background music (number of times used / number of times played). For example, background music is recommended to the user account based on the number of times the audio is played from large to small.

[0006] In the related art, recommending background music to users based on popularity is likely to result in a mismatch between the background music recommended to the user and the content of the video to be published by the user, resulting in a low hit rate of the recommended background music (the ratio of the number of videos whose published background music comes from the recommended background music to the number of published videos with background music).

[0007] Summary of the Invention

[0008] The embodiments of the present application provide a model training method, an audio and video matching method and an apparatus for audio and video matching.

[0009] In one aspect, a model training method for audio and video matching is provided, which is performed by a computer device, and the method includes:

[0010] Based on at least one video sample and at least one audio sample, construct a set of sample pairs, wherein the set of sample pairs includes at least one positive sample pair and at least one negative sample pair, wherein the positive sample pair includes a video sample and an audio sample having a matching relationship, and the negative sample pair includes a video sample and an audio sample having no matching relationship;

[0011] For a video sample and an audio sample in the same sample pair, extract feature information corresponding to the video sample using a video feature extraction model, and extract feature information corresponding to the audio sample using an audio feature extraction model;

[0012] Determining a value of a contrast loss function based on feature information corresponding to each of the video sample and the audio sample in the same sample pair, wherein the contrast loss function is used to characterize the degree of matching of the sample pair; and

[0013] According to the value of the contrast loss function, the parameters of the video feature extraction model and the audio feature extraction model are adjusted to obtain a trained video feature extraction model and a trained audio feature extraction model.

[0014] In one aspect, a method for audio and video matching is provided, which is performed by a computer device, and the method includes:

[0015] Obtaining the first video to be matched;

[0016] Extracting feature information corresponding to the first video using a video feature extraction model;

[0017] Determining a degree of matching between the first video and each of the audios based on feature information corresponding to the first video and feature information corresponding to each of the n audios, wherein the feature information corresponding to the audios is obtained by an audio feature extraction model, the video feature extraction model and the audio feature extraction model are trained using contrastive learning, and n is an integer greater than or equal to 1; and

[0018] At least one matching audio that matches the first video is determined from the n audios according to the matching degree between the first video and each of the audios.

[0019] In one aspect, a model training device for audio and video matching is provided, the device comprising:

[0020] A set construction module is used to construct a set of sample pairs based on at least one video sample and at least one audio sample, wherein the set of sample pairs includes at least one positive sample pair and at least one negative sample pair, wherein the positive sample pair includes a video sample and an audio sample with a matching relationship, and the negative sample pair includes a video sample and an audio sample with no matching relationship;

[0021] An information extraction module is used to extract feature information corresponding to the video sample and the audio sample in the same sample pair using a video feature extraction model, and to extract feature information corresponding to the audio sample using an audio feature extraction model;

[0022] a loss determination module, configured to determine a value of a contrast loss function based on feature information corresponding to each of the video sample and the audio sample in the same sample pair, wherein the contrast loss function is used to characterize the degree of matching of the sample pair; and

[0023] A parameter adjustment module is used to adjust the parameters of the video feature extraction model and the audio feature extraction model according to the value of the contrast loss function to obtain a trained video feature extraction model and a trained audio feature extraction model.

[0024] In one aspect, an audio and video matching device is provided, the device comprising:

[0025] A video acquisition module, configured to acquire a first video to be matched;

[0026] An information extraction module, configured to extract feature information corresponding to the first video using a video feature extraction model;

[0027] a matching degree determination module, configured to determine a matching degree between the first video and each of the n audio tracks based on feature information corresponding to the first video and feature information corresponding to each of the n audio tracks, wherein the feature information corresponding to the audio tracks is obtained by an audio feature extraction model, the video feature extraction model and the audio feature extraction model are trained using contrastive learning, and n is an integer greater than or equal to 1;

[0028] The audio determination module is used to determine at least one matching audio that matches the first video from the n audios based on the matching degree between the first video and each of the audios.

[0029] According to one aspect of an embodiment of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and the computer-readable instructions are loaded and executed by the processor to implement the above method.

[0030] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which computer-readable instructions are stored. The computer-readable instructions are loaded and executed by a processor to implement the above method.

[0031] According to one aspect of an embodiment of the present application, a computer program product is provided, the computer program product including computer-readable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer-readable instructions from the computer-readable storage medium and executes the computer-readable instructions, causing the computer device to perform the above-described method.

[0032] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.

[0034] FIG1 is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;

[0035] FIG2 is a schematic diagram of an audio and video matching method provided by an embodiment of the present application;

[0036] FIG3 is a flow chart of a model training method for audio and video matching provided by one embodiment of the present application;

[0037] FIG4 is a flow chart of a model training method for audio and video matching provided in another embodiment of the present application;

[0038] FIG5 is an augmented schematic diagram provided by one embodiment of the present application;

[0039] FIG6 is a schematic diagram of a pre-training model provided by one embodiment of the present application;

[0040] FIG7 is a flowchart of an audio and video matching method provided by an embodiment of the present application;

[0041] FIG8 is a flowchart of an audio and video matching method provided by another embodiment of the present application;

[0042] FIG9 is a schematic diagram of a method for determining historical videos provided by one embodiment of the present application;

[0043] FIG10 is a schematic diagram of an audio recommendation result provided by an embodiment of the present application;

[0044] FIG11 is a block diagram of a model training device for audio and video matching provided by one embodiment of the present application;

[0045] FIG12 is a block diagram of a model training device for audio and video matching provided in another embodiment of the present application;

[0046] FIG13 is a block diagram of an audio and video matching device provided by one embodiment of the present application;

[0047] FIG14 is a block diagram of an audio and video matching device provided by another embodiment of the present application;

[0048] FIG15 is a structural block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0050] Before introducing the technical solutions of this application, we first introduce and explain some of the background technologies involved in this application. The following related technologies can be combined with the technical solutions of the embodiments of this application as optional solutions, and they all fall within the scope of protection of the embodiments of this application. The embodiments of this application include at least part of the following contents.

[0051] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

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

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

[0054] Deep learning (DL) is a new research direction in the field of machine learning (ML). It was introduced to bring ML closer to its original goal: artificial intelligence. Deep learning involves learning the inherent patterns and representational hierarchies of sample data. The information gained from this learning process significantly aids in interpreting data such as text, images, and sound. Its ultimate goal is to enable machines to acquire human-like analytical and learning capabilities, enabling them to recognize data such as text, images, and sound. Deep learning is a complex machine learning algorithm that has achieved results in speech and image recognition that far surpass previous technologies. Deep learning has also achieved significant success in search technology, data mining, machine learning, machine translation, natural language processing, multimedia learning, speech recognition, recommendation and personalization technologies, and other related fields. Deep learning enables machines to mimic human activities such as seeing, hearing, and thinking, solving many complex pattern recognition challenges and significantly advancing AI-related technologies.

[0055] With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, robots, smart medical care, smart customer service, virtual reality (VR), augmented reality (AR), games, virtual humans, digital humans, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0056] It should be noted that before collecting the user's relevant data and during the process of collecting the user's relevant data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application (including video data and audio data obtained by the publisher) are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0057] Before introducing the technical solutions of this application, some of the terms involved in this application are explained. The following related explanations can be combined with the technical solutions of the embodiments of this application as optional solutions, and they all fall within the scope of protection of the embodiments of this application. The embodiments of this application include at least part of the following contents.

[0058] Contrastive learning is a type of self-supervised learning. This means that it doesn't rely on labeled data, but instead learns knowledge from unlabeled images. Currently, contrastive learning appears to be "undefined, but with guiding principles." Its guiding principle is to automatically construct similar and dissimilar instances, requiring the acquisition of a representation model that positions similar instances closer together in projected space and dissimilar instances farther apart.

[0059] Augmentation: Data augmentation is a commonly used technique in deep learning. It is primarily used to increase the training dataset, making it as diverse as possible and enabling the trained model to generalize more effectively. The augmentation used in the present embodiment involves visual augmentation and temporal augmentation. Visual augmentation primarily includes horizontal / vertical flipping, rotation, scaling, cropping, shearing, translation, contrast, color dithering, and noise manipulation.

[0060] Recommended background music hit rate: the ratio of the number of videos whose background music comes from recommended background music to the number of videos released with background music.

[0061] Share of videos with music: The ratio of the number of videos published with background music to the total number of videos published.

[0062] TF-IDF (Term Fequency–Inverse Document Frequency): A commonly used weighting technique used in information retrieval and data mining. TF stands for term frequency, and IDF stands for inverse document frequency.

[0063] MLP (Multi-Layer Perception): also called Artificial Neural Network (ANN). In addition to the input and output layers, it can have multiple hidden layers.

[0064] Please refer to FIG1 , which shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application. The solution implementation environment may include a model training device 10 and a model using device 20 .

[0065] The model training device 10 can be an electronic device such as a personal computer, a computer, a tablet computer, a server, an intelligent robot, or other electronic devices with strong computing capabilities. The model training device 10 is used to jointly train the video feature extraction model 31 and the audio feature extraction model 32.

[0066] Optionally, the pre-trained model 30 is used to jointly train the video feature extraction model 31 and the audio feature extraction model 32.

[0067] In an embodiment of the present application, the pre-trained model 30 is a machine learning model for jointly training a video feature extraction model 31 and an audio feature extraction model 32. Optionally, the model training device 10 can train the pre-trained model 30 in a machine learning manner so that it has better performance. For example, the video feature extraction model 31 in the trained pre-trained model 30 (which can be considered as a module or sub-model in the pre-trained model 30) can perform feature extraction on the input video, and the audio feature extraction model 32 in the trained pre-trained model 30 (which can be considered as a module or sub-model in the pre-trained model 30) can perform feature extraction on the input audio.

[0068] The trained video feature extraction model 31 and audio feature extraction model 32 can be deployed in a model-using device 20 for video or audio feature extraction, thereby achieving audio and video matching. The model-using device 20 can be a terminal device such as a mobile phone, computer, smart TV, multimedia player, wearable device, medical device, or a server, and this application does not limit this.

[0069] Optionally, the collected video samples and audio samples (including matched audio and video samples and unmatched audio and video samples, for a specific explanation of unmatched audio and video samples, see the following embodiments) are augmented to obtain augmented video samples and augmented audio samples.

[0070] In some embodiments, positive sample pairs and negative sample pairs are divided according to video samples, augmented video samples, audio samples and augmented audio samples. Optionally, the positive sample pairs include anchor samples and positive samples, and the negative sample pairs include anchor samples and negative samples. For the specific method of dividing positive sample pairs and negative sample pairs from video samples, augmented video samples, audio samples and augmented audio samples, please refer to the following embodiments and will not be repeated here. In some embodiments, the video samples in the positive sample pairs and the negative sample pairs are input into the video feature extraction model 31 to obtain video features, and the audio samples in the positive sample pairs and the negative sample pairs are input into the audio feature extraction model 32 to obtain audio features. Optionally, according to the video features and audio features corresponding to the positive sample pairs and the negative sample pairs respectively, the contrast loss function value is determined, and with the goal of minimizing the contrast loss function value, the parameters of the video feature extraction model 31 and the audio feature extraction model 32 are adjusted to obtain the trained video feature extraction model 31 and the audio feature extraction model 32.

[0071] In the method provided in the embodiment of the present application, the execution subject of each step can be a computer device, which refers to an electronic device with data calculation, processing and storage capabilities. The computer device can be a terminal such as a PC (Personal Computer), a tablet computer, a smart phone, a wearable device, an intelligent robot, etc.; it can also be a server. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The computer device can be the model training device 10 in Figure 1, or it can be the model use device 20.

[0072] Please refer to FIG2 , which shows a schematic diagram of an audio and video matching method provided in an embodiment of the present application.

[0073] For a video that has not yet been released, the user is likely to add background music to the video to be released, and at this time, it is necessary to recommend matching audio for the video to be released. Optionally, the video to be released is called a to-be-matched video.

[0074] The first step is to find at least one audio that matches the video tag from the music library based on the video tag of the video to be matched (hereinafter also referred to as the category tag). Optionally, the tag of the matching audio is the same as or has a high similarity with the tag of the video to be matched.

[0075] The second step is to determine the historical video that matches each audio clip based on historical matching. Alternatively, the historical video that matches the audio clip can be determined based on historical matching. For example, a video publisher can record each user's video postings and background music usage with the user's permission. Based on this record, the historical video corresponding to the audio clip can be determined.

[0076] In the third step, the video features of the video to be matched are extracted through the trained video feature extraction model 31.

[0077] In the fourth step, the audio features of the matching audio are extracted through the trained audio feature extraction model 32.

[0078] For the target matching audio among the multiple matching audios, in the fifth step, the video features of the historical video corresponding to the target matching audio are extracted through the trained video feature extraction model 31.

[0079] In the sixth step, based on the feature information of the video to be matched and the feature information of the target matching audio, the feature similarity between the feature information of the video to be matched and the target matching audio is determined.

[0080] In the seventh step, the interest similarity between the feature information of the video to be matched and the target matching audio is determined based on the feature information of the video to be matched and the feature information of at least one historical video corresponding to the target matching audio.

[0081] In the eighth step, the similarity between the video to be matched and the target matching audio is determined based on the feature similarity and interest similarity between the feature information of the video to be matched and the target matching audio.

[0082] In the ninth step, according to the similarities between the video to be matched and the multiple matching audios, the matching audios are sorted in order of similarity, and a list of audios recommended to the video to be matched is determined.

[0083] In the related art, the video / music pre-trained feature extractor obtained through different training objectives is used to extract emb (features) for cross-modal matching. The embs obtained by the video feature extractors and audio feature extractors obtained through different pre-training objectives are difficult to match (the emb spaces are different). In the related art, the frame emb (feature average) is also used to represent the video emb (video feature), which loses the timing information. There is also a recommendation algorithm based on label / target detection, which does not make full use of the content information of the video, resulting in the richness of the recommended songs not being high enough. In addition, there is a recommendation algorithm based on popular songs, but it does not use the content information of video / music, and cannot recommend background music in a personalized way.

[0084] The technical solution provided in the embodiment of the present application uses a pre-training model based on contrastive learning to obtain video features / audio features, and uses temporal augmentation and corresponding training tasks to promote the model to learn temporal rhythm information. At the same time, the two-stage (two aspects) music recommendation process based on user interests captures user interests and realizes personalized recommendations. In addition, song tags (emotions / scenes) are obtained based on user interests (comments) to understand music from the user's perspective. Therefore, the technical solution provided in the embodiment of the present application can improve the hit rate of recommended audio (which can also be understood as the possibility of being selected by the user to be combined with the video to be released and released).

[0085] Please refer to Figure 3, which shows a flowchart of a model training method for audio and video matching provided by one embodiment of the present application. The execution entity of each step of the method can be the model training device described above. In the following method embodiments, for ease of description, only the execution entity of each step is described as a "computer device". The method can include at least one of the following steps (310-340):

[0086] Step 310: construct a set of sample pairs based on at least one video sample and at least one audio sample. The set of sample pairs includes at least one positive sample pair and at least one negative sample pair. The positive sample pair includes a video sample and an audio sample with a matching relationship, and the negative sample pair includes a video sample and an audio sample without a matching relationship.

[0087] Video samples: Video samples are obtained from videos posted in the user account history. The embodiments of the present application are all authorized by the user when obtaining audio and video samples. For example, user A posted a video C on platform B. Video C includes video screen content, video and audio content corresponding to the video screen content (or there may not be any), and background music D of video C. At this time, the video screen content can be used as a video sample, and the background music D of video C can be considered as an audio sample that has a matching relationship with the video sample. Optionally, when posting video C, user A selected audio for the video (that is, background music D for video C). Of course, when posting video C, the user may not have directly selected background music D, and may have auditioned many other audios, but did not select them as background music for video C. Optionally, the audios that these users auditioned but did not select as background music are regarded as audio samples that do not have a matching relationship with the above-mentioned video samples.

[0088] Audio samples: obtain the audio corresponding to the video from historically released videos (the audio in this case refers to the background music of the video, not the music of the video content itself) or the audio that was auditioned by the user when the video was released but was not determined to be the background music of the released video.

[0089] In some embodiments, sample augmentation is performed on the at least one video sample and the at least one audio sample to obtain an augmented video sample and an augmented audio sample (the specific augmentation method is described in the following embodiments and is not described in detail here). Optionally, a set of sample pairs is constructed based on the at least one video sample and the at least one audio sample, or a set of sample pairs is constructed based on the at least one video sample and the at least one audio sample and the at least one augmented video sample and the at least one augmented audio sample.

[0090] Positive sample pair: considered to be two samples with a similar or matching relationship. Optionally, when the positive sample pair is two samples with a similar relationship, the two samples in the positive sample pair can be considered to be samples of the same type (for example, both are video samples). Optionally, when the positive sample pair is two samples with a matching relationship, the two samples in the positive sample pair can be considered to be a video sample and an audio sample, and the video sample and the audio sample are considered to belong to the same published video. Optionally, the positive sample pair includes an anchor sample and a positive sample.

[0091] Negative sample pair: considered to be two samples that do not have a similar or matching relationship. Optionally, when a negative sample pair is two samples that do not have a similar relationship, the two samples in the negative sample pair can be considered to be samples of the same type (for example, both are video samples). Optionally, when a negative sample pair is two samples that do not have a matching relationship, the two samples in the negative sample pair can be considered to be a video sample and an audio sample, and it is considered that the user of the published video corresponding to the video sample chose to listen to the audio when publishing the video but ultimately did not use it. Optionally, the negative sample pair includes an anchor sample and a negative sample.

[0092] Step 320 : For the video sample and the audio sample in the same sample pair, feature information corresponding to the video sample is extracted using the video feature extraction model, and feature information corresponding to the audio sample is extracted using the audio feature extraction model.

[0093] In some embodiments, the video feature extraction model is a pre-trained machine learning model. In some embodiments, the video feature extraction model includes at least one feature extraction module. Optionally, the video feature extraction model includes a linear transformation module in addition to the feature extraction module. The embodiments of the present application do not limit the specific model architecture of the video feature extraction model.

[0094] In some embodiments, the audio feature extraction model is a pre-trained machine learning model. In some embodiments, the audio feature extraction model includes at least one feature extraction module. Optionally, the audio feature extraction model includes a linear transformation module in addition to the feature extraction module. The embodiments of the present application do not limit the specific model architecture of the audio feature extraction model.

[0095] In some embodiments, the video feature extraction model and the audio feature extraction model are jointly trained together.

[0096] In some embodiments, for a video, a video frame sequence is obtained by sampling and extracting frames, and then the feature information corresponding to the video is extracted by a video feature extraction model. Optionally, there is no limitation on the sampling frequency. In some embodiments, taking the video as a 1-minute video as an example, the 1-minute video is sampled at a frequency of N frames per minute to obtain N frames of images. Optionally, based on the pixels of each frame of image, the pixel matrix corresponding to the frame of image is determined. Optionally, the matrix dimension corresponding to the N frames of image is a matrix of 3*a*b*N, where 3 represents the value of the RGB three channels, a and b represent the number of pixels of the image in the horizontal and vertical directions respectively, N represents the number of images extracted, and N, a and b are positive integers. Optionally, the matrix of dimension 3*a*b*N (or considered as a video frame sequence) is used as the input of the video feature extraction model to obtain the corresponding feature information.

[0097] In some embodiments, for a segment of audio, by sampling and extracting frames, an audio frame sequence is obtained, and then the feature information corresponding to the segment of video is extracted through a video feature extraction model. Optionally, there is no limitation on the sampling frequency. In some embodiments, taking the audio as a 1-minute video as an example, the 1-minute audio file (optionally, the audio file is in wav format) is sampled at a frequency of N frames per minute to obtain N frame extraction results. Optionally, the element size corresponding to the frame is determined based on the size of the beat (audio beat information) corresponding to each frame extraction result. Optionally, the matrix dimension corresponding to the N frame extraction results is a 1*N matrix. Optionally, the matrix with the dimension of 1*N is used as the input of the audio feature extraction model to obtain the corresponding feature information.

[0098] In some embodiments, the feature information is a feature vector. The embodiments of the present application do not limit the dimensions of the feature vectors output by the video feature extraction model or the audio feature extraction model, nor do they limit the specific model architecture of the video feature extraction model, which includes but is not limited to a convolution module, a pooling module, etc.; nor do they limit the specific model architecture of the audio feature extraction model, which includes but is not limited to a convolution module, a pooling module, etc.

[0099] Step 330 : Determine the value of a contrast loss function based on the feature information corresponding to the video sample and the audio sample in the same sample pair, wherein the contrast loss function is used to characterize the degree of matching of the sample pair.

[0100] Contrastive loss function: A function used to characterize the degree of matching between pairs of samples. Optionally, the value of the contrastive loss function can reflect the degree of matching between the positive sample pair and the negative sample pair. Optionally, by performing a gradient descent update on the contrastive loss function, the matching degree of the positive sample pair can be improved and the matching degree of the negative sample pair can be reduced.

[0101] Step 340 , adjusting the parameters of the video feature extraction model and the audio feature extraction model according to the value of the contrast loss function, to obtain a trained video feature extraction model and a trained audio feature extraction model.

[0102] In some embodiments, with the goal of minimizing the value of the contrast loss function, the parameters of the video feature extraction model and the audio feature extraction model are adjusted to obtain a trained video feature extraction model and a trained audio feature extraction model.

[0103] Of course, this application does not limit the method of adjusting model parameters according to the value of the contrast loss function.

[0104] The technical solution provided in the embodiments of the present application utilizes contrastive learning to jointly train the video feature extraction model and the audio feature extraction model. Since both the video feature extraction model and the audio feature extraction model can learn the features of the video and audio modalities during joint training, and are trained using contrastive learning, the video feature extraction capability of the video feature extraction model and the audio feature extraction capability of the audio feature extraction model can be improved. Therefore, the audio recommended for the video to be matched is determined based on the matching degree between the video features extracted by the video feature extraction model and the video features extracted by the audio feature extraction model, thereby improving the background music hit rate.

[0105] Please refer to Figure 4, which shows a flowchart of a model training method for audio and video matching provided by another embodiment of the present application. The execution subject of each step of the method can be the model training device introduced above. In the following method embodiment, for the sake of convenience, only the execution subject of each step is introduced as a "computer device". The method may include at least one of the following steps (310-340):

[0106] Step 310: construct a set of sample pairs based on at least one video sample and at least one audio sample. The set of sample pairs includes at least one positive sample pair and at least one negative sample pair. The positive sample pair includes a video sample and an audio sample with a matching relationship, and the negative sample pair includes a video sample and an audio sample without a matching relationship.

[0107] Step 320 : For the video sample and the audio sample in the same sample pair, feature information corresponding to the video sample is extracted using the video feature extraction model, and feature information corresponding to the audio sample is extracted using the audio feature extraction model.

[0108] Step 321 : Perform augmentation processing on the video sample and the audio sample in the same sample pair, respectively, to obtain an augmented video sample corresponding to the video sample and an augmented audio sample corresponding to the audio sample.

[0109] In the embodiments of this application, the augmentation methods for audio and video samples include temporal augmentation, which includes order augmentation, speed augmentation, and direction augmentation. The specific implementation methods of the three augmentation methods are shown in the following steps. These three augmentation methods can exist independently or in combination. Of course, all three augmentation methods can also be performed simultaneously on the same sample. This application does not limit the specific combination of augmentation.

[0110] In the embodiment of the present application, the augmentation method for the video sample also includes visual augmentation. Of course, the present application does not limit the specific type of visual augmentation. Optionally, visual augmentation includes color conversion, random resizing, cutout, horizontal flip, etc.

[0111] In the embodiment of the present application, the augmentation of the video sample includes at least one of the aforementioned temporal augmentation and visual augmentation. The augmentation of the audio sample includes any one or more types of the aforementioned temporal augmentation. The embodiment of the present application does not limit the specific augmentation method of the audio sample and the video sample.

[0112] In some embodiments, when the augmentation method is sequential augmentation, step 321 includes at least one step from step 321 - 1 to step 321 - 3 (not shown in the figure).

[0113] Step 321-1, for the sample pairs in the set, segment the video samples in the sample pairs to obtain multiple video clips, wherein the feature information corresponding to the video sample is obtained by extracting the first video clip from the multiple video clips through a video feature extraction model, and the feature information corresponding to the first video clip is obtained; the feature information corresponding to the audio sample is obtained by extracting the first audio clip through an audio feature extraction model, and the first audio clip is the audio clip corresponding to the first video clip.

[0114] In some embodiments, there is no limitation on the method for segmenting the video sample. Optionally, the segmentation is uniform or non-uniform. Of course, the present application does not limit the granularity of the segmentation. Optionally, a video sample is evenly divided into M segments, where M is a positive integer. Optionally, the first video clip is any segment of the M segments. Optionally, the first video clip is sampled and framed to obtain a video frame sequence that can be input into a video feature extraction model. Optionally, the first video clip is the mth segment of the M segments, where m is a positive integer not greater than M. Optionally, the first audio clip is the mth segment of the audio sample divided into M segments that matches the video sample.

[0115] Step 321-2: Select a second video segment different from the first video segment from multiple video segments as an augmented video sample, wherein the feature information corresponding to the augmented video sample is extracted from the second video segment through a video feature extraction model, and the feature information corresponding to the second video segment is obtained.

[0116] Optionally, the second video segment is any segment among the M video segments that is different from the first video segment. Optionally, the second video segment is sampled and frame-drawn to obtain a video frame sequence that can be input into the video feature extraction model. Optionally, the second video segment is the jth segment among the M segments, where j is a positive integer different from m and not greater than M.

[0117] In step 321-3, the second audio segment is used as the augmented audio sample, wherein the second audio segment is the audio segment corresponding to the second video segment, and the feature information corresponding to the augmented audio sample is obtained by extracting the second audio segment through the audio feature extraction model.

[0118] Optionally, the second audio segment is the jth segment of the audio sample divided into M segments that matches the video sample.

[0119] In some embodiments, when the augmentation method is speed augmentation, step 321 includes at least one of steps 321 - 4 to 321 - 7 (not shown in the figure).

[0120] Step 321-4, select at least one frame from the video sample using the first sampling frequency to obtain a first video frame sequence, wherein the feature information corresponding to the video sample is extracted from the first video frame sequence through a video feature extraction model, and the feature information corresponding to the first video frame sequence is obtained.

[0121] Optionally, the video sample in step 321-4 can be a video segment after the aforementioned sequential augmentation. Alternatively, if the original video sample is a 4-minute matrix, and after the aforementioned sequential augmentation, it is divided into four 1-minute video segments, then step 321-4 can be sampling of any of these video segments. Of course, the video sample in step 321-4 can also be considered to be the original complete video without the aforementioned sequential augmentation, and this application does not limit this.

[0122] The first sampling frequency and the second sampling frequency can be considered as the frequency of extracting frames from the video. Optionally, the sampling frequency (frame extraction frequency) is 12 frames per minute, which means that for a one-minute video, 12 frames need to be sampled to obtain a video frame extraction sequence (video frame extraction graph). Optionally, based on the pixels in each frame, the input for input into the video feature extraction model is determined. Optionally, the input is a 3*a*b*N matrix.

[0123] Step 321-5: Select at least one frame from the video sample using a second sampling frequency to obtain a second video frame sequence as an augmented video sample, wherein the feature information corresponding to the augmented video sample is obtained by extracting the second video frame sequence through a video feature extraction model; the second sampling frequency is different from the first sampling frequency.

[0124] Optionally, the second sampling frequency is the same as or different from the first sampling frequency. Optionally, the first sampling frequency is k1 frames per minute, and the second sampling frequency is k2 frames per minute, where k2 is a positive integer less than k1. Optionally, for a one-minute video, the pixel matrix corresponding to the first video frame sequence obtained using the first sampling frequency is 3*a*b*k1. Optionally, for a one-minute video, the second video frame sequence obtained using the second sampling frequency has only k2 frames, and the corresponding pixel matrix is ​​3*a*b*k2. At this time, the matrix dimensions of 3*a*b*k1 and 3*a*b*k2 are inconsistent. At this time, the second video frame sequence is supplemented, for example, blank images (the values ​​of the three RGB channels are all 0) are used to fill the k1-k2 frames, so that the pixel matrix corresponding to the supplemented second video frame sequence is also 3*a*b*k1.

[0125] Optionally, when the dimension of the pixel value matrix corresponding to the second video sequence is inconsistent with the dimension of the pixel value matrix corresponding to the first video sequence, 0 is used for padding so that the dimension of the pixel value matrix corresponding to the second video sequence after padding is consistent with the dimension of the pixel value matrix corresponding to the first video sequence.

[0126] Step 321-6: Select at least one frame from the audio sample using a third sampling frequency to obtain a first audio frame sequence, wherein the feature information corresponding to the audio sample is extracted from the first audio frame sequence using an audio feature extraction model, and the feature information corresponding to the first audio frame sequence is obtained.

[0127] The third sampling frequency and the fourth sampling frequency can be considered as the frequency of extracting frames for the audio. Optionally, the sampling frequency (frame extraction frequency) is 12 frames per minute, which means that for a one-minute audio, 12 frames need to be sampled to obtain an audio frame extraction sequence. Optionally, each frame of audio corresponds to a beat value. Based on the beat values ​​corresponding to the 12 frames, a 1*12 matrix is ​​obtained to determine the input for input into the video feature extraction model. Optionally, the input is a 1*12 matrix.

[0128] Step 321-7: Select at least one frame from the audio sample using a fourth sampling frequency to obtain a second audio frame sequence as an augmented audio sample, wherein feature information corresponding to the augmented audio sample is feature information corresponding to the second audio frame sequence obtained by extracting the second audio frame sequence using an audio feature extraction model; the fourth sampling frequency is different from the third sampling frequency.

[0129] Optionally, the fourth sampling frequency is the same as or different from the third sampling frequency. Optionally, the third sampling frequency is k3 frames per minute, and the fourth sampling frequency is k4 frames per minute, where k4 is a positive integer less than k3. Optionally, for a one-minute audio, the matrix corresponding to the first audio frame sequence obtained using the third sampling frequency is 1*k3. Optionally, for a one-minute audio, the second audio frame sequence obtained using the fourth sampling frequency has only k4 frames, and the corresponding matrix is ​​1*k4. At this time, the matrix dimensions of 1*k4 and 1*k3 are inconsistent. At this time, the second audio frame sequence is supplemented, for example, k3-k4 frames are filled with blanks (beat value is 0), so that the matrix corresponding to the supplemented second audio frame sequence is also 1*k3.

[0130] In some embodiments, when the augmentation method is directional augmentation, step 321 includes at least one step from step 321 - 8 to step 321 - 11 (not shown in the figure).

[0131] Step 321-8, sampling at least one frame in positive order from the video sample to obtain a third video frame sequence, wherein the feature information corresponding to the video sample is extracted from the third video frame sequence through a video feature extraction model, and the feature information corresponding to the third video frame sequence is obtained.

[0132] Optionally, the video sample in step 321-8 can be a video segment after the aforementioned sequential augmentation. Alternatively, if the original video sample is a 4-minute video, and after the aforementioned sequential augmentation, it is divided into four 1-minute video segments, then step 321-8 can be sampling of any of these video segments. Of course, the video sample in step 321-4 can also be considered to be the original complete video that has not undergone the aforementioned sequential augmentation, and this application does not limit this.

[0133] Optionally, in the case where the sampling frequency and the sampling direction are consistent, the third video frame extraction sequence and the first video frame extraction sequence may be the same sequence.

[0134] Of course, if there is any inconsistency between the sampling frequency and the sampling direction, the third video frame sequence and the first video frame sequence are different sequences.

[0135] Step 321-9, reversely sample at least one frame from the video sample to obtain a fourth video frame sequence as an augmented video sample, wherein the feature information corresponding to the augmented video sample is extracted from the fourth video frame sequence through a video feature extraction model, and the feature information corresponding to the fourth video frame sequence is obtained.

[0136] Alternatively, for a one-minute video clip, assuming the same sampling frequency for forward and reverse sampling, the third and fourth video frame sequences contain essentially the same pictures, but are arranged differently. Assuming 12 frames are sampled and numbered 1-12, the third video frame sequence consists of pictures 1-12, while the fourth video frame sequence corresponds to pictures 12-1.

[0137] Step 321-10: Sample at least one frame in positive order from the audio sample to obtain a third audio frame sequence, wherein the feature information corresponding to the audio sample is extracted from the third audio frame sequence using an audio feature extraction model to obtain the feature information corresponding to the third audio frame sequence.

[0138] Optionally, the audio sample in step 321-10 can be an audio segment after the aforementioned sequential augmentation. Alternatively, if the original audio sample is a 4-minute audio segment that is divided into 4 1-minute video segments after the aforementioned sequential augmentation, then step 321-10 can be sampling any of these audio segments. Of course, the audio sample in step 321-10 can also be considered to be the original complete video that has not undergone the aforementioned sequential augmentation, and this application does not limit this.

[0139] Optionally, when the sampling frequency and the sampling direction are consistent, the third audio frame abstraction sequence and the first audio frame abstraction sequence may be the same sequence.

[0140] Of course, if there is any inconsistency between the sampling frequency and the sampling direction, the third audio frame sequence and the first audio frame sequence are different sequences.

[0141] Step 321-11: Reversely sample at least one frame from the audio sample to obtain a fourth audio frame sequence as an augmented audio sample, wherein feature information corresponding to the augmented audio sample is extracted from the fourth audio frame sequence using an audio feature extraction model, and feature information corresponding to the fourth audio frame sequence is obtained.

[0142] Alternatively, for a one-minute audio clip, assuming the same sampling frequency for both forward and reverse sampling, the third and fourth audio frame sequences have essentially the same beat values, but are arranged differently. Assuming 12 beat values ​​are sampled, numbered 1-12, the third audio frame sequence has beat values ​​1-12, while the fourth audio frame sequence corresponds to beat values ​​12-1.

[0143] Step 322: extract feature information corresponding to the augmented video sample using a video feature extraction model, and extract feature information corresponding to the augmented audio sample using an audio feature extraction model.

[0144] After randomly combining and generating augmented video samples and augmented audio samples, it is necessary to reconstruct positive sample pairs and negative samples, and perform steps 322 and 320 .

[0145] Alternatively, referring to Figure 5, it shows an augmented schematic diagram, where 51 represents a video sample, and 52 represents a corresponding matched audio sample.

[0146] Step 331 : Determine the value of the contrast loss function based on the feature information corresponding to the video sample and the feature information corresponding to the audio sample in the same sample pair, as well as the feature information corresponding to the augmented video sample and the feature information corresponding to the augmented audio sample.

[0147] Optionally, the feature information corresponding to the video samples and the feature information corresponding to the audio samples used to calculate the contrast loss function value, as well as the feature information corresponding to the augmented video samples and the feature information corresponding to the augmented audio samples are feature information obtained after passing through the video feature extraction model and the audio feature extraction model and then passing through the MLP layer.

[0148] In the embodiment of the present application, there are at least three ways to construct positive and negative sample pairs for video samples, audio samples, augmented video samples, and augmented audio samples. Anchor samples and positive samples constitute positive sample pairs, and anchor samples and negative samples constitute negative sample pairs.

[0149] Optionally, the augmented video sample is used as the first anchor sample, the original video sample corresponding to the augmented video sample is used as the first positive sample, and the other video samples are used as the first negative samples. Optionally, the augmented video sample corresponding to the i-th video segment of video A is used as the first anchor sample, the i-th video segment of video A is used as the first positive sample, and the i-th video segment of video B is used as the first negative sample, where i is a positive integer. Optionally, the first anchor sample and the first positive sample constitute a first positive sample pair, and the first anchor sample and the first negative sample constitute a first negative sample pair.

[0150] Optionally, the augmented video sample is used as the second anchor sample, the audio sample that matches the original video sample corresponding to the augmented video sample is used as the second positive sample, and the other audio samples are used as the second negative samples. Optionally, the augmented video sample corresponding to the i-th video segment of video A is used as the second anchor sample, the i-th audio segment of audio C that matches video A is used as the second positive sample, where i is a positive integer, and the i-th audio segment of other audio that does not match video A is used as the second negative sample. Optionally, the second anchor sample and the second positive sample constitute a second positive sample pair, and the second anchor sample and the second negative sample constitute a second negative sample pair.

[0151] Optionally, the augmented audio sample is used as the third anchor sample, the video sample that matches the original audio sample corresponding to the augmented audio sample is used as the third positive sample, and the other video samples are used as the third negative sample. Optionally, the augmented audio sample corresponding to the i-th audio segment of audio A is used as the third anchor sample, the i-th video segment of video C that matches audio A is used as the third positive sample, where i is a positive integer, and the i-th video segment of other videos that do not match audio A is used as the third negative sample. Optionally, the third anchor sample and the third positive sample constitute a third positive sample pair, and the third anchor sample and the third negative sample constitute a third negative sample pair.

[0152] The embodiment of the present application does not limit the method for constructing positive and negative sample pairs.

[0153] In some embodiments, step 331 includes at least one of steps 331 - 1 to 331 - 4 (not shown).

[0154] Step 331 - 1 : Determine a first contrast loss based on feature information corresponding to the video sample and feature information corresponding to the augmented video sample.

[0155] Optionally, the first contrast loss is determined using feature information corresponding to the first positive sample pair and the first negative sample respectively.

[0156] Step 331 - 2 : Determine a second contrast loss based on the feature information corresponding to the video sample and the feature information corresponding to the augmented audio sample.

[0157] In some embodiments, the second contrast loss is determined using feature information corresponding to the second positive sample pair and the second negative sample.

[0158] Step 331 - 3 : Determine a third contrast loss based on the feature information corresponding to the augmented video sample and the feature information corresponding to the audio sample.

[0159] In some embodiments, the second contrast loss is determined using feature information corresponding to the third positive sample pair and the third negative sample.

[0160] Step 331 - 4 : Determine a value of the contrast loss function according to the first contrast loss, the second contrast loss, and the third contrast loss.

[0161] In some embodiments, a weighted sum is performed on the first contrast loss, the second contrast loss, and the third contrast loss to determine a value of the contrast loss function.

[0162] In some embodiments, the first contrast loss, the second contrast loss, and the third contrast loss are directly summed to determine the value of the contrast loss function.

[0163] Optionally, Among them, L CRL represents the value of the contrast loss function. Optionally, is the first contrast loss, l va is the second contrastive loss, is the third contrastive loss, and E stands for expectation. Here, v represents a video sample, a represents an audio sample, i represents the position of the segment in the complete video, and r represents the value of the augmentation function. Different augmentation methods have different corresponding r values. represents a positive sample, represents negative samples.

[0164] Optionally, and, is a positive sample, is a negative sample, w represents the weight, which is a learnable parameter in the model.

[0165] In some embodiments, when the augmentation method is sequential augmentation, the above method further includes at least one step from step 332 to step 335 (not shown in the figure).

[0166] Step 332: Determine the order of the first video segment and the second video segment based on the feature information corresponding to the first video segment and the feature information corresponding to the second video segment by using a first order classifier.

[0167] The first order classifier is a binary classifier. Optionally, the classification results are 0 and 1, where 1 represents the front-to-back order and 0 represents the back-to-front order. Optionally, the first video clip is the first segment in the complete video, and the second video clip is the second segment in the complete video. Then, the first order classifier is used to determine the order of the first video clip and the second video clip based on the feature information corresponding to the first video clip and the feature information corresponding to the second video clip, which should be the first video clip in front and the second video clip in the back, that is, the front-to-back order. At this time, the output of the first order classifier should be 1.

[0168] Step 333: Determine the order of the first audio segment and the second audio segment based on the feature information corresponding to the first audio segment and the feature information corresponding to the second audio segment by using a second order classifier.

[0169] The second order classifier is a binary classifier. Optionally, the classification results are 0 and 1, where 1 represents the front-to-back order and 0 represents the back-to-front order. Optionally, the first audio segment is the first segment in the complete audio, and the second audio segment is the second segment in the complete audio. Then, the second order classifier is used to determine the order of the first audio segment and the second audio segment based on the feature information corresponding to the first audio segment and the feature information corresponding to the second audio segment, which should be the first audio segment in front and the second audio segment in the back, that is, the front-to-back order. At this time, the output of the second order classifier should be 1.

[0170] Step 334: Determine the order of the first video segment and the second audio segment based on the feature information corresponding to the second video segment and the feature information corresponding to the second audio segment through a third order classifier.

[0171] The third order classifier is a binary classifier. Optionally, the classification results are 0 and 1, where 1 represents the front-to-back order and 0 represents the back-to-front order. Optionally, the second video clip is the first segment in the complete video, and the second audio clip is the second segment in the complete audio. The complete video and the complete audio match. Then, the third order classifier is used to determine the order of the second video clip and the second audio clip based on the feature information corresponding to the second video clip and the feature information corresponding to the second audio clip. The order should be that the second video clip is in front and the second audio clip is in the back, that is, the front-to-back order. At this time, the output of the third order classifier should be 1.

[0172] Optionally, the first order classifier, the second order classifier and the third order classifier are different classifiers.

[0173] In step 335, a sequential classification loss is determined based on the order determined by the first order classifier, the second order classifier, and the third order classifier. The sequential classification loss is used to reflect the accuracy of the prediction of the order, and the sequential classification loss is used to adjust the model parameters in combination with the value of the contrast loss function.

[0174] Optionally, a weighted sum is performed on the order-corresponding losses determined by the first order classifier, the second order classifier, and the third order classifier to determine the order classification loss.

[0175] Optionally, the order-corresponding losses determined by the first order classifier, the second order classifier, and the third order classifier are summed to determine the order classification loss.

[0176] Optionally, a sequential classification loss is determined by unsupervised learning.

[0177] In some embodiments, when the augmentation method is speed augmentation, the above method further includes at least one step from step 336 to step 338 (not shown in the figure).

[0178] Step 336: Use the first speed classifier to determine the predicted sampling frequency of the first video frame sequence based on the feature information corresponding to the first video frame sequence; and use the first speed classifier to determine the predicted sampling frequency of the second video frame sequence based on the feature information corresponding to the second video frame sequence.

[0179] The first speed classifier is a 4-category classifier. Optionally, the classification results are 1, 2, 4, and 8, where 1 represents 1x sampling, 2 represents 2x sampling, 3 represents 3x sampling, and 4 represents 4x sampling. Optionally, if the first video frame sequence is 1x sampling, the first speed classifier is used to determine the predicted sampling frequency of the first video frame sequence as 1 based on the feature information corresponding to the first video frame sequence. The corresponding second video frame sequence is the same as the first video frame sequence.

[0180] Step 337: Determine the predicted sampling frequency of the first audio frame sequence using a second speed classifier based on the feature information corresponding to the first audio frame sequence; and determine the predicted sampling frequency of the second audio frame sequence using a second speed classifier based on the feature information corresponding to the second audio frame sequence.

[0181] The second speed classifier is a 4-category classifier. Optionally, the classification results are 1, 2, 4, and 8, where 1 represents 1x sampling, 2 represents 2x sampling, 3 represents 3x sampling, and 4 represents 4x sampling. Optionally, if the first audio frame sequence is 1x sampling, the first speed classifier is used to determine the predicted sampling frequency of the first audio frame sequence as 1 based on the feature information corresponding to the first audio frame sequence. The second audio frame sequence is similar to the first audio frame sequence.

[0182] Optionally, the first speed classifier and the second speed classifier are the same classifier.

[0183] In step 338 , a speed classification loss is determined based on the predicted sampling frequencies determined by the first speed classifier and the second speed classifier. The speed classification loss is used to reflect the prediction accuracy of the sampling frequency, and the speed classification loss is used to adjust the model parameters in combination with the value of the contrast loss function.

[0184] Optionally, the speed classification loss is determined by unsupervised learning.

[0185] In some embodiments, when the augmentation method is directional augmentation, the above method further includes at least one step from step 339 to step 339 - 2 (not shown in the figure).

[0186] Step 339: Use the first direction classifier to determine the sampling direction of the third video frame sequence based on the feature information corresponding to the third video frame sequence; and use the first direction classifier to determine the sampling direction of the fourth video frame sequence based on the feature information corresponding to the fourth video frame sequence.

[0187] The first direction classifier is a binary classifier. Optionally, the classification results are 0 and 1, where 1 indicates positive order and 0 indicates reverse order. Optionally, if the third video frame sequence is sampled in positive order, the first direction classifier determines that the sampling direction of the third video frame sequence should be positive order based on the feature information corresponding to the third video frame sequence. In this case, the output of the first direction classifier should be 1. The fourth video frame sequence is the same as the third video frame sequence.

[0188] In step 339-1, a second direction classifier is used to determine the sampling direction of the third audio frame sequence based on the feature information corresponding to the third audio frame sequence; and a second direction classifier is used to determine the sampling direction of the fourth audio frame sequence based on the feature information corresponding to the fourth audio frame sequence.

[0189] The second direction classifier is a binary classifier. Optionally, the classification results are 0 and 1, where 1 indicates forward order and 0 indicates reverse order. Optionally, if the third audio frame sequence is sampled in forward order, the second direction classifier determines, based on the feature information corresponding to the third audio frame sequence, that the sampling direction of the third audio frame sequence should be forward order. In this case, the output of the second direction classifier should be 1. The fourth audio frame sequence is similar to the third audio frame sequence.

[0190] Optionally, the first direction classifier and the second direction classifier may be the same classifier, or classifiers of the same type.

[0191] Step 339-2, determines the direction classification loss based on the sampling directions determined by the first direction classifier and the second direction classifier. The direction classification loss is used to reflect the prediction accuracy of the sampling direction, and the direction classification loss is used to adjust the model parameters in combination with the value of the contrast loss function.

[0192] Optionally, the direction classification loss is determined by unsupervised learning.

[0193] Step 340 , adjusting the parameters of the video feature extraction model and the audio feature extraction model according to the value of the contrast loss function, to obtain a trained video feature extraction model and a trained audio feature extraction model.

[0194] Optionally, according to the value of the contrast loss function, as well as the above-mentioned sequential classification loss, direction classification loss, and speed classification loss, the parameters of the video feature extraction model and the audio feature extraction model are adjusted to obtain a trained video feature extraction model and a trained audio feature extraction model.

[0195] Alternatively, LTEMP=Lspeed+Ldirection+Lorder, where Lorder is the order classification loss, Lspeed is the speed classification loss, Ldirection is the direction classification loss, and LTEMP is the total loss of timing augmentation.

[0196] Optionally, LSSL=LCRL+λLTEMP, where LSSL represents the total loss, LCRL represents the value of the contrast loss function, and λ is a preset parameter of 0.5.

[0197] With reference to Figure 6, it shows a schematic diagram of a pre-training model. Optionally, the pre-training model includes a video feature extraction model, an audio feature extraction model, a speed classifier, a direction classifier, a VV sequential classifier (first sequential classifier), an AA sequential classifier (second sequential classifier), and a VA sequential classifier (third sequential classifier). Optionally, the video feature extraction model includes CMT (pre-trained video feature extractor) and X-linear (linear module). Optionally, the audio feature extraction model includes Yamnet (pre-trained audio feature extractor) and audio-linear (linear module). Optionally, the block numbered 1 in the figure represents the feature information obtained by the video feature extraction model for the video sample, the block numbered 2 in the figure represents the feature information obtained by the augmented video sample through the video feature extraction model, the block numbered 3 in the figure represents the feature information obtained by the audio sample through the audio feature extraction model, and the block numbered 4 in the figure represents the feature information obtained by the augmented audio sample through the audio feature extraction model. Optionally, the block labeled 5 in the figure represents the feature information obtained by the video sample after passing through the video feature extraction model and then the output features obtained by passing through MLP, the block labeled 6 in the figure represents the feature information obtained by the augmented video sample after passing through the video feature extraction model and then the output features obtained by passing through MLP, the block labeled 7 in the figure represents the feature information obtained by the audio sample after passing through the audio feature extraction model and then the output features obtained by passing through MLP, and the block labeled 8 in the figure represents the feature information obtained by the augmented audio sample after passing through the audio feature extraction model and then the output features obtained by MLP. Optionally, the block labeled 9 in the figure represents the result of the speed classifier passing the feature information obtained by the video sample or augmented video sample through the video feature extraction model, the block labeled 10 in the figure represents the result of the direction classifier passing the feature information obtained by the video sample or augmented video sample through the video feature extraction model, the block labeled 11 in the figure represents the result of the speed classifier passing the feature information obtained by the audio sample or augmented audio sample through the audio feature extraction model, and the block labeled 12 in the figure represents the result of the direction classifier passing the feature information obtained by the audio sample and augmented audio sample through the audio feature extraction model. Optionally, the first contrast loss is calculated based on the block labeled 5 and the block labeled 6, the second contrast loss is calculated based on the block labeled 5 and the block labeled 8, and the third contrast loss is calculated based on the block labeled 7 and the block labeled 6. Optionally, the first sequence loss is calculated based on the block labeled 1 and the block labeled 2. The second order loss is calculated according to the blocks 3 and 4, and the third order loss is calculated according to the blocks 2 and 4. Optionally, the speed classification loss is calculated according to the blocks 9 or 11.Optionally, the speed classification loss is calculated according to the block numbered 10 or the block numbered 12.

[0198] The technical solution provided in the embodiment of the present application combines sample augmentation with comparative learning, so that both the video feature extraction model and the audio feature extraction model can learn more features, which is beneficial to the downstream audio and video matching tasks.

[0199] In addition, during augmentation, in addition to visual augmentation, temporal augmentation is also introduced, so that the video feature extraction model and the audio feature extraction model can learn more temporal features, which is conducive to enriching the feature extraction of the video feature extraction model and the audio feature extraction model.

[0200] Specifically, when calculating the contrastive loss, three different contrastive losses are constructed to learn the features between positive and negative sample pairs from different dimensions. This can make the feature distances between positive sample pairs in the video feature extraction model and the audio feature extraction model closer, and the feature distances between negative sample pairs farther. This enriches the feature extraction capabilities of the video feature extraction model and the audio feature extraction model, which is beneficial to improving the performance of model representation.

[0201] Please refer to Figure 7, which shows a flowchart of the audio and video matching method provided by an embodiment of the present application. The execution subject of each step of the method can be the model using device described above. In the following method embodiment, for the sake of convenience, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (710-740):

[0202] Step 710: Obtain a first video to be matched.

[0203] In some embodiments, the video to be matched is a video for which matching audio has not yet been determined. This application does not limit the type of the first video. The first video can be an original video shot independently by the user account, or a video recorded from other videos, etc.

[0204] Step 720: Extract feature information corresponding to the first video using a video feature extraction model.

[0205] Optionally, the trained video feature extraction model in the above embodiment is used to extract feature information corresponding to the first video.

[0206] In some embodiments, the first video is frame extracted to obtain a video frame sequence, and a pixel value matrix corresponding to the video frame sequence is determined. Optionally, the pixel value matrix is ​​input into a video feature extraction model to obtain feature information corresponding to the first video.

[0207] In some embodiments, the feature information is a feature vector. Optionally, there is no limitation on the dimension of the feature information.

[0208] Step 730: Determine the degree of matching between the first video and each audio based on the feature information corresponding to the first video and the feature information corresponding to the n audios, wherein the feature information corresponding to the audio is obtained through an audio feature extraction model, and the video feature extraction model and the audio feature extraction model are trained using contrastive learning, and n is an integer greater than or equal to 1.

[0209] In some embodiments, the n audios are all the audios in the music library and are not filtered. Optionally, the first video is matched with all the audios in the music library.

[0210] In other embodiments, the n audios are audios in a music library that match the first video. Optionally, the first video is matched with the audios in the music library that match the first video.

[0211] Optionally, feature information corresponding to the n audios is extracted using an audio feature extraction model. Optionally, the trained audio feature extraction model in the above embodiment is used to extract feature information corresponding to the n audios.

[0212] In some embodiments, the audio is frame-sampled to obtain an audio frame sequence, and a beat value matrix corresponding to the audio frame sequence is determined. Optionally, the beat value matrix is ​​input into an audio feature extraction model to obtain feature information corresponding to the audio.

[0213] Step 740: Determine at least one matching audio that matches the first video from the n audios based on the matching degrees between the first video and the respective audios.

[0214] In some embodiments, at least one matching audio track that matches the first video is determined from the n audio tracks based on the similarity between the feature information of the first video and the feature information corresponding to each audio track. Alternatively, the similarity between the feature information of the first video and the feature information corresponding to each audio track is determined based on the cosine distance between the feature information corresponding to the video and the feature information corresponding to the audio track.

[0215] In some embodiments, at least one matching audio is sorted according to the degree of matching to obtain a recommended audio list. The closer the audio is to the front of the recommended audio list, the higher the degree of matching with the first video, and the closer the audio is to the back of the recommended audio list, the lower the degree of matching with the first video.

[0216] The technical solution provided by the embodiment of the present application uses a pre-trained video feature extraction model and an audio feature extraction model to extract audio and video features when determining the audio that matches the video to be matched. Since the video feature extraction model and the audio feature extraction model are jointly trained using contrastive learning, and since both the video feature extraction model and the audio feature extraction model can learn the features of the video modality and the audio modality during joint training, and are trained using contrastive learning, the video feature extraction model's ability to extract features from videos and the audio feature extraction model's ability to extract features from audio can be improved. Therefore, the audio recommended to the video to be matched can be determined based on the degree of match between the audio and video features, which can improve the background music hit rate.

[0217] Please refer to Figure 8, which shows a flowchart of an audio and video matching method provided by another embodiment of the present application. The execution subject of each step of the method can be the model using device described above. In the following method embodiment, for the sake of convenience, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (710-740):

[0218] Step 710: Obtain a first video to be matched.

[0219] In some embodiments, step 710 further includes at least one of steps 710 - 1 to 710 - 2 (not shown in the figure).

[0220] Step 710 - 1 : Determine the category label of the first video.

[0221] In some embodiments, the category label of the first video is determined by a video labeling model. Optionally, the video labeling model is a machine learning model, such as a video labeling model trained by an autonomous learning method. Optionally, when training the video labeling model, the input is a video sample and the output is a label corresponding to the video sample. Optionally, the video sample is used as a training sample, and the manually annotated video label corresponding to the video sample is used as the training label. The video labeling model is trained by utilizing the difference between the output video sample label and the manually annotated video label.

[0222] In some embodiments, the category labels of the video samples include at least two categories. Optionally, one is an emotion category and the other is a scene category. Optionally, the category labels under the emotion category include at least joy, sadness, etc. Optionally, the category labels under the scene category include at least interaction, cartoon, parent-child, etc. Optionally, this application does not limit the category labels. Optionally, there is no limit on the number of category labels corresponding to the video.

[0223] Step 710 - 2 : According to the category labels of the audios contained in the audio library, select audios that match the category label of the first video from the audio library to obtain n audios.

[0224] In some embodiments, each audio also corresponds to an audio tag. In some embodiments, the category label of the audio is determined by an audio tagging model. Optionally, the audio tagging model is a machine learning model, such as an audio tagging model trained by an autonomous learning method. Optionally, when training the audio tagging model, the input is an audio sample and the output is a label corresponding to the audio sample. Optionally, the audio sample is used as the training sample, and the manually annotated audio label corresponding to the audio sample is used as the training label. The audio tagging model is trained using the difference between the output audio sample label and the manually annotated audio label.

[0225] In some embodiments, the category labels of the audio samples include at least two categories. Optionally, one is an emotion category and the other is a scene category. Optionally, the category labels under the emotion category include at least joy, sadness, etc. Optionally, the category labels under the scene category include at least interaction, cartoon, parent-child, etc. Optionally, this application does not limit the category labels. Optionally, there is no limit on the number of category labels corresponding to the audio.

[0226] Optionally, when the category label of the audio is completely consistent with the category label of the video, the audio is determined to be audio matching the first video.

[0227] Optionally, when the ratio of the number of labels whose category labels of the audio and the video are consistent to the total number of labels of the video category labels is greater than or equal to a first threshold, the audio is determined to be audio matching the first video.

[0228] In some embodiments, determining the category label of the audio includes at least one of steps 710 - 3 to 710 - 5 (not shown in the figure).

[0229] Step 710 - 3 , obtaining first information corresponding to the target audio from among the audios, where the first information includes comment information of the target audio.

[0230] In some embodiments, the target audio is any one of the various audios.

[0231] In some embodiments, the first information is comment information of the target audio. Optionally, comment information of a user account associated with the target audio is collected. Each comment is treated as a piece of first information.

[0232] In some embodiments, the first information is the name of the audio list where the target audio is located. Optionally, the name of the audio list where the target audio is located is collected.

[0233] Step 710 - 4 , obtaining feature information corresponding to the first information, and classifying the feature information to obtain a classification result.

[0234] In some embodiments, the input first information is classified using a text classification model to obtain a category label for the audio. Optionally, the text classification model is a machine learning model. Since the text classification model is a relatively mature model, it will not be described in detail here.

[0235] In other embodiments, the video tag is mapped to the audio based on the historical audio and video pairing relationship through the TF-IDF algorithm, and the details are not repeated here.

[0236] Specifically, feature information corresponding to the first information is extracted, and after processing such as convolution and pooling, classification is performed to obtain various classification results and their corresponding confidence levels.

[0237] Optionally, the classification targets are various emotion-related words, such as sadness, joy, pride, etc., and each emotion is a classification target. Optionally, for the feature information corresponding to the first information, a confidence level is assigned to each classification target.

[0238] Step 710 - 5 : Determine the classification result whose confidence level is greater than or equal to the threshold as the category label of the target audio.

[0239] Optionally, the result with the highest confidence is determined as the category label of the target audio. Optionally, joy has the highest confidence, and joy is used as the category label of the target audio.

[0240] Step 720: Extract feature information corresponding to the first video using a video feature extraction model.

[0241] Step 731 : For the i-th audio among the n audios, obtain a first similarity based on the similarity between the feature information corresponding to the first video and the feature information corresponding to the i-th audio, where i is an integer less than or equal to n.

[0242] In some embodiments, the similarity between the feature information corresponding to the first video and the feature information corresponding to the i-th audio is the cosine distance between the feature information corresponding to the first video and the feature information corresponding to the i-th audio. Optionally, the first similarity can also be referred to as feature similarity.

[0243] Step 732: Obtain a second similarity based on the similarity between the feature information corresponding to the first video and the feature information corresponding to the m associated videos of the i-th audio, where the associated video of the i-th audio refers to the video matching the i-th audio, and m is a positive integer.

[0244] Optionally, the m associated videos of the i-th audio are videos that have historically used the i-th audio as background music. Optionally, the m associated videos of the i-th audio can be determined by querying historical data of the publisher.

[0245] In some embodiments, step 732 includes at least one of steps 732 - 1 to 732 - 2 (not shown).

[0246] Step 732 - 1 : Determine the similarity between the feature information corresponding to the first video and the feature information corresponding to each associated video, and obtain m similarities.

[0247] Step 732-2: Select the maximum value from the m similarities as the second similarity.

[0248] Optionally, a second similarity is determined based on the m similarities. Optionally, the second similarity may also be referred to as user interest similarity (or the above interest similarity).

[0249] As shown in Figure 9, based on the query video 91 (the first video to be matched), the tags of the query video (including tag1, tag2, tag3 and tag4) are determined. Optionally, based on tag1 (tag 1), tag2 (tag 2), tag3 (tag 3) and tag4 (tag 4), matching audio is determined from the music library, such as candidate music i to candidate music m in the figure. Optionally, for candidate music i, based on historical pairing conditions or historical user data, historical videos i1 and i10 that have matched candidate music i are determined. Optionally, for candidate music m, based on historical pairing conditions or historical user data, historical videos m1 and m10 that have matched candidate music m are determined.

[0250] Of course, in the embodiment of the present application, the maximum value is selected from the m similarities as the second similarity, so that the video most similar to the first video can be distinguished from the m related videos. The audio selected based on the most similar video is used to select a matching video for the first video, which has a higher reference value.

[0251] In some embodiments, the m similarities are averaged to obtain an average similarity as the second similarity.

[0252] Step 733: Determine the matching degree between the first video and the i-th audio according to the first similarity and the second similarity.

[0253] Optionally, a weighted sum is performed on the first similarity and the second similarity to determine the matching degree between the first video and the i-th audio.

[0254] Step 740: Determine at least one matching audio that matches the first video from the n audios based on the matching degrees between the first video and the respective audios.

[0255] Optionally, sim_va=sim_emb+sim_interest, where sim_va represents the matching degree of the audio and video, sim_emb represents the first similarity between the audio and video, and sim_interest represents the second similarity between the audio and video.

[0256] Optionally, the matching degree between the first video and each audio is sorted in descending order, and the top K audios are taken to determine at least one matching audio, where K is a positive integer. Optionally, based on the K audios, an audio recommendation list is generated for the user to select. In some embodiments, the audio recommendation list is shown in Figure 10, where sub-figure a is an audio recommendation list for videos classified as funny, sub-figure b is an audio recommendation list for videos classified as games, and sub-figure c is an audio recommendation list for videos classified as cute pets.

[0257] In some embodiments, the training process of the video feature extraction model and the audio feature extraction model is as follows: based on at least one video sample and at least one audio sample, a set of sample pairs is constructed, the set of sample pairs includes at least one positive sample pair and at least one negative sample pair, the positive sample pair includes a video sample and an audio sample with a matching relationship, and the negative sample pair includes a video sample and an audio sample without a matching relationship; for the video sample and audio sample in the same sample pair, the feature information corresponding to the video sample is extracted by the video feature extraction model, and the feature information corresponding to the audio sample is extracted by the audio feature extraction model; according to the feature information corresponding to the video sample and the audio sample in the same sample pair, the value of the contrast loss function is determined, wherein the contrast loss function is used to characterize the degree of matching of the sample pair; according to the value of the contrast loss function, the parameters of the video feature extraction model and the audio feature extraction model are adjusted to obtain a trained video feature extraction model and a trained audio feature extraction model.

[0258] Optionally, the specific training process of the video feature extraction model and the audio feature extraction model can be found in the above embodiment and will not be repeated here.

[0259] The technical solution provided by the embodiments of this application improves the user experience of the Small World publisher. Experiments with low-traffic traffic have shown significant positive results in both the recommended background music hit rate (+12%) and the percentage of music included in posts (+4%). This solution has been launched on the Mobile QQ Small World publisher and has achieved good results in the Small World publisher scenario. It also improves the quality of Small World UGC videos. Improving background music can enhance the emotional expression of videos, thereby increasing their appeal to viewers.

[0260] In addition, when determining the audio that matches the first video based on similarity, the embodiment of the present application not only introduces the feature similarity brought by the characteristics of the audio itself, but also introduces the interest similarity brought by the user's interests (historical paired videos). This allows not only the characteristics of the audio itself to be considered when recommending audio, but also the impact of the audio recommendation brought by the user's historical behavior (user interests). Therefore, it is beneficial to improve the accuracy of the recommended audio and increase the audio hit rate.

[0261] Of course, since the video is not matched with every audio in the music library, but the audio with the same category label is selected for the next similarity calculation, it is helpful to reduce the resource overhead brought by determining the matching audio.

[0262] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0263] Please refer to Figure 11, which shows a block diagram of a model training device for audio and video matching provided by an embodiment of the present application. The device 1100 may include: a set construction module 1110, an information extraction module 1120, a loss determination module 1130 and a parameter adjustment module 1140.

[0264] The set construction module 1110 is used to construct a set of sample pairs based on at least one video sample and at least one audio sample. The set of sample pairs includes at least one positive sample pair and at least one negative sample pair. The positive sample pair includes a video sample and an audio sample with a matching relationship, and the negative sample pair includes a video sample and an audio sample without a matching relationship.

[0265] The information extraction module 1120 is used to extract feature information corresponding to the video sample and the audio sample in the same sample pair through the video feature extraction model, and to extract feature information corresponding to the audio sample through the audio feature extraction model.

[0266] The loss determination module 1130 is used to determine the value of the contrast loss function based on the feature information corresponding to the video sample and the audio sample in the same sample pair, wherein the contrast loss function is used to characterize the matching degree of the sample pair.

[0267] The parameter adjustment module 1140 is used to adjust the parameters of the video feature extraction model and the audio feature extraction model according to the value of the contrast loss function to obtain a trained video feature extraction model and a trained audio feature extraction model.

[0268] In some embodiments, as shown in FIG. 12 , the apparatus further includes an augmentation module 1150 .

[0269] The augmentation module 1150 is configured to perform augmentation processing on the video sample and the audio sample in the same sample pair, respectively, to obtain an augmented video sample corresponding to the video sample and an augmented audio sample corresponding to the audio sample.

[0270] The information extraction module 1120 is further configured to extract feature information corresponding to the augmented video sample using a video feature extraction model, and to extract feature information corresponding to the augmented audio sample using an audio feature extraction model.

[0271] The loss determination module 1130 is used to determine the value of the contrast loss function based on the feature information corresponding to the video sample and the feature information corresponding to the audio sample in the same sample pair, as well as the feature information corresponding to the augmented video sample and the feature information corresponding to the augmented audio sample.

[0272] In some embodiments, the loss determination module 1130 is configured to determine a first contrast loss based on feature information corresponding to the video sample and feature information corresponding to the augmented video sample.

[0273] The loss determination module 1130 is further configured to determine a second comparison loss based on feature information corresponding to the video sample and feature information corresponding to the augmented audio sample.

[0274] The loss determination module 1130 is further configured to determine a third comparison loss based on the feature information corresponding to the augmented video sample and the feature information corresponding to the audio sample.

[0275] The loss determination module 1130 is further configured to determine a value of a contrast loss function according to the first contrast loss, the second contrast loss, and the third contrast loss.

[0276] In some embodiments, as shown in FIG. 12 , the augmentation module 1150 includes a segmentation unit 1151 , a segment selection unit 1152 , and a segment determination unit 1153 .

[0277] The segmentation unit 1151 is used to segment the video samples in the sample pairs in the set to obtain multiple video segments, wherein the feature information corresponding to the video sample is feature information corresponding to the first video segment obtained by extracting the first video segment from the multiple video segments through a video feature extraction model; the feature information corresponding to the audio sample is feature information corresponding to the first audio segment obtained by extracting the first audio segment through an audio feature extraction model, and the first audio segment is the audio segment corresponding to the first video segment.

[0278] The segment selection unit 1152 is used to select a second video segment different from the first video segment from multiple video segments as an augmented video sample, wherein the feature information corresponding to the augmented video sample is extracted from the second video segment through a video feature extraction model, and the feature information corresponding to the second video segment is obtained.

[0279] The segment determination unit 1153 uses the second audio segment as the augmented audio sample, wherein the second audio segment is the audio segment corresponding to the second video segment, and the feature information corresponding to the augmented audio sample is extracted from the second audio segment through an audio feature extraction model, thereby obtaining the feature information corresponding to the second audio segment.

[0280] In some embodiments, as shown in FIG12 , the loss determination module 1130 further includes a sequence determination unit 1131 and a loss determination unit 1132 .

[0281] The sequence determining unit 1131 is configured to determine the sequence of the first video segment and the second video segment according to feature information corresponding to the first video segment and feature information corresponding to the second video segment using a first sequence classifier.

[0282] The order determining unit 1131 is further configured to determine the order of the first audio segment and the second audio segment according to the feature information corresponding to the first audio segment and the feature information corresponding to the second audio segment through a second order classifier.

[0283] The sequence determining unit 1131 is further configured to determine the sequence of the first video segment and the second audio segment according to feature information corresponding to the second video segment and feature information corresponding to the second audio segment through a third sequence classifier.

[0284] The loss determination unit 1132 is used to determine the sequence classification loss based on the sequence determined by the first sequence classifier, the second sequence classifier, and the third sequence classifier. The sequence classification loss is used to reflect the prediction accuracy of the sequence, and the sequence classification loss is used to adjust the model parameters in combination with the value of the contrast loss function.

[0285] In some embodiments, as shown in FIG. 12 , the augmentation module 1150 further includes a sampling unit 1154 .

[0286] The sampling unit 1154 is used to select at least one frame from the video sample using a first sampling frequency to obtain a first video frame sequence, wherein the feature information corresponding to the video sample is extracted from the first video frame sequence using a video feature extraction model, and the feature information corresponding to the first video frame sequence is obtained.

[0287] The sampling unit 1154 is further configured to select at least one frame from the video sample using a second sampling frequency to obtain a second video frame sequence as an augmented video sample, wherein feature information corresponding to the augmented video sample is obtained by extracting the second video frame sequence through a video feature extraction model; and the second sampling frequency is different from the first sampling frequency.

[0288] The sampling unit 1154 is further used to select at least one frame from the audio sample using a third sampling frequency to obtain a first audio frame sequence, wherein the feature information corresponding to the audio sample is extracted from the first audio frame sequence using an audio feature extraction model, and the feature information corresponding to the first audio frame sequence is obtained.

[0289] The sampling unit 1154 is further configured to select at least one frame from the audio sample using a fourth sampling frequency to obtain a second audio frame sequence as an augmented audio sample, wherein feature information corresponding to the augmented audio sample is feature information corresponding to the second audio frame sequence obtained by extracting the second audio frame sequence using an audio feature extraction model; and the fourth sampling frequency is different from the third sampling frequency.

[0290] In some embodiments, as shown in FIG12 , the loss determination module 1130 further includes a sampling frequency determination unit 1133 .

[0291] The sampling frequency determination unit 1133 is used to use the first speed classifier to determine the predicted sampling frequency of the first video frame sequence based on the feature information corresponding to the first video frame sequence; and to use the first speed classifier to determine the predicted sampling frequency of the second video frame sequence based on the feature information corresponding to the second video frame sequence.

[0292] The sampling frequency determination unit 1133 is further configured to determine, using a second speed classifier, a predicted sampling frequency of the first audio frame sequence based on feature information corresponding to the first audio frame sequence; and to determine, using a second speed classifier, a predicted sampling frequency of the second audio frame sequence based on feature information corresponding to the second audio frame sequence.

[0293] The loss determination unit 1132 is further used to determine the speed classification loss based on the predicted sampling frequency determined by the first speed classifier and the second speed classifier. The speed classification loss is used to reflect the prediction accuracy of the sampling frequency, and the speed classification loss is used to adjust the model parameters in combination with the value of the contrast loss function.

[0294] In some embodiments, the sampling unit 1154 is further used to sample at least one frame in positive sequence from the video sample to obtain a third video frame sequence, wherein the feature information corresponding to the video sample is extracted from the third video frame sequence through a video feature extraction model to obtain the feature information corresponding to the third video frame sequence.

[0295] The sampling unit 1154 is also used to reversely sample at least one frame from the video sample to obtain a fourth video frame sequence as an augmented video sample, wherein the feature information corresponding to the augmented video sample is obtained by extracting the fourth video frame sequence through a video feature extraction model.

[0296] The sampling unit 1154 is further configured to sequentially sample at least one frame from the audio sample to obtain a third audio frame sequence, wherein the feature information corresponding to the audio sample is extracted from the third audio frame sequence using an audio feature extraction model to obtain the feature information corresponding to the third audio frame sequence.

[0297] The sampling unit 1154 is further used to reversely sample at least one frame from the audio sample to obtain a fourth audio frame sequence as an augmented audio sample, wherein the feature information corresponding to the augmented audio sample is extracted from the fourth audio frame sequence through an audio feature extraction model, and the feature information corresponding to the fourth audio frame sequence is obtained.

[0298] In some embodiments, as shown in FIG12 , the loss determination module 1130 further includes a sampling direction determination unit 1134 .

[0299] The sampling direction determination unit 1134 is used to use the first direction classifier to determine the sampling direction of the third video frame sequence based on the feature information corresponding to the third video frame sequence; and to use the first direction classifier to determine the sampling direction of the fourth video frame sequence based on the feature information corresponding to the fourth video frame sequence.

[0300] The sampling direction determination unit 1134 is used to use the second direction classifier to determine the sampling direction of the third audio frame sequence based on the feature information corresponding to the third audio frame sequence; and to use the second direction classifier to determine the sampling direction of the fourth audio frame sequence based on the feature information corresponding to the fourth audio frame sequence.

[0301] The loss determination unit 1132 is also used to determine the direction classification loss based on the sampling direction determined by the first direction classifier and the second direction classifier. The direction classification loss is used to reflect the prediction accuracy of the sampling direction, and the direction classification loss is used to adjust the model parameters in combination with the value of the contrast loss function.

[0302] 13 , which shows a block diagram of an audio and video matching device according to an embodiment of the present application. The device 1300 may include: a video acquisition module 1310 , an information extraction module 1320 , a matching degree determination module 1330 , and an audio determination module 1340 .

[0303] The video acquisition module 1310 is configured to acquire a first video to be matched.

[0304] The information extraction module 1320 is configured to extract feature information corresponding to the first video using a video feature extraction model.

[0305] The matching degree determination module 1330 is used to determine the matching degree between the first video and each audio based on the feature information corresponding to the first video and the feature information corresponding to the n audios, wherein the feature information corresponding to the audio is obtained through an audio feature extraction model, and the video feature extraction model and the audio feature extraction model are trained using contrastive learning, and n is an integer greater than or equal to 1.

[0306] The audio determination module 1340 is configured to determine at least one matching audio that matches the first video from the n audios based on the matching degrees between the first video and the respective audios.

[0307] In some embodiments, as shown in FIG. 14 , the matching degree determination module 1330 includes a similarity determination unit 1331 and a matching degree determination unit 1332 .

[0308] The similarity determination unit 1331 is configured to obtain a first similarity for the i-th audio among the n audios based on the similarity between the feature information corresponding to the first video and the feature information corresponding to the i-th audio, where i is an integer less than or equal to n.

[0309] The similarity determination unit 1331 is further configured to obtain a second similarity based on the similarity between the feature information corresponding to the first video and the feature information corresponding to the m associated videos of the i-th audio, where the associated video of the i-th audio refers to a video that matches the i-th audio, and m is a positive integer.

[0310] The matching degree determining unit 1332 is configured to determine a matching degree between the first video and the i-th audio according to the first similarity and the second similarity.

[0311] In some embodiments, the similarity determination unit 1331 is further configured to respectively determine the similarity between the feature information corresponding to the first video and the feature information corresponding to each associated video, to obtain m similarities.

[0312] The similarity determination unit 1331 is further configured to select a maximum value from the m similarities as a second similarity.

[0313] In some embodiments, as shown in FIG. 14 , the apparatus further includes a tag determination module 1350 and an audio determination module 1360 .

[0314] The label determination module 1350 is configured to determine a category label of the first video.

[0315] The audio determination module 1360 is configured to select audio that matches the category label of the first video from the audio library according to the category labels of the audios contained in the audio library, to obtain n audios.

[0316] In some embodiments, label determination module 1350 is further configured to obtain first information corresponding to a target audio from among the various audio files, the first information including commentary information about the target audio. Feature information corresponding to the first information is obtained, and the feature information is classified to obtain a classification result. The classification result with a confidence level greater than or equal to a threshold is determined as the category label for the target audio.

[0317] In some embodiments, the training process of the video feature extraction model and the audio feature extraction model is as follows: based on at least one video sample and at least one audio sample, a set of sample pairs is constructed, the set of sample pairs includes at least one positive sample pair and at least one negative sample pair, the positive sample pair includes a video sample and an audio sample with a matching relationship, and the negative sample pair includes a video sample and an audio sample without a matching relationship; for the video sample and audio sample in the same sample pair, the feature information corresponding to the video sample is extracted by the video feature extraction model, and the feature information corresponding to the audio sample is extracted by the audio feature extraction model; according to the feature information corresponding to the video sample and the audio sample in the same sample pair, the value of the contrast loss function is determined, wherein the contrast loss function is used to characterize the degree of matching of the sample pair; according to the value of the contrast loss function, the parameters of the video feature extraction model and the audio feature extraction model are adjusted to obtain a trained video feature extraction model and a trained audio feature extraction model.

[0318] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0319] FIG15 shows a structural block diagram of a computer device provided by another exemplary embodiment of the present application.

[0320] Typically, the computer device 1500 includes a processor 1501 and a memory 1502 .

[0321] The processor 1501 may include one or more processing cores, such as a 4-core processor, a 15-core processor, and the like. The processor 1501 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1501 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1501 may also include an AI processor for processing computing operations related to machine learning.

[0322] The memory 1502 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 1502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1502 stores computer-readable instructions, which are loaded and executed by the processor 1501 to implement the above-mentioned model training method for audio and video matching or the above-mentioned audio and video matching method.

[0323] Those skilled in the art will appreciate that the structure shown in FIG. 15 does not limit the computer device 1500 , and may include more or fewer components than shown, or combine certain components, or adopt a different component arrangement.

[0324] In an exemplary embodiment, a computer-readable storage medium is further provided. The storage medium stores computer-readable instructions. When the computer-readable instructions are executed by a processor, the above method is implemented.

[0325] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), or an optical disk, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0326] In an exemplary embodiment, a computer program product is also provided. The computer program product includes computer-readable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer-readable instructions from the computer-readable storage medium and executes the computer-readable instructions, causing the computer device to perform the aforementioned model training method for audio and video matching or the aforementioned audio and video matching method.

[0327] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application do not limit this.

[0328] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0329] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A model training method for audio and video matching, performed by a computer device, the method comprising: Based on at least one video sample and at least one audio sample, construct a set of sample pairs, wherein the set of sample pairs includes at least one positive sample pair and at least one negative sample pair, wherein the positive sample pair includes a video sample and an audio sample having a matching relationship, and the negative sample pair includes a video sample and an audio sample not having a matching relationship; For a video sample and an audio sample in the same sample pair, feature information corresponding to the video sample is extracted by a video feature extraction model, and feature information corresponding to the audio sample is extracted by an audio feature extraction model; Determining a value of a contrast loss function according to feature information corresponding to each of the video sample and the audio sample in the same sample pair, wherein the contrast loss function is used to characterize a matching degree of the sample pair; and According to the value of the contrast loss function, the parameters of the video feature extraction model and the audio feature extraction model are adjusted to obtain a trained video feature extraction model and a trained audio feature extraction model.

2. The method according to claim 1, further comprising: For the video sample and the audio sample in the same sample pair, augmentation processing is performed respectively to obtain an augmented video sample corresponding to the video sample and an augmented audio sample corresponding to the audio sample; Extracting feature information corresponding to the augmented video sample by using the video feature extraction model, and extracting feature information corresponding to the augmented audio sample by using the audio feature extraction model; The determining the value of the contrast loss function according to the feature information corresponding to the video sample and the audio sample in the same sample pair includes: The value of the contrast loss function is determined according to the feature information corresponding to the video sample and the feature information corresponding to the audio sample in the same sample pair, and the feature information corresponding to the augmented video sample and the feature information corresponding to the augmented audio sample.

3. The method according to claim 2, wherein determining the value of the contrast loss function according to the feature information corresponding to the video sample and the feature information corresponding to the audio sample in the same sample pair, and the feature information corresponding to the augmented video sample and the feature information corresponding to the augmented audio sample, comprises: Determining a first contrast loss according to the feature information corresponding to the video sample and the feature information corresponding to the augmented video sample; Determining a second contrast loss according to the feature information corresponding to the video sample and the feature information corresponding to the augmented audio sample; determining a third contrast loss according to the feature information corresponding to the augmented video sample and the feature information corresponding to the audio sample; A value of the contrast loss function is determined according to the first contrast loss, the second contrast loss, and the third contrast loss.

4. The method according to claim 2 or 3, wherein the video sample and the audio sample in the same sample pair are augmented respectively to obtain an augmented video sample corresponding to the video sample and an augmented audio sample corresponding to the audio sample, comprising: For the sample pairs in the set, the video samples in the sample pairs are segmented to obtain a plurality of video segments, wherein the feature information corresponding to the video samples in the sample pairs is feature information corresponding to the first video segment obtained by extracting the first video segment from the plurality of video segments through the video feature extraction model; the feature information corresponding to the audio samples in the sample pairs is feature information corresponding to the first audio segment obtained by extracting the first audio segment through the audio feature extraction model, and the first audio segment is an audio segment corresponding to the first video segment; Selecting a second video segment different from the first video segment from the multiple video segments as the augmented video sample, wherein feature information corresponding to the augmented video sample is feature information corresponding to the second video segment obtained by extracting the second video segment using the video feature extraction model; The second audio segment is used as the augmented audio sample, wherein the second audio segment is the audio segment corresponding to the second video segment, and the feature information corresponding to the augmented audio sample is extracted by the audio feature extraction model. The second audio segment is extracted to obtain feature information corresponding to the second audio segment.

5. The method according to claim 4, further comprising: Determining, by a first sequence classifier, a sequence of the first video segment and the second video segment according to feature information corresponding to the first video segment and feature information corresponding to the second video segment; determining, by a second sequence classifier, a sequence of the first audio segment and the second audio segment according to feature information corresponding to the first audio segment and feature information corresponding to the second audio segment; Determining, by a third order classifier, a sequence of the first video segment and the second audio segment according to feature information corresponding to the second video segment and feature information corresponding to the second audio segment; According to the sequence determined by the first sequence classifier, the second sequence classifier, and the third sequence classifier, a sequence classification loss is determined, the sequence classification loss is used to reflect the prediction accuracy of the sequence, and the sequence classification loss is used to adjust the model parameters in combination with the value of the contrast loss function.

6. The method according to claim 2, wherein the video sample and the audio sample in the same sample pair are augmented respectively to obtain an augmented video sample corresponding to the video sample and an augmented audio sample corresponding to the audio sample, comprising: For the sample pairs in the set, at least one frame is selected from the video samples in the sample pairs using a first sampling frequency to obtain a first video frame sequence, wherein the feature information corresponding to the video samples is extracted from the first video frame sequence using the video feature extraction model to obtain the feature information corresponding to the first video frame sequence; Selecting at least one frame from the video sample in the sample pair at a second sampling frequency to obtain a second video frame sequence as the augmented video sample, wherein feature information corresponding to the augmented video sample is feature information corresponding to the second video frame sequence obtained by extracting the second video frame sequence by the video feature extraction model; the second sampling frequency is different from the first sampling frequency; Selecting at least one frame from the audio samples in the targeted sample pair using a third sampling frequency to obtain a first audio frame sequence, wherein feature information corresponding to the audio sample is feature information corresponding to the first audio frame sequence obtained by extracting the first audio frame sequence using the audio feature extraction model; A fourth sampling frequency is used to select at least one frame from the audio samples in the targeted sample pair to obtain a second audio frame sequence as the augmented audio sample, wherein feature information corresponding to the augmented audio sample is obtained by extracting the second audio frame sequence through the audio feature extraction model, and feature information corresponding to the second audio frame sequence is obtained; the fourth sampling frequency is different from the third sampling frequency.

7. The method according to claim 6, further comprising: Determine a predicted sampling frequency of the first video frame sequence using a first speed classifier according to feature information corresponding to the first video frame sequence; and, using the first speed classifier to determine a predicted sampling frequency of the second video frame sequence according to feature information corresponding to the second video frame sequence; Determining the predicted sampling frequency of the first audio frame sequence using a second speed classifier according to feature information corresponding to the first audio frame sequence; and determining the predicted sampling frequency of the second audio frame sequence using the second speed classifier according to feature information corresponding to the second audio frame sequence; A speed classification loss is determined according to the predicted sampling frequency determined by the first speed classifier and the second speed classifier, wherein the speed classification loss is used to reflect the prediction accuracy of the sampling frequency, and the speed classification loss is used to adjust the model parameters in combination with the value of the contrast loss function.

8. The method according to claim 2, wherein the augmenting process is performed on the video sample and the audio sample in the same sample pair to obtain the augmented video sample corresponding to the video sample and the augmented audio sample corresponding to the audio sample, comprising: For the sample pairs in the set, sampling at least one frame in positive order from the video samples in the sample pairs to obtain a third video frame sequence, wherein feature information corresponding to the video samples in the sample pairs is extracted from the third video frame sequence by the video feature extraction model to obtain feature information corresponding to the third video frame sequence; Reversely sampling at least one frame from the video sample in the sample pair to obtain a fourth video frame sequence as the augmented video sample, wherein feature information corresponding to the augmented video sample is obtained by extracting the fourth video frame sequence through the video feature extraction model; At least one frame is sampled in positive order from the audio samples in the targeted sample pair to obtain a third audio frame sequence, wherein the feature information corresponding to the audio sample is extracted from the third audio frame sequence by the audio feature extraction model to obtain the feature information corresponding to the third audio frame sequence; At least one frame is sampled in reverse order from the audio samples in the targeted sample pair to obtain a fourth audio frame sequence as the augmented audio sample, wherein feature information corresponding to the augmented audio sample is extracted from the fourth audio frame sequence by the audio feature extraction model to obtain feature information corresponding to the fourth audio frame sequence.

9. The method according to claim 8, further comprising: Using a first direction classifier, according to feature information corresponding to the third video frame extraction sequence, determining a sampling direction of the third video frame extraction sequence; and, using the first direction classifier to determine a sampling direction of the fourth video frame sequence according to feature information corresponding to the fourth video frame sequence; Determine, using a second direction classifier, a sampling direction of the third audio frame sequence according to feature information corresponding to the third audio frame sequence; and, using the second direction classifier, determine, according to feature information corresponding to the fourth audio frame sequence, a sampling direction of the fourth audio frame sequence; According to the sampling directions determined by the first direction classifier and the second direction classifier, a direction classification loss is determined, the direction classification loss is used to reflect the prediction accuracy of the sampling direction, and the direction classification loss is used to adjust the model parameters in combination with the value of the contrast loss function.

10. An audio and video matching method, executed by a computer device, the method comprising: Obtaining a first video to be matched; Extracting feature information corresponding to the first video by using a video feature extraction model; Determine the matching degree between the first video and each of the audios according to the feature information corresponding to the first video and the feature information corresponding to the n audios, wherein the feature information corresponding to the audios is obtained by an audio feature extraction model, the video feature extraction model and the audio feature extraction model are trained by contrastive learning, and n is an integer greater than or equal to 1; and At least one matching audio that matches the first video is determined from the n audios according to the matching degree between the first video and each of the audios.

11. The method according to claim 10, wherein determining the matching degree between the first video and each of the audios according to the feature information corresponding to the first video and the feature information corresponding to the n audios respectively comprises: For an i-th audio of the n audios, a first similarity is obtained according to a similarity between feature information corresponding to the first video and feature information corresponding to the i-th audio, where i is an integer less than or equal to n; Obtaining a second similarity according to the similarity between the feature information corresponding to the first video and the feature information corresponding to the m associated videos of the i-th audio, wherein the associated video of the i-th audio refers to a video matching the i-th audio, and m is a positive integer; A matching degree between the first video and the i-th audio is determined according to the first similarity and the second similarity.

12. The method according to claim 11, wherein obtaining the second similarity based on the similarity between the feature information corresponding to the first video and the feature information corresponding to the m associated videos of the i-th audio, comprises: Respectively determine the similarity between the feature information corresponding to the first video and the feature information corresponding to each of the associated videos to obtain m similarities; A maximum value is selected from the m similarities as the second similarity.

13. The method according to claim 10, after obtaining the first video to be matched, further comprising: Determining a category label of the first video; According to the category labels of the respective audios contained in the audio library, audios matching the category label of the first video are selected from the audio library to obtain the n audios.

14. The method according to claim 13, further comprising: Acquire first information corresponding to a target audio from among the audios, where the first information includes comment information of the target audio; Acquiring feature information corresponding to the first information, and classifying the feature information to obtain a classification result; The classification result having a confidence level greater than or equal to a threshold is determined as a category label of the target audio.

15. According to the method described in any one of claims 10 to 14, the video feature extraction model and the audio feature extraction model are trained by the model training method for audio and video matching described in any one of claims 1 to 9.

16. A model training device for audio and video matching, the device comprising: A set construction module, configured to construct a set of sample pairs based on at least one video sample and at least one audio sample, wherein the set of sample pairs includes at least one positive sample pair and at least one negative sample pair, wherein the positive sample pair includes a video sample and an audio sample having a matching relationship, and the negative sample pair includes a video sample and an audio sample not having a matching relationship; An information extraction module, for extracting feature information corresponding to a video sample and an audio sample in the same sample pair through a video feature extraction model, and extracting feature information corresponding to the audio sample through an audio feature extraction model; A loss determination module, used to determine the value of a contrast loss function according to feature information corresponding to the video sample and the audio sample in the same sample pair, wherein the contrast loss function is used to characterize the matching degree of the sample pair; A parameter adjustment module is used to adjust the parameters of the video feature extraction model and the audio feature extraction model according to the value of the contrast loss function to obtain a trained video feature extraction model and a trained audio feature extraction model.

17. An audio and video matching device, the device comprising: A video acquisition module, used to acquire a first video to be matched; An information extraction module, used to extract feature information corresponding to the first video through a video feature extraction model; a matching degree determination module, used to determine the matching degree between the first video and each of the audios according to the feature information corresponding to the first video and the feature information corresponding to the n audios, wherein the feature information corresponding to the audios is obtained by an audio feature extraction model, the video feature extraction model and the audio feature extraction model are trained by contrastive learning, and n is an integer greater than or equal to 1; The audio determination module is used to determine at least one matching audio that matches the first video from the n audios according to the matching degree between the first video and each of the audios.

18. A computer device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and the computer-readable instructions are loaded and executed by the processor to implement the method as described in any one of claims 1 to 9, or to implement the method as described in any one of claims 10 to 15.

19. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, wherein the computer-readable instructions are loaded and executed by a processor to implement the method as described in any one of claims 1 to 9 above, or to implement the method as described in any one of claims 10 to 15 above.

20. A computer program product, comprising computer-readable instructions, wherein the computer-readable instructions are stored in a computer-readable storage medium, and a processor reads and executes the computer-readable instructions from the computer-readable storage medium to implement the method as described in any one of claims 1 to 9 above, or implements the method as described in any one of claims 10 to 15 above.