Image switching method and related device

By setting different switching methods and sequences based on the position of the main image in electronic devices, and subdividing the display screen area for switching, the problem of abrupt image switching is solved, and the user's visual experience is improved.

CN121478162APending Publication Date: 2026-02-06HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411641046.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-08-06
Filing Date
2024-11-15
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing electronic devices exhibit abrupt image switching, resulting in a poor user visual experience.

Method used

By setting different switching methods and switching order based on the position of the main image before and after the switch, the main area and background area of ​​the display screen are subdivided, and different switching methods are used for switching.

Benefits of technology

It achieves a more natural and smoother image switching process, enhancing the user's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121478162A_ABST
    Figure CN121478162A_ABST
Patent Text Reader

Abstract

The invention discloses an image switching method and a related device, and the method comprises the steps: displaying a first image in a display screen, and the first image comprises a first image element; determining the switched image as a second image, wherein the second image comprises a second image element; determining a target area and a non-target area in the display screen; in the first time period, the content of the second image is switched and displayed from the content of the first image in a first switching mode in the target area; switching and displaying the content of the second image from the content of the first image in a second switching mode in the non-target area in a second time period; wherein the first time period is different from the second time period, and / or the first switching mode is different from the second switching mode. In this way, different switching modes and / or switching sequences can be adopted for the target area and the non-target area, and the fluency of the switching process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and in particular to an image switching method and related apparatus. Background Technology

[0002] With the continuous development of electronic technology, electronic devices can provide users with an increasing variety of services. Users can browse pictures, watch videos, set wallpapers, and more using electronic devices.

[0003] Electronic devices can receive and respond to user operations, switching the images displayed on the screen. When switching images, electronic devices can use preset animation effects such as scaling and fading to achieve the image transition.

[0004] While this allows for rapid image switching, the transitions are abrupt, making the user experience noticeable and resulting in a poor visual experience. Summary of the Invention

[0005] This application provides an image switching method and related apparatus, which realizes different switching modes based on the location of the main subject in the image before and after the switching, making the switching process more natural and smooth, and bringing a better visual experience to the user.

[0006] In a first aspect, this application provides an image switching method applied to an electronic device, the electronic device including a display screen. The method includes: displaying a first image on the display screen, the first image including a first subject; determining that the switched image is a second image, the second image including a second subject; determining a subject area and a background area of ​​the display screen based on the position of the first subject in the first image and the position of the second subject in the second image, the subject area including a first display area of ​​the first subject on the display screen and a second display area of ​​the second subject on the display screen, the background area being an area outside the subject area of ​​the display screen; in a first time period, switching the display of the content of the second image from the content of the first image in the subject area using a first switching method; in a second time period, switching the display of the content of the second image from the content of the first image in the background area using a second switching method; wherein the first time period is different from the second time period, and / or the first switching method is different from the second switching method.

[0007] In this way, different switching methods can be set based on the location of the main subject in the image before and after the switch, making the switching process more natural and smooth, and bringing a better visual experience to the user.

[0008] In one possible implementation, the first display area is the same as the second display area.

[0009] Thus, when the first display area where the first subject is located overlaps with the second display area where the second subject is located, the switching area can include the subject area and the background area, where the subject area is the first display area and the background area is other areas in the display screen outside the subject area.

[0010] In one possible implementation, the first display area includes a second display area; the main area includes a first switching area and a second switching area, the first switching area being the second display area, and the second switching area being the difference between the first display area and the second display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the main area using a first switching method, specifically including: in a first sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a third switching method; in a second sub-time period, the content of the second image is switched from the content of the first image to be displayed in the second switching area using a fourth switching method; wherein the first sub-time period is different from the second sub-time period, and / or the third switching method is different from the fourth switching method.

[0011] Thus, when the first display area containing the first subject includes the second display area containing the second subject, the subject area can be subdivided into a first switching area and a second switching area. The first switching area is the intersection of the first and second display areas, i.e., the second display area. The second switching area is the difference between the first and second display areas, i.e., the portion that belongs to the first display area but not to the second display area.

[0012] Using the image switching method provided in this application, different switching areas in the main body area can be switched based on different switching orders (or switching priorities) and switching methods.

[0013] In one possible implementation, the second display area includes the first display area; the main area includes a first switching area and a third switching area, the first switching area being the first display area, and the third switching area being the difference between the second display area and the first display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the main area using a first switching method, specifically including: in a third sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a fifth switching method; in a fourth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the third switching area using a sixth switching method; wherein the third sub-time period is different from the fourth sub-time period, and / or the fifth switching method is different from the sixth switching method.

[0014] Thus, when the second display area containing the second subject includes the first display area containing the first subject, the subject area can be subdivided into a first switching area and a third switching area. The first switching area is the intersection of the first and second display areas, i.e., the first display area. The third switching area is the difference between the second and first display areas, i.e., the portion that belongs to the second display area but not to the first display area.

[0015] Using the image switching method provided in this application, different switching areas in the main body area can be switched based on different switching orders (or switching priorities) and switching methods.

[0016] In one possible implementation, the first display area and the second display area do not overlap; the main area includes a second switching area and a third switching area, where the second switching area is the first display area and the third switching area is the second display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the main area using a first switching method, specifically including: in a fifth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a seventh switching method; in a sixth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the second switching area using an eighth switching method; wherein the fifth sub-time period is different from the sixth sub-time period, and / or the seventh switching method is different from the eighth switching method.

[0017] Thus, when the second display area where the second subject is located does not overlap with the first display area where the first subject is located, the subject area can be subdivided into a second switching area and a third switching area. The second switching area is the difference between the first and second display areas, i.e., the first display area. The third switching area is the difference between the second and first display areas, i.e., the second display area.

[0018] Using the image switching method provided in this application, different switching areas in the main body area can be switched based on different switching orders (or switching priorities) and switching methods.

[0019] In one possible implementation, the main area includes a first switching area, a second switching area, and a third switching area. The first switching area is the intersection of the first display area and the second display area, the second switching area is the difference between the first display area and the second display area, and the third switching area is the difference between the second display area and the first display area. In a first time period, the content of the second image is switched from the content of the first image to be displayed in the main area using a first switching method. Specifically, this includes: in a seventh sub-time period, switching the content of the second image from the content of the first image to be displayed in the first switching area using a ninth switching method; in an eighth sub-time period, switching the content of the second image from the content of the first image to be displayed in the second switching area using a tenth switching method; and in a ninth sub-time period, switching the content of the second image from the content of the first image to be displayed in the third switching area using an eleventh switching method. The seventh, eighth, and ninth sub-time periods are all different, and / or the ninth, tenth, and eleventh switching methods are all different.

[0020] Thus, when the second display area where the second subject is located intersects with the first display area where the first subject is located, the subject area can be subdivided into a first switching area, a second switching area, and a third switching area. The first switching area is the intersection of the first display area and the second display area; the second switching area is the difference between the first display area and the second display area, that is, the part that belongs to the first display area but not to the second display area; the third switching area is the difference between the second display area and the first display area, that is, the part that belongs to the second display area but not to the first display area.

[0021] Using the image switching method provided in this application, different switching areas in the main body area can be switched based on different switching orders (or switching priorities) and switching methods.

[0022] In one possible implementation, before determining the main body region and background region of the display screen based on the position of the first subject in the first image and the position of the second subject in the second image, the method further includes: determining the position of the first subject in the first image based on a saliency detection algorithm; and determining the position of the second subject in the second image based on a saliency detection algorithm.

[0023] In this way, the position of the first subject in the first image can be determined based on the saliency detection algorithm; the position of the second subject in the second image can also be determined based on the saliency detection algorithm.

[0024] In one possible implementation, the first image is any of the following: an always-on-display (AOD) wallpaper, a lock screen wallpaper, and a desktop; the second image is any of the following: an always-on-display (AOD) wallpaper, a lock screen wallpaper, and a desktop; the first image and the second image are different.

[0025] This allows you to switch between the always-on wallpaper when the screen is off, the lock screen wallpaper, and any two of the wallpapers on the home screen.

[0026] Secondly, this application provides an image switching method applied to an electronic device, the electronic device including a display screen. The method includes: displaying a first image on the display screen, the first image including first image elements; determining that the switched image is a second image, the second image including second image elements; determining a target area and a non-target area in the display screen, the target area including a first display area of ​​the first image elements and a second display area of ​​the second image elements, the non-target area including areas outside the target area in the display screen; in a first time period, switching the display of the content of the second image from the content of the first image in the target area using a first switching method; in a second time period, switching the display of the content of the second image from the content of the first image in the non-target area using a second switching method; wherein the first time period is different from the second time period, and / or the first switching method is different from the second switching method.

[0027] This allows for different switching methods and / or sequences for target and non-target areas, improving the smoothness of the switching process and providing a better user experience.

[0028] It should be noted that, in one possible implementation, the target area may include only the first display area and the second display area; in another possible implementation, the target area may include the first display area, the second display area and other display areas, such as the display area near the first display area, and / or the display area near the second display area, etc.

[0029] In one possible implementation, the target area is a preset area.

[0030] In this way, the target area can be a pre-defined area of ​​the electronic device.

[0031] In one possible implementation, determining the target area and non-target area in the display screen specifically includes: determining a first display area in the display screen based on a first image using a first algorithm; determining a second display area in the display screen based on a second image using the first algorithm; determining a target area based on the first display area and the second display area; and determining a non-target area based on the target area.

[0032] In this way, the target region can be determined based on the first algorithm, and then the non-target regions can be determined.

[0033] In one possible implementation, the first algorithm can be an image algorithm such as a face recognition algorithm, in which case the first algorithm can be used to identify the display area where a face is located. In another possible implementation, the first algorithm can also be an image algorithm such as a saliency recognition algorithm, in which case the first algorithm can be used to identify the display area where the subject of the image is located.

[0034] In one possible implementation, the first image element is a face element, and the second image element is a face element.

[0035] At this point, the first display area can be used to display the face in the first image, and the second display area can be used to display the face in the second image. In this case, the target area can also be called the face area, and the non-target area can also be called the non-face area.

[0036] In this way, different switching methods and / or switching orders can be used for face elements and non-face elements.

[0037] In one possible implementation, the second image is an image generated based on the first image.

[0038] In this way, a second image can be generated based on the first image, so as to switch between any one or more image elements other than facial elements such as clothing, hairstyle, and background of the same person.

[0039] In one possible implementation, during the process of switching the display of the content of the second image from the content of the first image in a second switching manner in a non-target area, a granular occlusion is displayed in the non-target area.

[0040] This allows granular occlusions to be displayed in non-target areas during the switching process.

[0041] In one possible implementation, during the process of switching the display of the content of the second image from the content of the first image in the target area using a first switching method, the target area does not display granular occlusions.

[0042] In one possible implementation, during the process of switching the display of the content of the second image from the content of the first image in the target area using a first switching method, the target area displays granular occlusions.

[0043] In one possible implementation, displaying granular occlusions in non-target areas specifically includes: displaying granular occlusions of different densities in non-target areas based on their distance from the target area, with the density of the granular occlusions being lower as they get closer to the target area.

[0044] In this way, granular occlusions of different densities can be displayed based on their distance from the target area.

[0045] In one possible implementation, the second switching form is used to present the visual effect of granular occlusions spreading outward from around the target area.

[0046] In this way, during the switching process of non-target areas, granular occlusions can be displayed in non-target areas with the target area as the center.

[0047] In one possible implementation, the first image is an always-on display (AOD) wallpaper, and the second image is a live wallpaper.

[0048] This allows you to switch the wallpaper from the off screen to the on screen, improving the smoothness of the switch and providing a better user experience.

[0049] In one possible implementation, the first display area is the same as the second display area.

[0050] Thus, the first display area containing the face elements of the first image and the second display area containing the face elements of the second image can also be the exact same area.

[0051] In one possible implementation, the first image element is the main body of the first image, and the second image element is the main body of the second image.

[0052] It should be noted that an image can include both a subject and a background. In this case, the target area can also be called the subject area, and the non-target area can also be called the background area.

[0053] In this way, the target and non-target areas can be determined based on the location of the subject in the images before and after the switch, and different switching methods and / or switching times can be set to make the switching process more natural and smooth, bringing a better visual experience to the user.

[0054] In one possible implementation, the first display area includes a second display area; the target area includes a first switching area and a second switching area, the first switching area being the second display area, and the second switching area being the difference between the first display area and the second display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the target area using a first switching method, specifically including: in a first sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a third switching method; in a second sub-time period, the content of the second image is switched from the content of the first image to be displayed in the second switching area using a fourth switching method; wherein the first sub-time period is different from the second sub-time period, and / or the third switching method is different from the fourth switching method.

[0055] Thus, when the first display area containing the main subject of the first image includes the second display area containing the main subject of the second image, the main subject area can be subdivided into a first switching area and a second switching area. The first switching area is the intersection of the first and second display areas, i.e., the second display area. The second switching area is the difference between the first and second display areas, i.e., the portion that belongs to the first display area but not to the second display area.

[0056] The image switching method provided in this application can be used to subdivide the target area into multiple switching areas based on the positional relationship between the first display area and the second display area, and can switch different switching areas in the target area based on different switching orders (or switching priorities) and switching methods.

[0057] In one possible implementation, the second display area includes the first display area; the target area includes a first switching area and a third switching area, the first switching area being the first display area, and the third switching area being the difference between the second display area and the first display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the target area using a first switching method, specifically including: in a third sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a fifth switching method; in a fourth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the third switching area using a sixth switching method; wherein the third sub-time period is different from the fourth sub-time period, and / or the fifth switching method is different from the sixth switching method.

[0058] Thus, when the second display area containing the main subject of the second image includes the first display area containing the main subject of the first image, the target area can be subdivided into a first switching area and a third switching area. The first switching area is the intersection of the first and second display areas, i.e., the first display area itself. The third switching area is the difference between the second and first display areas, i.e., the portion that belongs to the second display area but not to the first display area.

[0059] Using the image switching method provided in this application, different switching areas in the target area can be switched based on different switching orders (or switching priorities) and switching methods.

[0060] In one possible implementation, the first display area and the second display area do not overlap; the target area includes a second switching area and a third switching area, wherein the second switching area is the first display area and the third switching area is the second display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the target area using a first switching method, specifically including: in a fifth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a seventh switching method; in a sixth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the second switching area using an eighth switching method; wherein the fifth sub-time period is different from the sixth sub-time period, and / or the seventh switching method is different from the eighth switching method.

[0061] Thus, when the second display area containing the main subject of the second image does not overlap with the first display area containing the main subject of the first image, the target area can be subdivided into a second switching area and a third switching area. The second switching area is the difference between the first and second display areas, i.e., the first display area. The third switching area is the difference between the second and first display areas, i.e., the second display area.

[0062] Using the image switching method provided in this application, different switching areas in the target area can be switched based on different switching orders (or switching priorities) and switching methods.

[0063] In one possible implementation, the target area includes a first switching area, a second switching area, and a third switching area. The first switching area is the intersection of the first display area and the second display area, the second switching area is the difference between the first display area and the second display area, and the third switching area is the difference between the second display area and the first display area. In a first time period, the content of the second image is switched from the content of the first image to be displayed in the target area using a first switching method. Specifically, this includes: in a seventh sub-time period, switching the content of the second image from the content of the first image to be displayed in the first switching area using a ninth switching method; in an eighth sub-time period, switching the content of the second image from the content of the first image to be displayed in the second switching area using a tenth switching method; and in a ninth sub-time period, switching the content of the second image from the content of the first image to be displayed in the third switching area using an eleventh switching method. The seventh, eighth, and ninth sub-time periods are all different, and / or the ninth, tenth, and eleventh switching methods are all different.

[0064] Thus, when the second display area containing the main subject of the second image intersects with the first display area containing the main subject of the first image, the target area can be subdivided into a first switching area, a second switching area, and a third switching area. The first switching area is the intersection of the first and second display areas; the second switching area is the difference between the first and second display areas, i.e., the portion belonging to the first display area but not to the second display area; the third switching area is the difference between the second and first display areas, i.e., the portion belonging to the second display area but not to the first display area.

[0065] Using the image switching method provided in this application, different switching areas in the target area can be switched based on different switching orders (or switching priorities) and switching methods.

[0066] In one possible implementation, the first display area is the same as the second display area.

[0067] Thus, the first display area containing the main subject of the first image and the second display area containing the main subject of the second image can also be exactly the same area.

[0068] In one possible implementation, the first time period precedes the second time period.

[0069] This allows you to switch between facial elements first, then non-facial elements; or, switch the main subject of the image first, then the background.

[0070] Thirdly, this application provides an electronic device, which includes one or more processors, one or more memories, and one or more displays; wherein the one or more memories are coupled to one or more processors, and the one or more memories are used to store computer instructions, and when the one or more processors execute the computer instructions, they implement the image switching method in any of the possible implementations of any of the above aspects.

[0071] Fourthly, this application provides a chip system comprising: a processing circuit and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to execute the code instructions to perform the image switching method in any possible implementation of any of the above aspects.

[0072] Fifthly, this application provides a readable storage medium storing computer instructions that, when executed by a processor, implement the image switching method in any of the possible implementations of any of the above aspects.

[0073] Sixthly, this application provides a computer program product including computer instructions, which, when executed by a processor, implements the image switching method in any of the possible implementations of any of the above aspects.

[0074] The beneficial effects of the third to sixth aspects can be referenced from the beneficial effects of the first and second aspects mentioned above. Attached Figure Description

[0075] Figure 1A This is a schematic diagram of the device configuration of an electronic device provided in an embodiment of this application;

[0076] Figure 1B This is a schematic diagram of the device configuration of another electronic device provided in an embodiment of this application;

[0077] Figure 1C A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0078] Figures 2A-2E A schematic diagram of the switching logic of a set of image switching methods provided in the embodiments of this application;

[0079] Figure 3 A flowchart illustrating an image switching method provided in an embodiment of this application is shown;

[0080] Figure 4A This is a schematic diagram of an image before switching, provided as an embodiment of this application.

[0081] Figure 4B This is a schematic diagram of a switched image provided in an embodiment of this application;

[0082] Figure 4C This is a schematic diagram illustrating the division of a switching region according to an embodiment of this application;

[0083] Figure 4D-Figure 4G A set of schematic diagrams illustrating interface changes during a switching process provided in an embodiment of this application;

[0084] Figures 4H-4K This application provides another set of schematic diagrams illustrating interface changes during the switching process;

[0085] Figure 5A This is a schematic diagram of an image before switching, provided as an embodiment of this application.

[0086] Figure 5B This is a schematic diagram of a switched image provided in an embodiment of this application;

[0087] Figure 5C This is a schematic diagram illustrating the division of a switching region according to an embodiment of this application;

[0088] Figure 5D-Figure 5G A set of schematic diagrams illustrating interface changes during a switching process provided in an embodiment of this application;

[0089] Figures 5H-5K This application provides another set of schematic diagrams illustrating interface changes during the switching process;

[0090] Figure 6A This is a schematic diagram of an image before switching, provided as an embodiment of this application.

[0091] Figure 6B This is a schematic diagram of a switched image provided in an embodiment of this application;

[0092] Figure 6C This is a schematic diagram illustrating the division of a switching region according to an embodiment of this application;

[0093] Figures 6D-6G A set of schematic diagrams illustrating interface changes during a switching process provided in an embodiment of this application;

[0094] Figures 6H-6K This application provides another set of schematic diagrams illustrating interface changes during the switching process;

[0095] Figure 7A This is a schematic diagram of an image before switching, provided as an embodiment of this application.

[0096] Figure 7B This is a schematic diagram of a switched image provided in an embodiment of this application;

[0097] Figure 7C This is a schematic diagram illustrating the division of a switching region according to an embodiment of this application;

[0098] Figures 7D-7G A set of schematic diagrams illustrating interface changes during a switching process provided in an embodiment of this application;

[0099] Figures 7H-7K This application provides another set of schematic diagrams illustrating interface changes during the switching process;

[0100] Figure 8A This is a schematic diagram of an image before switching, provided as an embodiment of this application.

[0101] Figure 8B This is a schematic diagram of a switched image provided in an embodiment of this application;

[0102] Figure 8C This is a schematic diagram illustrating the division of a switching region according to an embodiment of this application;

[0103] Figure 8D This is a schematic diagram illustrating another division of the switching area provided in an embodiment of this application;

[0104] Figure 9A A schematic diagram of an always-on wallpaper provided in an embodiment of this application;

[0105] Figure 9B A schematic diagram of a lock screen wallpaper provided in an embodiment of this application;

[0106] Figure 9C A schematic diagram of a desktop interface provided for an embodiment of this application;

[0107] Figures 9D-9G A set of schematic diagrams illustrating the interface for switching from the always-on wallpaper to the lock screen wallpaper, provided for embodiments of this application;

[0108] Figures 9H-9K A set of schematic diagrams illustrating the interface for switching from lock screen wallpaper to desktop, provided for embodiments of this application;

[0109] Figure 10 This is a schematic diagram of the functional modules of an electronic device provided in an embodiment of this application;

[0110] Figure 11 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of this application;

[0111] Figure 12 A flowchart illustrating an image switching method provided in an embodiment of this application;

[0112] Figures 13A-13C A schematic diagram of the switching logic of a set of image switching methods provided in the embodiments of this application;

[0113] Figures 14A-14D A schematic diagram illustrating the switching process of switching image P3 to image P4, provided in an embodiment of this application;

[0114] Figure 15 A flowchart illustrating another image switching method provided in an embodiment of this application;

[0115] Figure 16 This is a flowchart illustrating another image switching method provided in an embodiment of this application. Detailed Implementation

[0116] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0117] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0118] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.

[0119] The following describes the device forms of two electronic devices provided in the embodiments of this application.

[0120] Figure 1A This illustration shows a schematic diagram of the device configuration of an electronic device 100 provided in an embodiment of this application.

[0121] like Figure 1AAs shown, the electronic device 100 can be a mobile phone 10, which may include a display screen 11. The display screen 11 can display images, videos, etc. The display screen 11 can switch images. In some application scenarios, the display screen 11 can display an off-screen wallpaper in the off-screen state, a lock screen wallpaper in the locked screen state, and a desktop wallpaper in the unlocked state, etc. When the display screen 11 displays an off-screen wallpaper, the electronic device 100 can receive and respond to the user's operation of turning on the display screen 11, and switch the off-screen wallpaper displayed on the display screen 11 to the lock screen wallpaper. When the display screen 11 displays a lock screen wallpaper, the electronic device 100 can receive and respond to the user's unlock operation, and switch the lock screen wallpaper displayed on the display screen 11 to the desktop wallpaper, etc.

[0122] Figure 1B This paper shows a schematic diagram of the device configuration of another electronic device 100 provided in an embodiment of this application.

[0123] like Figure 1B As shown, the electronic device 100 can be a watch 20, which may include a watch strap 21 and a movement 22. The movement 22 may be equipped with a display screen 23. Optionally, the movement 22 may also be equipped with one or more buttons, such as a crown 24. The display screen 23 can switch images.

[0124] Understandable, Figure 1A-Figure 1B The embodiments shown are merely two examples. In the embodiments of this application, the electronic device 100 can be... Figure 1A The phone 10 shown could also be Figure 1B The watch 20 shown can also be other types of electronic devices with a display screen, such as computers, wristbands, smart glasses, and laptops. This application does not limit the type or form of the electronic device.

[0125] The hardware structure of an electronic device 100 provided in the embodiments of this application is described below.

[0126] Figure 1C This illustration shows a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of this application.

[0127] Electronic device 100 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device. The embodiments of this application do not impose any special restrictions on the specific type of electronic device.

[0128] Electronic device 100 may include a processor 110, internal memory 121, charging management module 140, power management module 141, battery 142, wireless communication module 160, sensor module 180, and display screen 194, etc. Optionally, electronic device 100 may also include any one or more of the following: external memory interface 120, universal serial bus (USB) interface 130, antenna 1, antenna 2, mobile communication module 150, audio module 170, buttons 190, motor 191, indicator 192, camera 193, etc.

[0129] The sensor module 180 may include a touch sensor 180K. Optionally, the sensor module 180 may include any one or more of the following: a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an accelerometer, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, etc.

[0130] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0131] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0132] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0133] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

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

[0135] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.

[0136] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0137] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0138] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

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

[0140] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0141] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0142] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0143] The wireless communication module 160 can provide solutions for wireless communication applied to the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), NearLink, and intrabody communication (IBC). For example, when two electronic devices communicate using an intrabody communication scheme, both electronic devices have at least one electrode that contacts the skin, and the two electronic devices send and receive information through the human body via this skin-contact electrode. The wireless communication module 160 can be one or more devices integrating at least one communication processing module.

[0144] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0145] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0146] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), or it can be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), minimized LEDs, microLEDs, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0147] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).

[0148] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.

[0149] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.

[0150] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.

[0151] Electronic device 100 can implement audio functions through audio module 170 and application processor, such as music playback and recording. Audio module 170 may include one or more of the following: speaker 170A, receiver 170B, microphone 170C, etc.

[0152] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0153] The loudspeaker 170A, also known as a "loudspeaker", is used to convert audio electrical signals into sound signals.

[0154] The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals.

[0155] The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.

[0156] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0157] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0158] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0159] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0160] This application provides an image switching method applied to an electronic device 100 with a display screen. The display screen of the electronic device 100 can display an image P1. The electronic device 100 can determine the area where the main subject (also called the foreground of the image) of image P1 is located (also called the main subject area C1) and the area where the background is located (also called the background area C2). The electronic device 100 can acquire the switched image P2 and determine the area where the main subject of image P2 is located (also called the main subject area C3) and the area where the background is located (also called the background area C4). The electronic device 100 can determine the area division of the display screen based on the main subject area C1, background area C2, main subject area C3, and background area C4. The display screen can include any one or more of the following: area D1, area D2, area D3, and area D4. Area D1 is the overlapping area of ​​background area C2 and background area C4; area D4 is the overlapping area of ​​main subject area C1 and main subject area C3; area D2 is the area belonging to main subject area C1 but not to main subject area C3; and area D3 is the area belonging to main subject area C3 but not to main subject area C1. The electronic device 100 can determine the switching priority and switching method of each area, and switch the image P1 on the display screen to image P2 based on the switching priority and switching method of each area.

[0161] In this way, the electronic device 100 can determine the switching order and switching method of images in different areas based on the display position of the main subject in the images before and after the switch, making the image switching more natural and smooth, and bringing a better visual experience to the user.

[0162] The following describes the switching logic of an image switching method provided in an embodiment of this application.

[0163] Figures 2A-2E A schematic diagram illustrating the switching logic of a set of image switching methods provided in an embodiment of this application is shown.

[0164] like Figure 2A As shown, the image P1 before the switch can be Figure 2A The image shown. In Figure 2A In the illustrated embodiment, image P1 may include a subject A1 and a background A2, wherein the subject A1 may be displayed on the background A2. Image P1 can be divided into regions based on the display area of ​​the subject A1 on the screen, determining the subject region and background region of image P1, as shown in the figure. Figure 2B As shown.

[0165] like Figure 2BAs shown, the image P1 before the switch can include a main body area C1 and a background area C2. The main body area C1 refers to the display area of ​​the main body A1 when image P1 is displayed on the screen. The background area C2 refers to all display areas of image P1 other than the display area of ​​the main body A1 when image P1 is displayed on the screen. That is, the main body area C1 and the background area C2 do not overlap.

[0166] like Figure 2C As shown, the switched image P2 can be Figure 2C The image shown. In Figure 2C In the illustrated embodiment, image P2 may include a subject B1 and a background B2, wherein the subject B1 may be displayed on the background B2. Image P2 can be divided into regions based on the display area of ​​the subject B1 on the screen, determining the subject region and background region of image P2, as shown in the figure. Figure 2D As shown.

[0167] like Figure 2D As shown, the switched image P2 can include a main body area C3 and a background area C4. The main body area C3 refers to the display area of ​​the main body B1 when image P2 is displayed on the screen. The background area C4 refers to all display areas of image P2 other than the display area of ​​the main body B1 when image P2 is displayed on the screen. That is, the main body area C3 and the background area C4 do not overlap.

[0168] Based on the region segmentation results of the images before and after the switching, we can obtain the following: Figure 2E The switching area division results are shown in the switching process.

[0169] like Figure 2E As shown, during the switching process, the display screen may include any one or more of the following areas: area D1, area D2, area D3, and area D4. Area D1 is the overlapping area of ​​background area C2 and background area C4; area D4 is the overlapping area of ​​main area C1 and main area C3; area D2 belongs to main area C1 but not to main area C3; and area D3 belongs to main area C3 but not to main area C1.

[0170] After determining the switching area, the electronic device 100 can set different switching priorities and switching methods for different areas, and switch the image P1 displayed on the screen to image P2 based on the set switching priorities and switching methods.

[0171] Understandable, Figures 2A-2E This application merely illustrates the switching logic of the image switching method provided in the embodiments of this application. In the embodiments of this application, the division result of the switching region can also be the same as described above. Figure 2E The embodiments shown differ from those described above, for example including those that are different from those described above. Figure 2E The embodiments shown may have more or fewer switching areas than those described above, and this application does not limit the scope of the embodiments.

[0172] The following describes the specific process of an image switching method provided in an embodiment of this application.

[0173] Figure 3 A flowchart illustrating an image switching method provided in an embodiment of this application is shown.

[0174] like Figure 3 As shown, the specific process of an image switching method provided in this application embodiment may include the following steps:

[0175] S301. Electronic device 100 displays the image P1 before switching on the display screen.

[0176] S302. Electronic device 100 determines the main body region C1 and background region C2 of image P1 based on a saliency detection algorithm.

[0177] The electronic device 100 may store one or more saliency detection algorithms. These algorithms can detect the subject and background of an image and determine the subject region C1 and background region C2 of image P1 based on the regions where the subject and background are located. When the input to the saliency detection algorithm includes image P1, the output may include the subject region C1 and background region C2 of image P1.

[0178] In some embodiments, the electronic device 100 may determine the main body region C1 and the background region C2 of image P1 based on a saliency detection algorithm before step S301. In other embodiments, the electronic device 100 may also determine the main body region C1 and the background region C2 of image P1 based on a saliency detection algorithm after step S301, which is not limited herein.

[0179] It should be noted that image P1 may include one or more subjects.

[0180] In some embodiments, the collection of regions containing one or more subjects in image P1 may be referred to as subject region C1.

[0181] In other embodiments, if image P1 includes multiple subjects, the collection of regions occupied by each subject in image P1 can be called subject region C1. Furthermore, subject region C1 in image P1 can also be divided into multiple subject sub-regions based on the regions where each subject is located; that is, the region where each subject is located can be called a subject sub-region.

[0182] S303. Electronic device 100 acquires the switched image P2.

[0183] In some embodiments, the electronic device 100 may acquire the switched image P2 when it detects that the switching conditions are met. The switching conditions may include, but are not limited to, any one or more of the following: receiving a user's switching operation; detecting that the current time has reached a preset switching time; detecting that the duration between the current time and the previous switching time has reached a preset duration; receiving a switching instruction sent by another electronic device, the switching instruction being used to instruct the electronic device 100 to switch the currently displayed image, etc.

[0184] For example, taking the scenario of switching from an always-on wallpaper to a lock screen wallpaper as an example, when the electronic device 100 is displaying an always-on wallpaper, it can determine that the switching conditions are met when it receives an operation from the user to turn on the screen (such as pressing the power button), and determine that the switched image P2 is the lock screen wallpaper.

[0185] For example, taking the scenario of switching from an always-on wallpaper to a desktop wallpaper as an example, when the electronic device 100 is displaying an always-on wallpaper, it can determine that the switching conditions are met when it receives a user's unlocking operation (such as a fingerprint unlocking operation), and determine that the switched image P2 is the desktop wallpaper.

[0186] For example, taking the scenario of switching from lock screen wallpaper to desktop wallpaper as an example, when the electronic device 100 is displaying lock screen wallpaper, it can determine that the switching conditions are met when it receives the user's unlocking operation (such as fingerprint unlocking operation), and determine that the switched image P2 is the desktop wallpaper.

[0187] It is understood that the embodiments described here are only three examples. In the embodiments of this application, the image switching scenarios may also include more scenarios than those described above or different from those described above. Furthermore, the switching conditions and the images after switching may also be different from those described above. This application does not limit these scenarios here.

[0188] S304. Electronic device 100 determines the main body region C3 and background region C4 of image P2 based on a saliency detection algorithm.

[0189] The specific method by which electronic device 100 determines the main body region C3 and background region C4 of image P2 based on the saliency detection algorithm can be referred to the relevant description in step S302 above, and will not be repeated here.

[0190] In some embodiments, the electronic device 100 may perform step S304 after determining the switched image P2, to determine the main body region C3 and the background region C4 of the image P2.

[0191] In other embodiments, the electronic device 100 may also determine the main body region C3 and the background region C4 of image P2 before performing step S303. For example, taking image P2 as wallpaper (e.g., desktop wallpaper, always-on wallpaper, lock screen wallpaper, etc.), the electronic device 100 may determine the main body region C3 and the background region C4 of image P2 based on a saliency detection algorithm after setting image P2 as wallpaper. In this case, the electronic device 100 may read the main body region C3 and the background region C4 of image P2 from memory when determining that the switched image is image P2.

[0192] S305. Electronic device 100 determines the switching area in the display screen.

[0193] The electronic device 100 can determine the switching area in the display screen based on the main body area C1 and background area C2 of image P1, and the main body area C3 and background area C4 of image P2.

[0194] The display screen may include any one or more of the following: area D1, area D2, area D3, and area D4. Area D1 is the overlapping area of ​​background area C2 and background area C4, area D4 is the overlapping area of ​​main area C1 and main area C3, area D2 is the area that belongs to main area C1 but not to main area C3, and area D3 is the area that belongs to main area C3 but not to main area C1.

[0195] In some embodiments, the main area C1 and the main area C3 may have overlapping areas, and the main areas C1 and C3 do not contain each other. In this case, the display screen may include four switching areas, namely the aforementioned areas D1, D2, D3, and D4.

[0196] In other embodiments, the main area C1 may include the main area C3. In this case, the display screen may include three switching areas, namely the aforementioned areas D1, D2 and D4.

[0197] In some other embodiments, the main area C3 may include the main area C1. In this case, the display screen may include three switching areas, namely the aforementioned areas D1, D3 and D4.

[0198] In other embodiments, the main area C1 and the main area C3 completely overlap. In this case, the display screen may include two switching areas, namely the aforementioned area D1 and area D4.

[0199] In another possible implementation, the electronic device 100 may further divide a switching area into one or more switching sub-areas. In some embodiments, one or more switching sub-areas within the same switching area may be configured with the same switching priority and switching method. In other embodiments, one or more switching sub-areas within the same switching area may be configured with different switching priorities and switching methods, which are not limited herein.

[0200] In some embodiments, image P1 may include multiple subjects, and / or image P2 may include multiple subjects. In this case, electronic device 100 may divide the same switching area into multiple switching sub-areas based on the display area occupied by the multiple subjects in image P1 and / or image P2. Specific examples can be found below. Figures 8A-8C The relevant details in the illustrated embodiments will not be described in detail here.

[0201] In other embodiments, the electronic device 100 may also divide the area occupied by the background into multiple sub-background areas and the switching area D1 into multiple switching sub-areas based on the different colors (e.g., color intensity) of different areas in the background of image P1 and / or, based on the different colors of different areas in the background of image P2.

[0202] In other embodiments, the electronic device 100 may also divide the area occupied by the subject into multiple subject sub-regions based on different parts of the subject, and then determine multiple switching sub-regions in the switching region based on the subject sub-regions. For example, taking a person as an example, the person's clothes, hairstyle, torso, etc. can be divided into different subject sub-regions, and the switching region can be determined based on the different subject sub-regions.

[0203] It is understood that the above embodiments are only three examples. In the embodiments of this application, the electronic device 100 may also determine the division of the switching sub-region in the switching area based on factors different from those in the above embodiments. This application does not limit this.

[0204] S306. Electronic device 100 determines the switching priority and switching method for each switching area in the display screen.

[0205] After determining the division of the switching areas on the display screen, the electronic device 100 can set the switching priority (also known as the switching order) and switching method for each switching area. The higher the switching priority (the earlier the switching order), the sooner the electronic device 100 will switch the portion of image P1 displayed in that switching area to the corresponding portion of image P2.

[0206] For example, if the switching areas include area D1, area D2, area D3 and area D4, then the switching priorities from high to low are: area D1, area D4, area D2 and area D3.

[0207] For example, if the switching areas include area D1, area D2 and area D4, then the switching priorities from high to low are: area D4, area D2 and area D1.

[0208] It is understood that the above embodiments are just two examples. In the embodiments of this application, the electronic device 100 may also be set with a different switching priority than the above embodiments. This application does not limit this.

[0209] In some embodiments, the switching mode may include, but is not limited to, any one or more of the following: shrink, expand, mesh, fade, fly out, fly in, split, rotate, bounce, float in, float out, etc.

[0210] S307. Electronic device 100 switches image P1 on the display screen to image P2 based on the switching priority and switching method of each switching area.

[0211] After determining the switching priority and switching method for each switching area, the electronic device 100 can switch the image P1 displayed on the screen to image P2 based on the switching priority and switching method of each switching area.

[0212] For example, if the switching areas include areas D1, D2, D3, and D4, and the switching priorities from high to low are: areas D1, D4, D2, and D3, and the switching method for area D1 is fade-out, while the switching methods for areas D2, D3, and D4 are all grid, then, in the process of switching image P1 displayed on the screen to image P2, the electronic device 100 can first use a fade-out method to switch the elements of image P1 displayed in area D1 to the elements of image P2; then, the electronic device 100 can use a grid switching method to switch the elements of image P1 displayed in area D4 to the elements of image P2; then, the electronic device 100 can use a grid switching method to switch the elements of image P1 displayed in area D2 to the elements of image P2; and finally, the electronic device 100 can use a grid switching method to switch the elements of image P1 displayed in area D3 to the elements of image P2.

[0213] It is understood that the embodiments described here are merely examples. In the embodiments of this application, the electronic device 100 may also be configured with different switching priorities and switching methods than those described above, and the division results of the switching area may also be different from those described above. This application does not limit these aspects here.

[0214] The image switching method provided in this application can divide different switching areas based on the images before and after the switch, and set different switching priorities and switching methods for different switching areas, thereby achieving a more natural and smoother switch, reducing the user's awareness of image switching, and providing the user with a better visual experience.

[0215] The image switching method provided in the embodiments of this application is described below in conjunction with specific application scenarios.

[0216] In some application scenarios, the display area occupied by the main body of image P1 does not overlap with the display area occupied by the main body of image P2. That is, during the switching process, the switching area of ​​the display screen can include area D1, area D2, and area D3, but not area D4. In this case, when the electronic device 100 switches image P1 to image P2 on the display screen, it can use different switching methods and switching sequences for the aforementioned areas D1, D2, and D3 respectively.

[0217] For example, such as Figure 4A As shown, the image P1 before switching can include a subject 41 and a background 42.

[0218] like Figure 4B As shown, the switched image P2 can include a subject 43 and a background 44.

[0219] During the switching process, the result of the switching area division on the display screen can be referenced as follows: Figure 4C The illustrated embodiment.

[0220] like Figure 4C As shown, the switching area of ​​the display screen may include area D1, area D2 and area D3, that is, the display areas of the main body 41 and the main body 43 do not overlap.

[0221] The images before and after the switch are as described above. Figure 4A and Figure 4B Taking the image shown as an example, Figure 4D-Figure 4G This illustration shows a switching process for switching image P1 to image P2 according to an embodiment of this application.

[0222] like Figure 4D As shown, the electronic device 100 can switch the background 42 displayed in region D1 to background 44, and compress the main body 41 displayed in region D2 upwards, displaying main body 41a in region D2. Main body 41a is the compressed main body 41. The electronic device 100 can also display a portion of the main body 43 in region D3, namely main body 43a. Main body 43a can be obtained by expanding upwards from the lower edge of region D3. For example, in Figure 4DIn the embodiment shown, the display area of ​​the main body 41a can be 75% of the display area of ​​the main body 41 in image P1, and the display area of ​​the main body 43a can be 25% of the display area of ​​the main body 43 in image P2.

[0223] After that, as Figure 4E As shown, the electronic device 100 can continue to compress the main body 41a in region D2 upwards to obtain the main body 41b; simultaneously, the electronic device 100 can expand the main body 43a displayed in region D3 upwards to obtain the main body 43b. For example, in... Figure 4E In the illustrated embodiment, the display area of ​​the main body 41b can be 50% of the display area of ​​the main body 41 in image P1, and the display area of ​​the main body 43b can be 50% of the display area of ​​the main body 43 in image P2.

[0224] After that, as Figure 4F As shown, the electronic device 100 can continue to compress the main body 41b in region D2 upwards to obtain the main body 41c; simultaneously, the electronic device 100 can expand the main body 43b displayed in region D3 upwards to obtain the main body 43c. For example, in... Figure 4F In the illustrated embodiment, the display area of ​​the main body 41c can be 25% of the display area of ​​the main body 41 in image P1, and the display area of ​​the main body 43c can be 75% of the display area of ​​the main body 43 in image P2.

[0225] Finally, as Figure 4G As shown, the electronic device 100 can compress the display area of ​​the subject 41 in region D2 to 0 and expand the display area of ​​the subject 43 displayed in region D3 to the entire region D3, that is, display the image P2 on the display screen.

[0226] In this way, by first switching the background in region D1, then gradually compressing the subject 41 in region D2, and at the same time gradually expanding the subject 43 in region D3, the switching from image P1 to image P2 can be achieved, improving the smoothness of image switching and giving users a better visual experience.

[0227] Understandable, Figure 4D-Figure 4G The embodiment shown is only an example. In the embodiments of this application, the display ratio of the main body 41 and the main body 43 during the switching process can also be other ratios, and the switching method and switching priority can also be different from the above embodiments. This application does not limit them here.

[0228] In other embodiments, the electronic device 100 may also use different switching sequences (also known as switching priorities) and switching methods to complete image switching.

[0229] For example, the images before and after the switch are as described above. Figure 4A and Figure 4BTaking the image shown as an example, Figure 4D-Figure 4G This illustration shows another switching process for switching image P1 to image P2 provided in an embodiment of this application.

[0230] like Figure 4H As shown, the electronic device 100 can compress the main body 41 displayed in region D2, centered on the upper left corner of region D2, towards the upper left corner to obtain main body 41d, which is the compressed main body 41; the electronic device 100 can also display a portion of the main body 43 (i.e., main body 43d) in region D3, which can be obtained by expanding the main body 43 towards the lower right corner, centered on the upper left corner of region D3. For example, in... Figure 4H In the illustrated embodiment, the display area of ​​the main body 41d can be 60% of the display area of ​​the main body 41 in image P1, and the display area of ​​the main body 43d can be 30% of the display area of ​​the main body 43 in image P2.

[0231] After that, as Figure 4I As shown, the electronic device 100 can continue to compress the main body 41d in the upper left corner region D2 to obtain the main body 41e; simultaneously, the electronic device 100 can continue to expand the main body 43d displayed in the upper right corner region D3 to obtain the main body 43e. For example, in... Figure 4I In the illustrated embodiment, the display area of ​​the main body 41e can be 40% of the display area of ​​the main body 41 in image P1, and the display area of ​​the main body 43e can be 60% of the display area of ​​the main body 43 in image P2.

[0232] After that, as Figure 4J As shown, the electronic device 100 can further compress the main body 41e in region D2 to obtain the main body 41f; simultaneously, the electronic device 100 can expand the main body 43e displayed in region D3 to obtain the main body 43f. For example, in... Figure 4J In the illustrated embodiment, the display area of ​​the main body 41f can be 20% of the display area of ​​the main body 41 in image P1, and the display area of ​​the main body 43f can be 80% of the display area of ​​the main body 43 in image P2.

[0233] Finally, as Figure 4K As shown, the electronic device 100 can compress the display area of ​​the subject 41 in region D2 to 0, and expand the display area of ​​the subject 43 displayed in region D3 to the entire region D3. Furthermore, the electronic device 100 can also switch the background 42 in region D1 to background 44. That is, it displays image P2 on the screen.

[0234] This improves the smoothness of image switching and provides users with a better visual experience.

[0235] Understandable, Figures 4H-4KThe embodiment shown is only an example. In the embodiments of this application, the display ratio of the main body 41 and the main body 43 during the switching process can also be other ratios, and the switching method and switching priority can also be different from the above embodiments. This application does not limit them here.

[0236] In some application scenarios, the display area occupied by the main body of image P2 includes the entire display area occupied by the main body of image P1. That is, the switching area of ​​the display screen during the switching process can include area D1, area D3, and area D4, but not area D2. In this case, when the electronic device 100 switches image P1 to image P2 on the display screen, it can use different switching methods and switching sequences for the aforementioned areas D1, D3, and D4 respectively.

[0237] For example, such as Figure 5A As shown, the image P1 before switching can include a subject 51 and a background 52.

[0238] like Figure 5B As shown, the switched image P2 can include a subject 53 and a background 54.

[0239] During the switching process, the result of the switching area division on the display screen can be referenced as follows: Figure 5C The illustrated embodiment.

[0240] like Figure 5C As shown, the switching area of ​​the display screen may include area D1, area D3 and area D4, that is, the display area of ​​the main body 53 includes the entire display area of ​​the main body 51.

[0241] The images before and after the switch are as described above. Figure 5A and Figure 5B Taking the image shown as an example, Figure 5D-Figure 5G This illustration shows a switching process for switching image P1 to image P2 according to an embodiment of this application.

[0242] like Figure 5D As shown, the electronic device 100 can compress the main body 51 displayed in region D4 to the lower right, centered on the lower right corner of region D2, to obtain main body 51a; the electronic device 100 can also display a portion (i.e., main body 53a) of the main body 53 in regions D3 and D4, which can be obtained by expanding from the upper left corner of region D3 to the lower right corner. For example, in... Figure 5D In the illustrated embodiment, the display area of ​​the main body 51a can be 80% of the display area of ​​the main body 51 in image P1, and the display area of ​​the main body 53a can be 10% of the display area of ​​the main body 53 in image P2.

[0243] After that, as Figure 5EAs shown, the electronic device 100 can continue to compress the main body 51a in the lower right corner of region D4 to obtain the main body 53b; simultaneously, the electronic device 100 can continue to expand the main body 53a to the lower right in regions D3 and D4 to obtain the main body 53b. Furthermore, the electronic device 100 can also switch the background 52 in region D1 to background 54. For example, in... Figure 5E In the illustrated embodiment, the display area of ​​the main body 51b can be 60% of the display area of ​​the main body 51 in image P1, and the display area of ​​the main body 53b can be 30% of the display area of ​​the main body 53 in image P2.

[0244] After that, as Figure 5F As shown, the electronic device 100 can continue to compress the main body 51b in the lower right region D4 to obtain the main body 51c; simultaneously, the electronic device 100 can continue to expand the main body 53b in regions D3 and D4 to the lower right to obtain the main body 53c. For example, in... Figure 5F In the illustrated embodiment, the display area of ​​the main body 51c can be 25% of the display area of ​​the main body 51 in image P1, and the display area of ​​the main body 53c can be 65% of the display area of ​​the main body 53 in image P2.

[0245] Finally, as Figure 5G As shown, the electronic device 100 can compress the display area of ​​the main body 51 in region D4 to 0, and expand the display area of ​​the main body 53 displayed in region D3 to the entire region D3 and region D4, that is, display the image P2 on the display screen.

[0246] This improves the smoothness of image switching and provides users with a better visual experience.

[0247] Understandable, Figure 5D-Figure 5G The embodiment shown is only an example. In the embodiments of this application, the display ratio of the main body 51 and the main body 53 during the switching process can also be other ratios, and the switching method and switching priority can also be different from the above embodiments. This application does not limit them here.

[0248] In other embodiments, the electronic device 100 may also use different switching sequences (also known as switching priorities) and switching methods to complete image switching.

[0249] For example, the images before and after the switch are as described above. Figure 5A and Figure 5B Taking the image shown as an example, Figures 5H-5K This illustration shows another switching process for switching image P1 to image P2 provided in an embodiment of this application.

[0250] like Figure 5HAs shown, the electronic device 100 can compress the main body 51 displayed in region D4, centered on the lower right corner of region D4, to obtain main body 51d; the electronic device 100 can also display main body 53a in the entire region D3. It should be noted that main body 53 can expand as main body 51 is compressed in region D4; that is, during the compression of main body 51, the display area of ​​main body 51 in region D4 gradually decreases, while the display area of ​​main body 53 in region D4 gradually increases. For example, in… Figure 5H In the illustrated embodiment, the display area of ​​the main body 51d can be 80% of the display area of ​​the main body 51 in image P1, and the display area of ​​the main body 53d can be 30% of the display area of ​​the main body 53 in image P2.

[0251] After that, as Figure 5I As shown, the electronic device 100 can continue to compress the main body 51d in the lower right corner region D4 to obtain the main body 51e; simultaneously, the electronic device 100 can expand the main body 53d in region D4 to obtain the main body 53e. For example, in... Figure 5I In the illustrated embodiment, the display area of ​​the main body 51e can be 50% of the display area of ​​the main body 51 in image P1, and the display area of ​​the main body 53e can be 70% of the display area of ​​the main body 53 in image P2.

[0252] After that, as Figure 5J As shown, the electronic device 100 can further compress the main body 51e in region D4 to obtain the main body 51f; simultaneously, the electronic device 100 can expand the main body 53e in region D4 to obtain the main body 53f. Furthermore, the electronic device 100 can switch the background 52 displayed in region D1 to background 54. For example, in... Figure 5J In the illustrated embodiment, the display area of ​​the main body 51f can be 20% of the display area of ​​the main body 51 in image P1, and the display area of ​​the main body 53f can be 90% of the display area of ​​the main body 53 in image P2.

[0253] Finally, as Figure 5K As shown, the electronic device 100 can compress the display area of ​​the main body 51 in region D4 to 0, and expand the display area of ​​the main body 53 to all display areas of region D3 and region D4.

[0254] This improves the smoothness of image switching and provides users with a better visual experience.

[0255] Understandable, Figures 5H-5K The embodiment shown is only an example. In the embodiments of this application, the display ratio of the main body 51 and the main body 53 during the switching process can also be other ratios, and the switching method and switching priority can also be different from the above embodiments. This application does not limit them here.

[0256] In some application scenarios, the display area occupied by the main body of image P1 includes the entire display area occupied by the main body of image P2. That is, the switching area of ​​the display screen during the switching process can include area D1, area D2, and area D4, but not area D3. In this case, when the electronic device 100 switches image P1 to image P2 on the display screen, it can use different switching methods and switching sequences for the aforementioned areas D1, D2, and D4 respectively.

[0257] For example, such as Figure 6A As shown, the image P1 before switching can include a subject 61 and a background 62.

[0258] like Figure 6B As shown, the switched image P2 can include a subject 63 and a background 64.

[0259] During the switching process, the result of the switching area division on the display screen can be referenced as follows: Figure 6C The illustrated embodiment.

[0260] like Figure 6C As shown, the switching area of ​​the display screen may include area D1, area D2 and area D4, that is, the display area of ​​the main body 61 includes the entire display area of ​​the main body 63.

[0261] The images before and after the switch are as described above. Figure 6A and Figure 6B Taking the image shown as an example, Figures 6D-6G This illustration shows a switching process for switching image P1 to image P2 according to an embodiment of this application.

[0262] like Figure 6D As shown, the electronic device 100 can display a main body 61a. The display area of ​​the main body 61a includes region D2 and a portion of region D4. In region D4, the electronic device 100 displays an expanding main body 63a, and as the main body 63a expands, the display area of ​​the main body 61a in region D4 decreases; that is, as the display area of ​​the main body 63a in region D4 increases, the display area of ​​the main body 61a in region D4 decreases. For example, in region D4, the main body 63a can be obtained by expanding the main body 63a downwards from the upper edge of region D4. For example, in… Figure 6D In the embodiment shown, the display area of ​​the main body 61a can be 90% of the display area of ​​the main body 61 in image P1, and the display area of ​​the main body 63a can be 10% of the display area of ​​the main body 63 in image P2.

[0263] After that, as Figure 6EAs shown, the electronic device 100 can continue to expand the main body 63a downwards within region D4 to obtain the main body 63b; simultaneously, the electronic device 100 can reduce the display area of ​​the main body 61a within region D4 to obtain the main body 61b. For example, in... Figure 6E In the illustrated embodiment, the display area of ​​the main body 61b can be 85% of the display area of ​​the main body 61 in image P1, and the display area of ​​the main body 63b can be 40% of the display area of ​​the main body 63 in image P2.

[0264] After that, as Figure 6F As shown, the electronic device 100 can continue to expand the main body 63b downwards in region D4 to obtain the main body 63c; simultaneously, the electronic device 100 can reduce the display area of ​​the main body 61b in region D4 to obtain the main body 61c. For example, in... Figure 6F In the illustrated embodiment, the display area of ​​the main body 61c can be 30% of the display area of ​​the main body 61 in image P1, and the display area of ​​the main body 63c can be 100% of the display area of ​​the main body 63 in image P2.

[0265] Finally, as Figure 6G As shown, the electronic device 100 can switch the subject 61 in region D2 to the background 64, and switch the background 62 in region D1 to the background 64. That is, it displays image P2 on the display screen.

[0266] This improves the smoothness of image switching and provides users with a better visual experience.

[0267] Understandable, Figures 6D-6G The embodiment shown is only an example. In the embodiments of this application, the display ratio of the main body 61 and the main body 63 during the switching process can also be other ratios, and the switching method and switching priority can also be different from the above embodiments. This application does not limit them here.

[0268] In other embodiments, the electronic device 100 may also use different switching sequences (also known as switching priorities) and switching methods to complete image switching.

[0269] For example, the images before and after the switch are as described above. Figure 6A and Figure 6B Taking the image shown as an example, Figures 6H-6K This illustration shows another switching process for switching image P1 to image P2 provided in an embodiment of this application.

[0270] like Figure 6HAs shown, the electronic device 100 can switch the background 62 displayed in area D1 to background 64, switch a portion of the main subject 61 displayed in area D4 to main subject 63, and keep the main subject 61d displayed in area D2 unchanged. Main subject 61d is the portion of the main subject 61 displayed in area D2.

[0271] After that, as Figure 6I As shown, the electronic device 100 can gradually increase the transparency of the subject 61d in region D2, revealing the subject 61e. For example, in... Figure 6I In the illustrated embodiment, the transparency of the main body 61e in region D2 can be 30%. Furthermore, the main body 63 can be displayed in region D4.

[0272] After that, as Figure 6J As shown, the electronic device 100 can further increase the transparency of the subject 61e in region D2, revealing the subject 61f. For example, in... Figure 6J In the illustrated embodiment, the transparency of the main body 61e in region D2 can be 80%. Furthermore, the main body 63 can be displayed in region D4.

[0273] Finally, as Figure 6K As shown, the electronic device 100 can display the background 64 in region D2 when the transparency of the main body 61 in region D2 is increased to 100%. That is, it displays the image P2 on the display screen.

[0274] This improves the smoothness of image switching and provides users with a better visual experience.

[0275] Understandable, Figures 6H-6K The embodiment shown is just an example. In the embodiments of this application, the transparency of the main body 61 during the switching process can also be other values, and the switching method and switching priority can also be different from the above embodiments. This application does not limit it here.

[0276] In some application scenarios, the display area occupied by the main subject of image P2 overlaps with the display area occupied by the main subject of image P1. Furthermore, the display area occupied by the main subject of image P2 cannot encompass the entire display area occupied by the main subject of image P1, and vice versa. That is, the switching areas of the display screen during the switching process can include areas D1, D2, D3, and D4. In this case, when switching image P1 to image P2 on the display screen, the electronic device 100 can employ different switching methods and sequences for areas D1, D2, D3, and D4 respectively.

[0277] For example, such as Figure 7A As shown, the image P1 before switching can include a subject 71 and a background 72.

[0278] like Figure 7B As shown, the switched image P2 can include a subject 73 and a background 74.

[0279] During the switching process, the result of the switching area division on the display screen can be referenced as follows: Figure 7C The illustrated embodiment.

[0280] like Figure 7C As shown, the switching area of ​​the display screen may include area D1, area D2, area D3 and area D4. That is, the display area of ​​the main body 73 and the entire display area of ​​the main body 71 have overlapping areas, but do not include each other.

[0281] The images before and after the switch are as described above. Figure 7A and Figure 7B Taking the image shown as an example, Figures 7D-7G This illustration shows a switching process for switching image P1 to image P2 according to an embodiment of this application.

[0282] like Figure 7D As shown, the electronic device 100 can switch the portion of the main body 71 originally displayed in region D4 to the main body 73a, where the main body 73 is the portion of the main body 73 displayed in region D4. Simultaneously, the remaining portion of the main body 71, i.e., main body 71a, can also be displayed in region D2. Then, the electronic device 100 can expand the display of the main body 73a to the right of region D3, starting from the boundary line between region D4 and region D3. Simultaneously, the electronic device 100 can also compress the main body 71a in region D2 towards the location of the boundary line between region D4 and region D2 (i.e., to the right). For example, in... Figure 7D In the illustrated embodiment, the display area of ​​the main body 71a can be 50% of the display area of ​​the main body 71 in image P1, and the display area of ​​the main body 73a can be 50% of the display area of ​​the main body 73 in image P2.

[0283] After that, as Figure 7E As shown, the electronic device 100 can continue to compress the main body 71a in region D2 to the right, resulting in main body 71b; simultaneously, the electronic device 100 can expand the main body 73a displayed in region D3 to the right, resulting in main body 73b. For example, in... Figure 7E In the illustrated embodiment, the display area of ​​the main body 71b can be 30% of the display area of ​​the main body 71 in image P1, and the display area of ​​the main body 73b can be 70% of the display area of ​​the main body 73 in image P2.

[0284] After that, as Figure 7FAs shown, the electronic device 100 can continue to compress the main body 71b in region D2 to the right, resulting in main body 71c; simultaneously, the electronic device 100 can expand the main body 73b displayed in region D3 to the right, resulting in main body 73c. ​​For example, in... Figure 7F In the illustrated embodiment, the display area of ​​the main body 71c can be 10% of the display area of ​​the main body 71 in image P1, and the display area of ​​the main body 73c can be 90% of the display area of ​​the main body 73 in image P2.

[0285] Finally, as Figure 7G As shown, the electronic device 100 can compress the display area of ​​the subject 71 in region D2 to 0, and expand the display area of ​​the subject 73 displayed in region D3 to the entire region D3. Furthermore, the electronic device 100 can also switch the background 72 displayed in region D1 to background 74. That is, it displays image P2 on the screen.

[0286] This improves the smoothness of image switching and provides users with a better visual experience.

[0287] Understandable, Figures 7D-7G The embodiment shown is just an example. In the embodiments of this application, the display ratio of the main body 71 and the main body 73 during the switching process can also be other ratios, and the switching method and switching priority can also be different from the above embodiments. This application does not limit them here.

[0288] In other embodiments, the electronic device 100 may also use different switching sequences (also known as switching priorities) and switching methods to complete image switching.

[0289] For example, the images before and after the switch are as described above. Figure 7A and Figure 7B Taking the image shown as an example, Figures 7H-7K This illustration shows another switching process for switching image P1 to image P2 provided in an embodiment of this application.

[0290] like Figure 7H As shown, the electronic device 100 can display a portion of the main body 73 (i.e., main body 73d) in region D4, which can be obtained by extending downwards from the upper edge of region D4. Furthermore, region D2 can retain its original content, i.e., displaying main body 71d, which is a portion of main body 71. Region D1 can display the background 72. For example, in... Figure 7H In the illustrated embodiment, the display area of ​​the main body 71d can be 75% of the display area of ​​the main body 71 in image P1, and the display area of ​​the main body 73d can be 25% of the display area of ​​the main body 73 in image P2.

[0291] After that, as Figure 7IAs shown, the electronic device 100 can continue to extend the main body 73d downwards in region D4 until it occupies the entire region D4, resulting in main bodies 73e and 71e. For example, in... Figure 7I In the illustrated embodiment, the display area of ​​the main body 71e can be 50% of the display area of ​​the main body 71 in image P1, and the display area of ​​the main body 73e can be 50% of the display area of ​​the main body 73 in image P2.

[0292] After that, as Figure 7J As shown, the electronic device 100 can switch the background 72 displayed in region D1 and the subject 71 displayed in region D3 to the background 74. While maintaining the display of the subject 73e, the subject 71e is compressed to a display area of ​​zero. For example, in Figure 7J In the embodiment shown, the display area of ​​the main body 71 is 0, and the display area of ​​the main body 73e can be 50% of the display area of ​​the main body 73 in the image P2.

[0293] Finally, as Figure 7K As shown, the electronic device 100 can expand the main body 73e in region D4 towards region D3, that is, expand to the right, until the main body 73 occupies all regions in both regions D4 and D3. This results in the display of image P2 on the screen.

[0294] This improves the smoothness of image switching and provides users with a better visual experience.

[0295] Understandable, Figures 7H-7K The embodiment shown is just an example. In the embodiments of this application, the display ratio of the main body 71 and the main body 73 during the switching process can also be other ratios, and the switching method and switching priority can also be different from the above embodiments. This application does not limit them here.

[0296] In other application scenarios, the image P1 before switching may include multiple subjects, and / or the image P2 after switching may also include multiple subjects. The electronic device 100 can consider the display area occupied by multiple subjects in the same image as a switching area; optionally, it can further subdivide the switching area into multiple sub-areas. The electronic device 100 can determine the switching priority and switching method of each switching area. In the presence of sub-areas, the electronic device 100 can also determine the switching priority and switching method of each sub-area within the same switching area.

[0297] In this way, even when there are multiple subjects, the electronic device 100 can also use the above image switching method to complete the image switching, ensuring the smoothness of the image switching and bringing a better visual experience to the user.

[0298] For example, such as Figure 8AAs shown, the image P1 before switching may include subject 81a and subject 81b, and also includes background 82. The display areas of subject 81a and subject 81b do not overlap.

[0299] like Figure 8B As shown, the switched image P2 may include a subject 83 and a background 84. The display area of ​​the subject 83 and the display area of ​​the subject 81a partially overlap, and the display area of ​​the subject 83 and the display area of ​​the subject 81b also partially overlap.

[0300] The images before and after the switch are as described above. Figure 8A The images P1 and P1 shown Figure 8B In the case of image P2 shown, Figure 8C This illustration shows a result of dividing a switching region according to an embodiment of this application.

[0301] like Figure 8C As shown, the switching area can include area D1, area D2, area D3, and area D4. Area D1 is the intersection of the display areas of background 82 and background 84. Area D4 includes the intersection of the display areas of subject 81a and subject 83, as well as the intersection of the display areas of subject 81b and subject 83. Area D2 includes the intersection of the display areas of subject 81a and background 84, as well as the intersection of the display areas of subject 81b and background 84. Area D3 is the intersection of the display area of ​​subject 83 and background 82. As described above, area D2 can include two sub-areas, and area D4 can also include two sub-areas. That is, the electronic device 100 can consider the area occupied by multiple subjects in image P1 as a single subject area, and determine the final switching area division result based on this subject area. In the divided switching area, one switching area can also include one or more sub-areas. In one possible implementation, when the electronic device 100 switches images, multiple sub-regions of the same switching area can be set with the same switching priority and switching method, and then complete the switching.

[0302] The images before and after the switch are as described above. Figure 8A The images P1 and P1 shown Figure 8B In the case of image P2 shown, Figure 8C This illustration shows a result of dividing a switching region according to an embodiment of this application.

[0303] like Figure 8DAs shown, the switching areas may include areas D1, D2a, D2b, D3, D4a, and D4b. Specifically, area D1 is the intersection of the display areas of background 82 and background 84. Area D3 is the intersection of the display area of ​​subject 83 and the display area of ​​background 82. Area D2a includes the intersection of the display area of ​​subject 81a and the display area of ​​background 84. Area D2b includes the intersection of the display area of ​​subject 81b and the display area of ​​background 84. Area D4a includes the intersection of the display area of ​​subject 81a and the display area of ​​subject 83. Area D4b includes the intersection of the display areas of subject 81b and the display area of ​​subject 83.

[0304] Electronic device 100 can consider the area occupied by each subject in image P1 as a sub-region of the subject region, and determine the final switching region division result based on multiple sub-regions of the subject region. Within the divided switching regions, a switching region can also include one or more sub-regions. For example, regions D2a and D2b can be considered as one switching region (i.e., switching region D2), and regions D4a and D4b can be considered as one switching region (i.e., switching region D4). In one possible implementation, when electronic device 100 performs image switching, multiple sub-regions of the same switching region can be set with different switching priorities and switching methods, and the switching can be completed. That is, regions D2a and D2b can be set with different switching methods and switching priorities; furthermore, regions D4a and D4b can also be set with different switching methods and switching priorities.

[0305] It is understandable that the above Figures 8A-8D The embodiments shown are merely examples. In the embodiments of this application, the image P1 before switching may include more or fewer subjects than in the above embodiments, or may include subjects different from those in the above embodiments. Similarly, the image P2 after switching may include more or fewer subjects than in the above embodiments, or may include subjects different from those in the above embodiments. In this case, the electronic device 100 may also use the image switching method provided in the embodiments of this application to determine the division result of the switching area, set the switching priority and switching method of different switching areas, and complete the switching.

[0306] In some application scenarios, the image switching method provided in this application embodiment can be applied to wallpaper switching scenarios. For example, it can realize the switching between two wallpapers: Always-on Display (AOD) wallpaper, lock screen wallpaper, and desktop wallpaper.

[0307] For example, Figures 9A-9C The following are schematic diagrams illustrating the interfaces of an always-on wallpaper, a lock screen wallpaper, and a desktop provided in embodiments of this application.

[0308] like Figure 9AAs shown, the display screen of the electronic device 100 is in a partially lit state and displays an off-screen wallpaper 900. The off-screen wallpaper 900 may include a time 901 and a pattern 902.

[0309] like Figure 9B As shown, the electronic device 100 is in a screen-on state and a screen-locked state. At this time, the electronic device 100 can display a lock screen wallpaper 910. The lock screen wallpaper 910 may include a time 911, a pattern 912, and a background 913. The display area of ​​the time 911 completely overlaps with the display area of ​​the time 901 in the screen-off wallpaper 900, and the display color of the time 911 is different from the display color of the time 901. The display areas of the pattern 912 and the pattern 902 do not overlap at all.

[0310] like Figure 9C As shown, the electronic device 100 displays a desktop 920, which may include a desktop wallpaper, one or more application icons 922, a time 923, etc. The desktop wallpaper may include a background 921a and a subject 921b, the subject 921b may include one or more star patterns. The display area of ​​the subject 921b may not completely overlap with the display area of ​​pattern 902 in the always-on display wallpaper 900, but may partially overlap with the display area of ​​pattern 912 in the lock screen wallpaper 910. Furthermore, the display area of ​​the time 923 does not completely overlap with the display area of ​​the time 911 in the lock screen wallpaper 910.

[0311] For example, Figures 9D-9G This illustration shows a schematic diagram of the interface of an electronic device 100 according to an embodiment of this application during the process of switching from the always-on wallpaper to the lock screen wallpaper.

[0312] like Figure 9D As shown, the electronic device 100 can display an always-on wallpaper 900. The specific content of the always-on wallpaper 900 can be found above. Figure 9A The relevant descriptions in the illustrated embodiments will not be repeated here.

[0313] Electronic device 100 can receive and respond to user operations that turn on the screen (such as pressing the power button), and display something like... Figures 9E-9G The wallpaper switching interface shown.

[0314] like Figure 9E As shown, the electronic device 100 displays an intermediate interface 930, which is an interface used during the switching process from the always-on wallpaper 900 to the lock screen wallpaper 910. When the intermediate interface 930 is displayed, the screen of the electronic device 100 can be viewed from... Figure 9DThe partial screen-on state shown is switched to the full screen state. Furthermore, the intermediate interface 930 may include a background 913, a time display 911, and a pattern 902. The display area and specific content of the pattern 902 can be referenced above. Figure 9A The relevant descriptions in the illustrated embodiments; the specific details of background 913 and time 911 can be found above. Figure 9B The relevant description in the illustrated embodiment. That is, in the process of switching the always-on wallpaper 900 to the lock screen wallpaper 910, the electronic device 100 can first turn on the entire display screen and switch the background to the background 913 of the lock screen wallpaper 910.

[0315] Afterwards, electronic device 100 can display something like... Figure 9F The intermediate interface 940 shown is the interface after intermediate interface 930 during the process of switching the electronic device 100 from the always-on wallpaper 900 to the lock screen wallpaper 910.

[0316] like Figure 9F As shown, the intermediate interface 940 may include a background 913 and a time 911, wherein the background 913 is as described above. Figure 9B In the illustrated embodiment, the background 913 in the lock screen wallpaper 910; the time 911 is as described above. Figure 9B In the illustrated embodiment, time 911. That is, after the background is switched to the background 913 of the lock screen wallpaper 910, the electronic device 100 can switch time 901 to time 911 and no longer display pattern 902.

[0317] Then, the electronic device 100 can display pattern 912 on the intermediate interface 940, that is, display as shown in the image. Figure 9G The lock screen wallpaper shown is 910. For details on lock screen wallpaper 910, please refer to the above. Figure 9B The relevant descriptions in the illustrated embodiments will not be repeated here.

[0318] It is understood that the electronic device 100 may use any one or more switching methods such as shrinking, fading, or flying out to complete the switching of any interface element (such as background, time, pattern, etc.) during the switching process from the always-on wallpaper to the lock screen wallpaper. This application does not limit this.

[0319] Using the image switching method provided in this application embodiment, the electronic device 100 can switch from the always-on wallpaper to the lock screen wallpaper, making the switching process more natural and providing users with a better visual experience.

[0320] For example, Figures 9H-9K This illustration shows a schematic diagram of the interface of an electronic device 100 according to an embodiment of this application during the process of switching from the lock screen wallpaper to the desktop.

[0321] Electronic device 100 can display the above. Figure 9G The lock screen wallpaper shown is 910.

[0322] Electronic device 100 can receive and respond to a user's unlocking operation (such as fingerprint unlocking), and display as shown in the image. Figures 9H-9K The wallpaper switching interface shown.

[0323] like Figure 9H As shown, the electronic device 100 displays an intermediate interface 950, which is an interface used by the electronic device 100 during the transition from the lock screen wallpaper 910 to the desktop 920. The intermediate interface 950 may include a background 921a, a time display 911, and an image 912. The display areas and specific content of the time display 911 and the image 912 can be referred to the above. Figure 9B The relevant description in the illustrated embodiments; background 921a is the above. Figure 9C In the illustrated embodiment, the background 921a of the desktop wallpaper. That is, during the process of switching the lock screen wallpaper 910 to the desktop 920, the electronic device 100 can switch the background 913 in the lock screen wallpaper 910 to the background 921a of the desktop wallpaper.

[0324] Afterwards, electronic device 100 can display something like... Figure 9I The intermediate interface 960 shown is the interface after intermediate interface 950 during the switching process of electronic device 100 from lock screen wallpaper 910 to desktop 920.

[0325] like Figure 9I As shown, the intermediate interface 960 may include a background 921a and a main body 921b of the desktop wallpaper, as well as an image 912. There is an overlapping area between the main body 921b of the desktop wallpaper and the image 912, and within this overlapping area, the main body 921b of the desktop wallpaper is displayed on top of the image 912. That is, after switching the background to the background 921a of the desktop wallpaper, the electronic device 100 may stop displaying the time 911 and instead display the main body 921b of the desktop wallpaper (i.e., one or more star images).

[0326] Afterwards, electronic device 100 can display something like... Figure 9J The intermediate interface 970 shown is the interface after intermediate interface 960 during the switching process of electronic device 100 from lock screen wallpaper 910 to desktop 920.

[0327] like Figure 9J As shown, the middle interface 970 may include desktop wallpaper (i.e., background 921a and main body 921b) and time 923. The specific content of time 923 can be found above. Figure 9CThe relevant descriptions in the illustrated embodiments will not be repeated here. That is, after displaying the desktop wallpaper, the electronic device 100 can stop displaying the pattern 912 and display the time 923.

[0328] Then, the electronic device 100 can display one or more application icons in the intermediate interface 970, i.e., display as shown below. Figure 9K The desktop shown is 920. For details about desktop 920, please refer to the above. Figure 9C The relevant descriptions in the illustrated embodiments will not be repeated here.

[0329] It is understood that the electronic device 100 may use any one or more switching methods such as shrinking, fading, or flying out to complete the switching of any interface element (such as background, time, pattern, etc.) during the transition from lock screen wallpaper to desktop. This application does not limit this.

[0330] Using the image switching method provided in this application embodiment, the electronic device 100 can switch from lock screen wallpaper to desktop, making the switching process more natural and bringing a better visual experience to the user.

[0331] It should be noted that the above embodiments are only two examples. In the embodiments of this application, the electronic device 100 can also use the image switching method provided in the embodiments of this application to realize the switching between the always-on wallpaper, the lock screen wallpaper and the desktop, and can also realize image switching in other scenarios (such as image browsing scenarios, video playback scenarios, etc.). This application does not limit it here.

[0332] The functional modules of an electronic device 100 provided in the embodiments of this application are described below.

[0333] Figure 10 A schematic diagram of the functional modules of an electronic device 100 provided in an embodiment of this application is shown.

[0334] like Figure 10 As shown, the electronic device 100 may include an image detection module 1001, a switching control module 1002, and a display module 1003. Optionally, the electronic device 100 may also include a user interaction module 1004.

[0335] The image detection module 1001 may store one or more saliency detection algorithms. The image detection module 1001 can acquire images before and after the switch. The image detection module 1001 can also determine the region segmentation results of the images before and after the switch using the saliency detection algorithms. The region segmentation results include the main body region (also called the foreground region) and the background region of the image. Then, the image detection module 1001 can transmit the region segmentation results of the image to the switch control module 1002. In some embodiments, the image detection module 1001 can receive and respond to information M1 sent by the user interaction module 1004, acquire images before and after the switch, and determine the region segmentation results of the images before and after the switch respectively. In other embodiments, the image detection module 1001 can receive and respond to information M1 sent by the user interaction module 1004, and send the region segmentation results of the images before and after the switch to the switch control module 1002.

[0336] The switching control module 1002 can determine the switching region division result of the display screen in this switching based on the region division results before and after switching sent by the image detection module 1001 (for example, including any one or more of regions D1, D2, D3 and D4 in the above embodiment). After determining the switching region division result, the switching control module 1002 can set the switching priority and switching method of each switching region based on the switching region division result, and send information M2 to the display module 1003. Information M2 may include the switching region division result, the switching priority and switching method of each switching region.

[0337] The display module 1003 can receive information M2 sent by the switching control module 1002, and based on the division result of the switching area, the switching priority of each switching area and the switching method, switch the image before switching (e.g., image P1) displayed on the screen to the image after switching (e.g., image P2).

[0338] The user interaction module 1004 can receive user operations on the electronic device 100, such as operations on the display screen or the buttons on the electronic device 100. In some embodiments, the user interaction module 1004 can receive and respond to the user's operation of switching images by sending information M1 to the image detection module 1001. Information M1 can be used to instruct the image detection module 1001 to obtain the region segmentation results of the image before switching and the region segmentation results of the image after switching, and send the region segmentation results of the images before and after switching to the switching control module 1002.

[0339] It is understandable that the above Figure 10The embodiments shown are merely examples. In the embodiments of this application, the electronic device 100 may include more, fewer, or different functional modules than those in the above embodiments, and this application does not limit the scope of the invention.

[0340] For ease of subsequent description, the aforementioned electronic device 100 can be collectively referred to as a device. It should be understood that the division of units within this device is merely a logical functional division; in actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, the units within the device can be implemented by a processor calling software; for example, the device includes a processor connected to a memory containing instructions. The processor calls the instructions stored in the memory to implement any of the above methods or to realize the functions of each unit within the device. The processor can be, for example, a general-purpose processor, such as a central processing unit (CPU) or a microprocessor, and the memory can be internal or external to the device. Alternatively, the units in the device can be implemented as hardware circuits. The functionality of some or all units can be achieved through the design of these hardware circuits, which can be understood as one or more processors. For example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC). The functionality of some or all of the above units is achieved through the design of the logical relationships between the components within the circuit. In another implementation, the hardware circuit can be implemented using a programmable logic device (PLD). Taking a field-programmable gate array (FPGA) as an example, it can include a large number of logic gates. The connection relationships between the logic gates are configured through a configuration file, thereby achieving the functionality of some or all of the above units. All units of the above device can be implemented entirely through processor-invoked software, entirely through hardware circuits, or partially through processor-invoked software with the remaining parts implemented through hardware circuits.

[0341] In this application embodiment, a processor is a circuit with data processing capabilities. In one implementation, the processor can be a circuit with instruction reading and execution capabilities, such as a CPU, microprocessor, graphics processing unit (GPU) (which can be understood as a type of microprocessor), or digital signal processor (DSP). In another implementation, the processor can implement certain functions through the logical relationships of hardware circuits. These logical relationships of hardware circuits are fixed or reconfigurable. For example, the processor is a hardware circuit implemented as an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document and configuring the hardware circuit can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. Furthermore, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as a Neural Network Processing Unit (NPU), Tensor Processing Unit (TPU), or Deep Learning Processing Unit (DPU).

[0342] As can be seen, each unit in the above device can be one or more processors (or processing circuits) configured to implement the above methods, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0343] Furthermore, the units in the above devices can be integrated in whole or in part, or they can be implemented independently. In one implementation, these units are integrated together as a system-on-a-chip (SOC). The SOC may include at least one processor for implementing any of the above methods or implementing the functions of the units in the device. The at least one processor may be of different types, such as CPU and FPGA, CPU and artificial intelligence processor, CPU and GPU, etc.

[0344] The following describes a possible physical structure of the electronic device 100 provided in the embodiments of this application.

[0345] For example, Figure 11 This illustration shows a schematic diagram of the physical structure of an electronic device 100 provided in an embodiment of this application.

[0346] like Figure 11As shown, the electronic device 100 may include a processor 1101, a memory 1102, and a display 1103. The processor 1101, memory 1102, and display 1103 may be interconnected or interconnected via a bus 1104.

[0347] For example, memory 1102 is used to store computer programs and data of electronic device 100. Memory 1102 may include, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM).

[0348] The software or program code required for all or part of the functions of the electronic device 100 in the above method embodiments is stored in the memory 1102.

[0349] In one possible implementation, if the software or program code required for some functions is stored in the memory 1102, then in addition to calling the program code in the memory 1102 to implement some functions, the processor 1101 can also cooperate with other components (such as the display 1103, etc.) to complete other functions described in the method embodiment (such as the function of receiving or sending data).

[0350] The display 1103 can be used to display images.

[0351] For example, processor 1101 may be a CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor types, as described above. Processor 1101 may be used to read programs stored in memory 1102 and execute operations performed by electronic device 100 in any of the above embodiments.

[0352] Understandable, Figure 11 The illustrated embodiment is merely an example. In the embodiments of this application, the electronic device 100 may also include components beyond those described above. Figure 11 The embodiments shown have more, fewer, or more Figure 11 The different devices shown in the embodiments are not limited herein.

[0353] The following describes a chip system provided by an embodiment of this application.

[0354] This application also provides a chip system including at least one processor for implementing the functions involved in the electronic device 100 in any of the above embodiments.

[0355] In one possible design, the chip system also includes a memory for storing program instructions and data, which may be located within or outside the processor.

[0356] The chip system can consist of chips or include chips and other discrete components.

[0357] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.

[0358] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.

[0359] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0360] It is understood that the above chip system is only an example. In the embodiments of this application, the chip system may also include more, fewer, or different devices than those in the above embodiments. This application does not limit the scope of the invention.

[0361] Figure 12 A flowchart illustrating an image switching method provided in an embodiment of this application is shown.

[0362] like Figure 12 As shown, the specific process of an image switching method provided in this application embodiment may include the following steps:

[0363] S1201. An electronic device displays a first image on a display screen, the first image including a first subject.

[0364] For example, the first image may be image P1 in the above embodiments, and the first subject may be the subject of image P1 in the above embodiments.

[0365] The electronic device may be the electronic device 100 in the above embodiments.

[0366] S1202. The electronic device determines that the image after switching is a second image, and the second image includes a second subject.

[0367] For example, the second image may be image P2 in the above embodiment, and the second subject may be the subject of image P2 in the above embodiment.

[0368] S1203. The electronic device determines the main area and background area of ​​the display screen based on the position of the first subject in the first image and the position of the second subject in the second image. The main area includes the first display area of ​​the first subject on the display screen and the second display area of ​​the second subject on the display screen, and the background area is the area outside the main area of ​​the display screen.

[0369] For example, the first display area may be the main area C1 in the above embodiment, and the second display area may be the main area C3 in the above embodiment.

[0370] S1204. In the first time period, the electronic device switches from displaying the content of the first image to displaying the content of the second image in the main area using a first switching method.

[0371] The first switching method can include, but is not limited to, any one or more of the following: fly-in, fly-out, fade, mesh, float-in, float-out, shrink, expand, etc. For details on the first switching method, please refer to the above. Figure 3 In the illustrated embodiment, the description of the switching mode in step S306 will not be repeated here.

[0372] S1205. In the second time period, the electronic device switches the display of the content of the second image from the content of the first image in the background area using a second switching method; wherein the first time period is different from the second time period, and / or the first switching method is different from the second switching method.

[0373] For details on the second switching method, please refer to the relevant description of the first switching method; it will not be repeated here.

[0374] The image switching method provided in this application allows for different switching modes to be set based on the location of the main subject in the images before and after the switching, making the switching process more natural and smooth and providing users with a better visual experience.

[0375] In one possible implementation, the first display area is the same as the second display area.

[0376] Thus, when the first display area where the first subject is located overlaps with the second display area where the second subject is located, the switching area can include the subject area and the background area, where the subject area is the first display area and the background area is other areas in the display screen outside the subject area.

[0377] For example, in this case, the main body area can be region D4 in the above embodiment, and the background area can be region D1 in the above embodiment.

[0378] In one possible implementation, the first display area includes a second display area; the main area includes a first switching area and a second switching area, the first switching area being the second display area, and the second switching area being the difference between the first display area and the second display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the main area using a first switching method, specifically including: in a first sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a third switching method; in a second sub-time period, the content of the second image is switched from the content of the first image to be displayed in the second switching area using a fourth switching method; wherein the first sub-time period is different from the second sub-time period, and / or the third switching method is different from the fourth switching method.

[0379] Thus, when the first display area containing the first subject includes the second display area containing the second subject, the subject area can be subdivided into a first switching area and a second switching area. The first switching area is the intersection of the first and second display areas, i.e., the second display area. The second switching area is the difference between the first and second display areas, i.e., the portion that belongs to the first display area but not to the second display area.

[0380] For example, the first switching area can be area D4 in the above embodiment, the second switching area can be area D2 in the above embodiment, and the background area can be area D1 in the above embodiment.

[0381] As another example, the specific process by which an electronic device switches the first image displayed on the screen to the second image can be referred to the above. Figures 6D-6G ,or Figures 6H-6KThe relevant descriptions in the illustrated embodiments.

[0382] Using the image switching method provided in this application, different switching areas in the main body area can be switched based on different switching orders (or switching priorities) and switching methods.

[0383] In one possible implementation, the second display area includes the first display area; the main area includes a first switching area and a third switching area, the first switching area being the first display area, and the third switching area being the difference between the second display area and the first display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the main area using a first switching method, specifically including: in a third sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a fifth switching method; in a fourth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the third switching area using a sixth switching method; wherein the third sub-time period is different from the fourth sub-time period, and / or the fifth switching method is different from the sixth switching method.

[0384] Thus, when the second display area containing the second subject includes the first display area containing the first subject, the subject area can be subdivided into a first switching area and a third switching area. The first switching area is the intersection of the first and second display areas, i.e., the first display area. The third switching area is the difference between the second and first display areas, i.e., the portion that belongs to the second display area but not to the first display area.

[0385] For example, the first switching area can be area D4 in the above embodiment, the third switching area can be area D3 in the above embodiment, and the background area can be area D1 in the above embodiment.

[0386] As another example, the specific process by which an electronic device switches the first image displayed on the screen to the second image can be referred to the above. Figure 5D-Figure 5G ,or Figures 5H-5K The relevant descriptions in the illustrated embodiments.

[0387] Using the image switching method provided in this application, different switching areas in the main body area can be switched based on different switching orders (or switching priorities) and switching methods.

[0388] In one possible implementation, the first display area and the second display area do not overlap; the main area includes a second switching area and a third switching area, where the second switching area is the first display area and the third switching area is the second display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the main area using a first switching method, specifically including: in a fifth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a seventh switching method; in a sixth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the second switching area using an eighth switching method; wherein the fifth sub-time period is different from the sixth sub-time period, and / or the seventh switching method is different from the eighth switching method.

[0389] Thus, when the second display area where the second subject is located does not overlap with the first display area where the first subject is located, the subject area can be subdivided into a second switching area and a third switching area. The second switching area is the difference between the first and second display areas, i.e., the first display area. The third switching area is the difference between the second and first display areas, i.e., the second display area.

[0390] For example, the second switching area can be area D2 in the above embodiment, the third switching area can be area D3 in the above embodiment, and the background area can be area D1 in the above embodiment.

[0391] As another example, the specific process by which an electronic device switches the first image displayed on the screen to the second image can be referred to the above. Figure 4D-Figure 4G ,or Figures 4H-4K The relevant descriptions in the illustrated embodiments.

[0392] Using the image switching method provided in this application, different switching areas in the main body area can be switched based on different switching orders (or switching priorities) and switching methods.

[0393] In one possible implementation, the main area includes a first switching area, a second switching area, and a third switching area. The first switching area is the intersection of the first display area and the second display area, the second switching area is the difference between the first display area and the second display area, and the third switching area is the difference between the second display area and the first display area. In a first time period, the content of the second image is switched from the content of the first image to be displayed in the main area using a first switching method. Specifically, this includes: in a seventh sub-time period, switching the content of the second image from the content of the first image to be displayed in the first switching area using a ninth switching method; in an eighth sub-time period, switching the content of the second image from the content of the first image to be displayed in the second switching area using a tenth switching method; and in a ninth sub-time period, switching the content of the second image from the content of the first image to be displayed in the third switching area using an eleventh switching method. The seventh, eighth, and ninth sub-time periods are all different, and / or the ninth, tenth, and eleventh switching methods are all different.

[0394] Thus, when the second display area where the second subject is located intersects with the first display area where the first subject is located, the subject area can be subdivided into a first switching area, a second switching area, and a third switching area. The first switching area is the intersection of the first display area and the second display area; the second switching area is the difference between the first display area and the second display area, that is, the part that belongs to the first display area but not to the second display area; the third switching area is the difference between the second display area and the first display area, that is, the part that belongs to the second display area but not to the first display area.

[0395] For example, the first switching area can be area D4 in the above embodiment, the second switching area can be area D2 in the above embodiment, the third switching area can be area D3 in the above embodiment, and the background area can be area D1 in the above embodiment.

[0396] As another example, the specific process by which an electronic device switches the first image displayed on the screen to the second image can be referred to the above. Figures 7D-7G ,or Figures 7H-7K The relevant descriptions in the illustrated embodiments.

[0397] Using the image switching method provided in this application, different switching areas in the main body area can be switched based on different switching orders (or switching priorities) and switching methods.

[0398] In one possible implementation, before determining the main body region and background region of the display screen based on the position of the first subject in the first image and the position of the second subject in the second image, the method further includes: determining the position of the first subject in the first image based on a saliency detection algorithm; and determining the position of the second subject in the second image based on a saliency detection algorithm.

[0399] The specific method by which electronic devices determine the position of the first subject in the first image based on saliency detection algorithms can be referred to the above. Figure 3 The description of step S302 shown above. For the specific method by which the electronic device determines the position of the second subject in the second image based on the saliency detection algorithm, please refer to the above. Figure 3 The relevant description of step S304 is shown.

[0400] In this way, the position of the first subject in the first image can be determined based on the saliency detection algorithm; the position of the second subject in the second image can also be determined based on the saliency detection algorithm.

[0401] In one possible implementation, the first image is any of the following: always-on display (AOD) wallpaper, lock screen wallpaper, and desktop; the second image is any of the following: always-on display (AOD) wallpaper, lock screen wallpaper, and desktop; the first image and the second image are different.

[0402] For example, the switching process between the always-on wallpaper, the lock screen wallpaper, and any two on the desktop can refer to the above. Figures 9D-9G ,as well as Figures 9H-9K The relevant descriptions in the illustrated embodiments will not be repeated here.

[0403] This allows you to switch between any two of the always-on wallpaper, lock screen wallpaper, and desktop wallpaper.

[0404] This application provides an image switching method applied to an electronic device, the electronic device including a display screen. The method includes: displaying a first image on the display screen, the first image including first image elements; determining that the switched image is a second image, the second image including second image elements; determining a target area and a non-target area in the display screen, the target area including a first display area of ​​the first image elements and a second display area of ​​the second image elements, the non-target area including areas outside the target area in the display screen; switching the display of the content of the second image from the content of the first image in the target area using a first switching method during a first time period; switching the display of the content of the second image from the content of the first image in the non-target area using a second switching method during a second time period; wherein the first time period is different from the second time period, and / or the first switching method is different from the second switching method.

[0405] This allows for different switching methods and / or sequences for target and non-target areas, improving the smoothness of the switching process and providing a better user experience.

[0406] The following describes another image switching method provided by an embodiment of this application.

[0407] Figures 13A-13CA schematic diagram illustrating the switching logic of a set of image switching methods provided in an embodiment of this application is shown.

[0408] like Figure 13A As shown, the image P3 before the switch can be Figure 13A The image shown. In Figure 13A In the illustrated embodiment, image P3 may include a face F1 and other elements E1. The other elements E1 may include all image elements in image P3 except for the face F1, including background elements, etc.

[0409] like Figure 13B As shown, the switched image P4 can be Figure 13B The image shown. In Figure 13B In the illustrated embodiment, image P4 may include a face F2 and other elements E2. The other elements E2 may include all image elements in image P4 except for the face F2, including background elements, etc.

[0410] In some embodiments, the electronic device 100 can determine, based on images P3 and P4 before and after the switch, the following: Figure 13C The switching area division results are shown in the switching process.

[0411] like Figure 13C As shown, during the switching process, the display screen may include one or more of the following areas: a face area Z1 and a non-face area Z2. The face area Z1 may include the display area of ​​face F1, and may also include the display area of ​​face F2. Optionally, the face area Z1 may also include a portion of the area surrounding face F1 and / or face F2. The non-face area Z2 may include all display areas on the display screen other than the face area Z1.

[0412] It should be noted that, in some embodiments, the electronic device 100 can perform image recognition on the image P3 before switching to identify the display area where face F1 is located; it can also perform image recognition on the image P4 after switching to identify the display area where face F2 is located; then, the electronic device 100 can determine the face region Z1 based on the display areas where face F1 and face F2 are located. In other embodiments, the electronic device 100 can also preset a face region Z1 and a non-face region Z2, and generate the images P3 and P4 before and after switching based on the preset face region Z1 and non-face region Z2, which is not limited in this application.

[0413] After determining the switching areas, the electronic device 100 can set the switching method and priority for the face area Z1 and the non-face area Z2 respectively, and switch the image P3 displayed on the screen to image P4 based on the set switching priority and switching method. In some embodiments, the electronic device 100 can default to giving the face area Z1 a higher priority than the non-face area Z2. It should be noted that the switching method for the face area Z1 and the non-face area Z2 can be the same or different.

[0414] Understandable, Figures 13A-13C This application merely illustrates the switching logic of an image switching method provided in an embodiment of the present application. In this embodiment, the division result of the switching region can also be the same as described above. Figure 13C The embodiments shown differ from those described above, for example including those that are different from those described above. Figure 13C The embodiments shown may have more or fewer switching areas than those described above, and this application does not limit the scope of the embodiments.

[0415] For example, the images before and after the switch are as described above. Figure 13A and Figure 13B Taking the image shown as an example, Figures 14A-14D This illustration shows a switching process for switching image P3 to image P4 according to an embodiment of this application.

[0416] like Figure 14A As shown, the electronic device 100 can display an image P3, which may include a face F1 and other elements E1. Other specific content of the image P3 can be found above. Figure 13A The relevant descriptions in the illustrated embodiments will not be repeated here.

[0417] After that, as Figure 14B As shown, the electronic device 100 can first switch the face F1 displayed in the face region Z1 to face F2. Furthermore, in some embodiments, after displaying face F2, or during the switching from face F1 to face F2, the non-face region Z2 can be faded (e.g., fade-out, fade-in) to fade other elements E1 out of the display screen. During the fading out of other elements E1, the non-face region Z2 can display granular occlusions (or occlusions of other shapes). Optionally, the granular occlusions displayed in the non-face region Z2 can be uniformly distributed or non-uniformly distributed. For example, the density of the granular occlusions is lower closer to the face region Z1 and higher further away from the face region Z1, etc., which is not limited herein.

[0418] After that, as Figure 14CAs shown, the electronic device 100 can gradually display other elements E2 in the image P4 using a fade-in method in the non-face region Z2. In some embodiments, during the gradual display of other elements E2, the display area of ​​other elements E2 may no longer display granular obstructions. For example, the electronic device 100 can gradually expand the display of other elements E2 from the face region Z1 to the non-face region Z2.

[0419] Finally, as Figure 14D As shown, when other element E2 occupies the entire non-face area Z2, the electronic device 100 can stop displaying the granular occlusion. At this time, image P3 has been completely switched to image P4.

[0420] This allows for image switching to be completed with the face as the visual focus, improving the smoothness of the switching and providing users with a better visual experience.

[0421] Understandable, Figures 14A-14D The illustrated embodiment is merely an example. In this application embodiment, the electronic device 100 may also use a different switching method than the above embodiment to switch the image elements displayed in the face region Z1 and the non-face region Z2. This application does not limit this.

[0422] Figure 15 A flowchart illustrating another image switching method provided in an embodiment of this application is shown.

[0423] like Figure 15 As shown, the specific process of another image switching method may include the following steps:

[0424] S1501. Electronic device 100 displays the image P3 before switching on the display screen.

[0425] S1502. Electronic device 100 acquires the switched image P4.

[0426] The specific details of steps S1501 and S1502 can be found above. Figure 3 The relevant content in steps S301 and S303 shown will not be repeated here.

[0427] S1503. Electronic device 100 determines face region Z1 and non-face region Z2 based on image P3 and image P4.

[0428] In some embodiments, the electronic device 100 can perform image recognition on the image P3 before switching to identify the display area where face F1 is located; it can also perform image recognition on the image P4 after switching to identify the display area where face F2 is located; then, the electronic device 100 can determine the face region Z1 based on the display areas where face F1 and face F2 are located. It should be noted that, in one possible implementation, the electronic device 100 can identify the display area where the face is located in the image based on a saliency detection algorithm or other image recognition algorithms. This application does not limit the specific image recognition algorithm.

[0429] In other embodiments, the face region Z1 and the non-face region Z2 can also be preset display areas. For example, the electronic device 100 can generate images P3 and P4 before and after the switch based on the preset face region Z1 and non-face region Z2. In this case, the electronic device 100 can determine the division of the face region Z1 and the non-face region Z2 based on the preset face region Z1 and non-face region Z2.

[0430] Optionally, the face region Z1 and the non-face region Z2 may each include one or more sub-regions. For example, the face region Z1 may be divided into multiple face sub-regions based on different facial organs; or the non-face region Z2 may be divided into multiple non-face sub-regions based on the positional relationship of each image element in the non-face region Z2. This application does not limit these categories.

[0431] S1504. Electronic device 100 determines that the switching mode of face region Z1 is switching mode 1, and determines that the switching mode of non-face region Z2 is switching mode 2.

[0432] It should be noted that in the embodiments of this application, switching method 1 and switching method 2 can be the same, for example, both can be fade (including fade-in, fade-out, etc.), and switching method 1 and switching method 2 can also be different, which is not limited here.

[0433] In some embodiments, the electronic device 100 can set a default switching mode for the face region Z1 and the non-face region Z2, such as fade, grid, fly-in, fly-out, etc.

[0434] In other embodiments, the electronic device 100 may also determine the switching mode 1 of the face region Z1 and the switching mode 2 of the non-face region Z2 based on the division of the face region Z1 and the non-face region Z2, and / or based on the color distribution of images P3 and P4, etc.

[0435] In some embodiments, if the face region Z1 and / or the non-face region Z2 includes multiple sub-regions, the electronic device 100 may also set a switching mode for each of the multiple sub-regions. The switching mode for each sub-region may be the same or different.

[0436] S1505. Electronic device 100 determines the switching priority of face region Z1 and non-face region Z2.

[0437] Step S1505 is an optional step.

[0438] In some embodiments, the electronic device 100 may preset the switching priority of the face region Z1 and the non-face region Z2. For example, by default, the switching priority of the face region Z1 is higher than that of the non-face region Z2. In this case, step S1505 may not be executed.

[0439] In other embodiments, the electronic device 100 may also determine the switching priority of the face region Z1 and the non-face region Z2 after determining the face region Z1 and the non-face region Z2. Optionally, if the face region Z1 and / or the non-face region Z2 includes multiple sub-regions, the electronic device 100 may also set switching priorities for each of the multiple sub-regions. In the face region Z1 or the non-face region Z2, the switching priority of each sub-region may be the same or different.

[0440] S1506. Electronic device 100 switches the image elements displayed in face region Z1 based on switching mode 1.

[0441] It should be noted that, if the switching priority of face region Z1 is determined to be higher than that of non-face region Z2, the electronic device 100 may execute step S1505 first, and then execute step S1506. If the switching priority of face region Z1 is determined to be lower than that of non-face region Z2, the electronic device 100 may execute step S1506 first, and then execute step S1505. If the switching priority of face region Z1 is equal to that of non-face region Z2, the electronic device 100 may execute steps S1505 and S1506 simultaneously.

[0442] After determining switching mode 1, the electronic device 100 can switch the image elements displayed in the face region Z1 based on switching mode 1, for example, in the above... Figures 14A-14D In the embodiment shown, the electronic device 100 can switch face F1 in face region Z1 to face F2 based on switching mode 1.

[0443] S1507. Electronic device 100 switches the image elements displayed in the non-face area Z2 based on switching mode 2.

[0444] After determining switching mode 2, the electronic device 100 can switch the image elements displayed in the non-face region Z2 based on switching mode 2, for example, in the above... Figures 14A-14D In the embodiment shown, the electronic device 100 can switch other elements E1 in the non-face region Z2 to other elements E2 based on switching mode 2.

[0445] It is understood that the embodiments described herein are merely examples. In the embodiments of this application, the electronic device 100 may also employ more, fewer, or different steps than those described in the above embodiments to achieve image switching. This application does not impose any limitations on these embodiments.

[0446] The image switching method provided in this application can divide the image before and after switching into a face region Z1 and a non-face region Z2, set a switching method and / or switching priority for the face region Z1 and the non-face region Z2, and then complete the switching. This allows image switching to be completed with the face as the visual focus, improving the smoothness of the switching and providing the user with a better visual experience.

[0447] Figure 16 A flowchart illustrating another image switching method provided in an embodiment of this application is shown.

[0448] like Figure 16 As shown, the specific process of another image switching method may include the following steps:

[0449] S1601. An electronic device displays a first image on a display screen, the first image including first image elements.

[0450] The electronic device may be the electronic device 100 in the above embodiments.

[0451] For example, the first image can be image P1 in the above embodiments, or it can be the image P1 in the above embodiments. Figures 13A-15 Image P3 in the illustrated embodiment. The first image element can be the main body of image P1 in the above embodiment, or it can be the image P3 in the above embodiment. Figures 13A-15 The face F1 in image P3 shown.

[0452] S1602. The electronic device determines that the switched image is a second image, and the second image includes second image elements.

[0453] For example, the second image can be image P2 in the above embodiment, or it can be the image P2 in the above embodiment. Figures 13A-15 Image P4 in the illustrated embodiment. The second image element can be the main body of image P2 in the above embodiment, or it can be the image P4 in the above embodiment. Figures 13A-15 The face F2 in image P4 shown.

[0454] S1603. The electronic device determines a target area and a non-target area in the display screen, wherein the target area includes a first display area of ​​a first image element and a second display area of ​​a second image element, and the non-target area includes areas outside the target area in the display screen.

[0455] It should be noted that, in one possible implementation, the target area may include only the first display area and the second display area; in another possible implementation, the target area may include the first display area, the second display area and other display areas, such as the display area near the first display area, and / or the display area near the second display area, etc.

[0456] For example, the first display area may be the main area C1 in the above embodiment, and the second display area may be the main area C3 in the above embodiment.

[0457] For example, the target area may include the main area C1 and the main area C3 in the above embodiments.

[0458] For example, the target area can be as described above. Figure 13C The face region Z1 shown can be a non-target region as described above. Figure 13C The non-face region Z2 is shown.

[0459] S1604. In the first time period, the electronic device switches from displaying the content of the first image to displaying the content of the second image in the target area using a first switching method.

[0460] The first switching method can be referred to the above. Figure 12 The illustrated embodiments, and the above-described embodiments Figure 3 In the illustrated embodiment, the description of the switching mode in step S306 will not be repeated here.

[0461] S1605. In the second time period, the electronic device switches from displaying the content of the first image to displaying the content of the second image in a non-target area using a second switching method; wherein the first time period is different from the second time period, and / or the first switching method is different from the second switching method.

[0462] For details on the second switching method, please refer to the relevant description of the first switching method; it will not be repeated here.

[0463] This allows for different switching methods and / or sequences for target and non-target areas, improving the smoothness of the switching process and providing a better user experience.

[0464] In one possible implementation, the target area is a preset area.

[0465] In this way, the target area can be a pre-defined area of ​​the electronic device.

[0466] In one possible implementation, determining the target area and non-target area in the display screen specifically includes: determining a first display area in the display screen based on a first image using a first algorithm; determining a second display area in the display screen based on a second image using the first algorithm; determining a target area based on the first display area and the second display area; and determining a non-target area based on the target area.

[0467] In this way, the target region can be determined based on the first algorithm, and then the non-target regions can be determined.

[0468] In one possible implementation, the first algorithm can be an image algorithm such as a face recognition algorithm, in which case the first algorithm can be used to identify the display area where a face is located. In another possible implementation, the first algorithm can also be an image algorithm such as a saliency recognition algorithm, in which case the first algorithm can be used to identify the display area where the subject of the image is located.

[0469] In one possible implementation, the first image element is a face element, and the second image element is a face element.

[0470] For example, the first image element can be as described above. Figures 13A-15 The face F1 in image P3 shown; the first image element can be the one described above. Figures 13A-15 The face F2 in image P4 shown.

[0471] At this point, the first display area can be used to display the face in the first image, and the second display area can be used to display the face in the second image. In this case, the target area can also be called the face area, and the non-target area can also be called the non-face area.

[0472] In this way, different switching methods and / or switching orders can be used for face elements and non-face elements.

[0473] In one possible implementation, the second image is an image generated based on the first image.

[0474] In some embodiments, both the second image and the first image can be images of people. The facial elements in the second image can be generated based on the facial elements in the first image; for example, the number of identical facial features between the facial elements in the second image and those in the first image is greater than a preset threshold (e.g., 5 or 10). These facial features may include, but are not limited to, any one or more of the following: facial feature layout, eye size, eye shape, mouth size, mouth shape, nose shape, and ear shape.

[0475] In this way, a second image can be generated based on the first image, so as to switch any one or more image elements other than facial elements such as clothing, hairstyle, and background of the same person, and achieve visual effects such as one-click dressing up of the person in the image.

[0476] In one possible implementation, during the process of switching the display of the content of the second image from the content of the first image in a second switching manner in a non-target area, a granular occlusion is displayed in the non-target area.

[0477] This allows granular occlusions to be displayed in non-target areas during the switching process.

[0478] In one possible implementation, during the process of switching the display of the content of the second image from the content of the first image in the target area using a first switching method, the target area does not display granular occlusions.

[0479] In one possible implementation, during the process of switching the display of the content of the second image from the content of the first image in the target area using a first switching method, the target area displays granular occlusions.

[0480] In one possible implementation, displaying granular occlusions in non-target areas specifically includes: displaying granular occlusions of different densities in non-target areas based on their distance from the target area, with the density of the granular occlusions being lower as they get closer to the target area.

[0481] In this way, granular occlusions of different densities can be displayed based on their distance from the target area.

[0482] In one possible implementation, the second switching form is used to present the visual effect of granular occlusions spreading outward from around the target area.

[0483] In this way, during the switching process of non-target areas, granular occlusions can be displayed in non-target areas with the target area as the center.

[0484] In one possible implementation, the first image is an Always-On Display (AOD) wallpaper, and the second image is a wallpaper that is displayed when the screen is on.

[0485] This allows you to switch the wallpaper from the off screen to the on screen, improving the smoothness of the switch and providing a better user experience.

[0486] In one possible implementation, the first display area is the same as the second display area.

[0487] Thus, the first display area containing the face elements of the first image and the second display area containing the face elements of the second image can also be the exact same area.

[0488] In one possible implementation, the first image element is the main body of the first image, and the second image element is the main body of the second image.

[0489] It should be noted that an image can include both a subject and a background. In this case, the target area can also be called the subject area, and the non-target area can also be called the background area.

[0490] In this way, the target and non-target areas can be determined based on the location of the subject in the images before and after the switch, and different switching methods and / or switching times can be set to make the switching process more natural and smooth, bringing a better visual experience to the user.

[0491] In one possible implementation, the first display area includes a second display area; the target area includes a first switching area and a second switching area, the first switching area being the second display area, and the second switching area being the difference between the first display area and the second display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the target area using a first switching method, specifically including: in a first sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a third switching method; in a second sub-time period, the content of the second image is switched from the content of the first image to be displayed in the second switching area using a fourth switching method; wherein the first sub-time period is different from the second sub-time period, and / or the third switching method is different from the fourth switching method.

[0492] Thus, when the first display area containing the main subject of the first image includes the second display area containing the main subject of the second image, the main subject area can be subdivided into a first switching area and a second switching area. The first switching area is the intersection of the first and second display areas, i.e., the second display area. The second switching area is the difference between the first and second display areas, i.e., the portion that belongs to the first display area but not to the second display area.

[0493] The image switching method provided in this application can be used to subdivide the target area into multiple switching areas based on the positional relationship between the first display area and the second display area, and can switch different switching areas in the target area based on different switching orders (or switching priorities) and switching methods.

[0494] In one possible implementation, the second display area includes the first display area; the target area includes a first switching area and a third switching area, the first switching area being the first display area, and the third switching area being the difference between the second display area and the first display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the target area using a first switching method, specifically including: in a third sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a fifth switching method; in a fourth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the third switching area using a sixth switching method; wherein the third sub-time period is different from the fourth sub-time period, and / or the fifth switching method is different from the sixth switching method.

[0495] Thus, when the second display area containing the main subject of the second image includes the first display area containing the main subject of the first image, the target area can be subdivided into a first switching area and a third switching area. The first switching area is the intersection of the first and second display areas, i.e., the first display area itself. The third switching area is the difference between the second and first display areas, i.e., the portion that belongs to the second display area but not to the first display area.

[0496] Using the image switching method provided in this application, different switching areas in the target area can be switched based on different switching orders (or switching priorities) and switching methods.

[0497] In one possible implementation, the first display area and the second display area do not overlap; the target area includes a second switching area and a third switching area, wherein the second switching area is the first display area and the third switching area is the second display area; in a first time period, the content of the second image is switched from the content of the first image to be displayed in the target area using a first switching method, specifically including: in a fifth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a seventh switching method; in a sixth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the second switching area using an eighth switching method; wherein the fifth sub-time period is different from the sixth sub-time period, and / or the seventh switching method is different from the eighth switching method.

[0498] Thus, when the second display area containing the main subject of the second image does not overlap with the first display area containing the main subject of the first image, the target area can be subdivided into a second switching area and a third switching area. The second switching area is the difference between the first and second display areas, i.e., the first display area. The third switching area is the difference between the second and first display areas, i.e., the second display area.

[0499] Using the image switching method provided in this application, different switching areas in the target area can be switched based on different switching orders (or switching priorities) and switching methods.

[0500] In one possible implementation, the target area includes a first switching area, a second switching area, and a third switching area. The first switching area is the intersection of the first display area and the second display area, the second switching area is the difference between the first display area and the second display area, and the third switching area is the difference between the second display area and the first display area. In a first time period, the content of the second image is switched from the content of the first image to be displayed in the target area using a first switching method. Specifically, this includes: in a seventh sub-time period, switching the content of the second image from the content of the first image to be displayed in the first switching area using a ninth switching method; in an eighth sub-time period, switching the content of the second image from the content of the first image to be displayed in the second switching area using a tenth switching method; and in a ninth sub-time period, switching the content of the second image from the content of the first image to be displayed in the third switching area using an eleventh switching method. The seventh, eighth, and ninth sub-time periods are all different, and / or the ninth, tenth, and eleventh switching methods are all different.

[0501] Thus, when the second display area containing the main subject of the second image intersects with the first display area containing the main subject of the first image, the target area can be subdivided into a first switching area, a second switching area, and a third switching area. The first switching area is the intersection of the first and second display areas; the second switching area is the difference between the first and second display areas, i.e., the portion belonging to the first display area but not to the second display area; the third switching area is the difference between the second and first display areas, i.e., the portion belonging to the second display area but not to the first display area.

[0502] Using the image switching method provided in this application, different switching areas in the target area can be switched based on different switching orders (or switching priorities) and switching methods.

[0503] In one possible implementation, the first display area is the same as the second display area.

[0504] Thus, the first display area containing the main subject of the first image and the second display area containing the main subject of the second image can also be exactly the same area.

[0505] In one possible implementation, the first time period precedes the second time period.

[0506] This allows you to switch between facial elements first, then non-facial elements; or, switch the main subject of the image first, then the background.

[0507] The various embodiments of this application can be combined arbitrarily to achieve different technical effects.

[0508] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0509] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0510] In summary, the above description is merely an embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made based on the disclosure of this application should be included within the scope of protection of this application.

Claims

1. An image switching method, applied to an electronic device, characterized in that, The electronic device includes a display screen, and the method includes: A first image is displayed on the display screen, the first image including first image elements; The switched image is determined to be the second image, and the second image includes second image elements; Determine the target area and non-target area in the display screen, wherein the target area includes the first display area of ​​the first image element and the second display area of ​​the second image element, and the non-target area includes the area in the display screen other than the target area; During a first time period, the content of the second image is switched from the content of the first image to be displayed in the target area using a first switching method; In the second time period, the content of the second image is switched from the content of the first image to be displayed in the non-target area using a second switching method; wherein the first time period is different from the second time period, and / or the first switching method is different from the second switching method.

2. The method according to claim 1, characterized in that, The target area is a preset area.

3. The method according to claim 1, characterized in that, The determination of the target area and non-target area in the display screen specifically includes: The first display area in the display screen is determined based on the first image using a first algorithm; The second display area in the display screen is determined based on the second image using a first algorithm; The target area is determined based on the first display area and the second display area; The non-target region is determined based on the target region.

4. The method according to any one of claims 1-3, characterized in that, The first image element is a face element, and the second image element is a face element.

5. The method according to claim 4, characterized in that, The second image is an image generated based on the first image.

6. The method according to claim 4 or 5, characterized in that, During the process of switching the display of the content of the second image from the content of the first image in the non-target area using a second switching method, granular occlusions are displayed in the non-target area.

7. The method according to claim 6, characterized in that, During the process of switching the display of the content of the second image from the content of the first image in the target area using a first switching mode, no granular obstructions are displayed in the target area.

8. The method according to claim 6 or 7, characterized in that, The display of granular obstructions in the non-target area specifically includes: In the non-target area, granular occlusions of different densities are displayed based on their distance from the target area; the closer the occlusions are to the target area, the lower their density.

9. The method according to claim 6 or 7, characterized in that, The second switching mode is used to present the visual effect of granular occlusions spreading outward from the target area.

10. The method according to any one of claims 4-9, characterized in that, The first image is an Always-On Display (AOD) wallpaper, and the second image is a wallpaper when the screen is on.

11. The method according to any one of claims 1-10, characterized in that, The first display area is the same as the second display area.

12. The method according to any one of claims 1-3, characterized in that, The first image element is the main body of the first image, and the second image element is the main body of the second image.

13. The method according to claim 12, characterized in that, The first display area includes the second display area; the target area includes a first switching area and a second switching area, wherein the first switching area is the second display area, and the second switching area is the difference between the first display area and the second display area; The step of switching the display of the content of the second image from the content of the first image in the target area using a first switching method during the first time period specifically includes: In the first sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a third switching method; In the second sub-time period, the content of the second image is switched from the content of the first image to the content of the second image in the second switching area using a fourth switching method; wherein the first sub-time period is different from the second sub-time period, and / or the third switching method is different from the fourth switching method.

14. The method according to claim 12, characterized in that, The second display area includes the first display area; the target area includes a first switching area and a third switching area, wherein the first switching area is the first display area, and the third switching area is the difference between the second display area and the first display area; The step of switching the display of the content of the second image from the content of the first image in the target area using a first switching method during the first time period specifically includes: In the third sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a fifth switching method; In the fourth sub-time period, the content of the second image is switched from the content of the first image to the content of the second image in the third switching area using a sixth switching method; wherein the third sub-time period is different from the fourth sub-time period, and / or the fifth switching method is different from the sixth switching method.

15. The method according to claim 12, characterized in that, The first display area and the second display area do not overlap; the target area includes a second switching area and a third switching area, wherein the second switching area is the first display area and the third switching area is the second display area; The step of switching the display of the content of the second image from the content of the first image in the target area using a first switching method during the first time period specifically includes: In the fifth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a seventh switching method; In the sixth sub-time period, the content of the second image is switched from the content of the first image to the content of the second image in the second switching area using the eighth switching method; wherein the fifth sub-time period is different from the sixth sub-time period, and / or the seventh switching method is different from the eighth switching method.

16. The method according to claim 12, characterized in that, The target area includes a first switching area, a second switching area, and a third switching area. The first switching area is the intersection of the first display area and the second display area. The second switching area is the difference between the first display area and the second display area. The third switching area is the difference between the second display area and the first display area. The step of switching the display of the content of the second image from the content of the first image in the target area using a first switching method during the first time period specifically includes: In the seventh sub-time period, the content of the second image is switched from the content of the first image to be displayed in the first switching area using a ninth switching method; In the eighth sub-time period, the content of the second image is switched from the content of the first image to be displayed in the second switching area using a tenth switching method; In the ninth sub-time period, the content of the second image is switched from the content of the first image to the content of the second image in the third switching area using an eleventh switching method; wherein the seventh, eighth, and ninth sub-time periods are different from each other, and / or the ninth, tenth, and eleventh switching methods are different from each other.

17. The method according to any one of claims 12-16, characterized in that, The first display area is the same as the second display area.

18. The method according to any one of claims 1-17, characterized in that, The first time period is earlier than the second time period.

19. An electronic device, characterized in that, The device includes one or more processors, one or more memories, and one or more displays; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer instructions, which, when the one or more processors execute the computer instructions, implement the image switching method according to any one of claims 1-18.

20. A chip system, characterized in that, It includes a processing circuit and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to execute the code instructions to perform the image switching method according to any one of claims 1-18.

21. A readable storage medium, characterized in that, The device stores computer instructions that, when executed by a processor, implement the image switching method according to any one of claims 1-18.

22. A computer program product, characterized in that, Includes computer instructions, which, when executed by a processor, implement the image switching method according to any one of claims 1-18.