A method for determining transition special effects and electronic equipment

By automatically matching video music styles and transition effects in electronic devices, the problems of low human-computer interaction efficiency and high rework rate in the prior art are solved, and a more efficient video creation process and better content quality are achieved.

CN115484425BActive Publication Date: 2024-12-31HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210057018.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-11-29
Filing Date
2022-01-18
Publication Date
2024-12-31
Estimated Expiration
2042-01-18

AI Technical Summary

Technical Problem

When adding transition effects to the prior art, users need to manually select and adjust, resulting in low human-computer interaction efficiency, high rework rate, and common situations where transition effects do not match the video music style.

Method used

By automatically determining the transition effects in electronic devices, the style based on video music automatically matches the transition effects, and adds them in video data to reduce user operations and improve matching degree and video content quality.

Benefits of technology

It improves the matching degree of transition effects with video music, reduces user operation complexity and rework rate, and improves the efficiency and content quality of video creation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115484425B_ABST
    Figure CN115484425B_ABST
Patent Text Reader

Abstract

The present application provides a method for determining a transition effect and an electronic device, and relates to the field of terminal technology. The problem of low efficiency of human-computer interaction in editing videos is solved. The specific scheme is: displaying a first interface; receiving a user's selection operation on a first identifier; in response to the selection operation, displaying a second interface; receiving a first operation of a user on a first control; in response to the first operation, starting to record first video data; after the first video data is recorded, displaying a third interface; the second video data includes: a video frame of the first video data, a first music, a first transition effect, and a second transition effect; the first transition effect is superimposed on the video frame corresponding to the first time point in the first video data; the second transition effect is superimposed on the video frame corresponding to the second time point in the first video data, and the second time point is located after the first time point; the second transition effect is one of a plurality of preset transition effects.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to a Chinese patent application filed with the State Intellectual Property Office on June 16, 2021, with application number 202110676709.3 and application name “A user video creation method and electronic device based on storyline mode”, the entire contents of which are incorporated by reference in this application.

[0002] This application also claims the priority of the Chinese patent application filed with the State Intellectual Property Office on November 29, 2021, with application number 202111434610.9 and application name “A method for determining a transition special effect and an electronic device”, and the newly added content of “202111434610.9” compared to “202110676709.3” is incorporated into this application by reference. Technical Field

[0003] The present application relates to the field of terminal technology, and in particular to a method for determining a transition special effect and an electronic device. Background Art

[0004] With the development of electronic technology, electronic devices such as mobile phones and tablets are generally equipped with multiple cameras, such as front cameras, rear cameras, wide-angle cameras, etc. Multiple cameras make it easier for users to shoot video works using electronic devices. After users finish shooting a video using an electronic device, they can add special effects to the video to obtain a more enjoyable video work. However, the current manual addition of transition effects to videos still has the problem of low human-computer interaction efficiency. Summary of the invention

[0005] The embodiments of the present application provide a method for determining a transition effect and an electronic device for improving the human-computer interaction efficiency of adding a transition effect.

[0006] In order to achieve the above objectives, this application adopts the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a method for determining a transition special effect, which is applied to an electronic device, and the method includes: the electronic device displays a first interface, the first interface includes a first identifier indicating a first shooting template; the first shooting template includes a first music, and the first music corresponds to a first transition special effect; the electronic device receives a user's selection operation on the first identifier; the electronic device displays a second interface in response to the selection operation; wherein the second interface is a recording preview interface; the second interface includes a first control indicating to start shooting; the electronic device receives a first operation of the user on the first control; the electronic device starts recording first video data in response to the first operation; after the first video data is recorded, the electronic device displays a third interface; wherein the third interface is used to display the second video data; the second video data includes: a video frame of the first video data, a first music, a first transition special effect, and a second transition special effect; the first transition special effect is superimposed on a video frame corresponding to a first time point in the first video data; the second transition special effect is superimposed on a video frame corresponding to a second time point in the first video data, and the second time point is located after the first time point; the second transition special effect is one of a plurality of preset transition special effects.

[0008] In the above embodiment, after selecting a shooting template (such as a first shooting template), the first video data is recorded. After the first video data is recorded, based on the first music and transition special effects (first transition special effects) corresponding to the first shooting template, the second video data is created. The created second video data is equipped with the first music, and further includes the first transition special effects and the second transition special effects. Among them, there is an absolute correlation between the first transition special effect and the first music, and in addition, there is a relative correlation between the second transition special effect and the first music, and the type is also random. In this way, while ensuring that the transition special effect is adapted to the first music, the diversity of the transition special effect is increased, the content quality of the created video data is enriched, and the possibility of user-instructed rework is reduced. In addition, in the process of creating the second video data, the required user operation is simple, which improves the human-computer interaction efficiency of creating the video.

[0009] In some possible embodiments, before the electronic device displays the third interface, the above method also includes: the electronic device determines a second transition special effect from a plurality of preset transition special effects based on a matching weight; wherein each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the degree of adaptability between the first music and the preset transition special effect; and the plurality of preset transition special effects include the first transition special effect.

[0010] In the above embodiment, the second transition special effect is obtained randomly based on the matching weight. In this way, the obtained second transition special effect can take into account both randomness and relevance to the first music, making the second transition special effect more consistent with the first music configured in the second video data, and also improving the quality of the video content.

[0011] In some possible embodiments, the second video data also includes a third transition effect corresponding to the first music, and the third transition effect is superimposed on a video frame corresponding to a third time point in the first video data, and the third time point is between the first time point and the second time point.

[0012] In some possible embodiments, the second video data also includes a fourth transition special effect, which is superimposed on the video frame corresponding to a fourth time point in the first video data, and the fourth time point is located after the second time point; the fourth transition special effect is one of a plurality of preset transition special effects, or, is one of the first transition special effect, the second transition special effect and the third transition special effect.

[0013] In some possible embodiments, the first time point, the second time point, the third time point and the fourth time point are all video frame division points in the first video data.

[0014] In some possible embodiments, the first music also corresponds to a maximum number of transition types; before the electronic device displays the third interface, the method also includes: the electronic device determines that the number of types of the first transition special effect, the second transition special effect and the third transition special effect is equal to the maximum number of transition types; the electronic device determines a fourth transition special effect from the first transition special effect, the second transition special effect and the third transition special effect based on a matching weight; wherein each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the degree of fit between the first music and the preset transition special effect; the multiple preset transition special effects include a first transition special effect and a third transition special effect.

[0015] In the above embodiment, while ensuring the diversity of the transition effects added to the second video data, it is also avoided that too many transition effects are added, which makes the content of the second video data messy. In this way, it can also reduce the possibility of users manually reducing the possibility of changing the type of transition effects, thereby improving the human-computer interaction efficiency of video production.

[0016] In some possible embodiments, the first music also corresponds to a maximum number of transition types; before the electronic device displays the third interface, the method also includes: the electronic device determines that the number of types of the first transition special effect, the second transition special effect and the third transition special effect is less than the maximum number of transition types; the electronic device determines a fourth transition special effect from a plurality of preset transition special effects based on a matching weight; wherein each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the degree of fit between the first music and the preset transition special effect; the plurality of preset transition special effects include a first transition special effect and a third transition special effect.

[0017] In some possible embodiments, the first transition special effect, the second transition special effect, and the third transition special effect are transition special effects of the same type.

[0018] In some possible embodiments, when the first video data is a video shot in horizontal mode, the multiple preset transition effects include: rotation transition, superposition transition, blur transition, melting transition, black field transition, white field transition, zoom in transition, zoom out transition, up transition and down transition; when the first video data is a video shot in vertical mode, the multiple preset transition effects include: left transition, right transition, rotation transition, superposition transition, blur transition, melting transition, black field transition, white field transition, zoom in transition and zoom out transition.

[0019] In a second aspect, an embodiment of the present application provides a method for determining a transition special effect, the method is applied to an electronic device, and the method includes: the electronic device displays a fourth interface, the fourth interface includes a thumbnail of third video data; the electronic device receives a user's selection operation on the thumbnail of the third video data; the electronic device displays a fifth interface in response to the selection operation; wherein the fifth interface is a video editing interface of the third video data; the fifth interface includes a one-key blockbuster control; the electronic device receives a second operation of the user on the one-key blockbuster control; the electronic device determines a first shooting template matching the third video data in response to the second operation; wherein the first shooting template includes a first music, and the first music corresponds to a first transition special effect; after determining the first shooting template, the electronic device displays a sixth interface; wherein the sixth interface is used to display the fourth video data; the fourth video data includes: a video frame of the third video data, a first music, a first transition special effect, and a second transition special effect; the first transition special effect is superimposed on a video frame corresponding to a first time point in the third video data; the second transition special effect is superimposed on a video frame corresponding to a second time point in the third video data, and the second time point is located after the first time point; the second transition special effect is one of a plurality of preset transition special effects.

[0020] In the above embodiment, for the saved video data (such as the third video data), the user can trigger the creation of the fourth video data based on the third video data by selecting the first shooting template. The created fourth video data is equipped with the first music, and further includes the first transition effect and the second transition effect. Among them, there is an absolute correlation between the first transition effect and the first music, and the second transition effect and the first music have a relative correlation, and the type is also random. In this way, while ensuring that the transition effect is adapted to the first music, the diversity of the transition effect is increased, the content quality of the created video data is enriched, and the possibility of users instructing rework is reduced. In addition, in the process of creating the fourth video data, the required user operation is simple, which improves the human-computer interaction efficiency of creating videos.

[0021] In some possible embodiments, before the electronic device displays the sixth interface, the method also includes: the electronic device determines a second transition special effect from a plurality of preset transition special effects based on a matching weight; wherein each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the degree of adaptability between the first music and the preset transition special effect; and the plurality of preset transition special effects include the first transition special effect.

[0022] In some possible embodiments, the first shooting template corresponds to the first style; the electronic device determines the first shooting template that matches the third video data, including: the electronic device uses a preset artificial intelligence model to determine that the third video data matches the first style; the electronic device determines that the first shooting template matches the third video data; or, the electronic device randomly determines the first shooting template from a plurality of preset shooting templates.

[0023] In a third aspect, an electronic device provided by an embodiment of the present application includes one or more processors and a memory; the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, when one or more processors execute the computer instructions, the one or more processors are used to: display a first interface, the first interface includes a first identifier indicating a first shooting template; the first shooting template includes a first music, and the first music corresponds to a first transition effect; receive a user's selection operation on the first identifier; in response to the selection operation, display a second interface; wherein the second interface is a recording preview interface; the second interface includes a first control indicating to start shooting; receive a first operation of the user on the first control; in response to the first operation, start recording first video data; after the first video data is recorded, display a third interface; wherein the third interface is used to display second video data; the second video data includes: a video frame of the first video data, the first music, the first transition effect, and the second transition effect; the first transition effect is superimposed on the video frame corresponding to the first time point in the first video data; the second transition effect is superimposed on the video frame corresponding to the second time point in the first video data, and the second time point is located after the first time point; the second transition effect is one of a plurality of preset transition effects.

[0024] In some possible embodiments, before displaying the third interface, one or more processors are also used to: determine a second transition special effect from the multiple preset transition special effects based on a matching weight; wherein each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the degree of fit between the first music and the preset transition special effect; and the multiple preset transition special effects include the first transition special effect.

[0025] In some possible embodiments, the second video data also includes a third transition special effect corresponding to the first music, and the third transition special effect is superimposed on a video frame corresponding to a third time point in the first video data, and the third time point is between the first time point and the second time point.

[0026] In some possible embodiments, the second video data also includes a fourth transition special effect, which is superimposed on a video frame corresponding to a fourth time point in the first video data, and the fourth time point is located after the second time point; the fourth transition special effect is one of the multiple preset transition special effects, or is one of the first transition special effect, the second transition special effect and the third transition special effect.

[0027] In some possible embodiments, the first time point, the second time point, the third time point and the fourth time point are all video frame division points in the first video data.

[0028] In some possible embodiments, the first music also corresponds to a maximum number of transition types; before displaying the third interface, one or more processors are also used to: determine that the number of types of the first transition special effect, the second transition special effect and the third transition special effect is equal to the maximum number of transition types; based on the matching weight, determine the fourth transition special effect from the first transition special effect, the second transition special effect and the third transition special effect; wherein each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the degree of fit between the first music and the preset transition special effect; the multiple preset transition special effects include the first transition special effect and the third transition special effect.

[0029] In some possible embodiments, the first music also corresponds to a maximum number of transition types; before displaying the third interface, one or more processors are also used to: determine that the number of types of the first transition special effect, the second transition special effect and the third transition special effect is less than the maximum number of transition types; based on the matching weight, determine the fourth transition special effect from the multiple preset transition special effects; wherein each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the degree of fit between the first music and the preset transition special effect; the multiple preset transition special effects include the first transition special effect and the third transition special effect.

[0030] In some possible embodiments, the first transition special effect, the second transition special effect, and the third transition special effect are of the same type.

[0031] In some possible embodiments, when the first video data is a video shot in horizontal mode, the multiple preset transition effects include: rotation transition, superimposition transition, blur transition, melting transition, black field transition, white field transition, zoom in transition, zoom out transition, up transition and down transition; when the first video data is a video shot in vertical mode, the multiple preset transition effects include: left transition, right transition, rotation transition, superimposition transition, blur transition, melting transition, black field transition, white field transition, zoom in transition and zoom out transition.

[0032] In a fourth aspect, an electronic device provided by an embodiment of the present application includes one or more processors and a memory; the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the one or more processors are used to: display a fourth interface, the fourth interface includes thumbnails of third video data; receive a user's selection operation on the thumbnails of the third video data; in response to the selection operation, display a fifth interface; wherein the fifth interface is a video editing interface for the third video data; the fifth interface includes a one-key blockbuster control; receive a second operation of the user on the one-key blockbuster control; and in response to the second operation, determine A first shooting template matching the third video data; wherein the first shooting template includes first music, and the first music corresponds to a first transition special effect; after determining the first shooting template, a sixth interface is displayed; wherein the sixth interface is used to display the fourth video data; the fourth video data includes: a video frame of the third video data, the first music, the first transition special effect and a second transition special effect; the first transition special effect is superimposed on a video frame corresponding to a first time point in the third video data; the second transition special effect is superimposed on a video frame corresponding to a second time point in the third video data, and the second time point is located after the first time point; the second transition special effect is one of a plurality of preset transition special effects.

[0033] In some possible embodiments, before displaying the sixth interface, one or more processors are also used to: determine a second transition special effect from the multiple preset transition special effects based on a matching weight; wherein each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the degree of fit between the first music and the preset transition special effect; and the multiple preset transition special effects include the first transition special effect.

[0034] In some possible embodiments, the first shooting template corresponds to a first style; one or more processors are used to: use a preset artificial intelligence model to determine that the third video data matches the first style; determine that the first shooting template matches the third video data; or, randomly determine the first shooting template from a plurality of preset shooting templates.

[0035] In a fifth aspect, an embodiment of the present application provides a computer storage medium, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the first aspect and its possible embodiments, or the electronic device executes the method described in the second aspect and its possible embodiments.

[0036] In a sixth aspect, the present application provides a computer program product. When the computer program product runs on the above-mentioned electronic device, it enables the electronic device to execute the method described in the above-mentioned first aspect and its possible embodiments; or, it enables the electronic device to execute the method described in the above-mentioned second aspect and its possible embodiments.

[0037] It can be understood that the methods, electronic devices, computer-readable storage media and computer program products provided in the above-mentioned various aspects are all applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0039] Figure 2A A flowchart of a method for determining a transition effect provided in an embodiment of the present application;

[0040] Figure 2B One of the sub-step flow charts of S101 provided in the embodiment of the present application;

[0041] Figure 3 One of the example diagrams of the display interface provided in the embodiment of the present application;

[0042] Figure 4 The second example diagram of the display interface provided in the embodiment of the present application;

[0043] Figure 5A The second sub-step flowchart of S101 provided in the embodiment of the present application;

[0044] Figure 5B The third example diagram of the display interface provided in the embodiment of the present application;

[0045] Figure 6The fourth example diagram of the display interface provided in the embodiment of the present application;

[0046] Figure 7 This is a fifth example of a display interface provided in an embodiment of the present application;

[0047] Figure 8 Figure 6 of the example of the display interface provided in the embodiment of the present application;

[0048] Fig. 9 Figure 7 of the example display interface provided in the embodiment of the present application;

[0049] Fig.10 An eighth example of a display interface provided in an embodiment of the present application;

[0050] Fig.11 One of the schematic diagrams of the principle of adding transition effects provided in an embodiment of the present application;

[0051] Fig.12 The second schematic diagram of the principle of adding transition effects provided in the embodiment of the present application;

[0052] Fig.13 The third schematic diagram of the principle of adding transition effects provided in the embodiment of the present application;

[0053] Fig.14 A schematic diagram of the composition of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0055] The implementation of this embodiment will be described in detail below with reference to the accompanying drawings.

[0056] Generally speaking, after a user shoots a video using an electronic device, the video can be edited by operating the electronic device, such as configuring video music, adding animation effects, adding transition effects, etc. In this way, the video after secondary creation will be more vivid, rich, and in line with the user's creative intention. Among them, adding transition effects can not only make the transition of video content more natural, but also make the content presented by the video richer. However, in the related art, when adding transition effects, the user needs to determine the position point where the transition effect needs to be inserted during the video playback process, that is, determine the video frame where the transition effect needs to be superimposed, and superimpose the selected transition effect. However, after the user manually adds the transition effect, it may also happen that the transition effect selected by the user does not match the style of the video music. In this case, the user also needs to reselect the transition effect, and the rework rate is extremely high. This undoubtedly increases the complexity of adding transition effects and reduces the human-computer interaction efficiency of creating videos.

[0057] The embodiment of the present application provides a method for determining a transition effect, which can be applied to an electronic device with multiple cameras. Using the method provided by the embodiment of the present application, the electronic device can automatically determine the transition effect that matches the video data based on the style of the video music and add it to the video data. In this way, without user operation, the matching degree between the selected transition effect and the video music is improved, the rework rate of selecting the transition effect is reduced, and the human-computer interaction efficiency of creating videos is improved.

[0058] Exemplarily, the electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a smart watch, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, and other devices including multiple cameras. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.

[0059] The following will describe in detail the implementation of the present application in conjunction with the accompanying drawings. Figure 1 , is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. Figure 1As shown, 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.

[0060] Among them, the above-mentioned sensor module 180 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.

[0061] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, 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.

[0062] 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 memory, 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.

[0063] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0064] 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.

[0065] 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.

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

[0067] 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.

[0068] 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.

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

[0070] The ISP is used to process the data fed back by the 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 the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 293.

[0071] 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 light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion 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 N cameras 193, where N is a positive integer greater than 1.

[0072] Exemplarily, the N cameras 193 may include: one or more front cameras and one or more rear cameras. For example, the electronic device 100 is a mobile phone. The mobile phone includes at least one front camera. The front camera is configured on the front side of the mobile phone, such as, Figure 3The front camera 301 shown in (a) in FIG. In addition, the mobile phone includes at least one rear camera. The rear camera is arranged on the back side of the mobile phone. In this way, the front camera and the rear camera face different directions.

[0073] In some embodiments, the electronic device may enable at least one of the N cameras 193 to shoot and generate corresponding photos or videos. For example, a front camera of the electronic device 100 is used alone to shoot. For another example, a rear camera of the electronic device 100 is used alone to shoot. For another example, two front cameras are enabled at the same time to shoot. For another example, two rear cameras are enabled at the same time to shoot. For another example, a front camera and a rear camera are enabled at the same time to shoot, etc.

[0074] It is understandable that enabling a single camera 193 for shooting can be referred to as enabling a single-camera mode, such as a front-camera mode and a rear-camera mode. Enabling multiple cameras 193 for shooting at the same time can be collectively referred to as enabling a multi-camera mode, such as a front-front mode, a front-back mode, a rear-back mode, and a picture-in-picture mode.

[0075] Take the example of enabling a front camera and a rear camera at the same time. After enabling a front camera and a rear camera at the same time to take pictures, the electronic device can render and merge the image frames captured by the front camera and the rear camera. Among them, the above-mentioned rendering and merging can be splicing the image frames captured by different cameras. For example, after taking a vertical screen photo using the front-to-back mode, the image frames captured by different cameras can be spliced ​​up and down. For another example, after taking a horizontal screen photo using the back-to-back mode, the image frames captured by different cameras can be spliced ​​left and right. For another example, after taking a photo using the picture-in-picture mode, the image frames captured by one camera can be inlaid in the image frames captured by another camera. Then, encoding is performed to generate photos.

[0076] In addition, after a front camera and a rear camera are enabled to shoot video at the same time, the front camera collects one video stream and caches it. The rear camera collects one video stream and caches it. Then, the electronic device 100 renders and merges the two cached video streams frame by frame, that is, renders and merges the video frames with the same or matching acquisition time points in the two video streams. After that, encoding is performed to generate a video file.

[0077] 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.

[0078] 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.

[0079] 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.

[0080] 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. The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. In this way, the electronic device 100 can play audio data, such as video music, etc.

[0081] The pressure sensor is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor can be arranged on the display screen 194. The gyroscope sensor can be used to determine the movement posture of the electronic device 100. 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 100, and is applied to applications such as horizontal and vertical screen switching. Touch sensor, also known as "touch panel". The touch sensor can be arranged on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also known as a "touch screen". The touch sensor 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.

[0082] The methods in the following embodiments can all be implemented in the electronic device 100 having the above hardware structure. In the following embodiments, the methods in the embodiments of the present application are described by taking the electronic device 100 as a mobile phone as an example.

[0083] The embodiment of the present application provides a method for determining a transition effect, which can be applied to a process in which a user creates a video work using a mobile phone. The mobile phone may include multiple cameras.

[0084] In some embodiments, the process of creating a video work by a mobile phone includes: a stage of enabling a single camera to shoot a single-lens video and a stage of editing the single-lens video (e.g., adding transition effects to the single-lens video). The single-lens video can be a video obtained based on a video stream collected by a single camera.

[0085] In other embodiments, the process of creating a video by the mobile phone includes: enabling multiple cameras to shoot a multi-lens video and editing the multi-lens video (e.g., adding transition effects to the multi-lens video). The multi-lens video may be a video obtained by rendering and merging video streams captured by multiple cameras.

[0086] Alternatively, in other embodiments, the process of creating a video work by the mobile phone includes: a stage of selecting shot video data (eg, single-lens video or multi-lens video) and a stage of editing the selected video.

[0087] It can be understood that, whether for a single-lens video or a multi-lens video, the implementation principle of the method for determining the transition special effect is the same. Figure 2A As shown, the above method may include the following steps:

[0088] S101, obtaining video data 1.

[0089] In some embodiments, the video data 1 may be a video shot based on a shooting template. In other embodiments, the video data 1 may be a video shot without being shot based on a shooting template.

[0090] Among them, when creating video works with soundtracks, filters, and special effects, using the above-mentioned shooting templates helps to simplify the complexity of creation. Exemplarily, the shooting template includes filters, stickers, and multiple special effects for selection (such as atmosphere special effects, transition special effects, stickers, etc.). At the same time, the shooting template also corresponds to a video music. In this way. The user only needs to operate the mobile phone to shoot the video screen, that is, shoot video data 1, and the mobile phone can automatically process the video data 1 according to the shooting template, such as automatically adding transition special effects.

[0091] Take the video data 1 as an example, which is a video shot based on the shooting template. Figure 2B As shown, the above S101 may include:

[0092] S101-1, the mobile phone displays interface 1. Interface 1 is a framing interface for recording a video.

[0093] The above interface 1 may be an application interface provided by a camera APP in a mobile phone. In other embodiments, the above interface 1 may also be an application interface provided by other APPs (such as a short video APP) in a mobile phone. While the mobile phone displays the interface 1, the user may instruct the mobile phone to start video recording through operation.

[0094] For example, Figure 3 As shown in (a) in the figure, the interface 302 displayed by the mobile phone is a viewfinder interface provided by the camera application, and is also a viewfinder interface for realizing the dual-lens video recording function. In addition, in the interface 302, controls corresponding to multiple functional modes of the camera application are included, such as photo control, video control, dual-lens video control, etc. During the display of the interface 302, the dual-lens video control is in a selected state. The user can switch to a viewfinder interface for realizing different functions by operating the controls corresponding to the functional mode. For example, when the mobile phone detects the user's operation on the video control, such as clicking the operation, the viewfinder interface for realizing the single-lens video recording function can be switched to display. The switched viewfinder interface also includes controls corresponding to multiple functional modes, and at this time, the video control is in a selected state.

[0095] In some embodiments, when the dual-lens video control is selected, the interface 302 includes a viewfinder 303 and a viewfinder 304. The arrangement position relationship of the viewfinder 303 and the viewfinder 304 is related to the posture of the mobile phone. For example, in a scenario where the gyroscope sensor of the mobile phone recognizes that the mobile phone is in a vertical screen state, the viewfinder 303 and the viewfinder 304 are arranged up and down. In a scenario where the gyroscope sensor of the mobile phone recognizes that the mobile phone is in a horizontal screen state, the viewfinder 303 and the viewfinder 304 are arranged left and right.

[0096] In addition, the viewfinder 303 and the viewfinder 304 correspond to cameras respectively. For example, the viewfinder 303 corresponds to camera 1 (e.g., rear camera), so the viewfinder 303 can be used to display the video frames collected by camera 1. The viewfinder 304 corresponds to camera 2 (e.g., front camera), so the viewfinder 304 can be used to display the video frames collected by camera 2. It can be understood that the camera corresponding to each viewfinder (e.g., viewfinder 303 and viewfinder 304) can be adjusted according to the user's operation.

[0097] In the interface 302, a micro-movie control 305 is also included, and the micro-movie control 305 is used to start the micro-movie function. When the micro-movie function is enabled, the user can conveniently create a video work with music, filters, and special effects through the mobile phone. In addition, in other framing interfaces for recording videos (such as framing interfaces for realizing single-lens recording functions), a micro-movie control with the same function can also be included.

[0098] S101 - 2 , the mobile phone responds to the user's operation in interface 1 and shoots video data 1 under the micro-movie function.

[0099] In some embodiments, when the mobile phone displays the interface 302 and receives an operation of the user on the micro-movie control 305, such as a click operation, the first interface may be displayed, such as Figure 3 The interface 306 shown in (b) in FIG. 306 is a guide interface for guiding the user to select a shooting template. The interface 306 includes a plurality of template windows indicating different shooting templates. For example, window 307, window 308, window 309, and window 310. The window 307 is used to indicate a shooting template named hello summer, window 308 is used to indicate a shooting template named sunny, window 309 is used to indicate a shooting template named HAPPY, and window 310 is used to indicate a shooting template named beautiful little girl.

[0100] Of course, in addition to the corresponding video music, different shooting templates may also have different filters, stickers, atmosphere effects, and transition effects. Obviously, with the cooperation of different video music, filters, stickers, atmosphere effects, and transition effects, the video styles produced are also different. In other words, users can create video works of different styles by selecting different shooting templates.

[0101] In some embodiments, the user can select shooting templates of different video styles while the mobile phone displays interface 306. That is, the mobile phone can receive the user's operation on the template window in interface 306, such as a click operation, to determine the shooting template selected by the user. For example, the mobile phone receives the user's click operation on window 308, and can determine that the user has selected the shooting template named sunny. In addition, in other embodiments, a default template can also be pre-set in the mobile phone. For example, the hello summer shooting template can be pre-selected and configured as the default template. In this way, when the mobile phone switches from interface 302 to display interface 306, the hello summer shooting template is in a selected state. Afterwards, when the mobile phone does not receive a selection operation for other shooting templates, the mobile phone determines that the user has selected the hello summer shooting template. When the mobile phone receives a selection operation for other shooting templates (such as the little beautiful shooting template), the mobile phone determines that the user has selected the little beautiful shooting template.

[0102] In some embodiments, each shooting template corresponds to a sample. The sample is a video pre-made based on the shooting template. When a shooting template is selected by a user, the corresponding sample can be displayed in the preview window 311. Thus, the user can preview the style effect of the shooting template and it is convenient for the user to make a selection. For example, when the "Hello Summer" shooting template is selected, the sample of "Hello Summer" is played in the preview window 311.

[0103] In addition, while the mobile phone displays interface 306 , the user can change the selected shooting template by selecting a different template window.

[0104] Of course, while the mobile phone displays the interface 306, the mobile phone can also receive the user's operation on the control 312. After receiving the operation of the control 312, the mobile phone can determine the currently selected shooting template as the shooting template actually selected. For the convenience of description, the shooting template actually selected can also be called shooting template 1 or the first shooting template, and the template window corresponding to the first shooting template can also be called the first mark. In addition, the video music corresponding to the first shooting template is also called the first music.

[0105] After determining the shooting template 1, the mobile phone can also switch to display the second interface, such as Figure 3 The interface 313 shown in (c) above is a template framing interface corresponding to the shooting template 1, and can also be called a recording preview interface.

[0106] Interface 313 also includes viewfinders. When the mobile phone switches from interface 306 to interface 313, the number of viewfinders corresponding to interface 313 is related to shooting template 1. At the same time, the video stream displayed by the viewfinder is also related to shooting template 1.

[0107] In some embodiments, the shooting template may also correspond to a default lens mode, which may include a single front mode, a single rear mode, an upper front and lower rear mode, an upper rear and lower front mode, an upper rear (near) and lower rear (far) mode, an upper rear (far) and lower rear (near), a picture-in-picture mode, etc.

[0108] Exemplarily, when the single front mode is enabled, the interface 313 includes a viewfinder, which is used to preview the video stream captured by the front camera.

[0109] As another example, when the single rear camera mode is enabled, the interface 313 includes a viewfinder, which is used to preview the video stream captured by the rear camera.

[0110] It should be noted that when there are multiple front cameras and rear cameras, there is a main camera among the multiple front cameras, such as front camera a, and there is also a main camera among the multiple rear cameras, such as rear camera a. In the single front mode, the viewfinder is used to display the video stream captured by the front camera a. In the single rear mode, the viewfinder is used to display the video stream captured by the rear camera a.

[0111] Also exemplarily, when the top-front-bottom-back mode is enabled, the interface 313 includes two viewfinders, such as viewfinder 1 and viewfinder 2. The above viewfinder 1 and viewfinder 2 are arranged up and down in the interface 313. The viewfinder 1 arranged on the top is used to display the video stream captured by the front camera, and the viewfinder 2 arranged on the bottom is used to display the video stream captured by the rear camera. For example, viewfinder 1 is used to display the video stream captured by the front camera a, and viewfinder 2 is used to display the video stream captured by the rear camera a. For another example, viewfinder 1 is used to display the video stream captured by other front cameras, and viewfinder 2 is used to display the video stream captured by other rear cameras. The same is true when the top-back-bottom-front mode is enabled, the difference is that viewfinder 1 is used to display the video stream captured by the rear camera, and viewfinder 2 is used to display the video stream captured by the front camera.

[0112] As another example, in the case where the mobile phone includes multiple rear cameras, when the upper rear (near) and lower rear (far) modes are enabled, the interface 313 includes two viewfinders, such as viewfinder 1 and viewfinder 2. The viewfinder 1 and viewfinder 2 are arranged up and down in the interface 313. The viewfinder 1 and viewfinder 2 are respectively used to display the video streams captured by the two rear cameras.

[0113] It is understandable that the types of multiple rear cameras installed in a mobile phone may be different. For example, the rear camera of the mobile phone may be one or a combination of a main camera, a telephoto camera, a wide-angle camera, an ultra-wide-angle camera, a macro camera, etc. In some examples, different rear cameras may have different focal lengths, so that different rear cameras can shoot at different distances.

[0114] In the above example, the viewfinder 1 arranged on the top can be used to display the rear camera with a relatively long focal length, and the viewfinder 2 arranged on the bottom can be used to display the rear camera with a relatively short focal length. For example, when the viewfinders 1 and 2 are used to display the video streams captured by the rear camera b (telephoto camera) and the rear camera c (wide-angle camera) respectively, the telephoto camera has a longer focal length than the wide-angle camera, so the viewfinder 1 is used to display the video stream captured by the rear camera b, and the viewfinder 2 is used to display the video stream captured by the rear camera c.

[0115] Of course, viewfinders 1 and 2 can also display other types of combinations of rear cameras, for example, the main camera and the telephoto camera, the main camera and the wide-angle camera, the main camera and the ultra-wide-angle camera, the main camera and the macro camera, the telephoto camera and the ultra-wide-angle camera, the telephoto camera and the macro camera, or the wide-angle camera and the macro camera, etc.

[0116] For example, in the case where the mobile phone includes multiple rear cameras, when the upper rear (far) and lower rear (near) are enabled, the interface 313 includes two viewfinders, such as viewfinder 1 and viewfinder 2. The viewfinder 1 and viewfinder 2 are arranged up and down in the interface 313. The viewfinder 1 arranged on the top can be used to display a rear camera with a relatively short focal length, and the viewfinder 2 arranged on the bottom can be used to display a rear camera with a relatively long focal length.

[0117] As another example, when the picture-in-picture mode is enabled, the interface 313 includes two viewfinders, such as viewfinder 1 and viewfinder 2. The size of viewfinder 2 is smaller than that of viewfinder 1, and viewfinder 2 can be embedded in viewfinder 1. Viewfinder 1 is used to display the video stream captured by the rear camera, and viewfinder 2 is used to display the video stream captured by the front camera. Of course, viewfinder 1 is used to display the video stream captured by the front camera, and viewfinder 2 is used to display the video stream captured by the rear camera. In other examples, viewfinder 1 can also be used to display the video stream captured by the front camera, and viewfinder 2 can be used to display the video stream captured by the rear camera. It can also be that viewfinder 1 is used to display a rear camera with a relatively long focal length, and viewfinder 2 is used to display a rear camera with a relatively close focal length. That is, the cameras corresponding to viewfinder 1 and viewfinder 2 in the picture-in-picture mode can be determined by the user. In some examples, when the picture-in-picture mode is enabled by default, viewfinder 1 is used to display the video stream captured by the rear camera, and viewfinder 2 is used to display the video stream captured by the front camera.

[0118] In the above example, the lens mode described is the mode applicable when the mobile phone is in portrait mode. When the mobile phone is in landscape mode, the lens mode may also include left front right rear mode, left rear right front mode, left rear (near) right rear (far) mode, left rear (far) right rear (near), etc.

[0119] Among them, the left front right rear mode, the left rear right front mode, the left rear (near) right rear (far) mode, and the left rear (far) right rear (near) are similar to the top front bottom rear mode, the top rear bottom front mode, the top rear (near) bottom rear (far) mode, and the top rear (far) bottom rear (near) in the above examples, and all correspond to two viewfinders, such as viewfinder 3 and viewfinder 4, which are arranged left and right in the interface 313. The viewfinder 3 corresponds to the viewfinder 1, and the viewfinder 4 corresponds to the viewfinder 2. For example, the left front right rear mode is similar to the top front bottom rear mode, and the viewfinder 3 is used to display the video stream of the front camera, and the viewfinder 4 is used to display the video stream of the rear camera.

[0120] As an example, the lens mode corresponding to the "Hello Summer" shooting template is up, back, down, front, such as Figure 3As shown in (c) in FIG. 1 , when the “Hello Summer” shooting template is determined as shooting template 1, the interface 313 displayed by the mobile phone includes a viewfinder 314 and a viewfinder 315. The viewfinder 314 is arranged on the upper side of the viewfinder 315. In addition, the viewfinder 314 is used to display the video stream collected by the rear camera, and the viewfinder 315 is used to display the video stream collected by the front camera.

[0121] In some embodiments, the interface 313 also includes a lens switching control, such as control 316. The lens switching control is used to assist the user in selecting other lens modes to replace the default lens mode of the shooting template 1.

[0122] In addition, during the display of interface 313, the mobile phone can also play the video music corresponding to shooting template 1. For example, the video music corresponding to the "Hello Summer" shooting template is the song "Hello Summer". When the mobile phone determines that the "Hello Summer" shooting template is the scene of shooting template 1, during the display of interface 313, the mobile phone can play the song "Hello Summer". Figure 3 As shown in (c), the duration of the song "Hello Summer" is 15 seconds. After playing the song "Hello Summer" for 15 seconds, the mobile phone can play the song "Hello Summer" in a loop.

[0123] In some embodiments, the interface 313 also includes a song switching control, such as control 317. The song switching control is used to assist the user in selecting replacement music to replace the video music corresponding to the shooting template 1. After the mobile phone responds to the user's instructions and replaces the video music corresponding to the shooting template 1, the mobile phone plays the replacement music. In some examples, the replacement music corresponding to different shooting templates may be different. The replacement music and the video music corresponding to the shooting template may be songs with similar styles, the same beats, or similar melodies. In other examples, the replacement music corresponding to different shooting templates may be the same, such as music that has been saved in the mobile phone, or music that can be searched by the mobile phone.

[0124] During the display of interface 313 , the mobile phone has not actually started shooting video data 1 . However, along with the video music, the user can preview the framing effect of this shooting through interface 313 .

[0125] In some embodiments, the interface 313 also includes a one-touch shooting control, also called a first control, such as control 318. After the mobile phone receives a user operation on control 318, such as a click operation, Figure 3 As shown in (d) of FIG. 1 , the mobile phone recording interface, i.e., interface 319, begins to formally shoot video data 1. In addition, the duration of the shot video data 1 does not exceed the set duration of the shooting template 1. For example, the set duration may be equal to the duration of the video music corresponding to the shooting template 1, and for another example, the set duration may be slightly shorter than the duration of the video music.

[0126] For example, the duration of "Hello Summer" is 15 seconds, and the set duration of the Hello Summer shooting template is also 15 seconds. When shooting video data 1, if the shooting duration reaches 15 seconds, the mobile phone can automatically stop shooting to obtain video data 1, also called first video data.

[0127] As another example, during the recording process, the mobile phone displays a recording interface, such as: Figure 3 The interface 319 shown in (d) in FIG. 319 includes a control for indicating the termination of shooting, such as control 320. If the duration of shooting video data 1 does not reach 15 seconds, the mobile phone can receive a user operation on control 320, such as a long press operation. After receiving the operation on control 320, the mobile phone stops shooting and obtains video data 1.

[0128] After obtaining the video data 1, the process may enter S102, whereby the mobile phone may automatically perform secondary editing on the video data 1 to obtain the final output video work. Figure 4 As shown, Figure 4 As shown, after the shooting time of video data 1 reaches the set time, the mobile phone can process video data 1 according to the shooting template to obtain a video work, that is, the second video data, and display a preview interface for playing the video work, that is, the third interface, such as interface 401.

[0129] Continuing, video data 1 is a video shot without being based on a shooting template. As an example, Figure 5A As shown, the above S101 may also include:

[0130] S101 - 3 , while the main interface of the mobile phone is displayed, according to the user's operation on the icon of the gallery APP, the application interface 1 provided by the gallery APP is displayed.

[0131] In some embodiments, the main interface may be a user interface displayed after the mobile phone is unlocked, and the main interface may provide an interface for activating an existing APP in the mobile phone, such as an APP icon. Figure 5B As shown in (a) of FIG. 5 , the main interface of the mobile phone (i.e., interface 501) includes multiple APP icons. Each icon corresponds to an APP. During the display of the main interface, the mobile phone can enable the corresponding application according to the icon selected by the user.

[0132] For example, the mobile phone may receive a click operation on the icon 502 of the gallery APP, and in response to the operation, display the application interface 1 provided by the gallery APP, also referred to as the fourth interface, such as Figure 5B Interface 503 shown in (b) in FIG.

[0133] In some embodiments, the application interface 1 will display thumbnails of various picture resources and video resources. These picture resources or video resources may be taken and stored by the mobile phone, for example, when no shooting template is selected, the video data (such as single-lens video or multi-lens video) taken and stored, or they may be downloaded from the Internet, or they may be synchronized to the cloud. For example, Figure 5B The interface 503 shown in (b) is an application interface 1 provided by the gallery APP, and the interface 503 includes a thumbnail of a video 504 and thumbnails of multiple pictures.

[0134] It can be seen that while the mobile phone displays the application interface 1 , the user can browse and query the stored video data, thereby facilitating the user to select a video as the video data 1 .

[0135] S101 - 4 , in response to the user's operation in the application interface 1 , video data 1 is determined.

[0136] In some embodiments, the mobile phone can receive a user's selection operation on a thumbnail of any video in the application interface 1. In response to the user's selection operation on the thumbnail of any video, the mobile phone can display a video editing interface, also known as the fifth interface. For example, in response to a user's click operation on video 504 in interface 503, the mobile phone can display Figure 5B The interface 505 shown in (c) is an editing interface of the video 504. In this scenario, the selected thumbnail can be called a thumbnail of the third video data.

[0137] The video editing interface includes a one-key blockbuster control 506. The one-key blockbuster control 506 is used to trigger the mobile phone to process the video 504, such as adding transition effects, configuring video music, etc.

[0138] In some embodiments, when the mobile phone receives an operation of the user on the one-key blockbuster control 506, such as a click operation, the mobile phone can determine that the video 504 is video data 1.

[0139] In addition, in response to the user's operation of the one-key blockbuster control 506, the mobile phone can also randomly determine a shooting template from the existing shooting templates, which can also be called shooting template 1, and use it to process video 504. Alternatively, in response to the user's operation of the one-key blockbuster control 506, the mobile phone uses a preset artificial intelligence model to identify the picture style corresponding to video 504, and then obtains a shooting template with a high degree of adaptability to the picture style of video 504 from the existing shooting templates, that is, shooting template 1, that is, shooting template 1 can correspond to the first style, and when video 504 belongs to the first style, shooting template 1 can be determined. In this way, the determined shooting template 1 will also match video 504 and can be used to process video 504. The video work obtained after processing can also be called fourth video data, which is similar to the second video data in the aforementioned embodiment. In addition, after processing video 504, the sixth interface can be displayed, and the playback window in the sixth interface is used to display the fourth video data.

[0140] S102, after obtaining the video data 1, the mobile phone divides the video data 1 to obtain a plurality of video segments.

[0141] In some embodiments, the mobile phone can use an artificial intelligence model to divide the video data 1 to obtain multiple video segments, wherein the content similarity between video frames of the same video segment is not less than a set value (eg, 80%).

[0142] In other embodiments, the mobile phone may determine segmentation points in the video data 1 according to the rhythm of the video music in the shooting template 1, and divide the video data 1 into a plurality of video segments based on the segmentation points.

[0143] The above-mentioned segmentation point can be understood as a time point, which belongs to the relative time axis corresponding to the video data 1. It can be understood that the 0 moment of the relative time axis corresponds to the acquisition time of the first frame of the video data 1. The time interval between the video frame and the segmentation point mentioned in the subsequent embodiments may refer to the time interval between the acquisition time of the video frame and the segmentation point.

[0144] In addition, after the mobile phone divides the video data 1 according to the segmentation point, the video frames whose acquisition time is before the segmentation point and the video frames whose acquisition time is after the segmentation point belong to different video segments.

[0145] As an implementation method, the mobile phone may determine the segmentation points in the video data 1 according to the rhythm of the video music, which may include:

[0146] (1) The mobile phone obtains a segmentation step length that matches the rhythm of the video music. The segmentation step length is used to determine a plurality of optional segmentation positions (also referred to as pre-selected points) on the video data 1, so that the time interval between two adjacent pre-selected points is equal to the segmentation step length.

[0147] As an example, the segmentation step lengths corresponding to different shooting templates may be different. It is understandable that different shooting templates correspond to different video music, and at the same time, the beats, melodies and other features of different video music are different. However, the segmentation step length corresponding to the same shooting template is fixed. In this way, the mobile phone can pre-configure the segmentation step length of the video music.

[0148] That is, the shooting template may also include a parameter of segmentation step length, so that the mobile phone can obtain the corresponding segmentation step length through the shooting template.

[0149] As an example, the shooting template may be as shown in Table 1 below:

[0150] Table 1

[0151]

[0152] As shown in Table 1, the styles of the shooting templates include soothing and joy. Among them, the shooting templates named Hello Summer and Little Beautiful belong to the soothing style, and the shooting templates named sunny and HAPPY belong to the joyful style. The above display order is used to indicate the arrangement order of the template windows corresponding to each shooting template in the interface 306. Of course, the shooting template with a display order of 1 can be a default template.

[0153] According to Table 1, the lens mode corresponding to the Hello Summer shooting template is the up-back-down-front mode, the video music is "Hello Summer", the corresponding duration of the video music is 15s, and the segmentation step is 1.5s.

[0154] Similarly, according to Table 1, the lens mode corresponding to the Little Beautiful shooting template is the single front mode, the video music is "Romance", the duration of the video music is 20s, and the segmentation step is 1.2s. The relevant information of other shooting templates can also be determined by Table 1, which will not be repeated here. In addition, the time value (beat) in Table 1 is used to record the beat of the video music. Each video music corresponds to a beat, so the shooting template to which the video music belongs also corresponds to a time value (beat).

[0155] (2) After obtaining the corresponding segmentation step length, the mobile phone determines the pre-selected point according to the segmentation step length. In this way, it is determined that each pre-selected point is adapted to the rhythm of the video music. In this way, the segmentation of the video music at the card point can be achieved.

[0156] (3) The mobile phone selects a split point from multiple pre-selected points.

[0157] It is understandable that, although each pre-selected point is qualified as a segmentation point, in order to prevent the video data 1 from being divided too finely, the mobile phone can also screen based on multiple pre-selected points and select segmentation points. Thus, it is ensured that the mobile phone uses the selected segmentation points to divide the video data 1 into multiple video segments that meet the segmentation time limit.

[0158] For example, the above segmentation time limit may be a film length limit condition, which includes a minimum film length and a maximum film length.

[0159] For example, a mobile phone divides video data 1 into i video segments (i is a positive integer greater than 1) based on the selected segmentation points. The i video segments meet the segmentation time limit in the following way: the lengths of the first i-1 video segments are between the minimum length and the maximum length, and the length of the i-th video segment is not less than the minimum length. The i video segments are arranged in the order of their acquisition time.

[0160] In some examples, the mobile phone can also pre-configure the segmentation time limit. That is, each shooting template can also include a segmentation time limit. As shown in Table 1 above, the shooting template also includes a segmentation time limit. For example, the segmentation time limit corresponding to the shooting templates of "Hello Summer" and "Little Beauty" is 5s to 10s, and the segmentation time limit corresponding to the shooting templates of "sunny" and "HAPPY" is 4s to 8s.

[0161] Taking the segmentation time limit of 5s to 10s as an example, the mobile phone divides the video data 1 into i video segments based on the selected segmentation points. Among the i video segments, the lengths of the first i-1 video segments are not less than 5s and not more than 10s, and the length of the i-th video segment is not less than 5s. In this case, the mobile phone can determine that the divided video segments all meet the segmentation time limit.

[0162] S103, the mobile phone obtains a transition effect that matches the shooting template 1, and uses it to connect the video clips corresponding to the video data 1.

[0163] In some embodiments, the mobile phone can determine a transition effect that matches the shooting template 1 from a plurality of available transition effects (also referred to as preset transition effects) to connect the video clips corresponding to the video data 1. The available transition effects include: left shift transition, right shift transition, rotation transition, dissolve transition, blur transition, melt transition, black field transition, white field transition, zoom in transition, zoom out transition, up transition, down transition, etc.

[0164] For example, Figure 6As shown, in the case where a left shift transition is added to the video data 1, when the mobile phone plays the video frame 1 with the left shift effect added, the video frame 1 moves to the left by a distance of 1 in the interface 401 at a speed of 1. During the movement of the video frame 1, the video frame 2 follows the video frame 1 and appears from the right side of the interface 401. It can be understood that the above-mentioned video frame 1 and the video frame 2 are two adjacent video frames in the video data 1. Then, the video frame 1 continues to move to the left in the interface 401 at a speed of 2 until it disappears from the interface 401, wherein the speed 2 is greater than the speed 1. After the video frame 1 disappears, the video frame 2 is displayed in the interface 401 to ensure that the other video frames after the video frame 1 can be played in sequence.

[0165] In addition, the implementation principles of right shift transition and left shift transition are similar. The difference between the two is that the moving directions are opposite, which will not be repeated here.

[0166] As another example, Figure 7 As shown, when a rotation transition is added to video data 1, when the mobile phone plays video frame 1 with a rotation effect added, video frame 1 is controlled to rotate. After video frame 1 rotates to the set angle, video frame 1 disappears (e.g., video frame 1 is canceled), and video frame 2 is displayed.

[0167] For example, Figure 8 As shown, in the case where a dissolve transition is added to video data 1, when the mobile phone plays video frame 1 with a dissolve transition added, video frame 1 and video frame 2 are overlapped, and video frame 1 is placed on top. Then, the transparency of video frame 1 gradually changes from 0% to 100%, so that video frame 1 disappears from interface 401, and video frame 2 is displayed in interface 401.

[0168] For example, Fig. 9 As shown, in the case where a blur transition is added to video data 1, when the mobile phone plays the video frame 1 with the blur transition added, the mobile phone first performs Gaussian blur processing on the video frame 1 to obtain a blurred video frame 1, and then overlaps the blurred video frame 1 and the video frame 2. Among them, the blurred video frame 1 is placed on top. Then, the transparency of the blurred video frame 1 gradually changes from 0% to 100%, so that the blurred video frame 1 disappears from the interface 401, and the video frame 2 is displayed in the interface 401.

[0169] In addition, the principle of the melting transition is similar to that of the blur transition, and the difference between the two is that the melting transition adds a melting effect to the video frame 1, while the blur transition adds a Gaussian blur effect to the video frame 1. The implementation details of the melting transition are not repeated here.

[0170] As another example, in the case of adding a black field transition in video data 1, for example, the black field transition is added between video frame 1 and video frame 2, then after the mobile phone plays video frame 1, a black image frame is superimposed on video frame 2. At the same time, the transparency of the black image frame quickly changes from 0% to 100% until video frame 2 is clearly displayed in interface 401.

[0171] As another example, in the case of adding a white field transition in video data 1, for example, the white field transition is added between video frame 1 and video frame 2, then after the mobile phone plays video frame 1, a white image frame is superimposed on video frame 2. At the same time, the transparency of the white image frame quickly changes from 0% to 100% until video frame 2 is clearly displayed in interface 401.

[0172] The transition effects introduced in the above examples are all applicable to video data 1 shot in portrait mode on mobile phones, also known as portrait video data 1. Of course, except for left-shift transition and right-shift transition, other transitions are suitable for video data 1 shot in landscape mode, also known as landscape video data 1. In addition, up-shift transition and down-shift transition are also suitable for video data 1 shot in landscape mode.

[0173] For example, Fig.10 As shown, when an upward transition is added to the video data 1 shot in horizontal mode, when the mobile phone plays the video frame 1 with the upward special effect added, the video frame 1 moves upward by a distance 2 at a speed of 1 in the interface 401. During the movement of the video frame 1, the video frame 2 appears in the interface 401 following the video frame 1. Then, the video frame 1 continues to move upward at a speed of 2 in the interface 401 until the video frame 1 disappears. After the video frame 1 disappears, the video frame 2 is displayed in the interface 401 to ensure that the other video frames after the video frame 1 can be played in sequence. The downward transition is the same and will not be repeated here.

[0174] It can be seen that the transition effects all have the effect of connecting and transitioning different clips. In some embodiments, before adding the transition effects, the mobile phone can divide the video data 1 into multiple video clips. Then, use the transition effects to connect any two adjacent video clips. For example, video clip 1 is the adjacent previous video clip of video clip 2. In this way, in the scenario where the transition effects are used to connect video clip 1 and video clip 2, the mobile phone determines that the last frame of video clip 1 is video frame 1, and determines that the first frame of video clip 2 is video frame 2. In this way, after adding the transition effects, the video data 1 is more enjoyable to watch.

[0175] It is understandable that different transition effects have different degrees of suitability with different video music. That is, different transition effects have different degrees of suitability with shooting templates. Generally, transition effects with higher suitability are more suitable for video data obtained based on the shooting template. Transition effects with lower suitability are less suitable for video data obtained based on the shooting template.

[0176] In some embodiments, the degree of fit between each transition effect and the shooting template can be preconfigured. Of course, the matching weight between each transition effect and the shooting template can also be preconfigured based on the degree of fit. Understandably, the transition effect with a higher matching weight is relatively easier to be selected as the transition effect that matches the shooting template. The transition effect with a lower matching weight is relatively more difficult to be selected as the transition effect that matches the shooting template. In other words, the matching weight can be a quantized ratio parameter of the degree of fit.

[0177] As an example, based on Table 1, as shown in Table 2 below, the shooting template may also include matching weights between different transition effects.

[0178] Table 2

[0179]

[0180] Among them, the percentage value corresponding to each transition special effect in the table is the matching weight between the transition special effect and the shooting template.

[0181] Take the Hello Summer shooting template recorded in Table 2 as an example. The matching weight between the shooting template and the dissolve transition is 50%, that is, the dissolve transition has a 50% probability of being selected as a matching transition effect. In addition, the matching weight between the shooting template and the blur transition is 0%, that is, the blur transition will not be selected as a matching transition effect. The matching weight between the shooting template and the melt transition is 0%, that is, the melt transition will not be selected as a matching transition effect. The matching weight between the shooting template and the upward transition is 50%, that is, in the scenario of horizontal screen video data 1 that the mobile phone needs to process, the upward transition has a 50% probability of being selected as a matching transition effect. The matching weight between the shooting template and the downward transition is 50%. Of course, in the scenario of horizontal screen video data 1 that the mobile phone needs to process, the downward transition has a 50% probability of being selected as a matching transition effect. The matching weight between the shooting template and the left shift transition is 50%, that is, in the scenario of vertical screen video data 1 that the mobile phone needs to process, the left shift transition has a 50% probability of being selected as the matching transition effect. The matching weight between the shooting template and the right shift transition is 50%. Of course, in the scenario of vertical screen video data 1 that the mobile phone needs to process, the right shift transition has a 50% probability of being selected as the matching transition effect. The matching weight between the shooting template and the black field transition is 90%, that is, the black field transition has a 90% probability of being selected as the matching transition effect. The matching weight between the shooting template and the white field transition is 90%, that is, the white field transition has a 90% probability of being selected as the matching transition effect. The matching weight between the shooting template and the zoom transition is 90%, that is, the zoom transition has a 90% probability of being selected as the matching transition effect. The matching weight between the shooting template and the zoom-out transition is 90%, that is, the zoom-out transition has a 90% probability of being selected as the matching transition effect. The matching weight between the shooting template and the rotation transition is 30%, that is, the rotation transition has a 30% probability of being selected as the matching transition effect.

[0182] In some embodiments, the mobile phone can randomly obtain a transition effect according to the matching weights corresponding to each type of transition effect as a transition effect matching the shooting template 1. And based on the matching transition effect, each group of adjacent video clips in the video data 1 is processed, that is, adjacent video clips in the video data 1 are connected.

[0183] In addition, it should be noted that the upward transition and the downward transition are applicable to connecting the horizontal screen video data 1 , while the left transition and the right transition are only applicable to connecting the vertical screen video data 1 .

[0184] In some embodiments, when randomly acquiring video data 1 for connecting horizontal screens, the left shift transition and the right shift transition are not within the random range. When randomly acquiring video data 1 for connecting vertical screens, the up shift transition and the down shift transition are not within the random range.

[0185] In other embodiments, the shooting template may also mark the type of transition effects that must be used. When there are multiple transition effects that must be used, there may be a priority between the effects.

[0186] For example, Table 2 includes transition effects marked as [NO.1] and [NO.2]. Among them, the transition effect marked as [NO.1] can be called the first transition effect, which is a special effect used to connect the first video clip and the second video clip. The transition effect marked as [NO.2] can be called the third transition effect, which is a special effect used to connect the second video clip and the third video clip.

[0187] In other words, when only one transition is needed in the video data 1, that is, when the video data 1 is divided into two video segments, the transition effect marked as [NO.1] is used preferentially.

[0188] When two transitions are required in video data 1, that is, when video data 1 is divided into three video clips, the transition effect marked as [NO.1] is used between the first video clip and the second video clip. The transition effect marked as [NO.2] is used between the second video clip and the third video clip.

[0189] For example, shooting template 1 is Hello Summer. Fig.11 As shown, the mobile phone can determine transition effect 1 (i.e., black transition) as the transition effect that matches shooting template 1, and use it to connect the first video clip and the second video clip. Then, the mobile phone continues to determine transition effect 2 (i.e., zoom transition) as the transition effect that matches shooting template 1, and use it to connect the second video clip and the third video clip.

[0190] In addition, in some embodiments, when the upward transition is marked as [NO.1] or [NO.2], the leftward transition will also have the same mark. When the downward transition is marked as [NO.1] or [NO.2], the rightward transition will also have the same mark. In this way, it is ensured that both the horizontal screen video data 1 and the vertical screen video data 1 can correspond to the necessary transition effects.

[0191] When three transitions are required in video data 1, that is, when video data 1 is divided into four video clips, the transition effect marked as [NO.1] is used between the first video clip and the second video clip. The transition effect marked as [NO.2] is used between the second video clip and the third video clip. Between the third video clip and the fourth video clip, the mobile phone uses a transition effect randomly determined based on the matching weight, that is, the second transition effect.

[0192] For example, shooting template 1 is Hello Summer. Fig.12 As shown, the mobile phone can determine transition effect 1 (that is, black field transition) as the transition effect that matches shooting template 1, and use it to connect the first video clip and the second video clip. Then, the mobile phone continues to determine transition effect 2 (that is, zoom transition) as the transition effect that matches shooting template 1, and use it to connect the second video clip and the third video clip. When video data 1 is a vertical screen video, the mobile phone also needs to randomly determine a transition effect from left shift transition, right shift transition, rotation transition, superposition transition, blur transition, melting transition, black field transition, white field transition, zoom transition and zoom out transition according to the corresponding matching weight, that is, the second transition effect, such as transition effect 3, as the transition effect that matches shooting template 1. When the video data 1 is a horizontal screen video, the mobile phone also needs to randomly determine a transition effect, such as transition effect 3, from the upward transition, downward transition, rotation transition, superposition transition, blur transition, melting transition, black field transition, white field transition, zoom transition and zoom out transition according to the corresponding matching weight, as the transition effect that matches the shooting template 1. It can be understood that the higher the corresponding matching weight of the transition effect, the easier it is to be determined as a matching transition effect. Of course, the corresponding transition effect with a lower matching weight also has a certain probability of being determined as a matching transition effect. Afterwards, the mobile phone can use transition effect 3 to connect the third video clip and the fourth video clip.

[0193] Of course, when the shooting template 1 does not mark the transition effect that must be used, the mobile phone can randomly determine the transition effect that matches the shooting template 1 from multiple types of transition effects based on the corresponding matching weight, and use it to connect the first video clip and the second video clip. After that, the mobile phone once again randomly determines the transition effect that matches the shooting template 1, and uses it to connect the second video clip and the third video clip.

[0194] In addition, when there are many divided video clips, for example, video data 1 also includes the fifth video clip and the sixth video clip, the mobile phone can also combine the matching weights to randomly determine the fourth transition effect to connect the fifth video clip and the sixth video clip, and so on.

[0195] It can be seen that in some embodiments, the mobile phone can obtain transition effects matching the shooting template 1 multiple times, thereby achieving the connection of multiple groups of adjacent video clips.

[0196] When more transitions are needed in video data 1, except for the transition effects marked as [NO.1] and [NO.2] for the first and second selections, the rest can be determined in a random manner to use transition effects for connection. It can be understood that randomly selecting transition effects can improve the diversity of video data 1 processed by shooting template 1. In addition, the mobile phone makes random selections based on the corresponding matching weights, such as selecting the second transition effect and the fourth transition effect, etc. This can also improve the degree of fit between the actually selected transition effect and the style of shooting template 1.

[0197] In some embodiments, as shown in Table 2, the shooting template also includes a maximum number of types. The maximum number of types is used to limit the number of types of transition effects used in the same video data 1. For example, if the maximum number of types of shooting template 1 is 3, then when processing video data 1, the types of transition effects actually used cannot exceed three.

[0198] For example, the maximum number of types is 3. Fig.13 As shown, video data 1 corresponds to five video clips, among which the first video clip and the second video clip are connected by transition effect 1, the second video clip and the third video clip are connected by transition effect 2, and the third video clip and the fourth video clip are connected by transition effect 3. If transition effect 1, transition effect 2 and transition effect 3 are different types of transition effects, then the corresponding number of types is 3, that is, the maximum number of types has been reached. In this scenario, the mobile phone also needs to randomly determine a transition effect from transition effect 1, transition effect 2 and transition effect 3 according to the corresponding matching weight, such as transition effect 4, as the transition effect matching the shooting template 1, and used to connect the fourth video clip and the fifth video clip. If at least two of transition effects 1, transition effect 2 and transition effect 3 are the same, the phone continues to randomly determine a transition effect from left transition (or up transition), right transition (or down transition), rotation transition, overlay transition, blur transition, melt transition, black transition, white transition, zoom in transition and zoom out transition based on the corresponding matching weight to connect the fourth video clip and the fifth video clip.

[0199] It can be understood that in video data 1, the moment between the first video segment and the second video segment can also be called the first time point. In video data 1, the moment between the third video segment and the fourth video segment can also be called the second time point. In video data 1, the moment between the second video segment and the third video segment can also be called the third time point. In video data 1, the moment between the fourth video segment and the fifth video segment can also be called the fourth time point.

[0200] In addition, the first time point, the third time point, the second time point and the fourth time point are adjacent in sequence. In the video data 1, each time point may correspond to at least one video frame. For example, the video frame corresponding to the first time point may include the last frame of the first video segment and the first frame of the second video segment. For another example, the video frame corresponding to the first time point may also include the last few frames of the first video segment and the first few frames of the second video segment. The video frames corresponding to other time points are similar, and will not be repeated here.

[0201] The present application also provides an electronic device, which may include: a memory and one or more processors. The memory and the processor are coupled. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute the various steps executed by the mobile phone in the above embodiment. Of course, the electronic device includes but is not limited to the above memory and one or more processors. For example, the structure of the electronic device can refer to Figure 1 The structure of the mobile phone shown.

[0202] The present application also provides a chip system, which can be applied to the electronic device in the above embodiment. Fig.14 As shown, the chip system includes at least one processor 2201 and at least one interface circuit 2202. The processor 2201 may be a processor in the above-mentioned electronic device. The processor 2201 and the interface circuit 2202 may be interconnected via a line. The processor 2201 may receive and execute computer instructions from the memory of the above-mentioned electronic device via the interface circuit 2202. When the computer instructions are executed by the processor 2201, the electronic device may execute the various steps executed by the mobile phone in the above-mentioned embodiment. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of the present application.

[0203] In some embodiments, through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0204] Each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0205] 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 technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk.

[0206] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.

Claims

1. A method for determining a transition special effect, characterized in that: The method is applied to an electronic device, and the method comprises: The electronic device displays a first interface, the first interface includes a first identifier indicating a first shooting template; the first shooting template includes a first music, the first music corresponds to a first transition special effect, a third transition special effect and a maximum number of transition types; The electronic device receives a user's selection operation on the first identifier; In response to the selection operation, the electronic device displays a second interface; wherein the second interface is a recording preview interface; and the second interface includes a first control indicating starting shooting; The electronic device receives a first operation of the user on the first control; In response to the first operation, the electronic device starts recording first video data; After the first video data is recorded, the electronic device displays a third interface; wherein the third interface is used to display the second video data; the second video data includes: the video frame of the first video data, the first music, the first transition effect, the second transition effect, the third transition effect and the fourth transition effect; the first transition effect is superimposed on the video frame corresponding to the first time point in the first video data; the second transition effect is superimposed on the video frame corresponding to the second time point in the first video data, and the second time point is located after the first time point; the second transition effect The special effect is one of a plurality of preset transition special effects; the third transition special effect is superimposed on the video frame corresponding to the third time point in the first video data, and the third time point is located between the first time point and the second time point; the fourth transition special effect is superimposed on the video frame corresponding to the fourth time point in the first video data, and the fourth time point is located after the second time point; when the number of types of the first transition special effect, the second transition special effect and the third transition special effect is equal to the maximum number of transition types, the fourth transition special effect is one of the first transition special effect, the second transition special effect and the third transition special effect.

2. The method according to claim 1, characterized in that Before the electronic device displays the third interface, the method further includes: The electronic device determines a second transition effect from the plurality of preset transition effects based on the matching weight; Among them, each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the adaptability between the first music and the preset transition special effect; the multiple preset transition special effects include the first transition special effect.

3. The method according to claim 1, characterized in that The first time point, the second time point, the third time point and the fourth time point are all video frame division points in the first video data.

4. The method according to claim 1, characterized in that: Before the electronic device displays the third interface, the method further includes: The electronic device determines that the number of types of the first transition special effect, the second transition special effect, and the third transition special effect is equal to the maximum number of transition types; The electronic device determines a fourth transition special effect from the first transition special effect, the second transition special effect and the third transition special effect based on the matching weight; Among them, each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the adaptability between the first music and the preset transition special effect; the multiple preset transition special effects include the first transition special effect and the third transition special effect.

5. The method according to claim 1, characterized in that Before the electronic device displays the third interface, the method further includes: The electronic device determines that the number of types of the first transition special effect, the second transition special effect, and the third transition special effect is less than the maximum number of transition types; The electronic device determines a fourth transition effect from the plurality of preset transition effects based on the matching weight; Among them, each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the adaptability between the first music and the preset transition special effect; the multiple preset transition special effects include the first transition special effect and the third transition special effect.

6. The method according to claim 5, characterized in that The first transition special effect, the second transition special effect and the third transition special effect are transition special effects of the same type.

7. The method according to any one of claims 1 to 6, characterized in that: When the first video data is a video shot in horizontal mode, the plurality of preset transition effects include: rotation transition, dissolve transition, blur transition, melt transition, black transition, white transition, zoom in transition, zoom out transition, up transition and down transition; When the first video data is a video shot in vertical mode, the multiple preset transition effects include: left transition, right transition, rotation transition, overlay transition, blur transition, melt transition, black transition, white transition, zoom in transition and zoom out transition.

8. A method for determining a transition special effect, characterized in that: The method is applied to an electronic device, and the method comprises: The electronic device displays a fourth interface, wherein the fourth interface includes a thumbnail of the third video data; The electronic device receives a user's selection operation on a thumbnail of the third video data; The electronic device displays a fifth interface in response to the selection operation; wherein the fifth interface is a video editing interface of the third video data; and the fifth interface includes a one-key blockbuster control; The electronic device receives a second operation of the user on the one-key blockbuster control; In response to the second operation, the electronic device determines a first shooting template matching the third video data; wherein the first shooting template includes first music, and the first music corresponds to a first transition special effect, a third transition special effect, and a maximum number of transition types; After determining the first shooting template, the electronic device displays a sixth interface; wherein the sixth interface is used to display fourth video data; the fourth video data includes: a video frame of the third video data, the first music, the first transition special effect, the second transition special effect, the third transition special effect and the fourth transition special effect; the first transition special effect is superimposed on a video frame corresponding to a first time point in the third video data; the second transition special effect is superimposed on a video frame corresponding to a second time point in the third video data, the second time point being after the first time point; the second transition special effect is superimposed on a video frame corresponding to a second time point in the third video data, the second time point being after the first time point; The effect is one of multiple preset transition special effects; the third transition special effect is superimposed on the video frame corresponding to the third time point in the third video data, and the third time point is located between the first time point and the second time point; the fourth transition special effect is superimposed on the video frame corresponding to the fourth time point in the third video data, and the fourth time point is located after the second time point; when the number of types of the first transition special effect, the second transition special effect and the third transition special effect is equal to the maximum number of transition types, the fourth transition special effect is one of the first transition special effect, the second transition special effect and the third transition special effect.

9. The method according to claim 8, characterized in that Before the electronic device displays the sixth interface, the method further includes: The electronic device determines a second transition effect from the plurality of preset transition effects based on the matching weight; Among them, each preset transition special effect corresponds to a matching weight, and the matching weight is a quantized ratio parameter of the adaptability between the first music and the preset transition special effect; the multiple preset transition special effects include the first transition special effect.

10. The method according to claim 8, characterized in that The first shooting template corresponds to a first style; and the electronic device determines the first shooting template matching the third video data, including: The electronic device determines, using a preset artificial intelligence model, that the third video data matches the first style; the electronic device determines that the first shooting template matches the third video data; Alternatively, the electronic device randomly determines the first shooting template from a plurality of preset shooting templates.

11. An electronic device, characterized in that: The electronic device includes a memory and one or more processors; the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when one or more processors execute the computer instructions, the one or more processors are used to execute the method as described in any one of claims 1-10.

12. A computer storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 10.