Frame switching method and device, electronic equipment and storage medium

By automatically recommending migration schemes for video elements, the video aspect ratio switching process is simplified, solving the problem of cumbersome operation caused by manual adjustment in existing technologies and improving aspect ratio switching efficiency.

CN123185401APending Publication Date: 2026-11-27BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611523247.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

When switching video aspect ratios between video platforms, existing technologies require users to manually adjust elements in the video, resulting in cumbersome and inefficient operations.

Method used

A method for switching aspect ratios is provided, which automatically recommends a migration scheme for elements after the aspect ratio switching operation, and directly applies the scheme to adjust the video aspect ratio after user confirmation, thus simplifying the user operation.

Benefits of technology

It improves the efficiency of frame switching, avoids problems such as misaligned elements or elements moving out of the video frame, and saves switching time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185401A_ABST
    Figure CN123185401A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a frame switching method and device, electronic equipment and storage medium, belonging to the technical field of computers. The method comprises: obtaining a frame switching operation on a first video; the first video comprises a first video frame and an element other than the first video frame, and the frame switching operation indicates that the frame of the first video is adjusted to a first frame; in response to the frame switching operation, a recommended migration scheme corresponding to the element is displayed; the recommended migration scheme represents a recommended migration mode for the element; in response to a confirmation switching operation, a second video is obtained; the second video comprises a second video frame and an element migrated based on the recommended migration scheme, and the frame of the second video frame is the first frame. The present disclosure simplifies the operation of the user, saves the frame switching time, and improves the frame switching efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a frame switching method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of the video industry and the increasing number of video platforms, videos created by the same creator are often published on multiple platforms. However, different video platforms may have different aspect ratios, so it is necessary to switch the aspect ratio of the video before publishing it.

[0003] Videos can include not only the video frame but also elements such as subtitles or stickers. When switching video aspect ratios, after adjusting the aspect ratio of the video frame to match the target aspect ratio, other elements in the video may become misaligned or move out of the frame. Users need to manually rearrange each element to complete the aspect ratio switch. This manual rearrangement method is cumbersome and time-consuming, resulting in low aspect ratio switching efficiency. Summary of the Invention

[0004] This disclosure provides a method, apparatus, electronic device, and storage medium for switching aspect ratios, which simplifies user operations, saves aspect ratio switching time, and improves aspect ratio switching efficiency.

[0005] According to one aspect of the present disclosure, a frame switching method is provided, the method comprising: Obtain a frame switching operation on the first video; the first video includes a first video frame and elements other than the first video frame, and the frame switching operation instructs the frame of the first video to be adjusted to the first frame. In response to the frame switching operation, a recommended migration scheme corresponding to the element is displayed; the recommended migration scheme represents the migration method recommended for the element. In response to the confirmation of the switching operation, a second video is acquired; the second video includes a second video frame and the elements migrated based on the recommended migration scheme, wherein the aspect ratio of the second video frame is the first aspect ratio.

[0006] In some embodiments, before acquiring the second video in response to a confirmed switching operation, the method further includes: The preview interface corresponding to the element is displayed. The preview interface includes the first video screen and the first canvas. The first canvas has the first screen size. The first canvas displays the candidate box of the element. The candidate box represents the element after migration based on the recommended migration scheme. In response to an editing operation on the candidate box in the first canvas, the recommended migration scheme is updated based on the edited candidate box.

[0007] In some embodiments, the recommended migration scheme includes a target location and a target size; in the first canvas, the candidate box is displayed at the target location, and the size of the candidate box is the target size; The step of responding to an editing operation on the candidate box in the first canvas, and updating the recommended migration scheme based on the edited candidate box, includes at least one of the following: In response to a drag operation on the candidate box in the first canvas, the position of the dragged candidate box is determined as the updated target position; In response to a scaling operation on the candidate box in the first canvas, the size of the scaled candidate box is determined as the updated target size.

[0008] In some embodiments, the recommended migration scheme includes a target location and a target size; the preview interface further includes at least one of a location control and a size control; the method further includes at least one of the following: In response to the adjustment operation of the position control, the position corresponding to the adjusted position control is determined as the updated target position; In response to the adjustment operation of the size control, the size corresponding to the adjusted size control is determined as the updated target size.

[0009] In some embodiments, the position control is a first slider, and the position of the first slider on the first slider represents the distance between the element and a specified coordinate axis in the first canvas; The size control is a second slider, and the position of the second slider on the second slider indicates the size of the element.

[0010] In some embodiments, the step of acquiring the second video in response to confirming the switching operation includes: In response to the first confirmation switching operation, a second canvas and a third canvas are displayed. The second canvas displays the first video frame and the element, and the third canvas displays the second video frame and the element after migration based on the recommended migration scheme. In response to the second confirmation switching operation, the second video is acquired.

[0011] In some embodiments, the number of elements is multiple; the step of displaying the recommended migration scheme corresponding to the element in response to the frame switching operation includes: In response to the aspect ratio switching operation, multiple recommended migration cards are displayed, each of the recommended migration cards belonging to one of the elements, and each recommended migration card displays the recommended migration scheme of the element to which it belongs.

[0012] In some embodiments, the number of elements is multiple; the step of acquiring the second video in response to the confirmation switching operation includes: If at least one of the recommended migration schemes is selected, in response to the confirmation switching operation, the second video is acquired, the second video including the second video frame and the elements migrated based on the selected recommended migration scheme.

[0013] In some embodiments, displaying the recommended migration scheme corresponding to the element in response to the aspect ratio switching operation includes: In response to the frame switching operation, the position of the element before migration, the recommended target position to migrate to, the size adjustment scheme, and the reason for migration are displayed.

[0014] In some embodiments, displaying the recommended migration scheme corresponding to the element in response to the aspect ratio switching operation includes: In response to the frame switching operation, the description information of the element is displayed, the description information including the display position of the element relative to the first video frame; In response to the element confirmation operation, the recommended migration scheme corresponding to the element is displayed.

[0015] In some embodiments, displaying the recommended migration scheme corresponding to the element in response to the aspect ratio switching operation includes: In response to the frame switching operation, obtain the historical migration scheme corresponding to the first frame; The recommended migration scheme is displayed based on the historical migration scheme. The target position and target size of the element in the recommended migration scheme are the same as the target position and target size of the same type of element in the historical migration scheme.

[0016] In some embodiments, obtaining the aspect ratio switching operation of the first video includes: For the first video, multiple alternative aspect ratios and aspect ratio switching controls are displayed; When multiple frames are selected, a trigger operation is obtained for the frame switching control, and the trigger operation instructs the frame of the first video to be adjusted to each of the selected first frames.

[0017] In some embodiments, the method further includes: The anchoring settings interface of the first video is displayed, and the anchoring settings interface displays the first video frame and the element; Obtain the anchor object set in the first video frame, wherein the anchor object is a person or area of ​​the frame that the element automatically follows; In the recommended migration scheme, the migration method satisfies the following condition: the element follows the anchor object.

[0018] In some embodiments, the method further includes: When the first aspect ratio is 1:1, in response to the aspect ratio switching operation, the cover video frame and the recommended migration scheme are displayed. The aspect ratio of the cover video frame is 1:1, and the cover video frame is obtained by adjusting the aspect ratio of the video frame in the first video frame to 1:1. In response to the cover confirmation operation, the cover video frame and the elements migrated based on the recommended migration scheme are used to form the cover of the first video.

[0019] In some embodiments, the method further includes: After obtaining the second video, a migration template is generated, which includes the migration scheme corresponding to the second video.

[0020] According to another aspect of the present disclosure, a frame switching device is provided, the device comprising: The operation acquisition unit is configured to acquire a frame switching operation on a first video; the first video includes a first video frame and elements other than the first video frame, and the frame switching operation instructs the frame of the first video to be adjusted to the first frame. The scheme display unit is configured to display a recommended migration scheme corresponding to the element in response to the frame switching operation; the recommended migration scheme represents a recommended migration method for the element. The video acquisition unit is configured to acquire a second video in response to a confirmation switching operation; the second video includes a second video frame and the elements migrated based on the recommended migration scheme, wherein the aspect ratio of the second video frame is the first aspect ratio.

[0021] In some embodiments, the apparatus further includes: The preview unit is configured to display a preview interface corresponding to the element. The preview interface includes the first video frame and a first canvas. The first canvas has a first frame size. The first canvas displays a candidate box for the element. The candidate box represents the element after migration based on the recommended migration scheme. The editing unit is configured to update the recommended migration scheme based on the edited candidate box in response to an editing operation on the candidate box in the first canvas.

[0022] In some embodiments, the recommended migration scheme includes a target location and a target size; in the first canvas, the candidate box is displayed at the target location, and the size of the candidate box is the target size; The editing unit is configured to be at least one of the following: In response to a drag operation on the candidate box in the first canvas, the position of the dragged candidate box is determined as the updated target position; In response to a scaling operation on the candidate box in the first canvas, the size of the scaled candidate box is determined as the updated target size.

[0023] In some embodiments, the recommended migration scheme includes a target location and a target size; the preview interface further includes at least one of a location control and a size control; the editing unit is further configured to include at least one of the following: In response to the adjustment operation of the position control, the position corresponding to the adjusted position control is determined as the updated target position; In response to the adjustment operation of the size control, the size corresponding to the adjusted size control is determined as the updated target size.

[0024] In some embodiments, the position control is a first slider, and the position of the first slider on the first slider represents the distance between the element and a specified coordinate axis in the first canvas; The size control is a second slider, and the position of the second slider on the second slider indicates the size of the element.

[0025] In some embodiments, the video acquisition unit is configured to, in response to a first confirmation switching operation, display a second canvas and a third canvas, wherein the second canvas displays the first video frame and the element, and the third canvas displays the second video frame and the element migrated based on the recommended migration scheme; and in response to a second confirmation switching operation, acquire the second video.

[0026] In some embodiments, the number of elements is multiple; the scheme display unit is configured to display multiple recommended migration cards in response to the frame switching operation, each recommended migration card belonging to one of the elements, and each recommended migration card displaying the recommended migration scheme of the element to which it belongs.

[0027] In some embodiments, the number of elements is multiple; the video acquisition unit is configured to acquire the second video in response to the confirmation switching operation when at least one of the recommended migration schemes is selected, the second video including the second video frame and the elements after migration based on the selected recommended migration scheme.

[0028] In some embodiments, the scheme display unit is configured to display, in response to the frame switching operation, the element's position before migration, the recommended target position to migrate to, the size adjustment scheme, and the reason for migration.

[0029] In some embodiments, the scheme display unit is configured to, in response to the frame switching operation, display description information of the element, the description information including the display position of the element relative to the first video frame; and, in response to the element confirmation operation, display the recommended migration scheme corresponding to the element.

[0030] In some embodiments, the scheme display unit is configured to, in response to the frame switching operation, acquire a historical migration scheme corresponding to the first frame; and display a recommended migration scheme based on the historical migration scheme, wherein the target position and target size of the elements in the recommended migration scheme are the same as the target position and target size of the same type of elements in the historical migration scheme.

[0031] In some embodiments, the operation acquisition unit is configured to display multiple alternative aspect ratios and aspect ratio switching controls for the first video; when multiple aspect ratios are selected, acquire a trigger operation on the aspect ratio switching controls, the trigger operation instructing the aspect ratio of the first video to be adjusted to each of the selected first aspect ratios respectively.

[0032] In some embodiments, the apparatus further includes: An anchoring setting unit is configured to display the anchoring setting interface of the first video, the anchoring setting interface displaying the first video frame and the element; and to obtain the anchoring object set in the first video frame, the anchoring object being a person or frame area that the element automatically follows; In the recommended migration scheme, the migration method satisfies the following condition: the element follows the anchor object.

[0033] In some embodiments, the apparatus further includes: The cover setting unit is configured to, in response to the aspect ratio switching operation, display a cover video frame and the recommended migration scheme when the first aspect ratio is 1:1, wherein the cover video frame has an aspect ratio of 1:1 and is obtained by adjusting the aspect ratio of the video frame in the first video frame to 1:1; and in response to the cover confirmation operation, to form the cover of the first video by combining the cover video frame and the elements migrated based on the recommended migration scheme.

[0034] In some embodiments, the apparatus further includes: The template generation unit is configured to generate a migration template after the second video is acquired, the migration template including a migration scheme corresponding to the second video.

[0035] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the frame switching method as described above.

[0036] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the frame switching method as described above.

[0037] According to another aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the aspect ratio switching method as described above.

[0038] The solution provided in this embodiment, in response to a frame switching operation on the first video, displays recommended migration schemes for elements in the first video other than those in the first video frame. It proactively recommends migration methods for elements, allowing users to use them or adjust them accordingly. Users only need to trigger a confirmation switch operation to directly use the recommended migration scheme to migrate elements, thus ensuring that elements in the second video after the frame switch do not become misaligned or moved out of the video frame. Furthermore, it simplifies user operations, saves frame switching time, and improves frame switching efficiency.

[0039] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0040] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0041] Figure 1 This is a schematic diagram illustrating an implementation environment according to an exemplary embodiment.

[0042] Figure 2 This is a flowchart illustrating a frame switching method according to an exemplary embodiment.

[0043] Figure 3 This is a schematic diagram illustrating an information display interface according to an exemplary embodiment.

[0044] Figure 4 This is a schematic diagram illustrating a migration scheme confirmation interface according to an exemplary embodiment.

[0045] Figure 5 This is a flowchart illustrating another aspect ratio switching method according to an exemplary embodiment.

[0046] Figure 6 This is a schematic diagram illustrating a subtitle preview interface according to an exemplary embodiment.

[0047] Figure 7 This is a schematic diagram illustrating an element confirmation interface according to an exemplary embodiment.

[0048] Figure 8 This is a schematic diagram illustrating a comparison interface according to an exemplary embodiment.

[0049] Figure 9 This is a schematic diagram illustrating a scheme reuse interface according to an exemplary embodiment.

[0050] Figure 10 This is a schematic diagram illustrating a batch generation interface according to an exemplary embodiment.

[0051] Figure 11 This is a schematic diagram illustrating an anchoring settings interface according to an exemplary embodiment.

[0052] Figure 12 This is a schematic diagram illustrating a cover settings interface according to an exemplary embodiment.

[0053] Figure 13 This is a schematic diagram illustrating a template saving interface according to an exemplary embodiment.

[0054] Figure 14 This is a block diagram illustrating a frame switching device according to an exemplary embodiment.

[0055] Figure 15 This is a block diagram illustrating an electronic device according to an exemplary embodiment.

[0056] Figure 16 This is a block diagram illustrating a server according to an exemplary embodiment. Detailed Implementation

[0057] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0058] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0059] It should be noted that the user information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this disclosure are all authorized by the user or fully authorized by all parties. The collection, use, and processing of related data shall comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0060] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of this disclosure. The implementation environment includes a terminal 101 and a server 102. The terminal 101 is connected to the server 102 via a wireless network or a wired network.

[0061] In some embodiments, terminal 101 includes at least one of the following: smartphone, smartwatch, tablet computer, virtual reality device, laptop computer, desktop computer, and desktop workstation.

[0062] In some embodiments, server 102 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 102 is used to provide backend services to terminal 101. Exemplarily, server 102 undertakes the primary computing work, and terminal 101 undertakes the secondary computing work; or, server 102 undertakes the secondary computing work, and terminal 101 undertakes the primary computing work; or, server 102 and terminal 101 collaborate on computing using a distributed computing architecture.

[0063] Those skilled in the art will understand that the number of terminals described above can be more or less. For example, there may be only one terminal, or there may be 10 or more terminals. This disclosure does not limit the number of terminals or the type of device.

[0064] In this embodiment, terminal 101 has video editing functions, enabling video editing operations, including: trimming video segments, inserting new video segments, adding filters to video frames, adding subtitles or stickers to video frames, adding background music, and switching aspect ratios. The aspect ratio switching operation in this embodiment requires adjusting the aspect ratio of the video frame.

[0065] Terminal 101 can store one or more videos, and select a first video from the stored videos for aspect ratio switching. Alternatively, server 102 can store one or more videos, and terminal 101 can download the first video for aspect ratio switching from server 102. Then, terminal 101 uses the aspect ratio switching method provided in this embodiment to switch the aspect ratio of the first video, obtaining a second video with the switched aspect ratio. Compared to the first video, the aspect ratio of the video frame changes in the second video, and the display position and size of other elements besides the video frame are adapted to the position of the changed video frame, preventing element misalignment or displacement from the video frame.

[0066] Afterwards, terminal 101 can save the second video, or upload the second video to server 102 for storage on server 102.

[0067] In some embodiments, a video editing client provided by server 102 is installed on terminal 101. Terminal 101 can edit videos through the client and perform aspect ratio switching using the aspect ratio switching method provided in this embodiment.

[0068] In some embodiments, the server 102 is configured with an AI (Artificial Intelligence) model. During the switching of frame, the terminal 101 can call the AI ​​model to perform operations, such as calling the AI ​​model to generate recommended migration schemes corresponding to elements, or automatically identifying the anchor objects of elements in the video frame through the AI ​​model.

[0069] The above implementation environment is merely an example. Other implementation environments can also be used in this embodiment, which will not be elaborated here.

[0070] Figure 2 This is a flowchart illustrating a frame switching method according to an exemplary embodiment, see [link to flowchart]. Figure 2 This method is performed by an electronic device, which can be the aforementioned Figure 1 The terminal 101 in the illustrated implementation environment may also be other devices. The method includes the following steps: In step 201, the electronic device obtains a frame switching operation on the first video; the first video includes a first video frame and elements other than the first video frame, and the frame switching operation instructs the frame of the first video to be adjusted to the first frame.

[0071] The first video frame is the main frame of the first video. Elements other than the first video frame in the first video can include subtitles, stickers, picture-in-picture, special effects, etc. Subtitles are in text format and are synchronized with the content displayed in the first video frame and with the corresponding audio content. Stickers display at least one of patterns and text, used to enhance the first video frame. The picture-in-picture displays another video frame different from the first video frame, which can be played synchronously with the first video frame.

[0072] Furthermore, in the first video, elements other than the first video frame are located in layers above the first video frame, and can be called overlay elements. These elements are independent editing units superimposed on the first video frame. Different elements can be located on the same layer or on different layers. Each layer can cover the entire first video frame or only cover a portion of the first video frame.

[0073] In addition, the frame switching operation can be either selecting the first frame when it is displayed, or entering the first frame in the input field.

[0074] In some embodiments, the electronic device can display a first video frame and corresponding elements and at least one alternative frame. The user can browse the first video frame and corresponding elements, and can also select the first frame from the alternative frames. The operation of selecting the first frame is the above-mentioned frame switching operation, or the operation of triggering the switching control after selecting the first frame is the above-mentioned frame switching operation.

[0075] In some embodiments, when an electronic device displays a first video frame and corresponding elements, it may also display descriptive information about the elements, including their type, display position relative to the first video frame, and the layer they reside on. The element types include subtitles, stickers, and picture-in-picture, the element display positions relative to the first video frame include bottom center, top right corner, and top left corner, and the layer the element resides on includes text overlays, graphic overlays, and independent video layers.

[0076] For example, see Figure 3 After confirming the first video, it will display Figure 3The information display interface shown has the following sections: the top screen area 301 displays the first video frame and its corresponding elements, along with text descriptions. The bottom element description area 302 displays descriptions of each element, and the aspect ratio selection area 303 displays the current aspect ratio of the first video as 9:16, the recommended target aspect ratio of 16:9, and the recommended aspect ratio of 1:1 for the cover.

[0077] In step 202, the electronic device responds to the frame switching operation by displaying the recommended migration scheme for the element; the recommended migration scheme represents the migration method recommended for the element.

[0078] For any given element, the migration method can include various migration types, such as moving the element from its original position to another, scaling the element, removing (undoing) the element, or cropping the element, etc. If the electronic device only adjusts the aspect ratio of the first video frame when switching aspect ratios without processing the elements, the user would need to manually rearrange the elements, which is cumbersome. Therefore, the electronic device automatically determines the recommended migration scheme for each element and displays it to the user for direct use, or allows the user to make adjustments based on the recommended migration scheme.

[0079] Compared to users manually rearranging elements, electronic devices assist users in creating recommended migration schemes, which can greatly simplify the user's operation.

[0080] In some embodiments, the recommended migration plan includes the element type, the element migration type, the element's original position before migration, and the recommended target position for migration. It may also include information such as the element's resizing plan, the reason for migration, and risk warnings. The migration type includes moving, scaling, removing, or cropping. The resizing plan can be a scaling ratio or the target size after scaling. The reason for migration explains why the element is being migrated, and the risk warning indicates the negative effects of using the recommended migration plan, such as "the main character will be cropped by approximately 30%."

[0081] Therefore, in response to the frame switching operation, the electronic device displays the element's position before migration, the recommended target position to migrate to, the size adjustment scheme, and the reason for migration. This enriches the information of the recommended migration scheme, provides users with sufficient basis, reduces the user's understanding cost, helps users make decisions based on the displayed recommended migration scheme, reduces the possibility of misoperation, improves the accuracy of operation, and also facilitates operation traceability and review.

[0082] For example, see Figure 3 and Figure 4 The user selected Figure 3The target aspect ratio is 16:9, and triggers... Figure 3 After the toggle control in the middle returns a 304 error, it displays... Figure 4 The migration plan confirmation interface shown displays recommended migration plans for three elements: subtitles, stickers, and picture-in-picture. Each recommended migration plan displays the plan number (401) and element type (402) in the upper left corner, a preview control (403) in the upper right corner, the element's original position (404) and recommended target position (405) in the middle, the migration reason (406) at the bottom, and a selection control (407) in the lower right corner.

[0083] In some embodiments, if the target position and target size of an element are empty in the recommended migration scheme, it means that the element should be cleared and no longer displayed after the frame rate is switched.

[0084] In some embodiments, recommended migration schemes are displayed in recommended migration cards, which are migration suggestion units generated for individual elements. If multiple elements exist, the recommended migration scheme for each element is displayed in a separate recommended migration card. The recommended migration schemes for different elements are displayed in different recommended migration cards, enabling modular display of recommended migration schemes and avoiding visual clutter, thus improving the display effect. Furthermore, adding or deleting recommended migration schemes only requires adding or deleting a single recommended migration card without affecting other recommended migration cards, minimizing the impact on the interface layout.

[0085] In some embodiments, the number of elements in the first video is multiple; step 202 includes: the electronic device responding to the aspect ratio switching operation displays multiple recommended migration cards, each recommended migration card belonging to an element, and each recommended migration card displaying a recommended migration scheme for its element.

[0086] In some embodiments, the electronic device may display not only recommended migration options in the recommended migration card, but also interactive controls.

[0087] For example, the interactive control includes a preview control that corresponds to the recommended migration scheme and is used to preview the elements after migration based on the recommended migration scheme.

[0088] The interactive control can also include an up-move control and a down-move control. Multiple recommended migration cards are arranged sequentially from top to bottom. Triggering the up-move control on any recommended migration card will move the card up one position, and triggering the down-move control on any recommended migration card will move the card down one position.

[0089] The interactive control may also include a selection control. When the selection control is selected, it indicates that the recommended migration plan for the element is selected, and subsequent operations performed on the current interface (such as confirming the switch) will include the recommended migration plan. When the selection control is not selected, it indicates that the recommended migration plan for the element is not selected, and subsequent operations performed on the current interface will not include the recommended migration plan.

[0090] For example, see Figure 4 The electronic device displays three recommended migration cards on the migration plan confirmation interface. Each recommended migration card belongs to an element, and each recommended migration card displays a recommended migration plan, a preview control, and a selection control.

[0091] The interactive control may also include a delete control, which is used to delete the recommended migration card and, correspondingly, delete the recommended migration scheme in the recommended migration card.

[0092] The interactive control may also include a regeneration control, which is used to regenerate the recommended migration plan in the recommended migration card. When the regeneration control is triggered, the electronic device regenerates a new recommended migration plan for the element to which the recommended migration card belongs, replacing the original recommended migration plan in the recommended migration card.

[0093] In some embodiments, steps 201 and 202 include: the electronic device, based on a video editing interface, opens a first video, displays the first video frame and corresponding elements, and records the position, size, and layer of each element. It also displays at least one alternative frame size; in response to selecting the first frame size, the electronic device creates a first canvas with an aspect ratio equal to the first frame size, and calculates the target position and target size of each element in the first canvas, thereby determining a recommended migration scheme for each element.

[0094] In step 203, the electronic device responds to the confirmation of the switching operation by acquiring the second video; the second video includes a second video frame and elements migrated based on the recommended migration scheme, and the aspect ratio of the second video frame is the first aspect ratio.

[0095] If the user confirms the use of the recommended migration scheme, a confirmation switching operation will be triggered. The electronic device will then adjust the aspect ratio of the first video frame to the first aspect ratio to obtain the second video frame. Based on the recommended migration scheme, the elements will be migrated to match the migrated elements with the recommended migration scheme, thereby obtaining the second video.

[0096] The actions that trigger the confirmation switch control can include clicking the confirmation switch control, sliding the confirmation switch control, or issuing a voice confirmation switch control.

[0097] In some embodiments, the migration scheme confirmation interface displayed by the electronic device in step 202 includes a confirmation switching control, and in response to a triggering operation on the confirmation switching control, a second video is acquired. For example, see... Figure 4 A confirmation switch control 408 is displayed in the lower right corner of the migration plan confirmation interface.

[0098] In some embodiments, the number of elements in the first video is multiple; in step 202 above, the electronic device displays a recommended migration scheme corresponding to each element, and in step 203, if the user triggers a confirmation switching operation when at least one recommended migration scheme is selected, the electronic device, in response to the confirmation switching operation, acquires a second video when at least one recommended migration scheme is selected. The second video includes a second video frame and elements migrated based on the selected recommended migration scheme.

[0099] In this case, if there is an element that is not selected for the recommended migration scheme, then in the second video, the element will not be migrated, and its position and size relative to the video center point will not change.

[0100] The embodiments disclosed herein can select recommended migration schemes on an element-by-element basis, without having to process all elements at once. This refines the processing granularity, improves flexibility, and facilitates the operation of recommended migration schemes corresponding to individual elements.

[0101] In some embodiments, the electronic device runs a video editing client, through which the methods provided in the embodiments of this disclosure are executed.

[0102] The method provided in this disclosure, in response to a aspect ratio switching operation on a first video, displays recommended migration schemes for elements in the first video other than those in the first video frame. It proactively recommends migration methods for elements, allowing users to use them or adjust them accordingly. Users only need to trigger a confirmation switch operation to directly use the recommended migration scheme to migrate elements, thus ensuring that elements in the second video after the aspect ratio switch will not be misaligned or moved out of the video frame. Furthermore, it simplifies user operations, saves aspect ratio switching time, and improves aspect ratio switching efficiency.

[0103] Based on the above embodiments, Figure 5 This is a flowchart illustrating another aspect ratio switching method according to an exemplary embodiment, see [link to flowchart]. Figure 5 This method is performed by an electronic device, which can be the aforementioned Figure 1 The terminal 101 in the illustrated implementation environment may also be other devices. The method includes the following steps: In step 501, the electronic device obtains a frame switching operation on the first video; the first video includes a first video frame and elements other than the first video frame, and the frame switching operation instructs the frame of the first video to be adjusted to the first frame.

[0104] In step 502, the electronic device responds to the frame switching operation by displaying the recommended migration scheme for the element; the recommended migration scheme represents the migration method recommended for the element.

[0105] Steps 501-502 are the same as steps 201-203 above, and will not be repeated here.

[0106] In step 503, the electronic device displays a preview interface corresponding to the element. The preview interface includes a first video frame and a first canvas. The first canvas has a first aspect ratio and displays candidate boxes for elements. The candidate boxes represent elements migrated based on the recommended migration scheme.

[0107] In some embodiments, when an electronic device displays the recommended migration scheme corresponding to an element, it also displays a preview control corresponding to the element, for example in... Figure 4 The preview controls in the recommended migration cards are displayed. In response to a trigger action on the preview controls, the corresponding preview interface for the element is displayed.

[0108] In the preview interface, the first canvas represents the first aspect ratio of the video after the aspect ratio switch, while the first video frame represents the video frame before the aspect ratio switch. The relative positions of the two indicate the aspect ratio switching method of the video frame. Furthermore, candidate boxes are used in the first canvas to represent the migrated elements, allowing users to intuitively see the position of the migrated elements in the video frame after the aspect ratio switch and understand the overall display effect after the switch.

[0109] In some embodiments, since the first video frame in the first video is a dynamic frame including multiple video frames, one of the video frames can be selected and displayed in the preview interface.

[0110] In some embodiments, the first video frame and the first canvas are not separated, but rather overlap. For example, the center point of the first video frame and the center point of the first canvas overlap.

[0111] In some embodiments, the elements before migration are displayed simultaneously with the first video frame. This creates a contrast between the elements before migration and the candidate boxes representing the elements after migration, allowing the user to visually observe the migration process. In some embodiments, an indicator line is displayed between the elements before migration and the candidate boxes of the elements, pointing from the elements to the candidate boxes to indicate the migration path of the elements. This indicator line can be a solid line or a dashed line.

[0112] In some embodiments, to facilitate differentiation, the display style of the element before migration and the candidate box of the element are different. For example, the element before migration is given a ghosting effect, while the candidate box is displayed in purple.

[0113] For example, see Figure 6 The top of the subtitle preview interface displays a 16:9 first canvas 601, a video frame 602, a picture-in-picture 603 above the video frame, a sticker 604, and a subtitle 605, as well as a candidate box 606 for subtitle 605. Additionally, an indicator line pointing from subtitle 605 to candidate box 606 can be displayed.

[0114] It should be noted that step 503 is an optional step. In some embodiments, the electronic device may not display a separate preview interface. In response to the triggering operation of the preview control corresponding to the recommended migration scheme, a preview area is displayed directly below the recommended migration scheme. The preview area includes a first video frame and a first canvas. The first canvas has a first frame size, and candidate boxes of elements are displayed in the first canvas. The candidate boxes represent elements migrated based on the recommended migration scheme. Information originally displayed below the recommended migration scheme can be adaptively moved downwards to ensure complete display of the preview area.

[0115] In some embodiments, in response to a frame switching operation, the electronic device displays descriptive information of an element, including the display position of the element relative to the first video frame; and in response to an element confirmation operation, displays a recommended migration scheme corresponding to the element.

[0116] The description information includes the element type, its display position relative to the first video frame, the layer it belongs to, and animation effects. Element types include subtitles, stickers, and picture-in-picture; display positions relative to the first video frame include bottom center, top right corner, and top left corner; layers include text overlays, graphic overlays, and independent video layers; and animation effects include fade-in, fade-out, slide-in, and slide-out. The recommended migration plan is generated based on this description information. If the description information is misidentified, the subsequently generated recommended migration plan will be incorrect. Therefore, before generating a recommended migration plan, the electronic device first identifies elements in the first video to obtain their description information, then displays this description information for the user to view and confirm. Only when the user confirms the element description information is correct, triggering an element confirmation operation, will the electronic device generate and display the recommended migration plan based on the element description information.

[0117] For example, see Figure 3 and Figure 7 User trigger Figure 3 After a 304 error, the toggle control in the middle will not be displayed. Figure 4 Instead of showing the migration plan confirmation screen, it first displays... Figure 7 The element confirmation interface shown displays descriptive information 701 for each element identified from the first video. It also displays a first canvas 702 (16:9 aspect ratio), a video frame 703, and an element confirmation control 704. When the user triggers the element confirmation control 704, a recommended migration plan for the element is generated and displayed. Figure 4 The migration plan confirmation interface is shown.

[0118] In this embodiment of the disclosure, after identifying the description information of an element, the description information of the element is displayed in a timely manner for user confirmation. Only after the user confirms is the recommended migration scheme corresponding to the element displayed, thus avoiding the situation of incorrect description information, thereby avoiding the generation of invalid schemes and wasting processing resources, and reducing the occurrence of misoperation.

[0119] In step 504, the electronic device responds to the editing operation on the candidate box in the first canvas and updates the recommended migration scheme based on the edited candidate box.

[0120] After the user previews the document, they can edit the candidate boxes corresponding to any one or more elements, changing their position or size. The electronic device will then adaptively update the recommended migration scheme based on the edited candidate boxes to ensure that the updated recommended migration scheme meets the user's needs.

[0121] The preview operation in step 503 will not update the recommended migration plan, while the edit operation in step 504 will update the recommended migration plan.

[0122] In some embodiments, the recommended migration scheme is updated once for each edit operation. Alternatively, an update control is displayed in the preview area. After the user edits a candidate box in the first canvas, the candidate box is displayed according to the edited style, but the recommended migration scheme is not updated at this time. After the user performs one or more edit operations, the update control is triggered, and the recommended migration scheme is updated based on the last edited candidate box in the first canvas.

[0123] In some embodiments, the recommended migration scheme includes a target location and a target size; in the first canvas, the candidate box is displayed at the target location, and the size of the candidate box is the target size. Then step 504 includes at least one of the following: 5041. In response to a drag operation on a candidate box in the first canvas, the position of the dragged candidate box is determined as the updated target position.

[0124] If the user is not satisfied with the original position of the candidate box, they can drag the candidate box to change its position. After the dragging operation is completed, the electronic device will determine the position of the dragged candidate box as the updated target position.

[0125] The candidate box is positioned within the first canvas after being dragged and cannot be moved out of the first canvas, thus ensuring that the element corresponding to the candidate box will not be moved out of the video frame in the second video after the frame is switched.

[0126] 5042. In response to a scaling operation on the candidate box in the first canvas, the size of the scaled candidate box is determined as the updated target size.

[0127] If the user is not satisfied with the size of the candidate box, they can shrink or enlarge it. The scaling operation can be performed by dragging one or more edge lines of the candidate box. After the scaling operation is completed, the electronic device will determine the scaled candidate box size as the updated target size.

[0128] The scaled candidate box is located within the first canvas and cannot be moved out of the first canvas, thus ensuring that the element corresponding to the candidate box will not be moved out of the video frame in the second video after the frame is switched.

[0129] In this embodiment, the preview interface not only allows users to preview the relative positional relationship between the first video frame and the first canvas, as well as the relative positional relationship between the elements migrated based on the recommended migration scheme and the first canvas, intuitively presenting the display effect after migration, but also uses candidate boxes to represent elements. Editing these candidate boxes updates the recommended migration scheme accordingly. For users, this means simple operations on the visualized candidate boxes are sufficient, eliminating the need to edit complex parameters. Therefore, the editing operation is simple, easy to implement, and accelerates the efficiency of updating the recommended migration scheme. Furthermore, during the editing process, the position or size of the candidate boxes changes accordingly, automatically presenting the element display effect after updating the recommended migration scheme. This facilitates user viewing, improves the intuitiveness of the editing effect, and provides users with immediate operational feedback.

[0130] Furthermore, users can update the target position of an element by dragging the candidate box in the first canvas, or update the target size of the element by scaling the candidate box. This visual and interactive editing method is intuitive, reduces the difficulty of editing, and ensures the accuracy of the editing process.

[0131] In some embodiments, the recommended migration scheme includes a target location and a target size; the preview interface also includes at least one of a location control and a size control; the method further includes at least one of the following: 5043. In response to the adjustment operation of the position control, the position corresponding to the adjusted position control is determined as the updated target position.

[0132] The position control is used to represent the target position of an element. By adjusting the position control, the target position of the element can be adjusted, thereby determining the updated target position.

[0133] In some embodiments, the position control is a first slider, and the position of the first slider on the first slider represents the distance between the element and a specified coordinate axis in the first canvas. The specified coordinate axis can be the x-axis or the y-axis. The distance between the position of the first slider and the starting point of the first slider and the distance between the element and the specified coordinate axis have a fixed proportional relationship. Therefore, the closer the position of the first slider is to the starting point of the first slider, the closer the element is to the specified coordinate axis. Thus, by moving the first slider, the distance between the element and the specified coordinate axis in the first canvas can be adjusted. Alternatively, the farther the position of the first slider is from the starting point of the first slider, the closer the element is to the specified coordinate axis. Therefore, by moving the first slider, the distance between the element and the specified coordinate axis in the first canvas can be adjusted.

[0134] For example, see Figure 6 The preview interface displays a first slider 607, on which a first slider 608 is displayed. The right side of the first slider 607 shows a position mark "y+18", indicating that the distance between the subtitle and the y-axis is 18 millimeters. Sliding the first slider 608 to the left moves the subtitle to the left, and sliding it to the right moves the subtitle to the right.

[0135] 5044. In response to an adjustment operation on the size control, the size corresponding to the adjusted size control is determined as the updated target size.

[0136] The position control is used to represent the target size of an element. By adjusting the size control, the target size of the element can be adjusted, thereby determining the updated target size.

[0137] In some embodiments, the size control is a second slider, and the position of a second slider on the second slider indicates the size of the element. The distance between the position of the second slider and the starting point of the second slider has a fixed proportional relationship with the size of the element. Therefore, the closer the position of the second slider is to the starting point of the second slider, the smaller the size of the element; thus, the size of the element can be adjusted by moving the second slider. Alternatively, the farther the position of the second slider is from the starting point of the second slider, the smaller the size of the element; thus, the size of the element can be adjusted by moving the second slider.

[0138] For example, see Figure 6The preview interface displays a second slider 609, on which a second slider 610 is displayed. The right side of the second slider 609 shows a size mark "120%", indicating that the subtitle size is 120% of the base size. Sliding the second slider 610 to the left shrinks the subtitle, while sliding it to the right enlarges it.

[0139] In some embodiments, the position of the second slider on the second slider corresponding to the subtitle indicates the font size of the subtitle. When the number of characters in the subtitle remains constant, changing the font size of the subtitle will correspondingly change the target size of the subtitle.

[0140] In some embodiments, the position of the second slider on the second slider corresponding to the sticker indicates the size of the sticker. By sliding the second slider, the target size of the sticker can be reduced or increased while keeping the position of the sticker's center point unchanged.

[0141] In some embodiments, the position of the second slider on the second slider corresponding to the picture-in-picture indicates the size of the picture-in-picture. By sliding the second slider, the target size of the picture-in-picture can be reduced or increased while keeping the position of the center point of the picture-in-picture unchanged.

[0142] In this embodiment, the target position of an element is updated by adjusting a position control, or the target size of an element is updated by adjusting a size control. While this method cannot directly display the updated target position or size, it provides a quantifiable adjustment method, determining the objective value of the target position or size without being affected by errors from dragging or scaling operations. This facilitates subsequent migration of elements using precise values. Furthermore, this method can supplement the method of editing candidate boxes in the first canvas, offering users flexible choices, enriching the interaction, improving flexibility, and making it applicable to various editing scenarios. Additionally, using a slider and a slider on the slider as position or size controls, adjusting the slider's position on the slider to adjust the element's position or size supports continuous and smooth adjustments to position and size, refining the adjustment granularity, achieving fine adjustments with small amplitudes, and simplifying slider adjustments, reducing operational difficulty. It also prevents the slider from exceeding the slider area, thus limiting the numerical range of position and size and avoiding invalid positions and sizes.

[0143] In some embodiments, the layer containing the element can also be edited in the preview interface. For example, a layer selection control can be displayed in the preview interface, which includes multiple selectable layers, with the layer currently belonging to the element displayed by default. When the layer selection control is triggered, these multiple layers are displayed, and the user can select one as the layer containing the element.

[0144] In some embodiments, the element has animation effects, which may include entrance or exit animation effects, such as fade-in, fade-out, slide-in, and slide-out. The element's animation effects can also be edited in the preview interface. For example, an effect selection control is displayed in the preview interface, including a variety of selectable animation effects, with the element's current animation effect displayed by default. Triggering the effect selection control displays these animation effects, allowing the user to select one as the edited animation effect for the element.

[0145] It should be noted that step 504 above is an optional step. In another embodiment, if the user confirms after previewing that there is no need to edit the recommended migration plan, then without performing any editing operations, the return control or the plan confirmation control can be triggered to return to the migration plan confirmation interface used to display the recommended migration plan in step 502. The user can then perform operations on the migration plan confirmation interface.

[0146] For example, see Figure 6 The preview interface displays a solution confirmation control 611. Triggering this control 611 will return the following... Figure 4 The migration plan confirmation interface is shown.

[0147] In some embodiments, the electronic device can perform one or more editing operations on the recommended migration scheme for the same element. After each editing, the edited recommended migration scheme for that element is saved, so that the same element corresponds to at least one version of the migration scheme. The electronic device can also revert the migration scheme of an element to any version or back to the unmigrated state based on the user's rollback operation.

[0148] In step 505, the electronic device responds to the confirmation of the switching operation by acquiring the second video; the second video includes a second video frame and elements migrated based on the updated recommended migration scheme, and the aspect ratio of the second video frame is the first aspect ratio.

[0149] In some embodiments, step 505 includes: in response to a first confirmation switching operation, displaying a second canvas and a third canvas, wherein the second canvas displays a first video frame and elements, and the third canvas displays a second video frame and elements migrated based on a recommended migration scheme; and in response to a second confirmation switching operation, acquiring the second video.

[0150] The first and second confirmation switching operations are two-level confirmation processes. The user first triggers the first confirmation switching operation. At this point, the electronic device does not immediately switch the frame size. Instead, it compares the first video frame before the switch with the elements before migration, and the second video frame after the switch with the elements after migration, thus visually demonstrating the display effect before and after element migration. After the user confirms that everything is correct, the user triggers the second confirmation switching operation. At this point, the electronic device adjusts the frame size of the first video frame to the first frame size, obtaining the second video frame. Based on the recommended migration scheme, it migrates the elements to obtain the migrated elements. The second video frame and the migrated elements are then combined to form the second video.

[0151] For example, see Figure 4 and Figure 8 ,trigger Figure 4 After the confirmation toggle control in the middle displays 408, it shows Figure 8 The comparison interface shown displays a first canvas 801 and a second canvas 802, displayed side-by-side for comparison. The comparison file also shows a migration scheme 803 to be used for three elements and a confirmation switch control 804. Triggering the confirmation switch control 804 retrieves the second video.

[0152] In this embodiment, a second and a third canvas are displayed, allowing for a comparative display of the video footage and elements before and after the aspect ratio switch. Users can intuitively compare the two and identify the differences without switching back and forth between interfaces. Furthermore, the comparison is performed before the actual switch; the video after the aspect ratio switch is only retrieved when the user confirms the switch again, preventing the generation of invalid video due to direct switching and saving processing resources and time.

[0153] In some embodiments, the first video frame includes multiple first video frames. The electronic device adjusts the aspect ratio of each first video frame to a first aspect ratio to obtain multiple second video frames. These multiple second video frames constitute a second video frame, and elements are migrated based on a recommended migration scheme. The description information of the migrated elements corresponding to each second video frame is determined, and the description information of the elements is associated with the corresponding second video frames. The second video frame and the description information associated with each second video frame are combined to form the second video. Thus, when any device subsequently plays the second video, it will sequentially play each second video frame in the second video frame. Furthermore, when playing each second video frame, it will also read the description information associated with the current second video frame and display the corresponding elements according to that description information.

[0154] For example, each second video frame has a corresponding timestamp. The electronic device migrates elements based on a recommended migration scheme, determining the descriptive information corresponding to each timestamp. This descriptive information describes the target position and target size of the element when displaying the second video frame corresponding to that timestamp. The second video frame and the descriptive information corresponding to each timestamp are then combined to form the second video.

[0155] The method provided in this disclosure, in response to a aspect ratio switching operation on a first video, displays recommended migration schemes for elements in the first video other than those in the first video frame. It proactively recommends migration methods for elements, allowing users to use them or adjust them accordingly. Users only need to trigger a confirmation switch operation to directly use the recommended migration scheme to migrate elements, thus ensuring that elements in the second video after the aspect ratio switch will not be misaligned or moved out of the video frame. Furthermore, it simplifies user operations, saves aspect ratio switching time, and improves aspect ratio switching efficiency.

[0156] Based on the above embodiments, the following will provide supplementary explanations of the frame switching method provided by the present disclosure embodiments from multiple perspectives.

[0157] I. Reusing historical migration solutions: In some embodiments, the recommended migration scheme displayed by the electronic device in steps 202 and 502 above can be the latest recommended migration scheme automatically generated by the electronic device based on the element description information. This recommended migration scheme matches the element description information and also matches the first frame.

[0158] For example, the electronic device is a terminal. After the terminal obtains the description information of the element, it sends a migration plan request to the server. The migration plan request includes the description information and the first image. In response to the migration plan request, the server generates a recommended migration plan based on the description and the first image and returns it to the terminal. The terminal then displays the recommended migration plan.

[0159] In some other embodiments, the electronic device has previously generated a migration scheme corresponding to the first frame and saved the migration scheme as a historical migration scheme. In this case, steps 202 and 502 include: the electronic device responding to the frame switching operation to obtain the historical migration scheme corresponding to the first frame, displaying a recommended migration scheme based on the historical migration scheme, wherein the target position and target size of the elements in the recommended migration scheme are the same as the target position and target size of the same type of elements in the historical migration scheme.

[0160] The historical migration scheme includes the historical target location and historical target size of at least one element; that is, in the first frame, based on the historical migration scheme, the location and size to which the element will be migrated. Alternatively, the historical migration scheme may also include the location and size of at least one element before migration.

[0161] The user can select a historical migration plan, and the electronic device will then reuse that plan for elements in the first video. The historical target positions and sizes of similar elements will be used as the target positions and sizes of the elements in the first video, thus generating a recommended migration plan. The positions and sizes of the similar elements before migration can be the same as or different from those of the elements in the first video before migration.

[0162] In some embodiments, in response to a frame switching operation, the electronic device acquires a first frame and acquires the current second frame of the first video, selects a historical migration scheme from the historical migration schemes to switch from the second frame to the first frame, displays a recommended migration scheme based on the historical migration scheme, and the target position and target size of the elements in the recommended migration scheme are the same as the target position and target size of the same type of elements in the historical migration scheme.

[0163] For example, the second aspect ratio is 9:16, and the first aspect ratio is 16:9. See [reference needed]. Figure 9 When the electronic device is not switching aspect ratios for the first time, it selects the historical migration scheme from 9:16 to 16:9. Figure 9 The scheme reuse interface shows historical migration scheme 901, reuse control 902, and regeneration control 903. If the user triggers reuse control 902, a recommended migration scheme corresponding to the first frame is generated and displayed based on the historical migration scheme. If the user triggers regeneration control 903, the historical migration scheme is disregarded, and a new recommended migration scheme is generated.

[0164] In this embodiment, previously used migration schemes are saved as historical migration schemes. These historical migration schemes can be directly reused or edited based on them, eliminating the need to generate new recommended migration schemes from scratch. This saves time and processing resources required for scheme generation. Furthermore, since historical migration schemes are effective schemes that have been used before and can meet user needs, it indicates that users have a high level of acceptance of these historical migration schemes. Directly reusing historical migration schemes or editing them based on them can reduce user workload and improve the efficiency of scheme generation.

[0165] 2. Batch switch the same video to multiple aspect ratios.

[0166] In some embodiments, in steps 201 and 501 above, the number of first frames indicated by the frame switching operation can be one or more. If the number of first frames is one, the electronic device generates a recommended migration scheme. If the number of second frames is multiple, the electronic device generates multiple recommended migration schemes for each second frame.

[0167] In some embodiments, obtaining a aspect ratio switching operation for a first video includes: for the first video, the electronic device displays a plurality of candidate aspect ratios and an aspect ratio switching control; when multiple aspect ratios are selected, obtaining a trigger operation on the aspect ratio switching control, the trigger operation instructing the aspect ratio of the first video to be adjusted to each of the selected first aspect ratios respectively. Then, for each first aspect ratio, the electronic device obtains a second video using the method provided in the above embodiments, thereby obtaining a second video corresponding to each of the plurality of first aspect ratios.

[0168] For example, see Figure 3 and Figure 10 Users Figure 3 The information display interface shows multiple aspect ratios to choose from, such as 9:16, 16:9, and 1:1. If the user selects multiple aspect ratios and triggers an aspect ratio switching operation, then multiple aspect ratios will be selected initially, and the electronic device will display... Figure 10 The batch generation interface shown displays multiple first frames 1001, element description information 1002, and a batch generation control 1003. Triggering the batch generation control 1003 generates recommended migration schemes for each element under each first frame 1001, and displays the generated recommended migration schemes.

[0169] In some embodiments, the electronic device first displays a recommended migration plan corresponding to one of the first frames. After the user confirms, the electronic device acquires the second video corresponding to that first frame. Then, the electronic device displays the recommended migration plan corresponding to the next first frame, and so on, until the second video corresponding to each first frame is acquired.

[0170] In this embodiment of the disclosure, when multiple aspect ratios are selected, the same video can be batch switched to multiple aspect ratios, reducing the operation of repeatedly importing videos, improving processing efficiency, and multiple aspect ratio videos can be obtained in one processing, which can be adapted to different video platforms, thus providing high flexibility.

[0171] 3. Elements follow the anchor object.

[0172] In some embodiments, the method further includes: an electronic device displaying an anchoring setting interface of a first video, the anchoring setting interface displaying the first video frame and elements; obtaining an anchoring object set in the first video frame, the anchoring object being a person or frame area that the element automatically follows; and in the recommended migration scheme, the migration method satisfies: the element follows the anchoring object.

[0173] The anchoring settings interface is used to set the anchoring object of the element in the first video. The anchoring object is the object that the element needs to follow during the frame switching process. That is, the distance between the element and the anchoring object is less than the preset distance. If the position of the anchoring object changes in the first video, the position of the element is also allowed to change to meet the condition that "the distance between the element and the anchoring object is less than the preset distance".

[0174] For example, after the electronic device uploads the first video, it displays a list of video editing controls, which includes various video editing controls. One of these video editing controls is an anchoring setting control. In response to a trigger operation on this anchoring setting control, the anchoring setting interface of the first video is displayed, thereby setting the anchoring object of any element in the first video.

[0175] For example, after the electronic device uploads the first video and receives the frame switching operation, it selects the element to be processed and displays a list of editing controls for that element. This list includes various video editing controls. One of these video editing controls is an anchoring setting control. In response to a trigger operation on this anchoring setting control, the anchoring setting interface of the first video is displayed, thereby setting the anchoring object of the element.

[0176] In this anchoring settings interface, the first video frame and the element to be anchored are displayed. The element can be set to follow a person or area of ​​the frame from the first video frame as its anchor object. When generating a recommended migration scheme, subsequent electronic devices can automatically set the element's migration method to "element follows this anchor object." When any device plays a second video generated based on this recommended migration scheme, it can automatically determine the element's display position based on the element's migration method and the anchor object's position. Alternatively, when generating a recommended migration scheme, the subsequent electronic device can determine the description information of the element associated with each second video frame based on the anchor object's position in each second video frame. This description information includes the element's target position and target size, and ensures that the distance between the target position and the anchor object's position is less than a preset distance.

[0177] In some embodiments, the process of setting the anchor person for an element includes: displaying an anchor person control in the anchor setting interface; selecting the anchor person control displays each person identified from the first video frame, along with the corresponding location information for each person; and the user selecting the location information corresponding to any person determines the person corresponding to that location information as the anchor person for the element. Alternatively, the anchor setting interface displays an anchor person control; selecting the anchor person control adds a candidate box to each identified person in the first video frame, with the person located inside the candidate box; and the user selecting the candidate box corresponding to any person determines the person corresponding to that candidate box as the anchor person for the element.

[0178] In some embodiments, the process of setting the anchor region of an element includes: the anchor setting interface displays an anchor region control; after selecting the anchor region control, the first video screen is set as an interactive area; the user selects any area in the first video screen by sliding or dragging, and then that area is determined as the anchor region of the element.

[0179] In some embodiments, the anchoring settings interface may also include a non-anchoring control. Selecting the non-anchoring control determines that the anchoring object of the element will no longer be set.

[0180] In some embodiments, the anchoring settings interface may also display a slider and a slider on the slider, which are used to set the following strength of the element to the anchored object. The following strength is negatively correlated with a preset distance, that is, the higher the following strength, the smaller the preset distance, indicating that the maximum allowable distance between the element and the anchored object is smaller, and the lower the following strength, the larger the preset distance, indicating that the maximum allowable distance between the element and the anchored object is larger.

[0181] For example, see Figure 11 The anchoring settings interface includes a screen area 1101, an anchoring settings area 1102, and a confirmation anchoring control 1103. The screen area 1101 displays the first video frame, while the anchoring settings area 1102 displays controls for anchoring the person, anchoring the area, not anchoring, and sliders and sticks for setting the follow strength. After setting, the user triggers the confirmation anchoring control 1103, which stores the element's anchoring object and follow strength. These settings can then be used to determine the element's target position and size when generating a recommended migration plan.

[0182] In this embodiment of the disclosure, it is supported to set the anchor object that the element follows in the video frame, which ensures that the distance between the element and the anchor object is relatively close after the frame is switched, and the element will not detach from the anchor object. This ensures that the relationship between the element and the anchor object is preserved in the video after the frame is switched, and this relationship is conveyed to the user watching the video, thus preserving as much of the information implicit in the original video as possible.

[0183] IV. Set the video cover.

[0184] In some embodiments, steps 202-203 and 502-505 are performed when the first aspect ratio is not 1:1. That is, the electronic device acquires an aspect ratio switching operation for the first video, and if the first aspect ratio corresponding to the aspect ratio switching operation is not 1:1, it acquires the second video in response to the aspect ratio switching operation using the method provided in the above embodiments.

[0185] When the first aspect ratio is 1:1, in response to the aspect ratio switching operation, the cover video frame and the recommended migration scheme are displayed. The aspect ratio of the cover video frame is 1:1, and the cover video frame is obtained by adjusting the aspect ratio of the video frame in the first video frame to 1:1. In response to the cover confirmation operation, the cover video frame and the elements migrated based on the recommended migration scheme constitute the cover of the first video.

[0186] For example, the electronic device selects one video frame from a plurality of first video frames included in the first video frame, adjusts the aspect ratio of the video frame to 1:1 to obtain a cover video frame, and generates a recommended migration scheme for the elements based on the cover video frame, and displays the recommended migration scheme. When the user triggers a cover confirmation operation, the cover video frame and the elements migrated based on the recommended migration scheme constitute the cover of the first video. Alternatively, the user can also edit the recommended migration scheme to obtain an edited recommended migration scheme, and then trigger a cover confirmation operation to form the cover video frame and the elements migrated based on the edited recommended migration scheme constitute the cover of the first video.

[0187] The processes of generating recommended migration schemes, displaying recommended migration schemes, and migrating elements based on recommended migration schemes are the same as those in the above embodiments, and will not be repeated here.

[0188] For example, the electronic device selects a video frame from a plurality of first video frames, identifies the main character in the video frame, and segments out the area of ​​a preset size to which the main character belongs to obtain a cover video frame, wherein the preset aspect ratio is 1:1. Alternatively, the electronic device randomly selects a preset number of video frames containing a character from a plurality of first video frames, displays the preset number of video frames, and allows the user to select one of the video frames from the preset number of video frames, adjust the aspect ratio of the selected video frame to 1:1, and obtain the cover video frame. The preset number is an integer greater than 1.

[0189] For example, the electronic device determines the cover title of the first video based on the content in the first video and adds the cover title to the cover video frame. For instance, the person is located in the center of the cover video frame, and the cover title is located below the person. The user can also manually move or scale the cover title to adjust its position and size within the cover video frame.

[0190] In this process, after determining the cover text that should be included in the cover title, the electronic device typeset the cover text using a preset style to obtain a visual cover title, which is then added to the cover video frame. The preset style is the cover title style determined by the electronic device.

[0191] For example, see Figure 3 and Figure 12 The user selected Figure 3 In the case of the "1:1 cover" shown, it is displayed Figure 12 The cover settings interface shown displays a cover video frame 1201, which includes a person and a cover title. The interface also displays a video frame selection control 1202 and a title selection control 1203. The video frame selection control 1202 displays the reason for selecting the current video frame and a "selected" marker indicating that the selection is complete. The title selection control 1203 displays a message indicating that the title has been adjusted to the cover title style and a "selected" marker indicating that the title has been selected. Furthermore, the cover settings interface displays a cover confirmation control 1204. Triggering this control confirms the cover set in the interface as the cover for the first video. This cover will then be applied to the first video and any second video obtained after switching the aspect ratio of the first video.

[0192] This disclosure also provides a scheme for setting video cover images. When the selected aspect ratio is 1:1, the process of setting the video cover image is automatically initiated, a cover video frame is created, and the corresponding recommended migration scheme is displayed. In this case, it is not necessary to generate the complete video after the aspect ratio switch; only the video cover image needs to be generated, saving processing resources and storage space, and avoiding unnecessary processing. Furthermore, when the selected aspect ratio is not 1:1, the process of switching the video aspect ratio is initiated to obtain the video after the aspect ratio switch. This achieves differentiated processing for different aspect ratios.

[0193] 5. Create a migration template.

[0194] In some embodiments, the method further includes: after obtaining the second video, generating a migration template, the migration template including a migration scheme corresponding to the second video.

[0195] The migration scheme corresponding to the second video refers to the final migration scheme used for the elements when generating the second video. This migration scheme can be the same as the recommended migration scheme, or it can be a new scheme obtained by editing based on the recommended migration scheme.

[0196] After the electronic device generates a migration template that includes the migration plan, it saves the migration template. The migration template can then be applied to other videos or shared.

[0197] In some embodiments, the migration scheme corresponding to the second video includes the target position and target size after the element migration, and may also include the position and size before the element migration. When generating the migration template, the target position and template size after the element migration are retained, but the position and size before the element migration are no longer retained, so as to reduce the amount of data in the migration template and avoid redundant information occupying storage space.

[0198] In some embodiments, when multiple first frames are determined, the electronic device generates a migration scheme corresponding to each first frame in batches, thereby acquiring multiple second videos corresponding to the multiple first frames. In this case, the electronic device combines the migration schemes corresponding to the multiple first frames to form a migration template, which includes the migration schemes corresponding to the multiple first frames. Then, when other videos are subsequently acquired, the migration template can be directly applied to the currently acquired videos. The application process is the same as the process of reusing historical migration schemes in the above embodiments, and will not be described again here.

[0199] For example, after acquiring multiple second videos based on multiple first frames, the display... Figure 13The template saving interface shown displays information such as the element layout corresponding to multiple first frames, the frame combination formed by multiple first frames, and the type of each element in the layout area 1301. The application prompt area 1302 displays a first prompt message, instructing the user to apply the migration template to other videos. The sharing prompt area 1303 displays a second prompt message, instructing the user to generate a template link and share it. The template saving interface also displays a template saving control 1304; in response to triggering the template saving control 1304, a migration template is generated and saved.

[0200] In this embodiment, a migration template is generated based on the migration scheme used in this instance. This migration template can be directly reused when switching to other video aspect ratios, eliminating the need to re-execute the generation and editing scheme steps, thus significantly reducing processing workload. Furthermore, historical experience is transformed into a standardized template that can be stored and reused, helping users accumulate video editing experience.

[0201] Based on the above embodiments, the solutions provided by this disclosure are compared with related technologies as follows: The aspect ratio switching schemes in related technologies have the following drawbacks: 1. Misalignment of overlay elements caused by aspect ratio switching: Overlay elements such as subtitles, stickers, and picture-in-picture will not automatically rearrange after the aspect ratio changes, and can only be corrected manually.

[0202] 2. The intelligent cropping function does not apply to overlay elements: The currently provided intelligent cropping function can crop the main part of the video, but overlay elements will not follow or rearrange.

[0203] 3. Lack of element-by-element control in the overall geometric scheme: When performing operations such as clipping, blur filling, and stretching, elements are not distinguished, and decisions such as retention, scaling, rearrangement, and clipping of individual elements cannot be made.

[0204] 4. Migration results cannot be reused: Each time the frame is switched, the layout must be manually rearranged again, with no layout memory and no history reuse.

[0205] 5. Migration results are unmanageable: there is no element-by-element comparison, no single element undo, and no overall rollback path.

[0206] This disclosure provides a video element migration interaction scheme for multi-frame switching. After switching the video frame, a recommended migration scheme is generated for each of the video's overlay elements (subtitles, stickers, picture-in-picture, and effects, etc.). This enables creators to obtain manageable and reusable element-level migration capabilities for multi-frame adaptation, allowing each element to be independently migrated, confirmed, edited, undone, or reused. After creator confirmation, the layout before and after migration is compared to determine the migration result.

[0207] Furthermore, it can anchor elements to people or areas in the video frame, and the anchoring relationship is preserved as the frame rate changes, ensuring that the elements follow the anchored object in the video after the frame rate changes, thus preserving the association between the elements and the anchoring relationship.

[0208] Furthermore, it can generate migration schemes for multiple image frames at once, enabling batch generation of migration schemes without the need to generate migration schemes for each individual image frame separately.

[0209] Furthermore, recommended migration plans are displayed in the form of recommended migration cards. Each card displays information such as migration suggestions, reasons for migration, and risk warnings. By interacting with the cards, users can directly edit or cancel individual migration plans.

[0210] Furthermore, the migration solutions used can be saved as migration templates, and the migration solutions can be upgraded into migration templates that can be saved, reused across videos, and shared, thus realizing asset reuse.

[0211] Figure 14 This is a block diagram illustrating a frame switching device according to an exemplary embodiment. See also Figure 14 The device includes: The operation acquisition unit 1410 is configured to acquire a frame switching operation on the first video; the first video includes a first video frame and elements other than the first video frame, and the frame switching operation instructs to adjust the frame of the first video to the first frame. The scheme display unit 1420 is configured to display the recommended migration scheme corresponding to the element in response to the frame switching operation; the recommended migration scheme represents the migration method recommended for the element; The video acquisition unit 1430 is configured to acquire a second video in response to a confirmed switching operation; the second video includes a second video frame and elements migrated based on the recommended migration scheme, and the aspect ratio of the second video frame is the first aspect ratio.

[0212] In some embodiments, the apparatus further includes: The preview unit is configured to display the preview interface corresponding to the element. The preview interface includes a first video frame and a first canvas. The first canvas has a first frame size. The first canvas displays candidate boxes for elements. The candidate boxes represent elements after migration based on the recommended migration scheme. The editing unit is configured to update the recommended migration scheme based on the edited candidate box in response to the editing operation on the candidate box in the first canvas.

[0213] In some embodiments, the recommended migration scheme includes a target location and a target size; in the first canvas, the candidate box is displayed at the target location, and the size of the candidate box is the target size; An editing unit is configured as at least one of the following: In response to a drag operation on the candidate box in the first canvas, the position of the dragged candidate box is determined as the updated target position; In response to a scaling operation on the candidate box in the first canvas, the size of the scaled candidate box is determined as the updated target size.

[0214] In some embodiments, the recommended migration scheme includes a target location and a target size; the preview interface also includes at least one of a location control and a size control; the editing unit is further configured to include at least one of the following: In response to the adjustment operation of the position control, the position corresponding to the edited position control is determined as the updated target position; In response to an adjustment operation on the size control, the size corresponding to the edited size control is determined as the updated target size.

[0215] In some embodiments, the position control is a first slider, and the position of the first slider on the first slider represents the distance between the element and a specified coordinate axis in the first canvas; The size control is the second slider, and the position of the second slider on the second slider indicates the size of the element.

[0216] In some embodiments, the video acquisition unit 1430 is configured to, in response to a first confirmation switching operation, display a second canvas and a third canvas, wherein the second canvas displays the first video frame and elements, and the third canvas displays the second video frame and elements migrated based on the recommended migration scheme; and in response to a second confirmation switching operation, acquire the second video.

[0217] In some embodiments, the number of elements is multiple; the scheme display unit 1420 is configured to display multiple recommended migration cards in response to a frame switching operation, each recommended migration card belonging to an element, and each recommended migration card displaying the recommended migration scheme of its element.

[0218] In some embodiments, the number of elements is multiple; the video acquisition unit 1430 is configured to acquire a second video in response to a confirmation switching operation when at least one recommended migration scheme is selected. The second video includes a second video frame and elements migrated based on the selected recommended migration scheme.

[0219] In some embodiments, the scheme display unit 1420 is configured to display, in response to a frame switching operation, the position of the element before migration, the recommended target position to migrate to, the size adjustment scheme, and the reason for migration.

[0220] In some embodiments, the scheme display unit 1420 is configured to display description information of an element in response to a frame switching operation, the description information including the display position of the element relative to the first video frame; and to display a recommended migration scheme corresponding to the element in response to an element confirmation operation.

[0221] In some embodiments, the scheme display unit 1420 is configured to, in response to a frame switching operation, acquire a historical migration scheme corresponding to a first frame; and display a recommended migration scheme based on the historical migration scheme, wherein the target position and target size of the elements in the recommended migration scheme are the same as the target position and target size of the same type of elements in the historical migration scheme.

[0222] In some embodiments, the operation acquisition unit 1410 is configured to display multiple alternative aspect ratios and aspect ratio switching controls for a first video; when multiple aspect ratios are selected, it acquires a trigger operation on the aspect ratio switching controls, the trigger operation instructing the aspect ratio of the first video to be adjusted to each of the selected first aspect ratios respectively.

[0223] In some embodiments, the apparatus further includes: Anchor setting unit is configured to display the anchor setting interface of the first video, which displays the first video frame and elements; retrieve the anchor object set in the first video frame, where the anchor object is the person or frame area that the element automatically follows; In the recommended migration scheme, the migration method satisfies the following condition: the element follows the anchor object.

[0224] In some embodiments, the apparatus further includes: The cover setting unit is configured to, in the case of a first aspect ratio of 1:1, display a cover video frame and a recommended migration scheme in response to an aspect ratio switching operation. The cover video frame has an aspect ratio of 1:1 and is obtained by adjusting the aspect ratio of the video frame in the first video frame to 1:1. In response to a cover confirmation operation, the cover video frame and the elements migrated based on the recommended migration scheme constitute the cover of the first video.

[0225] In some embodiments, the apparatus further includes: The template generation unit is configured to generate a migration template after the second video is acquired, the migration template including a migration scheme corresponding to the second video.

[0226] The apparatus provided in this embodiment, in response to a frame switching operation on a first video, displays recommended migration schemes for elements in the first video other than those in the first video frame. It proactively recommends migration methods for elements, allowing the user to use them or adjust them accordingly. The user only needs to trigger a confirmation switch operation to directly use the recommended migration scheme to migrate elements, thereby ensuring that elements in the second video after the frame switch do not become misaligned or moved out of the video frame. Furthermore, it simplifies the user's operation, saves frame switching time, and improves frame switching efficiency.

[0227] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0228] This disclosure provides an electronic device including a processor and a memory for storing processor-executable instructions. The processor is configured to execute the instructions to implement the frame switching method described above.

[0229] Figure 15 This is a block diagram illustrating an electronic device according to an exemplary embodiment. The electronic device 1500 may be: a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The electronic device 1500 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0230] Typically, electronic device 1500 includes a processor 1501 and a memory 1502.

[0231] Processor 1501 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1501 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1501 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1501 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1501 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0232] The memory 1502 may include one or more computer-readable storage media, which may be non-transitory. The memory 1502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1502 are used to store at least one program code, which is executed by the processor 1501 to implement the frame switching method provided in the method embodiments of this disclosure.

[0233] In some embodiments, the electronic device 1500 may optionally include a peripheral device interface 1503 and at least one peripheral device. The processor 1501, memory 1502, and peripheral device interface 1503 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1503 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: radio frequency circuitry 1504, display screen 1505, camera assembly 1506, audio circuitry 1507, and power supply 1508.

[0234] Peripheral device interface 1503 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1501 and memory 1502. In some embodiments, processor 1501, memory 1502 and peripheral device interface 1503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1501, memory 1502 and peripheral device interface 1503 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0235] The radio frequency (RF) circuit 1504 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1504 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1504 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. In some embodiments, the RF circuit 1504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1504 can communicate with other electronic devices via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1504 may also include circuitry related to NFC (Near Field Communication), which is not limited herein.

[0236] Display screen 1505 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1505 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1501 for processing. In this case, display screen 1505 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1505, which serves as the front panel of electronic device 1500; in other embodiments, there may be at least two display screens, respectively disposed on different surfaces of electronic device 1500 or in a folded design; in still other embodiments, display screen 1505 may be a flexible display screen, disposed on a curved or folded surface of electronic device 1500. Furthermore, display screen 1505 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1505 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0237] The camera assembly 1506 is used to acquire images or videos. In some embodiments, the camera assembly 1506 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the electronic device, and the rear-facing camera is located on the back of the electronic device. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1506 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash is a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0238] The audio circuit 1507 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 1501 for processing, or to the radio frequency circuit 1504 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different part of the electronic device 1500. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1501 or the radio frequency circuit 1504 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1507 may also include a headphone jack.

[0239] Power supply 1508 is used to power the various components in electronic device 1500. Power supply 1508 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1508 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0240] Those skilled in the art will understand that Figure 15 The structure shown does not constitute a limitation on the electronic device 1500, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0241] Figure 16 This is a schematic diagram of a server structure according to an exemplary embodiment. The server 1600 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1601 and one or more memories 1602. The memories 1602 store at least one computer program, which is loaded and executed by the processor 1601 to implement the methods provided in the various method embodiments described above. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be elaborated upon here.

[0242] In an exemplary embodiment, a computer-readable storage medium is also provided, which, when executed by a processor of an electronic device, enables the electronic device to perform the steps in the frame switching method described above. For example, the computer-readable storage medium may be a ROM (Read Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage device, etc.

[0243] In an exemplary embodiment, a computer program product is also provided, including a computer program that, when executed by a processor of an electronic device, implements the steps in the above-described frame switching method.

[0244] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0245] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for switching aspect ratios, characterized in that, The method includes: Obtain a frame switching operation on the first video; the first video includes a first video frame and elements other than the first video frame, and the frame switching operation instructs the frame of the first video to be adjusted to the first frame. In response to the frame switching operation, a recommended migration scheme corresponding to the element is displayed; the recommended migration scheme represents the migration method recommended for the element. In response to the confirmation of the switching operation, a second video is acquired; the second video includes a second video frame and the elements migrated based on the recommended migration scheme, wherein the aspect ratio of the second video frame is the first aspect ratio.

2. The method according to claim 1, characterized in that, Before acquiring the second video in response to a confirmed switching operation, the method further includes: The preview interface corresponding to the element is displayed. The preview interface includes the first video screen and the first canvas. The first canvas has the first screen size. The first canvas displays the candidate box of the element. The candidate box represents the element after migration based on the recommended migration scheme. In response to an editing operation on the candidate box in the first canvas, the recommended migration scheme is updated based on the edited candidate box.

3. The method according to claim 2, characterized in that, The recommended migration scheme includes a target location and a target size; in the first canvas, the candidate box is displayed at the target location, and the size of the candidate box is the target size; The step of responding to an editing operation on the candidate box in the first canvas, and updating the recommended migration scheme based on the edited candidate box, includes at least one of the following: In response to a drag operation on the candidate box in the first canvas, the position of the dragged candidate box is determined as the updated target position; In response to a scaling operation on the candidate box in the first canvas, the size of the scaled candidate box is determined as the updated target size.

4. The method according to claim 2, characterized in that, The recommended migration scheme includes a target location and a target size; the preview interface also includes at least one of a location control and a size control; the method also includes at least one of the following: In response to the adjustment operation of the position control, the position corresponding to the adjusted position control is determined as the updated target position; In response to the adjustment operation of the size control, the size corresponding to the adjusted size control is determined as the updated target size.

5. The method according to claim 4, characterized in that, The position control is a first slider, and the position of the first slider on the first slider represents the distance between the element and a specified coordinate axis in the first canvas; The size control is a second slider, and the position of the second slider on the second slider indicates the size of the element.

6. The method according to claim 1, characterized in that, The step of acquiring the second video in response to the confirmation of the switching operation includes: In response to the first confirmation switching operation, a second canvas and a third canvas are displayed. The second canvas displays the first video frame and the element, and the third canvas displays the second video frame and the element after migration based on the recommended migration scheme. In response to the second confirmation switching operation, the second video is acquired.

7. The method according to claim 1, characterized in that, The number of elements is multiple; the step of displaying the recommended migration scheme corresponding to the element in response to the frame switching operation includes: In response to the aspect ratio switching operation, multiple recommended migration cards are displayed, each of the recommended migration cards belonging to one of the elements, and each recommended migration card displays the recommended migration scheme of the element to which it belongs.

8. The method according to claim 1, characterized in that, The number of elements is multiple; the step of acquiring the second video in response to the confirmation switching operation includes: If at least one of the recommended migration schemes is selected, in response to the confirmation switching operation, the second video is acquired, the second video including the second video frame and the elements migrated based on the selected recommended migration scheme.

9. The method according to any one of claims 1-8, characterized in that, The step of displaying the recommended migration scheme corresponding to the element in response to the aspect ratio switching operation includes: In response to the frame switching operation, the position of the element before migration, the recommended target position to migrate to, the size adjustment scheme, and the reason for migration are displayed.

10. The method according to any one of claims 1-8, characterized in that, The step of displaying the recommended migration scheme corresponding to the element in response to the aspect ratio switching operation includes: In response to the frame switching operation, the description information of the element is displayed, the description information including the display position of the element relative to the first video frame; In response to the element confirmation operation, the recommended migration scheme corresponding to the element is displayed.

11. The method according to any one of claims 1-8, characterized in that, The step of displaying the recommended migration scheme corresponding to the element in response to the aspect ratio switching operation includes: In response to the frame switching operation, obtain the historical migration scheme corresponding to the first frame; The recommended migration scheme is displayed based on the historical migration scheme. The target position and target size of the element in the recommended migration scheme are the same as the target position and target size of the same type of element in the historical migration scheme.

12. The method according to any one of claims 1-8, characterized in that, The step of obtaining the aspect ratio switching operation for the first video includes: For the first video, multiple alternative aspect ratios and aspect ratio switching controls are displayed; When multiple frames are selected, a trigger operation is obtained for the frame switching control, and the trigger operation instructs the frame of the first video to be adjusted to each of the selected first frames.

13. The method according to any one of claims 1-8, characterized in that, The method further includes: The anchoring settings interface of the first video is displayed, and the anchoring settings interface displays the first video frame and the element; Obtain the anchor object set in the first video frame, wherein the anchor object is a person or area of ​​the frame that the element automatically follows; In the recommended migration scheme, the migration method satisfies the following condition: the element follows the anchor object.

14. The method according to any one of claims 1-8, characterized in that, The method further includes: When the first aspect ratio is 1:1, in response to the aspect ratio switching operation, the cover video frame and the recommended migration scheme are displayed. The aspect ratio of the cover video frame is 1:1, and the cover video frame is obtained by adjusting the aspect ratio of the video frame in the first video frame to 1:

1. In response to the cover confirmation operation, the cover video frame and the elements migrated based on the recommended migration scheme are used to form the cover of the first video.

15. The method according to any one of claims 1-8, characterized in that, The method further includes: After obtaining the second video, a migration template is generated, which includes the migration scheme corresponding to the second video.

16. A frame switching device, characterized in that, The device includes: The operation acquisition unit is configured to acquire a frame switching operation on a first video; the first video includes a first video frame and elements other than the first video frame, and the frame switching operation instructs the frame of the first video to be adjusted to the first frame. The scheme display unit is configured to display a recommended migration scheme corresponding to the element in response to the frame switching operation; the recommended migration scheme represents a recommended migration method for the element. The video acquisition unit is configured to acquire a second video in response to a confirmation switching operation; the second video includes a second video frame and the elements migrated based on the recommended migration scheme, wherein the aspect ratio of the second video frame is the first aspect ratio.

17. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the aspect ratio switching method as described in any one of claims 1 to 15.

18. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the aspect ratio switching method as described in any one of claims 1 to 15.

19. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the aspect ratio switching method according to any one of claims 1 to 15.