Wallpaper editing method, electronic equipment and storage medium

By obtaining the display area information of the lock screen wallpaper page, automatically adjusting the position or size of the foreground object in the picture, it solves the cumbersome operation problems of users when setting wallpaper and improves the user experience.

CN120335681AActive Publication Date: 2025-07-18HONOR DEVICE CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410046083.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2025-07-18
Estimated Expiration
2044-01-10

AI Technical Summary

Technical Problem

When users set up wallpapers for the lock screen interface and desktop of electronic devices, they need to manually adjust the position or size of the subject in the picture many times to achieve better results, which is cumbersome and affects the user experience.

Method used

By obtaining the display area information and candidate pictures of the lock screen wallpaper page, the position or size of the foreground object in the picture in the lock screen interface or desktop is automatically adjusted to simplify user operations.

Benefits of technology

It realizes automatic adjustment of wallpaper effects, reduces user operation steps and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335681A_ABST
    Figure CN120335681A_ABST
Patent Text Reader

Abstract

The invention discloses a wallpaper editing method, electronic equipment and a storage medium. According to the method, a candidate picture and position information of a first display area of a screen locking wallpaper page can be obtained, then position information of the first area is obtained based on the position information of the first display area and the candidate picture, and then the candidate picture is adjusted according to the position information of the first display area and the position information of the first area. Compared with the situation that a user needs to manually adjust the position or size of a main body in a picture in a lock screen interface or a desktop for multiple times when selecting one picture as wallpaper from pictures in a picture library of the electronic equipment, the method and the device have the advantages that the candidate pictures can be adjusted according to the position information of the first display area and the position information of the first area; therefore, the position or the size of the foreground object in the picture in the lock screen interface or the desktop can be automatically adjusted, the user operation is simplified, a better wallpaper effect can be displayed, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and particularly to a wallpaper editing method, an electronic device, and a storage medium. Background Art

[0002] With the continuous development of terminal technology, electronic devices such as mobile phones and tablet computers have become increasingly popular, bringing great convenience to people's daily lives. Users can set wallpapers for the lock screen interface and desktop of electronic devices to improve aesthetics. However, when a user currently selects a picture from the pictures in the gallery of an electronic device as a wallpaper, the user needs to manually adjust the position or size of the main body in the picture (the main body in the picture is also called the foreground object) on the lock screen interface or desktop many times to display a better wallpaper effect. The operation is cumbersome and affects the experience. Summary of the Invention

[0003] This application provides a wallpaper editing method, an electronic device, and a storage medium, which can automatically adjust the position or size of the foreground object in the picture on the lock screen interface or desktop, reduce user operations, and improve the user experience. The technical solutions are as follows:

[0004] In a first aspect, a wallpaper editing method is provided. The method includes:

[0005] Display a lock screen wallpaper page, where the lock screen wallpaper page includes a replace picture button;

[0006] In response to an operation on the replace picture button, obtain candidate pictures and position information of a first display area of the lock screen wallpaper page. The candidate pictures include foreground objects;

[0007] Based on the position information of the first display area and the candidate pictures, obtain position information of a first area. The first area includes the foreground object, and the aspect ratio of the width and height of the first area is the same as that of the first display area;

[0008] Adjust the candidate pictures according to the position information of the first display area and the position information of the first area to obtain a first display picture corresponding to the candidate pictures;

[0009] Display the first display picture corresponding to the candidate pictures in the first display area.

[0010] In an embodiment of the present application, after the electronic device responds to the user's operation on the replace picture button, it can obtain candidate pictures and the position information of the first display area of the lock screen wallpaper page, and then obtain the position information of the first area based on the position information of the first display area and the candidate pictures. Subsequently, according to the position information of the first display area and the position information of the first area, the candidate pictures are adjusted. When the user selects a picture from the pictures in the gallery of the electronic device as the wallpaper, the user needs to manually adjust the position or size of the foreground object in the picture on the lock screen interface or the desktop multiple times. In the embodiment of the present application, the candidate pictures can be adjusted according to the position information of the first display area and the position information of the first area, so that the position or size of the foreground object in the picture can be automatically adjusted on the lock screen interface or the desktop, simplifying the user operation. Moreover, a better wallpaper effect can be displayed, improving the user experience.

[0011] In combination with the first aspect, in some implementation manners of the first aspect, adjusting the candidate pictures according to the position information of the first display area and the position information of the first area to obtain the first display picture corresponding to the candidate pictures includes:

[0012] Determining the offset information and the scaling ratio information of the first area relative to the first display area according to the position information of the first display area and the position information of the first area;

[0013] Adjusting the candidate pictures based on the offset information and the scaling ratio information to obtain the first display picture corresponding to the candidate pictures.

[0014] In combination with the first aspect, in some implementation manners of the first aspect, obtaining the position information of the first area based on the position information of the first display area and the candidate pictures includes:

[0015] Obtaining the position information of the clock frame of the clock layer;

[0016] Obtaining the position information of the first area based on the position information of the first display area, the candidate pictures, and the position information of the clock frame.

[0017] In combination with the first aspect, in some implementation manners of the first aspect, the method further includes:

[0018] Processing the candidate pictures to generate the first matte picture;

[0019] Adjusting the first matte picture according to the position information of the first display area and the position information of the first area to obtain the first display picture corresponding to the first matte picture;

[0020] Displaying the first display picture corresponding to the first matte picture in the first display area.

[0021] In combination with the first aspect, in some implementations of the first aspect, the currently used lock screen wallpaper file includes multiple decorative layers with a photo frame effect, and the method further includes:

[0022] Obtain the position information of the security lines on the pictures in the multiple decorative layers;

[0023] According to the position information of the first display area and the first display picture corresponding to the first cut-out picture, determine the target security lines where multiple security lines are mapped to the first mapped area, and generate the position information of the target security lines;

[0024] According to the position information of the target security lines, determine the number of first pixel points on the target security lines, and the pixel value of the first pixel points is zero;

[0025] When it is determined that the number of the first pixel points is greater than the first threshold, based on the position information of the transparent areas on the pictures of the multiple decorative layers, adjust the candidate picture to obtain the second display picture corresponding to the candidate picture;

[0026] Display the second display picture corresponding to the candidate picture in the transparent areas on the pictures of the multiple decorative layers.

[0027] In combination with the first aspect, in some implementations of the first aspect, according to the position information of the first display area and the first display picture corresponding to the first cut-out picture, determine the target security lines where multiple security lines are mapped to the first mapped area, and generate the position information of the target security lines, including:

[0028] According to the position information of the first display area and the first display picture corresponding to the first cut-out picture, determine the first mapped area where the first display area is mapped to the first display picture corresponding to the first cut-out picture, and generate the position information of the first mapped area. The first mapped area includes the foreground object in the first display picture corresponding to the first cut-out picture;

[0029] According to the position information of the multiple security lines and the position information of the first mapped area, determine the target security lines where the multiple security lines are mapped to the first mapped area, and generate the position information of the target security lines.

[0030] In combination with the first aspect, in some implementations of the first aspect, when it is determined that the number of the first pixel points is greater than the first threshold, based on the position information of the transparent areas on the pictures of the multiple decorative layers, adjust the candidate picture to obtain the second display picture corresponding to the candidate picture, including:

[0031] When it is determined that the number of the first pixel points is greater than the first threshold, according to the position information of the transparent areas on the pictures of the multiple decorative layers, determine the position information of the second display area of the lock screen wallpaper page;

[0032] Based on the second display area and the candidate picture, obtain the position information of the second area, where the second area includes the foreground object of the candidate picture, and the aspect ratio of the second area is the same as that of the second display area;

[0033] Adjust the candidate picture according to the position information of the second display area and the position information of the second area to obtain the second display picture corresponding to the candidate picture;

[0034] Display the second display picture corresponding to the candidate picture in the transparent area on the pictures of multiple decoration layers, including:

[0035] Display the second display picture corresponding to the candidate picture in the second display area.

[0036] In a second aspect, a wallpaper editing method is provided, and the method includes:

[0037] Display the lock screen wallpaper page;

[0038] In response to an operation on the lock screen wallpaper page, obtain the third display picture of the original layer, the third display picture of the matte layer, the first position information of the first display area of the lock screen wallpaper page, and the position information of the clock frame in the clock layer;

[0039] Generate the position information of the third mapping area according to the third display picture of the matte layer, the position information of the first display area of the lock screen wallpaper page, and the position information of the clock frame;

[0040] Determine the visibility of the matte layer according to the position information of the third mapping area and the foreground object of the third display picture of the matte layer;

[0041] When the visibility of the matte layer is visible, set the visibility of the matte layer to be visible;

[0042] Display the third display picture of the original layer and the third display picture of the matte layer in the first display area of the lock screen wallpaper page.

[0043] In the embodiments of the present application, the electronic device can, in response to an operation on the lock screen wallpaper page, generate the position information of the third mapping area according to the third display picture of the matte layer, the position information of the first display area of the lock screen wallpaper page, and the position information of the clock frame; determine the visibility of the matte layer according to the position information of the third mapping area and the foreground object of the third display picture of the matte layer. When the visibility of the matte layer is visible, when the matte layer and the clock layer are superimposed and displayed, a depth of field effect can be displayed. That is, during the process of the user operating on the lock screen wallpaper page, the electronic device can display the depth of field effect in real time according to the user operation, improving the user experience.

[0044] In connection with the second aspect, in some implementations of the second aspect, according to the third display picture of the cutout layer, the position information of the first display area of the lock screen wallpaper page, and the position information of the clock frame, the position information of the third mapping area is generated, including:

[0045] According to the third display picture of the cutout layer and the position information of the first display area of the lock screen wallpaper page, determine the second mapping area where the first display area of the lock screen wallpaper page is mapped onto the third display picture of the cutout layer, and generate the position information of the second mapping area. The foreground object of the third display picture of the cutout layer is included in the second mapping area;

[0046] According to the position information of the clock frame and the position information of the second mapping area, determine the third mapping area where the clock frame is mapped onto the second mapping area, and generate the position information of the third mapping area.

[0047] In connection with the second aspect, in some implementations of the second aspect, according to the position information of the third mapping area and the foreground object of the third display picture of the cutout layer, determine the visibility of the cutout layer, including:

[0048] According to the position information of the third mapping area, determine the position information of the midpoint connection line of the short sides of the third mapping area;

[0049] According to the position information of the midpoint connection line of the short sides of the third mapping area, determine the number of first pixel points on the midpoint connection line of the short sides of the third mapping area, and the pixel value of the first pixel point is zero;

[0050] When it is determined that the number of the first pixel points is less than the second threshold, determine that the visibility of the cutout layer is visible.

[0051] In connection with the second aspect, in some implementations of the second aspect, the currently used lock screen wallpaper file includes multiple decorative layers with a photo frame effect. The method further includes:

[0052] Obtain the position information of the security lines on the pictures in the multiple decorative layers;

[0053] According to the position information of the first display area of the lock screen wallpaper page and the third display picture of the cutout layer, determine the fourth mapping area where the first display area of the lock screen wallpaper page is mapped onto the third display picture of the cutout layer, and generate the position information of the fourth mapping area. The foreground object in the third display picture of the cutout layer is included in the fourth mapping area;

[0054] According to the position information of the multiple security lines and the position information of the fourth mapping area, determine the target security lines where the multiple security lines are mapped onto the fourth mapping area, and generate the position information of the target security lines;

[0055] Determine the number of first pixel points on the target security line according to the position information of the target security line, where the pixel values of the first pixel points are zero;

[0056] When it is determined that the number of the first pixel points is greater than the first threshold, determine that the visibility of the matte layer is visible, and set the visibility of the matte layer to be visible;

[0057] Display the third display picture of the original layer and the third display picture of the matte layer in the first display area of the lock screen wallpaper page.

[0058] In a third aspect, an electronic device includes: one or more processors, and a memory;

[0059] The memory is coupled to the one or more processors, and the memory is used to store computer program code. The computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the electronic device to execute the method according to any one of the first aspect or the second aspect.

[0060] In a fourth aspect, a chip system is applied to an electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions to cause the electronic device to execute the method according to any one of the first aspect or the second aspect.

[0061] In a fifth aspect, a computer-readable storage medium includes instructions. When the instructions run on an electronic device, the electronic device is caused to execute the method according to any one of the first aspect or the second aspect. Description of the Drawings

[0062] Figure 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

[0063] Figure 2 is a schematic diagram of multiple layers provided by an embodiment of the present application;

[0064] Figure 3 is a schematic diagram of different types of layers provided by an embodiment of the present application;

[0065] Figure 4 is a schematic diagram of a lock screen wallpaper provided by an embodiment of the present application;

[0066] Figure 5 is a schematic diagram of a wallpaper provided by an embodiment of the present application;

[0067] Figure 6 is a schematic diagram of the hierarchy of layers provided by an embodiment of the present application;

[0068] Figure 7 is a schematic diagram of a wallpaper editing interface provided by an embodiment of the present application;

[0069] Figure 8 It is a schematic diagram of entering the wallpaper editing interface provided by an embodiment of the present application;

[0070] Figure 9 It is another schematic diagram of entering the wallpaper editing interface provided by an embodiment of the present application;

[0071] Figure 10 It is a schematic diagram of selecting a wallpaper template provided by an embodiment of the present application;

[0072] Figure 11 It is a schematic diagram of setting a clock provided by an embodiment of the present application;

[0073] Figure 12 It is a schematic diagram of setting a decorative piece provided by an embodiment of the present application;

[0074] Figure 13 It is a schematic diagram of setting a depth-of-field effect provided by an embodiment of the present application;

[0075] Figure 14 It is a schematic diagram of replacing a picture provided by an embodiment of the present application;

[0076] Figure 15 It is a schematic diagram of picture zooming and moving provided by an embodiment of the present application;

[0077] Figure 16 It is a schematic diagram of setting a lock screen wallpaper provided by an embodiment of the present application;

[0078] Figure 17 It is a schematic diagram of following the lock screen provided by an embodiment of the present application;

[0079] Figure 18 It is a schematic diagram of setting a color provided by an embodiment of the present application;

[0080] Figure 19 It is a schematic diagram of an implementation environment involved in a wallpaper editing method provided by an embodiment of the present application;

[0081] Figure 20 It is a technical architecture diagram related to a wallpaper editing module provided by an embodiment of the present application;

[0082] Figure 21 It is a flowchart of a wallpaper editing method provided by an embodiment of the present application;

[0083] Figure 22 It is a schematic diagram of a display area provided by an embodiment of the present application;

[0084] Figure 23 It is a schematic diagram of a target area provided by an embodiment of the present application;

[0085] Figure 24 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0086] Figure 25 It is a schematic diagram of a json file provided by an embodiment of the present application;

[0087] Figure 26 It is a schematic diagram of another target area provided by an embodiment of the present application;

[0088] Figure 27 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0089] Figure 28 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0090] Figure 29 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0091] Figure 30 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0092] Figure 31 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0093] Figure 32 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0094] Figure 33 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0095] Figure 34 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0096] Figure 35 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0097] Figure 36 It is a flowchart of another wallpaper editing method provided by an embodiment of the present application;

[0098] Figure 37 It is a schematic diagram of another display area provided by an embodiment of the present application. Detailed implementation manners

[0099] In the following description, specific details such as specific system architectures and technologies are presented for illustration rather than limitation, in order to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details.

[0100] It should be understood that when used in the specification and claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0101] It should be understood that the "one or more" mentioned in the present application refers to one, two or more than two, and the "multiple" mentioned in the present application refers to two or more than two. In the description of the present application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. The "and / or" herein is merely a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone.

[0102] In addition, in order to facilitate a clear description of the technical solution of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the terms "first", "second", etc. do not limit the quantity and execution order, and the terms "first", "second", etc. do not necessarily mean different.

[0103] The statements such as "an embodiment" or "some embodiments" described in the present application mean that the specific features, structures or characteristics described in the embodiment are included in one or more embodiments of the present application. Thus, the statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" and the like that appear in different parts of the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.

[0104] The wallpaper editing method provided by the embodiments of the present application can be applied to an electronic device. The electronic device can be a mobile phone, a tablet computer, a wearable device, a digital camera, a vehicle-mounted device, an augmented reality (AR) device, a virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a laptop, etc., and the embodiments of the present application do not limit this.

[0105] Figure 1 It is a schematic structural diagram of an electronic device provided by the embodiments of the present application. Refer to Figure 1 , the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0106] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

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

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

[0109] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0110] The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to implement the storage capacity expansion of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.

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

[0112] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

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

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

[0115] The electronic device 100 implements a display function through the GPU, the display screen 194, and the application processor, etc.

[0116] The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 194 is used to display images, videos, etc.

[0117] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor 180K 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 the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from the display screen 194.

[0118] The embodiment of the present application does not particularly limit the specific structure of the execution subject of the wallpaper editing method, as long as the code recording the wallpaper editing method provided by the embodiment of the present application can be run to perform processing according to the wallpaper editing method provided by the embodiment of the present application. For example, the execution subject of the wallpaper editing method provided by the embodiment of the present application can be a functional module in an electronic device that can call and execute a program, or can be a processing device applied to an electronic device, such as a chip.

[0119] Next, the wallpaper involved in the wallpaper editing method provided in the embodiment of the present application is described.

[0120] The wallpaper in the embodiment of the present application may include multiple layers. The layers described in the embodiment of the present application may also be referred to as views.

[0121] There is a hierarchical relationship between the multiple layers, and the hierarchical relationship refers to the upper and lower layer relationship of the multiple layers when displayed. Generally, the layer in the upper layer will partially or completely cover the layer in the lower layer when displayed.

[0122] Figure 2 is a schematic diagram of multiple layers provided in an embodiment of the present application. The multiple layers can be divided into multiple types.

[0123] For example, Figure 2 As shown, the multiple layers may include five types of layers, namely: original layer, color background layer, decoration layer, clock layer, and cutout layer.

[0124] Generally, the original layer is at the bottom. The color background layer is lower than the decoration layer, clock layer, and cutout layer. The decoration layer can be lower than the clock layer and cutout layer in some cases, and can also be higher than the clock layer and cutout layer in some cases. The clock layer can be lower than the cutout layer.

[0125] The image of the original layer can be called the main image. For example, the main image can be a picture selected by the user, such as a picture selected by the user from a picture library, or a picture selected by the user from pictures preset in the electronic device. Alternatively, the main image can be a picture of the original layer included in a wallpaper template selected by the user from multiple wallpaper templates preset in the electronic device. For example, the original layer can be Figure 3 The layer shown in Figure (a).

[0126] The color background layer is a picture that has a certain color as a whole. For example, the color of the picture can be a pure color or a gradient color. For example, the color background layer can be Figure 3The layer shown in Figure (b) therein, and the color of the picture of this color background layer can be a solid color.

[0127] The picture of the decoration layer is a picture that can decorate the main picture. By way of example, this picture can be a picture with a photo frame effect, or can be a picture containing text content, or can be a picture with a certain texture, or can be a picture with a mask effect, etc., and the embodiments of the present application do not limit this. For example, this decoration layer can be Figure 3 The layer shown in Figure (c) or Figure (d) therein. Figure 3 When the decoration layer shown in Figure (c) therein is superimposed and displayed with Figure 3 the decoration layer shown in Figure (d) therein, a photo frame effect can be formed.

[0128] The clock layer is a layer for displaying time, and this time can be the system time of the electronic device. By way of example, this clock layer can be Figure 3 The layer shown in Figure (e) therein.

[0129] The picture of the cut-out layer can be obtained from the picture of the original layer. By way of example, the picture of the cut-out layer can be the picture of the foreground object in the picture of the original layer. In some embodiments, the foreground object can be extracted from the picture of the original layer according to the object information and edge information in the picture of the original layer. For example, when the original layer is Figure 3 the layer shown in Figure (a) therein, this cut-out layer can be Figure 3 The layer shown in Figure (f) therein.

[0130] In practical applications, Figure 2 the hierarchy of each layer shown is not uniquely determined, and the hierarchy of each layer can also be changed according to the actual situation, or the corresponding layers can be deployed according to the wallpaper editing function of the electronic device. And, in practical applications, the types of layers are not limited to Figure 2 the five types shown, and other types can be set according to requirements.

[0131] The wallpaper in the embodiments of the present application can include one or more types of layers, and in some cases can also include one or more decoration layers.

[0132] By way of example, the desktop wallpaper can include the original layer.

[0133] By way of example, the lock screen wallpaper can successively include, from the bottommost layer to the topmost layer: the original layer, the clock layer. For example, the lock screen wallpaper can be Figure 4 the wallpaper shown in Figure (a) therein, and this wallpaper includes Figure 3 the original layer shown in Figure (a) therein and Figure 3 the clock layer shown in Figure (e) therein.

[0134] Alternatively, the lock screen wallpaper may sequentially include, from the bottommost layer to the topmost layer: an original layer, a color background layer, a clock layer, and a cutout layer. For example, the lock screen wallpaper may be the wallpaper shown in FIG. (b) of Figure 4 , which includes the original layer shown in FIG. (a) of Figure 3 , the color background layer shown in FIG. (b) of Figure 3 , the clock layer shown in FIG. (e) of Figure 3 , and the cutout layer shown in FIG. (f) of Figure 3 .

[0135] Alternatively, the lock screen wallpaper may sequentially include, from the bottommost layer to the topmost layer: an original layer, a decoration layer 1, a clock layer, and a decoration layer 2. For example, the lock screen wallpaper may be the wallpaper shown in FIG. (c) of Figure 4 , which includes the original layer shown in FIG. (a) of Figure 3 , the decoration layer shown in FIG. (c) of Figure 3 , the clock layer shown in FIG. (e) of Figure 3 , and the decoration layer shown in FIG. (d) of Figure 3 .

[0136] Alternatively, the lock screen wallpaper may sequentially include, from the bottommost layer to the topmost layer: an original layer, a decoration layer 1, a clock layer, a cutout layer, and a decoration layer 2. For example, the lock screen wallpaper may be the wallpaper shown in FIG. (d) of Figure 4 , which includes the original layer shown in FIG. (a) of Figure 3 , the decoration layer shown in FIG. (c) of Figure 3 , the clock layer shown in FIG. (e) of Figure 3 , the cutout layer shown in FIG. (f) of Figure 3 , and the decoration layer shown in FIG. (d) of Figure 3 .

[0137] Compared with the wallpaper shown in FIG. (c) of Figure 4 , through the interaction of the original layer, the decoration layer, the clock layer, and the cutout layer, the wallpaper shown in FIG. (d) of Figure 4 can make the picture have a foreground-background level effect, and in the embodiments of the present application, this effect is called the depth of field effect.

[0138] Of course, in addition to the above examples, various types of layers can also be flexibly combined in other ways to obtain a lock screen wallpaper with better visual effects, and the embodiments of the present application do not limit this.

[0139] It should be noted that the above Figure 3 and Figure 4 are only exemplary descriptions of the layers and the wallpaper, and do not limit the embodiments of the present application.

[0140] As can be seen from the above, the wallpaper in the embodiment of the present application can be obtained by superimposing multiple layers according to a hierarchical relationship. Figure 5 By processing a subject image shown in Figure (a) in the figure, we can get Figure 5 The wallpaper shown in Figure (b) may include Figure 6 The 7 layers shown in Figure (a) are: original layer, decoration layer 1, decoration layer 2, clock layer, cutout layer, decoration layer 3, and decoration layer 4, and their levels from low to high are: 1, 2, 3, 4, 5, 6, and 7. The wallpaper has rich visual elements and can meet the personalized needs of users.

[0141] In some embodiments, Figure 6 As shown in Figure (b), the layer has position information, which can be represented by coordinates (x, y, z). Among them, (x, y) is the center position of the layer. Among them, (z) is used to indicate the level of the layer in all the layers of the wallpaper. It can be seen that in Figure 6 Among the 7 layers shown, the Z values of the layers increase from the leftmost layer to the rightmost layer.

[0142] The wallpaper editing function provided in the embodiment of the present application can edit various types of layers included in the wallpaper. For example, for the original layer, you can scale, move, blur it, etc.; for the color background layer, you can adjust its color, etc.; for the decoration layer, you can adjust its style, color, etc.; for the clock layer, you can adjust its font, color, etc.; for the cutout layer, you can adjust its depth of field effect, etc.

[0143] The wallpaper editing function provided in the embodiment of the present application can be implemented based on the wallpaper editing interface. The wallpaper editing interface is described below.

[0144] Figure 7 is a schematic diagram of a wallpaper editing interface provided in an embodiment of the present application. Figure 7 The wallpaper editing interface 700 may include function buttons, a lock screen wallpaper page 702 , and a desktop wallpaper page 703 .

[0145] The function buttons may include main function buttons, such as a return button 70, an application button 71, etc. The function buttons may also include a button for editing wallpaper, which may provide various editing functions.

[0146] The lock screen wallpaper page 702 is a page for previewing the edited lock screen wallpaper, wherein the lock screen wallpaper refers to the wallpaper displayed on the lock screen interface.

[0147] The desktop wallpaper page 703 is a page for previewing the edited desktop wallpaper. Here, the desktop wallpaper refers to the wallpaper displayed on the desktop after the electronic device is unlocked. Optionally, the desktop wallpaper page 703 can also display a thumbnail of the desktop content, so as to better preview the display effect of the desktop wallpaper.

[0148] The lock screen wallpaper page 702 and the desktop wallpaper page 703 can exist in a paged form, and the two can be switched and displayed through a sliding operation. For example, in Figure 7 the lock screen wallpaper page 702 is displayed in the wallpaper editing interface 700 shown in Figure (a). After the user swipes left in the wallpaper editing interface 700, as Figure 7 shown in Figure (b), the wallpaper editing interface 700 can display the desktop wallpaper page 703. After that, after the user swipes right in the wallpaper editing interface 700 shown in Figure (b) in Figure 7 , as Figure 7 shown in Figure (a), the wallpaper editing interface 700 can display the lock screen wallpaper page 702.

[0149] Exemplarily, as Figure 7 shown in Figure (a), when the lock screen wallpaper page 702 is displayed in the wallpaper editing interface 700, the wallpaper editing interface 700 can also display relevant function buttons for editing the lock screen wallpaper, such as the change picture button 75, the lock screen style button 72, the personalized decoration button 73, the depth of field effect button 74, etc. The embodiments of the present application do not limit this.

[0150] Exemplarily, as Figure 7 shown in Figure (b), when the desktop wallpaper page 703 is displayed in the wallpaper editing interface 700, the wallpaper editing interface 700 can also display relevant function buttons for editing the desktop wallpaper, such as the follow lock screen button 76, the color button 77, the select wallpaper button 78, the blur button 79, etc. The embodiments of the present application do not limit this.

[0151] In some embodiments, as Figure 7 shown, the wallpaper editing interface 700 can also include a mask layer 704. Exemplarily, the mask layer 704 can be a blur mask layer, and the blur mask layer refers to a mask layer obtained through blur processing. In this case, the function buttons, the lock screen wallpaper page 702, and the desktop wallpaper page 703 can all be displayed on the upper layer of the mask layer 704.

[0152] Exemplarily, the mask layer 704 can be obtained by blur processing the main picture of the lock screen wallpaper displayed on the lock screen wallpaper page 702. Or, the mask layer 704 can be obtained by blur processing the desktop wallpaper displayed on the desktop wallpaper page 703. Of course, the mask layer 704 can also be obtained by other means, such as by blur processing a preset picture. The embodiments of the present application do not limit this.

[0153] In some embodiments, the wallpaper editing interface 700 can be entered from the lock screen interface or the desktop.

[0154] As an example, as shown in figure (a) of Figure 8 , when the electronic device displays the lock screen interface 800, the user can perform a first gesture operation in the lock screen interface 800 ( Figure 8 taking the two-finger pinch operation as an example in Figure 8 ). In response to the first gesture operation, the electronic device can display the wallpaper editing interface 700 shown in figure (b) of Figure 8 . The wallpaper editing interface 700 displays the lock screen wallpaper page 702 and related function buttons for editing the lock screen wallpaper. In this case, the user can edit the lock screen wallpaper based on the wallpaper editing interface 700 shown in figure (b) of

[0155] . If the user wants to edit the desktop wallpaper, they can swipe left in the wallpaper editing interface 700 shown in figure (b) of Figure 8 . Then, as shown in figure (c) of Figure 8 , the wallpaper editing interface 700 can display the desktop wallpaper page 703 and related function buttons for editing the desktop wallpaper. In this case, the user can edit the desktop wallpaper based on the wallpaper editing interface 700 shown in figure (c) of Figure 8 .

[0156] As another example, as shown in figure (a) of Figure 9 , when the electronic device displays the desktop 900, the user can perform a second gesture operation in the desktop 900 ( Figure 9 taking the two-finger pinch operation as an example in Figure 9 ). In response to the second gesture operation, the electronic device displays the desktop editing interface shown in figure (b) of Figure 9 . This desktop editing interface can display related buttons for editing the desktop, such as wallpaper buttons, card buttons, switching effect buttons, desktop setting buttons, etc. Then, the user clicks the wallpaper button in this desktop editing interface. In response to this click operation, the electronic device can display the wallpaper editing interface 700 shown in figure (c) of Figure 9 . The wallpaper editing interface 700 displays the desktop wallpaper page 703 and related function buttons for editing the desktop wallpaper. In this case, the user can edit the desktop wallpaper based on the wallpaper editing interface 700 shown in figure (c) of

[0157] . If the user wants to edit the lock screen wallpaper, they can swipe right in the wallpaper editing interface 700 shown in figure (c) of Figure 9 . Then, as shown in figure (a) of Figure 9As shown in Figure (d), the wallpaper editing interface 700 may display the lock screen wallpaper page 702 and relevant function buttons for editing the lock screen wallpaper. In this case, the user may edit the lock screen wallpaper based on Figure 9 the wallpaper editing interface 700 shown in Figure (d).

[0158] Next, the specific process of editing the lock screen wallpaper based on the wallpaper editing interface 700 will be described.

[0159] The embodiments of the present application provide capabilities such as wallpaper templates, clock customization, ornament setting, depth of field setting, picture replacement, and picture scaling for the lock screen wallpaper. Through these capabilities, users can edit personalized and characteristic wallpapers.

[0160] As an example, after the electronic device displays the wallpaper editing interface 700 shown in Figure (a), the user may click the lock screen style button 72. In response to this click operation, as Figure 10 shown in Figure (b), the electronic device may pop up a window 7011 from the bottom of the wallpaper editing interface 700. Multiple wallpaper template options are displayed in the window 7011, and further, picture options in the gallery and some wallpaper picture options preset in the electronic device may also be displayed. Suppose the user selects a wallpaper template from these multiple wallpaper templates. In response to the selection operation of this wallpaper template, as Figure 10 shown in Figure (c), the electronic device may close the window 7011 and display this wallpaper template in the lock screen wallpaper page 702. Figure 10

[0161] Figure 11 As an example, after the electronic device displays the wallpaper editing interface 700 shown in Figure (a), the user may click the clock frame 710 in the lock screen wallpaper page 702. In response to this click operation, as Figure 11 shown in Figure (b), the electronic device may pop up a window 7012 from the bottom of the wallpaper editing interface 700. Multiple clock font options and multiple clock color options are displayed in the window 7012. The user may adjust the font of the clock in the wallpaper of the lock screen wallpaper page 702 through these clock font options, and adjust the color of the clock in the wallpaper of the lock screen wallpaper page 702 through these clock color options. Suppose the user selects a clock color. In response to the selection operation of this clock color, as Figure 11 shown in Figure (c), the electronic device may set the color of the clock in the wallpaper of the lock screen wallpaper page 702 to this clock color, so that the user can view the clock display effect. After that, if the user determines to complete the setting of the clock, as Figure 11 shown in Figure (c), the user may click the folding button 712. In response to this click operation, as Figure 11 shown in Figure (c),​As shown in Figure (d), the electronic device can close the pop-up window 7012.

[0162] As an example, the electronic device displays Figure 12 After the wallpaper editing interface 700 shown in FIG. (a) is displayed, the user can click the personalized decoration button 73. In response to the click operation, as shown in FIG. Figure 12 As shown in FIG. 7( b), the electronic device can pop up a pop-up window 7013 from the bottom of the wallpaper editing interface 700, and the pop-up window 7013 displays multiple style options and multiple color options. The user can adjust the style of the decorative element in the wallpaper of the lock screen wallpaper page 702 through these style options, and adjust the color of the decorative element in the wallpaper of the lock screen wallpaper page 702 through these color options. Assuming that the user selects a color, in response to the selection operation of this color, Figure 12 As shown in FIG. 7(c), the electronic device can set the color of the decorative element in the wallpaper of the lock screen wallpaper page 702 to this color, so that the user can view the display effect of the decorative element. Figure 12 As shown in FIG. (c) of FIG. 1 , the user can click the fold button 713. In response to the click operation, as shown in FIG. Figure 12 As shown in Figure (d), the electronic device can close the pop-up window 7013.

[0163] As an example, the electronic device displays Figure 13 After the wallpaper editing interface 700 shown in FIG. (a) is displayed, the user can click the depth of field effect button 74. In response to the click operation, as shown in FIG. Figure 13 As shown in FIG. 7( b ), the electronic device may pop up a pop-up window 7014 from the bottom of the wallpaper editing interface 700 , and the pop-up window 7014 may display a depth of field effect switch 7141 , and may further display a background blur control 7142 ( Figure 13 The user can use the depth of field effect switch 7141 to turn on or off the depth of field effect of the wallpaper on the lock screen wallpaper page 702, and use the background blur control 7142 to adjust the blur of the background part of the main image of the wallpaper on the lock screen wallpaper page 702. Assuming that the user turns off the depth of field effect switch 7141, in response to the turning off operation of the depth of field effect switch 7141, Figure 13 As shown in FIG. 7( c ), the electronic device can turn off the depth of field effect of the wallpaper on the lock screen wallpaper page 702. Afterwards, if the user determines that the depth of field setting is completed, Figure 13 As shown in FIG. (c) of FIG. 71, the user can click the fold button 7143. In response to the click operation, as shown in FIG. Figure 13 As shown in Figure (d), the electronic device can close the pop-up window 7014.

[0164] As an example, the electronic device displaysFigure 14 After the wallpaper editing interface 700 shown in FIG. (a) in Figure 14 is presented, the user can click the change picture button 75. In response to this click operation, as shown in FIG. (b) in Figure 14 the electronic device can pop up a window 7015 from the bottom of the wallpaper editing interface 700, and picture options in the gallery are displayed in the window 7015. Suppose the user selects a picture from these pictures, then in response to the selection operation of this picture, as shown in FIG. (c) in

[0165] Figure 15 As an example, the user can zoom in or out the main picture of the wallpaper on the lock screen wallpaper page 702, and can also move the position of the main picture. For example, as shown in FIG. (a) in Figure 15 Figure 15 if the user performs a two-finger zoom-in operation on the lock screen wallpaper page 702, then in response to this two-finger zoom-in operation, as shown in FIG. (b) in Figure 15 the electronic device can zoom in the main picture of the wallpaper on the lock screen wallpaper page 702. For another example, as shown in FIG. (c) in Figure 15 if the user performs a two-finger zoom-out operation on the lock screen wallpaper page 702, then in response to this two-finger zoom-out operation, as shown in FIG. (d) in Figure 15 the electronic device can zoom out the main picture of the wallpaper on the lock screen wallpaper page 702. For another example, as shown in FIG. (e) in Figure 15 if the user performs a downward movement operation on the wallpaper page 702, then in response to this downward movement operation, as shown in FIG. (f) in

[0166] After editing the lock screen wallpaper in one or more of the above ways, if the user determines that the wallpaper on the current lock screen wallpaper page 702 can meet the requirements, then as shown in FIG. (a) in Figure 16 the user can click the apply button 71 in the wallpaper editing interface 700. In response to this click operation, the electronic device can close the wallpaper editing interface 700, and, as shown in FIG. (b) in Figure 16 the electronic device can set the wallpaper on the lock screen wallpaper page 702 as the lock screen wallpaper of the lock screen interface 800.

[0167] After that, if the user wants to edit the wallpaper again during the process of using the electronic device, then as shown in FIG. (a) in Figure 17 the user can perform a first gesture operation (taking the two-finger pinch operation as an example in Figure 17 ) on the lock screen interface 800. In response to the first gesture operation, the electronic device can display Figure 17The wallpaper editing interface 700 shown in Figure (b) therein. The wallpaper editing interface 700 displays the lock screen wallpaper page 702 and related function buttons for editing the lock screen wallpaper. At this time, the lock screen wallpaper page 702 shows the lock screen wallpaper that the user last edited and completed. In this case, the user can continue to edit the lock screen wallpaper that was last edited and completed. For example, the user can change to another wallpaper template through the lock screen style button 72 in a manner similar to Figure 10 or can reset the clock in the lock screen wallpaper that was last edited and completed through the clock frame 710 in a manner similar to Figure 11 or can reset the style and color of the decorative piece in the lock screen wallpaper that was last edited and completed in a manner similar to Figure 12 or can change the depth of field effect and background blur degree in the lock screen wallpaper that was last edited and completed in a manner similar to Figure 13 or can replace the main picture in the lock screen wallpaper that was last edited and completed in a manner similar to Figure 14 or can scale and / or move the main picture in the lock screen wallpaper that was last edited and completed in a manner similar to Figure 15 Next, the specific process of editing the desktop wallpaper based on the wallpaper editing interface 700 will be described.

[0168] Embodiments of the present application provide capabilities such as following the lock screen, color setting, custom selection, blur, and scaling for the desktop wallpaper. Through these capabilities, users can edit personalized and characteristic wallpapers.

[0169] As an example, the electronic device displays the wallpaper editing interface 700 shown in Figure (a) of

[0170] The wallpaper editing interface 700 displays the lock screen wallpaper page 702 and related function buttons for editing the lock screen wallpaper. The user swipes left in the wallpaper editing interface 700, and then, as shown in Figure (b) of Figure 18 the wallpaper editing interface 700 displays the desktop wallpaper page 703 and related function buttons for editing the desktop wallpaper. Assume that the user clicks the follow lock screen button 76 in the wallpaper editing interface 700. In response to this click operation, as shown in Figure (c) of Figure 18 the electronic device displays the main picture of the wallpaper on the lock screen wallpaper page 702 on the desktop wallpaper page 703. Figure 18

[0171] ​In some possible implementations, after the user clicks the follow lock screen button 76 in the wallpaper editing interface 700, the desktop wallpaper page 703 is in the follow lock screen state. In this case, any operation performed by the user on the main picture in the lock screen wallpaper page 702 will be synchronized to the desktop wallpaper page 703. Specifically, if the user zooms in on the main picture in the lock screen wallpaper page 702, the wallpaper on the desktop wallpaper page 703 will be synchronized and zoomed in; if the user zooms out on the main picture in the lock screen wallpaper page 702, the wallpaper on the desktop wallpaper page 703 will be synchronized and zoomed out; if the user moves the main picture in the lock screen wallpaper page 702, the wallpaper on the desktop wallpaper page 703 will be synchronized and moved.

[0172] As an example, after the electronic device displays the wallpaper editing interface 700 as shown in Figure (a) of Figure 19 , the user can click the color button 77. In response to this click operation, as shown in Figure (b) of Figure 19 , the electronic device can pop up a window 7016 from the bottom of the wallpaper editing interface 700. The gradient color switch 7161 and multiple color options are displayed in the window 7016. The user can set the desktop wallpaper to a solid color wallpaper or a gradient color wallpaper through the gradient color switch 7161, and the user can set the color of the desktop wallpaper through these color options. Optionally, the multiple color options may include a smart color picker option, and the color corresponding to the smart color picker option is the background main color of the main picture of the wallpaper on the lock screen wallpaper page 702. Suppose the user selects a color. In response to the selection operation of this color, when the gradient color switch 7161 is turned off, as shown in Figure (c) of Figure 19 , the electronic device can display a solid color wallpaper of this color on the desktop wallpaper page 703, so that the user can view the wallpaper display effect. After that, if the user determines to complete the color setting, as shown in Figure (c) of Figure 19 , the user can click the collapse button 7162. In response to this click operation, as shown in Figure (d) of Figure 19 , the electronic device can close the window 7016.

[0173] As an example, when the desktop wallpaper page 703 and the related function buttons for editing the desktop wallpaper are displayed in the wallpaper editing interface 700, the user can select a picture from the pictures in the gallery or the wallpaper pictures pre-installed in the electronic device as the wallpaper of the desktop wallpaper page 703 through the select wallpaper button 78 in the wallpaper editing interface 700. This process is similar to the related process of selecting pictures in Figure 10 or Figure 14 above and will not be elaborated here.

[0174] As an example, when the wallpaper editing interface 700 displays the desktop wallpaper page 703 and the related function buttons for editing the desktop wallpaper, the user can adjust the blur degree of the wallpaper on the desktop wallpaper page 703 through the blur button 79 in the wallpaper editing interface 700. This process is similar to the related process of adjusting the blur degree in the above Figure 13 and will not be elaborated here.

[0175] As an example, when the wallpaper editing interface 700 displays the desktop wallpaper page 703 and the related function buttons for editing the desktop wallpaper, the user can enlarge or reduce the wallpaper on the desktop wallpaper page 703, and can also move the position of the wallpaper. This process is similar to the related process of adjusting the size or position of the main picture in the above Figure 15 and will not be elaborated here.

[0176] After editing the desktop wallpaper in one or more of the above ways, if the user determines that the wallpaper on the current desktop wallpaper page 703 can meet the requirements, the user can click the apply button 71 in the wallpaper editing interface 700. In response to this click operation, the electronic device can set the wallpaper on the desktop wallpaper page 703 as the desktop wallpaper.

[0177] It should be noted that since the wallpaper editing interface 700 includes the lock screen wallpaper page 702 and the desktop wallpaper page 703, after the user clicks the apply button 71 in the wallpaper editing interface 700, the electronic device can set the wallpaper on the current lock screen wallpaper page 702 as the lock screen wallpaper, and at the same time set the wallpaper on the current desktop wallpaper page 703 as the desktop wallpaper.

[0178] Another point to note is that in some embodiments, if the electronic device enters the wallpaper editing interface 700 from the lock screen interface 800, then after the user clicks the apply button 71 in the wallpaper editing interface 700, in response to this click operation, the electronic device can display the lock screen interface 800 and display the edited lock screen wallpaper on the lock screen interface 800. And if the electronic device enters the wallpaper editing interface 700 from the desktop 900, then after the user clicks the apply button 71 in the wallpaper editing interface 700, in response to this click operation, the electronic device can display the desktop 900 and display the edited desktop wallpaper on the desktop 900.

[0179] In some other embodiments, if the user clicks the application button 71 in the wallpaper editing interface 700 when the lock screen wallpaper page 702 is displayed in the wallpaper editing interface 700, then in response to this click operation, the electronic device can display the lock screen interface 800 and display the edited lock screen wallpaper on the lock screen interface 800. If the user clicks the application button 71 in the wallpaper editing interface 700 when the home screen wallpaper page 703 is displayed in the wallpaper editing interface 700, then in response to this click operation, the electronic device can display the home screen 900 and display the edited home screen wallpaper on the home screen 900.

[0180] In still some other embodiments, after the user clicks the application button 71 in the wallpaper editing interface 700, in response to this click operation, the electronic device can display the home screen 900 and display the edited home screen wallpaper on the home screen 900.

[0181] After understanding various editing functions in the wallpaper editing method provided in the embodiments of the present application, the specific implementation processes of these editing functions will be described in detail below.

[0182] Figure 20 is a schematic diagram of a software system involved in a wallpaper editing method provided in the embodiments of the present application. Refer to Figure 20 In FIG. (a) therein, the software system may include an application layer, and the application layer may include a lock screen application, a home screen application, and a gallery application. Moreover, the software system can interact with the file system in the hardware layer.

[0183] Both the lock screen application and the home screen application can instruct the gallery application to display the wallpaper editing interface.

[0184] After receiving the instruction from the lock screen application or the home screen application, the gallery application can load the wallpaper editing interface, that is, load the function buttons, the lock screen wallpaper page, and the home screen wallpaper page.

[0185] Among them, the gallery application can obtain the lock screen wallpaper file and the home screen wallpaper file from the file system, and display the lock screen wallpaper on the lock screen wallpaper page according to the lock screen wallpaper file, and display the home screen wallpaper on the home screen wallpaper page according to the home screen wallpaper file.

[0186] The file system can store a first file and a second file of the lock screen wallpaper. The first file of the lock screen wallpaper is the lock screen wallpaper file used when editing the lock screen wallpaper in the wallpaper editing interface, that is, the gallery application can display the lock screen wallpaper on the lock screen wallpaper page according to the first file of the lock screen wallpaper. The second file of the lock screen wallpaper is the lock screen wallpaper file used when displaying the lock screen wallpaper on the lock screen interface, that is, the lock screen application can display the lock screen wallpaper on the lock screen interface according to the second file of the lock screen wallpaper.

[0187] Similarly, the file system can store the first file and the second file of the desktop wallpaper. The first file of the desktop wallpaper is the desktop wallpaper file used for editing the desktop wallpaper in the wallpaper editing interface. That is, the gallery application can display the desktop wallpaper on the desktop wallpaper page according to the first file of the desktop wallpaper. The second file of the desktop wallpaper is the desktop wallpaper file used for displaying the desktop wallpaper on the desktop. That is, the desktop application can display the desktop wallpaper on the desktop according to the second file of the desktop wallpaper.

[0188] Figure 20 Figure (b) in shows the technical architecture diagram related to a wallpaper editing method provided by an embodiment of the present application. Only the modules related to the embodiment of the present application are shown in this technical architecture diagram. These modules can be set in the gallery application or can be other applications independent of the gallery application. For example, a separate wallpaper editing application. In actual applications, other modules may also be included in this technical architecture diagram, which will not be shown one by one.

[0189] Exemplarily, as Figure 20 shown in Figure (b) in, the gallery application can include a function main body module, a lock screen view module, and a desktop view module.

[0190] The function main body module is used to implement various editing functions during the wallpaper editing process. The function main body module can interact with the outside world, such as interacting with the lock screen application, the desktop application, and the file system. And, the function main body module can implement the parsing work related to the wallpaper file during the wallpaper editing process. In addition, the function main body module can also save the operation data of each editing operation during the wallpaper editing process.

[0191] The lock screen view module is used to display the lock screen wallpaper on the lock screen wallpaper page according to the lock screen wallpaper display information.

[0192] The desktop view module is used to display the desktop wallpaper on the desktop wallpaper page according to the desktop wallpaper display information.

[0193] After describing the technical architecture diagram of the wallpaper editing method provided by the embodiment of the present application, the sequence diagram of the wallpaper editing method provided by the embodiment of the present application will be described next. This sequence diagram corresponds to the Figures 7 to 18 scene shown in, that is, it is used to illustrate the specific implementation process of wallpaper editing based on the wallpaper editing interface.

[0194] Figure 21 is the flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 21 The flowchart shown is used to illustrate the specific implementation process of displaying the wallpaper editing interface when the wallpaper editing function is used for the first time. Refer to Figure 21 , this method can include the following steps:

[0195] Step 2101: The lock screen application receives a first gesture operation.

[0196] The first gesture operation can be a pre-defined gesture operation. For example, the first gesture operation can be a two-finger pinch operation, a long press operation, a double tap operation, an S-shaped swipe operation, etc., and the embodiments of the present application do not limit this.

[0197] For example, assuming that the first gesture operation is a two-finger pinch operation, as shown in FIG. (a) in Figure 8 When the electronic device displays the lock screen interface 800, the user can perform a two-finger pinch on the lock screen interface 800. In this case, the lock screen application can receive the two-finger pinch operation on the lock screen interface 800. Among them, the two-finger pinch operation triggered on the lock screen interface 800 is used to indicate entering the wallpaper editing function, that is, to indicate the display of the wallpaper editing interface.

[0198] Step 2102: In response to the first gesture operation, the lock screen application sends a first message to the gallery application.

[0199] Exemplarily, the first message can be an intent message.

[0200] The first message can carry source information, and the source information is used to indicate which application the first message comes from. For example, the source information in the first message can be the application identifier of the lock screen application.

[0201] In some implementations, in the case where the lock screen wallpaper has not been edited by the wallpaper editing method provided by the embodiments of the present application, the lock screen wallpaper is generally a default wallpaper image. In this case, the first message can also carry the storage path of the wallpaper image.

[0202] Since the first gesture operation triggered on the lock screen interface is used to indicate entering the wallpaper editing function, after the lock screen application receives the first gesture operation, it can send a first message to the gallery application to indicate that the gallery application displays the wallpaper editing interface.

[0203] Step 2103: After the function main body module in the gallery application receives the first message, if it determines that the first message comes from the lock screen application, it displays a function button.

[0204] Exemplarily, as shown in Figure 8As shown in Figures (b) and (c), the function buttons may include main function buttons, such as the return button 70, the application button 71, etc., and may also include relevant function buttons for editing the lock screen wallpaper, such as the picture replacement button 75, the lock screen style button 72, the personalized decoration button 73, the depth of field effect button 74, etc., and may further include relevant function buttons for editing the desktop wallpaper, such as the follow lock screen button 76, the color button 77, the wallpaper selection button 78, the blur button 79, etc.

[0205] The function main body module may determine whether the first message comes from the lock screen application according to the source information in the first message.

[0206] In some embodiments, if the function main body module determines that the first message comes from the lock screen application, then the function main body module may determine that the display area of the lock screen wallpaper page is the first display area preset within the screen, and the display area of the desktop wallpaper page is the second display area preset, where only a part of the second display area is located within the screen or the second display area is completely located outside the screen. In this case, as Figure 8 shown in Figure (b), the function main body module may first display the main function buttons and the relevant function buttons for editing the lock screen wallpaper, and temporarily not display the relevant function buttons for editing the desktop wallpaper.

[0207] In some embodiments, the size of the first display area is the same as that of the second display area. The area ratio (i.e., the aspect ratio of the area) of the first display area and the area ratio of the second display area are both the same as the screen ratio (i.e., the aspect ratio of the screen) of the electronic device.

[0208] For example, as Figure 22 shown, when the first message comes from the lock screen application, the function main body module may determine that the display area of the lock screen wallpaper page is the preset display area A within the screen, and the display area of the desktop wallpaper page is the preset display area B, and only a very small part of the display area B is located within the screen, and most of it is located outside the screen. In this case, the user can see the complete lock screen wallpaper page, and only a very small part of the desktop wallpaper page.

[0209] In some embodiments, if the function main body module determines that the first message comes from the lock screen application, it may also display a mask layer. For example, as Figure 7 shown, the mask layer 704 is the bottom layer of the wallpaper editing interface 703. The function buttons, the lock screen wallpaper page 702, and the desktop wallpaper page 703 in the wallpaper editing interface 700 are all displayed above the mask layer 704.

[0210] Exemplarily, the mask layer may be a blur mask layer, and the blur mask layer refers to a mask layer obtained through blur processing.

[0211] As an example, the functional main body module can obtain the corresponding picture according to the storage path of the picture carried in the first message (i.e., the wallpaper picture described above), or the functional main body module can obtain a preset picture. Then, the functional main body module can adjust the picture according to the screen information so that the size of the picture is the screen size, and then blur the picture to obtain the mask layer, and then display the mask layer.

[0212] In a possible implementation, the operation of the functional main body module to adjust the picture according to the screen information can be: cropping the picture according to the screen ratio, and the ratio of the cropped picture (i.e., the aspect ratio of the picture height to width) is the same as the screen ratio; dividing the screen height by the height of the cropped picture, or dividing the screen width by the width of the cropped picture, to obtain a scaling ratio; scaling the cropped picture according to the scaling ratio, and the size of the scaled picture is the screen size.

[0213] Step 2104: The functional main body module sends a wallpaper data acquisition request to the file system.

[0214] This wallpaper data acquisition request is used to request the acquisition of the lock screen wallpaper file and the desktop wallpaper file.

[0215] The lock screen wallpaper file is a file containing the relevant data of the current lock screen wallpaper of the electronic device.

[0216] The desktop wallpaper file is a file containing the relevant data of the current desktop wallpaper of the electronic device.

[0217] Step 2105: After receiving the wallpaper data acquisition request, the file system sends the lock screen wallpaper file and the desktop wallpaper file to the functional main body module.

[0218] After receiving the wallpaper data acquisition request sent by the functional main body module in the gallery application, the file system can send the first file of the lock screen wallpaper as the lock screen wallpaper file to the functional main body module, and send the first file of the desktop wallpaper as the desktop wallpaper file to the functional main body module.

[0219] The first file of the lock screen wallpaper is the lock screen wallpaper file that needs to be used when the gallery application edits the lock screen wallpaper. In some implementations, in the case where the lock screen wallpaper has not been edited by the wallpaper editing method provided in the embodiments of the present application, the lock screen wallpaper can be a preset first picture, then the first file of the lock screen wallpaper can contain the storage path of the first picture.

[0220] The first file of the desktop wallpaper is the desktop wallpaper file that the gallery application needs to use when editing the desktop wallpaper. In some implementations, when the desktop wallpaper has not been edited by the wallpaper editing method provided in the embodiments of the present application, the desktop wallpaper can be a preset second picture. Then, the first file of the desktop wallpaper can include the storage path of the second picture.

[0221] Both the first picture and the second picture are some wallpaper pictures pre-installed in the electronic device. The first picture and the second picture can be the same or different, and the embodiments of the present application do not limit this.

[0222] Step 2106: After receiving the lock screen wallpaper file and the desktop wallpaper file, the function main body module obtains the first picture according to the lock screen wallpaper file, and obtains the second picture according to the desktop wallpaper file.

[0223] After receiving the lock screen wallpaper file, when the lock screen wallpaper file includes the storage path of the first picture, the first picture can be obtained according to the storage path.

[0224] After receiving the desktop wallpaper file, when the desktop wallpaper file includes the storage path of the second picture, the second picture can be obtained according to the storage path.

[0225] It should be noted that after the function main body module obtains a picture (such as the first picture or the second picture) according to the storage path in the embodiments of the present application, the obtained picture is saved in the memory and subsequent processing is performed on it, rather than directly processing the original picture in the storage path. This can avoid destroying the original picture by related processing.

[0226] It should be noted that the pictures described in the embodiments of the present application can exist in the form of picture data in the electronic device before being displayed, and can be drawn (Draw) and rendered according to the picture data to present a picture on the screen when being displayed. Therefore, the above-mentioned obtaining of the first picture can be understood as obtaining the first picture data, and the above-mentioned obtaining of the second picture can be understood as obtaining the second picture data.

[0227] Step 2107: The function main body module processes the first picture to obtain a first display picture, and processes the second picture to obtain a second display picture.

[0228] The first display picture is the picture used for display on the lock screen wallpaper page. The size of the first display picture is the same as the size of the display area of the lock screen wallpaper page.

[0229] The second display picture is the picture used for display on the desktop wallpaper page. The size of the second display picture is the same as the size of the display area of the desktop wallpaper page.

[0230] In some embodiments, the operations of the functional main body module for processing the first picture to obtain the first display picture may include the following steps (1) to (4).

[0231] (1) The functional main body module determines the initial scaling ratio of the first picture according to the screen size and the size of the first picture, and scales the first picture according to the initial scaling ratio to obtain a full-screen picture.

[0232] The initial scaling ratio is used to process the first picture into a full-screen picture, and the full-screen picture refers to a picture that can fill the screen.

[0233] Specifically, the height of the screen can be divided by the height of the first picture to obtain a first value, and the width of the screen can be divided by the width of the first picture to obtain a second value, and then the larger one of the first value and the second value is used as the initial scaling ratio of the first picture.

[0234] (2) The functional main body module determines the target area in the full-screen picture.

[0235] The target area in the full-screen picture is the area that can be displayed on the screen in the full-screen picture. The target area in the full-screen picture can be the area centered on the center of the full-screen picture and having the same area ratio as the screen ratio. Exemplarily, the size of the target area in the full-screen image can be the same as the screen size, or can also be smaller than the screen size, and the embodiments of the present application do not limit this.

[0236] For example, assuming that the screen ratio is 16:9 and the picture ratio of the full-screen picture is 4:3, then the target area in the full-screen picture can be as Figure 23 shown.

[0237] (3) The functional main body module cuts out the picture in the target area in the full-screen picture to obtain a target picture.

[0238] (4) The functional main body module scales the target picture according to a specific scaling ratio to obtain the first display picture.

[0239] The specific scaling ratio is used to process the target picture into a picture that can be displayed on the lock screen wallpaper page. Exemplarily, the height (or width) of the display area of the lock screen wallpaper page can be divided by the height (or width) of the screen to obtain the specific scaling ratio.

[0240] It should be noted that the operations of the functional main body module for processing the second picture to obtain the second display picture are similar to the operations of the functional main body module for processing the first picture to obtain the first display picture, and the embodiments of the present application will not elaborate on this.

[0241] Step 2108: The functional entity module sends a first display request to the lock screen view module and a second display request to the desktop view module.

[0242] The first display request is used to request the display of the lock screen wallpaper page. The first display request may carry a first display picture and may further carry the position information of the display area of the lock screen wallpaper page.

[0243] The second display request is used to request the display of the desktop wallpaper page. The second display request may carry a second display picture and may further carry the position information of the display area of the desktop wallpaper page.

[0244] The position information of a certain display area is the position information of this display area in the screen coordinate system. Thus, the corresponding position of this display area in the screen can be located according to the position information of this display area.

[0245] Step 2109: After receiving the first display request, the lock screen view module displays the lock screen wallpaper page.

[0246] Specifically, the lock screen view module may display the first display picture at the corresponding position in the screen according to the position information of the display area carried in the first display request, so as to realize the display of the lock screen wallpaper page.

[0247] Step 2110: After receiving the second display request, the desktop view module displays the desktop wallpaper page.

[0248] Specifically, the desktop view module may display the second display picture at the corresponding position in the screen according to the position information of the display area carried in the second display request, so as to realize the display of the desktop wallpaper page.

[0249] After displaying the function button, the lock screen wallpaper page, and the desktop wallpaper page through the above steps, the display of the wallpaper editing interface is completed. For example, the displayed wallpaper editing interface may be the wallpaper editing interface 700 shown in Figure (b) of Figure 8 .

[0250] After the wallpaper editing interface is displayed, the user can edit the lock screen wallpaper or the desktop wallpaper based on the wallpaper editing interface. Next, the specific implementation process of various editing functions will be described in detail.

[0251] Figure 24 is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 24 The shown flowchart is used to illustrate the specific implementation process of the user selecting a wallpaper template based on the wallpaper editing interface. Refer to Figure 24 , this method may include the following steps:

[0252] Step 2401: The function main body module receives a click operation on the lock screen style button.

[0253] When the lock screen wallpaper page is displayed in the wallpaper editing interface, various editing operations can be performed on the wallpaper of the lock screen wallpaper page. In some cases, if the user wants to change the style of the lock screen wallpaper, as shown in Figure (a) of Figure 10 , the user can click the lock screen style button 72, and the function main body module will receive the click operation on the lock screen style button 72.

[0254] Step 2402: In response to the click operation on the lock screen style button, the function main body module displays a first pop-up window.

[0255] Exemplarily, as shown in Figure (b) of Figure 10 , multiple wallpaper template options are displayed in the first pop-up window 7011. Optionally, picture options in the gallery and some wallpaper picture options preset in the electronic device can also be displayed.

[0256] Step 2403: The function main body module receives a selection operation on wallpaper template option 1.

[0257] Exemplarily, as shown in Figure (b) of Figure 10 , the user can click a wallpaper template option (hereinafter referred to as wallpaper template option 1) displayed in the first pop-up window 7011, and the function main body module will receive the selection operation on wallpaper template option 1. Exemplarily, wallpaper template option 1 is the option corresponding to wallpaper template 1.

[0258] Step 2404: In response to the selection operation on wallpaper template option 1, the function main body module obtains the template identifier corresponding to wallpaper template option 1.

[0259] A template identifier uniquely identifies a wallpaper template. The template identifier corresponding to wallpaper template option 1 is the template identifier of wallpaper template 1.

[0260] The wallpaper templates in the embodiments of the present application can be preset. Each wallpaper template can include multiple layers, and the types and levels of the multiple layers included in each wallpaper template can be preset.

[0261] Exemplarily, as shown in Figure 4 , a wallpaper template can sequentially include an original layer and a clock layer from the bottommost layer to the topmost layer; or can include an original layer, a color background layer, a clock layer, and a cutout layer; or can include an original layer, a decoration layer 1, a clock layer, and a decoration layer 2; or can include an original layer, a decoration layer 1, a clock layer, a cutout layer, and a decoration layer 2. Of course, not limited to these examples, the multiple layers included in a wallpaper template can be flexibly set according to actual needs.

[0262] Step 2405: The functional entity module sends a wallpaper template data acquisition request to the file system.

[0263] This wallpaper template data acquisition request is used to request the acquisition of the wallpaper template file of Wallpaper Template 1. This wallpaper template data acquisition request may carry the template identifier of Wallpaper Template 1.

[0264] Step 2406: After receiving this wallpaper template data acquisition request, the file system sends the wallpaper template file to the functional entity module.

[0265] Specifically, the file system can obtain the corresponding wallpaper template file according to this template identifier and send this wallpaper template file to the functional entity module.

[0266] Exemplarily, the wallpaper template file includes information such as the layer set (layers) information of the wallpaper template, offset information, scale ratio information, blur factor information, depth of field effect switch status information (isDepthofFieldSupported) information, etc.

[0267] The layer set information includes the layer basic information of each layer in the multiple layers, and the layer basic information of the multiple layers can be organized in a hierarchical order in the layer set information.

[0268] Exemplarily, the layer basic information of the original layer may include layer identifier, layer type, picture storage path, etc. The layer basic information of the color background layer may include layer identifier, layer type, color setting type, color value, etc. The layer basic information of the decoration layer may include layer identifier, layer type, picture storage path, color setting type, color value, etc. The layer basic information of the clock layer may include layer identifier, layer type, layout, font, color value, color setting type, etc. The layer basic information of the cutout layer may include layer identifier, layer type, picture storage path, etc.

[0269] The offset information is determined according to the user's moving operation on the main picture and is used to indicate how much the center of the moved main picture is offset relative to the center of the screen. The offset information acts on the original layer and the cutout layer. It should be noted that in the case where the user has not moved the main picture, the offset in the offset information can be defaulted to [0,0].

[0270] The scale ratio information is determined according to the user's scaling operation on the main picture and is used to indicate how much the scaled main picture is scaled compared to the original. The scale ratio information acts on the original layer and the cutout layer. It should be noted that in the case where the user has not scaled the main picture, the scale ratio in the scale ratio information can be defaulted to 1.

[0271] The blur information is determined according to the blur adjusted by the user and is used to indicate the blur of the main picture. The blur information acts on the original layer. It should be noted that in the case where the user has not adjusted the blur, the blur in the blur information can be defaulted to 0.

[0272] The depth-of-field effect switch status information is used to indicate whether the depth-of-field effect switch is in the on state or the off state. The depth-of-field effect switch status information acts on the cutout layer. It should be noted that in the case where the user has not operated the depth-of-field effect switch, the status in the depth-of-field effect switch status information can be defaulted to the on state.

[0273] It should be noted that the layer basic information of each layer in the layer set information included in the wallpaper template file can be set in advance. And, the offset in the offset information included in the wallpaper template file can be defaulted to [0,0], the scaling ratio in the scaling ratio information can be defaulted to 1, the blur in the blur information can be defaulted to 0, and the status in the depth-of-field effect switch status information can be defaulted to the on state.

[0274] In some embodiments, the wallpaper template file can be a JavaScript Object Notation (json) file. The json file can use the form of "KEY-VALUE pairs" to save data. Each "KEY" has its unique "VALUE" value, and the "VALUE" value therein can also have its own sub "KEY-VALUE pairs". This structure can well record the above layer set information, offset information, scaling ratio information, blur information, depth-of-field effect switch status information, etc.

[0275] As an example, a json file can contain as Figure 25 shown various information. Among them, "type" is the layer type. For example, the meanings of the values of "type" are: 【0】original layer, 【1】color background layer, 【2】decoration layer, 【3】clock layer, 【4】cutout layer. Among them, "colorPolicy" is the color setting type. For example, the meanings of the values of "colorPolicy" are: 【0】not color settable, 【1】main color, can be set separately, 【2】not settable separately, take the main color and subsidiary color, 【3】main color gradient, 【4】select clock color. Among them, "isDepthofFieldSupported" is the depth-of-field effect switch status information. For example, the meanings of the values of "isDepthofFieldSupported" are:

true

false

[0276] It should be noted that the json file has a simple and efficient format, with simple syntax rules and more efficient data parsing. Therefore, when the wallpaper template file is a json file, the functional main module can obtain the wallpaper template file from the file system faster and can parse the wallpaper template file faster.

[0277] Step 2407: After receiving the wallpaper template file, the functional main module parses the wallpaper template file to obtain wallpaper display information, which includes the display information of each layer in multiple layers.

[0278] Exemplarily, the display information of the clock layer may include the layer identifier, layer level, clock setting information (including layout, font, color value) and visibility of the clock layer.

[0279] Exemplarily, for other layers except the clock layer, such as the original layer, color background layer, decoration layer, cutout layer, etc., the display information of this layer may include the layer identifier, layer level, display picture and visibility of this layer. The display picture is the picture used to be displayed on the lock screen wallpaper page.

[0280] In some embodiments, the operation of step 2407 may include the following steps (1) to step (5).

[0281] (1) The functional main module determines the layer identifier, layer level and clock setting information of the clock layer according to the layer set information in the wallpaper template file, and determines the layer identifier, layer level and full-screen picture of each layer except the clock layer.

[0282] For other layers except the clock layer, such as the original layer, color background layer, decoration layer, cutout layer, etc., this layer has an initial picture. In the embodiments of the present application, the initial picture can be processed into a full-screen picture, and the full-screen picture refers to a picture that can cover the screen.

[0283] As an example, step (1) may include the following steps A to step E:

[0284] Step A: The functional main module determines the number of layers according to the layer set information.

[0285] Exemplarily, the functional main module may determine the number of layer identifiers in the layer set information as the number of layers. For example, for Figure 25 the shown json file, the number of "id" in "layers" can be determined as the number of layers, that is, the number of layers can be determined to be 8.

[0286] Hereinafter, it is assumed that the number of layers is k, and k is an integer greater than or equal to 2.

[0287] Step B: The functional main module determines that i is 1.

[0288] Step C: The functional main body module determines whether the i-th layer in the layer set information is a clock layer.

[0289] Exemplarily, the functional main body module can determine whether the i-th layer is a clock layer according to the layer type in the layer basic information of the i-th layer.

[0290] Step D: If the i-th layer is a clock layer, the functional main body module obtains the layer identifier in the layer basic information of the clock layer, and takes the layout, font, and color values in the layer basic information of the clock layer as the clock setting information of the clock layer, and determines that the level of the clock layer is i. Then, it is judged whether i is equal to k; if i is not equal to k, then let i = i + 1, and re-execute Step C and the subsequent steps; if i is equal to k, then end the operation.

[0291] Step E: If the i-th layer is not a clock layer, the functional main body module parses the layer basic information of the i-th layer to obtain the layer identifier and the initial image of the i-th layer, processes the initial image of the i-th layer to obtain the full-screen image of the i-th layer, and determines that the level of the i-th layer is i. Then, it is judged whether i is equal to k; if i is not equal to k, then let i = i + 1, and re-execute Step C and the subsequent steps; if i is equal to k, then end the operation.

[0292] Exemplarily, the operation of the functional main body module parsing the layer basic information of the i-th layer to obtain the initial image of the i-th layer can be: if the layer basic information of the i-th layer contains the image storage path and does not contain the color value and color setting type, then obtain the image according to the image storage path as the initial image of the i-th layer; if the layer basic information of the i-th layer contains the image storage path, color value, and color setting type, then obtain the image according to the image storage path, and set the color of the image according to the color value and the color setting type to obtain the initial image of the i-th layer; if the layer basic information of the i-th layer does not contain the image storage path but contains the color value and color setting type, then generate an image with the same size as the screen size, and set the color of the image according to the color value and the color setting type to obtain the initial image of the i-th layer.

[0293] For example, Figure 25 The first array in "layers" in the shown json file (i.e., the array containing "id": "layer_origin") is the layer basic information of the first layer. It can be determined that the first layer is the original layer according to the layer type in the first array (i.e., "type": 0). The image can be obtained as the initial image of the first layer according to the image storage path in the first array (i.e., "src": "02_origin.png").

[0294] Figure 25 The second array in "layers" of the shown JSON file (i.e., the array containing "id": "layer_color") is the layer basic information of the second layer. According to the layer type in the second array (i.e., "type": 1), it can be determined that the second layer is a color background layer. Since the second array does not contain the picture storage path, a picture with the same size as the screen size can be generated, and the color of the picture can be set according to the color value (i.e., "color": "#FFECBD5B") and color setting type (i.e., "colorPolicy": 1) in the second array to obtain the initial picture of the second layer.

[0295] Figure 25 The third array in "layers" of the shown JSON file (i.e., the array containing "id": "layer_res1") is the layer basic information of the third layer. According to the layer type in the third array (i.e., "type": 2), it can be determined that the third layer is a decoration layer. The picture can be obtained according to the picture storage path (i.e., "src": "02_res1_1.png") in the third array, and the color of the picture can be set according to the color value (i.e., "color": "#FF9C3022") and color setting type (i.e., "colorPolicy": 1) in the third array to obtain the initial picture of the third layer.

[0296] Figure 25 The fourth array in "layers" of the shown JSON file (i.e., the array containing "id": "layer_res3") is the layer basic information of the fourth layer. According to the layer type in the fourth array (i.e., "type": 2), it can be determined that the fourth layer is a decoration layer. The picture can be obtained according to the picture storage path (i.e., "src": "02_res1_3.png") in the fourth array as the initial picture of the fourth layer.

[0297] Figure 25 The fifth array in "layers" of the shown JSON file (i.e., the array containing "id": "layer_timer") is the layer basic information of the fifth layer. According to the layer type in the fifth array (i.e., "type": 3), it can be determined that the fifth layer is a clock layer. The layout (i.e., "layout": 0), font (i.e., "font": "HonorDigits_SerifVF.ttf"), and color value (i.e., "color": "#FFAE3DF") in the fifth array can be obtained as the clock setting information of the clock layer.

[0298] Figure 25 The 6th array in "layers" of the JSON file shown (i.e., the array containing "id": "layer_crop") is the layer basic information of the 6th layer. According to the layer type in the 6th array (i.e., "type": 4), it can be determined that the 6th layer is a cropping layer. The initial image of the 6th layer can be obtained according to the image storage path in the 6th array (i.e., "src": "02_crop.png").

[0299] Exemplarily, the operation of the functional main body module to process the initial image of the ith layer to obtain the full-screen image of the ith layer can be: The functional main body module determines the initial scaling ratio according to the screen size and the size of the initial image, and scales the initial image according to the initial scaling ratio to obtain the full-screen image of the ith layer.

[0300] This initial scaling ratio is used to process the initial image into a full-screen image. Specifically, the screen height can be divided by the height of the initial image to obtain a first value, and the screen width can be divided by the width of the initial image to obtain a second value, and then the larger one of the first value and the second value is used as this initial scaling ratio.

[0301] (2) The functional main body module processes the full-screen image of the original layer according to the offset information and scaling ratio information in the wallpaper template file to obtain the target image of the original layer, and processes the full-screen image of the cropping layer according to the offset information and scaling ratio information in the wallpaper template file to obtain the target image of the cropping layer.

[0302] Exemplarily, as Figure 26 shown, taking the scaling ratio of 1.5 and the offset of [20, 20] as an example, the operation of the functional main body module to process the full-screen image of the original layer according to the offset information and scaling ratio information in the wallpaper template file to obtain the target image of the original layer can be: The functional main body module determines the target area in the full-screen image of the original layer. The target area in this full-screen image is the area that can be displayed on the screen in this full-screen image. The target area in this full-screen image can be the area centered on the center of this full-screen image and with the same area ratio as the screen ratio; while keeping the center of this full-screen image unchanged, scale this full-screen image according to the scaling ratio in the scaling ratio information, and then move the scaled full-screen image according to the offset in the offset information so that the offset between the center of the moved full-screen image and the center of the target area is the offset in the offset information. After that, crop the image in this full-screen image that is within the target area to obtain the target image of the original layer.

[0303] The operation of the functional main body module to process the cut-out layer according to the offset information and scaling ratio information in the wallpaper template file to obtain the target picture of the cut-out layer is similar to the operation of the functional main body module to process the full-screen picture of the original layer according to the offset information and scaling ratio information in the wallpaper template file to obtain the target picture of the original layer. This application embodiment will not elaborate on this anymore.

[0304] (3) The functional main body module blurs the target picture of the original layer according to the blur degree information in the wallpaper template file.

[0305] (4) When the depth-of-field effect switch status information in the wallpaper template file indicates an on state, the functional main body module sets the visibility of all layers in the multiple layers to visible. By way of example, this can implement Figure 13 the depth-of-field effect in the wallpaper of the lock screen wallpaper page 702 shown in FIG. (a) in [reference]; when the depth-of-field effect switch status information in the wallpaper template file indicates an off state, the functional main body module sets the visibility of all other layers except the cut-out layer in the multiple layers to visible, and sets the visibility of the cut-out layer to invisible. By way of example, this can turn off the depth-of-field effect, such as Figure 13 the wallpaper of the lock screen wallpaper page 702 shown in FIG. (d) in [reference], which has no depth-of-field effect.

[0306] (5) The functional main body module scales the target picture of the original layer according to a specific scaling ratio to obtain the display picture of the original layer, scales the target picture of the cut-out layer to obtain the display picture of the cut-out layer, and scales the full-screen pictures of the other layers except the original layer, the cut-out layer, and the clock layer in the multiple layers to obtain the display pictures of the other layers.

[0307] The specific scaling ratio is used to process the picture into a picture that can be displayed on the lock screen wallpaper page. By way of example, the height (or width) of the display area of the lock screen wallpaper page can be divided by the screen height (or screen width) to obtain the specific scaling ratio.

[0308] It should be noted that in step 2407, after receiving the wallpaper template file, the functional main body module can save the wallpaper template file as the currently edited lock screen wallpaper file in the memory, and all subsequent editing processes are modifications to the currently edited lock screen wallpaper file.

[0309] It can be understood that after completing step 2407, that is, after receiving the wallpaper template file and completing the parsing of the wallpaper template file, for any layer identified by a layer identifier, there is a corresponding parsing logic to parse out the display information of the layer identified by this layer identifier from the wallpaper template file.

[0310] Step 2408: The functional main body module sends a third display request to the lock screen view module.

[0311] The third display request is used to request the display of the lock screen wallpaper page. The third display request carries the wallpaper display information and the position information of the display area of the lock screen wallpaper page.

[0312] It should be noted that after the functional main body module sends the third display request to the lock screen view module, the subsequent lock screen view module can display the corresponding wallpaper template.

[0313] Step 2409: After receiving the third display request, the lock screen view module displays the lock screen wallpaper page.

[0314] Specifically, the lock screen view module can, according to the position information of the display area carried in the third display request, at the corresponding position on the screen, in the order from low to high in hierarchy, display each layer of the multiple layers according to the display information of each layer of the multiple layers, so as to realize the display of the wallpaper template, and thus realize the display of the lock screen wallpaper page. By way of example, the displayed lock screen wallpaper page can be Figure 10 the lock screen wallpaper page 702 shown in Figure (c) of

[0315] In some embodiments, after the user edits the lock screen wallpaper by selecting a wallpaper template, the edited lock screen wallpaper can also be saved to make it effective. This process can include the following steps 2410 and 2412.

[0316] Step 2410: The functional main body module receives a click operation on the application button.

[0317] By way of example, as Figure 16 shown in Figure (a) of

[0318] after the user selects a wallpaper template, the user can click the application button 71 in the wallpaper editing interface 700, and the functional main body module will receive the click operation on the application button 71.

[0319] The wallpaper data storage request is used to request the storage of the lock screen wallpaper file 1. The lock screen wallpaper file 1 is the currently edited lock screen wallpaper file, and in the embodiments of the present application, it is the wallpaper template file obtained by the functional main body module after the user selects a wallpaper template.

[0320] Step 2412: After receiving the wallpaper data storage request, the file system updates the lock screen wallpaper file.

[0321] By way of example, the file system can update the first file of the lock screen wallpaper to the lock screen wallpaper file 1.

[0322] Figure 27 It is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 27 The shown flowchart is used to illustrate the specific implementation process of a user setting a clock based on a wallpaper editing interface. Refer to Figure 27 , the method may include the following steps:

[0323] Step 2701: The function main body module receives a click operation on the clock frame.

[0324] In some cases, if the user wants to set the clock in the lock screen wallpaper, as shown in Figure 11 Figure (a) therein, the user can click on the clock frame 710, and the function main body module will receive the click operation on the clock frame 710.

[0325] Step 2702: In response to the click operation on the clock frame, the function main body module displays a second pop-up window.

[0326] Exemplarily, as shown in Figure 11 Figure (b) therein, multiple clock font options and multiple clock color options are displayed in the second pop-up window 7012.

[0327] Step 2703: The function main body module receives a selection operation on the clock color option 1.

[0328] Exemplarily, as shown in Figure 11 Figure (b) therein, the user can click on a clock color option (hereinafter referred to as the clock color option 1) displayed in the second pop-up window 7012, and the function main body module will receive the selection operation on the clock color option 1.

[0329] Step 2704: In response to the selection operation on the clock color option 1, the function main body module obtains the color value corresponding to the clock color option 1.

[0330] Exemplarily, the color value corresponding to the clock color option 1 can be "#FFAE3DA".

[0331] Step 2705: The function main body module updates the color value in the layer basic information of the clock layer in the currently edited lock screen wallpaper file to the color value corresponding to the clock color option 1, and re-obtains the display information of the clock layer.

[0332] For example, assuming that the currently edited lock screen wallpaper file is the Figure 25 shown json file, where the color value of the clock layer is "color": "#FFAE3DF", then this color value can be updated to "color": "#FFAE3DA".

[0333] After the functional main module updates the color value in the layer basic information of the clock layer in the currently edited lock screen wallpaper file to the color value corresponding to the clock color option 1, it can re-parse the display information of the clock layer from the currently edited lock screen wallpaper file according to the parsing logic corresponding to the clock layer.

[0334] Continuing with the above example, the display information of the re-parsed clock layer may include: layer identifier ("id": "layer_timer"), level (5), layout ("layout": 0), font ("font": "HonorDigits_SerifVF.ttf"), color value ("color": "#FFAE3DA"), visibility (visible).

[0335] Step 2706: The functional main module sends the display information of the clock layer to the lock screen view module.

[0336] Step 2707: After receiving the display information of the clock layer, the lock screen view module updates the display information of the clock layer in the wallpaper display information.

[0337] Continuing with the above example, the updated display information of the clock layer may include: layer identifier ("id": "layer_timer"), level (5), layout ("layout": 0), font ("font": "HonorDigits_SerifVF.ttf"), color value ("color": "#FFAE3DA"), visibility (visible).

[0338] Step 2708: The lock screen view module displays the lock screen wallpaper page.

[0339] Exemplarily, the displayed lock screen wallpaper page may be Figure 11 the lock screen wallpaper page 702 shown in Figure (c) of, where the color of the clock in the displayed wallpaper is the color set by the user.

[0340] It should be noted that the operation of the user setting the font of the clock in the lock screen wallpaper through the second pop-up window is similar to the above operation of setting the color of the clock, and the embodiments of the present application will not elaborate on this.

[0341] In some embodiments, after the user edits the lock screen wallpaper by setting the clock, the edited lock screen wallpaper can also be saved to make it effective, and this process may include the following steps 2709 and 2711.

[0342] Step 2709: The functional main module receives the click operation on the corresponding application button.

[0343] Step 2710: The functional main module sends a wallpaper data storage request to the file system.

[0344] This wallpaper data storage request is used to request the storage of the lock screen wallpaper file 2. The lock screen wallpaper file 2 is the currently edited lock screen wallpaper file, and in the embodiment of the present application, it is the lock screen wallpaper file updated by the function main body module according to relevant setting information after the user sets the clock.

[0345] Step 2711: After the file system receives this wallpaper data storage request, it updates the lock screen wallpaper file.

[0346] Exemplarily, the file system can update the first file of the lock screen wallpaper to the lock screen wallpaper file 2.

[0347] Figure 28 It is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 28 The shown flowchart is used to illustrate the specific implementation process for the user to set personalized decorations based on the wallpaper editing interface. Refer to Figure 28 and this method may include the following steps:

[0348] Step 2801: The function main body module receives a click operation on the personalized decoration button.

[0349] In some cases, if the user wants to set the decoration in the lock screen wallpaper, as shown in Figure 12 Figure (a) therein, the user can click the personalized decoration button 73, and the function main body module will receive the click operation on the personalized decoration button 73.

[0350] Step 2802: In response to the click operation on the personalized decoration button, the function main body module displays a third pop-up window.

[0351] Exemplarily, as shown in Figure 12 Figure (b) therein, multiple style options and multiple color options are displayed in the third pop-up window 7013.

[0352] Step 2803: The function main body module receives a selection operation on color option 1.

[0353] Exemplarily, as shown in Figure 12 Figure (b) therein, the user can click a color option (hereinafter referred to as color option 1) displayed in the third pop-up window 7013, and the function main body module will receive the selection operation on color option 1.

[0354] Step 2804: In response to the selection operation on color option 1, the function main body module obtains the color value corresponding to color option 1.

[0355] Step 2805: The function main body module updates the color value in the layer basic information of the decoration layer in the currently edited lock screen wallpaper file to the color value corresponding to color option 1.

[0356] Step 2806: The functional main body module re-obtains the display information of the decoration layer.

[0357] After the functional main body module updates the color value in the layer basic information of the decoration layer in the currently edited lock screen wallpaper file to the color value corresponding to Color Option 1, it can re-parse the display information of the decoration layer from the currently edited lock screen wallpaper file according to the parsing logic corresponding to the decoration layer.

[0358] Step 2807: The functional main body module sends the display information of the decoration layer to the lock screen view module.

[0359] Step 2808: After receiving the display information of the decoration layer, the lock screen view module updates the display information of the decoration layer in the wallpaper display information.

[0360] Step 2809: The lock screen view module displays the lock screen wallpaper page.

[0361] Exemplarily, the displayed lock screen wallpaper page can be Figure 12 the lock screen wallpaper page 702 shown in Figure (c) of , where the color of the decorative piece in the displayed wallpaper is the color set by the user.

[0362] In some embodiments, after the user edits the lock screen wallpaper by setting the color of the decorative piece, the edited lock screen wallpaper can also be saved to make it effective. This process can include the following steps 2810 and 2812.

[0363] Step 2810: The functional main body module receives a click operation on the corresponding application button.

[0364] Step 2811: The functional main body module sends a wallpaper data storage request to the file system.

[0365] This wallpaper data storage request is used to request the storage of the lock screen wallpaper file 3. The lock screen wallpaper file 3 is the currently edited lock screen wallpaper file, and in the embodiments of the present application, it is the lock screen wallpaper file updated by the functional main body module according to relevant color information after the user sets the color of the decorative piece.

[0366] Step 2812: After receiving the wallpaper data storage request, the file system updates the lock screen wallpaper file.

[0367] Exemplarily, the file system can update the first file of the lock screen wallpaper to the lock screen wallpaper file 3.

[0368] It should be noted that the operation of the user setting the style of the decorative piece in the lock screen wallpaper through the third pop-up window is similar to the above operation of setting the color of the decorative piece, and a simple description will be given below.

[0369] Figure 29 This is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 29 The flowchart shown is used to illustrate the specific implementation process of a user setting personalized decorations based on a wallpaper editing interface. Refer to Figure 29 This method may include the following steps:

[0370] Step 2901: The function main body module receives a click operation on the personalized decoration button.

[0371] Step 2902: In response to the click operation on the personalized decoration button, the function main body module displays a third pop-up window.

[0372] Step 2903: The function main body module receives a selection operation on style option 1.

[0373] Step 2904: In response to the selection operation on style option 1, the function main body module obtains the picture storage path corresponding to style option 1.

[0374] Step 2905: The function main body module updates the picture storage path in the layer basic information of the decoration layer in the currently edited lock screen wallpaper file to the picture storage path corresponding to style option 1.

[0375] Step 2906: The function main body module re-obtains the display information of this decoration layer.

[0376] After the function main body module updates the picture storage path in the layer basic information of the decoration layer in the currently edited lock screen wallpaper file to the picture storage path corresponding to style option 1, it can re-parse the display information of this decoration layer from the currently edited lock screen wallpaper file according to the parsing logic corresponding to this decoration layer.

[0377] Step 2907: The function main body module sends the display information of this decoration layer to the lock screen view module.

[0378] Step 2908: After the lock screen view module receives the display information of this decoration layer, it updates the display information of this decoration layer in the wallpaper display information.

[0379] Step 2909: The lock screen view module displays the lock screen wallpaper page.

[0380] In this case, the style of the decoration piece of the wallpaper on the displayed lock screen wallpaper page is the style selected by the user.

[0381] In some embodiments, after the user edits the lock screen wallpaper by setting the style of the decoration piece, the edited lock screen wallpaper can also be saved to make it effective. This process may include the following steps 2910 and 2912.

[0382] Step 2910: The functional main body module receives a click operation on the application button.

[0383] Step 2911: The functional main body module sends a wallpaper data storage request to the file system.

[0384] This wallpaper data storage request is used to request the storage of the lock screen wallpaper file 4. The lock screen wallpaper file 4 is the currently edited lock screen wallpaper file, and in the embodiment of the present application, it is the lock screen wallpaper file updated by the functional main body module according to relevant style information after the user sets the style of the decorative part.

[0385] Step 2912: After receiving the wallpaper data storage request, the file system updates the lock screen wallpaper file.

[0386] Exemplarily, the file system can update the first file of the lock screen wallpaper to the lock screen wallpaper file 4.

[0387] Figure 30 It is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 30 The shown flowchart is used to illustrate the specific implementation process of the user setting the depth of field effect based on the wallpaper editing interface. Refer to Figure 30 , this method may include the following steps:

[0388] Step 3001: The functional main body module receives a click operation on the depth of field effect button.

[0389] In some cases, if the user wants to set the depth of field effect in the lock screen wallpaper, then as Figure 13 shown in the figure (a) of

[0390] The user can click the depth of field effect button 74, and the functional main body module will receive the click operation on the depth of field effect button 74.

[0391] Exemplarily, as Figure 13 shown in the figure (b) of

[0392] Step 3003: The functional main body module receives an off operation on the depth of field effect switch.

[0393] Exemplarily, as Figure 13 shown in the figure (b) of

[0394] Step 3004: In response to the operation of turning off the depth-of-field effect switch, the functional main body module updates the state in the depth-of-field effect switch status information in the currently edited lock screen wallpaper file to the off state.

[0395] Step 3005: The functional main body module re-obtains the display information of the cutout layer.

[0396] After the functional main body module updates the state in the depth-of-field effect switch status information in the currently edited lock screen wallpaper file to the off state, it can re-parse the display information of the cutout layer from the currently edited lock screen wallpaper file according to the parsing logic corresponding to the cutout layer.

[0397] Step 3006: The functional main body module sends the display information of the cutout layer to the lock screen view module.

[0398] Step 3007: After receiving the display information of the cutout layer, the lock screen view module updates the display information of the cutout layer in the wallpaper display information.

[0399] Step 3008: The lock screen view module displays the lock screen wallpaper page.

[0400] Exemplarily, the displayed lock screen wallpaper page can be Figure 13 the lock screen wallpaper page 702 shown in Figure (c) of , where the displayed wallpaper has no depth-of-field effect.

[0401] In some embodiments, after the user edits the lock screen wallpaper by turning off the depth-of-field effect switch, the edited lock screen wallpaper can also be saved to make it effective, and this process can include the following steps 3009 and 3011.

[0402] Step 3009: The functional main body module receives the click operation on the application button.

[0403] Step 3010: The functional main body module sends a wallpaper data storage request to the file system.

[0404] This wallpaper data storage request is used to request the storage of the lock screen wallpaper file 5. The lock screen wallpaper file 5 is the currently edited lock screen wallpaper file, and in the embodiments of the present application, it is the lock screen wallpaper file updated by the functional main body module according to the status of the depth-of-field effect switch after the user turns off the depth-of-field effect switch.

[0405] Step 3011: After receiving the wallpaper data storage request, the file system updates the lock screen wallpaper file.

[0406] Exemplarily, the file system can update the first file of the lock screen wallpaper to the lock screen wallpaper file 5.

[0407] Figure 31It is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 31 The shown flowchart is used to illustrate the specific implementation process for a user to set the background blur degree based on a wallpaper editing interface. Refer to Figure 31 , the method may include the following steps:

[0408] Step 3101: The function main body module receives a click operation on the depth of field effect button.

[0409] Step 3102: In response to the click operation on the depth of field effect button, the function main body module displays a fourth pop-up window.

[0410] Step 3103: The function main body module receives a triggering operation on the background blur control.

[0411] Exemplarily, as shown in figure (b) of Figure 13 , the background blur control 7142 may be a control in the form of a slider. There is a slider in the slider, and the position of the slider in the slider can indicate the corresponding blur degree (which can be called the target blur degree). Of course, the background blur control 7142 may also be a control in other forms, and the embodiments of the present application do not limit this.

[0412] The triggering operation on the background blur control can be performed by the user. That is, if the user wants to adjust the background blur degree, the user can achieve this by operating the background blur control. For example, the user can drag Figure 13 the slider in the slider 7142 shown in figure (b) of

[0413] to adjust the position of the slider in the slider, so as to set the background blur degree.

[0414] Step 3105: The function main body module updates the blur degree in the blur degree information in the currently edited lock screen wallpaper file to the target blur degree.

[0415] Step 3106: The function main body module re-obtains the display information of the original layer.

[0416] After the function main body module updates the blur degree in the blur degree information in the currently edited lock screen wallpaper file to the target blur degree, it can re-parse the display information of the original layer from the currently edited lock screen wallpaper file according to the parsing logic corresponding to the original layer.

[0417] Step 3107: The function main body module sends the display information of the original layer to the lock screen view module.

[0418] Step 3108: After the lock screen view module receives the display information of the original layer, it updates the display information of the original layer in the wallpaper display information.

[0419] Step 3109: The lock screen view module displays the lock screen wallpaper page.

[0420] In this case, the blur degree of the background part of the main picture of the wallpaper on the displayed lock screen wallpaper page is the blur degree set by the user.

[0421] In some embodiments, after the user edits the lock screen wallpaper by turning off the depth of field effect switch, the edited lock screen wallpaper can also be saved to make it take effect. This process may include the following steps 3110 and 3112.

[0422] Step 3110: The function main body module receives a click operation on the application button.

[0423] Step 3111: The function main body module sends a wallpaper data storage request to the file system.

[0424] This wallpaper data storage request is used to request the storage of the lock screen wallpaper file 6. The lock screen wallpaper file 6 is the currently edited lock screen wallpaper file, and in the embodiments of the present application, it is the lock screen wallpaper file updated by the function main body module according to the target blur degree after the user sets the background blur degree.

[0425] Step 3112: After receiving this wallpaper data storage request, the file system updates the lock screen wallpaper file.

[0426] Exemplarily, the file system may update the first file of the lock screen wallpaper to the lock screen wallpaper file 6.

[0427] Figure 32 It is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 32 The shown flowchart is used to illustrate the specific implementation process of the user replacing the main picture of the wallpaper based on the wallpaper editing interface. Refer to Figure 32 , this method may include the following steps:

[0428] Step 3201: The function main body module receives a click operation on the replace picture button.

[0429] In some cases, if the user wants to change the main picture of the lock screen wallpaper, as shown in Figure 14 Figure (a) therein, the user can click the replace picture button 75, and the function main body module will receive the click operation on the replace picture button 75.

[0430] Step 3202: In response to the click operation on the replace picture button, the function main body module displays a fifth pop-up window.

[0431] Exemplarily, as shown in Figure 14 Figure (b) therein, picture options in the gallery are displayed in the fifth pop-up window 7015.

[0432] Step 3203: The functional main module receives the selection operation on Picture Option 1.

[0433] Exemplarily, as shown in Figure (b) in Figure 14 a user can click on a picture option (hereinafter referred to as Picture Option 1) displayed in the fifth pop-up window 7015, and the functional main module will receive the selection operation on Picture Option 1.

[0434] Step 3204: In response to the selection operation on Picture Option 1, the functional main module obtains the picture storage path corresponding to Picture Option 1, and obtains the picture corresponding to Picture Option 1 according to this picture storage path.

[0435] For ease of description, in the following part, the picture corresponding to Picture Option 1 is referred to as the candidate picture.

[0436] Step 3205: The functional main module replaces the displayed picture of the original layer with the candidate picture.

[0437] Step 3206: The functional main module obtains the position information of the first display area of the lock screen wallpaper page.

[0438] The position information of the first display area of the lock screen wallpaper page is the position information of this display area in the screen coordinate system. According to the position information of this display area, the corresponding position of the first display area of the lock screen wallpaper page on the screen can be located.

[0439] In implementation, the position information of the first display area of the lock screen wallpaper page can be obtained in the following way: According to the position information of the display screen in the screen coordinate system and the ratio of the size of the preset display screen to the size of the first display area of the lock screen wallpaper page, the position information of the first display area of the lock screen wallpaper page is determined.

[0440] In some embodiments, Step 3206 can also be: The functional main module obtains the position information of the first display area of the lock screen wallpaper page and the position information of the clock frame in the clock layer.

[0441] The position information of the clock frame is included in the layer basic information of the clock layer in the currently used lock screen wallpaper file, and the functional main module can obtain the position information of the clock frame from the lock screen wallpaper file.

[0442] Step 3207: The functional main module sends the candidate picture and the position information of the first display area of the lock screen wallpaper page to the matte algorithm module.

[0443] In some embodiments, Step 3207 can also be: The functional main module sends the candidate picture, the position information of the first display area of the lock screen wallpaper page, and the position information of the clock frame to the matte algorithm module.

[0444] Step 3208: After the matte extraction algorithm module receives the candidate image and the position information of the first display area of the lock screen wallpaper page, it processes the candidate image to generate a first matte image.

[0445] The first matte image includes the foreground object of the candidate image. The pixel points corresponding to the foreground object in the first matte image are the first pixel points, and the first pixel points refer to the opaque pixel points, and the pixel values of the opaque pixel points are not 0. The pixel points other than the first pixel points in the first matte image are the second pixel points, and the second pixel points refer to the transparent pixel points, and the pixel values of the transparent pixel points are 0.

[0446] In implementation, the process of the matte extraction algorithm module processing the candidate image to generate the first matte image can be: The matte extraction algorithm module performs matte extraction processing on the candidate image to obtain the foreground object of the candidate image, and generates a first matte image with the same size as the candidate image based on the foreground object and the transparent pixel points.

[0447] In some embodiments, if the candidate image does not include a foreground object, then when the matte extraction algorithm module performs matte extraction processing on the candidate image, it cannot obtain the foreground object of the candidate image. In this case, the functional entity module does not execute the steps after step 3208, and uses the candidate image as the image finally displayed in the first display area of the lock screen wallpaper page.

[0448] In some embodiments, in step 3208, the matte extraction algorithm module may also receive the position information of the clock frame.

[0449] Step 3209: The matte extraction algorithm module processes the candidate image according to the position information of the first display area of the lock screen wallpaper page to obtain the position information of the first area. The first area includes the foreground object of the candidate image, and the aspect ratio of the width and height of the first area is the same as the aspect ratio of the width and height of the first display area of the lock screen wallpaper page.

[0450] In implementation, the process of the matte extraction algorithm module processing the candidate image according to the position information of the first display area of the lock screen wallpaper page to obtain the position information of the first area can be: The matte extraction algorithm module determines the aspect ratio of the width and height of the first display area of the lock screen wallpaper page according to the position information of the first display area of the lock screen wallpaper page. The matte extraction algorithm module performs matte extraction processing on the candidate image to obtain the foreground object of the candidate image. The matte extraction algorithm module generates the position information of the first area including the foreground object according to the aspect ratio of the width and height of the first display area of the lock screen wallpaper page and the foreground object.

[0451] In some embodiments, step S3209 may further be: the matte extraction algorithm module processes the candidate picture according to the position information of the first display area of the lock screen wallpaper page and the position information of the clock frame to obtain the position information of the first area. The first area includes the foreground object of the candidate picture. The aspect ratio of the first area is the same as that of the first display area of the lock screen wallpaper page. The position of the foreground object of the candidate picture in the first area partially overlaps with the position of the clock frame.

[0452] Step 3210: The matte extraction algorithm module sends the position information of the first area and the first matte extraction picture to the functional main body module.

[0453] Step 3211: After receiving the position information of the first area and the first matte extraction picture, the functional main body module replaces the display picture of the matte layer with the first matte extraction picture.

[0454] Step 3212: The functional main body module determines the offset information and the scaling ratio information of the first area relative to the first display area of the lock screen wallpaper page according to the position information of the first area and the position information of the first display area of the lock screen wallpaper page.

[0455] Exemplarily, assume that the position information of the first area includes coordinates (A1, B1), and the position information of the first display area of the lock screen wallpaper page includes coordinates (A2, B2). Then the offset information is (A2 - A1, B2 - B1).

[0456] In implementation, the process of determining the offset information of the first area relative to the first display area of the lock screen wallpaper page may be: Exemplarily, subtracting the abscissa of the top - left vertex of the first area from the abscissa of the top - left vertex of the first display area of the lock screen wallpaper page to obtain the horizontal offset. Subtracting the ordinate of the top - left vertex of the first area from the ordinate of the top - left vertex of the first display area of the lock screen wallpaper page to obtain the vertical offset.

[0457] The process of determining the scaling ratio information of the first area relative to the first display area of the lock screen wallpaper page may be: calculating the size of the first area based on the position information of the first area, calculating the size of the first display area of the lock screen wallpaper page based on the position information of the first display area of the lock screen wallpaper page, dividing the length of the first area by the length of the first display area of the lock screen wallpaper page to obtain the scaling ratio, dividing the width of the first area by the width of the first display area of the lock screen wallpaper page to obtain the scaling ratio. Since the aspect ratios of the first area and the first display area of the lock screen wallpaper page are the same, the above two scaling ratios are the same.

[0458] Step 3213: The functional main body module stores both the candidate picture and the first matte extraction picture in the file system to obtain the storage path of the candidate picture and the storage path of the first matte extraction picture.

[0459] Step 3214: The function main body module updates the image storage path in the layer basic information of the original layer in the currently used lock screen wallpaper file to the storage path of the candidate image, and updates the image storage path in the layer basic information of the cut layer in the lock screen wallpaper file to the storage path of the first cut image.

[0460] Step 3215: The function main body module changes the offset information and scaling ratio information in the currently used lock screen wallpaper file to the offset information and scaling ratio information of the first area relative to the first display area of the lock screen wallpaper page, and changes the blur degree information and depth of field effect switch state information in the currently used lock screen wallpaper file to the default values.

[0461] Step 3216: The function main body module determines the first display image corresponding to the candidate image in the original layer and the first display image corresponding to the first cut image in the cut layer according to the offset information and scaling ratio information of the first area relative to the first display area of the lock screen wallpaper page, as well as the blur degree information and depth of field effect switch state information.

[0462] Step 3217: The function main body module sends the layer identifier of the original layer, the first display image corresponding to the candidate image in the original layer, the layer identifier of the cut layer, and the first display image corresponding to the first cut image in the cut layer to the lock screen view module.

[0463] Step 3218: After receiving the layer identifier of the original layer, the first display image corresponding to the candidate image in the original layer, the layer identifier of the cut layer, and the first display image corresponding to the first cut image in the cut layer, the lock screen view module updates the display information of the original layer and the display information of the cut layer in the wallpaper display information.

[0464] Step 3219: The lock screen view module displays the lock screen wallpaper page.

[0465] Exemplarily, the displayed lock screen wallpaper page can be Figure 14 the lock screen wallpaper page 702 shown in Figure (c) in, where the main picture of the displayed wallpaper is the picture replaced by the user.

[0466] In an embodiment of the present application, after the electronic device responds to the user's operation on the replace picture button, it can obtain candidate pictures and the position information of the first display area of the lock screen wallpaper page, and then obtain the position information of the first area based on the position information of the first display area and the candidate pictures. Subsequently, according to the position information of the first display area and the position information of the first area, the candidate pictures are adjusted. Compared with the situation where the user selects a picture from the pictures in the electronic device's gallery as the wallpaper and needs to manually adjust the position or size of the foreground object in the picture on the lock screen interface or desktop multiple times, in the embodiment of the present application, the candidate pictures can be adjusted according to the position information of the first display area and the position information of the first area, so that the position or size of the foreground object in the picture can be automatically adjusted on the lock screen interface or desktop, simplifying the user operation. Moreover, a better wallpaper effect can be displayed, enhancing the user experience.

[0467] It should be understood that the embodiments of the present application may include various types of wallpaper templates. For example, please refer back to Figure 4 , one type of wallpaper template includes an original layer and a clock layer. One type of wallpaper template may include an original layer, a color background layer, a clock layer, and a cutout layer. One type of wallpaper template may include a layer, a decoration layer 1, a clock layer, and a decoration layer 2. One type of wallpaper template may include an original layer, a decoration layer 1, a clock layer, a cutout layer, and a decoration layer 2. Of course, it is not limited to these examples, and the multiple layers included in a wallpaper template can be flexibly set according to actual needs.

[0468] The user can utilize Figure 32 the flowchart shown to replace the main picture in most wallpaper templates based on the wallpaper editing interface. In some embodiments, some types of wallpaper templates include multiple decoration layers, and when these multiple decoration layers are superimposed and displayed, they have a photo frame effect. Then, after Figure 32 step 3216 shown, the following steps may further be included. Please refer to Figure 32 .

[0469] Step 3220: The function main body module obtains the position information of the security line in the multiple decoration layers, and when the multiple decoration layers are superimposed and displayed, they have a photo frame effect.

[0470] It should be understood that the layer basic information of the decoration layer with a photo frame effect in the currently used lock screen wallpaper file includes the position information of the security line, and the function main body module can obtain the position information of the security line in the multiple decoration layers from the lock screen wallpaper file.

[0471] Exemplarily, please refer to Figure 6 (a) in Figure 6When the decorative layer 1 and the decorative layer 3 shown in (a) in it are superimposed, they have a photo frame effect. The upper part of the decorative layer 1 has half of a photo frame, and the lower part of the decorative layer 2 has half of a photo frame. The security line is the boundary line when the upper half of the photo frame and the lower half of the photo frame are superimposed.

[0472] Step 3221: The function main body module sends the position information of multiple security lines, the position information of the first display area of the lock screen wallpaper page, and the first display picture corresponding to the first matte picture to the security line detection module.

[0473] The position information of the first display area of the lock screen wallpaper page can refer to the above embodiments and will not be elaborated here.

[0474] The function main body module can generate the first display picture corresponding to the first matte picture through step 3216.

[0475] Step 3222: After receiving the position information of multiple security lines, the position information of the first display area of the lock screen wallpaper page, and the first display picture corresponding to the first matte picture, the security line detection module determines the first mapping area of the first display area of the lock screen wallpaper page mapped to the first display picture of the matte layer according to the position information of the first display area of the lock screen wallpaper page and the first display picture corresponding to the first matte picture, and generates the position information of the first mapping area. The first mapping area includes the foreground object in the first display picture corresponding to the first matte picture.

[0476] Step 3223: The security line detection module determines the target security lines of multiple security lines mapped to the first mapping area according to the position information of multiple security lines and the position information of the first mapping area, and generates the position information of the target security lines.

[0477] Step 3224: The security line detection module determines the number of the first pixel points on the target security line according to the position information of the target security line.

[0478] The first display picture corresponding to the first matte picture includes the foreground object of the first matte picture. The pixel points corresponding to the foreground object in the first display picture corresponding to the first matte picture are the first pixel points. The first pixel points refer to the opaque pixel points, and the pixel values of the opaque pixel points are not 0. The pixel points other than the first pixel points in the first display picture corresponding to the first matte picture are the second pixel points. The second pixel points refer to the transparent pixel points, and the pixel values of the transparent pixel points are 0.

[0479] In implementation, the security line detection module can traverse the pixel points on the target security line to obtain the pixel values of each pixel point on the target security line. The security line detection module determines the number of the first pixel points on the target security line by calculating the number of pixel points with non-zero pixel values on the target security line.

[0480] Step 3225: The security line detection module determines that the number of first pixels is equal to the first threshold, and sends the first detection result to the function main body module.

[0481] In the embodiments of the present application, the value of the first threshold is small. For example, the first threshold may be an integer from zero to ten. Specifically, the first threshold may be zero. Of course, in other embodiments, the first threshold may also be other values, and the present application does not limit the value of the first threshold.

[0482] The first detection result is used to indicate that the number of first pixels is equal to the first threshold. That the number of first pixels is equal to the first threshold represents that the foreground object does not touch the target security line. In the case where the foreground object does not touch the target security line, the wallpaper template can be displayed with a better visual effect through the first display area of the lock screen wallpaper page, while in the case where the foreground object touches the target security line, the visual effect displayed in the first display area of the lock screen wallpaper page is poor.

[0483] Step 3226: After receiving the first detection result, the function main body module executes Step 3217 and Step 3218.

[0484] The wallpaper template in the lock screen wallpaper page displayed by the lock screen view module has a better visual effect.

[0485] Step 3227: The security line detection module determines that the number of first pixels is greater than the first threshold, and sends the second detection result to the function main body module.

[0486] The second detection result is used to indicate that the number of first pixels is greater than the first threshold. That the number of first pixels is greater than the first threshold represents that the foreground object touches the target security line.

[0487] Step 3228: After receiving the second detection result, the function main body module replaces the first display picture corresponding to the option picture in the original layer with the option picture, and replaces the first display picture corresponding to the first matte picture in the matte layer with the first matte picture.

[0488] The display picture corresponding to the option picture and the first display picture corresponding to the first matte picture are generated by the function main body module through Step 3216. The first matte picture is generated by the matte algorithm module through Step 3208. The option picture is obtained by the function main body module through Step 3204.

[0489] Step 3229: The function main body module obtains the position information of the transparent areas in multiple decoration layers. When the multiple decoration layers are superimposed and displayed, they have a photo frame effect. According to the position information of the transparent areas in the multiple decoration layers, the position information of the second display area of the lock screen wallpaper page is determined. The second display area of the lock screen wallpaper page is smaller than the first display area of the lock screen wallpaper page.

[0490] It should be understood that the layer basic information of the decorative layer with a photo frame effect in the currently used lock screen wallpaper file includes the position information of the transparent area. The pixel value of the pixel points in the transparent area of the decorative layer with a photo frame effect is 0, and the pixel value of the pixel points corresponding to the part with a photo frame effect is a non-zero value.

[0491] The decorative layer with a photo frame effect has two layers. Among them, the position information of the transparent area included in the layer basic information of the first decorative layer can be Figure 6 the area other than the photo frame in the upper half of the decorative layer 1 shown in (a) in, and the reference for the position information of the transparent area included in the layer basic information of the second decorative layer can Figure 6 be the area other than the photo frame in the lower half of the decorative layer 3 shown in (a) in.

[0492] Step 3230: The function main body module sends the option picture and the second display area of the lock screen wallpaper page to the matting algorithm module.

[0493] Step 3231: After receiving the option picture and the second display area of the lock screen wallpaper page, the matting algorithm module processes the option picture according to the second display area of the lock screen wallpaper page to obtain the position information of the second area. The second area includes the foreground object of the option picture, and the aspect ratio of the second area is the same as that of the second display area of the lock screen wallpaper page.

[0494] In implementation, the process of the matting algorithm module processing the option picture according to the position information of the second display area of the lock screen wallpaper page to obtain the position information of the second area can be: the matting algorithm module determines the aspect ratio of the second display area of the lock screen wallpaper page according to the position information of the second display area of the lock screen wallpaper page. The matting algorithm module performs matting processing on the option picture to obtain the foreground object of the option picture. The matting algorithm module generates the position information of the second area including the foreground object according to the aspect ratio of the second display area of the lock screen wallpaper page and the foreground object.

[0495] Step 3232: The matting algorithm module sends the position information of the second area to the function main body module.

[0496] Step 3233: The function main body module determines the offset information and scaling ratio information of the second area relative to the second display area of the lock screen wallpaper page according to the position information of the second area and the position information of the second display area of the lock screen wallpaper page.

[0497] The implementation process of step 3233 can refer to the implementation process in which the functional main module determines the offset information and scaling ratio information of the first area relative to the first display area of the lock screen wallpaper page based on the position information of the first area and the position information of the first display area of the lock screen wallpaper page, which will not be elaborated here.

[0498] Step 3234: The functional main module changes the offset information and scaling ratio information of the first area relative to the first display area of the lock screen wallpaper page in the currently used lock screen wallpaper file to the offset information and scaling ratio information of the second area relative to the second display area of the lock screen wallpaper page.

[0499] In the above embodiments, the functional main module changes the offset information and scaling ratio information in the currently used lock screen wallpaper file to the offset information and scaling ratio information of the first area relative to the first display area of the lock screen wallpaper page. Therefore, here, the offset information and scaling ratio information of the first area relative to the first display area of the lock screen wallpaper page are changed.

[0500] The blur degree information and the depth of field effect switch state information in the currently used lock screen wallpaper file are not changed and are default values.

[0501] Step 3235: The functional main module determines the second display picture corresponding to the option picture in the original layer and the second display picture corresponding to the first cut-out picture in the cut-out layer according to the offset information and scaling ratio information of the second area relative to the second display area of the lock screen wallpaper page, as well as the blur degree information and the depth of field effect switch state information.

[0502] Step 3236: The functional main module sends the layer identifier of the original layer and the second display picture corresponding to the option picture in the original layer, and the layer identifier of the cut-out layer and the second display picture corresponding to the first cut-out picture in the cut-out layer to the lock screen view module.

[0503] Step 3237: After receiving the layer identifier of the original layer and the second display picture corresponding to the option picture in the original layer, and the layer identifier of the cut-out layer and the second display picture corresponding to the first cut-out picture in the cut-out layer, the lock screen view module updates the display information of the original layer and the display information of the cut-out layer in the wallpaper display information.

[0504] Step 3238: The lock screen view module displays the lock screen wallpaper page.

[0505] Figure 33 It is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 33 The shown flowchart is used to illustrate the specific implementation process in which the user zooms in and out the main picture of the wallpaper based on the wallpaper editing interface. Refer to Figure 33 , the method may include the following steps:

[0506] Step 3301: The functional main module receives a zoom operation on the lock screen wallpaper page.

[0507] In some cases, if the user wants to zoom in on the main picture of the lock screen wallpaper, as shown in Figure 15 Figure (a) or Figure (c), the user can perform a zoom operation on the lock screen wallpaper page, and the functional main module will receive this zoom operation.

[0508] Step 3302: In response to this zoom operation, the functional main module determines the target zoom ratio and the target offset.

[0509] The target zoom ratio is the zoom ratio corresponding to this zoom operation. The target offset is the offset corresponding to this zoom operation.

[0510] Exemplarily, in the case where this zoom operation is a two-finger zoom-in operation or a two-finger zoom-out operation, the target zoom ratio and the target offset can be determined according to the sliding direction, sliding distance, sliding position, etc. of the two fingers.

[0511] Step 3303: The functional main module updates the zoom ratio in the zoom ratio information in the currently used lock screen wallpaper file to the product of this zoom ratio and the target zoom ratio, and updates the offset in the offset information in this lock screen wallpaper file to the sum of this offset and a specific offset, where the specific offset is obtained by dividing the target offset by a specific zoom ratio.

[0512] Step 3304: The functional main module processes the full-screen picture of the original layer and the full-screen picture of the cut-out layer according to the offset information, zoom ratio information, and blur degree information in this lock screen wallpaper file and a specific zoom ratio, to obtain the third display picture of the original layer and the third display picture of the cut-out layer.

[0513] The operation in Step 3304 is similar to the related operation in Step 2407 above, and this embodiment of the present application will not elaborate on it further.

[0514] Step 3305: The functional main module obtains the first position information of the first display area on the lock screen wallpaper page and the position information of the clock frame in the clock layer.

[0515] The implementation manner of Step 3305 has been described in the above embodiments, and will not be elaborated here.

[0516] Step 3306: The functional main module sends the third display picture of the cut-out layer, the position information of the first display area on the lock screen wallpaper page, and the position information of the clock frame in the clock layer to the depth of field detection module.

[0517] Step 3307: After the depth of field detection module receives the third display picture of the matte layer, the position information of the first display area of the lock screen wallpaper page, and the position information of the clock frame in the clock layer, it determines the second mapping area where the first display area of the lock screen wallpaper page is mapped to the third display picture of the matte layer according to the third display picture of the matte layer and the position information of the first display area of the lock screen wallpaper page, generates the position information of the second mapping area, and the foreground object of the third display picture is included in the second mapping area.

[0518] Step 3308: The depth of field detection module determines the third mapping area where the clock frame is mapped to the second mapping area according to the position information of the clock frame and the position information of the second mapping area, and generates the position information of the third mapping area.

[0519] Step 3309: The depth of field detection module determines the position information of the midpoint connection line of the short sides of the third mapping area according to the position information of the third mapping area.

[0520] Step 3310: The depth of field detection module determines the number of first pixel points on the midpoint connection line of the short sides of the third mapping area according to the position information of the midpoint connection line of the short sides of the third mapping area.

[0521] The implementation process of Step 3310 can refer to the implementation process of the security line detection module for determining the number of first pixel points on the target security line according to the position information of the target security line, which will not be elaborated here.

[0522] In some embodiments, the depth of field detection module may also determine the position information of the vertex connection line of the short sides of the third mapping area according to the position information of the third mapping area, and determine the number of first pixel points on the midpoint connection line of the short sides of the third mapping area according to the position information of the vertex connection line of the short sides of the third mapping area. The embodiments of the present application do not limit this.

[0523] Step 3311: The depth of field detection module determines that the number of first pixel points is less than the second threshold and sends the third detection result to the function main body module.

[0524] In the embodiments of the present application, the value of the second threshold is relatively large compared to the first threshold. For example, the second threshold may be an integer from 70 to 90. Specifically, the second threshold may be 80. Of course, in other embodiments, the second threshold may also be other values, and the present application does not limit the value of the second threshold.

[0525] The third detection result is used to indicate that the number of first pixels is less than a second threshold. The fact that the number of first pixels is less than the second threshold means that the foreground object covers a partial area of the lower half of the clock frame. When the foreground object covers a partial area of the lower half of the clock frame, the depth-of-field effect of the wallpaper template can be displayed through the first display area of the lock screen wallpaper page. While, the fact that the number of first pixels is greater than or equal to the second threshold means that the foreground object covers a partial area of the upper half of the clock frame. When the foreground object covers a partial area of the upper half of the clock frame, the depth-of-field effect of the wallpaper template cannot be displayed through the first display area of the lock screen wallpaper page.

[0526] Step 3312: After receiving the third detection result, the function main body module changes the depth-of-field effect switch status information in the currently used lock screen wallpaper file to the on state and sets the visibility of the matte layer to visible.

[0527] Step 3313: The function main body module sends the layer identifier and the third display picture of the original layer, the layer identifier and the third display picture of the matte layer, and the visibility of the matte layer to the lock screen view module.

[0528] Step 3314: After receiving the layer identifier and the third display picture of the original layer, the layer identifier and the third display picture of the matte layer, and the visibility of the matte layer, the lock screen view module updates the display information of the original layer and the display information of the matte layer in the wallpaper display information.

[0529] Step 3315: The lock screen view module displays the lock screen wallpaper page.

[0530] Exemplarily, the displayed lock screen wallpaper page may be Figure 15 the lock screen wallpaper page 702 shown in Figure (b) or Figure (d) in, where the main picture of the displayed wallpaper is enlarged or reduced accordingly.

[0531] It should be noted that the implementation process of the user moving the main picture of the lock screen wallpaper is similar to the implementation process of the user zooming in or out of the main picture of the lock screen wallpaper, and the embodiments of the present application will not elaborate on this.

[0532] Step 3316: The depth-of-field detection module determines that the number of first pixels is greater than or equal to the second threshold and sends a fourth detection result to the function main body module.

[0533] Step 3317: After receiving the fourth detection result, the function main body module changes the depth-of-field effect switch status information in the currently used lock screen wallpaper file to the off state and sets the visibility of the matte layer to invisible.

[0534] Step 3318: The function main body module sends the layer identifier and the third display picture of the original layer, the layer identifier and the third display picture of the cut-out layer, and the visibility of the cut-out layer to the lock screen view module.

[0535] Step 3319: After receiving the layer identifier and the third display picture of the original layer, the layer identifier and the third display picture of the cut-out layer, and the visibility of the cut-out layer, the lock screen view module updates the display information of the original layer and the display information of the cut-out layer in the wallpaper display information.

[0536] Step 3320: The lock screen view module displays the lock screen wallpaper page.

[0537] Exemplarily, the displayed lock screen wallpaper page may be the lock screen wallpaper page 702 shown in FIG. (b) or FIG. (d) in Figure 15 where the main picture of the displayed wallpaper is enlarged or reduced accordingly.

[0538] It should be noted that the implementation process of the user moving the main picture of the lock screen wallpaper is similar to the implementation process of the user zooming in or out the main picture of the lock screen wallpaper in the above, and the embodiments of the present application will not elaborate on this again.

[0539] In the embodiments of the present application, the electronic device can respond to the operation on the lock screen wallpaper page, generate the position information of the third mapping area according to the third display picture of the cut-out layer, the position information of the first display area of the lock screen wallpaper page, and the position information of the clock frame; determine the visibility of the cut-out layer according to the position information of the third mapping area and the foreground object of the third display picture of the cut-out layer. When the visibility of the cut-out layer is visible, when the cut-out layer and the clock layer are superimposed and displayed, a depth of field effect can be displayed. That is to say, during the process of the user operating on the lock screen wallpaper page, the electronic device can display the depth of field effect in real time according to the user operation, improving the user experience.

[0540] It should be understood that the embodiments of the present application may include various types of wallpaper templates. For example, please refer to Figure 4 again. One type of wallpaper template includes an original layer and a clock layer. One type of wallpaper template may include an original layer, a color background layer, a clock layer, and a cut-out layer. One type of wallpaper template may include a layer, a decoration layer 1, a clock layer, and a decoration layer 2. One type of wallpaper template may include an original layer, a decoration layer 1, a clock layer, a cut-out layer, and a decoration layer 2. Of course, it is not limited to these examples, and the multiple layers included in a wallpaper template can be flexibly set according to actual needs.

[0541] The user uses Figure 33The flowchart shown can move or scale the main picture in most wallpaper templates based on the wallpaper editing interface and display the depth-of-field effect. In some embodiments, some types of wallpaper templates include multiple decoration layers, which have a photo frame effect when superimposed. When moving or scaling the main picture in the wallpaper template with a photo frame effect based on the wallpaper editing interface and wanting to display the depth-of-field effect, after the above step 3304, the following steps may also be included:

[0542] Step 3321: The function main body module obtains the position information of the security lines in the multiple decoration layers, which have a photo frame effect when superimposed.

[0543] Step 3322: The function main body module sends the position information of multiple security lines, the position information of the first display area of the lock screen wallpaper page, and the third display picture of the matte layer to the depth-of-field detection module.

[0544] Step 3323: After receiving the position information of multiple security lines, the position information of the first display area of the lock screen wallpaper page, and the third display picture of the matte layer, the depth-of-field detection module determines the fourth mapping area where the first display area of the lock screen wallpaper page is mapped to the third display picture of the matte layer according to the position information of the first display area of the lock screen wallpaper page and the third display picture, and generates the position information of the fourth mapping area. The foreground object in the third display picture is included in the fourth mapping area.

[0545] Step 3324: The depth-of-field detection module determines the target security lines where multiple security lines are mapped to the fourth mapping area according to the position information of multiple security lines and the position information of the fourth mapping area, and generates the position information of the target security lines.

[0546] Step 3225: The depth-of-field detection module determines the number of the first pixel points on the target security lines according to the position information of the target security lines.

[0547] Step 3226: When the depth-of-field detection module determines that the number of the first pixel points is equal to the first threshold, it sends the first detection result to the function main body module.

[0548] Step 3227: After receiving the first detection result and the third detection result, the depth-of-field detection module changes the depth-of-field effect switch state information in the currently used lock screen wallpaper file to the on state and sets the visibility of the matte layer to visible.

[0549] Step 3328: The function main body module sends the layer identifier and the third display picture of the original layer, the layer identifier and the third display picture of the matte layer, and the visibility of the matte layer to the lock screen view module.

[0550] Step 3329: After the lock screen view module receives the layer identifier and the third display picture of the original layer, the layer identifier and the third display picture of the cut-out layer, and the visibility of the cut-out layer, it updates the display information of the original layer and the display information of the cut-out layer in the wallpaper display information.

[0551] Step 3330: The lock screen view module displays the lock screen wallpaper page.

[0552] Step 3331: The depth of field detection module determines that the number of first pixel points is greater than the first threshold, and sends the second detection result to the functional main body module.

[0553] Step 3332: After the depth of field detection module receives the second detection result, it changes the depth of field effect switch status information in the currently used lock screen wallpaper file to the off state, and sets the visibility of the cut-out layer to invisible.

[0554] Step 3333: The functional main body module sends the layer identifier and the third display picture of the original layer, the layer identifier and the third display picture of the cut-out layer, and the visibility of the cut-out layer to the lock screen view module.

[0555] Step 3334: After the lock screen view module receives the layer identifier and the third display picture of the original layer, the layer identifier and the third display picture of the cut-out layer, and the visibility of the cut-out layer, it updates the display information of the original layer and the display information of the cut-out layer in the wallpaper display information.

[0556] Step 3335: The lock screen view module displays the lock screen wallpaper page.

[0557] Figure 34 It is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 34 The shown flowchart is used to illustrate the specific implementation process for the user to set the desktop wallpaper based on the wallpaper editing interface. Refer to Figure 34 , this method may include the following steps:

[0558] Step 3401: The functional main body module receives the click operation on the follow lock screen button.

[0559] In some cases, if the user wants the main picture of the desktop wallpaper to be the same as that of the lock screen wallpaper, then as shown in Figure (b) of Figure 18 , the user can click the follow lock screen button 76, and the functional main body module will receive the click operation on the follow lock screen button 76.

[0560] Step 3402: In response to the click operation on the follow lock screen button, the functional main body module generates a desktop wallpaper file.

[0561] The desktop wallpaper file contains the layer basic information, offset information, scaling ratio information, blur degree information, etc. of the original layer in the currently edited lock screen wallpaper file. By way of example, the desktop wallpaper file can be a json file.

[0562] The function main body module can save the desktop wallpaper file as the currently edited desktop wallpaper file in the memory, and all subsequent editing processes are to modify the currently edited desktop wallpaper file.

[0563] The function main body module can parse the desktop wallpaper file to obtain the display information of the original layer. The operation of the function main body module parsing the desktop wallpaper file is similar to the operation of the function main body module parsing the wallpaper module file in step 2407 above, and this application embodiment will not elaborate on this.

[0564] Step 3403: The function main body module sends the display information of the original layer to the desktop view module.

[0565] Step 3404: After receiving the display information of the original layer, the desktop view module displays the desktop wallpaper page.

[0566] By way of example, the displayed desktop wallpaper page can be Figure 18 the desktop wallpaper page 703 shown in Figure (c) in, where the displayed wallpaper has the same main picture as the wallpaper of the lock screen wallpaper page 702.

[0567] In some embodiments, after the user edits the desktop wallpaper by zooming or moving the main picture, the edited desktop wallpaper can also be saved to make it effective. This process can include the following steps 3405 and step 3407.

[0568] Step 3405: The function main body module receives the click operation on the corresponding application button.

[0569] Step 3406: The function main body module sends a wallpaper data storage request to the file system.

[0570] The wallpaper data storage request is used to request the storage of the desktop wallpaper file 1. The desktop wallpaper file 1 is the currently edited desktop wallpaper file, and in this application embodiment, it is the desktop wallpaper file generated by the function main body module according to the lock screen wallpaper file after the user selects to follow the lock screen.

[0571] Step 3407: After receiving the wallpaper data storage request, the file system updates the desktop wallpaper file.

[0572] By way of example, the file system can update the first file of the desktop wallpaper to the desktop wallpaper file 1.

[0573] In some embodiments, when the functional main body module is in a state where the desktop wallpaper follows the lock screen, when the layer basic information, offset information, scaling ratio information, blur degree information, etc. in the original layer of the lock screen wallpaper file are updated, the updated information can be synchronized to the desktop wallpaper file, and then the desktop wallpaper is displayed on the desktop wallpaper page according to the desktop wallpaper file, so that the desktop wallpaper can be consistent with the main picture of the lock screen wallpaper.

[0574] Figure 35 It is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 35 The shown flowchart is used to illustrate the specific implementation process of a user setting a desktop wallpaper based on a wallpaper editing interface. Refer to Figure 35 , the method may include the following steps:

[0575] Step 3501: The functional main body module receives a click operation on the color button.

[0576] In some cases, if the user wants to set a solid-color wallpaper or a gradient-color wallpaper for the desktop, then as Figure 19 shown in Figure (a), the user can click the color button 77, and the functional main body module will receive the click operation on the color button 77.

[0577] Step 3502: In response to the click operation on the color button, the functional main body module displays a sixth pop-up window.

[0578] Exemplarily, as Figure 19 shown in Figure (b), a gradient-color switch and multiple color options are displayed in the sixth pop-up window 7016.

[0579] Step 3503: The functional main body module receives a selection operation on color option 1.

[0580] Exemplarily, as Figure 19 shown in Figure (b), the user can click a color option (hereinafter referred to as color option 1) displayed in the sixth pop-up window 7016, and the functional main body module will receive the selection operation on color option 1.

[0581] Step 3504: In response to the selection operation on color option 1, the functional main body module determines the color corresponding to color option 1.

[0582] Step 3505: When the gradient-color switch is in the off state, the functional main body module generates a solid-color picture with a size of the screen size and a color corresponding to color option 1 as the specified picture; when the gradient-color switch is in the on state, the functional main body module generates a gradient-color picture with a size of the screen size and a color corresponding to color option 1 as the specified picture.

[0583] Step 3506: The functional entity module stores the specified picture in the file system to obtain the storage path of the specified picture.

[0584] Step 3507: The functional entity module updates the picture storage path in the layer basic information of the original layer in the desktop wallpaper file to the storage path of the specified picture.

[0585] Step 3508: The functional entity module parses the desktop wallpaper file to obtain the display information of the original layer.

[0586] Step 3509: The functional entity sends the display information of the original layer to the desktop view module.

[0587] Step 3510: After receiving the display information of the original layer, the desktop view module displays the desktop wallpaper page.

[0588] Exemplarily, the displayed desktop wallpaper page can be Figure 19 the desktop wallpaper page 703 shown in Figure (c) of

[0589] In some embodiments, after the user edits the desktop wallpaper by setting a solid color wallpaper or a gradient color wallpaper, the edited desktop wallpaper can also be saved to make it effective. This process may include the following steps 3511 and 3513.

[0590] Step 3511: The functional entity module receives a click operation on the corresponding application button.

[0591] Step 3512: The functional entity module sends a wallpaper data storage request to the file system.

[0592] This wallpaper data storage request is used to request the storage of the desktop wallpaper file 2. The desktop wallpaper file 2 is the currently edited desktop wallpaper file, and in the embodiments of the present application, it is the desktop wallpaper file updated by the functional entity module according to the set wallpaper after the user sets a solid color wallpaper or a gradient color wallpaper.

[0593] Step 3513: After receiving the wallpaper data storage request, the file system updates the desktop wallpaper file.

[0594] Exemplarily, the file system can update the first file of the desktop wallpaper to the desktop wallpaper file 2.

[0595] In some embodiments, the user can select a picture as the desktop wallpaper through the select wallpaper button in the wallpaper editing interface. This process is similar to the process in which the user replaces the main picture of the lock screen wallpaper through the replace picture button above, and will not be elaborated here.

[0596] In some embodiments, the user can adjust the blur degree of the desktop wallpaper through the blur button in the wallpaper editing interface. This process is similar to the process in which the user adjusts the blur degree of the main picture of the lock screen wallpaper through the background blur control as described above, and will not be elaborated here.

[0597] In some embodiments, the user can scale or move the desktop wallpaper on the desktop wallpaper page. This process is similar to the process in which the user scales or moves the main picture of the lock screen wallpaper on the lock screen wallpaper page as described above, and will not be elaborated here.

[0598] As an example, after the user edits the lock screen wallpaper and / or the desktop wallpaper through one or more of the above editing functions, if the user does not want to save the edited lock screen wallpaper and / or desktop wallpaper, the user can click the return button in the wallpaper editing interface. In this case, the function main module can clear the lock screen wallpaper file and the desktop wallpaper file currently being edited in the memory.

[0599] As another example, after the user edits the lock screen wallpaper and / or the desktop wallpaper through one or more of the above editing functions, the user can also save the edited lock screen wallpaper and / or desktop wallpaper to make it effective.

[0600] In some embodiments, as Figure 16 shown in Figure (a) of

[0601] The function main module can receive a click operation on the application button. In response to the click operation, the function main module takes the currently edited lock screen wallpaper file as the first file of the lock screen wallpaper, updates and stores the first file of the lock screen wallpaper in the file system, and takes the currently edited desktop wallpaper file as the first file of the desktop wallpaper, and updates and stores the first file of the desktop wallpaper in the file system.

[0602] Similarly, in response to the click operation, the functional main body module can also generate a second file of the desktop wallpaper according to the currently edited desktop wallpaper file, and the second file of the desktop wallpaper includes the target pictures of the original layers in the desktop wallpaper file. The functional main body module can update and store the second file of the desktop wallpaper to the file system. In this way, when the desktop application displays the desktop wallpaper, it can obtain the second file of the desktop wallpaper from the file system and then directly display the pictures in the second file of the desktop wallpaper, which is simple and fast.

[0603] The above Figure 21 Embodiments to Figure 35 The embodiments have described in detail the specific implementation process of displaying the wallpaper editing interface and performing wallpaper editing based on the wallpaper editing interface when the wallpaper editing function is used for the first time. Next, the specific implementation process when the wallpaper editing function is used again will be described.

[0604] Figure 36 is a flowchart of a wallpaper editing method provided by an embodiment of the present application. Figure 36 The shown flowchart is used to illustrate the specific implementation process of displaying the wallpaper editing interface when the wallpaper editing function is used again. Refer to Figure 36 , the method may include the following steps:

[0605] Step 3601: The desktop application receives a second gesture operation.

[0606] The second gesture operation may be a gesture operation defined in advance. For example, the second gesture operation may be a two-finger pinch operation, a long press operation, a double click operation, an S-shaped sliding operation, etc., and the embodiments of the present application do not limit this.

[0607] For example, assuming that the second gesture operation is a two-finger pinch operation, as shown in Figure 9 Figure (a) therein, when the electronic device displays the desktop 900, the user can perform a two-finger pinch on the desktop 900. In this case, the desktop application can receive the two-finger pinch operation on the desktop 900. Among them, the two-finger pinch operation triggered on the desktop 900 is used to indicate entering the desktop editing interface.

[0608] Step 3602: In response to the second gesture operation, the desktop application displays the desktop editing interface.

[0609] Exemplarily, as shown in Figure 9 Figure (b) therein, the desktop editing interface may display relevant buttons for editing the desktop, such as a wallpaper button, a card button, a switching effect button, a desktop setting button, etc.

[0610] Step 3603: The desktop application receives a click operation on the wallpaper button.

[0611] Exemplarily, asFigure 9 As shown in Figure (b) in

[0612] Step 3604: In response to the click operation on the wallpaper button, the desktop application sends a second message to the gallery application.

[0613] Exemplarily, the second message can be an intent message.

[0614] The second message can carry source information, which is used to indicate which application the second message comes from. For example, the source information in the second message can be the application identifier of the desktop application.

[0615] In some implementations, the first message can also carry the storage path of the desktop wallpaper.

[0616] Since the click operation on the wallpaper button is used to indicate entering the wallpaper editing function, after the desktop application receives the click operation on the wallpaper button, it can send a second message to the gallery application to indicate that the gallery application displays the wallpaper editing interface.

[0617] Step 3605: After the function main body module in the gallery application receives the second message, if it determines that the second message comes from the desktop application, it displays function buttons.

[0618] The function main body module can determine whether the second message comes from the desktop application according to the source information in the second message.

[0619] In some embodiments, if the function main body module determines that the second message comes from the desktop application, then the function main body module can determine that the display area of the desktop wallpaper page is a third display area preset within the screen, and the display area of the lock screen wallpaper page is a fourth display area preset, where only part of the fourth display area is within the screen or the fourth display area is completely outside the screen. In this case, as Figure 9 shown in Figure (c) in

[0620] The size of the third display area is the same as that of the fourth display area. The area ratio of the third display area and the area ratio of the fourth display area are both the same as the screen ratio of the electronic device.

[0621] For example, as Figure 37As shown, when the second message comes from the desktop application, the functional main body module can determine that the display area of the desktop wallpaper page is the preset display area C within the screen, while the display area of the lock screen wallpaper page is the preset display area D. Only a very small part of the display area D is within the screen, and most of it is outside the screen. In this case, the user can see the complete desktop wallpaper page, but only a very small part of the lock screen wallpaper page.

[0622] In some embodiments, if the functional main body module determines that the second message comes from the desktop application, it can also display a mask layer.

[0623] As an example, the functional main body module can obtain the corresponding picture according to the storage path of the picture carried in the second message (i.e., the desktop wallpaper described above), or the functional main body module can obtain a preset picture. Then, the functional main body module can adjust the picture according to the screen information so that the size of the picture is the screen size, and then blur the picture to obtain the mask layer, and then display the mask layer.

[0624] Step 3606: The functional main body module sends a wallpaper data acquisition request to the file system.

[0625] This wallpaper data acquisition request is used to request the acquisition of the lock screen wallpaper file and the desktop wallpaper file.

[0626] Step 3607: After receiving the wallpaper data acquisition request, the file system sends the lock screen wallpaper file and the desktop wallpaper file to the functional main body module.

[0627] After receiving the wallpaper data acquisition request sent by the functional main body module in the gallery application, the file system can send the first file of the lock screen wallpaper to the functional main body module as the lock screen wallpaper file, and send the first file of the desktop wallpaper to the functional main body module as the desktop wallpaper file.

[0628] Since the wallpaper editing function has been used before, the first file of the lock screen wallpaper is a file containing layer set information, offset information, scaling ratio information, blur degree information, depth of field effect switch state information, etc., and the first file of the desktop wallpaper is a file containing the layer basic information, offset information, scaling ratio information, blur degree information, etc. of the original layer. Exemplarily, the first file of the lock screen wallpaper and the first file of the desktop wallpaper are both json files.

[0629] Step 3608: After receiving the lock screen wallpaper file and the desktop wallpaper file, the functional main body module parses the lock screen wallpaper file to obtain the lock screen wallpaper display information, and parses the desktop wallpaper file to obtain the desktop wallpaper display information.

[0630] The operation in step 3608 is similar to that in step 2407 above, and details are not described herein again in the embodiments of the present application.

[0631] It should be noted that after receiving the lock screen wallpaper file and the desktop wallpaper file, the function main body module can save the lock screen wallpaper file as the currently edited lock screen wallpaper file in the memory, and save the desktop wallpaper file as the currently edited desktop wallpaper file in the memory. During the subsequent editing process, modifications are made to the currently edited lock screen wallpaper file and the currently edited desktop wallpaper file.

[0632] Step 3609: The function main body module sends a fourth display request to the lock screen view module and a fifth display request to the desktop view module.

[0633] The fourth display request is used to request the display of the lock screen wallpaper page. The fourth display request may carry lock screen wallpaper display information, and further may also carry the position information of the display area of the lock screen wallpaper page.

[0634] The fifth display request is used to request the display of the desktop wallpaper page. The fifth display request may carry desktop wallpaper display information, and further may also carry the position information of the display area of the desktop wallpaper page.

[0635] Step 3610: After receiving the fourth display request, the lock screen view module displays the lock screen wallpaper page.

[0636] Step 3611: After receiving the fifth display request, the desktop view module displays the desktop wallpaper page.

[0637] After displaying the function button, the lock screen wallpaper page, and the desktop wallpaper page through the above steps, the display of the wallpaper editing interface is completed. For example, the displayed wallpaper editing interface may be the wallpaper editing interface 703 shown in FIG. (c) in Figure 9 After the wallpaper editing interface is displayed, the user can edit the lock screen wallpaper or the desktop wallpaper based on the wallpaper editing interface. The specific editing process has been described in detail in the above

[0638] embodiments to Figure 24 embodiments and will not be elaborated herein again. Figure 35 It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0639] In the above embodiments, the descriptions of the various embodiments have their own focuses. For parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0640] In the above embodiments, the descriptions of the various embodiments have their own focuses. For parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0641] An embodiment of this application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments can be implemented.

[0642] An embodiment of this application also provides a computer program product, and when the computer program product runs on an electronic device, the electronic device can implement the steps in the above method embodiments.

[0643] An embodiment of this application also provides a chip system. The chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.

[0644] In the above embodiments, all or part of them can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of them can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. 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 a website, a computer, a server or a data center to another website, a computer, a server or a data center in a wired manner (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a Digital Versatile Disc (DVD)) or a semiconductor medium (such as a Solid State Disk (SSD)).

[0645] The above are optional embodiments provided by this application, which are not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the technical scope disclosed in this application shall be included in the protection scope of this application.

Claims

1. A wallpaper editing method, characterized in that, The method includes: Displaying a lock screen wallpaper page, where the lock screen wallpaper page includes a replace picture button; In response to an operation on the replace picture button, obtaining candidate pictures and position information of a first display area of the lock screen wallpaper page, where the candidate pictures include foreground objects; Based on the position information of the first display area and the candidate pictures, obtaining position information of a first area, where the first area includes the foreground objects and has the same aspect ratio as the first display area; Adjusting the candidate pictures according to the position information of the first display area and the position information of the first area to obtain first display pictures corresponding to the candidate pictures; Displaying the first display pictures corresponding to the candidate pictures in the first display area.

2. The method according to claim 1, wherein The adjusting the candidate pictures according to the position information of the first display area and the position information of the first area to obtain first display pictures corresponding to the candidate pictures includes: Determining offset information and scaling ratio information of the first area relative to the first display area according to the position information of the first display area and the position information of the first area; Adjusting the candidate pictures based on the offset information and the scaling ratio information to obtain first display pictures corresponding to the candidate pictures.

3. The method according to claim 1 or 2, characterized in that, The obtaining position information of the first area based on the position information of the first display area and the candidate pictures includes: Obtaining position information of a clock frame of a clock layer; Based on the position information of the first display area, the candidate pictures, and the position information of the clock frame, obtaining position information of the first area.

4. The method according to any one of claims 1 to 3, characterized in that The method further includes: Processing the candidate pictures to generate first matte pictures; Adjusting the first matte pictures according to the position information of the first display area and the position information of the first area to obtain first display pictures corresponding to the first matte pictures; Displaying the first display pictures corresponding to the first matte pictures in the first display area.

5. The method according to claim 4, wherein The currently used lock screen wallpaper file includes multiple decorative layers with a photo frame effect, and the method further includes: Obtaining position information of security lines on pictures in the multiple decorative layers; According to the position information of the first display area and the first display pictures corresponding to the first matte pictures, determining target security lines of the multiple security lines mapped to a first mapping area, and generating position information of the target security lines; According to the position information of the target security lines, determining the number of first pixel points on the target security lines, where the pixel value of the first pixel points is zero; In the case where it is determined that the number of the first pixel points is greater than a first threshold, adjusting the candidate pictures based on the position information of transparent areas on pictures in the multiple decorative layers to obtain second display pictures corresponding to the candidate pictures; Displaying the second display pictures corresponding to the candidate pictures in the transparent areas on pictures in the multiple decorative layers.

6. The method according to claim 5, wherein Determining a plurality of target security lines obtained by mapping the security lines to the first mapping area based on the position information of the first display area and the first display picture corresponding to the first matte picture, and generating the position information of the target security lines, includes: Based on the position information of the first display area and the first display picture corresponding to the first matte picture, determining a first mapping area obtained by mapping the first display area to the first display picture corresponding to the first matte picture, and generating the position information of the first mapping area, where the first mapping area includes a foreground object in the first display picture corresponding to the first matte picture; Based on the position information of the plurality of security lines and the position information of the first mapping area, determining a plurality of target security lines obtained by mapping the security lines to the first mapping area, and generating the position information of the target security lines.

7. The method according to claim 5 or 6, characterized in that When it is determined that the number of the first pixel points is greater than a first threshold, based on the position information of the transparent areas on the pictures of the plurality of decoration layers, adjusting the candidate picture to obtain a second display picture corresponding to the candidate picture, includes: When it is determined that the number of the first pixel points is greater than a first threshold, determining the position information of a second display area of the lock screen wallpaper page according to the position information of the transparent areas on the pictures of the plurality of decoration layers; Based on the second display area and the candidate picture, obtaining the position information of a second area, where the second area includes the foreground object of the candidate picture, and the aspect ratio of the second area is the same as that of the second display area; According to the position information of the second display area and the position information of the second area, adjusting the candidate picture to obtain a second display picture corresponding to the candidate picture; Displaying the second display picture corresponding to the candidate picture in the transparent areas on the pictures of the plurality of decoration layers, includes: Displaying the second display picture corresponding to the candidate picture in the second display area.

8. A wallpaper editing method, characterized in that, The method includes: Displaying a lock screen wallpaper page; In response to an operation on the lock screen wallpaper page, obtaining a third display picture of an original layer, a third display picture of a matte layer, first position information of a first display area of the lock screen wallpaper page, and position information of a clock frame in a clock layer; Generating the position information of a third mapping area according to the third display picture of the matte layer, the position information of the first display area of the lock screen wallpaper page, and the position information of the clock frame; Determining the visibility of the matte layer according to the position information of the third mapping area and the foreground object of the third display picture of the matte layer; When the visibility of the matte layer is visible, setting the visibility of the matte layer to be visible; Displaying the third display picture of the original layer and the third display picture of the matte layer in the first display area of the lock screen wallpaper page.

9. The method according to claim 8, wherein The generating the position information of the third mapping area according to the third display picture of the matte layer, the position information of the first display area of the lock screen wallpaper page, and the position information of the clock frame, includes: Determine a second mapped area where the first display area of the lock screen wallpaper page is mapped onto the third display picture of the cutout layer based on the position information of the third display picture of the cutout layer and the first display area of the lock screen wallpaper page, and generate the position information of the second mapped area. The foreground object of the third display picture of the cutout layer is included in the second mapped area. Determine a third mapped area where the clock frame is mapped onto the second mapped area based on the position information of the clock frame and the position information of the second mapped area, and generate the position information of the third mapped area.

10. The method according to claim 8 or 9, characterized in that, The determining the visibility of the cutout layer based on the position information of the third mapped area and the foreground object of the third display picture of the cutout layer includes: Determine the position information of the midpoint connection line of the short sides of the third mapped area based on the position information of the third mapped area. Determine the number of first pixel points on the midpoint connection line of the short sides of the third mapped area based on the position information of the midpoint connection line of the short sides of the third mapped area. The pixel value of the first pixel point is zero. When it is determined that the number of the first pixel points is less than a second threshold, determine that the visibility of the cutout layer is visible.

11. The method according to any one of claims 8 to 10, characterized in that, The currently used lock screen wallpaper file includes multiple decorative layers with a photo frame effect. The method further includes: Obtain the position information of the security lines on the pictures in the multiple decorative layers. Determine a fourth mapped area where the first display area of the lock screen wallpaper page is mapped onto the third display picture of the cutout layer based on the position information of the first display area of the lock screen wallpaper page and the third display picture of the cutout layer, and generate the position information of the fourth mapped area. The foreground object in the third display picture of the cutout layer is included in the fourth mapped area. Determine the target security lines where the multiple security lines are mapped onto the fourth mapped area based on the position information of the multiple security lines and the position information of the fourth mapped area, and generate the position information of the target security lines. Determine the number of the first pixel points on the target security lines based on the position information of the target security lines. The pixel value of the first pixel point is zero. When it is determined that the number of the first pixel points is greater than a first threshold, determine that the visibility of the cutout layer is visible and set the visibility of the cutout layer to be visible. Display the third display picture of the original layer and the third display picture of the cutout layer in the first display area of the lock screen wallpaper page.

12. An electronic device, characterized in that, The electronic device includes: one or more processors, and a memory. The memory is coupled to the one or more processors. The memory is used to store computer program code, and the computer program code includes computer instructions. The one or more processors call the computer instructions to cause the electronic device to execute the method according to any one of claims 1 to 11.

13. A chip system, characterized in that, The chip system is applied to an electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions to cause the electronic device to execute the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when run on an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Screen-locked wallpaper display method, device, mobile terminal and storage medium

    CN109460181A

  • Desktop display method and electronic equipment

    CN114721567A

  • Display method and electronic equipment

    CN114911551A

  • Desktop wallpaper configuration method and device, electronic equipment and readable storage medium

    CN115129410A

  • Adjustment method, device and equipment and computer readable storage medium

    CN115640087A