Audio file recommendation method, device, electronic device and readable storage medium

By obtaining the shooting event and content tag of the video file, and selecting the associated audio from the music library, the problem of personalization and accuracy of audio file recommendation in the existing technology is solved, and the correlation between the audio file and the video file is improved and the user experience is improved.

CN112214636BActive Publication Date: 2024-08-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011005042.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-21
Publication Date
2024-08-27
Estimated Expiration
2040-09-21

AI Technical Summary

Technical Problem

Existing audio file recommendation technology cannot adjust candidate audio based on video files, has a low degree of personalized recommendation, and cannot achieve accurate recommendation of audio files.

Method used

By obtaining the shooting event and content tags of video files, the target audio associated with these tags is selected from the music library, and audio recommendation information is generated to improve the accuracy of audio selection and personalized recommendations.

Benefits of technology

It achieves highly relevant recommendations between audio files and video files, improving user experience and recommendation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112214636B
    Figure CN112214636B
Patent Text Reader

Abstract

The present application is applicable to the field of data processing technology, and provides a method, device, electronic device, and readable storage medium for recommending an audio file, the method comprising: obtaining an event tag of a shooting event corresponding to a video file; parsing the video file to obtain a content tag corresponding to the video file; selecting a target audio associated with the content tag and / or the event tag in the music library, and generating audio recommendation information for the video file based on the target audio. The technical solution provided by the present application searches for the target audio through event tags and content tags. The accuracy of the target audio selection is improved, and while making personalized recommendations for audio files, accurate push can also be achieved, which improves the user experience and the correlation between the recommended audio files and video files.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular, relates to a method, device, electronic device and readable storage medium for recommending an audio file. Background Art

[0002] With the continuous development of multimedia technology, short videos and micro videos have become popular. Users can use electronic devices to record their lives in daily life. In order to improve the fun and watchability of video files, users can add background music to video files. Therefore, how electronic devices recommend background music that matches video files to users has become an urgent problem to be solved.

[0003] Existing audio file recommendation technologies often preset multiple different music categories, such as "rock", "folk", "pop" and other different music categories, and fixedly associate multiple candidate audios with different music categories, and recommend multiple candidate audios associated with the category selected by the user. However, this method cannot adjust the candidate audios according to the video file, the degree of personalized recommendation is low, and it is impossible to achieve accurate recommendation of audio files. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device and readable storage medium for recommending audio files, which can solve the problems of existing audio file recommendation technologies, such as the inability to adjust candidate audios according to video files, the low degree of personalized recommendations, and the inability to achieve accurate recommendations of audio files.

[0005] In a first aspect, an embodiment of the present application provides a method for recommending an audio file, comprising:

[0006] Get the event tag of the shooting event corresponding to the video file;

[0007] Parsing the video file to obtain a content tag corresponding to the video file;

[0008] A target audio associated with the content tag and / or the event tag is selected in the music library, and audio recommendation information of the video file is generated based on the target audio.

[0009] The implementation of the embodiment of the present application has the following beneficial effects: when it is necessary to generate an audio file associated with a video file, obtain the video tag corresponding to the shooting event of the video file, and obtain the content tag based on the shooting content of the video file, extract the associated target audio from the music library through the video tag and the content tag, and generate the audio recommendation information associated with the video file to achieve the purpose of personalized recommendation. Compared with the existing audio file recommendation technology, the embodiment of the present application can not only generate the corresponding content tag according to the video content, but also generate the event tag related to the shooting event, so as to find the target audio through the above two types of tags. The accuracy of the target audio selection is improved, and while making personalized recommendations for audio files, accurate push can be achieved, which improves the user experience and also improves the relevance between the recommended audio files and video files.

[0010] In a possible implementation manner of the first aspect, the event tag includes a shooting location; and selecting a target audio associated with the content tag and / or the event tag in the music library includes:

[0011] Acquire text information of each existing audio in the music library, and use the existing audio containing the shooting location in the text information as the target audio; and / or

[0012] Acquire a video clip associated with the shooting location, and use the soundtrack audio of the video clip as the target audio; and / or

[0013] A historical event associated with the shooting location is determined, and an audio file corresponding to the historical event is used as the target audio.

[0014] In a possible implementation manner of the first aspect, the event tag includes a shooting date; and selecting a target audio associated with the content tag and / or the event tag in the music library includes:

[0015] If the shooting date is any preset specific date, the audio file associated with the specific date is used as the target audio.

[0016] In a possible implementation manner of the first aspect, before if the shooting date is any preset specific date, using the audio file associated with the specific date as the target audio, the method further includes:

[0017] Get the user information of the currently logged in user account;

[0018] The specific date is determined based on the user information.

[0019] In a possible implementation manner of the first aspect, selecting the target audio associated with the content tag and / or the event tag in the music library includes:

[0020] Using the content tag and the event tag to generate an initial tag sequence corresponding to the video file;

[0021] Based on a preset label mapping algorithm, a mapping label sequence corresponding to the initial label sequence is generated; each label in the mapping label sequence is configured with an associated weight value;

[0022] Calculating the matching degree of each existing audio in the music library based on the weight value of each tag in the mapping tag sequence;

[0023] The target audio is determined from the existing audio based on the matching degree.

[0024] In a possible implementation manner of the first aspect, determining the target audio from the existing audio based on the matching degree includes:

[0025] Selecting the existing audio whose matching degree is greater than a preset matching threshold as the candidate audio;

[0026] Determining user characteristics of a currently logged-in user account based on user information of the user account;

[0027] If any of the candidate audios matches the user feature, the candidate audio is used as the target audio.

[0028] In a possible implementation manner of the first aspect, parsing the video file to obtain a content tag corresponding to the video file includes:

[0029] Determine a picture tag included in each video image frame of the video file;

[0030] Counting the number of occurrences of each of the picture labels in all the video image frames of the video file, and sorting the picture labels in descending order of the number of occurrences to obtain a picture label sequence;

[0031] The first N picture tags among the picture tags are selected as content tags corresponding to the video file; wherein N is a positive integer.

[0032] In a possible implementation manner of the first aspect, before selecting the target audio associated with the content tag and / or the event tag in the music library, the method further includes:

[0033] If the authorization information of the currently logged-in user account is stored, the operation record of the user account is obtained;

[0034] generating a user feature of the user account based on the operation record;

[0035] Existing music matching the user characteristics is extracted from the database to generate the music library.

[0036] In a second aspect, an embodiment of the present application provides a device for recommending an audio file, including:

[0037] An event tag acquisition unit, used to acquire an event tag of a shooting event corresponding to a video file;

[0038] A content tag acquisition unit, used to parse the video file to obtain a content tag corresponding to the video file;

[0039] The audio recommendation information generating unit is used to select a target audio associated with the content tag and / or the event tag in the music library, and generate audio recommendation information for the video file based on the target audio.

[0040] In a third aspect, an embodiment of the present application provides an electronic device, a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the computer program, the method for recommending audio files described in any one of the first aspects above is implemented.

[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and wherein when the computer program is executed by a processor, the method for recommending an audio file described in any one of the first aspects above is implemented.

[0042] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the audio file recommendation method described in any one of the first aspects above.

[0043] In a sixth aspect, an embodiment of the present application provides a chip system, including a processor, the processor being coupled to a memory, the processor executing a computer program stored in the memory to implement the audio file recommendation method as described in any one of the first aspects.

[0044] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0046] Figure 2 is a software structure block diagram of the electronic device of the embodiment of the present application;

[0047] Figure 3 is a schematic diagram of an editing interface provided by an embodiment of the present application;

[0048] Figure 4 is a flowchart of an implementation method of an audio file recommendation method provided by an embodiment of the present application;

[0049] Figure 5 is a flow chart of the operation of selecting a video file provided by an embodiment of the present application;

[0050] Figure 6 is a schematic diagram of a video image frame provided by an embodiment of the present application;

[0051] Figure 7 is a schematic diagram of marking content tags provided in the first embodiment of the present application;

[0052] Figure 8 This is a specific implementation flow chart of S402 in the audio file recommendation method provided in one embodiment of the present application;

[0053] Fig. 9 It is a schematic diagram of dividing video picture segments provided by an embodiment of the present application;

[0054] Fig.10 This is a schematic diagram of a content tag generation process provided by an embodiment of the present application;

[0055] Fig.11 is a schematic diagram of audio recommendation information provided by an embodiment of the present application;

[0056] Fig.12 This is a schematic diagram of obtaining a shooting location provided in an embodiment of the present application;

[0057] Fig.13 is a flowchart for implementing S403 in the audio file recommendation method provided by another embodiment of the present application;

[0058] Fig.14 is a flowchart for implementing S403 in the audio file recommendation method provided by another embodiment of the present application;

[0059] Fig.15 is a specific implementation flow chart of S403 in the audio file recommendation method provided by another embodiment of the present application;

[0060] Fig.16 This is a schematic diagram of generating a mapping tag sequence provided by an embodiment of the present application;

[0061] Fig.17 The present application provides a flowchart of a method for recommending an audio file.

[0062] Fig.18This is a schematic diagram of obtaining authorization information provided by an embodiment of the present application;

[0063] Fig.19 is a flowchart of interaction between an electronic device and a cloud server provided in one embodiment of the present application;

[0064] Fig. 20 This is a schematic diagram of generating content tags provided by an embodiment of the present application;

[0065] Fig.21 is a structural block diagram of an audio file recommendation device provided by an embodiment of the present application;

[0066] Fig. 22 It is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0067] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0068] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0069] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0070] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0071] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0072] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0073] The audio file recommendation method provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific types of electronic devices.

[0074] For example, the electronic device can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a computer, a laptop computer, a handheld communication device, a handheld computing device, and / or other devices for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (PLMN) network, etc.

[0075] Figure 1 A schematic structural diagram of an electronic device 100 is shown.

[0076] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0077] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0078] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0079] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0080] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0081] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0082] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0083] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0084] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0085] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0086] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0087] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0088] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0089] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0090] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0091] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0092] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0093] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0094] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0095] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0096] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0097] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0098] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0099] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. The display screen 194 may include a touch panel and other input devices.

[0100] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0101] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0102] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0103] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0104] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0105] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0106] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0107] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.

[0108] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0109] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0110] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0111] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0112] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0113] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0114] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0115] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0116] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0117] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0118] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0119] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0120] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0121] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0122] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0123] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0124] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0125] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0126] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0127] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0128] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.

[0129] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0130] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.

[0131] Figure 2 It is a software structure block diagram of the electronic device of the embodiment of the present application.

[0132] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0133] The application layer can include a series of application packages.

[0134] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0135] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0136] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0137] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0138] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0139] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0140] The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including answering, hanging up, etc.).

[0141] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0142] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0143] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0144] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0145] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0146] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0147] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0148] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0149] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0150] A 2D graphics engine is a drawing engine for 2D drawings.

[0151] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0152] The following is an illustrative description of the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.

[0153] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture static images or videos through the camera 193.

[0154] Embodiment 1:

[0155] The electronic device can output an editing interface of the video file, receive the user's editing operation in the editing interface, and modify the video file based on the editing operation. Figure 3 FIG. 1 is a schematic diagram showing an editing interface provided by an embodiment of the present application. Figure 3As shown in (a) of FIG. 1 , the editing interface includes a filter setting control 301, a subtitle setting control 302, and a background music setting control 303. According to the editing requirements, the user can click the corresponding control to make the electronic device display the corresponding setting interface or editing interface. For example, when a video file needs to be edited, the electronic device will receive the user's click operation on the background music setting control 303, and at this time, the electronic device will switch to the background music setting page, that is, Figure 3 In the background music setting page, there are multiple music categories, namely "hot recommendation", "pop music", "rock music", "folk music" and "pure music". Each music category is fixedly associated with at least one candidate music. The electronic device can receive the selection instruction initiated by the user and expand the music recommendation list of the corresponding music category, such as Figure 3 As shown in (c) in the figure. The music classification does not change according to the content of the video file, and the candidate music associated with each music classification is relatively fixed, which reduces the personalization of the music file recommendation operation. On the other hand, the above recommendation method requires the user to manually determine the music classification to be selected, and then display the recommendation list of the associated candidate music, which is complicated and reduces the efficiency of the user's selection of background music.

[0156] Therefore, in order to solve the defects of the above-mentioned audio file recommendation technology, the present application provides a method for recommending audio files, which is described in detail as follows: Figure 4 As shown, the execution subject of the audio file recommendation method is an electronic device, which can be a smart phone, a tablet computer, a computer, a smart game console, and any device equipped with a display module. Figure 4 The following is a flowchart of an implementation method of an audio file recommendation method provided by an embodiment of the present application, which is described in detail as follows:

[0157] In S401, an event tag of a shooting event corresponding to a video file is obtained.

[0158] In this embodiment, the electronic device may receive a background music recommendation request, the recommendation request including a file identifier of a video file for which background music is required to be configured. The electronic device may parse the recommendation request to obtain the file identifier of the video file, and obtain the video file and a shooting record of a shooting event associated with the video file based on the file identifier.

[0159] In a possible implementation, the electronic device may be configured with an editing application for video files. Figure 5 FIG. 1 shows a flow chart of the operation of selecting a video file provided by an embodiment of the present application. Figure 5As shown in (a) of FIG. 1 , the main interface of the electronic device may display an application icon of a video file editing application, namely, icon 501. When the electronic device detects that the user clicks icon 501, it starts the editing application and outputs a video file selection interface, such as Figure 5 (b) in the figure. The electronic device can scan the memory to obtain the candidate videos contained in the electronic device, and display the thumbnails of all the candidate videos in the above video file selection interface. The electronic device can receive the selection operation initiated by the user, identify the candidate video selected by the user as the target video, that is, the above video file, and switch to the interface for editing the video file, such as Figure 5 (c) in .

[0160] In a possible implementation, when the electronic device starts the editing application, it can prompt the user to enter login information, and obtain a video database associated with the user account based on the login information. The video database stores multiple candidate videos corresponding to the user account. Each candidate video can be stored in a local memory of the electronic device, or in a cloud server, and of course, can also be stored in an external storage device. By establishing a video database associated with a user account, it is not necessary for all candidate videos to be stored in the local memory of the electronic device, which reduces the storage pressure of the memory and can also increase the number of editable video files.

[0161] In this embodiment, the shooting event specifically refers to the event corresponding to the shooting of the video file, and the above event label is a label related to the shooting event. The event label is specifically used to describe the label related to the process of shooting the video file, and has nothing to do with the content of the video file. The above event label includes but is not limited to: shooting location, shooting time, user performing the shooting operation, shooting equipment, etc.

[0162] In a possible implementation, when generating a video file, the above event tag can be encapsulated in a data packet corresponding to the video file. For example, the data packet corresponding to the video file includes at least two parts, namely a header part and a content part. The header part is specifically used to store information related to the video identification and the shooting event, and the content part is specifically used to store video data, that is, each video image frame and the corresponding audio track. In this case, the electronic device can parse the video file, obtain the content of the header part in the video file, obtain the information related to the shooting event, and generate an event tag based on the above information.

[0163] In one possible implementation, an electronic device can be used to shoot the above-mentioned video file. In this case, the electronic device can be configured with a positioning module, which can specifically be a global positioning module GPRS, and a clock module. The electronic device can obtain location information through the positioning module and time information through the clock module. When the start of recording is detected, the location information and time information of the start time of recording can be obtained, and the above two information can be encapsulated in the data packet of the currently recorded video file to record information related to the shooting event. If the electronic device is logged in to a user account when recording a video file, the account ID of the user account can be added to the data packet, so that the account ID is used as the shooting user of the video file.

[0164] In a possible implementation, if the video file does not record any information about the shooting event, the electronic device may output a blank label, or be configured as a preset default label.

[0165] In a possible implementation, if the video file does not record information about the shooting event, the electronic device parses the video file and configures a corresponding event tag based on the video content. For example, if the electronic device can obtain the background area image in each video image frame in the video file, the shooting location corresponding to the video file can be determined by identifying the shooting objects such as buildings or natural scenery contained in the background area image. Figure 6 FIG. 1 shows a schematic diagram of a video image frame provided by an embodiment of the present application. Figure 6 As shown, a video file does not record the information of the shooting location, but the background area image of one of the video image frames of the video file contains the landmark building "Guangzhou Tower", so the shooting location can be identified as "Guangzhou", and further, the shooting location can be "Guangzhou Tower".

[0166] In a possible implementation, the electronic device can be configured with a corresponding whitelist for the event tag. The electronic device obtains information about the shooting event related to the video file, obtains multiple candidate tags related to the shooting event, and then determines whether the candidate tag is in the preset whitelist. If so, the candidate tag is used as the event tag; conversely, if the candidate tag is not in the whitelist, the candidate tag is used as an invalid tag. Since not all tags related to the shooting event contribute to the selection of audio files, in order to reduce the matching operation of invalid event tags and audio files, a corresponding whitelist can be configured to filter invalid tags and retain valid event tags.

[0167] In a possible implementation, the whitelist can be generated based on the music tags associated with each candidate audio in the music library. The candidate audio in the music library can be configured with associated music tags based on the lyrics, song title, and melody characteristics contained in the audio. The electronic device can obtain the music tags associated with each candidate audio in the music library, sort out all the music tags, and generate the whitelist, so that the candidate tags related to the audio can be selected from all the candidate tags corresponding to the shooting event as event tags, thereby improving the accuracy of the event tags.

[0168] In S402, the video file is parsed to obtain a content tag corresponding to the video file.

[0169] In this embodiment, the electronic device can parse the video file to determine the content tag related to the shooting content of the video file. Figure 7 FIG. 1 shows a schematic diagram of a content tag provided by an embodiment of the present application. Figure 7 As shown, the electronic device can parse the video file, obtain each video image frame contained in the video file, and identify the photographed object in the video image frame, for example Figure 7 The picture shown contains objects such as children, trees, balloons, etc., and each object is used as a content label. Of course, according to the color information of the video image frame, the weather or time period corresponding to the video image frame can be determined, such as daytime. Therefore, by identifying each video image frame in the video file, the content label corresponding to the video file can be obtained.

[0170] In a possible implementation, the electronic device can import each video image frame in the video file into a trained multiple convolutional neural network, thereby outputting a content label corresponding to the video image frame. The multiple convolutional neural network includes multiple convolutional layers and fully connected layers, each convolutional layer is configured with a corresponding convolution kernel, and the video image frame is convolved by the convolution kernel to output a corresponding feature vector, and the feature vector output by the last convolutional layer is imported into the fully connected layer, and the matching probability between the multiple existing labels pre-configured in the fully connected layer is calculated, and the existing label with a matching probability greater than a preset probability threshold is selected as the content label of the video image frame. Among them, the above-mentioned multiple convolutional neural network can be obtained by training the neural network with a large number of pictures and associated training labels, so as to improve the accuracy of content label recognition. Among them, the existing labels configured in the fully connected layer of the above-mentioned multiple convolutional neural network can be obtained based on the music labels of each candidate audio in the music library (the method of obtaining the music label can refer to the above description, which will not be repeated here), or can be set by itself, which is not limited here.

[0171] Further, as another embodiment of the present application, Figure 8 FIG. 4 shows a specific implementation flow chart of S402 in the audio file recommendation method provided in an embodiment of the present application. Figure 8 As shown, relative to Figure 4 In the embodiment, S402 in this embodiment specifically includes S4021 to S4023, which are specifically described as follows:

[0172] Furthermore, parsing the video file to obtain a content tag corresponding to the video file includes:

[0173] In S4021, a picture tag included in each video image frame of the video file is determined.

[0174] In this embodiment, the electronic device can parse the video file to obtain multiple video image frames, perform label recognition on the captured images in each video image frame, and determine the image label contained in each video image frame.

[0175] In one possible implementation, the electronic device can identify the similarity between multiple adjacent video image frames. If the similarity between multiple adjacent video image frames is greater than a preset similarity threshold, it is identified that the multiple video image frames belong to the same video picture segment, and a corresponding picture label is configured for the video picture segment. In order to improve the accuracy of picture label recognition, such as identifying some dynamic type labels, and also to reduce the number of picture label recognition times, the electronic device can segment the video file, divide multiple video image frames with high picture correlation into the same video picture segment, identify the picture label contained in the video picture segment, and use the picture label of the video picture segment as the true picture label of each video image in the video picture segment. Exemplarily, Fig. 9 FIG. 4 shows a schematic diagram of dividing video picture segments provided by an embodiment of the present application. Fig. 9 As shown, the electronic device obtains a video file with a video duration of 60 seconds. The electronic device recognizes that the similarity between multiple video image frames contained in the first second to the fourth second is greater than the similarity threshold, so the video image frames from the first to the fourth second are divided into the same video screen segment, and the screen label corresponding to the video screen end is identified. Based on the same recognition method, the video image frames corresponding to the 25th to 28th seconds are divided into the same video screen segment, and the video image frames from the 57th to the 60th seconds are identified as the same video screen segment, and the screen labels corresponding to each video screen segment are determined.

[0176] In a possible implementation, the electronic device may further divide the video file into a plurality of video picture segments based on a preset time interval, and respectively identify the picture tags contained in each video picture segment, and use the picture tags of the video picture segment as the picture tags corresponding to all video image frames in the video picture segment. For example, if 4 seconds is the above time interval, the video file is divided into a plurality of video picture segments with a time length of 4 seconds.

[0177] In one possible implementation, the electronic device determines the picture label contained in the video image frame by specifically using one or a combination of two or more of the following detection algorithms for label recognition: face detection algorithm (face recognition detection and face attribute detection), scene recognition algorithm, object detection algorithm, etc.

[0178] For example, the electronic device can determine whether a video image frame contains a face area through a face detection algorithm. If so, the face area is located, and a plurality of key feature points are determined based on the face area. Based on the feature information corresponding to the plurality of key feature points, the object attributes (such as gender, age, etc.) of the photographed subject corresponding to the face are determined. Similarly, the electronic device can also use the identified face area as a reference point to obtain the human body area, thereby determining the height, body shape and other object attributes of the photographed subject. Optionally, after obtaining the human body area, the electronic device can track the human body in multiple video image frames, thereby determining the posture change information of the photographed subject in the multiple video image frames, and thereby determining the movement type (such as running, jumping, sitting still, etc.) of the photographed subject based on the posture change information.

[0179] For example, the electronic device may pre-store standard models of different identifiable objects. The electronic device may determine whether there is an image region in the video image frame that matches any standard model of an identifiable object, and if so, recognize that the photographed object corresponding to the image region is the identifiable object, thereby realizing object recognition.

[0180] In a possible implementation, after obtaining the picture label, the electronic device can import multiple page labels of the video image frame into the semantic perception model to generate a description sentence corresponding to the video image frame. Since the relationship between the picture labels is independent and unrelated, based on this, the electronic device can import the page labels belonging to the same video image frame into the semantic perception model, thereby integrating multiple isolated picture labels into a sentence with coherent meaning, so as to more accurately describe the picture content of the video image frame, thereby improving the accuracy of the subsequent soundtrack. For example, continue to refer to Fig. 9As shown in the figure, the picture labels corresponding to the first second to the fourth second in the video file are: blue sky, beach, sea water, dog and child. Therefore, the electronic device imports the above multiple picture labels into the semantic perception model, and the corresponding description segment output may be: "Under the blue sky, the child and the puppy are playing on the beach by the sea". The electronic device can extract the supplementary labels that are not recognized by the picture labels from the description sentence, thereby improving the completeness and accuracy of label recognition.

[0181] In S4022, the number of occurrences of each of the picture tags in all the video image frames of the video file is counted respectively, and the picture tags are sorted in descending order based on the number of occurrences to obtain a picture tag sequence.

[0182] In this embodiment, after obtaining multiple picture labels, the electronic device can perform cluster analysis on all the picture labels and count the number of occurrences of each picture label in all video image frames of the video file. If the video file is divided into multiple video picture segments, the number of video image frames contained in the video picture segment is used as the number of occurrences corresponding to the picture label of the video picture segment. For example, the picture duration of a video picture segment of the electronic device is 4s, and the acquisition frame rate of the video file is 60fps, then the number of video image frames corresponding to the video picture segment with a duration of four seconds is 240, that is, the number of occurrences of the picture label corresponding to the above video picture segment is 240 times.

[0183] In a possible implementation, the clustering algorithm of the electronic device can identify multiple synonymous or near-synonymous screen labels as the same label, that is, generate a cluster label, and add up the number of occurrences of multiple screen labels belonging to the same label as the number of occurrences of the cluster label. For example, if the screen label obtained by identifying a certain video image frame is "rose", and the screen label obtained by another video image frame is "red rose", since the contents of the two labels are similar, the above two labels can be identified as the same label, and the two screen labels are clustered to generate a cluster label "rose", and the first number of occurrences of the screen label "rose" and the second number of occurrences of the screen label "red rose" are added as the number of occurrences of the cluster label "rose". By clustering the screen labels, multiple different labels with similar or identical contents can be sorted, thereby reducing the number of page labels without reducing the accuracy of content recognition of video files.

[0184] In this embodiment, the electronic device can arrange each picture label in descending order according to the number of occurrences of each picture label, and generate a picture label sequence, wherein the picture label at the front in the picture label sequence has a greater number of occurrences; conversely, the picture label at the back has a smaller number of occurrences. Optionally, if there are two or more picture labels with the same number of occurrences, the order in the picture label sequence can be determined according to the average area occupied by the picture label in each video image frame, and the larger the average area of ​​the picture label in each video image frame, the higher the corresponding ranking.

[0185] In S4023, the first N picture tags among the picture tags are selected as content tags corresponding to the video file; wherein N is a positive integer.

[0186] In this embodiment, after obtaining the picture label sequence, the electronic device can extract the first N picture labels as the content labels of the video file, and the last N picture labels as invalid labels. Since the picture labels at the back of the list appear less frequently, they are less representative of the content of the video file and have a poor correlation with the background music. In this case, there is no need to use the picture labels with poor representation as labels for determining the audio files to be recommended, and thus they are identified as invalid labels; while the picture labels with more occurrences are more representative of the content of the video file, and the picture labels with higher representation can be used as labels for determining the audio files to be recommended.

[0187] In a possible implementation, the value of N can be a fixed value or a default value, or can be dynamically adjusted according to the number of picture tags contained in the video file. For example, if the preset tag ratio is 30%, and the number of tags identified by the video file is 100, then the first 100*30%=30 picture tags are selected as the content tags of the video file.

[0188] For example, Fig.10 A schematic diagram of the process of generating content tags provided by an embodiment of the present application is shown. Fig.10 As shown, the electronic device identifies the picture labels corresponding to each video image frame in the video file, such as picture labels such as "blue sky" and "sea water", and then counts the number of occurrences of each picture label in the entire video file. For example, if the picture label "child" has 12 video image frames in the video file containing the picture label, then the number of occurrences of the picture label "child" is 12. Similarly, the number of occurrences of other picture labels is determined to obtain the picture label sequence shown in the figure. The preset N is 5, and the first 5 picture labels (respectively: child, beach, sea water, blue sky and dog) are selected as the content labels of the video file.

[0189] In an embodiment of the present application, by parsing the video file, the picture labels contained in each video image frame are identified respectively, and the number of occurrences of each picture label is counted, so that the picture labels with a high correlation with the recommended audio file can be selected as content labels, which can ensure the accuracy of the selected audio file and reduce the impact of invalid noise on the recommendation process.

[0190] In S403, target audio associated with the content tag and / or the event tag is selected in the music library, and audio recommendation information of the video file is generated based on the target audio.

[0191] In this embodiment, the electronic device obtains two types of tags for the video file, namely, event tags related to the shooting event, and content tags related to the shooting content. When the user selects background music for the video file, there are often two considerations, namely, to match the current shooting mood or to match the shooting content, etc., and the shooting content required to be expressed by shooting the video file cannot be accurately expressed by simply looking at the screen content of the video file. For example, the user visits a famous natural scenic spot, and the animals and plants contained in the natural scenic spot may be common animals and plants. The shooting content cannot be accurately expressed by the screen content of the video file, that is, the natural scenic spot cannot be identified, and then the audio file cannot be accurately recommended. Based on this, in addition to identifying the screen content of the video file, the electronic device also obtains tags related to the shooting event, determines the event tag through the date, location, and shooting object, and facilitates the electronic device to accurately determine the shooting content of the video file through the event tag and the content tag, thereby recommending an audio file that is more relevant to the shooting content. For instance, in the above-mentioned example of a natural scenic spot, the shooting location corresponding to the video file can be determined through event tags. The shooting location and the picture content can be used to determine that the current picture is specifically a plant or animal in a natural scenic spot, thus solving the one-sidedness and inaccuracy of determining the shooting content solely through the picture content.

[0192] In this embodiment, the music library can be stored in the memory of the electronic device or in the cloud. The electronic device can obtain the audio information of each candidate audio in the music library, match each audio information with the content tag and / or event tag, select the candidate audio matching the content tag and / or time tag as the target audio, that is, the audio that needs to be recommended to the user, and generate audio recommendation information containing the target audio. For example, Fig.11 A schematic diagram of audio recommendation information provided by an embodiment of the present application is shown. Fig.11 As shown in (a) of FIG, the audio recommendation information can provide the cover image associated with each audio file. In addition to identifying the audio file by the file name of the audio file, the corresponding cover image can also be provided to facilitate users to learn more about the audio-related information. Fig.11 As shown in (b) in the figure, the audio recommendation information may be specifically an audio recommendation list. According to the correlation between each target audio and the video file, the recommendation order is determined to generate the audio recommendation list, wherein the target audio with a higher correlation with the video file is ranked higher in the audio recommendation list, and vice versa, the target audio with a lower correlation with the video file is ranked lower in the audio recommendation list. In the audio recommendation list, the song name of the target audio may be displayed, and other information related to the target audio, such as the singer, song cover or composer, may also be displayed.

[0193] In a possible implementation, each candidate audio in the music library is associated with a corresponding audio tag. The audio tag can be determined based on information such as the song name, lyrics content, and music style of the audio file. When acquiring the target music, it can be determined whether one or more of the audio tags associated with the audio file are in the tag group consisting of event tags and content tags. If so, the candidate audio is identified as the target audio; otherwise, the candidate audio is identified as not the target audio.

[0194] Further, as another embodiment of the present application, selecting the target audio associated with the content tag and / or the event tag in the music library may include at least the following two methods:

[0195] Method 1: Get the target audio associated with the event tag from the music library. According to the different tag types of the event tag, the method of selecting the target audio can be divided into two processes. Process 1 is the selection process used when the tag type of the event tag is a location type, that is, the event tag is specifically the shooting location; process 2 is the selection process used when the tag type of the event tag is a time type, that is, the event tag is specifically the shooting time.

[0196] It should be noted that the shooting location of the above event tag can be obtained through the positioning module of the electronic device when shooting the video file. The electronic device can obtain the geographic information point (Point of Information, POI) of the shooting location, and the electronic device can call a third-party map application to determine the POI of the shooting location through the location information obtained by the positioning module and the third-party positioning system.

[0197] In one possible implementation, Fig.12 FIG. 1 shows a schematic diagram of obtaining a shooting location provided by an embodiment of the present application. Fig.12As shown, the electronic device can obtain the outdoor location information of the shooting location through the built-in positioning module, and obtain the indoor location information through the network device in the scene of the shooting location, generate the location coordinates of the shooting location based on the outdoor location information and the indoor location information, and determine the reverse address encoding and scene attributes of the location coordinates through the server corresponding to the third-party application, so as to obtain the shooting location of the video file and the scene attributes corresponding to the shooting point. For example, the shooting location is a park, a shopping mall, or an office building, so as to have a more comprehensive understanding of the shooting location.

[0198] Method 2: Calculate the matching degree between the event tag and the content tag and the existing audio in the music library, and select the target audio from the existing audio based on the matching degree.

[0199] The following describes the specific implementation methods of the above two processes:

[0200] Method 1: Determine the target audio based on event tags:

[0201] Process 1: See Fig.13 As shown, Fig.13 FIG. 4 is a flowchart showing the implementation of S403 in the audio file recommendation method provided by another embodiment of the present application. Fig.13 As shown, Figure 4 Compared with the embodiment shown in the figure, the event tag in the present embodiment includes the shooting location; the step of selecting the target audio associated with the content tag and / or the event tag in the music library specifically includes: one or more of S1301 to S1303, which are specifically described as follows:

[0202] In S1301, the text information of each existing audio in the music library is obtained, and the existing audio containing the shooting location in the text information is used as the target audio.

[0203] In this embodiment, each existing audio in the music library is associated with corresponding text information. The text information may specifically include information such as the song name, lyrics, singer, composer, and lyricist corresponding to the existing audio. The electronic device can determine whether the above text information contains the corresponding shooting location when the video file was shot. If so, the existing audio whose text information contains the shooting location is used as the target audio to be recommended. Since the shooting location corresponding to the shooting of the video file is often highly relevant to the content theme of the video file, and contributes greatly to the recommendation of background music, therefore, if the shooting location of the video file appears directly in the text information of a certain existing audio, in this case, the recommendation priority of the existing audio is also high, so the above existing file can be used as the target audio.

[0204] For example, the shooting location corresponding to the video file is the Yangtze River, and there is an existing music "My Chinese Heart" in the music library. The song contains a lyric "The Yangtze River, the Great Wall, Huangshan Mountain, and the Yellow River, they are very important in my heart." The text information (i.e., lyrics) corresponding to the existing music includes the shooting location in the event tag of the video file. Therefore, the electronic device can use the above-mentioned existing music "My Chinese Heart" as the target audio.

[0205] In S1302, a video clip associated with the shooting location is obtained, and the soundtrack audio of the video clip is used as the target audio.

[0206] In this embodiment, the music library may contain soundtracks of different existing film and television programs, including but not limited to: movies, TV series, animation series, animated movies, short videos, etc. The above video clips may specifically be clips from film and television programs. For well-known film and television programs, the soundtracks corresponding to the classic scenes in the program often become the "exclusive soundtracks" of the locations associated with the classic scenes, that is, some shooting locations have a strong correlation with the soundtracks of the program. At this time, the soundtracks that are strongly correlated with the shooting locations can be used as the target audio to be recommended.

[0207] For example, in the classic TV series "Shanghai Beach", most of the classic scenes were filmed at the Bund in Shanghai. If the filming location of a video file of the audio file that the electronic device needs to recommend is also the Bund in Shanghai, the soundtrack audio in the TV series "Shanghai Beach" can be used as the target audio to be recommended, such as the song "Shanghai Beach".

[0208] Another example is the classic anime series Slam Dunk, which tells the story of a junior high school basketball team in Kamakura, Japan. That is, there is a strong correlation between Slam Dunk and Kamakura. If the corresponding shooting location of the video file is Kamakura, Japan, the soundtrack music in the anime series Slam Dunk can be used as the target audio to be recommended, such as "Until the End of the World".

[0209] For another example, in the classic movie Harry Potter, there is a classic scene where Harry needs to enter the magic world through Platform 9 and 3 / 4, and the filming location of this scene is King's Cross Station in London, England. That is, King's Cross Station in London, England (broadly speaking, London) and Harry Potter are strongly correlated. If the filming location corresponding to the video file is London, more specifically King's Cross Station, then the soundtrack in the movie Harry Potter can be used as the target audio to be recommended.

[0210] In a possible implementation, an electronic device may store a correspondence between a film or TV series and a shooting location. Table 1 shows the above correspondence provided by an embodiment of the present application. As shown in Table 1, the correspondence records the name of the film or TV series and the associated soundtrack music. The above soundtrack music may be stored in a music library, and each film or TV series may be associated with a corresponding shooting location. After identifying the shooting location of the event tag of the video file, it may be determined whether the shooting location of the video file is within the pre-stored correspondence. If so, the soundtrack music of the film or TV series corresponding to the shooting point of the video file in the correspondence is used as the required recommended soundtrack music. It should be noted that one shooting location may correspond to multiple film or TV series.

[0211] Filming Locations Play name Music name Kamakura, Japan Slam Dunk Until the End of the World King's Cross Station, London, England Harry Potter Harry Potter Movie Soundtrack The Bund Shanghai Beach Shanghai Beach

[0212] Table 1

[0213] In S1303, a historical event associated with the shooting location is determined, and an audio file corresponding to the historical event is used as the target audio.

[0214] In this embodiment, in addition to being related to the film and television series, the shooting location can also be related to some historical events. The electronic device can obtain the audio file corresponding to the historical event from the music library as the target audio to be recommended based on the event type, occurrence year and other information of the associated historical event. For example, if a historical event occurred in the 1960s, then existing audio with a creation time or release time in the 1960s can be selected from the music library as the audio file corresponding to the historical event; for another example, if the historical event is a war, then existing music related to the war can be selected from the music library as the audio file corresponding to the historical time.

[0215] For example, Pearl Harbor in the United States has a strong correlation with the historical event "Pearl Harbor Raid". If the above historical event is a war event, then existing music related to war, explosion, or audio keywords such as "disaster" and "tragic" can be selected from the music library as the target audio to be recommended.

[0216] In a possible implementation, for a location, historical events related to the location may also include residence events of historical celebrities, that is, a certain location may be the residence of a certain historical celebrity. In this case, the electronic device may use the audio file associated with the historical celebrity as the audio file corresponding to the location.

[0217] In an embodiment of the present application, by obtaining the shooting location of the video file, and obtaining audio files related to the shooting point through audio texts such as lyrics and song titles, existing film and television dramas, and historical events, as the target audio to be recommended, the diversity of recommended audio search methods and the accuracy of related audio searches can be improved.

[0218] Process 2: See Fig.14 As shown, Fig.14 FIG. 4 is a flowchart showing the implementation of S403 in the audio file recommendation method provided by another embodiment of the present application. Fig.14 As shown, Figure 4 Compared with the embodiment shown in the figure, the event tag in this embodiment includes the shooting date; the step of selecting the target audio associated with the content tag and / or the event tag in the music library specifically includes: one or more of S1401 to S1403, which are specifically described as follows:

[0219] In S1403, if the shooting date is any preset specific date, the audio file associated with the specific date is used as the target audio.

[0220] In this embodiment, the electronic device may pre-store a plurality of specific dates, and the specific dates include, but are not limited to, public holidays or dates with special significance. For example, the characteristic dates may be public holidays such as Christmas, Children's Day, and Mid-Autumn Festival, and may also be November 11, which has special significance such as "Shopping Festival" and "Singles' Day"; for another example, the shooting date corresponds to a weekend or a date in the middle of the week, and may correspond to an audio file whose lyrics contain weekends or mid-weeks. For example, if the lyrics contain Monday, it may be an audio file associated with the shooting date of Monday. The electronic device may configure an associated audio file for each specific date, and establish a corresponding relationship between a specific date and an audio file. Each specific date may be associated with one or more associated audio files.

[0221] For example, Table 2 shows a table of correspondence between specific dates and audio files provided in an embodiment of the present application. As shown in Table 2, some dates with special significance may be associated with corresponding audio files, and the dates with special significance may be public holidays, etc. A specific date may be associated with one or more audio files, for example, the Lunar New Year may correspond to two audio files.

[0222] Specific Dates Related tracks Christmas Merry Christmas Lunar New Year "Happy New Year" and "Congratulations on your prosperity" National Day Good Days

[0223] Table 2

[0224] In this embodiment, after determining the shooting date of the video file, the electronic device can determine the audio file associated with the shooting date by querying the above correspondence, and use the audio file as the target audio file to be recommended.

[0225] Further, as another embodiment of the present application, before S1403, S1401 and S1402 may be included, which are specifically described as follows:

[0226] In S1401, user information of the currently logged-in user account is obtained.

[0227] In this embodiment, some specific dates are private dates, that is, they are different for different people. Private specific dates are not universal and need to be determined in combination with user information of the user to whom the electronic device belongs. For example, birthdays, wedding anniversaries, and the anniversary of meeting a lover. Based on this, before determining the specific date, the electronic device can first obtain the user information pre-registered by the user account currently logged in to the electronic device.

[0228] In a possible implementation, the user information may include date of birth, date of marriage, parents' birthdays, spouse's birthday, etc.

[0229] In this embodiment, the currently logged-in user account is specifically a user account logged in by the electronic device when the electronic device edits the video file. The user account can be a user account logged in by the video file editing application, or a user account logged in in the device system of the electronic device.

[0230] In S1402, the specific date is determined based on the user information.

[0231] In this embodiment, the electronic device may store multiple date types of specific dates, and determine the specific date of the specific date according to the user information and the date types.

[0232] For example, if the date type of the above-mentioned specific date is a birthday type, the electronic device can obtain the birth date of the currently logged-in user from the user information, and determine the specific date of the birthday type each year based on the birth date, that is, the above-mentioned specific date.

[0233] In this embodiment, for each specific date related to the user's personal information, a corresponding audio file may be associated, and the audio file associated with the specific date may be set by the system by default or manually configured by the user. For example, if a specific date is the user's birthday, "Happy Birthday" may be used as the audio file associated with the specific date; the user's favorite song may also be set as the audio file associated with the user's birthday, such as the user setting "Youth" as the audio file associated with the user's birthday.

[0234] In an embodiment of the present application, by determining the shooting date of the video file, it is determined whether the shooting date is within a preset specific date. If so, the audio file associated with the specific date is used as the target audio to be recommended, thereby improving the diversity of the target audio selection method and the accuracy of the audio search related to the video file.

[0235] Method 2: Calculate the matching degree between the event tag and the content tag and the existing audio in the music library, and select the target audio from the existing audio based on the matching degree. Fig.15 As shown, Fig.15 FIG. 4 shows a specific implementation flow chart of S403 in the audio file recommendation method provided by another embodiment of the present application. Fig.15 As shown, Figure 4 Compared with the embodiment shown in the figure, the step of selecting the target audio associated with the content tag and / or the event tag in the music library specifically includes: S1501 to S1504, which are specifically described as follows:

[0236] In S1501, the content tag and the event tag are used to generate an initial tag sequence corresponding to the video file.

[0237] In this embodiment, the electronic device can encapsulate content tags related to the video content and event tags related to the shooting event to generate an initial tag sequence corresponding to the video file. The initial tag sequence includes content tags and event tags.

[0238] In a possible implementation, the electronic device may cluster content tags and event tags to generate an initial tag sequence. Specifically, the clustering method may be to merge tags with the same or similar meanings in content tags and event tags, and generate an initial tag sequence based on the merged tags. For example, the event tag corresponding to the shooting event includes the shooting date, and the shooting date is specifically the shooting time, such as daytime on September 20th. After parsing the video image frame of the video file, a content tag of daytime is obtained. Then, the event tag of "September 20th daytime" can be merged with the content tag of "daytime" to form "September 20th daytime", thereby reducing the number of tags and avoiding invalid matching operations.

[0239] For example, Table 3 shows a table corresponding to the initial tag sequence provided by an embodiment of the present application. As shown in Table 3, the event tags include two, namely the shooting location and the shooting date, specifically "Sanya Beach" and "2019 / 07 / 05 14:30"; and the content tags include five. In addition to determining the shooting content corresponding to each content tag, the electronic device can also determine the tag type corresponding to the content tag according to the type of the shooting content. For example, the content tag "child" corresponds to the initial tag type "person", and counts the proportion of each tag type in all video image frames, that is, the above-mentioned tag proportion. For example, the content tag "child" has a tag proportion of 25%, which means that in the video file, the video image frames with the shooting content of "child" account for 25% of all video image frames. If the video file contains 100 frames, the number of video image frames containing "child" can be specifically 25 frames.

[0240]

[0241]

[0242] Table 3

[0243] In S1502, based on a preset label mapping algorithm, a mapping label sequence corresponding to the initial label sequence is generated; and each label in the mapping label sequence is configured with an associated weight value.

[0244] In this embodiment, the tag library stores multiple existing tags, and each existing tag can be configured with a corresponding weight value according to the correlation between the background music. If the correlation between the existing tag and the background music is high, the pre-configured weight value is large; conversely, if the correlation between the existing tag and the background music is low, the pre-configured weight value is small. It should be noted that the tag library can be stored in the memory of the electronic device or in a cloud server.

[0245] In a possible implementation, if the tag library is stored in a cloud server, the electronic device can send the generated initial tag sequence to the cloud server through a communication link with the cloud server. After receiving the initial tag sequence, the cloud server can map each tag in the initial tag sequence based on the stored tag library, determine the existing tags associated with the tags in each initial tag sequence in the tag library, and generate a mapping tag sequence. The cloud server can feed back the generated mapping tag sequence to the electronic device, or after determining that the target audio is completed, feed back the determined target audio to the electronic device, so that the electronic device generates audio recommendation information after receiving the target audio.

[0246] In this embodiment, the electronic device can map each tag in the initial tag sequence with each existing tag in the tag library, that is, determine the existing tags associated with each tag in the initial tag sequence, and generate a mapping tag sequence corresponding to the video file based on the mapped existing tags, wherein the tag included in the mapping tag sequence is any existing tag in the tag library. Since the existing tags in the tag library are pre-configured with corresponding weight values, the weight values ​​associated with each existing tag can be encapsulated in the above-mentioned mapping tag sequence when generating the above-mentioned mapping tag sequence.

[0247] In one possible implementation, the granularity of the labels in the initial label sequence identified by the electronic device can be finer, while the granularity of the existing labels in the label library is coarser. In this case, by performing label mapping, the labels in the initial label sequence can be clustered and invalid classification labels can be filtered out.

[0248] For example, Fig.16 FIG. 1 shows a schematic diagram of generating a mapping tag sequence provided by an embodiment of the present application. Fig.16 As shown, the tags included in the initial tag sequence are specifically shown in Table 3. Determine the existing tags associated with each tag in the initial tag sequence in the tag library. For example, for an event tag "Sanya Beach" in the initial tag sequence, its associated tag type is "shooting location" and the tag content is "Sanya Beach". After being mapped to the mapping tag sequence through the preset tag mapping algorithm, its tag content remains unchanged and is still "Sanya Beach", while the tag type is clustered from the refined "shooting location" with the same configuration to "scene", and based on the preset tag type, determine the weight value associated with the tag in the mapping tag sequence. For example, for a scene type tag, the associated weight value in the mapping tag sequence is 0.8, and for a weather type tag, the associated weight value in the mapping tag sequence is 0.2. If any tag in the initial tag sequence does not have an associated tag type in the tag mapping algorithm, the initial tag is identified as an invalid tag, for example Fig.16 In the “Puppy-Object”, the associated mapping label cannot be determined by the label mapping algorithm, so the label type of the initial label is configured as ignored, and the associated weight value is not configured for the ignored mapping label, or the weight value of the ignored mapping label is set to 0.

[0249] In S1503, based on the weight value of each tag in the mapping tag sequence, the matching degree of each existing audio in the music library is calculated.

[0250] In this embodiment, after determining the weight value of each tag in the mapping tag sequence, the electronic device can determine whether each existing audio in the music library contains any tag in the mapping tag sequence, wherein the existing audio contains the mapping tag sequence in the following manner: the existing audio can be associated with multiple audio tags, and the existing audio is associated with text information (such as song name, lyrics, etc.), and it is determined whether the audio tag and the text information contain any tag in the mapping tag sequence. If so, the matching degree of the existing audio is calculated based on the weight value associated with the included tag.

[0251] For example, if the audio tags associated with an existing audio in the audio library are "pop music", "Sanya beach", "blue sky" and "relaxed", and it contains two tags in the mapping tag sequence, namely "Sanya beach-scene" and "blue sky-weather", then based on the weight values ​​associated with the above two tags, which are 0.8 and 0.2 respectively, the matching degree of the existing audio is calculated, for example, based on the superposition of the weight values ​​of the two tags, 0.8+0.2=1.

[0252] Optionally, when calculating the matching degree, the proportion of the video image frames occupied by the mapping tags in the video file may be substituted to obtain a corresponding weighted value, thereby calculating the matching degree of the existing audio.

[0253] In S1504, the target audio is determined from the existing audio based on the matching degree.

[0254] In this embodiment, after calculating the matching degree between each existing audio and the mapping tag sequence, the electronic device can determine the target audio from the existing audio according to the matching degree. Since the above matching degree can represent the correlation between the existing audio and the video content, the higher the matching degree, the greater the correlation between the existing audio and the video content; conversely, the lower the matching degree, the smaller the correlation between the existing audio and the video content.

[0255] In a possible implementation, the electronic device may select existing audio with a matching degree greater than a preset matching threshold as the target audio; or may sort the existing audio in descending order of matching degree, and select the first M existing audio as the target audio, where M is any positive integer.

[0256] Further, as another embodiment of the present application, the above-mentioned method of selecting the target audio may specifically include:

[0257] S1. Select the existing audio whose matching degree is greater than a preset matching threshold as the candidate audio.

[0258] S2. Based on the user information of the currently logged-in user account, determine the user characteristics of the user account.

[0259] S3. If any of the candidate audios matches the user feature, the candidate audio is used as the target audio.

[0260] In this embodiment, in addition to selecting the target audio according to the matching degree, the electronic device can also determine the target audio according to the user's preference. In this case, the electronic device can screen all existing audio from the music library according to the calculated matching degree, and select the existing audio with a matching degree greater than a preset matching threshold as the candidate audio. Since the matching degree can determine the correlation between the existing audio and the video file, the candidate audio with a strong correlation with the video file can be screened out through the matching degree.

[0261] Then, the electronic device can obtain the user information of the currently logged in user account. The above user information is specifically used to determine the user's preference for music selection.

[0262] In a possible implementation, the electronic device needs to obtain the user's authorization information before obtaining the user information. The electronic device can output an authorization prompt box, and if the user agrees to the authorization operation based on the feedback of the authorization prompt box, the user information is obtained from the user account.

[0263] In this embodiment, the above-mentioned user information may specifically include: the playback records and / or pre-configured music preferences of the user account. The electronic device may determine the user's music preferences based on the audio files corresponding to each playback record, or directly use the user's pre-configured information to determine the user's music preferences, and determine the user characteristics of the user account based on the music preferences of the user account. By way of example, the above-mentioned user characteristics may specifically be the music type preferred by the user.

[0264] In this embodiment, the electronic device can determine whether the selected candidate audio matches the user characteristics, for example, whether the music type of the candidate audio is consistent with the music type recorded in the user characteristics. If so, the matching candidate music is used as the target audio to be recommended.

[0265] In an embodiment of the present application, by obtaining user characteristics of a user account and selecting target audio based on the matching degree and user characteristics, the accuracy of target audio selection can be improved.

[0266] In an embodiment of the present application, by mapping the identified event tags and content tags to obtain a mapping tag sequence, the matching degree between the existing audios is calculated, and the target audio is selected based on the matching degree. The target audio associated with the video content can be selected, thereby improving the accuracy of the target audio selection.

[0267] The above is a detailed description of two implementation methods for selecting target audio.

[0268] In a possible implementation, the electronic device may adopt one of the methods 1 and 2 to determine the target audio to be recommended, or may adopt both of the above methods to determine the target audio.

[0269] If the electronic device uses the above two methods to determine the target audio, corresponding determination priorities can be configured for different acquisition methods.

[0270] In a possible implementation, the electronic device may first adopt method 1 to obtain the target audio that matches the shooting location or shooting date from the music library, and then adopt method 2, that is, to determine the target audio by calculating the matching degree of the existing audio through event tags and content tags. That is, the judgment priority of method 1 is higher than the judgment priority of method 2, wherein the target audio selected by method 1 can be temporarily removed from the music library to avoid repeated recognition when making a judgment by method 2.

[0271] For example, the music library includes track 1, track 2, and track 3. If the lyrics of track 1 include the shooting location of the video file, the electronic device will identify track 1 as the target audio when performing the determination operation of method 1. When performing the determination operation of method 2, track 1 can be removed from the music library, that is, when performing method 2, the music library includes track 2 and track 3, thereby avoiding unnecessary determination operations.

[0272] In a possible implementation, the electronic device may first use method 2 to determine the target audio by calculating the matching degree of the existing audio through the event tag and the content tag, and then use method 1 to obtain the target audio that matches the shooting location or shooting date from the music library. That is, the judgment priority of method 2 is higher than the judgment priority of method 1, wherein the target audio selected by method 2 can be temporarily removed from the music library to avoid repeated recognition when making a judgment by method 1.

[0273] Further, as another embodiment of the present application, before executing S403, the electronic device may generate a music library related to the currently used user account. Fig.17 FIG. 1 shows a flowchart of an implementation method for recommending an audio file provided by an embodiment of the present application. Fig.17 As shown, Figure 4 Compared with the embodiment shown in the figure, the embodiment of the present application further includes S1701 to S1703 before S403, which are specifically described as follows:

[0274] In S1701, if the authorization information of the currently logged-in user account is stored, the operation record of the user account is obtained.

[0275] In this embodiment, the electronic device can obtain the authorization information of the currently logged-in user account. Fig.18 FIG. 1 shows a schematic diagram of obtaining authorization information provided by an embodiment of the present application. Fig.18 As shown, when a user starts a video editing application, the electronic device can output an authorization acquisition pop-up window, which includes two controls, namely, an authorization consent control 181, and an authorization rejection control 182. If the electronic device receives a click operation on the authorization consent control 181, it determines that the user agrees to obtain the privacy information of the user account, such as user information and operation records, and generates and stores the above-mentioned authorization information; conversely, if it receives a click operation on the authorization rejection control 182, it determines that the user refuses to obtain the privacy information of the user account, that is, the above-mentioned authorization information is not generated.

[0276] In this embodiment, the operation record of the user account can be stored in a local memory or in a cloud server. When the electronic device detects that the authorization information of the user account is stored, it can obtain the operation record of the user account based on the authorization information. The operation record of the user account includes but is not limited to: audio playback records, music and video browsing records, music website browsing records, and video file editing records (the video file editing record may include the record of the selection operation of the background audio), etc.

[0277] In S1702, user characteristics of the user account are generated based on the operation record.

[0278] In this embodiment, after obtaining multiple operation records of the user account, the electronic device can determine the user characteristics corresponding to the user account according to the multiple operation records, and the user characteristics are specifically used to represent the user account's preference for music.

[0279] In one possible implementation, the electronic device can determine the played audio files associated with the operation record, and identify the music category of each audio file, and then count the number of times each preset music category is played; the music category with the largest number of times played or greater than a preset threshold is selected as the music category preferred by the user account to obtain user characteristics.

[0280] In S1703, existing music matching the user characteristics is extracted from the database to generate the music library.

[0281] In this embodiment, a large number of audio files may be stored in the database, and each audio file may be associated with a corresponding music category. The electronic device may obtain user characteristics based on recognition, determine the music category preferred by the user, and select the music category matching the above user characteristics from the database as existing audio, and generate a music library associated with the user account based on all the selected existing audio.

[0282] In one possible implementation, if the database is stored in a cloud server, the electronic device can send user characteristics to the cloud server. After receiving the user characteristics, the cloud server can select audio files that match the user characteristics from the database stored in the cloud as the above-mentioned existing audio, and create a music library associated with the user account on the cloud server based on all existing audio.

[0283] In an embodiment of the present application, by obtaining the operation record of the currently logged-in user account, determining the user's preference for music selection, and generating a music library corresponding to the user account, the accuracy of selecting recommended audio files can be improved.

[0284] In a possible implementation, if the music library is stored in a cloud server, the operation of selecting the target audio can be completed by the cloud server. In this case, the electronic device can send the identified event tags and content tags to the cloud server, and the cloud server can identify the electronic device based on the event tags and content tags fed back by the electronic device. Fig.19 The flowchart of the interaction between the electronic device and the cloud server provided by an embodiment of the present application is shown. Fig.19 As shown in the figure, the interactive process is as follows:

[0285] 1. The electronic device may first obtain an event tag of a video file, wherein the event tag may include a shooting location and a shooting date.

[0286] 2. At the same time, the electronic device can parse the video file, determine the content tags contained in each video image frame of the video file, and generate a description segment for expressing the content of the video file based on the semantic understanding algorithm and the multiple content tags identified.

[0287] 3. Based on the identified event tags and content tags (which can also be description segments obtained through semantic understanding), all tags are aggregated.

[0288] 4. Send the aggregated tags to the cloud server to determine the target audio through the cloud server.

[0289] 5. After obtaining the aggregated tags, the cloud server can search for matching target audio from the music library (i.e., music service application). There are two ways to search for target audio. One is to obtain the user's operation records, determine the user's characteristics (i.e., user preferences), and perform big data recommendations based on the user's characteristics and tags to obtain the target audio when the user is logged in and has obtained privacy authorization. The other is to directly perform big data search based on the aggregated tags to obtain the target audio when the user is not logged in or has not obtained privacy authorization.

[0290] 6. The cloud server sends the selected target audio to the electronic device.

[0291] 7. The electronic device generates audio recommendation information based on the feedback target audio.

[0292] In particular, for steps 2 to 4 above, the specific identification method can be found in Fig. 20 As shown, Fig. 20 The schematic diagram of generating content tags provided by an embodiment of the present application is shown. The electronic device can transmit a video file to an image signal processing unit, parse each video image frame in the video file through the image signal processing unit ISP, and determine the content tags contained in the video image frame through an action recognition algorithm, a scene recognition algorithm, a face detection algorithm, and a face attribute algorithm, wherein the action recognition algorithm needs to import the currently recognized video image frame and multiple associated cached video image frames for recognition, perform action detection, determine tags related to the action, and uniformly feed back the recognized content tags to the camera module driver, aggregate the content tags, and feed back to the camera module application package, wherein the camera module application package can also obtain event tags from the camera module, and generate an initial tag sequence from the content tags and event tags, and send it to the gallery application package, the gallery application package can map the initial tag sequence to obtain a mapped tag sequence, and feed it back to the music application of the cloud server, calculate the matching degree of each existing audio, and thus determine the target audio.

[0293] From the above, it can be seen that the audio file recommendation method provided by the embodiment of the present application can obtain the video tag corresponding to the shooting event of the video file when it is necessary to generate an audio file associated with the video file, and obtain the content tag based on the shooting content of the video file, extract the associated target audio from the music library through the video tag and the content tag, and generate the audio recommendation information associated with the video file to achieve the purpose of personalized recommendation. Compared with the existing audio file recommendation technology, the embodiment of the present application can not only generate the corresponding content tag according to the video content, but also generate the event tag related to the shooting event, so as to find the target audio through the above two types of tags. The accuracy of the target audio selection is improved, and while making personalized recommendations for audio files, accurate push can be achieved, which improves the user experience and also improves the correlation between the recommended audio files and video files.

[0294] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0295] Embodiment 2:

[0296] Corresponding to the method for recommending audio files described in the above embodiment, Fig.21 A structural block diagram of an audio file recommendation device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0297] Reference Fig.21 , the recommended devices for this audio file include:

[0298] An event tag acquisition unit 211 is used to acquire an event tag of a shooting event corresponding to a video file;

[0299] A content tag acquisition unit 212 is used to parse the video file to obtain a content tag corresponding to the video file;

[0300] The audio recommendation information generating unit 213 is used to select target audio associated with the content tag and / or the event tag in the music library, and generate audio recommendation information for the video file based on the target audio.

[0301] Optionally, the event tag includes a shooting location; and the audio recommendation information generating unit 213 includes:

[0302] an audio-text matching unit, configured to obtain text information of each existing audio in the music library, and use the existing audio containing the shooting location in the text information as the target audio; and / or

[0303] a video clip matching unit, configured to obtain a video clip associated with the shooting location, and use the soundtrack audio of the video clip as the target audio; and / or

[0304] The historical event matching unit is used to determine the historical event associated with the shooting location and use the audio file corresponding to the historical event as the target audio.

[0305] Optionally, the event tag includes a shooting date; the audio recommendation information generating unit 213 is specifically configured to:

[0306] If the shooting date is any preset specific date, the audio file associated with the specific date is used as the target audio.

[0307] Optionally, the audio file recommendation device further includes:

[0308] A user information acquisition unit, used to acquire user information of a currently logged-in user account;

[0309] The specific date determining unit is used to determine the specific date based on the user information.

[0310] Optionally, the audio recommendation information generating unit 213 includes:

[0311] An initial tag sequence generating unit, used to generate an initial tag sequence corresponding to the video file by using the content tag and the event tag;

[0312] A mapping label sequence generating unit, configured to generate a mapping label sequence corresponding to the initial label sequence based on a preset label mapping algorithm; and a weight value associated with each label configuration in the mapping label sequence;

[0313] A matching degree calculation unit, used to calculate the matching degree of each existing audio in the music library based on the weight value of each tag in the mapping tag sequence;

[0314] A matching degree identification unit is used to determine the target audio from the existing audio based on the matching degree.

[0315] Optionally, the matching degree identification unit includes:

[0316] A candidate audio selection unit, configured to select the existing audio whose matching degree is greater than a preset matching threshold as the candidate audio;

[0317] A user feature acquisition unit, configured to determine a user feature of a user account based on user information of a currently logged-in user account;

[0318] The user feature matching unit is used to use any candidate audio as the target audio if the candidate audio matches the user feature.

[0319] Optionally, the content tag acquiring unit 212 includes:

[0320] A picture label determination unit, used to determine a picture label included in each video image frame of the video file;

[0321] An occurrence counting unit, used to count the occurrence times of each of the picture tags in all the video image frames of the video file, and sort the picture tags in descending order of the occurrence times to obtain a picture tag sequence;

[0322] The content label selection unit is used to select the first N picture labels among the picture labels as content labels corresponding to the video file; wherein N is a positive integer.

[0323] Optionally, it is characterized in that the audio file recommendation device further comprises:

[0324] an operation record acquisition unit, configured to acquire the operation record of the user account currently logged in if the authorization information of the user account currently logged in is stored;

[0325] an operation record parsing unit, configured to generate user features of the user account based on the operation record;

[0326] The music library generating unit is used to extract existing music matching the user characteristics from the database to generate the music library.

[0327] Therefore, the audio file recommendation device provided in the embodiment of the present application can also obtain the original image containing the photographed object, determine the skin area image from the original image, obtain the skin sensitivity associated with each pixel point according to the pixel value of each pixel point in the skin area image, and adjust the pixel value of the corresponding pixel point in the original image according to the determined skin sensitivity, thereby generating a sensitivity distribution diagram, so that the user can understand the overall skin sensitivity in the sensitivity distribution diagram, and can also determine the sensitivity corresponding to each local skin. Compared with the existing skin detection technology, the generated sensitivity distribution diagram is generated based on the original image by adjusting the pixel value of the pixel point. Therefore, the outline of the skin area is consistent with the original image. By viewing the sensitivity distribution diagram, the sensitivity corresponding to each local area can be determined, which improves the display effect; on the other hand, since the generation process of the sensitivity distribution diagram can be completed by an electronic device including a camera module, and the user does not need to go to a specific medical institution to complete it, the convenience of obtaining skin sensitivity is greatly improved, and the difficulty of obtaining is reduced, and the efficiency of skin detection is improved.

[0328] Fig. 22 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Fig. 22 As shown, the electronic device 22 of this embodiment includes: at least one processor 220 ( Fig. 22 Only one is shown in the figure) a processor, a memory 221, and a computer program 222 stored in the memory 221 and executable on the at least one processor 220, and when the processor 220 executes the computer program 222, the steps in the above-mentioned method embodiment for recommending any audio file are implemented.

[0329] The electronic device 22 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device may include, but is not limited to, a processor 220 and a memory 221. Those skilled in the art will appreciate that Fig. 22 It is only an example of the electronic device 22 and does not constitute a limitation on the electronic device 22. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0330] The processor 220 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0331] In some embodiments, the memory 221 may be an internal storage unit of the electronic device 22, such as a hard disk or memory of the electronic device 22. In other embodiments, the memory 221 may also be an external storage device of the electronic device 22, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 22. Further, the memory 221 may also include both an internal storage unit of the electronic device 22 and an external storage device. The memory 221 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 221 may also be used to temporarily store data that has been output or is to be output.

[0332] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0333] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0334] An embodiment of the present application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps of any of the above-mentioned method embodiments when executing the computer program.

[0335] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0336] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0337] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0338] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0339] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0340] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0341] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0342] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for recommending an audio file, characterized in that: include: Get the event tag of the shooting event corresponding to the video file; Parsing the video file to obtain a content tag corresponding to the video file; Selecting target audio associated with the content tag and the event tag in a music library, and generating audio recommendation information of the video file based on the target audio; The step of selecting a target audio file associated with the content tag and the event tag in the music library includes: Using the content tag and the event tag to generate an initial tag sequence corresponding to the video file; Based on a preset label mapping algorithm, a mapping label sequence corresponding to the initial label sequence is generated; each label in the mapping label sequence is configured with an associated weight value; the label included in the mapping label sequence is any existing label in the label library; Calculating the matching degree of each existing audio in the music library based on the weight value of each tag in the mapping tag sequence; The target audio is determined from the existing audio based on the matching degree.

2. The recommendation method according to claim 1, characterized in that: The event tag includes a shooting location; and selecting a target audio associated with the content tag and the event tag in the music library includes: Acquire text information of each existing audio in the music library, and use the existing audio containing the shooting location in the text information as the target audio; and / or Acquire a video clip associated with the shooting location, and use the soundtrack audio of the video clip as the target audio; and / or A historical event associated with the shooting location is determined, and an audio file corresponding to the historical event is used as the target audio.

3. The recommendation method according to claim 1, characterized in that: The event tag includes a shooting date; and selecting a target audio associated with the content tag and the event tag in the music library includes: If the shooting date is any preset specific date, the audio file associated with the specific date is used as the target audio.

4. The recommendation method according to claim 3, characterized in that: Before the step of taking the audio file associated with the specific date as the target audio if the shooting date is any preset specific date, the method further includes: Get the user information of the currently logged in user account; The specific date is determined based on the user information.

5. The recommendation method according to claim 1, characterized in that: The determining the target audio from the existing audio based on the matching degree includes: Selecting the existing audio whose matching degree is greater than a preset matching threshold as the candidate audio; Determining user characteristics of a currently logged-in user account based on user information of the user account; If any of the candidate audios matches the user feature, the candidate audio is used as the target audio.

6. The recommendation method according to any one of claims 1 to 5, characterized in that: The parsing of the video file to obtain a content tag corresponding to the video file includes: Determine a picture tag included in each video image frame of the video file; Counting the number of occurrences of each of the picture labels in all the video image frames of the video file, and sorting the picture labels in descending order of the number of occurrences to obtain a picture label sequence; The first N picture tags among the picture tags are selected as content tags corresponding to the video file; wherein N is a positive integer.

7. The recommendation method according to any one of claims 1 to 5, characterized in that: Before selecting the target audio associated with the content tag and the event tag in the music library, the method further includes: If the authorization information of the currently logged-in user account is stored, the operation record of the user account is obtained; generating a user feature of the user account based on the operation record; Existing music matching the user characteristics is extracted from the database to generate the music library.

8. A device for recommending audio files, characterized in that: include: An event tag acquisition unit, used to acquire an event tag of a shooting event corresponding to a video file; A content tag acquisition unit, used to parse the video file to obtain a content tag corresponding to the video file; an audio recommendation information generating unit, configured to select a target audio associated with the content tag and the event tag in a music library, and generate audio recommendation information of the video file based on the target audio; The audio recommendation information generating unit includes: An initial tag sequence generating unit, used to generate an initial tag sequence corresponding to the video file by using the content tag and the event tag; A mapping label sequence generating unit, used to generate a mapping label sequence corresponding to the initial label sequence based on a preset label mapping algorithm; each label in the mapping label sequence is configured with an associated weight value; the label contained in the mapping label sequence is any existing label in the label library; A matching degree calculation unit, used to calculate the matching degree of each existing audio in the music library based on the weight value of each tag in the mapping tag sequence; A matching degree identification unit is used to determine the target audio from the existing audio based on the matching degree.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.