WO2023185425A1 - Music matching method and apparatus, electronic device, storage medium, and program product - Google Patents

Music matching method and apparatus, electronic device, storage medium, and program product Download PDF

Info

Publication number
WO2023185425A1
WO2023185425A1 PCT/CN2023/080987 CN2023080987W WO2023185425A1 WO 2023185425 A1 WO2023185425 A1 WO 2023185425A1 CN 2023080987 W CN2023080987 W CN 2023080987W WO 2023185425 A1 WO2023185425 A1 WO 2023185425A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
music
drum
track
matching
Prior art date
Application number
PCT/CN2023/080987
Other languages
French (fr)
Chinese (zh)
Inventor
胡建丰
黄鸣晨
张依依
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2023185425A1 publication Critical patent/WO2023185425A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8549Creating video summaries, e.g. movie trailer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration
    • H04N21/4852End-user interface for client configuration for modifying audio parameters, e.g. switching between mono and stereo
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8106Monomedia components thereof involving special audio data, e.g. different tracks for different languages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8106Monomedia components thereof involving special audio data, e.g. different tracks for different languages
    • H04N21/8113Monomedia components thereof involving special audio data, e.g. different tracks for different languages comprising music, e.g. song in MP3 format

Definitions

  • the present application relates to the field of music processing technology, and in particular to a music matching method, device, electronic device, storage medium and program product.
  • Short videos generally include video frames and music. Due to the invisibility of music, if the user wants to see which videos include the music of interest, the user needs to manually view them one by one, resulting in low efficiency in viewing videos that match the music of interest. .
  • Embodiments of the present application provide a music matching method, device, electronic device, computer-readable storage medium, and computer program product, which can improve viewing efficiency of videos that match the music of interest.
  • the embodiment of the present application provides a music matching method, including:
  • an audio and video interface is displayed.
  • the audio and video interface includes a target audio track of the music to be matched, and at least one target video matching the target audio track.
  • An embodiment of the present application also provides a music matching device, including:
  • the first display module is configured to display a music matching interface for music to be matched, and the music matching interface includes matching controls;
  • the second display module is configured to display an audio and video interface in response to a triggering operation on the matching control.
  • the audio and video interface includes a target audio track of the music to be matched and at least one target video matching the target audio track.
  • an embodiment of the present application further provides an electronic device, including a processor and a memory.
  • the memory stores a computer program.
  • the processor is configured to implement the music matching method provided by the embodiment of the present application when running the computer program in the memory. .
  • embodiments of the present application also provide a computer-readable storage medium that stores a computer program.
  • the computer program is suitable for loading by the processor to execute the music matching method provided by the embodiments of the present application.
  • embodiments of the present application also provide a computer program product, including a computer program.
  • the computer program is executed by a processor, the music matching method provided by the embodiment of the present application is implemented.
  • a matching control is included in the music matching interface of the music to be matched.
  • the user is provided with the function of video matching for the music of interest.
  • the matching control the to-be-matched music is displayed in the audio and video interface.
  • the target audio track of the matching music and the target video matching the target audio track are displayed.
  • the display of the target audio track of the music to be matched realizes the visualization of the music to be matched.
  • the matching of the target audio track is realized.
  • the automatic search and display of target videos improves the viewing efficiency of videos that match the music of interest.
  • Figure 1A is a schematic architectural diagram of a music matching system provided by an embodiment of the present application.
  • Figure 1B is a schematic scene diagram of the music matching process provided by the embodiment of the present application.
  • Figure 2 is a schematic flow chart of the music matching method provided by the embodiment of the present application.
  • FIG. 3 is a schematic diagram of a music interface provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of the music interface and music matching interface provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of the music extraction interface provided by the embodiment of the present application.
  • Figure 6 is a schematic diagram of the first uploading process of extracting music provided by the embodiment of the present application.
  • FIG. 7 is a schematic diagram of another music interface provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of a music matching interface for music to be matched provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another music interface provided by an embodiment of the present application.
  • Figure 10 is a schematic diagram of the audio and video interface provided by the embodiment of the present application.
  • Figure 11 is a schematic diagram of another audio and video interface provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of the process of separating tracks of music to be matched provided by an embodiment of the present application.
  • Figure 13 is a schematic diagram of the waveforms of different musical instruments provided by the embodiment of the present application.
  • Figure 14 is a schematic diagram of the sound waveform provided by the embodiment of the present application.
  • Figure 15 is a schematic diagram of another process of track separation of music to be matched provided by an embodiment of the present application.
  • Figure 16 is a schematic diagram of target drum track data provided by an embodiment of the present application.
  • Figure 17 is a schematic diagram of the playback process provided by the embodiment of the present application.
  • Figure 18 is a schematic flow chart of another music matching method provided by an embodiment of the present application.
  • Figure 19 is a schematic diagram of the music matching interface provided by the embodiment of the present application.
  • Figure 20 is a schematic diagram of the process of obtaining a video to be matched provided by an embodiment of the present application.
  • Figure 21 is a schematic structural diagram of a music matching device provided by an embodiment of the present application.
  • Figure 22 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Multiple in the embodiments of this application refers to two or more than two. “First”, “second”, etc. in the embodiments of this application are used to differentiate the description and should not be understood as implying relative importance.
  • Client an application running in the terminal to provide various services, such as instant messaging client and video playback client.
  • Response is used to represent the conditions or states on which the performed operations depend.
  • the dependent conditions or states are met, the one or more operations performed may be in real time or may have a set delay; Unless otherwise specified, there is no restriction on the execution order of the multiple operations performed.
  • the music matching method provided by the embodiment of the present application can be implemented by the terminal or the server alone, or by the terminal and the server collaboratively. Taking the collaborative implementation of the terminal and the server as an example, see Figure 1A.
  • Figure 1A is provided by the embodiment of the present application. Schematic diagram of the architecture of the music matching system 100.
  • a terminal terminal 400 is illustrated as an example
  • the network 300 can be a wide area network or a local area network, or a combination of the two. Data transmission is achieved using wireless or wired links.
  • Terminal 400 is configured to display a music matching interface for music to be matched, and the music matching interface includes matching controls;
  • the server 200 is configured to obtain the target audio track of the music to be matched, perform video matching based on the target audio track, obtain at least one target video that matches the target audio track, and return the audio track information of the music to be matched and the target audio track. Match at least one target video to the terminal 400;
  • the terminal 400 is also configured to display an audio and video interface, which includes: a target audio track of the music to be matched, and at least one target video matching the target audio track.
  • the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, and cloud communications. , middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
  • cloud services cloud databases, cloud computing, cloud functions, cloud storage, network services, and cloud communications.
  • middleware services domain name services, security services, network acceleration services (Content Delivery Network, CDN)
  • cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
  • multiple servers can be composed into a blockchain, and the servers are nodes on the blockchain.
  • the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smart watch, etc., but is not limited to this.
  • the terminal and the server can be connected directly or indirectly through wired or wireless communication methods, which is not limited in this application.
  • the music matching method provided by the embodiments of the present application can also be implemented by a terminal alone.
  • the terminal can display a music matching interface for music to be matched, and the music matching interface includes matching controls; in response to the matching control
  • the trigger operation displays the audio and video interface, which includes the target audio track of the music to be matched and the target video matching the target audio track.
  • the music matching device can be integrated in an electronic device such as a server or terminal.
  • an electronic device such as a server or terminal.
  • the detailed description will be given below with the music matching device integrated in the terminal, that is, with the terminal as the execution subject.
  • the music matching method may include:
  • the terminal displays a music matching interface for the music to be matched, and the music matching interface includes matching controls.
  • the terminal is equipped with a client, which can be a music matching client dedicated to music matching, or other clients with music matching functions, such as video playback clients, live broadcast clients, real-time Communication client, etc.
  • a client which can be a music matching client dedicated to music matching, or other clients with music matching functions, such as video playback clients, live broadcast clients, real-time Communication client, etc.
  • the terminal receives the client's startup instruction, it starts the client and displays the client's interface.
  • what is displayed may be the homepage of the client, the music interface of the client, or other interfaces of the client.
  • the terminal displays the music interface in response to the target object's triggering operation on the control of the music page.
  • the music interface may include a music identification of at least one piece of music.
  • the terminal In response to the first selection operation of the music identification by the target object, the terminal displays a music matching interface of the first music identification corresponding to the first selection operation.
  • the music matching interface includes matching control, the first music corresponding to the first music identification is the music to be matched.
  • the music interface may be as shown in Figure 3, and the terminal displays the music matching interface of the first music identification in response to the target object's selection operation on the first music identification.
  • the music interface may also include a search control, and the terminal may display a search result interface in response to the target object's input operation on the search control.
  • the search result interface includes a music identification of the music result corresponding to the input operation.
  • the client can exist in the form of an application program, a web page, or a small program.
  • the user can choose according to the actual situation, which is not limited in this embodiment.
  • the music matching interface of the music to be matched can be a sub-interface of the music interface, that is, the music matching interface of the music to be matched is displayed in a certain area of the music interface, for example, as shown in Figure 4.
  • the music matching interface can also be a separate interface, and the terminal jumps to a separate music matching interface in response to the target object's selection operation of the music logo. This embodiment is not limited here.
  • the music corresponding to the music identifier is the music that already exists in the client, that is, the music to be matched is the music that already exists in the client, that is, the music that corresponds to the client already exists in the server. Music to be matched.
  • the music to be matched may also be extracted music uploaded by the target object.
  • the music interface may also include an extraction control.
  • the terminal displays a music selection interface in response to a triggering operation on the extraction control.
  • the music selection interface includes an extraction control. music or extract videos.
  • the terminal uploads the first extraction music or the first extraction video corresponding to the initial selection operation to the server corresponding to the client (if the initial selection operation corresponds to a video, then The terminal can first extract the music in the first extracted video to obtain the first extracted music, and then upload the first extracted music to the server corresponding to the client), and when the upload is successful, display the music extraction interface.
  • the music extraction interface It includes a music matching interface for first extracting music, that is, the music matching interface for music to be matched at this time is a sub-interface of the music extraction interface.
  • the music extraction interface may also include an extraction control, so that the terminal can continue to display the music selection interface in response to the target object's triggering operation on the extraction control.
  • the music extraction interface can be shown in Figure 5.
  • Figure 6 is a schematic diagram of the uploading process of the first extracted music provided by the embodiment of the present application.
  • the process of the terminal uploading the first extracted music to the server corresponding to the client may include:
  • Step 601 The terminal sends the first extracted music and permission package to the upload center through the client;
  • Step 602 The upload center unpacks the permission package through the business-side upload module to obtain the client's permission information
  • Step 603 Upload the middle platform and then send the permission information to the login middle platform through the business side upload module;
  • Step 604 The login platform verifies the client's permissions based on the permission information, and returns the verification results to the upload platform;
  • Step 605 If the verification result is successful, the upload center generates the file identifier of the first extracted music through the business side upload module, and sends the first extracted music and file identifier to the cloud database for storage;
  • Step 606 Upload the file identifier returned by the middle station and the storage address of the first extracted music in the cloud database to the terminal;
  • Step 607 The terminal plays the first extracted music.
  • the terminal can display multiple music to be matched in the music interface or the music extraction interface music matching interface.
  • the terminal can also display the second selection in response to the target object's second selection operation on the music identification in the music interface. Operate the music matching interface of the corresponding second music identification, and the second music corresponding to the second music identification is also the music to be matched.
  • the music identifier is an identifier in the music interface that does not have a corresponding music matching interface.
  • the target object can select multiple music logos in the music interface, each music logo corresponding to a piece of music, so that the music matching interface corresponding to the multiple music logos is displayed in the music interface.
  • the terminal can continue to display the music selection interface in response to the target object's triggering operation on the extraction control, and then the terminal can continue to display the music in response to the target object's target selection operation on extracting music or extracting video.
  • the music extraction interface includes a first music matching interface for extracting music and a second music matching interface for extracting music corresponding to the target selection operation.
  • the music matching interface of the first music may also include a listening area, in which a playback progress bar and a playback progress bar of the music being auditioned may be displayed.
  • the adjustment control is used to adjust the playback progress.
  • the user can audition the music; when the terminal responds to the second selection operation of selecting the music identification, while selecting the music, the terminal selects the first music.
  • the music matching interface may not display the audition area, but there may also be matching controls in the music matching interface of First Music.
  • the first music matching interface for extracting music can also include a listening area, in which a playback progress bar of the music being listened to and an adjustment control for adjusting the playback progress can be displayed. Based on the listening area, the user can listen to the music; When the terminal responds to a target selection operation of extracting music or extracting videos, the audition area may not be displayed on the first music matching interface for extracting music, but there may also be a matching control in the first music matching interface for extracting music.
  • the terminal In response to the target object's first selection operation on the music identification, the terminal displays the music matching interface of the first music identification corresponding to the first selection operation on the music interface. At this time, the music interface may be as shown in 701 in Figure 7 . In response to the target object's second selection operation on the music identification, the terminal displays the music matching interface of the second music identification corresponding to the second selection operation, and does not display the audition area on the music matching interface of the first music. At this time, the music matching interface This can be shown as 702 in Figure 7 .
  • the terminal can display more music matching interfaces corresponding to music.
  • the implementation method may refer to the foregoing embodiments, and this embodiment will not be described in detail here.
  • the music matching interface may also include shooting controls.
  • the terminal may display a shooting interface of the music to be matched in response to the first triggering operation of the shooting control by the target object, so that the terminal can shoot the video according to the music to be matched.
  • the music matching interface may also include a collection control for collecting music.
  • the terminal can display a collection page in response to the target object's second triggering operation on the collection control.
  • the collection page includes the music to be matched. This facilitates the user's search for the collected music and improves the efficiency of music search.
  • the process of the terminal displaying the collection page in response to the target object's second triggering operation on the collection control may be: the terminal may respond to the target object's second triggering operation on the collection control, verify the login status of the target account corresponding to the target object , if the login status of the target account is logged in, the collection interface is displayed, and the collection page includes the music to be matched. If the login status of the target account is not logged in, the login interface is displayed.
  • the login page includes login controls, and the terminal responds to the target
  • the object's confirmation operation on the login control displays the collection interface; in this way, the collection of matching music is only executed when the target account of the target object is logged in, ensuring that the collected music is targeted and the ownership of the collected music is ensured. This allows the target object to view the music he has collected on the collection page under his/her target account.
  • the music matching interface can be shown in Figure 8.
  • the music matching interface includes playback controls, shooting controls, collection controls, matching controls, and audition areas. It should be understood that the terminal can play the music to be matched when receiving the play instruction, and display the audition area on the music matching interface of the music to be matched. When the terminal detects that the music to be matched is in a paused state, the terminal can play the music to be matched in the music matching interface of the music to be matched. The interface does not need to display the listening area.
  • the music matching interface is a sub-interface and the music matching interface includes playback controls, shooting controls, collection controls, matching controls and audition areas
  • the music matching interface for the first music can include playback controls, shooting controls, collection controls, and matching controls.
  • the first music matching interface for extracting music may also include a playback control, a shooting control, a collection control, and a matching control.
  • the music matching interface is a sub-interface of the music interface
  • the music matching interface of the first music can be as shown in Figure 9.
  • the audio and video interface includes the target audio track of the music to be matched and at least one target video matching the target audio track.
  • the target object can trigger the matching control, so that the terminal displays an audio and video interface in response to the triggering operation of the matching control.
  • the audio and video interface includes the target audio track of the music to be matched, and the audio and video interface.
  • the target audio track matches the target video, wherein the number of the target video is at least one.
  • the at least one target video may be presented in the form of a target video set.
  • a matching instruction for the music to be matched is generated.
  • the matching instruction is used to instruct to obtain a video that matches the music to be matched.
  • the terminal responds to the triggering operation of the target object, that is, responds to the matching instruction.
  • separate the audio tracks of the music to be matched obtain the target audio track, and obtain the target video matching the target audio track based on the obtained target audio track; in actual implementation, the audio track separation and target video acquisition operations can be performed by the terminal or Server implementation; the number of target audio tracks can be one or more.
  • each target audio track can correspond to a music attribute of the music to be matched.
  • the target audio track can be a vocal attribute corresponding to the music to be matched.
  • the audio and video interface may include a first display area and a second display area.
  • the terminal In response to the triggering operation of the matching control, the terminal displays the target audio track of the music to be matched in the first display area and displays the target video matching the target audio track in the second display area according to the preset display order.
  • the audio and video interface can be as shown in Figure 10; in actual applications, when the number of target audio tracks When there are multiple target audio tracks, the display order of the target audio tracks can correspond to the importance of the music attributes corresponding to the target audio tracks, and the importance of the music attributes can be set by the user based on their own needs.
  • each pitch data that is, separate the target vocal data corresponding to the target vocal track, and then compare the pitch data Normalize it so that it is displayed as 24-layer pitch on the audio and video interface.
  • the musical scale map is the target vocal track, thereby achieving the effect of the music to be matched changing as the pitch of the human voice changes in pitch or pitch.
  • the target drum track data corresponding to the target drum track includes target drum track data of heavy drum type and target drum track data of light drum type.
  • the terminal displays the target drum beat of the music to be matched on the audio and video interface.
  • the target drum track data of the heavy drum type and the target drum track data of the light drum type can be displayed differently in the target drum track, that is, the drum beats of the heavy drum type and the drum beats of the light drum type can be displayed differently, for example,
  • the drum beats corresponding to the target drum track data of the heavy drum type can be drawn using one graphic (such as a big blue circle), and the drum beats corresponding to the target drum track data of the light drum type can be drawn using another graphic (such as a small green circle).
  • the drum beats corresponding to each target drum track data are drawn on the target drum track.
  • the terminal can use CALayer technology when drawing drum beats. Compared with UIView technology, CALayer technology can improve rendering performance.
  • the terminal can dynamically enlarge and display the drum beat reached by the playback progress bar (that is, the drum beat corresponding to the current playback position in the progress bar), so that the target object can more clearly understand the rhythm of the drum beat reached by the playback progress bar.
  • the pitch of the accompaniment of the music to be matched can be displayed in the target accompaniment track, and the pitch of the target accompaniment data of the music to be matched can be displayed.
  • the target accompaniment track it is convenient for the target object to visually understand the ups and downs of the accompaniment of the music to be matched.
  • this embodiment draws the presence or absence of the target bass data of the music to be matched, and realizes the visualization of the bass data of the music to be matched, thereby making it easier for the target object to better understand the bass data of the music to be matched. Match the composition of the music.
  • Displaying the target track of the music to be matched on the audio and video interface can not only display the information of the music to be matched more accurately, but also allow the target object to see the music to be matched while hearing the music to be matched, making it easier for the target object to understand the music to be matched. Matching music allows non-professional target audiences to better understand the music to be matched.
  • the target object can select one of the at least one target video. For example, when there are multiple target videos and the multiple target videos constitute a target video collection. , the target object can select the target video in the target video collection, and the terminal responds to the target object's selection operation and plays the target video corresponding to the selection operation in the target video collection.
  • the terminal can play the target video corresponding to the selected operation with an enlarged animation effect, or the second display area includes the first sub-display area and the second sub-display area, and then the target video corresponding to the selected operation is played in The second sub-display area is played.
  • the target video matching the target audio track is displayed in the second display area, including:
  • the target video matching the target audio track is displayed in the first sub-display area; the playback video is displayed in the second sub-display area, and the playback video is the selected target video in the first sub-display area.
  • multiple target videos can be displayed in the first sub-display area. One of the multiple target videos is selected. The selected target video is played in the second sub-display area. When the user switches to When the target video in the selected state is selected, the target video played in the second sub-display area is also switched synchronously. In this way, the user can switch the selected target video in the first sub-display area to achieve playback in the second sub-display area. Browse the content of each target video.
  • the target video in the selected state is the target video corresponding to the selected operation.
  • the audio and video interface can be as shown in Figure 11.
  • the target video 1 is a playback video
  • the terminal displays the target video 1 in the second sub-display area.
  • Figure 10 and Figure 11 are only examples of the audio and video interface. In the process of actual application, the audio and video interface can also be in other forms.
  • a set of target videos matching the target audio track will be displayed in the first sub-display area, including:
  • the target videos in the target video collection are displayed in the first sub-display area in order.
  • the target videos may be displayed in the second display area in order from large to small playback volume of the target videos.
  • the terminal can first display the preset number of target videos in the second display area, and then respond to the target object
  • the sliding operation displays the target video that has not yet been displayed in the second display area.
  • the audio and video interface can also include adjustment controls for the target audio track. After the audio and video interface is displayed in response to the triggering operation on the matching control, it also includes:
  • the data of each target track is equivalent to a separate audio file in the m4a format.
  • the terminal can respond to the triggering operation of the adjustment control to realize the target track. Play and stop playing audio files.
  • the terminal when the terminal responds to the triggering operation of the adjustment control, it obtains the current playback volume of the audio file of the adjustment target track corresponding to the adjustment control, and stores the current playback volume as the historical playback volume.
  • the current playback volume exceeds the mute volume , adjust the current playback volume to the mute volume, obtain the adjusted music, and add a mask layer to the adjustment target audio track to hide the adjustment target audio track in the audio and video interface.
  • the terminal adjusts the current playback volume to the mute volume, obtains the adjusted music, and adds a mask layer to the adjustment target audio track.
  • the mute volume can be 0 or other volume thresholds.
  • the user can set it according to the actual situation, which is not limited in this embodiment.
  • the adjustment control can be an identification of the target audio track, or the adjustment control can also be an additionally set control.
  • Each target audio track has a corresponding adjustment control, so that the terminal can respond to a trigger operation on the adjustment control and mute the single target audio track corresponding to the trigger operation.
  • the terminal can hide the target audio track, other target audio tracks can still be displayed normally, and the audio files of other target audio tracks can still be played normally.
  • the terminal can adjust the current playback volume of multiple target audio tracks to a mute volume, so that only the audio file of one target audio track is ultimately played, so that the target object can better understand the sound of a single target audio track in the music to be matched. effect, thereby helping the target object to better understand the music to be matched in layers.
  • the current playback volume when the current playback volume exceeds the mute volume, the current playback volume is adjusted to the mute volume, and a mask layer is added to the adjustment target audio track to hide the adjustment target audio track in the audio and video interface to obtain the adjusted music After that, it also includes:
  • the terminal can also update the target video in the target video collection based on the adjusted music, obtain the updated video collection, and then display the updated video collection on the audio and video interface, so that the music displayed on the audio and video interface Keep it up to date with the video.
  • the target video in the target video collection is updated to obtain the updated video collection, including: if the adjusted target audio track is a preset target audio track, the adjusted music is determined according to the audio track of the adjusted music The corresponding target pattern string; according to the target pattern string, update the target videos in the target video set to obtain the updated video set.
  • the default target audio track refers to the target audio track used for video matching. For example, if the video to be matched corresponding to the initial music that matches the target drum track of the music to be matched is used as the target video, then the target drum track is the preset target track.
  • the adjusted target audio track is the target audio track used for video matching, and the audio track corresponding to the adjusted music is missing the adjusted target audio track, the video obtained by matching based on the adjusted music audio track will be the target video in the target video set. are not the same, so the target video collection is updated.
  • the adjusted target audio track is not the default target audio track, there is no need to update the target video in the target video collection.
  • the target audio tracks are the target drum track, the target vocal track and the target bass track of the music to be matched, and the target audio track is adjusted to the target vocal track, that is, the adjusted music does not include the target vocal track.
  • the target drum track and the target bass track are target audio tracks used for video matching, that is, the video to be matched corresponding to the initial music that matches the target drum track and matches the target bass track is used as the target video. Since the adjusted music still includes the target drum track and the target bass track, and the target drum track and the target bass track are the target tracks used for video matching, even if the target drum track and the target bass track are used for video matching, Matching is performed again, and the obtained video set is the same as the target video set. Therefore, there is no need to update the target video set.
  • the process of determining the target pattern string corresponding to the adjusted music can be referred to the process of determining the pattern string of the music to be matched.
  • the process of obtaining the updated video collection can be referred to the process of determining the target video collection. The process will not be described again in this embodiment.
  • the terminal can also update the target video in the target video collection to obtain the updated video collection, and then display the updated video collection on the audio and video interface, so that The music displayed on the audio and video interface remains consistent with the video.
  • the process of displaying the audio and video interface may be:
  • the pattern string determine the target video that matches the target audio track, and the target audio track is the audio track corresponding to the target audio track data;
  • Figure 12 is a schematic diagram of the process of track separation of music to be matched provided by an embodiment of the present application.
  • the process of track separation of music to be matched and obtaining the target track corresponding to the music to be matched may include:
  • Step 1 In response to the triggering operation of the matching control, the terminal sends the file identification of the music to be matched and the target account of the target object to the matching server.
  • Step 2 The matching server verifies the login status of the target account.
  • Step 3 If the login status of the target account is logged in and the file identifier exists in the cloud database, the matching server searches for the audio track separation pipeline of the file identifier from the cache.
  • Step 4 If the file identifier has not been matched to the video, the matching server creates the audio track separation pipeline for the file identifier, and then stores the audio track separation pipeline in the cache.
  • Step 5 The matching server sends the file identification to the audio server.
  • Step 6 The audio server creates an audio track separation task corresponding to the file identification, and runs the audio track separation task to separate the audio tracks of the music to be matched corresponding to the file identification. At the same time, the identification of the audio track separation task is returned to the matching server.
  • Step 7 The matching server stores the identifier of the track separation task in the cache.
  • Step 8 When the audio server completes the separation of the audio tracks of the music to be matched, the audio server then sends the target audio track data of the target audio track to the matching server and the cloud database.
  • Step 9 The matching server then sends the target audio track data of the target audio track to the terminal.
  • Step 10 The terminal draws the target audio track based on the target audio track data.
  • the audio server's process of separating tracks of the matching music includes:
  • Step 61 Create a corresponding step sub-flow for each step, that is, when the step is run, a step sub-flow corresponding to the step is created.
  • Step 62 Send the step sub-stream to the matching server.
  • Step 63 The matching server then sends the step sub-pipeline and the audio track separation pipeline to the wormhole.
  • the terminal sends the file identification of the music to be matched to the pipeline server, so that the pipeline server can create a pipeline task corresponding to the file identification.
  • the pipeline server runs the pipeline task and sends a pipeline acquisition request to the wormhole (wormhole refers to the channel connecting the pipeline server and the matching server).
  • Step 65. The wormhole separates the audio track based on the pipeline acquisition request. Pipeline and steps The sub-pipeline is sent to the pipeline server, and the pipeline server then sends the track separation pipeline and step sub-pipeline to the pipeline database, and ends the pipeline task when the matching of the music to be matched is completed.
  • the track separation of the music to be matched can be performed through a trained neural network model or an independent component analysis algorithm. Because the vibration of the sound source does not produce sound waves of a single frequency, but a composite sound composed of a fundamental tone and overtones of different frequencies. For example, as shown in Figure 13, Figure 13 shows the waveforms of different musical instruments. It can also be seen from Figure 14 that the sound waveform is composed of different waveforms.
  • the tracks of the music to be matched can be separated to obtain the waveforms of each target track, and then the target track data of each target track is determined based on the amplitude and frequency of each waveform.
  • the target audio track The submatrix is also the waveform of the target audio track.
  • the matching server finds the audio track separation pipeline identified by the file from the cache, it obtains the target audio track data of the target audio track identified by the file from the cloud database, and returns the target audio track data of the target audio track to the terminal ( Refer to Figure 15).
  • Figure 15 is a schematic diagram of another process of track separation of music to be matched provided by an embodiment of the present application.
  • the process of track separation of music to be matched includes:
  • Step 151 In response to the triggering operation of the matching control, the terminal sends the file identification of the music to be matched and the target account of the target object.
  • Step 152 The matching server verifies the login status of the target account.
  • Step 153 If the login status of the target account is logged in and the file identifier exists in the cloud database, the matching server searches for the audio track separation pipeline of the file identifier from the cache.
  • Step 154 If the audio track separation pipeline with the file identification exists in the cache, the matching server sends the file matching identification.
  • Step 155 The cloud database returns the target audio track data identified by the file to the matching server.
  • Step 156 The matching server returns the target audio track data of the file identification to the terminal.
  • Step 157 The terminal draws the target audio track according to the target audio track data.
  • Each step in the process of separating the tracks of the matched music is created with a corresponding step sub-flow, so that when a problem occurs in the process of separating the tracks of the matched music, the problematic step can be quickly determined without starting from scratch.
  • Match music for track separation is created with a corresponding step sub-flow, so that when a problem occurs in the process of separating the tracks of the matched music, the problematic step can be quickly determined without starting from scratch.
  • the target audio track data corresponding to the target audio track is in the form of a json list.
  • the target drum track data can be as shown in Figure 16 (where SlowRhythm represents the heavy drum type, and PuckingDrum represents the light drum type. drum type).
  • the terminal can format the target audio track data corresponding to the target audio track to obtain the pattern string corresponding to the target audio track, and then determine the target video matching the target audio track based on the pattern string.
  • the target video matching the target audio track is determined, including:
  • the video to be matched corresponding to the target music is used as the target video matching the target audio track.
  • the number of target videos matching the target audio track is multiple, multiple target videos are constructed to obtain a target video set.
  • the initial music in the video to be matched can be separated into tracks first to obtain the initial track data of each initial track, and then each initial track data can be formatted to obtain the main string corresponding to the initial track. , so that after getting the pattern string, the terminal can convert the pattern string to Match with the main string, and then use the initial music corresponding to the main string matching the pattern string as the target music. Finally, the terminal uses the video to be matched containing the target music as the target video that matches the target audio track.
  • the music to be matched includes multiple target audio tracks
  • the pattern string is matched with the main string
  • the pattern string of the same type of audio track is matched with the main string.
  • the target track is a drum track corresponding to the drum beat attribute of the music to be matched
  • the initial track is also a drum track
  • the pattern string of the drum track of the music to be matched is combined with the pattern string of the drum track of the initial music.
  • Main string to match when the target track is a drum track corresponding to the drum beat attribute of the music to be matched.
  • the target audio track is a vocal track corresponding to the vocal attribute of the music to be matched
  • the initial audio track is also a vocal track
  • the pattern string of the target vocal track of the music to be matched is matched with the pattern string of the initial music.
  • the main string of the vocal track is matched.
  • the pattern string of each target audio track can be matched with the main string of each initial audio track, or the pattern string of one of the target audio tracks can be matched with one of the initial audio tracks.
  • the main strings of each target audio track can be matched, or the fusion pattern string can be obtained after fusing the pattern strings of each target audio track. After fusing the main strings of each initial audio track, the fusion main string can be obtained, and then the fusion pattern string and the fusion main string can be obtained. Strings are matched, which is not limited in this embodiment.
  • the target audio track can be the target drum track of the music to be matched, and the initial audio track can be the drum track of the target music, then
  • the target track data includes the target drum track data of the music to be matched, the target track data is formatted to obtain the pattern string corresponding to the target track data, including:
  • the target drum track data is formatted according to the first target drum sequence to obtain a pattern string corresponding to the target drum track, and the target drum track is a track corresponding to the target drum track data.
  • each target drum track data is sorted according to the time corresponding to each target drum track data, to obtain the first target drum sequence, and then according to the first target drum sequence Format the target drum track data to obtain the pattern string corresponding to the target drum track.
  • the target drum track data can be arranged in ascending order, or the target drum track data can be arranged in descending order. This embodiment is not limited here.
  • the target drum track data is formatted according to the first target drum sequence to obtain a pattern string corresponding to the target drum track, including:
  • a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data For each target drum track data included in the first target drum sequence, a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data.
  • the target time interval of the target drum track data pair format the target drum track data;
  • a pattern string corresponding to the target drum track is obtained.
  • the drum type of the target drum track data may include a heavy drum type and a light drum type. Pair the target drum track data containing the target drum track data, and the drum type of the target drum track data and the target drum track data pair.
  • the target time interval is the result of formatting the data of two adjacent target drum tracks, and then the pattern string is determined based on the result of the formatting of each target drum track.
  • the pattern string can be:
  • the target drum track data corresponding to the first S and the first P correspond to The target drum track data can be a target drum track data pair.
  • the first S and the first 0 are the results of the target drum track data format corresponding to the first S.
  • the first 0 and the first P That is, the result of the target drum track data format corresponding to the first P. That is, the first S, the first 0 and the first P contain the target drum track data corresponding to the first S.
  • the target time interval is 0.
  • the target time interval is 0, it means that the two adjacent target drum track data are invalid data.
  • the terminal can delete the target after getting the target time interval.
  • the drum type of the target drum track data in the pair of target drum track data including the target drum track data is , and the target time interval of the target drum track data pair containing the target drum track data, format the target drum track data, including:
  • a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data For each target drum track data included in the second target drum sequence, a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data.
  • the target time interval of the target drum track data pair format the target drum track data;
  • a pattern string corresponding to the target drum track is obtained, including:
  • the preset time interval may be 0 or other time intervals, and may be set according to the actual situation, which is not limited in this embodiment.
  • the pattern string is:
  • the target drum beat track data pair corresponding to the target time interval that does not exceed the preset time interval is deleted from the first target drum beat sequence, and the corresponding target drum beat track data is obtained to obtain the second target drum beat sequence, and then For each target drum track data included in the second target drum sequence, a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data. Format the target drum track data at the target time interval of the target drum track data pair, and obtain the pattern corresponding to the target drum track based on the formatting result of each target drum track data included in the second target drum sequence. string, so that invalid target drum track data can be deleted, and the calculation amount of formatting the target drum track data in the second target drum sequence can be reduced, thereby obtaining the pattern string corresponding to the target track more quickly.
  • the target drum track data of the music to be matched includes multiple, it is not necessary to calculate all the target drum track data of the music to be matched, and only the first target number of target drum track data in the target drum sequence can be calculated, so that Reduce the calculation amount of the target time interval and the subsequent calculation amount of matching the pattern string and the main string.
  • the target quantity can be set according to the duration of the music to be matched. For example, when the duration of the music to be matched is 3 minutes, the target number can be set to 90.
  • the pattern string when the target drum track data to be matched includes multiple data, the pattern string will be longer. In the same way, the main string also has the same problem. Therefore, after obtaining the pattern string corresponding to the target drum track based on the formatting result of each target drum track included in the second target drum sequence, it also includes:
  • Filter out the initial music corresponding to the main string matching the pattern string and obtain the target music including:
  • the method of matching the pattern string and the main string can be selected according to the actual situation. For example, choose the Knuth-Morris-Pratt algorithm (Knuth-Morris-Pratt, KMP) or the suffix matching method (Boyer-Moore, BM) or Sunday algorithm as the matching method in this embodiment, which is not limited in this embodiment.
  • the target audio track can also be the target bass track of the music to be matched, and the initial audio track can be the bass track of the target music,
  • the process of formatting the target bass track you may refer to the process of formatting the target drum track, which will not be described again in this embodiment.
  • the initial music corresponding to the main string matching the pattern string is filtered out to obtain the target music, including:
  • At least one initial music corresponding to the main string whose matching degree is greater than the preset matching threshold is not directly used as the candidate music, instead of being used as the target music, and then filtered out from the candidate music based on the target track data. At least one target music is obtained, thereby obtaining target music with a higher matching degree to the music to be matched.
  • At least one target music is selected from the candidate music according to the target track data, including:
  • At least one target music is screened out from the candidate music.
  • the target audio track data corresponding to each target audio track of the music to be matched can be obtained. Then, the target drum beat track data can be filtered out from the target track data.
  • the target drum beat track data includes the target drum beat and the first time data corresponding to the target drum beat.
  • the drum beat track data corresponding to the candidate music includes the drum beat of the candidate music and the candidate music. The second time data corresponding to the drum beat of the music.
  • the candidate music is the target music, or when the number of drum beats of the candidate music that are the same as the target drum beat exceeds the th.
  • the candidate music can also be used as the target music.
  • the first time data of the target drum beat is extracted from the target drum beat track data, including:
  • the first time data corresponding to the target drum beat is filtered out from the time data collection.
  • the time data corresponding to each drum beat has a corresponding position in the target drum beat track data.
  • the target can be filtered out from the time data set according to the initial position of the target character corresponding to the target drum beat in the pattern string.
  • the first time data corresponding to the drum beat is the first time data corresponding to the drum beat.
  • the pattern string corresponding to the target drum beat track is S0P520P520P520P520P520P520P520P520PS0P
  • the target drum beat is the first drum beat
  • the target character corresponding to the first drum beat in the pattern string is the first S in the pattern string
  • the first S is in
  • the initial position in the pattern string is the first one
  • the first time data in the time data set is the first time data corresponding to the first drum beat.
  • the process of determining the second time data of the candidate music based on the drum beat track data corresponding to the candidate music may refer to the process of extracting the first time data of the target drum beat from the target drum beat track data, which will not be described again in this embodiment.
  • the terminal After displaying the audio and video interface in response to the triggering operation of the matching control, the terminal can directly play the music to be matched and play the video.
  • the audio and video interface can include playback controls, and the terminal can also respond to the target object to play the The trigger operation of the control is to play the music to be matched and play the video.
  • the terminal when the music to be matched, it can play dynamic effects (i.e. dynamic special effects) on the target audio track according to the playback progress bar, that is, dynamically play the pattern in the target audio track corresponding to the position where the playback progress bar reaches.
  • dynamic effects i.e. dynamic special effects
  • At least one target audio track on the audio and video interface can be dynamically played according to the playback progress bar, and the dynamic playback method of each target audio track can be the same or different.
  • This implementation The examples are not limited here.
  • the pattern in the target audio track can refer to the drum beats in the target audio track. Therefore, in some embodiments, dynamic playback is performed on the target audio track according to the playback progress bar, including:
  • the drum type of the target drum beat animate the target drum beat on the target drum track.
  • Drum beat types include heavy drum types and light drum types.
  • the dynamic effect types corresponding to different drum beat types that is, the dynamic effect playback methods corresponding to different drum beat types can be different or the same.
  • the dynamic effect playback method can be in the form of dynamic amplification or static amplification.
  • the user can choose according to the actual situation, and this embodiment is not limited here.
  • the target drum beat currently being played is identified in the target drum beat track, including:
  • the terminal will play the two drum beats reached by the progress bar at the same time, that is, the two drum beats reached by the progress bar will be filtered out at this time.
  • Figure 17 is a schematic diagram of the playback process provided by the embodiment of the present application.
  • the target drum beat is played on the target drum track.
  • Motion effect playback including:
  • Step 171 Obtain the position information of the playback progress bar in the target drum track and the position interval of each drum beat in the target drum track, and use the drum beat corresponding to the position interval matching the position information as the currently played target drum beat.
  • Step 172 Determine the storage status of the target drum beat in the played array
  • Step 173 If the storage status is unstored, obtain the drum beat type of the target drum beat, and determine the dynamic effect type of the target drum beat based on the drum beat type;
  • Step 174 Based on the motion effect type, play the target drum beat with motion effect on the target drum beat track, and store the target drum beat in the played array.
  • the terminal can play the target drum beat based on the dynamic effect type of the target drum beat and store the target drum beat in the played array.
  • the storage state is a stored state, indicating that the target drum beat has been played, the target drum beat can be deleted from the played array. Therefore, in other embodiments, the storage status of the target drum beat in the played array is determined. After that, it also includes:
  • Step 175 If the storage status is the stored status, obtain the current position information of the playback progress bar on the target drum track;
  • Step 176 Determine whether the current position information matches the position interval of the target drum beat. If so, play the music to be matched. If not, perform step 177.
  • Step 177 When the current position information does not match the position interval of the target drum beat, delete the target drum beat in the played array.
  • a played array is set, and then the target drum beat that has been played is stored in the played array, so that the terminal can determine whether the target drum beat has been played based on the played array, so that the already played drum beat will not be played repeatedly.
  • the target drum beat that was played is not be played repeatedly.
  • the terminal when the terminal displays the music matching interface, it is in the inspiration mode by default.
  • the inspiration mode is used to realize automatic matching of music and video.
  • the terminal In response to the triggering operation of the matching control, the terminal can display the music in the following manner.
  • Video interface :
  • the terminal displays an audio and video interface in response to a triggering operation on the matching control in the inspiration mode
  • the user can switch the inspiration mode based on the mode switching control.
  • the method also includes:
  • a mode switching control for mode switching is displayed in the audio and video interface; in response to the triggering operation of the mode switching control, the control switches the inspiration mode to the editing mode, and the editing mode is used to edit the music to be matched; thus, during editing In this mode, users can edit the music to be matched, and then match the edited music with related videos.
  • the method further includes:
  • the terminal In response to the editing operation of the music to be matched in the editing mode, the terminal displays each audio track obtained by separating the audio tracks of the edited music to be matched; and updates and displays at least one target video that matches each audio.
  • the method further includes:
  • the terminal displays editing guidance information in response to the triggering operation of the mode switching control.
  • the editing guidance information is used to guide the editing object to edit the music to be matched in the editing mode.
  • a matching control is included in the music matching interface of the music to be matched.
  • the user is provided with the function of video matching for the music of interest.
  • the matching control it is displayed in the audio and video display interface.
  • the display of the target audio track of the music to be matched realizes the visualization of the music to be matched.
  • the matching with the target audio track is realized.
  • the automatic search and display of target videos improves the viewing efficiency of videos that match the music of interest.
  • the music matching interface includes a matching control, and in response to the triggering operation of the matching control, the target video matching the target audio track of the music to be matched can be automatically found, and the target audio track and the target audio track can be displayed on the audio and video interface.
  • the target videos do not need to be viewed manually one by one, which is more convenient.
  • FIG. 18 is a schematic flowchart of a music matching method provided by an embodiment of the present application.
  • the music matching method process may include:
  • the terminal displays a music matching interface of the first music in the music interface.
  • the music matching interface of the first music includes a matching control and a listening area, and the first music is the music to be matched.
  • the playback progress bar of the auditioned music and the adjustment control for adjusting the playback progress can be displayed in the audition area. Based on the audition area, the user can audition the music.
  • the terminal displays the music matching interface of the second music and the music matching interface of the first music in the music interface.
  • the music matching interface of the second music includes a matching control and a listening area, and the music matching interface of the first music includes a matching control.
  • the second music is the music to be matched.
  • the terminal determines that a piece of music is the music to be matched, and in response to the triggering operation of the matching control of the music to be matched, separates the tracks of the music to be matched, and obtains the target track data corresponding to the target track of the music to be matched.
  • the target track includes Target vocal track, target backing track, target bass track, and target drum track.
  • the music to be matched may be the first music or the second music.
  • the terminal sorts the target drum beat track data according to the time corresponding to the target drum beat track data, and obtains the first target drum beat sequence.
  • the terminal calculates the target time interval of the target drum track data pair in the first target drum sequence, and deletes the target drum track data pair corresponding to the target time interval that does not exceed the preset time interval in the first target drum sequence, corresponding to The target drum track data is obtained to obtain a second target drum sequence, and the target drum track data pair includes two adjacent target drum track data.
  • the terminal determines the drum type of the target drum track data in the target drum track data pair containing the target drum track data, and the target drum track data containing the target drum track data.
  • the target drum beat track data is formatted according to the target time interval of the target drum beat track data pair of the track data, and the target drum beat sound is obtained based on the formatted result of each target drum beat track data included in the second target drum beat sequence.
  • the pattern string corresponding to the track is
  • the terminal obtains the initial music in the video to be matched, separates the tracks of the initial music, and obtains the initial drum track data of the initial music.
  • the terminal may extract the initial music in the video to be matched, and separate the audio tracks of the initial music.
  • the terminal may also extract the initial music and separate the tracks of the initial music when receiving the separation instruction after acquiring the video to be matched. This embodiment is not limited here.
  • S1808 The terminal sorts the initial drum track data according to the time corresponding to the initial drum track data of the initial drum track to obtain the first initial drum sequence.
  • the terminal calculates the initial time interval of the initial drum track data pair in the first initial drum sequence, and deletes the initial drum track data pair corresponding to the initial time interval that does not exceed the preset time interval in the first initial drum sequence, corresponding to The initial drum track data is obtained to obtain a second initial drum sequence, and the initial drum track data pair includes two adjacent initial drum track data.
  • the terminal determines the drum beat type of the initial drum beat track data in the pair of initial drum beat track data that includes the initial drum beat track data, and the initial drum beat track data that includes the initial drum beat track data. the initial time interval of the initial drum beat track data pair of the track data, format the initial drum beat track data, and obtain the initial drum beat sound based on the formatted result of each initial drum beat track data included in the second initial drum beat sequence
  • the terminal matches the pattern string and the main string, uses at least one initial music with a matching degree greater than the preset matching degree as candidate music, and identifies the time data corresponding to each drum beat in the target drum beat track data to obtain the time data. gather.
  • the terminal obtains the initial position of the target character corresponding to the target drum beat in the pattern string in the target drum beat track data, and filters out the first time data corresponding to the target drum beat in the time data collection based on the initial position.
  • the terminal determines the second time data of the candidate music based on the drum beat track data corresponding to the candidate music, selects at least one target music from the candidate music based on the first time data and the second time data, and adds the target music containing the target music to the candidate music. Match the video as the target video.
  • the target drum track data of the music to be matched is matched with the initial drum track data of the initial music in the video to be matched, thereby determining the target video containing the music to be matched.
  • the terminal separates the tracks of the music to be matched through the audio track separation task, obtains the target track data, and formats the target track data to obtain the pattern string.
  • the terminal extracts the initial music from the video to be matched through the video preprocessing task, then separates the audio track of the initial music to obtain the initial audio track data, formats the initial audio track data to obtain the main string, and finally combines the video to be matched and the main string Associations are stored in the video library.
  • the terminal matches the pattern string and the main string through the video matching task.
  • the matching degree between the pattern string and the main string is greater than the preset threshold
  • the main string corresponding to the matching degree greater than the preset threshold will be matched with at least one initial music as candidate music.
  • the first time data corresponding to the target drum beat and the drum beat track data corresponding to the candidate music are filtered out from the time data set to determine the candidate music
  • the second time data is used to select at least one target music from the candidate music, and the to-be-matched video containing the target music is used as the target video, that is, the pattern string is restored.
  • the video to be matched may be a video shot by the target object using the original music.
  • the terminal after acquiring the video to be matched, stores the video to be matched containing the same initial music into the video library.
  • the same initial music may refer to the initial music with the same music identifier. Since The music identifiers are the same, so the same initial music may include exactly the same initial music, or may include part of the same initial music.
  • the partially identical initial music may be: the initial music a and the edited initial music a are the same initial music.
  • the terminal obtains the music to be matched, it obtains the video to be matched from the video library based on the music to be matched, and matches the main string of the video to be matched with the pattern string of the music to be matched.
  • the terminal displays the target vocal track, the target accompaniment track, the target bass track and the target drum track in the first display area in accordance with the preset display order, displays the target video in the first sub-display area, and plays The video is displayed in the second sub-display area, and the played video is the target video in the selected state.
  • the first display area and the second display area form an audio and video interface, and the audio and video interface includes playback controls and adjustment controls.
  • the terminal obtains the current playback volume of the audio file of the adjustment target track corresponding to the adjustment control.
  • the adjusted target audio track is the preset target audio track, determine the target pattern string corresponding to the adjusted music based on the adjusted music track, and update the target video in the target video collection according to the target pattern string to obtain Updated video collection.
  • the embodiment of the present application also provides a device based on the above music matching method.
  • the meanings of the nouns are the same as in the above music matching method.
  • the music matching device may include:
  • the first display module 2101 is configured to display a music matching interface for music to be matched, and the music matching interface includes matching controls.
  • the second display module 2102 is configured to display an audio and video interface in response to the triggering operation of the matching control.
  • the audio and video interface includes the target audio track of the music to be matched and the target video matching the target audio track.
  • the second display module 2102 is also configured to perform:
  • the second display module 2102 is also configured to perform:
  • the video to be matched corresponding to the target music is determined as the target audio and video that matches the target audio track, and the target video is constructed.
  • the second display module 2102 is also configured to perform:
  • the second display module 2102 is also configured to perform:
  • At least one target music is screened out from the candidate music.
  • the second display module 2102 is also configured to perform:
  • the target character is the character corresponding to the target drum beat in the target drum beat track data
  • the time data corresponding to the target drum beat is filtered out from the time data set as the first time data.
  • the target track data includes target drum track data of the music to be matched.
  • the second display module 2102 is also configured to perform:
  • Each target drum track data is formatted according to the first target drum sequence to obtain a pattern string corresponding to the target drum track, and the target drum track is a track corresponding to the target drum track data.
  • the second display module 2102 is also configured to perform:
  • the target drum track data in the first target drum sequence For each target drum track data in the first target drum sequence, match the drum type of the target drum track data and the target drum sound containing the target drum track data according to the target drum track data containing the target drum track data. According to the target time interval of the track data pair, the target drum track data is formatted, and the formatting result corresponding to each target drum track data is obtained;
  • a pattern string corresponding to the target drum track is determined.
  • the second display module 2102 is also configured to perform:
  • a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data For each target drum track data included in the second target drum sequence, a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data.
  • the target time interval of the target drum track data pair format the target drum track data;
  • a pattern string corresponding to the target drum track is obtained.
  • the second display module 2102 is also configured to perform:
  • the audio and video interface includes a first display area and a second display area.
  • the number of the target audio tracks is at least two, and each target audio track corresponds to a music attribute of the music to be matched.
  • the second display module 2102 is also configured to, when the audio track is The first display area in the video interface displays at least two of the target audio tracks according to a preset display order.
  • the second display area includes a first sub-display area and a second sub-display area
  • the number of the target videos is multiple
  • the multiple target videos constitute a target video set
  • the target video set includes playback video
  • the second display module 2102 is also configured to perform:
  • the playback video is displayed in the second sub-display area, and the playback video is the selected target video in the target video collection.
  • the second display module 2102 is also configured to perform:
  • the target videos in the target video collection are sequentially displayed in the first sub-display area in order from high to low playback volume.
  • the target audio track is obtained by separating the audio tracks of the music to be matched; the audio and video interface also includes adjustment controls for the target audio track.
  • the music matching device also includes:
  • Silent hidden processing module configured to execute:
  • music matching devices also include:
  • Update module configured to execute:
  • the adjusted target audio track is a preset target audio track, determine the target pattern string corresponding to the adjusted music based on the adjusted music track;
  • the target videos in the target video collection are updated to obtain the updated video collection.
  • the second display module is further configured to display an audio and video interface in response to a triggering operation on the matching control in the inspiration mode;
  • the device further includes a switching control configured to control switching of the inspiration mode to an editing mode in response to a triggering operation of the mode switching control, and the editing mode is used to edit the music to be matched.
  • the second display module is further configured to, in response to an editing operation on the music to be matched in the editing mode, display the audio track separation of the edited music to be matched. individual audio tracks;
  • the update displays at least one target video matching the respective audio.
  • the second display module is further configured to display editing guidance information in response to the triggering operation of the mode switching control, and the editing guidance information is used to guide the editing object in the editing mode.
  • the music to be matched is edited.
  • each of the above modules can be implemented as an independent entity, or can be combined in any way to be implemented as the same or several entities.
  • the specific implementation methods and corresponding beneficial effects of each of the above modules can be found in the previous method embodiments. I won’t go into details here.
  • An embodiment of the present application also provides an electronic device, which may be a server or a terminal, etc., as shown in Figure 22, which shows a schematic structural diagram of the electronic device involved in the embodiment of the present application. Specifically:
  • the electronic device may include components such as a processor 2201 of one or more processing cores, a memory 2202 of one or more computer-readable storage media, a power supply 2203, and an input unit 2204.
  • a processor 2201 of one or more processing cores a memory 2202 of one or more computer-readable storage media
  • a power supply 2203 a power supply 2203
  • FIG. 22 does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange different components. in:
  • the processor 2201 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire electronic device, by running or executing computer programs and/or modules stored in the memory 2202, and calling programs stored in the memory 2202. Data, perform various functions of electronic devices and process data.
  • the processor 2201 may include one or more processing cores; preferably, the processor 2201 may integrate an application processor and a modem processor, where the application processor mainly processes operating systems, user interfaces, application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 2201.
  • the memory 2202 may be configured to store computer programs and modules, and the processor 2201 executes various functional applications and data processing by running the computer programs and modules stored in the memory 2202.
  • the memory 2202 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store data based on Data created by the use of electronic devices, etc.
  • memory 2202 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 2202 may also include a memory controller to provide the processor 2201 with access to the memory 2202.
  • the electronic device also includes a power supply 2203 that supplies power to various components.
  • the power supply 2203 can be logically connected to the processor 2201 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system.
  • the power supply 2203 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
  • the electronic device may also include an input unit 2204 that may be configured to receive input numeric or character information and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
  • an input unit 2204 may be configured to receive input numeric or character information and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
  • the electronic device may also include a display unit and the like, which will not be described again here.
  • the processor 2201 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 2202 according to the following instructions, and the processor 2201 will run the executable files stored in the computer program.
  • an audio and video interface is displayed, and the audio and video interface includes a target audio track of the music to be matched, and at least one target video matching the target audio track.
  • embodiments of the present application provide a computer-readable storage medium in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any music matching method provided by the embodiments of the present application.
  • the computer program can perform the following steps:
  • an audio and video interface is displayed, and the audio and video interface includes a target audio track of the music to be matched, and at least one target video matching the target audio track.
  • the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
  • any music matching method provided by the embodiments of the present application can be implemented.
  • the beneficial effects that can be achieved are detailed in the previous section. The embodiments will not be described again here.
  • a computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above music matching method.

Abstract

Disclosed in embodiments of the present application are a music matching method and apparatus, an electronic device, a computer readable storage medium, and a computer program product. The method comprises: displaying a music matching interface of music to be matched, the music matching interface comprising: a matching control; and displaying an audio and video interface in response to a trigger operation on the matching control, the audio and video interface comprising a target track of the music to be matched and at least one target video matching the target track.

Description

音乐匹配方法、装置、电子设备、存储介质及程序产品Music matching method, device, electronic equipment, storage medium and program product
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为202210348876.X、申请日为2022年04月01日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is filed based on the Chinese patent application with application number 202210348876.
技术领域Technical field
本申请涉及音乐处理技术领域,尤其涉及一种音乐匹配方法、装置、电子设备、存储介质及程序产品。The present application relates to the field of music processing technology, and in particular to a music matching method, device, electronic device, storage medium and program product.
背景技术Background technique
随着科技的发展,电子设备越来越普及,以及电子设备的功能越来越丰富,例如,用户可以通过电子设备听音乐、利用碎片化的时间看短视频等。With the development of science and technology, electronic devices are becoming more and more popular, and the functions of electronic devices are becoming more and more abundant. For example, users can listen to music through electronic devices, use fragmented time to watch short videos, etc.
短视频中一般包括视频帧和音乐,由于音乐的不可见性,如果用户想要查看包括感兴趣音乐的视频有哪些,需要用户手动逐个查看,导致与感兴趣音乐相匹配的视频的查看效率低。Short videos generally include video frames and music. Due to the invisibility of music, if the user wants to see which videos include the music of interest, the user needs to manually view them one by one, resulting in low efficiency in viewing videos that match the music of interest. .
发明内容Contents of the invention
本申请实施例提供一种音乐匹配方法、装置、电子设备、计算机可读存储介质及计算机程序产品,能够提高与感兴趣音乐相匹配的视频的查看效率。Embodiments of the present application provide a music matching method, device, electronic device, computer-readable storage medium, and computer program product, which can improve viewing efficiency of videos that match the music of interest.
本申请实施例提供了一种音乐匹配方法,包括:The embodiment of the present application provides a music matching method, including:
显示待匹配音乐的音乐匹配界面,音乐匹配界面内包括匹配控件;Display a music matching interface for music to be matched, and the music matching interface includes matching controls;
响应于对上述匹配控件的触发操作,显示音视频界面,音视频界面包括待匹配音乐的目标音轨、以及与目标音轨匹配的至少一个目标视频。In response to the triggering operation of the above matching control, an audio and video interface is displayed. The audio and video interface includes a target audio track of the music to be matched, and at least one target video matching the target audio track.
本申请实施例还提供一种音乐匹配装置,包括:An embodiment of the present application also provides a music matching device, including:
第一显示模块,配置为显示待匹配音乐的音乐匹配界面,音乐匹配界面内包括匹配控件;The first display module is configured to display a music matching interface for music to be matched, and the music matching interface includes matching controls;
第二显示模块,配置为响应于对上述匹配控件的触发操作,显示音视频界面,上述音视频界面包括待匹配音乐的目标音轨、以及与目标音轨匹配的至少一个目标视频。The second display module is configured to display an audio and video interface in response to a triggering operation on the matching control. The audio and video interface includes a target audio track of the music to be matched and at least one target video matching the target audio track.
此外,本申请实施例还提供一种电子设备,包括处理器和存储器,上述存储器存储有计算机程序,上述处理器配置为运行上述存储器内的计算机程序时,实现本申请实施例提供的音乐匹配方法。In addition, an embodiment of the present application further provides an electronic device, including a processor and a memory. The memory stores a computer program. The processor is configured to implement the music matching method provided by the embodiment of the present application when running the computer program in the memory. .
此外,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序适于处理器进行加载,以执行本申请实施例所提供的音乐匹配方法。In addition, embodiments of the present application also provide a computer-readable storage medium that stores a computer program. The computer program is suitable for loading by the processor to execute the music matching method provided by the embodiments of the present application.
此外,本申请实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,实现本申请实施例所提供的音乐匹配方法。In addition, embodiments of the present application also provide a computer program product, including a computer program. When the computer program is executed by a processor, the music matching method provided by the embodiment of the present application is implemented.
本申请实施例具有以下有益效果:The embodiments of this application have the following beneficial effects:
在本申请实施例中,在待匹配音乐的音乐匹配界面中包括匹配控件,如此,为用户提供对感兴趣音乐进行视频匹配的功能,当用户触发该匹配控件时,在音视频界面中显示待匹配音乐的目标音轨、以及与目标音轨匹配的目标视频,对待匹配音乐的目标音轨的显示,实现了待匹配音乐的可视化,针对该可视化的音乐,实现了与目标音轨相匹配的目标视频的自动查找及显示,提高了与感兴趣音乐相匹配的视频的查看效率。In the embodiment of the present application, a matching control is included in the music matching interface of the music to be matched. In this way, the user is provided with the function of video matching for the music of interest. When the user triggers the matching control, the to-be-matched music is displayed in the audio and video interface. The target audio track of the matching music and the target video matching the target audio track are displayed. The display of the target audio track of the music to be matched realizes the visualization of the music to be matched. For the visualized music, the matching of the target audio track is realized. The automatic search and display of target videos improves the viewing efficiency of videos that match the music of interest.
附图说明Description of drawings
图1A是本申请实施例提供的音乐匹配系统的架构示意图;Figure 1A is a schematic architectural diagram of a music matching system provided by an embodiment of the present application;
图1B是本申请实施例提供的音乐匹配过程的场景示意图;Figure 1B is a schematic scene diagram of the music matching process provided by the embodiment of the present application;
图2是本申请实施例提供的音乐匹配方法的流程示意图;Figure 2 is a schematic flow chart of the music matching method provided by the embodiment of the present application;
图3是本申请实施例提供的音乐界面的示意图;Figure 3 is a schematic diagram of a music interface provided by an embodiment of the present application;
图4是本申请实施例提供的音乐界面和音乐匹配界面的示意图;Figure 4 is a schematic diagram of the music interface and music matching interface provided by the embodiment of the present application;
图5是本申请实施例提供的音乐提取界面的示意图;Figure 5 is a schematic diagram of the music extraction interface provided by the embodiment of the present application;
图6是本申请实施例提供的第一提取音乐的上传过程的示意图;Figure 6 is a schematic diagram of the first uploading process of extracting music provided by the embodiment of the present application;
图7是本申请实施例提供的另一种音乐界面的示意图; Figure 7 is a schematic diagram of another music interface provided by an embodiment of the present application;
图8是本申请实施例提供的待匹配音乐的音乐匹配界面的示意图;Figure 8 is a schematic diagram of a music matching interface for music to be matched provided by an embodiment of the present application;
图9是本申请实施例提供的另一种音乐界面的示意图;Figure 9 is a schematic diagram of another music interface provided by an embodiment of the present application;
图10是本申请实施例提供的音视频界面的示意图;Figure 10 is a schematic diagram of the audio and video interface provided by the embodiment of the present application;
图11是本申请实施例提供的另一种音视频界面的示意图;Figure 11 is a schematic diagram of another audio and video interface provided by an embodiment of the present application;
图12是本申请实施例提供的对待匹配音乐进行音轨分离的过程的示意图;Figure 12 is a schematic diagram of the process of separating tracks of music to be matched provided by an embodiment of the present application;
图13是本申请实施例提供的不同乐器的波形的示意图;Figure 13 is a schematic diagram of the waveforms of different musical instruments provided by the embodiment of the present application;
图14是本申请实施例提供的声音的波形的示意图;Figure 14 is a schematic diagram of the sound waveform provided by the embodiment of the present application;
图15是本申请实施例提供的另一种对待匹配音乐进行音轨分离的过程的示意图;Figure 15 is a schematic diagram of another process of track separation of music to be matched provided by an embodiment of the present application;
图16是本申请实施例提供的目标鼓点音轨数据的示意图;Figure 16 is a schematic diagram of target drum track data provided by an embodiment of the present application;
图17是本申请实施例提供的播放过程的示意图;Figure 17 is a schematic diagram of the playback process provided by the embodiment of the present application;
图18是本申请实施例提供的另一种音乐匹配方法的流程示意图;Figure 18 is a schematic flow chart of another music matching method provided by an embodiment of the present application;
图19是本申请实施例提供的音乐匹配界面的示意图;Figure 19 is a schematic diagram of the music matching interface provided by the embodiment of the present application;
图20是本申请实施例提供的获取待匹配视频的过程的示意图;Figure 20 is a schematic diagram of the process of obtaining a video to be matched provided by an embodiment of the present application;
图21是本申请实施例提供的音乐匹配装置的结构示意图;Figure 21 is a schematic structural diagram of a music matching device provided by an embodiment of the present application;
图22是本申请实施例提供的电子设备的结构示意图。Figure 22 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts fall within the scope of protection of this application.
本申请实施例中的“多个”指两个或两个以上。本申请实施例中的“第一”和“第二”等用于区分描述,而不能理解为暗示相对重要性。“Multiple” in the embodiments of this application refers to two or more than two. “First”, “second”, etc. in the embodiments of this application are used to differentiate the description and should not be understood as implying relative importance.
对本申请实施例进行详细说明之前,对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释。Before describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application will be described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
1)客户端,终端中运行的用于提供各种服务的应用程序,例如即时通讯客户端、视频播放客户端。1) Client, an application running in the terminal to provide various services, such as instant messaging client and video playback client.
2)响应于,用于表示所执行的操作所依赖的条件或者状态,当满足所依赖的条件或状态时,所执行的一个或多个操作可以是实时的,也可以具有设定的延迟;在没有特别说明的情况下,所执行的多个操作不存在执行先后顺序的限制。2) Response is used to represent the conditions or states on which the performed operations depend. When the dependent conditions or states are met, the one or more operations performed may be in real time or may have a set delay; Unless otherwise specified, there is no restriction on the execution order of the multiple operations performed.
基于上述对本申请实施例中涉及的名词和术语的解释,下面说明本申请实施例提供的音乐匹配系统。在实际应用中,本申请实施例提供的音乐匹配方法可由终端或服务器单独实施,或由终端及服务器协同实施,以终端及服务器协同实施为例,参见图1A,图1A是本申请实施例提供的音乐匹配系统100的架构示意图,为实现支撑一个示例性应用,终端(示例性示出了终端400)通过网络300连接服务器200,网络300可以是广域网或者局域网,又或者是二者的组合,使用无线或有线链路实现数据传输。Based on the above explanation of nouns and terms involved in the embodiments of the present application, the following describes the music matching system provided by the embodiments of the present application. In practical applications, the music matching method provided by the embodiment of the present application can be implemented by the terminal or the server alone, or by the terminal and the server collaboratively. Taking the collaborative implementation of the terminal and the server as an example, see Figure 1A. Figure 1A is provided by the embodiment of the present application. Schematic diagram of the architecture of the music matching system 100. In order to support an exemplary application, a terminal (terminal 400 is illustrated as an example) is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. Data transmission is achieved using wireless or wired links.
终端400,配置为显示待匹配音乐的音乐匹配界面,所述音乐匹配界面内包括匹配控件;Terminal 400 is configured to display a music matching interface for music to be matched, and the music matching interface includes matching controls;
以及,响应于对所述匹配控件的触发操作,发送携带待匹配音乐的匹配请求至服务器200;And, in response to the triggering operation of the matching control, send a matching request carrying the music to be matched to the server 200;
服务器200,配置为获取待匹配音乐的目标音轨,并基于该目标音轨进行视频匹配,得到与目标音轨匹配的至少一个目标视频,返回待匹配音乐的音轨信息,以及与目标音轨匹配的至少一个目标视频至终端400;The server 200 is configured to obtain the target audio track of the music to be matched, perform video matching based on the target audio track, obtain at least one target video that matches the target audio track, and return the audio track information of the music to be matched and the target audio track. Match at least one target video to the terminal 400;
终端400,还配置为显示音视频界面,该音视频界面包括:待匹配音乐的目标音轨、以及与目标音轨匹配的至少一个目标视频。The terminal 400 is also configured to display an audio and video interface, which includes: a target audio track of the music to be matched, and at least one target video matching the target audio track.
其中,服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、网络加速服务(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, and cloud communications. , middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
并且,其中多个服务器可组成为一区块链,而服务器为区块链上的节点。Moreover, multiple servers can be composed into a blockchain, and the servers are nodes on the blockchain.
终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、智能手表等,但并不局限于此。终端以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be connected directly or indirectly through wired or wireless communication methods, which is not limited in this application.
在一些实施例中,本申请实施例提供的音乐匹配方法还可由终端单独实施,如图1所示,终端可以显示待匹配音乐的音乐匹配界面,音乐匹配界面内包括匹配控件;响应于匹配控件的触发操作,显示音视频界面,音视频界面包括待匹配音乐的目标音轨以及与目标音轨匹配的目标视频。In some embodiments, the music matching method provided by the embodiments of the present application can also be implemented by a terminal alone. As shown in Figure 1, the terminal can display a music matching interface for music to be matched, and the music matching interface includes matching controls; in response to the matching control The trigger operation displays the audio and video interface, which includes the target audio track of the music to be matched and the target video matching the target audio track.
基于上述对音乐匹配系统及音乐匹配场景的说明,接下来对本申请实施例的音乐匹配方法、装置、电子设备、计算机可读存储介质及计算机程序产品分别进行详细说明。需要说明的是,以下实施例的描述顺序不作为对实施例优选顺序的限定。Based on the above description of the music matching system and music matching scenarios, the music matching method, device, electronic device, computer readable storage medium and computer program product of the embodiments of the present application will be described in detail. It should be noted that the order of description of the following embodiments does not limit the preferred order of the embodiments.
在本实施例中,将从音乐匹配装置的角度进行描述,该音乐匹配装置可以集成在服务器或终端等电子设 备中,为了方便对本申请的音乐匹配方法进行说明,以下将以音乐匹配装置集成在终端中进行详细说明,即以终端作为执行主体进行详细说明。In this embodiment, description will be made from the perspective of a music matching device. The music matching device can be integrated in an electronic device such as a server or terminal. In order to facilitate the description of the music matching method of the present application, the detailed description will be given below with the music matching device integrated in the terminal, that is, with the terminal as the execution subject.
请参阅图2,图2是本申请实施例提供的音乐匹配方法的流程示意图。该音乐匹配方法可以包括:Please refer to Figure 2, which is a schematic flow chart of a music matching method provided by an embodiment of the present application. The music matching method may include:
S201、终端显示待匹配音乐的音乐匹配界面,音乐匹配界面内包括匹配控件。S201. The terminal displays a music matching interface for the music to be matched, and the music matching interface includes matching controls.
在实际应用中,终端上设置有客户端,该客户端可以是专用于音乐匹配的音乐匹配客户端,也可以是具有音乐匹配功能的其它客户端,如视频播放客户端、直播客户端、即时通信客户端等。终端接收到客户端的启动指令时,启动客户端并显示客户端的界面。在实际应用中,显示的可以是客户端的首页,也可以是客户端的音乐界面,或者也可以是客户端的其他界面。In actual applications, the terminal is equipped with a client, which can be a music matching client dedicated to music matching, or other clients with music matching functions, such as video playback clients, live broadcast clients, real-time Communication client, etc. When the terminal receives the client's startup instruction, it starts the client and displays the client's interface. In actual applications, what is displayed may be the homepage of the client, the music interface of the client, or other interfaces of the client.
当显示的不是客户端的音乐界面时,终端响应于目标对象对音乐页面的控件的触发操作,显示音乐界面。When what is displayed is not the music interface of the client, the terminal displays the music interface in response to the target object's triggering operation on the control of the music page.
其中,音乐界面可以包括至少一首音乐的音乐标识,终端响应于目标对象对音乐标识的第一选择操作,显示第一选择操作对应的第一音乐标识的音乐匹配界面,音乐匹配界面内包括匹配控件,第一音乐标识对应的第一音乐即为待匹配音乐。Wherein, the music interface may include a music identification of at least one piece of music. In response to the first selection operation of the music identification by the target object, the terminal displays a music matching interface of the first music identification corresponding to the first selection operation. The music matching interface includes matching control, the first music corresponding to the first music identification is the music to be matched.
比如,音乐界面可以如图3所示,则终端响应于目标对象对第一音乐标识的选择操作,显示第一音乐标识的音乐匹配界面。For example, the music interface may be as shown in Figure 3, and the terminal displays the music matching interface of the first music identification in response to the target object's selection operation on the first music identification.
在实际应用中,音乐界面还可以包括搜索控件,则终端可以响应于目标对象对搜索控件的输入操作,显示搜索结果界面,搜索结果界面包括输入操作对应的音乐结果的音乐标识。In practical applications, the music interface may also include a search control, and the terminal may display a search result interface in response to the target object's input operation on the search control. The search result interface includes a music identification of the music result corresponding to the input operation.
应理解,客户端可以以应用程序的形式存在,也可以以网页的形式存在,或者,也可以以小程序的形式存在。对于客户端的存在形式,用户可以根据实际情况进行选择,本实施例在此不做限定。It should be understood that the client can exist in the form of an application program, a web page, or a small program. As for the existence form of the client, the user can choose according to the actual situation, which is not limited in this embodiment.
需要说明的是,待匹配音乐的音乐匹配界面可以是音乐界面的子界面,即在音乐界面的某个区域内显示待匹配音乐的音乐匹配界面,比如,如图4所示。或者,音乐匹配界面也可以是单独的一个界面,则终端响应于目标对象对音乐标识的选择操作,跳转至单独的音乐匹配界面,本实施例在此不做限定。It should be noted that the music matching interface of the music to be matched can be a sub-interface of the music interface, that is, the music matching interface of the music to be matched is displayed in a certain area of the music interface, for example, as shown in Figure 4. Alternatively, the music matching interface can also be a separate interface, and the terminal jumps to a separate music matching interface in response to the target object's selection operation of the music logo. This embodiment is not limited here.
当音乐界面包括音乐标识时,则音乐标识对应的音乐为客户端中已经存在的音乐,即待匹配音乐为客户端中已经存在的音乐,也即是,客户端对应的服务器中已经存在了该待匹配音乐。When the music interface includes a music identifier, the music corresponding to the music identifier is the music that already exists in the client, that is, the music to be matched is the music that already exists in the client, that is, the music that corresponds to the client already exists in the server. Music to be matched.
在一些实施例中,待匹配音乐也可以是目标对象上传的提取音乐,此时,音乐界面还可以包括提取控件,终端响应于对提取控件的触发操作,显示音乐选择界面,音乐选择界面包括提取音乐或提取视频。In some embodiments, the music to be matched may also be extracted music uploaded by the target object. In this case, the music interface may also include an extraction control. The terminal displays a music selection interface in response to a triggering operation on the extraction control. The music selection interface includes an extraction control. music or extract videos.
终端响应于目标对象对提取音乐或提取视频的初始选择操作,将初始选择操作对应的第一提取音乐或第一提取视频上传至客户端对应的服务器中(如果初始选择操作对应的为视频,则终端可以先对第一提取视频中的音乐进行提取,得到第一提取音乐,再将第一提取音乐上传至客户端对应的服务器中),并在上传成功时,显示音乐提取界面,音乐提取界面包括了第一提取音乐的音乐匹配界面,即此时待匹配音乐的音乐匹配界面为音乐提取界面的子界面。In response to the target object's initial selection operation of extracting music or extracting video, the terminal uploads the first extraction music or the first extraction video corresponding to the initial selection operation to the server corresponding to the client (if the initial selection operation corresponds to a video, then The terminal can first extract the music in the first extracted video to obtain the first extracted music, and then upload the first extracted music to the server corresponding to the client), and when the upload is successful, display the music extraction interface. The music extraction interface It includes a music matching interface for first extracting music, that is, the music matching interface for music to be matched at this time is a sub-interface of the music extraction interface.
音乐提取界面还可以包括提取控件,以便终端可以继续响应于目标对象对提取控件的触发操作,显示音乐选择界面。比如,音乐提取界面可以如图5所示。The music extraction interface may also include an extraction control, so that the terminal can continue to display the music selection interface in response to the target object's triggering operation on the extraction control. For example, the music extraction interface can be shown in Figure 5.
其中,参照图6,图6是本申请实施例提供的第一提取音乐的上传过程的示意图,终端将第一提取音乐上传至客户端对应的服务器中的过程可以包括:Referring to Figure 6, Figure 6 is a schematic diagram of the uploading process of the first extracted music provided by the embodiment of the present application. The process of the terminal uploading the first extracted music to the server corresponding to the client may include:
步骤601:终端通过客户端发送第一提取音乐和权限包至上传中台;Step 601: The terminal sends the first extracted music and permission package to the upload center through the client;
步骤602:上传中台通过业务侧上传模块对权限包进行解包,得到客户端的权限信息;Step 602: The upload center unpacks the permission package through the business-side upload module to obtain the client's permission information;
步骤603:上传中台再通过业务侧上传模块将权限信息发送至登录中台;Step 603: Upload the middle platform and then send the permission information to the login middle platform through the business side upload module;
步骤604:登录中台基于权限信息对客户端的权限进行校验,并把校验结果返回至上传中台;Step 604: The login platform verifies the client's permissions based on the permission information, and returns the verification results to the upload platform;
步骤605:如果校验结果为成功,则上传中台通过业务侧上传模块生成第一提取音乐的文件标识,并发送第一提取音乐和文件标识至云数据库中进行存储;Step 605: If the verification result is successful, the upload center generates the file identifier of the first extracted music through the business side upload module, and sends the first extracted music and file identifier to the cloud database for storage;
步骤606:上传中台返回文件标识和第一提取音乐在云数据库中的存储地址至终端;Step 606: Upload the file identifier returned by the middle station and the storage address of the first extracted music in the cloud database to the terminal;
步骤607:终端播放第一提取音乐。Step 607: The terminal plays the first extracted music.
如果待匹配音乐的音乐匹配界面为音乐界面的子界面,或者,待匹配音乐的音乐匹配界面为音乐提取界面的子界面,则终端在音乐界面内或音乐提取界面内可以显示多个待匹配音乐的音乐匹配界面。If the music matching interface of the music to be matched is a sub-interface of the music interface, or the music matching interface of the music to be matched is a sub-interface of the music extraction interface, the terminal can display multiple music to be matched in the music interface or the music extraction interface music matching interface.
也即是,当终端在显示待匹配音乐的音乐匹配界面之后,由于音乐界面还包括音乐标识,因此,终端还可以响应于目标对象对音乐界面中音乐标识的第二选择操作,显示第二选择操作对应的第二音乐标识的音乐匹配界面,第二音乐标识对应的第二音乐也为待匹配音乐。音乐标识为音乐界面中,没有存在对应的音乐匹配界面的标识。That is to say, after the terminal displays the music matching interface of the music to be matched, since the music interface also includes a music identification, the terminal can also display the second selection in response to the target object's second selection operation on the music identification in the music interface. Operate the music matching interface of the corresponding second music identification, and the second music corresponding to the second music identification is also the music to be matched. The music identifier is an identifier in the music interface that does not have a corresponding music matching interface.
也即是,目标对象可以在音乐界面中选择多个音乐标识,每个音乐标识对应一首音乐,从而在音乐界面中显示多个音乐标识对应的音乐匹配界面。That is, the target object can select multiple music logos in the music interface, each music logo corresponding to a piece of music, so that the music matching interface corresponding to the multiple music logos is displayed in the music interface.
或者,由于音乐提取界面还包括提取控件,终端可以继续响应于目标对象对提取控件的触发操作,显示音乐选择界面,然后终端继续响应于目标对象对提取音乐或提取视频的目标选择操作,显示音乐提取界面,音乐提取界面包括第一提取音乐的音乐匹配界面和目标选择操作对应的第二提取音乐的音乐匹配界面。Alternatively, since the music extraction interface also includes an extraction control, the terminal can continue to display the music selection interface in response to the target object's triggering operation on the extraction control, and then the terminal can continue to display the music in response to the target object's target selection operation on extracting music or extracting video. The music extraction interface includes a first music matching interface for extracting music and a second music matching interface for extracting music corresponding to the target selection operation.
另外,第一音乐的音乐匹配界面还可以包括试听区域,在试听区域中可显示所试听音乐的播放进度条及 用于调整播放进度的调整控件,基于该试听区域,用户可进行试听音乐;终端在响应于对音乐标识进行选择的第二选择操作时,在实现对音乐进行选择的同时,在第一音乐的音乐匹配界面还可以不显示试听区域,但第一音乐的音乐匹配界面中还可以存在匹配控件。In addition, the music matching interface of the first music may also include a listening area, in which a playback progress bar and a playback progress bar of the music being auditioned may be displayed. The adjustment control is used to adjust the playback progress. Based on the audition area, the user can audition the music; when the terminal responds to the second selection operation of selecting the music identification, while selecting the music, the terminal selects the first music. The music matching interface may not display the audition area, but there may also be matching controls in the music matching interface of First Music.
或者,第一提取音乐的音乐匹配界面还可以包括试听区域,在试听区域中可显示所试听音乐的播放进度条及用于调整播放进度的调整控件,基于该试听区域,用户可进行试听音乐;终端在响应于对提取音乐或提取视频进行选择的目标选择操作时,在第一提取音乐的音乐匹配界面还可以不显示试听区域,但第一提取音乐的音乐匹配界面中还可以存在匹配控件。Alternatively, the first music matching interface for extracting music can also include a listening area, in which a playback progress bar of the music being listened to and an adjustment control for adjusting the playback progress can be displayed. Based on the listening area, the user can listen to the music; When the terminal responds to a target selection operation of extracting music or extracting videos, the audition area may not be displayed on the first music matching interface for extracting music, but there may also be a matching control in the first music matching interface for extracting music.
比如,以待匹配音乐的音乐匹配界面在音乐界面上为例进行说明。终端响应于目标对象对音乐标识的第一选择操作,在音乐界面上显示第一选择操作对应的第一音乐标识的音乐匹配界面,此时,音乐界面可以如图7中701所示。终端响应于目标对象对音乐标识的第二选择操作,显示第二选择操作对应的第二音乐标识的音乐匹配界面,并在第一音乐的音乐匹配界面不显示试听区域,此时,音乐匹配界面可以如图7中702所示。For example, take the music matching interface of the music to be matched on the music interface as an example for explanation. In response to the target object's first selection operation on the music identification, the terminal displays the music matching interface of the first music identification corresponding to the first selection operation on the music interface. At this time, the music interface may be as shown in 701 in Figure 7 . In response to the target object's second selection operation on the music identification, the terminal displays the music matching interface of the second music identification corresponding to the second selection operation, and does not display the audition area on the music matching interface of the first music. At this time, the music matching interface This can be shown as 702 in Figure 7 .
需要说明的是,终端可以显示更多的音乐对应的音乐匹配界面,其实现方式可以参照前述实施例,本实施例在此不再赘述。It should be noted that the terminal can display more music matching interfaces corresponding to music. The implementation method may refer to the foregoing embodiments, and this embodiment will not be described in detail here.
在另一些实施例中,音乐匹配界面内还可以包括拍摄控件。终端可以响应于目标对象对拍摄控件的第一触发操作,显示待匹配音乐的拍摄界面,以便终端根据待匹配音乐进行拍摄视频。In other embodiments, the music matching interface may also include shooting controls. The terminal may display a shooting interface of the music to be matched in response to the first triggering operation of the shooting control by the target object, so that the terminal can shoot the video according to the music to be matched.
在另一些实施例中,音乐匹配界面内还可以包括用于收藏音乐的收藏控件。终端可以响应于目标对象对收藏控件的第二触发操作,显示收藏页面,收藏页面包括待匹配音乐;如此,方便用户对所收藏的音乐的查找,提高音乐的查找效率。In other embodiments, the music matching interface may also include a collection control for collecting music. The terminal can display a collection page in response to the target object's second triggering operation on the collection control. The collection page includes the music to be matched. This facilitates the user's search for the collected music and improves the efficiency of music search.
其中,终端响应于目标对象对收藏控件的第二触发操作,显示收藏页面的过程可以为:终端可以响应于目标对象对收藏控件的第二触发操作,校验目标对象对应的目标账号的登录状态,若目标账号的登录状态为已登录状态,则显示收藏界面,收藏页面包括待匹配音乐,若目标账号的登录状态为未登录状态,则显示登录界面,登录页面包括登录控件,终端响应于目标对象对登录控件的确认操作,显示收藏界面;如此,仅在目标对象的目标账号处于登录状态时,执行对待匹配音乐的收藏,保证所收藏的音乐具有针对性,以及确保所收藏音乐的归属,使得目标对象可在自身目标账号下的收藏页面中,查看自身所收藏的音乐。Wherein, the process of the terminal displaying the collection page in response to the target object's second triggering operation on the collection control may be: the terminal may respond to the target object's second triggering operation on the collection control, verify the login status of the target account corresponding to the target object , if the login status of the target account is logged in, the collection interface is displayed, and the collection page includes the music to be matched. If the login status of the target account is not logged in, the login interface is displayed. The login page includes login controls, and the terminal responds to the target The object's confirmation operation on the login control displays the collection interface; in this way, the collection of matching music is only executed when the target account of the target object is logged in, ensuring that the collected music is targeted and the ownership of the collected music is ensured. This allows the target object to view the music he has collected on the collection page under his/her target account.
比如,音乐匹配界面可以如图8所示,音乐匹配界面包括播放控件、拍摄控件、收藏控件、匹配控件以及试听区域。应理解,终端可以是在接收到播放指令时,播放待匹配音乐,并在待匹配音乐的音乐匹配界面显示试听区域,当终端检测到待匹配音乐处于暂停状态时,在待匹配音乐的音乐匹配界面可以不显示试听区域。For example, the music matching interface can be shown in Figure 8. The music matching interface includes playback controls, shooting controls, collection controls, matching controls, and audition areas. It should be understood that the terminal can play the music to be matched when receiving the play instruction, and display the audition area on the music matching interface of the music to be matched. When the terminal detects that the music to be matched is in a paused state, the terminal can play the music to be matched in the music matching interface of the music to be matched. The interface does not need to display the listening area.
需要说明的是,如果音乐匹配界面是子界面,音乐匹配界面包括播放控件、拍摄控件、收藏控件、匹配控件以及试听区域,则当终端响应于第二选择操作时,第一音乐的音乐匹配界面可以包括播放控件、拍摄控件、收藏控件以及匹配控件。或者,当终端响应于目标选择操作时,第一提取音乐的音乐匹配界面还可以包括播放控件、拍摄控件、收藏控件以及匹配控件。It should be noted that if the music matching interface is a sub-interface and the music matching interface includes playback controls, shooting controls, collection controls, matching controls and audition areas, then when the terminal responds to the second selection operation, the music matching interface for the first music Can include playback controls, shooting controls, collection controls, and matching controls. Alternatively, when the terminal responds to the target selection operation, the first music matching interface for extracting music may also include a playback control, a shooting control, a collection control, and a matching control.
比如,当音乐匹配界面是音乐界面的子界面时,第一音乐的音乐匹配界面可以如图9所示。For example, when the music matching interface is a sub-interface of the music interface, the music matching interface of the first music can be as shown in Figure 9.
S202、响应于对匹配控件的触发操作,显示音视频界面,音视频界面包括待匹配音乐的目标音轨、以及与目标音轨匹配的至少一个目标视频。S202. In response to the triggering operation of the matching control, display the audio and video interface. The audio and video interface includes the target audio track of the music to be matched and at least one target video matching the target audio track.
终端在显示待匹配音乐的音乐匹配界面之后,目标对象可以触发匹配控件,使得终端响应于对匹配控件的触发操作,显示音视频界面,音视频界面包括了待匹配音乐的目标音轨、以及与目标音轨匹配的目标视频,其中,目标视频的数量为至少一个,在一些实施例中,该至少一个目标视频可以以目标视频集合的形式呈现。After the terminal displays the music matching interface of the music to be matched, the target object can trigger the matching control, so that the terminal displays an audio and video interface in response to the triggering operation of the matching control. The audio and video interface includes the target audio track of the music to be matched, and the audio and video interface. The target audio track matches the target video, wherein the number of the target video is at least one. In some embodiments, the at least one target video may be presented in the form of a target video set.
这里,目标对象触发匹配控件后,生成针对待匹配音乐的匹配指令,该匹配指令用于指示获取与该待匹配音乐相匹配的视频,终端响应于目标对象的触发操作,即响应于该匹配指令,对待匹配音乐进行音轨分离,得到目标音轨,并基于得到的目标音轨获取与该目标音轨相匹配的目标视频;在实际实施时,音轨分离及目标视频的获取操作可由终端或服务器实现;目标音轨的数量可以为一个或多个,在实际实施时,每个目标音轨可以对应待匹配音乐的一个音乐属性,比如,目标音轨可以为对应待匹配音乐的人声属性的目标人声音轨、对应待匹配音乐的鼓点属性的目标鼓点音轨、对应待匹配音乐的伴奏属性的目标伴奏音轨、对应待匹配音乐的贝斯属性的目标贝斯音轨,以及对应待匹配音乐的音效属性的目标音效音轨中的至少一条。Here, after the target object triggers the matching control, a matching instruction for the music to be matched is generated. The matching instruction is used to instruct to obtain a video that matches the music to be matched. The terminal responds to the triggering operation of the target object, that is, responds to the matching instruction. , separate the audio tracks of the music to be matched, obtain the target audio track, and obtain the target video matching the target audio track based on the obtained target audio track; in actual implementation, the audio track separation and target video acquisition operations can be performed by the terminal or Server implementation; the number of target audio tracks can be one or more. In actual implementation, each target audio track can correspond to a music attribute of the music to be matched. For example, the target audio track can be a vocal attribute corresponding to the music to be matched. The target vocal track, the target drum track corresponding to the drum beat attribute of the music to be matched, the target accompaniment track corresponding to the accompaniment attribute of the music to be matched, the target bass track corresponding to the bass attribute of the music to be matched, and the target bass track corresponding to the bass attribute of the music to be matched. At least one of the target sound effect tracks for the music's sound effect attribute.
在实际应用中,音视频界面可以包括第一显示区域和第二显示区域。终端响应于对匹配控件的触发操作,按照预设显示顺序,将待匹配音乐的目标音轨显示在第一显示区域,将与目标音轨匹配的目标视频显示在第二显示区域。In practical applications, the audio and video interface may include a first display area and a second display area. In response to the triggering operation of the matching control, the terminal displays the target audio track of the music to be matched in the first display area and displays the target video matching the target audio track in the second display area according to the preset display order.
比如,当目标音轨包括目标人声音轨、目标鼓点音轨、目标伴奏音轨以及目标贝斯音轨时,音视频界面可以如图10所示;在实际应用中,当目标音轨的数量为多个时,目标音轨的显示顺序可以与目标音轨所对应音乐属性的重要程度相对应,而音乐属性的重要程度可以由用户基于自身需求所设定。For example, when the target audio track includes the target vocal track, the target drum track, the target accompaniment track, and the target bass track, the audio and video interface can be as shown in Figure 10; in actual applications, when the number of target audio tracks When there are multiple target audio tracks, the display order of the target audio tracks can correspond to the importance of the music attributes corresponding to the target audio tracks, and the importance of the music attributes can be set by the user based on their own needs.
也即是,将待匹配音乐的目标人声数据进行音高分离(氛围120个pitch),得到各个音高数据,即将目标人声音轨对应的目标人声数据进行分离,然后对音高数据进行归一化,使得在音视频界面显示为24层音高的 音阶图,该音阶图即为目标人声音轨,从而实现待匹配音乐随着人声音高或音低的音调变化进行变化的效果。That is, perform pitch separation on the target vocal data of the music to be matched (ambience 120 pitches) to obtain each pitch data, that is, separate the target vocal data corresponding to the target vocal track, and then compare the pitch data Normalize it so that it is displayed as 24-layer pitch on the audio and video interface. The musical scale map is the target vocal track, thereby achieving the effect of the music to be matched changing as the pitch of the human voice changes in pitch or pitch.
目标鼓点音轨对应的目标鼓点音轨数据包括重鼓类型的目标鼓点音轨数据和轻鼓类型的目标鼓点音轨数据,在一些实施例中,终端在音视频界面显示待匹配音乐的目标鼓点音轨时,可在目标鼓点音轨中区别显示重鼓类型的目标鼓点音轨数据和轻鼓类型的目标鼓点音轨数据,即区别显示重鼓类型的鼓点和轻鼓类型的鼓点,例如,可以将重鼓类型的目标鼓点音轨数据对应的鼓点采用一种图形(例如蓝色大圆)绘制,轻鼓类型的目标鼓点音轨数据对应的鼓点采用另一种图形(例如绿色小圆)绘制,根据目标鼓点音轨数据出现的时间顺序,将各个目标鼓点音轨数据对应的鼓点绘制在目标鼓点音轨上。并且,终端绘制鼓点的时候可以采用CALayer技术。CALayer技术相较于UIView技术,可以提高渲染性能。The target drum track data corresponding to the target drum track includes target drum track data of heavy drum type and target drum track data of light drum type. In some embodiments, the terminal displays the target drum beat of the music to be matched on the audio and video interface. When playing a track, the target drum track data of the heavy drum type and the target drum track data of the light drum type can be displayed differently in the target drum track, that is, the drum beats of the heavy drum type and the drum beats of the light drum type can be displayed differently, for example, The drum beats corresponding to the target drum track data of the heavy drum type can be drawn using one graphic (such as a big blue circle), and the drum beats corresponding to the target drum track data of the light drum type can be drawn using another graphic (such as a small green circle). , according to the time sequence in which the target drum track data appears, the drum beats corresponding to each target drum track data are drawn on the target drum track. Moreover, the terminal can use CALayer technology when drawing drum beats. Compared with UIView technology, CALayer technology can improve rendering performance.
另外,终端可以将播放进度条到达的鼓点(也即进度条中当前播放位置处所对应的鼓点)进行动态放大显示,以便目标对象可以更加清晰地了解到播放进度条到达的鼓点的节奏。In addition, the terminal can dynamically enlarge and display the drum beat reached by the playback progress bar (that is, the drum beat corresponding to the current playback position in the progress bar), so that the target object can more clearly understand the rhythm of the drum beat reached by the playback progress bar.
在一些实施例中,终端在音视频界面显示待匹配音乐的目标伴奏音轨时,可以在目标伴奏音轨中显示待匹配音乐的伴奏的音高,将待匹配音乐的目标伴奏数据的音高绘制在目标伴奏音轨上,方便目标对象从视觉上了解到待匹配音乐在伴奏上的起伏。In some embodiments, when the terminal displays the target accompaniment track of the music to be matched on the audio and video interface, the pitch of the accompaniment of the music to be matched can be displayed in the target accompaniment track, and the pitch of the target accompaniment data of the music to be matched can be displayed. Drawn on the target accompaniment track, it is convenient for the target object to visually understand the ups and downs of the accompaniment of the music to be matched.
因为贝斯为低频音频,目标对象较难感受到贝斯,所以,本实施例将待匹配音乐的目标贝斯数据的有无进行绘制,实现待匹配音乐的贝斯数据的可视化,从而方便目标对象更加了解待匹配音乐的组成。Because bass is low-frequency audio, it is difficult for the target object to feel the bass. Therefore, this embodiment draws the presence or absence of the target bass data of the music to be matched, and realizes the visualization of the bass data of the music to be matched, thereby making it easier for the target object to better understand the bass data of the music to be matched. Match the composition of the music.
在音视频界面显示待匹配音乐的目标音轨,不但可以更加准确地展示待匹配音乐的信息,而且可以使得目标对象在听到待匹配音乐的同时可以看到待匹配音乐,方便目标对象理解待匹配音乐,使得不是专业的目标对象也可以较好地了解待匹配音乐。Displaying the target track of the music to be matched on the audio and video interface can not only display the information of the music to be matched more accurately, but also allow the target object to see the music to be matched while hearing the music to be matched, making it easier for the target object to understand the music to be matched. Matching music allows non-professional target audiences to better understand the music to be matched.
在一些实施例中,终端在音视频界面显示至少一个目标视频之后,目标对象可以选中至少一个目标视频中的一个,例如,当目标视频的数量为多个,多个目标视频构成目标视频合集时,目标对象可以选中目标视频集合中的目标视频,终端响应于目标对象的选中操作,将目标视频集合中选中操作对应的目标视频进行播放。In some embodiments, after the terminal displays at least one target video on the audio and video interface, the target object can select one of the at least one target video. For example, when there are multiple target videos and the multiple target videos constitute a target video collection. , the target object can select the target video in the target video collection, and the terminal responds to the target object's selection operation and plays the target video corresponding to the selection operation in the target video collection.
在实际应用中,终端可以将选中操作对应的目标视频以放大的动效进行播放,或者,第二显示区域包括第一子显示区域和第二子显示区域,然后将选中操作对应的目标视频在第二子显示区域进行播放,此时,将与目标音轨匹配的目标视频显示在第二显示区域,包括:In actual applications, the terminal can play the target video corresponding to the selected operation with an enlarged animation effect, or the second display area includes the first sub-display area and the second sub-display area, and then the target video corresponding to the selected operation is played in The second sub-display area is played. At this time, the target video matching the target audio track is displayed in the second display area, including:
将与目标音轨匹配的目标视频显示在第一子显示区域;将播放视频显示在第二子显示区域,播放视频为第一子显示区域中处于选中状态的目标视频。在实际应用中,第一子显示区域中可显示有多个目标视频,多个目标视频中一个处于选中状态,该处于选中状态的目标视频在第二子显示区域中进行播放,当用户切换处于选中状态的目标视频时,相应的,第二子显示区域中播放的目标视频也同步进行切换,如此,用户可通过切换第一子显示区域中选中状态的目标视频,实现在第二子显示区域中浏览各个目标视频的内容。The target video matching the target audio track is displayed in the first sub-display area; the playback video is displayed in the second sub-display area, and the playback video is the selected target video in the first sub-display area. In practical applications, multiple target videos can be displayed in the first sub-display area. One of the multiple target videos is selected. The selected target video is played in the second sub-display area. When the user switches to When the target video in the selected state is selected, the target video played in the second sub-display area is also switched synchronously. In this way, the user can switch the selected target video in the first sub-display area to achieve playback in the second sub-display area. Browse the content of each target video.
处于选择状态的目标视频即为选中操作对应的目标视频。The target video in the selected state is the target video corresponding to the selected operation.
比如,音视频界面可以如图11所示,此时,目标视频1为播放视频,则终端将目标视频1显示在第二子显示区域。For example, the audio and video interface can be as shown in Figure 11. At this time, the target video 1 is a playback video, and the terminal displays the target video 1 in the second sub-display area.
需要说明的是,图10和图11只是音视频界面的一种示例,在实际应用的过程中,音视频界面还可以是其他形式。It should be noted that Figure 10 and Figure 11 are only examples of the audio and video interface. In the process of actual application, the audio and video interface can also be in other forms.
如果目标视频包括多个,则将与目标音轨匹配的目标视频集合显示在第一子显示区域,包括:If the target video includes multiple target videos, a set of target videos matching the target audio track will be displayed in the first sub-display area, including:
获取与目标音轨匹配的目标视频集合中各目标视频的播放量;Obtain the playback volume of each target video in the target video collection that matches the target audio track;
按照播放量,将目标视频集合中的目标视频按序显示在第一子显示区域。According to the play volume, the target videos in the target video collection are displayed in the first sub-display area in order.
其中,可以按照目标视频的播放量从大到小的顺序,将目标视频在第二显示区域进行显示。Wherein, the target videos may be displayed in the second display area in order from large to small playback volume of the target videos.
或者,也可以获取目标视频的发布时间,然后按照目标视频的发布时间的顺序,将目标视频在第二显示区域进行显示。Alternatively, you can also obtain the release time of the target video, and then display the target video in the second display area in the order of the release time of the target video.
并且,如果第二显示区域可以显示的目标视频的预设数量少于目标音轨匹配的目标视频的数量,则终端可以先在第二显示区域显示预设数量的目标视频,然后响应于目标对象的滑动操作,将还未显示的目标视频显示在第二显示区域。And, if the preset number of target videos that can be displayed in the second display area is less than the number of target videos matching the target audio track, the terminal can first display the preset number of target videos in the second display area, and then respond to the target object The sliding operation displays the target video that has not yet been displayed in the second display area.
在实际应用中,音视频界面还可以包括目标音轨的调整控件。在响应于对匹配控件的触发操作,显示音视频界面之后,还包括:In practical applications, the audio and video interface can also include adjustment controls for the target audio track. After the audio and video interface is displayed in response to the triggering operation on the matching control, it also includes:
响应于对调整控件的触发操作,获取调整控件对应的调整目标音轨的音频文件的当前播放音量;In response to the triggering operation on the adjustment control, obtain the current playback volume of the audio file of the adjustment target track corresponding to the adjustment control;
当当前播放音量超过静音音量时,将当前播放音量调整为静音音量,并对调整目标音轨添加蒙层,以在音视频界面隐藏调整目标音轨,得到调整后音乐。When the current playback volume exceeds the mute volume, adjust the current playback volume to the mute volume, and add a mask layer to the adjustment target audio track to hide the adjustment target audio track in the audio and video interface and obtain the adjusted music.
在对待匹配音乐进行音轨分离,得到各个目标音轨之后,每个目标音轨的数据相当于一个单独的m4a格式的音频文件,终端可以响应于对调整控件的触发操作,实现对目标音轨的音频文件的播放和停止播放。After the tracks of the music to be matched are separated and each target track is obtained, the data of each target track is equivalent to a separate audio file in the m4a format. The terminal can respond to the triggering operation of the adjustment control to realize the target track. Play and stop playing audio files.
所以,当终端响应于对调整控件的触发操作,获取调整控件对应的调整目标音轨的音频文件的当前播放音量,并将当前播放音量作为历史播放音量进行存储,在当前播放音量超过静音音量时,将当前播放音量调整为静音音量,得到调整后音乐,并对调整目标音轨添加蒙层,以在音视频界面隐藏调整目标音轨。 Therefore, when the terminal responds to the triggering operation of the adjustment control, it obtains the current playback volume of the audio file of the adjustment target track corresponding to the adjustment control, and stores the current playback volume as the historical playback volume. When the current playback volume exceeds the mute volume , adjust the current playback volume to the mute volume, obtain the adjusted music, and add a mask layer to the adjustment target audio track to hide the adjustment target audio track in the audio and video interface.
在当前播放音量没有超过静音音量时,将调整目标音轨对应的音频文件的播放音量调整为历史播放音量,并去除调整目标音轨上的蒙层,以在音视频界面显示调整目标音轨。When the current playback volume does not exceed the mute volume, adjust the playback volume of the audio file corresponding to the adjustment target audio track to the historical playback volume, and remove the mask layer on the adjustment target audio track to display the adjustment target audio track on the audio and video interface.
即终端在当前播放音量超过静音音量时,将当前播放音量调整为静音音量,得到调整后音乐,并对调整目标音轨添加蒙层。在音视频界面隐藏调整目标音轨之后,还可以响应于针对调整控件的触发操作,去除调整目标音轨上的蒙层,以在音视频界面显示调整目标音轨,将调整目标音轨对应的音频文件的播放音量调整为当前播放音量,从而实现对调整目标音轨的播放音量恢复处理以及可视化恢复处理。That is, when the current playback volume exceeds the mute volume, the terminal adjusts the current playback volume to the mute volume, obtains the adjusted music, and adds a mask layer to the adjustment target audio track. After hiding the adjustment target audio track in the audio and video interface, you can also remove the mask layer on the adjustment target audio track in response to the triggering operation of the adjustment control, so that the adjustment target audio track is displayed on the audio and video interface, and the adjustment target audio track corresponding to The playback volume of the audio file is adjusted to the current playback volume, thereby realizing the playback volume recovery processing and visual recovery processing of the adjustment target audio track.
其中,静音音量可以为0,也可以为其他音量阈值,用户可以根据实际情况进行设置,本实施例在此不做限定。The mute volume can be 0 or other volume thresholds. The user can set it according to the actual situation, which is not limited in this embodiment.
调整控件可以为目标音轨的标识,或者,调整控件也可以为另外设置的控件。每个目标音轨存在一个对应的调整控件,使得终端可以响应于对调整控件的触发操作,实现对触发操作对应的单个目标音轨的静音。并且,当终端对该目标音轨的当前播放音量调整为静音音量时,终端可以隐藏该目标音轨,其他目标音轨仍然正常显示,其他目标音轨的音频文件仍可以正常播放。The adjustment control can be an identification of the target audio track, or the adjustment control can also be an additionally set control. Each target audio track has a corresponding adjustment control, so that the terminal can respond to a trigger operation on the adjustment control and mute the single target audio track corresponding to the trigger operation. Moreover, when the terminal adjusts the current playback volume of the target audio track to a mute volume, the terminal can hide the target audio track, other target audio tracks can still be displayed normally, and the audio files of other target audio tracks can still be played normally.
另外,终端可以将多个目标音轨的当前播放量调整为静音音量,使得最终只播放一条目标音轨的音频文件,从而使得目标对象可以更好地了解待匹配音乐中单个目标音轨的声音的效果,进而帮助目标对象更好地分层理解待匹配音乐。In addition, the terminal can adjust the current playback volume of multiple target audio tracks to a mute volume, so that only the audio file of one target audio track is ultimately played, so that the target object can better understand the sound of a single target audio track in the music to be matched. effect, thereby helping the target object to better understand the music to be matched in layers.
在一些实施例中,在当当前播放音量超过静音音量时,将当前播放音量调整为静音音量,并对调整目标音轨添加蒙层,以在音视频界面隐藏调整目标音轨,得到调整后音乐之后,还包括:In some embodiments, when the current playback volume exceeds the mute volume, the current playback volume is adjusted to the mute volume, and a mask layer is added to the adjustment target audio track to hide the adjustment target audio track in the audio and video interface to obtain the adjusted music After that, it also includes:
基于调整后音乐,对目标视频集合中的目标视频进行更新,得到更新后视频集合;Based on the adjusted music, update the target videos in the target video collection to obtain the updated video collection;
在音视频界面显示更新后视频集合。Display the updated video collection on the audio and video interface.
因为在对调整目标音轨添加蒙层之后得到的调整后音乐对应的音轨与待匹配音乐的目标音轨不相同,则与调整后音乐的音轨匹配的视频也将发生变化,所以,在得到调整后音乐之后,终端还可以基于调整后音乐,对目标视频集合中的目标视频进行更新,得到更新后视频集合,然后在音视频界面显示更新后视频集合,使得在音视频界面显示的音乐与视频保持匹配。Because the audio track corresponding to the adjusted music obtained after adding a mask layer to the adjusted target audio track is different from the target audio track of the music to be matched, the video matching the audio track of the adjusted music will also change, so in After obtaining the adjusted music, the terminal can also update the target video in the target video collection based on the adjusted music, obtain the updated video collection, and then display the updated video collection on the audio and video interface, so that the music displayed on the audio and video interface Keep it up to date with the video.
其中,基于调整后音乐,对目标视频集合中的目标视频进行更新,得到更新后视频集合,包括:若调整目标音轨为预设目标音轨,根据调整后音乐的音轨,确定调整后音乐对应的目标模式串;根据目标模式串,对目标视频集合中的目标视频进行更新,得到更新后视频集合。Among them, based on the adjusted music, the target video in the target video collection is updated to obtain the updated video collection, including: if the adjusted target audio track is a preset target audio track, the adjusted music is determined according to the audio track of the adjusted music The corresponding target pattern string; according to the target pattern string, update the target videos in the target video set to obtain the updated video set.
预设目标音轨指用于进行视频匹配的目标音轨。比如,将与待匹配音乐的目标鼓点音轨匹配的初始音乐对应的待匹配视频,作为目标视频,则目标鼓点音轨为预设目标音轨。The default target audio track refers to the target audio track used for video matching. For example, if the video to be matched corresponding to the initial music that matches the target drum track of the music to be matched is used as the target video, then the target drum track is the preset target track.
如果调整目标音轨为用于进行视频匹配的目标音轨,调整后音乐对应的音轨少了调整目标音轨,则根据调整后音乐的音轨进行匹配得到的视频和目标视频集合中目标视频不相同,所以,对目标视频集合进行更新。If the adjusted target audio track is the target audio track used for video matching, and the audio track corresponding to the adjusted music is missing the adjusted target audio track, the video obtained by matching based on the adjusted music audio track will be the target video in the target video set. are not the same, so the target video collection is updated.
若调整目标音轨不是预设目标音轨,则无需对目标视频集合中目标视频进行更新。If the adjusted target audio track is not the default target audio track, there is no need to update the target video in the target video collection.
比如,目标音轨分别为待匹配音乐的目标鼓点音轨、目标人声音轨以及目标贝斯音轨,调整目标音轨为目标人声音轨,即调整后音乐不包括目标人声音轨,目标鼓点音轨和目标贝斯音轨为用于进行视频匹配的目标音轨,即将与目标鼓点音轨匹配且与目标贝斯音轨匹配的初始音乐对应的待匹配视频,作为目标视频。由于调整后音乐仍然包括目标鼓点音轨和目标贝斯音轨,且目标鼓点音轨和目标贝斯音轨为用于进行视频匹配的目标音轨,因此,即使根据目标鼓点音轨和目标贝斯音轨再次进行匹配,得到的视频集合与目标视频集合相同,因此,无需对目标视频集合进行更新。For example, the target audio tracks are the target drum track, the target vocal track and the target bass track of the music to be matched, and the target audio track is adjusted to the target vocal track, that is, the adjusted music does not include the target vocal track. The target drum track and the target bass track are target audio tracks used for video matching, that is, the video to be matched corresponding to the initial music that matches the target drum track and matches the target bass track is used as the target video. Since the adjusted music still includes the target drum track and the target bass track, and the target drum track and the target bass track are the target tracks used for video matching, even if the target drum track and the target bass track are used for video matching, Matching is performed again, and the obtained video set is the same as the target video set. Therefore, there is no need to update the target video set.
根据调整后音乐的音轨,确定调整后音乐对应的目标模式串的过程可以参照确定待匹配音乐的模式串的过程,根据目标模式串,得到更新后视频集合的过程可以参见确定目标视频集合的过程,本实施例在此不再赘述。According to the track of the adjusted music, the process of determining the target pattern string corresponding to the adjusted music can be referred to the process of determining the pattern string of the music to be matched. According to the target pattern string, the process of obtaining the updated video collection can be referred to the process of determining the target video collection. The process will not be described again in this embodiment.
因为在对调整目标音轨添加蒙层之后得到的调整后音乐对应的音轨与待匹配音乐的目标音轨不相同,则与调整后音乐的音轨匹配的视频也将发生变化,所以,在得到调整后音乐之后,若调整目标音轨为预设目标音轨,终端还可以对目标视频集合中的目标视频进行更新,得到更新后视频集合,然后在音视频界面显示更新后视频集合,使得在音视频界面显示的音乐与视频保持匹配。Because the audio track corresponding to the adjusted music obtained after adding a mask layer to the adjusted target audio track is different from the target audio track of the music to be matched, the video matching the audio track of the adjusted music will also change, so in After obtaining the adjusted music, if the target audio track is adjusted to the preset target audio track, the terminal can also update the target video in the target video collection to obtain the updated video collection, and then display the updated video collection on the audio and video interface, so that The music displayed on the audio and video interface remains consistent with the video.
在一些实施例中,响应于对匹配控件的触发操作,显示音视频界面的过程可以为:In some embodiments, in response to a triggering operation on the matching control, the process of displaying the audio and video interface may be:
响应于对匹配控件的触发操作,对待匹配音乐进行音轨分离,得到待匹配音乐对应的目标音轨数据;In response to the triggering operation of the matching control, track separation is performed on the music to be matched, and the target track data corresponding to the music to be matched is obtained;
对目标音轨数据进行格式化,得到目标音轨数据对应的模式串;Format the target audio track data and obtain the pattern string corresponding to the target audio track data;
根据模式串,确定与目标音轨匹配的目标视频,目标音轨为目标音轨数据对应的音轨;According to the pattern string, determine the target video that matches the target audio track, and the target audio track is the audio track corresponding to the target audio track data;
显示音视频界面。Display the audio and video interface.
参照图12,图12是本申请实施例提供的对待匹配音乐进行音轨分离的过程的示意图,对待匹配音乐进行音轨分离,得到待匹配音乐对应的目标音轨的过程可以包括:Referring to Figure 12, Figure 12 is a schematic diagram of the process of track separation of music to be matched provided by an embodiment of the present application. The process of track separation of music to be matched and obtaining the target track corresponding to the music to be matched may include:
步骤1,终端响应于对匹配控件的触发操作,将待匹配音乐的文件标识以及目标对象的目标账号发送至匹配服务器。Step 1: In response to the triggering operation of the matching control, the terminal sends the file identification of the music to be matched and the target account of the target object to the matching server.
步骤2,匹配服务器校验目标账号的登录状态。 Step 2: The matching server verifies the login status of the target account.
步骤3,若目标账号的登录状态为已登录状态和云数据库中存在文件标识,则匹配服务器从缓存中查找该文件标识的音轨分离流水.Step 3. If the login status of the target account is logged in and the file identifier exists in the cloud database, the matching server searches for the audio track separation pipeline of the file identifier from the cache.
步骤4,若该文件标识还未匹配过视频,则匹配服务器创建该文件标识的音轨分离流水,然后将音轨分离流水存储在缓存中。Step 4: If the file identifier has not been matched to the video, the matching server creates the audio track separation pipeline for the file identifier, and then stores the audio track separation pipeline in the cache.
步骤5,匹配服务器将文件标识发送至音频服务器。Step 5: The matching server sends the file identification to the audio server.
步骤6,音频服务器创建文件标识对应的音轨分离任务,并运行该音轨分离任务对文件标识对应的待匹配音乐进行音轨分离,同时,将音轨分离任务的标识返回至匹配服务器。Step 6: The audio server creates an audio track separation task corresponding to the file identification, and runs the audio track separation task to separate the audio tracks of the music to be matched corresponding to the file identification. At the same time, the identification of the audio track separation task is returned to the matching server.
步骤7,匹配服务器将音轨分离任务的标识存储在缓存中。Step 7. The matching server stores the identifier of the track separation task in the cache.
步骤8,当音频服务器对待匹配音乐的音轨分离完成时,音频服务器再将目标音轨的目标音轨数据发送至匹配服务器和云数据库。Step 8: When the audio server completes the separation of the audio tracks of the music to be matched, the audio server then sends the target audio track data of the target audio track to the matching server and the cloud database.
步骤9,匹配服务器再将目标音轨的目标音轨数据发送至终端。Step 9: The matching server then sends the target audio track data of the target audio track to the terminal.
步骤10,终端根据目标音轨数据绘制目标音轨。Step 10: The terminal draws the target audio track based on the target audio track data.
并且,音频服务器对待匹配音乐进行音轨分离过程中包括:Moreover, the audio server's process of separating tracks of the matching music includes:
步骤61,对每个步骤均创建一个对应的步骤子流水,即当运行到该步骤时,创建该步骤对应的步骤子流水。Step 61: Create a corresponding step sub-flow for each step, that is, when the step is run, a step sub-flow corresponding to the step is created.
步骤62,将步骤子流水发送至匹配服务器中。Step 62: Send the step sub-stream to the matching server.
步骤63,匹配服务器再将步骤子流水和音轨分离流水发送至虫洞。Step 63: The matching server then sends the step sub-pipeline and the audio track separation pipeline to the wormhole.
终端响应于对匹配控件的触发操作,将待匹配音乐的文件标识发送至流水服务器,以便流水服务器创建文件标识对应的流水任务。然后执行步骤64,流水服务器运行流水任务,并向虫洞(虫洞指连接流水服务器和匹配服务器的通道)发送流水获取请求,步骤65,虫洞再基于流水获取请求将音轨分离流水和步骤子流水发送至流水服务器,流水服务器再将音轨分离流水和步骤子流水发送至流水数据库中,并在待匹配音乐的匹配完成时,结束流水任务。In response to the triggering operation of the matching control, the terminal sends the file identification of the music to be matched to the pipeline server, so that the pipeline server can create a pipeline task corresponding to the file identification. Then perform step 64. The pipeline server runs the pipeline task and sends a pipeline acquisition request to the wormhole (wormhole refers to the channel connecting the pipeline server and the matching server). Step 65. The wormhole separates the audio track based on the pipeline acquisition request. Pipeline and steps The sub-pipeline is sent to the pipeline server, and the pipeline server then sends the track separation pipeline and step sub-pipeline to the pipeline database, and ends the pipeline task when the matching of the music to be matched is completed.
其中,可以通过已训练的神经网络模型或独立成分分析算法对待匹配音乐进行音轨分离。因为声源的振动产生的并不是单一频率的声波,而是由基音和不同频率的泛音组成的复合声音。比如,如图13所示,图13展示了不同乐器的波形。通过图14也可以看到,声音的波形是由不同的波形组成而成的。Among them, the track separation of the music to be matched can be performed through a trained neural network model or an independent component analysis algorithm. Because the vibration of the sound source does not produce sound waves of a single frequency, but a composite sound composed of a fundamental tone and overtones of different frequencies. For example, as shown in Figure 13, Figure 13 shows the waveforms of different musical instruments. It can also be seen from Figure 14 that the sound waveform is composed of different waveforms.
所以,可以对待匹配音乐进行音轨分离,从而得到各个目标音轨的波形,然后根据各个波形的振幅和频率确定各个目标音轨的目标音轨数据。并且,在进行音轨分离时,可以先将待匹配音乐进行傅里叶变换,得到待匹配音乐在频域的矩阵,然后再对矩阵进行分割,得到各个目标音轨的子矩阵,目标音轨的子矩阵也即为目标音轨的波形。Therefore, the tracks of the music to be matched can be separated to obtain the waveforms of each target track, and then the target track data of each target track is determined based on the amplitude and frequency of each waveform. Moreover, when performing audio track separation, you can first perform Fourier transform on the music to be matched to obtain the matrix of the music to be matched in the frequency domain, and then divide the matrix to obtain the sub-matrix of each target audio track. The target audio track The submatrix is also the waveform of the target audio track.
若匹配服务器从缓存中查找到该文件标识的音轨分离流水,则从云数据库中获取该文件标识的目标音轨的目标音轨数据,并将目标音轨的目标音轨数据返回至终端(参照图15)。If the matching server finds the audio track separation pipeline identified by the file from the cache, it obtains the target audio track data of the target audio track identified by the file from the cloud database, and returns the target audio track data of the target audio track to the terminal ( Refer to Figure 15).
图15是本申请实施例提供的另一种对待匹配音乐进行音轨分离的过程的示意图,参见图15,对待匹配音乐进行音轨分离的过程包括:Figure 15 is a schematic diagram of another process of track separation of music to be matched provided by an embodiment of the present application. Referring to Figure 15, the process of track separation of music to be matched includes:
步骤151:终端响应于对匹配控件的触发操作,发送待匹配音乐的文件标识以及目标对象的目标账号。Step 151: In response to the triggering operation of the matching control, the terminal sends the file identification of the music to be matched and the target account of the target object.
步骤152:匹配服务器校验目标账号的登录状态。Step 152: The matching server verifies the login status of the target account.
步骤153:若目标账号的登录状态为已登录状态和云数据库中存在文件标识,则匹配服务器从缓存中查找该文件标识的音轨分离流水。Step 153: If the login status of the target account is logged in and the file identifier exists in the cloud database, the matching server searches for the audio track separation pipeline of the file identifier from the cache.
步骤154:若缓存中存在该文件标识的音轨分离流水,匹配服务器发送文件匹配标识。Step 154: If the audio track separation pipeline with the file identification exists in the cache, the matching server sends the file matching identification.
步骤155:云数据库返回文件标识的目标音轨数据至匹配服务器。Step 155: The cloud database returns the target audio track data identified by the file to the matching server.
步骤156:匹配服务器返回文件标识的目标音轨数据至终端。Step 156: The matching server returns the target audio track data of the file identification to the terminal.
步骤157:终端根据目标音轨数据绘制目标音轨。Step 157: The terminal draws the target audio track according to the target audio track data.
对待匹配音乐进行音轨分离过程中的每个步骤均创建一个对应的步骤子流水,使得当对待匹配音乐进行音轨进行分离的过程出现问题时,可以快速地确定出现问题的步骤,无需从头对待匹配音乐进行音轨分离。Each step in the process of separating the tracks of the matched music is created with a corresponding step sub-flow, so that when a problem occurs in the process of separating the tracks of the matched music, the problematic step can be quickly determined without starting from scratch. Match music for track separation.
目标音轨对应的目标音轨数据的形式是json列表形式,比如,当目标音轨为目标鼓点音轨时,目标鼓点音轨数据可以如图16(其中,SlowRhythm表示重鼓类型,PuckingDrum表示轻鼓类型)所示。为了加快匹配的速度,终端可以对目标音轨对应的目标音轨数据进行格式化,从而得到目标音轨对应的模式串,然后根据模式串确定与目标音轨匹配的目标视频。The target audio track data corresponding to the target audio track is in the form of a json list. For example, when the target audio track is the target drum track, the target drum track data can be as shown in Figure 16 (where SlowRhythm represents the heavy drum type, and PuckingDrum represents the light drum type. drum type). In order to speed up the matching, the terminal can format the target audio track data corresponding to the target audio track to obtain the pattern string corresponding to the target audio track, and then determine the target video matching the target audio track based on the pattern string.
其中,根据模式串,确定与目标音轨匹配的目标视频,包括:Among them, according to the pattern string, the target video matching the target audio track is determined, including:
获取待匹配视频,并获取各个待匹配视频中初始音乐的主串;Obtain the video to be matched and obtain the main string of the initial music in each video to be matched;
筛选出与模式串匹配的主串对应的初始音乐,得到目标音乐;Filter out the initial music corresponding to the main string matching the pattern string to obtain the target music;
将与目标音乐对应的待匹配视频,作为与目标音轨匹配的目标视频,当与目标音轨匹配的目标视频的数量为多个时,多个目标视频构建得到目标视频集合。The video to be matched corresponding to the target music is used as the target video matching the target audio track. When the number of target videos matching the target audio track is multiple, multiple target videos are constructed to obtain a target video set.
在本实施例中,可以先将待匹配视频中初始音乐进行音轨分离,得到各个初始音轨的初始音轨数据,然后将各个初始音轨数据进行格式化,得到初始音轨对应的主串,以便在得到模式串之后,终端可以将模式串 和主串进行匹配,然后将与模式串匹配的主串对应的初始音乐作为目标音乐。最后,终端将包含目标音乐的待匹配视频,作为与目标音轨匹配的目标视频。In this embodiment, the initial music in the video to be matched can be separated into tracks first to obtain the initial track data of each initial track, and then each initial track data can be formatted to obtain the main string corresponding to the initial track. , so that after getting the pattern string, the terminal can convert the pattern string to Match with the main string, and then use the initial music corresponding to the main string matching the pattern string as the target music. Finally, the terminal uses the video to be matched containing the target music as the target video that matches the target audio track.
需要说明的是,当待匹配音乐包括多条目标音轨时,如果将模式串与主串进行匹配,则将同种类型音轨的模式串与主串进行匹配。比如,当目标音轨为对应待匹配音乐的鼓点属性的鼓点音轨时,则初始音轨也为鼓点音轨,然后将待匹配音乐的鼓点音轨的模式串与初始音乐的鼓点音轨的主串进行匹配。It should be noted that when the music to be matched includes multiple target audio tracks, if the pattern string is matched with the main string, the pattern string of the same type of audio track is matched with the main string. For example, when the target track is a drum track corresponding to the drum beat attribute of the music to be matched, the initial track is also a drum track, and then the pattern string of the drum track of the music to be matched is combined with the pattern string of the drum track of the initial music. Main string to match.
又比如,当目标音轨为对应待匹配音乐的人声属性的人声音轨时,初始音轨也为人声音轨,然后将待匹配音乐的目标人声音轨的模式串与初始音乐的人声音轨的主串进行匹配。For another example, when the target audio track is a vocal track corresponding to the vocal attribute of the music to be matched, the initial audio track is also a vocal track, and then the pattern string of the target vocal track of the music to be matched is matched with the pattern string of the initial music. The main string of the vocal track is matched.
如果待匹配音乐包括多条目标音轨,可以将各个目标音轨的模式串分别与各个初始音轨的主串进行匹配,也可以是将其中一个目标音轨的模式串和其中一个初始音轨的主串进行匹配,也可以是将各个目标音轨的模式串进行融合之后,得到融合模式串,各个初始音轨的主串进行融合之后,得到融合主串,然后将融合模式串和融合主串进行匹配,本实施例在此不做限定。If the music to be matched includes multiple target audio tracks, the pattern string of each target audio track can be matched with the main string of each initial audio track, or the pattern string of one of the target audio tracks can be matched with one of the initial audio tracks. The main strings of each target audio track can be matched, or the fusion pattern string can be obtained after fusing the pattern strings of each target audio track. After fusing the main strings of each initial audio track, the fusion main string can be obtained, and then the fusion pattern string and the fusion main string can be obtained. Strings are matched, which is not limited in this embodiment.
当将其中一个目标音轨的模式串和其中一个初始音轨的主串进行匹配时,目标音轨可以是待匹配音乐的目标鼓点音轨,初始音轨可以是目标音乐的鼓点音轨,则当目标音轨数据包括待匹配音乐的目标鼓点音轨数据时,对目标音轨数据进行格式化,得到目标音轨数据对应的模式串,包括:When matching the pattern string of one of the target audio tracks with the main string of one of the initial audio tracks, the target audio track can be the target drum track of the music to be matched, and the initial audio track can be the drum track of the target music, then When the target track data includes the target drum track data of the music to be matched, the target track data is formatted to obtain the pattern string corresponding to the target track data, including:
按照各个目标鼓点音轨数据对应的时间,对各个目标鼓点音轨数据进行排序,得到第一目标鼓点序列;Sort the target drum track data according to the time corresponding to each target drum track data to obtain the first target drum sequence;
根据第一目标鼓点序列对目标鼓点音轨数据进行格式化,得到目标鼓点音轨对应的模式串,目标鼓点音轨为目标鼓点音轨数据对应的音轨。The target drum track data is formatted according to the first target drum sequence to obtain a pattern string corresponding to the target drum track, and the target drum track is a track corresponding to the target drum track data.
为了得到更加全面的待匹配音乐的信息,本实施例中按照各个目标鼓点音轨数据对应的时间,对各个目标鼓点音轨数据进行排序,得到第一目标鼓点序列,然后根据第一目标鼓点序列对目标鼓点音轨数据进行格式化,从而得到目标鼓点音轨对应的模式串。In order to obtain more comprehensive information about the music to be matched, in this embodiment, each target drum track data is sorted according to the time corresponding to each target drum track data, to obtain the first target drum sequence, and then according to the first target drum sequence Format the target drum track data to obtain the pattern string corresponding to the target drum track.
在按照各个目标鼓点音轨数据对应的时间,对各个目标鼓点音轨数据进行排序时,可以是对各个目标鼓点音轨数据进行升序排列,也可以是对各个目标鼓点音轨数据进行降序排列,本实施例在此不做限定。When sorting the target drum track data according to the time corresponding to each target drum track data, the target drum track data can be arranged in ascending order, or the target drum track data can be arranged in descending order. This embodiment is not limited here.
其中,根据第一目标鼓点序列对目标鼓点音轨数据进行格式化,得到目标鼓点音轨对应的模式串,包括:Among them, the target drum track data is formatted according to the first target drum sequence to obtain a pattern string corresponding to the target drum track, including:
计算第一目标鼓点序列中目标鼓点音轨数据对的目标时间间隔,目标鼓点音轨数据对包括相邻的两个目标鼓点音轨数据;Calculate the target time interval of the target drum track data pair in the first target drum sequence, where the target drum track data pair includes two adjacent target drum track data;
针对第一目标鼓点序列中包括的每一个目标鼓点音轨数据,根据包含目标鼓点音轨数据的目标鼓点音轨数据对中的目标鼓点音轨数据的鼓点类型,和包含目标鼓点音轨数据的目标鼓点音轨数据对的目标时间间隔,对目标鼓点音轨数据进行格式化;For each target drum track data included in the first target drum sequence, a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data. The target time interval of the target drum track data pair, format the target drum track data;
基于第一目标鼓点序列中包括的每一个目标鼓点音轨数据格式化的结果,得到目标鼓点音轨对应的模式串。Based on the formatting result of data of each target drum track included in the first target drum sequence, a pattern string corresponding to the target drum track is obtained.
目标鼓点音轨数据的鼓点类型可以包括重鼓类型和轻鼓类型,将包含目标鼓点音轨数据的目标鼓点音轨数据对中,目标鼓点音轨数据的鼓点类型和目标鼓点音轨数据对的目标时间间隔,作为相邻的两个目标鼓点音轨数据格式化后的结果,再根据每个目标鼓点音轨格式话的结果,确定模式串。The drum type of the target drum track data may include a heavy drum type and a light drum type. Pair the target drum track data containing the target drum track data, and the drum type of the target drum track data and the target drum track data pair. The target time interval is the result of formatting the data of two adjacent target drum tracks, and then the pattern string is determined based on the result of the formatting of each target drum track.
比如,模式串可以为:For example, the pattern string can be:
S0P520P520P520P520P520P520P520P520P520P520PS0P,其中,S表示重鼓类型,P表示轻鼓类型,S与P之间的数字表示目标时间间隔,从左起算,第一个S对应的目标鼓点音轨数据和第一个P对应的目标鼓点音轨数据可以为目标鼓点音轨数据对,第一个S和第一个0即为第一个S对应的目标鼓点音轨数据格式后的结果,第一个0和第一个P即为第一个P对应的目标鼓点音轨数据格式后的结果,也即是,第一个S、第一个0以及第一个P即为包含第一个S对应的目标鼓点音轨数据和包含第一个P对应的目标鼓点音轨数据的目标鼓点音轨数据对格式后的结果。S0P520P520P520P520P520P520P520P520P520P520PS0P, where S represents the heavy drum type, P represents the light drum type, and the number between S and P represents the target time interval. Counting from the left, the target drum track data corresponding to the first S and the first P correspond to The target drum track data can be a target drum track data pair. The first S and the first 0 are the results of the target drum track data format corresponding to the first S. The first 0 and the first P That is, the result of the target drum track data format corresponding to the first P. That is, the first S, the first 0 and the first P contain the target drum track data corresponding to the first S. The result after formatting with the target drum track data containing the target drum track data corresponding to the first P.
从上述例子可以看出,存在目标时间间隔为0的情况,当目标时间间隔为0时,说明相邻两个目标鼓点音轨数据为无效数据,则终端在得到目标时间间隔之后,可以删除目标时间间隔为0对应的相邻两个目标鼓点音轨数据中的其中一个目标鼓点音轨数据。As can be seen from the above example, there is a situation where the target time interval is 0. When the target time interval is 0, it means that the two adjacent target drum track data are invalid data. Then the terminal can delete the target after getting the target time interval. One of the two adjacent target drum track data corresponding to the time interval of 0.
所以,在另一些实施例中,针对第一目标鼓点序列中包括的每一个目标鼓点音轨数据,根据包含目标鼓点音轨数据的目标鼓点音轨数据对中的目标鼓点音轨数据的鼓点类型,和包含目标鼓点音轨数据的目标鼓点音轨数据对的目标时间间隔,对目标鼓点音轨数据进行格式化,包括:Therefore, in other embodiments, for each target drum track data included in the first target drum sequence, the drum type of the target drum track data in the pair of target drum track data including the target drum track data is , and the target time interval of the target drum track data pair containing the target drum track data, format the target drum track data, including:
在第一目标鼓点序列中删除未超过预设时间间隔的目标时间间隔对应的目标鼓点音轨数据对的目标鼓点音轨数据,得到第二目标鼓点序列;Delete the target drum track data of the target drum track data pair corresponding to the target time interval that does not exceed the preset time interval in the first target drum sequence to obtain the second target drum sequence;
针对第二目标鼓点序列中包括的每一个目标鼓点音轨数据,根据包含目标鼓点音轨数据的目标鼓点音轨数据对中的目标鼓点音轨数据的鼓点类型,和包含目标鼓点音轨数据的目标鼓点音轨数据对的目标时间间隔,对目标鼓点音轨数据进行格式化;For each target drum track data included in the second target drum sequence, a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data. The target time interval of the target drum track data pair, format the target drum track data;
基于第一目标鼓点序列中包括的每一个目标鼓点音轨数据格式化的结果,得到目标鼓点音轨对应的模式串,包括:Based on the formatting result of each target drum track data included in the first target drum sequence, a pattern string corresponding to the target drum track is obtained, including:
基于第二目标鼓点序列中包括的每一个目标鼓点音轨数据格式化的结果,得到目标鼓点音轨对应的模式 串。Based on the formatting result of data of each target drum track included in the second target drum sequence, a pattern corresponding to the target drum track is obtained string.
预设时间间隔可以为0,也可以为其他时间间隔,可以根据实际情况进行设置,本实施例在此不做限定。The preset time interval may be 0 or other time intervals, and may be set according to the actual situation, which is not limited in this embodiment.
比如,模式串为:For example, the pattern string is:
S0P520P520P520P520P520P520P520P520P520P520PS0P,则从左起算,第一个S和第一个P之间的目标时间间隔为0,则可以删除第一个S或第一个P。S0P520P520P520P520P520P520P520P520P520P520PS0P, then counting from the left, the target time interval between the first S and the first P is 0, then the first S or the first P can be deleted.
在本实施例中,在第一目标鼓点序列中删除未超过预设时间间隔的目标时间间隔对应的目标鼓点音轨数据对,对应的目标鼓点音轨数据,得到第二目标鼓点序列,然后再针对第二目标鼓点序列中包括的每一个目标鼓点音轨数据,根据包含目标鼓点音轨数据的目标鼓点音轨数据对中的目标鼓点音轨数据的鼓点类型,和包含目标鼓点音轨数据的目标鼓点音轨数据对的目标时间间隔,对目标鼓点音轨数据进行格式化,基于第二目标鼓点序列中包括的每一个目标鼓点音轨数据格式化的结果,得到目标鼓点音轨对应的模式串,使得可以删除无效的目标鼓点音轨数据,减少对第二目标鼓点序列中目标鼓点音轨数据进行格式化的计算量,从而更加快速地得到目标音轨对应的模式串。In this embodiment, the target drum beat track data pair corresponding to the target time interval that does not exceed the preset time interval is deleted from the first target drum beat sequence, and the corresponding target drum beat track data is obtained to obtain the second target drum beat sequence, and then For each target drum track data included in the second target drum sequence, a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data. Format the target drum track data at the target time interval of the target drum track data pair, and obtain the pattern corresponding to the target drum track based on the formatting result of each target drum track data included in the second target drum sequence. string, so that invalid target drum track data can be deleted, and the calculation amount of formatting the target drum track data in the second target drum sequence can be reduced, thereby obtaining the pattern string corresponding to the target track more quickly.
应理解,当待匹配音乐的目标鼓点音轨数据包括多个时,可以无需计算待匹配音乐的所有目标鼓点音轨数据,可以只计算目标鼓点序列中前目标数量个目标鼓点音轨数据,从而减少目标时间间隔的计算量和后续将模式串和主串进行匹配的计算量。It should be understood that when the target drum track data of the music to be matched includes multiple, it is not necessary to calculate all the target drum track data of the music to be matched, and only the first target number of target drum track data in the target drum sequence can be calculated, so that Reduce the calculation amount of the target time interval and the subsequent calculation amount of matching the pattern string and the main string.
目标数量可以根据待匹配音乐的时长进行设置。比如,当待匹配音乐的时长为3分钟时,目标数量可以设置为90。The target quantity can be set according to the duration of the music to be matched. For example, when the duration of the music to be matched is 3 minutes, the target number can be set to 90.
或者,当待匹配的目标鼓点音轨数据包括多个时,会导致模式串较长。同理,主串也存在相同的问题。因此,在基于第二目标鼓点序列中包括的每一个目标鼓点音轨数据格式化的结果,得到目标鼓点音轨对应的模式串之后,还包括:Or, when the target drum track data to be matched includes multiple data, the pattern string will be longer. In the same way, the main string also has the same problem. Therefore, after obtaining the pattern string corresponding to the target drum track based on the formatting result of each target drum track included in the second target drum sequence, it also includes:
对模式串进行编码,得到编码后模式串;Encode the pattern string to obtain the encoded pattern string;
获取各个待匹配视频中初始音乐的主串,包括:Obtain the main string of the initial music in each video to be matched, including:
获取各个待匹配视频中初始音乐的编码后主串;Obtain the encoded main string of the initial music in each video to be matched;
筛选出与模式串匹配的主串对应的初始音乐,得到目标音乐,包括:Filter out the initial music corresponding to the main string matching the pattern string and obtain the target music, including:
筛选出与编码后模式串匹配的编码后主串对应的初始音乐,得到目标音乐。Filter out the initial music corresponding to the encoded main string that matches the encoded pattern string to obtain the target music.
将模式串和主串进行匹配的方法,可以根据实际情况进行选择,比如,选择克努特—莫里斯—普拉特算法(Knuth-Morris-Pratt,KMP)、后缀匹配法(Boyer-Moore,BM)或者Sunday算法作为本实施例中的匹配方法,本实施例在此不做限定。The method of matching the pattern string and the main string can be selected according to the actual situation. For example, choose the Knuth-Morris-Pratt algorithm (Knuth-Morris-Pratt, KMP) or the suffix matching method (Boyer-Moore, BM) or Sunday algorithm as the matching method in this embodiment, which is not limited in this embodiment.
当将其中一个目标音轨的模式串和其中一个初始音轨的主串进行匹配时,目标音轨也可以是待匹配音乐的目标贝斯音轨,初始音轨可以是目标音乐的贝斯音轨,关于对目标贝斯音轨进行格式化的过程,可以参照对目标鼓点音轨进行格式化的过程,本实施例在此不再赘述。When matching the pattern string of one of the target audio tracks with the main string of one of the initial audio tracks, the target audio track can also be the target bass track of the music to be matched, and the initial audio track can be the bass track of the target music, Regarding the process of formatting the target bass track, you may refer to the process of formatting the target drum track, which will not be described again in this embodiment.
在另一些实施例中,筛选出与模式串匹配的主串对应的初始音乐,得到目标音乐,包括:In other embodiments, the initial music corresponding to the main string matching the pattern string is filtered out to obtain the target music, including:
将模式串与主串进行匹配;Match the pattern string with the main string;
将匹配度大于预设匹配阈值的主串对应的至少一个初始音乐,确定为候选音乐;Determine at least one initial music corresponding to the main string whose matching degree is greater than the preset matching threshold as candidate music;
根据目标音轨数据,从候选音乐中筛选出至少一个目标音乐。Screen out at least one target music from the candidate music according to the target audio track data.
在本实施例中,并不是直接将匹配度大于预设匹配阈值的主串对应的至少一个初始音乐作为候选音乐,而不是作为目标音乐,然后再根据目标音轨数据,从候选音乐中筛选出至少一个目标音乐,从而得到与待匹配音乐的匹配度更高的目标音乐。In this embodiment, at least one initial music corresponding to the main string whose matching degree is greater than the preset matching threshold is not directly used as the candidate music, instead of being used as the target music, and then filtered out from the candidate music based on the target track data. At least one target music is obtained, thereby obtaining target music with a higher matching degree to the music to be matched.
其中,根据目标音轨数据,从候选音乐中筛选出至少一个目标音乐,包括:Among them, at least one target music is selected from the candidate music according to the target track data, including:
从目标音轨数据中筛选出目标鼓点音轨数据;Filter out the target drum track data from the target track data;
从目标鼓点音轨数据中提取出目标鼓点的第一时间数据,并根据候选音乐对应的鼓点音轨数据确定候选音乐的第二时间数据;Extract the first time data of the target drum beat from the target drum beat track data, and determine the second time data of the candidate music based on the drum beat track data corresponding to the candidate music;
根据第一时间数据和第二时间数据,从候选音乐中筛选出至少一个目标音乐。According to the first time data and the second time data, at least one target music is screened out from the candidate music.
在对待匹配音乐进行音轨分离之后,可以得到待匹配音乐的各个目标音轨对应的目标音轨数据。然后,可以从目标音轨数据筛出出目标鼓点音轨数据,目标鼓点音轨数据包括目标鼓点和目标鼓点对应的第一时间数据,候选音乐对应的鼓点音轨数据包括候选音乐的鼓点和候选音乐的鼓点对应的第二时间数据。After the audio tracks of the music to be matched are separated, the target audio track data corresponding to each target audio track of the music to be matched can be obtained. Then, the target drum beat track data can be filtered out from the target track data. The target drum beat track data includes the target drum beat and the first time data corresponding to the target drum beat. The drum beat track data corresponding to the candidate music includes the drum beat of the candidate music and the candidate music. The second time data corresponding to the drum beat of the music.
在得到第一时间数据和第二时间数据之后,再将第一时间数据和第二时间数据进行比对,如果第一时间数据相同和第二时间数据相同,则第一时间数据对应的目标鼓点和第二时间数据对应的鼓点相同,当候选音乐的每个鼓点和每个目标鼓点均相同时,该候选音乐即为目标音乐,或者,当候选音乐的鼓点与目标鼓点相同的个数超过第一预设个数时,该候选音乐也可作为目标音乐。After obtaining the first time data and the second time data, compare the first time data and the second time data. If the first time data is the same and the second time data is the same, then the target drum beat corresponding to the first time data is The drum beats corresponding to the second time data are the same. When each drum beat of the candidate music is the same as each target drum beat, the candidate music is the target music, or when the number of drum beats of the candidate music that are the same as the target drum beat exceeds the th. When there is a preset number, the candidate music can also be used as the target music.
在实际应用中,从目标鼓点音轨数据中提取出目标鼓点的第一时间数据,包括:In practical applications, the first time data of the target drum beat is extracted from the target drum beat track data, including:
在目标鼓点音轨数据中识别出每一鼓点对应的时间数据,得到时间数据集合;Identify the time data corresponding to each drum beat in the target drum beat track data to obtain a time data set;
获取目标鼓点音轨数据中目标鼓点对应的目标字符在模式串中的初始位置;Obtain the initial position of the target character corresponding to the target drum beat in the pattern string in the target drum beat track data;
根据初始位置,在时间数据集合中筛选出目标鼓点对应的第一时间数据。 According to the initial position, the first time data corresponding to the target drum beat is filtered out from the time data collection.
每个鼓点对应的时间数据在目标鼓点音轨数据中存在对应的位置,则在得到时间数据集合之后,可以根据目标鼓点对应的目标字符在模式串中的初始位置在时间数据集合中筛选出目标鼓点对应的第一时间数据。The time data corresponding to each drum beat has a corresponding position in the target drum beat track data. After obtaining the time data set, the target can be filtered out from the time data set according to the initial position of the target character corresponding to the target drum beat in the pattern string. The first time data corresponding to the drum beat.
比如,目标鼓点音轨对应的模式串为S0P520P520P520P520P520P520P520P520P520P520PS0P,目标鼓点为第一个鼓点,则第一个鼓点在模式串中对应的目标字符为模式串中的第一个S,则第一个S在模式串中的初始位置为第一个,时间数据集合中的第一个时间数据即为第一个鼓点对应的第一时间数据。For example, the pattern string corresponding to the target drum beat track is S0P520P520P520P520P520P520P520P520P520P520PS0P, and the target drum beat is the first drum beat, then the target character corresponding to the first drum beat in the pattern string is the first S in the pattern string, then the first S is in The initial position in the pattern string is the first one, and the first time data in the time data set is the first time data corresponding to the first drum beat.
根据候选音乐对应的鼓点音轨数据确定候选音乐的第二时间数据的过程,可以参照从目标鼓点音轨数据提取出目标鼓点的第一时间数据的过程,本实施例在此不再赘述。The process of determining the second time data of the candidate music based on the drum beat track data corresponding to the candidate music may refer to the process of extracting the first time data of the target drum beat from the target drum beat track data, which will not be described again in this embodiment.
在响应于对匹配控件的触发操作,显示音视频界面之后,终端可以直接播放待匹配音乐和播放视频,或者,音视频界面上可以包括播放控件,则终端也可以是在响应于目标对象对播放控件的触发操作,播放待匹配音乐和播放视频。After displaying the audio and video interface in response to the triggering operation of the matching control, the terminal can directly play the music to be matched and play the video. Alternatively, the audio and video interface can include playback controls, and the terminal can also respond to the target object to play the The trigger operation of the control is to play the music to be matched and play the video.
另外,终端在播放待匹配音乐时,可以根据播放进度条,在目标音轨上进行动效(即动态特效)播放,即将播放进度条到达的位置对应的目标音轨中图案进行动效播放。In addition, when the terminal plays the music to be matched, it can play dynamic effects (i.e. dynamic special effects) on the target audio track according to the playback progress bar, that is, dynamically play the pattern in the target audio track corresponding to the position where the playback progress bar reaches.
需要说明的是,可以根据播放进度条,对音视频界面上的至少一条目标音轨进行动效播放,并且,每种目标音轨的动效播放的方式可以相同,也可以不相同,本实施例在此不做限定。It should be noted that at least one target audio track on the audio and video interface can be dynamically played according to the playback progress bar, and the dynamic playback method of each target audio track can be the same or different. This implementation The examples are not limited here.
当目标音轨为目标鼓点音轨时,目标音轨中图案可以指目标音轨中鼓点。所以在一些实施例中,根据播放进度条,在目标音轨上进行动效播放,包括:When the target audio track is the target drum beat track, the pattern in the target audio track can refer to the drum beats in the target audio track. Therefore, in some embodiments, dynamic playback is performed on the target audio track according to the playback progress bar, including:
在目标音轨中筛选出目标鼓点音轨,并根据播放进度条,在目标鼓点音轨中识别出当前播放的目标鼓点;Filter out the target drum beat track in the target audio track, and identify the currently playing target drum beat in the target drum beat track according to the playback progress bar;
根据目标鼓点的鼓点类型,在目标鼓点音轨上对目标鼓点进行动效播放。According to the drum type of the target drum beat, animate the target drum beat on the target drum track.
鼓点类型包括重鼓类型和轻鼓类型。不同鼓点类型对应的动效类型,即不同鼓点类型对应的动效播放方式可以不相同,也可以相同。动效播放方式可以为动态放大的形式,也可以为静态放大的形式,对于动效播放的方式,用户可以根据实际情况进行选择,本实施例在此不做限定。Drum beat types include heavy drum types and light drum types. The dynamic effect types corresponding to different drum beat types, that is, the dynamic effect playback methods corresponding to different drum beat types can be different or the same. The dynamic effect playback method can be in the form of dynamic amplification or static amplification. As for the dynamic effect playback method, the user can choose according to the actual situation, and this embodiment is not limited here.
其中,根据播放进度条,在目标鼓点音轨中识别出当前播放的目标鼓点,包括:Among them, according to the playback progress bar, the target drum beat currently being played is identified in the target drum beat track, including:
获取播放进度条在目标鼓点音轨的位置信息和目标鼓点音轨中每一鼓点的位置区间;Obtain the position information of the playback progress bar in the target drum track and the position interval of each drum beat in the target drum track;
将位置信息和位置区间进行匹配,并将与位置信息匹配的位置区间对应的鼓点作为当前播放的目标鼓点。Match the position information with the position interval, and use the drum beat corresponding to the position interval matching the position information as the target drum beat currently being played.
然而,目标鼓点音轨上存在两个鼓点重叠的情况,即此时播放进度条到达的鼓点存在两个,则终端会同时动效播放进度条到达的两个鼓点,也即是此时筛选出来的目标鼓点存在两个,使得将两个鼓点中的前一个鼓点进行重复播放,导致出现错误。However, if two drum beats overlap on the target drum track, that is, if there are two drum beats reached by the playback progress bar at this time, the terminal will play the two drum beats reached by the progress bar at the same time, that is, the two drum beats reached by the progress bar will be filtered out at this time. There are two target drum beats, which causes the previous drum beat of the two drum beats to be played repeatedly, resulting in an error.
为了解决该技术问题,在另一些实施例中,图17是本申请实施例提供的播放过程的示意图,参照图17,根据目标鼓点的鼓点类型,在目标鼓点音轨上对所述目标鼓点进行动效播放,包括:In order to solve this technical problem, in other embodiments, Figure 17 is a schematic diagram of the playback process provided by the embodiment of the present application. Referring to Figure 17, according to the drum type of the target drum beat, the target drum beat is played on the target drum track. Motion effect playback, including:
步骤171:获取播放进度条在目标鼓点音轨的位置信息和目标鼓点音轨中每一鼓点的位置区间,并将与位置信息匹配的位置区间对应的鼓点作为当前播放的目标鼓点。Step 171: Obtain the position information of the playback progress bar in the target drum track and the position interval of each drum beat in the target drum track, and use the drum beat corresponding to the position interval matching the position information as the currently played target drum beat.
步骤172:确定目标鼓点在已播放数组中的存储状态;Step 172: Determine the storage status of the target drum beat in the played array;
步骤173:若存储状态为未存储状态,则获取目标鼓点的鼓点类型,并根据鼓点类型,确定目标鼓点的动效类型;Step 173: If the storage status is unstored, obtain the drum beat type of the target drum beat, and determine the dynamic effect type of the target drum beat based on the drum beat type;
步骤174:基于动效类型,在目标鼓点音轨上对目标鼓点进行动效播放,并将目标鼓点存储至已播放数组中。Step 174: Based on the motion effect type, play the target drum beat with motion effect on the target drum beat track, and store the target drum beat in the played array.
若存储状态为未存储状态,说明终端还未播放该目标鼓点,则终端可以基于该目标鼓点的动效类型,播放目标鼓点,并将目标鼓点存储至已播放数组中。If the storage status is unstored, it means that the terminal has not played the target drum beat. The terminal can play the target drum beat based on the dynamic effect type of the target drum beat and store the target drum beat in the played array.
若存储状态为已存储状态,说明书该目标鼓点已经被播放过,则可以将已播放数组中该目标鼓点进行删除,所以在另一些实施例中,在确定目标鼓点在已播放数组中的存储状态之后,还包括:If the storage state is a stored state, indicating that the target drum beat has been played, the target drum beat can be deleted from the played array. Therefore, in other embodiments, the storage status of the target drum beat in the played array is determined. After that, it also includes:
步骤175:若存储状态为已存储状态,则获取播放进度条在目标鼓点音轨的当前位置信息;Step 175: If the storage status is the stored status, obtain the current position information of the playback progress bar on the target drum track;
步骤176:判断当前位置信息是否与目标鼓点的位置区间匹配,若是,播放待匹配音乐,若否,执行步骤177。Step 176: Determine whether the current position information matches the position interval of the target drum beat. If so, play the music to be matched. If not, perform step 177.
步骤177:当当前位置信息与目标鼓点的位置区间不匹配时,在已播放数组中删除目标鼓点。Step 177: When the current position information does not match the position interval of the target drum beat, delete the target drum beat in the played array.
在本实施例中,设置已播放数组,然后将已播放过的目标鼓点存在存储在已播放数组中,从而使得终端可以根据已播放数组判断目标鼓点是否已经播放过,从而使得不会重复播放已播放过的目标鼓点。In this embodiment, a played array is set, and then the target drum beat that has been played is stored in the played array, so that the terminal can determine whether the target drum beat has been played based on the played array, so that the already played drum beat will not be played repeatedly. The target drum beat that was played.
在一些实施例中,终端在显示音乐匹配界面时,默认处于灵感模式,该灵感模式用于实现与匹配音乐与视频的自动匹配,终端响应于对匹配控件的触发操作,可采用如下方式显示音视频界面:In some embodiments, when the terminal displays the music matching interface, it is in the inspiration mode by default. The inspiration mode is used to realize automatic matching of music and video. In response to the triggering operation of the matching control, the terminal can display the music in the following manner. Video interface:
终端响应于在灵感模式下对所述匹配控件的触发操作,显示音视频界面;The terminal displays an audio and video interface in response to a triggering operation on the matching control in the inspiration mode;
相应的,用户可基于模式切换控件实现对灵感模式的切换,在实际实施时,所述方法还包括:Correspondingly, the user can switch the inspiration mode based on the mode switching control. In actual implementation, the method also includes:
在音视频界面中显示用于模式切换的模式切换控件;响应于针对模式切换控件的触发操作,控制将灵感模式切换为编辑模式,该编辑模式,用于对待匹配音乐进行编辑;如此,在编辑模式下,用户可实现对待匹配音乐的编辑,进而可实现对编辑后的音乐进行相关视频的匹配。A mode switching control for mode switching is displayed in the audio and video interface; in response to the triggering operation of the mode switching control, the control switches the inspiration mode to the editing mode, and the editing mode is used to edit the music to be matched; thus, during editing In this mode, users can edit the music to be matched, and then match the edited music with related videos.
在一些实施例中,终端控制将灵感模式切换为编辑模式之后,所述方法还包括: In some embodiments, after the terminal controls switching the inspiration mode to the editing mode, the method further includes:
终端响应于在编辑模式下对待匹配音乐的编辑操作,显示对编辑后的待匹配音乐进行音轨分离后所得到的各个音轨;更新显示与各个音频相匹配的至少一个目标视频。In response to the editing operation of the music to be matched in the editing mode, the terminal displays each audio track obtained by separating the audio tracks of the edited music to be matched; and updates and displays at least one target video that matches each audio.
在一些实施例中,为了便于用户了解对待匹配音乐的编辑方式,可对用户进行编辑引导,相应的,所述方法还包括:In some embodiments, in order to facilitate the user to understand the editing method of matching music, the user may be guided to edit. Accordingly, the method further includes:
终端响应于针对模式切换控件的触发操作,显示编辑引导信息,该编辑引导信息,用于引导编辑对象在编辑模式下,对待匹配音乐进行编辑。The terminal displays editing guidance information in response to the triggering operation of the mode switching control. The editing guidance information is used to guide the editing object to edit the music to be matched in the editing mode.
在本申请实施例中,在待匹配音乐的音乐匹配界面中包括匹配控件,如此,为用户提供对感兴趣音乐进行视频匹配的功能,当用户触发该匹配控件时,在显示音视频界面中显示待匹配音乐的目标音轨、以及与目标音轨匹配的目标视频,对待匹配音乐的目标音轨的显示,实现了待匹配音乐的可视化,针对该可视化的音乐,实现了与目标音轨相匹配的目标视频的自动查找及显示,提高了与感兴趣音乐相匹配的视频的查看效率。即在本申请中,音乐匹配界面包括了匹配控件,则可以响应于对匹配控件的触发操作,自动找到与待匹配音乐的目标音轨匹配的目标视频,并在音视频界面显示目标音轨和目标视频,无需用户手动逐个查看,较为便捷。In the embodiment of the present application, a matching control is included in the music matching interface of the music to be matched. In this way, the user is provided with the function of video matching for the music of interest. When the user triggers the matching control, it is displayed in the audio and video display interface. The target audio track of the music to be matched and the target video matching the target audio track. The display of the target audio track of the music to be matched realizes the visualization of the music to be matched. For the visualized music, the matching with the target audio track is realized. The automatic search and display of target videos improves the viewing efficiency of videos that match the music of interest. That is, in this application, the music matching interface includes a matching control, and in response to the triggering operation of the matching control, the target video matching the target audio track of the music to be matched can be automatically found, and the target audio track and the target audio track can be displayed on the audio and video interface. The target videos do not need to be viewed manually one by one, which is more convenient.
根据上述实施例所描述的方法,以下将举例作详细说明。According to the methods described in the above embodiments, examples will be given for detailed description below.
请参阅图18,图18为本申请实施例提供的音乐匹配方法的流程示意图。该音乐匹配方法流程可以包括:Please refer to FIG. 18 , which is a schematic flowchart of a music matching method provided by an embodiment of the present application. The music matching method process may include:
S1801、终端在音乐界面内显示第一音乐的音乐匹配界面,第一音乐的音乐匹配界面内包括匹配控件和试听区域,第一音乐为待匹配音乐。S1801. The terminal displays a music matching interface of the first music in the music interface. The music matching interface of the first music includes a matching control and a listening area, and the first music is the music to be matched.
这里,在试听区域中可显示所试听音乐的播放进度条及用于调整播放进度的调整控件,基于该试听区域,用户可进行试听音乐。Here, the playback progress bar of the auditioned music and the adjustment control for adjusting the playback progress can be displayed in the audition area. Based on the audition area, the user can audition the music.
S1802、终端在音乐界面内显示第二音乐的音乐匹配界面和第一音乐的音乐匹配界面,第二音乐的音乐匹配界面内包括匹配控件和试听区域,第一音乐的音乐匹配界面包括匹配控件,第二音乐为待匹配音乐。S1802. The terminal displays the music matching interface of the second music and the music matching interface of the first music in the music interface. The music matching interface of the second music includes a matching control and a listening area, and the music matching interface of the first music includes a matching control. The second music is the music to be matched.
S1803、终端确定一音乐为待匹配音乐,响应于对待匹配音乐的匹配控件的触发操作,对待匹配音乐进行音轨分离,得到待匹配音乐的目标音轨对应的目标音轨数据,目标音轨包括目标人声音轨、目标伴奏音轨、目标贝斯音轨以及目标鼓点音轨。S1803. The terminal determines that a piece of music is the music to be matched, and in response to the triggering operation of the matching control of the music to be matched, separates the tracks of the music to be matched, and obtains the target track data corresponding to the target track of the music to be matched. The target track includes Target vocal track, target backing track, target bass track, and target drum track.
此时,待匹配音乐可以为第一音乐,也可以为第二音乐。At this time, the music to be matched may be the first music or the second music.
S1804、终端按照目标鼓点音轨的目标鼓点音轨数据对应的时间,对目标鼓点音轨数据进行排序,得到第一目标鼓点序列。S1804. The terminal sorts the target drum beat track data according to the time corresponding to the target drum beat track data, and obtains the first target drum beat sequence.
S1805、终端计算第一目标鼓点序列中目标鼓点音轨数据对的目标时间间隔,并在第一目标鼓点序列中删除未超过预设时间间隔的目标时间间隔对应的目标鼓点音轨数据对,对应的目标鼓点音轨数据,得到第二目标鼓点序列,目标鼓点音轨数据对包括相邻两个目标鼓点音轨数据。S1805. The terminal calculates the target time interval of the target drum track data pair in the first target drum sequence, and deletes the target drum track data pair corresponding to the target time interval that does not exceed the preset time interval in the first target drum sequence, corresponding to The target drum track data is obtained to obtain a second target drum sequence, and the target drum track data pair includes two adjacent target drum track data.
S1806、终端针对第二目标鼓点序列中包括的每一个目标鼓点音轨数据,根据包含目标鼓点音轨数据的目标鼓点音轨数据对中的目标鼓点音轨数据的鼓点类型,和包含目标鼓点音轨数据的目标鼓点音轨数据对的目标时间间隔,对目标鼓点音轨数据进行格式化,并基于第二目标鼓点序列中包括的每一个目标鼓点音轨数据格式化的结果,得到目标鼓点音轨对应的模式串。S1806. For each target drum track data included in the second target drum sequence, the terminal determines the drum type of the target drum track data in the target drum track data pair containing the target drum track data, and the target drum track data containing the target drum track data. The target drum beat track data is formatted according to the target time interval of the target drum beat track data pair of the track data, and the target drum beat sound is obtained based on the formatted result of each target drum beat track data included in the second target drum beat sequence. The pattern string corresponding to the track.
S1807、终端获取待匹配视频中初始音乐,并对初始音乐进行音轨分离,得到初始音乐的初始鼓点音轨数据。S1807. The terminal obtains the initial music in the video to be matched, separates the tracks of the initial music, and obtains the initial drum track data of the initial music.
终端可以是在获取到待匹配视频时,提取待匹配视频中的初始音乐,并对初始音乐进行音轨分离。或者,终端也可以是在获取到待匹配视频之后,接收到分离指令时,再提取初始音乐并对初始音乐进行音轨分离。本实施例在此不做限定。When acquiring the video to be matched, the terminal may extract the initial music in the video to be matched, and separate the audio tracks of the initial music. Alternatively, the terminal may also extract the initial music and separate the tracks of the initial music when receiving the separation instruction after acquiring the video to be matched. This embodiment is not limited here.
S1808、终端按照初始鼓点音轨的初始鼓点音轨数据对应的时间,对初始鼓点音轨数据进行排序,得到第一初始鼓点序列。S1808: The terminal sorts the initial drum track data according to the time corresponding to the initial drum track data of the initial drum track to obtain the first initial drum sequence.
S1809、终端计算第一初始鼓点序列中初始鼓点音轨数据对的初始时间间隔,并在第一初始鼓点序列中删除未超过预设时间间隔的初始时间间隔对应的初始鼓点音轨数据对,对应的初始鼓点音轨数据,得到第二初始鼓点序列,初始鼓点音轨数据对包括相邻两个初始鼓点音轨数据。S1809. The terminal calculates the initial time interval of the initial drum track data pair in the first initial drum sequence, and deletes the initial drum track data pair corresponding to the initial time interval that does not exceed the preset time interval in the first initial drum sequence, corresponding to The initial drum track data is obtained to obtain a second initial drum sequence, and the initial drum track data pair includes two adjacent initial drum track data.
S18010、终端针对第二初始鼓点序列中包括的每一个初始鼓点音轨数据,根据包含初始鼓点音轨数据的初始鼓点音轨数据对中的初始鼓点音轨数据的鼓点类型,和包含初始鼓点音轨数据的初始鼓点音轨数据对的初始时间间隔,对初始鼓点音轨数据进行格式化,并基于第二初始鼓点序列中包括的每一个初始鼓点音轨数据格式化的结果,得到初始鼓点音轨对应的主串。S18010. For each initial drum beat track data included in the second initial drum beat sequence, the terminal determines the drum beat type of the initial drum beat track data in the pair of initial drum beat track data that includes the initial drum beat track data, and the initial drum beat track data that includes the initial drum beat track data. the initial time interval of the initial drum beat track data pair of the track data, format the initial drum beat track data, and obtain the initial drum beat sound based on the formatted result of each initial drum beat track data included in the second initial drum beat sequence The main string corresponding to the track.
S18011、终端将模式串和主串进行匹配,将匹配度大于预设匹配度的至少一个初始音乐作为候选音乐,并在目标鼓点音轨数据中识别出每一鼓点对应的时间数据,得到时间数据集合。S18011. The terminal matches the pattern string and the main string, uses at least one initial music with a matching degree greater than the preset matching degree as candidate music, and identifies the time data corresponding to each drum beat in the target drum beat track data to obtain the time data. gather.
S18012、终端获取目标鼓点音轨数据中目标鼓点对应的目标字符在模式串中的初始位置,并根据初始位置,在时间数据集合中筛选出目标鼓点对应的第一时间数据。S18012. The terminal obtains the initial position of the target character corresponding to the target drum beat in the pattern string in the target drum beat track data, and filters out the first time data corresponding to the target drum beat in the time data collection based on the initial position.
S18013、终端根据候选音乐对应的鼓点音轨数据确定候选音乐的第二时间数据,根据第一时间数据和第二时间数据,从候选音乐中筛选出至少一个目标音乐,并将包含目标音乐的待匹配视频作为目标视频。 S18013. The terminal determines the second time data of the candidate music based on the drum beat track data corresponding to the candidate music, selects at least one target music from the candidate music based on the first time data and the second time data, and adds the target music containing the target music to the candidate music. Match the video as the target video.
在本实施例中,将待匹配音乐的目标鼓点音轨数据与待匹配视频中初始音乐的初始鼓点音轨数据进行匹配,从而确定包含待匹配音乐的目标视频。In this embodiment, the target drum track data of the music to be matched is matched with the initial drum track data of the initial music in the video to be matched, thereby determining the target video containing the music to be matched.
比如,参照图19,终端通过音频分轨任务对待匹配音乐进行音轨分离,得到目标音轨数据,并对目标音轨数据进行格式化,得到模式串。终端通过视频预处理任务对待匹配视频提取初始音乐,然后对初始音乐进行音轨分离,得到初始音轨数据,并对初始音轨数据进行格式化,得到主串,最后将待匹配视频和主串关联存储在视频库中。最后,终端通过视频匹配任务将模式串和主串进行匹配,当模式串与主串的匹配度大于预设阈值时,将大于预设阈值的匹配度对应的主串,对应的至少一个初始音乐作为候选音乐。For example, referring to Figure 19, the terminal separates the tracks of the music to be matched through the audio track separation task, obtains the target track data, and formats the target track data to obtain the pattern string. The terminal extracts the initial music from the video to be matched through the video preprocessing task, then separates the audio track of the initial music to obtain the initial audio track data, formats the initial audio track data to obtain the main string, and finally combines the video to be matched and the main string Associations are stored in the video library. Finally, the terminal matches the pattern string and the main string through the video matching task. When the matching degree between the pattern string and the main string is greater than the preset threshold, the main string corresponding to the matching degree greater than the preset threshold will be matched with at least one initial music as candidate music.
然后,根据目标鼓点音轨数据中目标鼓点对应的目标字符在模式串中的初始位置,在时间数据集合中筛选出目标鼓点对应的第一时间数据和候选音乐对应的鼓点音轨数据确定候选音乐的第二时间数据,从候选音乐中筛选出至少一个目标音乐,并将包含目标音乐的待匹配视频作为目标视频,即将模式串进行还原。Then, according to the initial position of the target character corresponding to the target drum beat in the pattern string in the target drum beat track data, the first time data corresponding to the target drum beat and the drum beat track data corresponding to the candidate music are filtered out from the time data set to determine the candidate music The second time data is used to select at least one target music from the candidate music, and the to-be-matched video containing the target music is used as the target video, that is, the pattern string is restored.
待匹配视频可以是目标对象采用初始音乐进行拍摄得到的视频。比如,如图20所示,终端在获取到待匹配视频之后,再将包含相同的初始音乐的待匹配视频存储至视频库中,其中,相同的初始音乐可以指音乐标识相同的初始音乐,由于音乐标识相同,因此,相同的初始音乐中可以包括完全相同的初始音乐,也可以包括部分相同的初始音乐。部分相同的初始音乐比如可以为:初始音乐a和经过剪辑的初始音乐a为相同的初始音乐。The video to be matched may be a video shot by the target object using the original music. For example, as shown in Figure 20, after acquiring the video to be matched, the terminal stores the video to be matched containing the same initial music into the video library. The same initial music may refer to the initial music with the same music identifier. Since The music identifiers are the same, so the same initial music may include exactly the same initial music, or may include part of the same initial music. For example, the partially identical initial music may be: the initial music a and the edited initial music a are the same initial music.
然后,当终端获取到待匹配音乐之后,再根据待匹配音乐从视频库中获取待匹配视频,并将待匹配视频的主串与待匹配音乐的模式串进行匹配。Then, after the terminal obtains the music to be matched, it obtains the video to be matched from the video library based on the music to be matched, and matches the main string of the video to be matched with the pattern string of the music to be matched.
S18014、终端按照预设显示顺序,将目标人声音轨、目标伴奏音轨、目标贝斯音轨以及目标鼓点音轨显示在第一显示区域,将目标视频显示在第一子显示区域,将播放视频显示在第二子显示区域,播放视频为处于选中状态的目标视频,第一显示区域和第二显示区域组成音视频界面,音视频界面包括播放控件和调整控件。S18014. The terminal displays the target vocal track, the target accompaniment track, the target bass track and the target drum track in the first display area in accordance with the preset display order, displays the target video in the first sub-display area, and plays The video is displayed in the second sub-display area, and the played video is the target video in the selected state. The first display area and the second display area form an audio and video interface, and the audio and video interface includes playback controls and adjustment controls.
S18015、终端响应于对调整控件的触发操作,获取调整控件对应的调整目标音轨的音频文件的当前播放音量。S18015. In response to the triggering operation on the adjustment control, the terminal obtains the current playback volume of the audio file of the adjustment target track corresponding to the adjustment control.
S18016、当当前播放音量超过静音音量时,将当前播放音量调整为静音音量,并对调整目标音轨添加蒙层,以在音视频界面隐藏调整目标音轨,得到调整后音乐。S18016. When the current playback volume exceeds the mute volume, adjust the current playback volume to the mute volume, and add a mask layer to the adjustment target audio track to hide the adjustment target audio track in the audio and video interface and obtain the adjusted music.
当当前播放音量未超过静音音量时,去除调整目标音轨上的蒙层,以在音视频界面显示调整目标音轨,并将调整目标音轨对应的音频文件的播放音量调整为历史播放音量。When the current playback volume does not exceed the mute volume, remove the mask on the adjustment target audio track to display the adjustment target audio track on the audio and video interface, and adjust the playback volume of the audio file corresponding to the adjustment target audio track to the historical playback volume.
S18017、若调整目标音轨为预设目标音轨,根据调整后音乐的音轨,确定调整后音乐对应的目标模式串,并根据目标模式串,对目标视频集合中的目标视频进行更新,得到更新后视频集合。S18017. If the adjusted target audio track is the preset target audio track, determine the target pattern string corresponding to the adjusted music based on the adjusted music track, and update the target video in the target video collection according to the target pattern string to obtain Updated video collection.
本实施例中其他可实现方式以及对应的有益效果,可以参照上述音乐匹配方法,本实施例在此不再赘述。For other implementable methods and corresponding beneficial effects in this embodiment, reference can be made to the above music matching method, which will not be described again in this embodiment.
为便于更好的实施本申请实施例提供的音乐匹配方法,本申请实施例还提供一种基于上述音乐匹配方法的装置。其中名词的含义与上述音乐匹配方法中相同,实现细节可以参考方法实施例中的说明。In order to facilitate better implementation of the music matching method provided by the embodiment of the present application, the embodiment of the present application also provides a device based on the above music matching method. The meanings of the nouns are the same as in the above music matching method. For implementation details, please refer to the description in the method embodiment.
例如,如图21所示,该音乐匹配装置可以包括:For example, as shown in Figure 21, the music matching device may include:
第一显示模块2101,配置为显示待匹配音乐的音乐匹配界面,音乐匹配界面内包括匹配控件。The first display module 2101 is configured to display a music matching interface for music to be matched, and the music matching interface includes matching controls.
第二显示模块2102,配置为响应于对匹配控件的触发操作,显示音视频界面,音视频界面包括待匹配音乐的目标音轨、以及与目标音轨匹配的目标视频。The second display module 2102 is configured to display an audio and video interface in response to the triggering operation of the matching control. The audio and video interface includes the target audio track of the music to be matched and the target video matching the target audio track.
在实际应用中,第二显示模块2102还配置为执行:In practical applications, the second display module 2102 is also configured to perform:
响应于对匹配控件的触发操作,对待匹配音乐进行音轨分离,得到待匹配音乐的目标音轨数据;In response to the triggering operation of the matching control, track separation is performed on the music to be matched, and the target track data of the music to be matched is obtained;
对目标音轨数据进行格式化,得到目标音轨数据对应的模式串;Format the target audio track data and obtain the pattern string corresponding to the target audio track data;
根据模式串,确定与目标音轨匹配的至少一个目标视频,目标音轨为目标音轨数据对应的音轨;Determine at least one target video matching the target audio track according to the pattern string, and the target audio track is the audio track corresponding to the target audio track data;
显示包括所述目标音轨及所述至少一个目标视频的音视频界面。Display an audio and video interface including the target audio track and the at least one target video.
在实际应用中,第二显示模块2102还配置为执行:In practical applications, the second display module 2102 is also configured to perform:
获取各个待匹配视频中初始音乐的主串;Obtain the main string of the initial music in each video to be matched;
筛选出与模式串匹配的主串对应的初始音乐,得到目标音乐;Filter out the initial music corresponding to the main string matching the pattern string to obtain the target music;
将与目标音乐对应的待匹配视频,确定为与目标音轨匹配的目标音视频,构建目标视频。The video to be matched corresponding to the target music is determined as the target audio and video that matches the target audio track, and the target video is constructed.
在实际应用中,第二显示模块2102还配置为执行:In practical applications, the second display module 2102 is also configured to perform:
将模式串与主串进行匹配,得到所述模式串与所述主串的匹配度;Match the pattern string with the main string to obtain the matching degree between the pattern string and the main string;
将匹配度大于预设匹配阈值的主串所对应的至少一个初始音乐,确定为候选音乐;Determine at least one initial music corresponding to the main string whose matching degree is greater than the preset matching threshold as candidate music;
根据目标音轨数据,从候选音乐中筛选出至少一个目标音乐。Screen out at least one target music from the candidate music according to the target audio track data.
在实际应用中,第二显示模块2102还配置为执行:In practical applications, the second display module 2102 is also configured to perform:
从目标音轨数据筛中选出目标鼓点音轨数据;Select the target drum beat track data from the target track data filter;
从目标鼓点音轨数据中提取出目标鼓点的第一时间数据,并根据候选音乐对应的鼓点音轨数据确定候选音乐的第二时间数据;Extract the first time data of the target drum beat from the target drum beat track data, and determine the second time data of the candidate music based on the drum beat track data corresponding to the candidate music;
根据第一时间数据和各所述候选音乐的第二时间数据,从候选音乐中筛选出至少一个目标音乐。 According to the first time data and the second time data of each candidate music, at least one target music is screened out from the candidate music.
在实际应用中,第二显示模块2102还配置为执行:In practical applications, the second display module 2102 is also configured to perform:
在目标鼓点音轨数据中识别出每一鼓点对应的时间数据,得到时间数据集合;Identify the time data corresponding to each drum beat in the target drum beat track data to obtain a time data set;
获取目标字符在模式串中的初始位置,其中,所述目标字符为,所述目标鼓点音轨数据中目标鼓点对应的字符;Obtain the initial position of the target character in the pattern string, wherein the target character is the character corresponding to the target drum beat in the target drum beat track data;
根据初始位置,在时间数据集合中,筛选出目标鼓点对应的时间数据作为所述第一时间数据。According to the initial position, the time data corresponding to the target drum beat is filtered out from the time data set as the first time data.
目标音轨数据包括待匹配音乐的目标鼓点音轨数据。The target track data includes target drum track data of the music to be matched.
相应地,第二显示模块2102还配置为执行:Correspondingly, the second display module 2102 is also configured to perform:
按照各个目标鼓点音轨数据对应的时间,对各个目标鼓点音轨数据进行排序,得到第一目标鼓点序列;Sort the target drum track data according to the time corresponding to each target drum track data to obtain the first target drum sequence;
根据第一目标鼓点序列对各个目标鼓点音轨数据进行格式化,得到目标鼓点音轨对应的模式串,目标鼓点音轨为目标鼓点音轨数据对应的音轨。Each target drum track data is formatted according to the first target drum sequence to obtain a pattern string corresponding to the target drum track, and the target drum track is a track corresponding to the target drum track data.
在实际应用中,第二显示模块2102还配置为执行:In practical applications, the second display module 2102 is also configured to perform:
计算第一目标鼓点序列中目标鼓点音轨数据对的目标时间间隔,目标鼓点音轨数据对包括相邻的两个目标鼓点音轨数据;Calculate the target time interval of the target drum track data pair in the first target drum sequence, where the target drum track data pair includes two adjacent target drum track data;
针对第一目标鼓点序列中每一个目标鼓点音轨数据,根据包含目标鼓点音轨数据的目标鼓点音轨数据对中目标鼓点音轨数据的鼓点类型、和包含目标鼓点音轨数据的目标鼓点音轨数据对的目标时间间隔,对目标鼓点音轨数据进行格式化,得到各所述目标鼓点音轨数据对应的格式化结果;For each target drum track data in the first target drum sequence, match the drum type of the target drum track data and the target drum sound containing the target drum track data according to the target drum track data containing the target drum track data. According to the target time interval of the track data pair, the target drum track data is formatted, and the formatting result corresponding to each target drum track data is obtained;
基于各所述目标鼓点音轨数据对应的格式化结果,确定目标鼓点音轨对应的模式串。Based on the formatting result corresponding to each target drum track data, a pattern string corresponding to the target drum track is determined.
在实际应用中,第二显示模块2102还配置为执行:In practical applications, the second display module 2102 is also configured to perform:
在第一目标鼓点序列中删除未超过预设时间间隔的目标时间间隔对应的目标鼓点音轨数据对的目标鼓点音轨数据,得到第二目标鼓点序列;Delete the target drum track data of the target drum track data pair corresponding to the target time interval that does not exceed the preset time interval in the first target drum sequence to obtain the second target drum sequence;
针对第二目标鼓点序列中包括的每一个目标鼓点音轨数据,根据包含目标鼓点音轨数据的目标鼓点音轨数据对中的目标鼓点音轨数据的鼓点类型,和包含目标鼓点音轨数据的目标鼓点音轨数据对的目标时间间隔,对目标鼓点音轨数据进行格式化;For each target drum track data included in the second target drum sequence, a drum type according to the target drum track data in a pair of target drum track data containing the target drum track data, and a drum type containing the target drum track data. The target time interval of the target drum track data pair, format the target drum track data;
基于第二目标鼓点序列中包括的每一个目标鼓点音轨数据格式化的结果,得到目标鼓点音轨对应的模式串。Based on the formatting result of data of each target drum track included in the second target drum sequence, a pattern string corresponding to the target drum track is obtained.
在实际应用中,第二显示模块2102还配置为执行:In practical applications, the second display module 2102 is also configured to perform:
响应于对匹配控件的触发操作,按照预设显示顺序,将待匹配音乐的目标音轨显示在第一显示区域;In response to the triggering operation of the matching control, display the target audio track of the music to be matched in the first display area according to a preset display order;
将与目标音轨匹配的目标视频集合显示在第二显示区域;Display the target video set matching the target audio track in the second display area;
音视频界面包括第一显示区域和第二显示区域。The audio and video interface includes a first display area and a second display area.
在一些实施例中,所述目标音轨的数量为至少两个,每个所述目标音轨对应所述待匹配音乐的一种音乐属性,第二显示模块2102还配置为,在所述音视频界面中所述第一显示区域,按照预设显示顺序,展示至少两个所述目标音轨。In some embodiments, the number of the target audio tracks is at least two, and each target audio track corresponds to a music attribute of the music to be matched. The second display module 2102 is also configured to, when the audio track is The first display area in the video interface displays at least two of the target audio tracks according to a preset display order.
在实际应用中,第二显示区域包括第一子显示区域和第二子显示区域,所述目标视频的数量为多个,多个所述目标视频构成目标视频集合,所述目标视频集合包括播放视频。In practical applications, the second display area includes a first sub-display area and a second sub-display area, the number of the target videos is multiple, and the multiple target videos constitute a target video set, and the target video set includes playback video.
相应地,第二显示模块2102还配置为执行:Correspondingly, the second display module 2102 is also configured to perform:
将与目标音轨匹配的目标视频集合显示在第一子显示区域;Display the target video set matching the target audio track in the first sub-display area;
将播放视频显示在第二子显示区域,播放视频为目标视频集合中处于选中状态的目标视频。The playback video is displayed in the second sub-display area, and the playback video is the selected target video in the target video collection.
在实际应用中,第二显示模块2102还配置为执行:In practical applications, the second display module 2102 is also configured to perform:
获取与目标音轨匹配的目标视频集合中各目标视频的播放量;Obtain the playback volume of each target video in the target video collection that matches the target audio track;
按照播放量从高到低的顺序,将目标视频集合中的目标视频按序显示在第一子显示区域。The target videos in the target video collection are sequentially displayed in the first sub-display area in order from high to low playback volume.
在实际应用中,所述目标音轨为,对所述待匹配音乐进行音轨分离后所得到;音视频界面还包括目标音轨的调整控件。In practical applications, the target audio track is obtained by separating the audio tracks of the music to be matched; the audio and video interface also includes adjustment controls for the target audio track.
相应地,音乐匹配装置还包括:Correspondingly, the music matching device also includes:
静音隐藏处理模块,配置为执行:Silent hidden processing module, configured to execute:
响应于对调整控件的触发操作,获取调整控件对应的调整目标音轨的音频文件的当前播放音量;In response to the triggering operation on the adjustment control, obtain the current playback volume of the audio file of the adjustment target track corresponding to the adjustment control;
当当前播放音量超过静音音量时,将当前播放音量调整为静音音量,并对调整目标音轨添加蒙层,以在音视频界面隐藏上述调整目标音轨,得到调整后音乐。When the current playback volume exceeds the mute volume, adjust the current playback volume to the mute volume, and add a mask layer to the adjustment target audio track to hide the above adjustment target audio track in the audio and video interface, and obtain the adjusted music.
在实际应用中,音乐匹配装置还包括:In practical applications, music matching devices also include:
更新模块,配置为执行:Update module, configured to execute:
若调整目标音轨为预设目标音轨,根据调整后音乐的音轨,确定调整后音乐对应的目标模式串;If the adjusted target audio track is a preset target audio track, determine the target pattern string corresponding to the adjusted music based on the adjusted music track;
根据目标模式串,对目标视频集合中的目标视频进行更新,得到更新后视频集合。According to the target pattern string, the target videos in the target video collection are updated to obtain the updated video collection.
在一些实施例中,第二显示模块,还配置为响应于在灵感模式下对所述匹配控件的触发操作,显示音视频界面;In some embodiments, the second display module is further configured to display an audio and video interface in response to a triggering operation on the matching control in the inspiration mode;
以及,在所述音视频界面中显示模式切换控件; And, display mode switching control in the audio and video interface;
所述装置还包括切换控件,配置为响应于针对所述模式切换控件的触发操作,控制将所述灵感模式切换为编辑模式,所述编辑模式,用于对所述待匹配音乐进行编辑。The device further includes a switching control configured to control switching of the inspiration mode to an editing mode in response to a triggering operation of the mode switching control, and the editing mode is used to edit the music to be matched.
在一些实施例中,第二显示模块,还配置为响应于在所述编辑模式下对所述待匹配音乐的编辑操作,显示对编辑后的所述待匹配音乐进行音轨分离后所得到的各个音轨;In some embodiments, the second display module is further configured to, in response to an editing operation on the music to be matched in the editing mode, display the audio track separation of the edited music to be matched. individual audio tracks;
更新显示与所述各个音频相匹配的至少一个目标视频。The update displays at least one target video matching the respective audio.
在一些实施例中,第二显示模块,还配置为响应于针对所述模式切换控件的触发操作,显示编辑引导信息,所述编辑引导信息,用于引导编辑对象在所述编辑模式下,对所述待匹配音乐进行编辑。In some embodiments, the second display module is further configured to display editing guidance information in response to the triggering operation of the mode switching control, and the editing guidance information is used to guide the editing object in the editing mode. The music to be matched is edited.
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施方式以及对应的有益效果可参见前面的方法实施例,在此不再赘述。During specific implementation, each of the above modules can be implemented as an independent entity, or can be combined in any way to be implemented as the same or several entities. The specific implementation methods and corresponding beneficial effects of each of the above modules can be found in the previous method embodiments. I won’t go into details here.
本申请实施例还提供一种电子设备,该电子设备可以是服务器或终端等,如图22所示,其示出了本申请实施例所涉及的电子设备的结构示意图,具体来讲:An embodiment of the present application also provides an electronic device, which may be a server or a terminal, etc., as shown in Figure 22, which shows a schematic structural diagram of the electronic device involved in the embodiment of the present application. Specifically:
该电子设备可以包括一个或者一个以上处理核心的处理器2201、一个或一个以上计算机可读存储介质的存储器2202、电源2203和输入单元2204等部件。本领域技术人员可以理解,图22中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:The electronic device may include components such as a processor 2201 of one or more processing cores, a memory 2202 of one or more computer-readable storage media, a power supply 2203, and an input unit 2204. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 22 does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange different components. in:
处理器2201是该电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器2202内的计算机程序和/或模块,以及调用存储在存储器2202内的数据,执行电子设备的各种功能和处理数据。可选的,处理器2201可包括一个或多个处理核心;优选的,处理器2201可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器2201中。The processor 2201 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire electronic device, by running or executing computer programs and/or modules stored in the memory 2202, and calling programs stored in the memory 2202. Data, perform various functions of electronic devices and process data. Optionally, the processor 2201 may include one or more processing cores; preferably, the processor 2201 may integrate an application processor and a modem processor, where the application processor mainly processes operating systems, user interfaces, application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 2201.
存储器2202可配置为存储计算机程序以及模块,处理器2201通过运行存储在存储器2202的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器2202可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的计算机程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器2202可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器2202还可以包括存储器控制器,以提供处理器2201对存储器2202的访问。The memory 2202 may be configured to store computer programs and modules, and the processor 2201 executes various functional applications and data processing by running the computer programs and modules stored in the memory 2202. The memory 2202 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store data based on Data created by the use of electronic devices, etc. In addition, memory 2202 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 2202 may also include a memory controller to provide the processor 2201 with access to the memory 2202.
电子设备还包括给各个部件供电的电源2203,优选的,电源2203可以通过电源管理系统与处理器2201逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源2203还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The electronic device also includes a power supply 2203 that supplies power to various components. Preferably, the power supply 2203 can be logically connected to the processor 2201 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system. The power supply 2203 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
该电子设备还可包括输入单元2204,该输入单元2204可配置为接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The electronic device may also include an input unit 2204 that may be configured to receive input numeric or character information and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
尽管未示出,电子设备还可以包括显示单元等,在此不再赘述。具体在本实施例中,电子设备中的处理器2201会按照如下的指令,将一个或一个以上的计算机程序的进程对应的可执行文件加载到存储器2202中,并由处理器2201来运行存储在存储器2202中的计算机程序,从而实现各种功能,比如:Although not shown, the electronic device may also include a display unit and the like, which will not be described again here. Specifically, in this embodiment, the processor 2201 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 2202 according to the following instructions, and the processor 2201 will run the executable files stored in the computer program. Computer programs in memory 2202 to implement various functions, such as:
显示待匹配音乐的音乐匹配界面,音乐匹配界面内包括匹配控件;Display a music matching interface for music to be matched, and the music matching interface includes matching controls;
响应于对匹配控件的触发操作,显示音视频界面,音视频界面包括待匹配音乐的目标音轨、以及与目标音轨匹配的至少一个目标视频。In response to the triggering operation of the matching control, an audio and video interface is displayed, and the audio and video interface includes a target audio track of the music to be matched, and at least one target video matching the target audio track.
以上各个操作的具体实施方式以及对应的有益效果可参见上文对音乐匹配方法的详细描述,在此不作赘述。The specific implementation of each of the above operations and the corresponding beneficial effects can be found in the detailed description of the music matching method above, and will not be described again here.
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过计算机程序来完成,或通过计算机程序控制相关的硬件来完成,该计算机程序可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a computer program, or by controlling relevant hardware by a computer program. The computer program can be stored in a computer-readable storage. media and loaded and executed by the processor.
为此,本申请实施例提供一种计算机可读存储介质,其中存储有计算机程序,该计算机程序能够被处理器进行加载,以执行本申请实施例所提供的任一种音乐匹配方法中的步骤。例如,该计算机程序可以执行如下步骤:To this end, embodiments of the present application provide a computer-readable storage medium in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any music matching method provided by the embodiments of the present application. . For example, the computer program can perform the following steps:
显示待匹配音乐的音乐匹配界面,音乐匹配界面内包括匹配控件;Display a music matching interface for music to be matched, and the music matching interface includes matching controls;
响应于对匹配控件的触发操作,显示音视频界面,音视频界面包括待匹配音乐的目标音轨、以及与目标音轨匹配的至少一个目标视频。In response to the triggering operation of the matching control, an audio and video interface is displayed, and the audio and video interface includes a target audio track of the music to be matched, and at least one target video matching the target audio track.
以上各个操作的具体实施方式以及对应的有益效果可参见前面的实施例,在此不再赘述。The specific implementation of each of the above operations and the corresponding beneficial effects can be found in the previous embodiments, and will not be described again here.
其中,该计算机可读存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
由于该计算机可读存储介质中所存储的计算机程序,可以执行本申请实施例所提供的任一种音乐匹配方法中的步骤,因此,可以实现本申请实施例所提供的任一种音乐匹配方法所能实现的有益效果,详见前面的 实施例,在此不再赘述。Since the computer program stored in the computer-readable storage medium can execute the steps in any music matching method provided by the embodiments of the present application, any music matching method provided by the embodiments of the present application can be implemented. The beneficial effects that can be achieved are detailed in the previous section. The embodiments will not be described again here.
其中,根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述音乐匹配方法。Among them, according to one aspect of the present application, a computer program product or computer program is provided. The computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above music matching method.
以上对本申请实施例所提供的一种音乐匹配方法、装置、电子设备和计算机可读存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。 The music matching method, device, electronic equipment and computer-readable storage medium provided by the embodiments of the present application have been introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The above embodiments The description is only used to help understand the method and core ideas of the present application; at the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the ideas of the present application. In summary, , the content of this description should not be understood as a limitation of this application.

Claims (22)

  1. 一种音乐匹配方法,所述方法由电子设备执行,包括:A music matching method, the method is executed by an electronic device, including:
    显示待匹配音乐的音乐匹配界面,所述音乐匹配界面内包括匹配控件;Display a music matching interface for music to be matched, and the music matching interface includes matching controls;
    响应于对所述匹配控件的触发操作,显示音视频界面,所述音视频界面包括:所述待匹配音乐的目标音轨、以及与所述目标音轨匹配的至少一个目标视频。In response to the triggering operation of the matching control, an audio and video interface is displayed, and the audio and video interface includes: the target audio track of the music to be matched, and at least one target video matching the target audio track.
  2. 根据权利要求1所述的音乐匹配方法,其中,所述响应于对所述匹配控件的触发操作,显示音视频界面,包括:The music matching method according to claim 1, wherein the display of an audio and video interface in response to a triggering operation of the matching control includes:
    响应于对所述匹配控件的触发操作,对所述待匹配音乐进行音轨分离,得到所述待匹配音乐的目标音轨数据;In response to the triggering operation of the matching control, track separation is performed on the music to be matched, and the target track data of the music to be matched is obtained;
    对所述目标音轨数据进行格式化,得到所述目标音轨数据对应的模式串;Format the target audio track data to obtain a pattern string corresponding to the target audio track data;
    根据所述模式串,确定与所述目标音轨匹配的至少一个目标视频,所述目标音轨为所述目标音轨数据对应的音轨;Determine at least one target video that matches the target audio track according to the pattern string, and the target audio track is the audio track corresponding to the target audio track data;
    显示包括所述目标音轨及所述至少一个目标视频的音视频界面。Display an audio and video interface including the target audio track and the at least one target video.
  3. 根据权利要求2所述的音乐匹配方法,其中,所述根据所述模式串,确定与所述目标音轨匹配的至少一个目标视频,包括:The music matching method according to claim 2, wherein determining, according to the pattern string, at least one target video matching the target audio track includes:
    获取各个待匹配视频中初始音乐的主串;Obtain the main string of the initial music in each video to be matched;
    筛选出与所述模式串匹配的主串对应的初始音乐,得到目标音乐;Filter out the initial music corresponding to the main string matching the pattern string to obtain the target music;
    将与所述目标音乐对应的待匹配视频,确定为与所述目标音轨匹配的目标视频。The video to be matched corresponding to the target music is determined as the target video matching the target audio track.
  4. 根据权利要求3所述的音乐匹配方法,其中,所述筛选出与所述模式串匹配的主串对应的初始音乐,得到目标音乐,包括:The music matching method according to claim 3, wherein the filtering out the initial music corresponding to the main string matching the pattern string to obtain the target music includes:
    将所述模式串与所述主串进行匹配,得到所述模式串与所述主串的匹配度;Match the pattern string with the main string to obtain the matching degree between the pattern string and the main string;
    将匹配度大于预设匹配阈值的主串所对应的至少一个初始音乐,确定为候选音乐;Determine at least one initial music corresponding to the main string whose matching degree is greater than the preset matching threshold as candidate music;
    根据所述目标音轨数据,从所述至少一个候选音乐中筛选出目标音乐。Target music is filtered out from the at least one candidate music according to the target track data.
  5. 根据权利要求4所述的音乐匹配方法,其中,所述根据所述目标音轨数据,从所述至少一个候选音乐中筛选出目标音乐,包括:The music matching method according to claim 4, wherein filtering out the target music from the at least one candidate music according to the target track data includes:
    从所述目标音轨数据中筛选出目标鼓点音轨数据;Filter out target drum beat track data from the target track data;
    从所述目标鼓点音轨数据中提取出目标鼓点的第一时间数据,并根据各所述候选音乐对应的鼓点音轨数据,确定各所述候选音乐的第二时间数据;Extract the first time data of the target drum beat from the target drum beat track data, and determine the second time data of each of the candidate music based on the drum beat track data corresponding to each of the candidate music;
    根据所述第一时间数据和各所述候选音乐的第二时间数据,从所述至少一个候选音乐中筛选出目标音乐。Target music is filtered out from the at least one candidate music according to the first time data and the second time data of each candidate music.
  6. 根据权利要求5所述的音乐匹配方法,其中,所述从所述目标鼓点音轨数据中提取出目标鼓点的第一时间数据,包括:The music matching method according to claim 5, wherein the extracting the first time data of the target drum beat from the target drum beat track data includes:
    在所述目标鼓点音轨数据中识别出每一鼓点对应的时间数据,得到时间数据集合;Identify the time data corresponding to each drum beat in the target drum beat track data to obtain a time data set;
    获取目标字符在所述模式串中的初始位置,其中,所述目标字符为,所述目标鼓点音轨数据中目标鼓点对应的字符;Obtain the initial position of the target character in the pattern string, wherein the target character is the character corresponding to the target drum beat in the target drum beat track data;
    根据所述初始位置,在所述时间数据集合中,筛选出所述目标鼓点对应的时间数据作为所述第一时间数据。According to the initial position, the time data corresponding to the target drum beat is filtered out from the time data set as the first time data.
  7. 根据权利要求2所述的音乐匹配方法,其中,所述目标音轨数据包括所述待匹配音乐中各鼓点对应的目标鼓点音轨数据;The music matching method according to claim 2, wherein the target track data includes target drum track data corresponding to each drum beat in the music to be matched;
    所述对所述目标音轨数据进行格式化,得到所述目标音轨数据对应的模式串,包括:Formatting the target audio track data to obtain a pattern string corresponding to the target audio track data includes:
    按照各个所述目标鼓点音轨数据对应的时间,对各个目标鼓点音轨数据进行排序,得到第一目标鼓点序列;Sorting the target drum beat track data according to the time corresponding to each target drum beat track data to obtain the first target drum beat sequence;
    根据所述第一目标鼓点序列,对所述各个目标鼓点音轨数据进行格式化,得到目标鼓点音轨对应的模式串,所述目标鼓点音轨为所述目标鼓点音轨数据对应的音轨。According to the first target drum sequence, each target drum track data is formatted to obtain a pattern string corresponding to the target drum track, and the target drum track is the track corresponding to the target drum track data. .
  8. 根据权利要求7所述的音乐匹配方法,其中,所述根据所述第一目标鼓点序列,对所述各个目标鼓点音轨数据进行格式化,得到目标鼓点音轨对应的模式串,包括:The music matching method according to claim 7, wherein the formatting of each target drum track data according to the first target drum sequence to obtain a pattern string corresponding to the target drum track includes:
    计算所述第一目标鼓点序列中目标鼓点音轨数据对的目标时间间隔,所述目标鼓点音轨数据对包括相邻的两个目标鼓点音轨数据; Calculate the target time interval of the target drum track data pair in the first target drum sequence, where the target drum track data pair includes two adjacent target drum track data;
    针对所述第一目标鼓点序列中每一个目标鼓点音轨数据,根据所述目标鼓点音轨数据对中目标鼓点音轨数据的鼓点类型、和所述目标鼓点音轨数据对的目标时间间隔,对所述目标鼓点音轨数据进行格式化,得到各所述目标鼓点音轨数据对应的格式化结果;For each target drum beat track data in the first target drum beat sequence, according to the drum beat type of the target drum beat track data pair and the target time interval of the target drum beat track data pair, Format the target drum track data to obtain formatting results corresponding to each target drum track data;
    基于各所述目标鼓点音轨数据对应的格式化结果,确定目标鼓点音轨对应的模式串。Based on the formatting result corresponding to each target drum track data, a pattern string corresponding to the target drum track is determined.
  9. 根据权利要求8所述的音乐匹配方法,其中,所述针对所述第一目标鼓点序列中每一个目标鼓点音轨数据,根据所述目标鼓点音轨数据对中目标鼓点音轨数据的鼓点类型、和所述目标鼓点音轨数据对的目标时间间隔,对所述目标鼓点音轨数据进行格式化,包括:The music matching method according to claim 8, wherein for each target drum beat track data in the first target drum beat sequence, the drum beat type of the target drum beat track data is matched according to the target drum beat track data. , and the target time interval of the target drum track data pair, formatting the target drum track data includes:
    在所述第一目标鼓点序列中,删除目标时间间隔未超过预设时间间隔的目标鼓点音轨数据对,得到第二目标鼓点序列;In the first target drum beat sequence, delete the target drum beat track data pairs whose target time interval does not exceed the preset time interval to obtain the second target drum beat sequence;
    针对所述第二目标鼓点序列中每一个目标鼓点音轨数据,根据包含所述目标鼓点音轨数据的目标鼓点音轨数据对所对应的鼓点类型,和包含所述目标鼓点音轨数据的目标鼓点音轨数据对的目标时间间隔,对所述目标鼓点音轨数据进行格式化;For each target drum track data in the second target drum sequence, the drum type corresponding to the target drum track data pair containing the target drum track data, and the target drum track data containing the target drum track data The target time interval of the drum track data pair, formatting the target drum track data;
    所述基于各所述目标鼓点音轨数据对应的格式化结果,确定目标鼓点音轨对应的模式串,包括:Determining the pattern string corresponding to the target drum track based on the formatting result corresponding to each target drum track data includes:
    基于所述第二目标鼓点序列中每一个目标鼓点音轨数据对应的格式化结果,确定目标鼓点音轨对应的模式串。Based on the formatting result corresponding to each target drum track data in the second target drum sequence, a pattern string corresponding to the target drum track is determined.
  10. 根据权利要求1所述的音乐匹配方法,其中,所述响应于对所述匹配控件的触发操作,显示音视频界面,包括:The music matching method according to claim 1, wherein the display of an audio and video interface in response to a triggering operation of the matching control includes:
    响应于对所述匹配控件的触发操作,将所述待匹配音乐的目标音轨显示在第一显示区域;In response to the triggering operation of the matching control, display the target track of the music to be matched in the first display area;
    将与所述目标音轨匹配的目标视频显示在第二显示区域;Display the target video matching the target audio track in the second display area;
    所述音视频界面包括所述第一显示区域和所述第二显示区域。The audio and video interface includes the first display area and the second display area.
  11. 根据权利要求10所述的音乐匹配方法,其中,所述目标音轨的数量为至少两个,每个所述目标音轨对应所述待匹配音乐的一种音乐属性,所述将所述待匹配音乐的目标音轨显示在第一显示区域,包括:The music matching method according to claim 10, wherein the number of the target audio tracks is at least two, each of the target audio tracks corresponds to a music attribute of the music to be matched, and the target audio track is The target audio track of the matching music is displayed in the first display area, including:
    在所述音视频界面中所述第一显示区域,按照预设显示顺序,展示至少两个所述目标音轨。In the first display area of the audio and video interface, at least two of the target audio tracks are displayed in a preset display order.
  12. 根据权利要求10所述的音乐匹配方法,其中,所述第二显示区域包括第一子显示区域和第二子显示区域,所述目标视频的数量为多个,多个所述目标视频构成目标视频集合,所述目标视频集合包括播放视频;The music matching method according to claim 10, wherein the second display area includes a first sub-display area and a second sub-display area, the number of the target videos is multiple, and a plurality of the target videos constitute a target A video collection, the target video collection includes playback videos;
    所述将与所述目标音轨匹配的目标视频显示在第二显示区域,包括:The target video matching the target audio track is displayed in the second display area, including:
    将与所述目标视频集合中各目标视频显示在所述第一子显示区域;Display each target video in the target video set in the first sub-display area;
    将所述播放视频显示在所述第二子显示区域,所述播放视频为所述目标视频集合中处于选中状态的目标视频。The playback video is displayed in the second sub-display area, and the playback video is a target video in a selected state in the target video set.
  13. 根据权利要求12所述的音乐匹配方法,其中,将与所述目标视频集合中各目标视频显示在所述第一子显示区域,包括:The music matching method according to claim 12, wherein displaying each target video in the target video set in the first sub-display area includes:
    获取与所述目标视频集合中各目标视频的播放量;Obtain the playback volume of each target video in the target video collection;
    按照所述播放量从高到低的顺序,将所述目标视频集合中各目标视频显示在所述第一子显示区域。Each target video in the target video set is displayed in the first sub-display area in order from high to low playback volume.
  14. 根据权利要求1所述的音乐匹配方法,其中,所述目标音轨为,对所述待匹配音乐进行音轨分离后所得到;所述音视频界面还包括所述目标音轨的调整控件;The music matching method according to claim 1, wherein the target audio track is obtained by separating the audio tracks of the music to be matched; the audio and video interface further includes an adjustment control for the target audio track;
    在所述响应于对所述匹配控件的触发操作,显示音视频界面之后,还包括:After the audio and video interface is displayed in response to the triggering operation of the matching control, the method further includes:
    响应于对所述调整控件的触发操作,获取所述调整控件对应的调整目标音轨的音频文件的当前播放音量;In response to a triggering operation on the adjustment control, obtain the current playback volume of the audio file of the adjustment target audio track corresponding to the adjustment control;
    当所述当前播放音量超过静音音量时,将所述当前播放音量调整为所述静音音量,并对所述调整目标音轨添加蒙层;When the current playback volume exceeds the mute volume, adjust the current playback volume to the mute volume, and add a mask layer to the adjustment target audio track;
    其中,所述蒙层,用于隐藏所述调整目标音轨,得到调整后音乐。Wherein, the mask layer is used to hide the adjustment target audio track to obtain the adjusted music.
  15. 根据权利要求14所述的音乐匹配方法,其中,所述对所述调整目标音轨添加蒙层之后,还包括:The music matching method according to claim 14, wherein after adding a mask layer to the adjustment target audio track, it further includes:
    若所述调整目标音轨为预设目标音轨,根据所述调整后音乐的音轨,确定所述调整后音乐对应的目标模式串;If the adjusted target audio track is a preset target audio track, determine the target pattern string corresponding to the adjusted music according to the audio track of the adjusted music;
    根据所述目标模式串,对所述目标视频集合中的目标视频进行更新,得到更新后视频集合。According to the target pattern string, the target videos in the target video set are updated to obtain an updated video set.
  16. 根据权利要求1所述的音乐匹配方法,其中,所述响应于对所述匹配控件的触发操作, 显示音视频界面,包括:The music matching method according to claim 1, wherein in response to a triggering operation of the matching control, Display audio and video interface, including:
    响应于在灵感模式下对所述匹配控件的触发操作,显示音视频界面;In response to a triggering operation on the matching control in the inspiration mode, display an audio and video interface;
    所述方法还包括:The method also includes:
    在所述音视频界面中显示模式切换控件;Display a mode switching control in the audio and video interface;
    响应于针对所述模式切换控件的触发操作,控制将所述灵感模式切换为编辑模式,所述编辑模式,用于对所述待匹配音乐进行编辑。In response to a triggering operation on the mode switching control, the inspiration mode is controlled to be switched to an editing mode, and the editing mode is used to edit the music to be matched.
  17. 根据权利要求16所述的音乐匹配方法,其中,所述控制将所述灵感模式切换为编辑模式之后,所述方法还包括:The music matching method according to claim 16, wherein after the control switches the inspiration mode to the editing mode, the method further includes:
    响应于在所述编辑模式下对所述待匹配音乐的编辑操作,显示对编辑后的所述待匹配音乐进行音轨分离后所得到的各个音轨;In response to an editing operation on the music to be matched in the editing mode, displaying each audio track obtained by separating the tracks of the edited music to be matched;
    更新显示与所述各个音频相匹配的至少一个目标视频。The update displays at least one target video matching the respective audio.
  18. 根据权利要求16所述的音乐匹配方法,其中,所述方法还包括:The music matching method according to claim 16, wherein the method further includes:
    响应于针对所述模式切换控件的触发操作,显示编辑引导信息,所述编辑引导信息,用于引导编辑对象在所述编辑模式下,对所述待匹配音乐进行编辑。In response to the triggering operation of the mode switching control, editing guidance information is displayed, and the editing guidance information is used to guide the editing object to edit the music to be matched in the editing mode.
  19. 一种音乐匹配装置,包括:A music matching device including:
    第一显示模块,配置为显示待匹配音乐的音乐匹配界面,所述音乐匹配界面内包括匹配控件;The first display module is configured to display a music matching interface for music to be matched, and the music matching interface includes matching controls;
    第二显示模块,配置为响应于对所述匹配控件的触发操作,显示音视频界面,所述音视频界面包括:所述待匹配音乐的目标音轨、以及与所述目标音轨匹配的至少一个目标视频。The second display module is configured to display an audio and video interface in response to a triggering operation on the matching control. The audio and video interface includes: the target audio track of the music to be matched, and at least one audio track that matches the target audio track. A target video.
  20. 一种电子设备,包括处理器和存储器,所述存储器存储有计算机程序,所述处理器配置为运行所述存储器内的计算机程序,以执行权利要求1至18任一项所述的音乐匹配方法。An electronic device including a processor and a memory, the memory stores a computer program, the processor is configured to run the computer program in the memory to perform the music matching method according to any one of claims 1 to 18 .
  21. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序适于处理器进行加载,以执行权利要求1至18任一项所述的音乐匹配方法。A computer-readable storage medium stores a computer program, and the computer program is suitable for loading by a processor to execute the music matching method described in any one of claims 1 to 18.
  22. 一种计算机程序产品,所述计算机程序产品存储有计算机程序,所述计算机程序适于处理器进行加载,以执行权利要求1至18任一项所述的音乐匹配方法。 A computer program product, the computer program product stores a computer program, the computer program is suitable for loading by a processor to execute the music matching method described in any one of claims 1 to 18.
PCT/CN2023/080987 2022-04-01 2023-03-13 Music matching method and apparatus, electronic device, storage medium, and program product WO2023185425A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210348876.X 2022-04-01
CN202210348876.XA CN116939323A (en) 2022-04-01 2022-04-01 Music matching method, device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2023185425A1 true WO2023185425A1 (en) 2023-10-05

Family

ID=88198986

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/080987 WO2023185425A1 (en) 2022-04-01 2023-03-13 Music matching method and apparatus, electronic device, storage medium, and program product

Country Status (2)

Country Link
CN (1) CN116939323A (en)
WO (1) WO2023185425A1 (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150039646A1 (en) * 2013-08-02 2015-02-05 Google Inc. Associating audio tracks with video content
US20160336039A1 (en) * 2015-05-11 2016-11-17 Mibblio, Inc. Systems and methods for creating music videos synchronized with an audio track
US20190108856A1 (en) * 2011-03-29 2019-04-11 Capshore, Llc User interface for method for creating a custom track
US20190286720A1 (en) * 2018-03-19 2019-09-19 Motorola Mobility Llc Automatically Associating an Image with an Audio Track
CN111724807A (en) * 2020-08-05 2020-09-29 字节跳动有限公司 Audio separation method and device, electronic equipment and computer readable storage medium
CN112333336A (en) * 2020-10-26 2021-02-05 维沃移动通信(深圳)有限公司 Audio editing method and device, electronic equipment and storage medium
CN112911379A (en) * 2021-01-15 2021-06-04 北京字跳网络技术有限公司 Video generation method and device, electronic equipment and storage medium
CN113347503A (en) * 2021-06-15 2021-09-03 广州酷狗计算机科技有限公司 Audio and video playing method and device, computer equipment and storage medium
CN113573128A (en) * 2021-02-25 2021-10-29 腾讯科技(深圳)有限公司 Audio processing method, device, terminal and storage medium
CN113823250A (en) * 2021-11-25 2021-12-21 广州酷狗计算机科技有限公司 Audio playing method, device, terminal and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190108856A1 (en) * 2011-03-29 2019-04-11 Capshore, Llc User interface for method for creating a custom track
US20150039646A1 (en) * 2013-08-02 2015-02-05 Google Inc. Associating audio tracks with video content
US20160336039A1 (en) * 2015-05-11 2016-11-17 Mibblio, Inc. Systems and methods for creating music videos synchronized with an audio track
US20190286720A1 (en) * 2018-03-19 2019-09-19 Motorola Mobility Llc Automatically Associating an Image with an Audio Track
CN111724807A (en) * 2020-08-05 2020-09-29 字节跳动有限公司 Audio separation method and device, electronic equipment and computer readable storage medium
CN112333336A (en) * 2020-10-26 2021-02-05 维沃移动通信(深圳)有限公司 Audio editing method and device, electronic equipment and storage medium
CN112911379A (en) * 2021-01-15 2021-06-04 北京字跳网络技术有限公司 Video generation method and device, electronic equipment and storage medium
CN113573128A (en) * 2021-02-25 2021-10-29 腾讯科技(深圳)有限公司 Audio processing method, device, terminal and storage medium
CN113347503A (en) * 2021-06-15 2021-09-03 广州酷狗计算机科技有限公司 Audio and video playing method and device, computer equipment and storage medium
CN113823250A (en) * 2021-11-25 2021-12-21 广州酷狗计算机科技有限公司 Audio playing method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN116939323A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
US20090113022A1 (en) Facilitating music collaborations among remote musicians
JP2014530377A5 (en)
US10506268B2 (en) Identifying media content for simultaneous playback
US11775580B2 (en) Playlist preview
KR101800193B1 (en) Method and system for searching content creators
CN106531201A (en) Song recording method and device
CN112328142A (en) Live broadcast interaction method and device, electronic equipment and storage medium
US9305601B1 (en) System and method for generating a synchronized audiovisual mix
JP2009301477A (en) Content editing device, method and program
CN106686431A (en) Synthesizing method and equipment of audio file
WO2023185425A1 (en) Music matching method and apparatus, electronic device, storage medium, and program product
JP5459331B2 (en) Post reproduction apparatus and program
US20160307551A1 (en) Multifunctional Media Players
CN106448710B (en) A kind of calibration method and music player devices of music play parameters
US11417315B2 (en) Information processing apparatus and information processing method and computer-readable storage medium
GB2607693A (en) Method and system for enriching livestreaming content for content viewers
JP6144477B2 (en) Collaboration singing video display system
JP2014123085A (en) Device, method, and program for further effectively performing and providing body motion and so on to be performed by viewer according to singing in karaoke
CN116932809A (en) Music information display method, device and computer readable storage medium
CN116932810A (en) Music information display method, device and computer readable storage medium
JP2007184674A (en) Digest making system
CN116935817A (en) Music editing method, apparatus, electronic device, and computer-readable storage medium
WO2024047816A1 (en) Video-related sound reproduction method, video-related sound reproduction device, and video-related sound reproduction program
WO2024047815A1 (en) Likelihood-of-excitement control method, likelihood-of-excitement control device, and likelihood-of-excitement control method
JP5615115B2 (en) Karaoke device and karaoke system

Legal Events

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

Ref document number: 23777802

Country of ref document: EP

Kind code of ref document: A1