Method for displaying lock screen image, electronic equipment and readable storage medium

By switching the background view page component and the foreground view page component in the lock screen interface of the electronic device, synchronous sliding of the foreground image and background image is solved when the electronic device turns on the magazine lock screen function and applies the depth of field lock screen image. Mobility issues improve response speed and user experience during sliding.

CN119440358APending Publication Date: 2025-02-14HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310973673.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When the electronic device turns on the magazine lock screen function and applies the depth of field lock screen image, how to make the electronic device realize hand mobility.

Method used

The background view page component and the foreground view page component respectively switch the background image and the foreground image to achieve synchronous sliding of the foreground image and background image, ensuring that the user can respond in a timely manner and display the target lock screen image when sliding the lock screen interface.

Benefits of technology

It realizes hand mobility when the user slides the lock screen interface, ensures synchronous sliding of the foreground image and background image, and improves the response speed and user experience during the sliding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440358A_ABST
    Figure CN119440358A_ABST
Patent Text Reader

Abstract

The invention discloses a method for displaying a lock screen image, electronic equipment and a readable storage medium, and belongs to the technical field of terminals. The method comprises the steps that under the condition that a magazine screen locking function is started, in response to a sliding operation on a screen locking interface, a first background image is switched to a second background image through a background view page component, and a first foreground image is switched to a second foreground image through a foreground view page component. The background view page component is used for rendering background image data of the lock screen image, the foreground view page component is used for rendering foreground image data of the lock screen image, and the foreground image of the lock screen image is null under the condition that the lock screen image is not the depth-of-field lock screen image. And loading foreground image data of the target lock screen image into the foreground view page component, and loading background image data of the target lock screen image into the background view page component. According to the invention, the foreground image and the background image are controlled to slide synchronously, so that the hand-following mobility is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a method for displaying a lock screen image, an electronic device, and a readable storage medium. Background Art

[0002] The lock screen image is an image displayed in the lock screen interface. For example, when the electronic device is set with a lock screen password, the lock screen image is displayed in the lock screen interface when the electronic device turns off the screen and then turns on the screen again. With the rapid development of terminal technology, the display methods of the lock screen images of electronic devices are becoming more and more diverse, for example, including but not limited to static lock screen images, dynamic lock screen images, magazine lock screen images, etc. Summary of the invention

[0003] The present application provides a method for displaying a lock screen image, an electronic device, and a readable storage medium, which can solve the problem of how to enable the electronic device to achieve hand-following mobility when the user slides in the lock screen interface when the electronic device turns on the magazine lock screen function and applies the depth of field lock screen image. The technical solution is as follows:

[0004] In a first aspect, a method for displaying a lock screen image is provided, which is applied to an electronic device, and the method includes:

[0005] When the magazine lock screen function is turned on, in response to a sliding operation on the lock screen interface, switching from the first background image to the second background image through the background view page component, and switching from the first foreground image to the second foreground image through the foreground view page component;

[0006] The background view page component is used to render background image data of the lock screen image, and the foreground view page component is used to render foreground image data of the lock screen image, wherein the foreground image of the lock screen image is empty when the lock screen image is not a depth of field lock screen image, and when the depth of field lock screen image is displayed in the lock screen interface, the foreground image is at an upper layer of the hierarchy where the system time indicator is located and partially blocks the system time indicator;

[0007] Load the foreground image data of the target lock screen image into the foreground view page component, and load the background image data of the target lock screen image into the background view page component, wherein the target lock screen image is a lock screen image in the magazine lock screen resource that is adjacent to the currently displayed lock screen image and corresponds to the sliding direction of the sliding operation.

[0008] In one example, the background image data includes a background image or a background thumbnail in a bitmap format, and the foreground image data includes a foreground image in a bitmap format.

[0009] In this way, after detecting the user's sliding operation on the lock screen interface, the background view page component and the foreground view page component are triggered to switch at the same time. In this way, whether it is a magazine lock screen image or a depth of field lock screen image, the foreground image and the background image can slide synchronously, thereby achieving hand-following mobility. In addition, the foreground image data of the target lock screen image is loaded into the foreground view page component, and the background image data of the target lock screen image is loaded into the background view page component. The target lock screen image is a lock screen image in the magazine lock screen resource that is adjacent to the currently displayed lock screen image and corresponds to the sliding direction of the sliding operation. In this way, when sliding to the target lock screen image later, it can respond to the sliding operation in time, and display the foreground image and background image of the target lock screen image, thereby ensuring hand-following mobility during the sliding process.

[0010] As an example of the present application, the background view page component includes a background thumbnail of a lock screen image to be displayed after sliding;

[0011] The method of switching from the first background image to the second background image through the background view page component in response to a sliding operation on the lock screen interface when the magazine lock screen function is turned on includes:

[0012] When the magazine lock screen function is turned on, in response to the sliding operation on the lock screen interface, switching from the first background image to the background thumbnail corresponding to the second background image through the background view page component;

[0013] Acquire the second background image;

[0014] The background thumbnail currently displayed in the lock screen interface is replaced with the second background image through the background view page component.

[0015] In this way, the background thumbnail is first displayed by the background view page component, and then the background image is obtained to replace the background thumbnail, which can save the storage space of the background view page component.

[0016] As an example of the present application, the loading of the foreground image data of the target lock screen image into the foreground view page component, and the loading of the background image data of the target lock screen image into the background view page component, include:

[0017] According to the position of the second background image in the first view in the background view page component, obtaining detailed information of the target lock screen image from a magazine lock screen data list, wherein the magazine lock screen data list includes detailed information of a plurality of lock screen images;

[0018] The background image data of the target lock screen image is loaded into the background view page component according to the detailed information of the target lock screen image, and the foreground image data of the target lock screen image is loaded into the foreground view page component according to the detailed information of the target lock screen image.

[0019] In this way, after sliding the lock screen interface, the detailed information of the target lock screen image adjacent to the lock screen image displayed after sliding is obtained from the magazine lock screen data list, and based on the detailed information, the background image data of the target lock screen image is loaded into the background view page component in advance, and the foreground image data of the target lock screen image is loaded into the foreground view page component in advance, so that the next time you slide to the target lock screen image, you can respond to the sliding operation on the lock screen interface in time.

[0020] As an example of the present application, obtaining detailed information of the target lock screen image from a magazine lock screen data list according to the position of the first view where the second background image is located in the background view page component includes:

[0021] According to the view identifier of the first view, determine the index information of the second background image from a first correspondence relationship, wherein the first correspondence relationship is used to record the correspondence between the index information of each background image displayed in the background view page component and the view identifier of the view where the each background image is located;

[0022] According to the index information of the second background image and the sliding direction of the sliding operation, detailed information of the target lock screen image is acquired from the magazine lock screen data list.

[0023] In this way, based on the view identifier of the first view where the currently displayed lock screen image is located and the first object relationship, the index information of the currently displayed lock screen image is determined, and then based on the index information, the index information adjacent to the index information is determined from the magazine lock screen data list, and then the corresponding detail information is obtained based on the determined index information to obtain the detail information of the target lock screen image.

[0024] As an example of the present application, the detailed information of the target lock screen image includes background image data and index information of the target lock screen image;

[0025] The step of loading the background image data of the target lock screen image into the background view page component according to the detailed information of the target lock screen image includes:

[0026] Acquire a second view adjacent to the first view from the background view page component, wherein a position of the second view relative to the first view is opposite to the sliding direction;

[0027] Rendering the background image data of the target lock screen image into the second view;

[0028] The correspondence between the view identifier of the second view and the index information of the target lock screen image is recorded in the first correspondence.

[0029] In this way, the background image of the target lock screen image can be displayed in time when sliding to the target lock screen image subsequently, and the background image data of the adjacent lock screen image of the target lock screen image can be updated to the background view page component according to the first object relationship.

[0030] As an example of the present application, the index information is used to indicate the type of the corresponding lock screen image; the loading of the foreground image data of the target lock screen image into the foreground view page component according to the detailed information of the target lock screen image includes:

[0031] Determining whether the target lock screen image is a depth of field lock screen image currently applied in the electronic device according to the first indication information and the index information of the target lock screen image, wherein the first indication information is used to indicate the type of the lock screen image currently applied by the electronic device, and the first indication information is recorded when setting the lock screen image of the electronic device;

[0032] When the target lock screen image is a depth of field lock screen image currently applied by the electronic device, acquiring a foreground image of the target lock screen image from a first designated directory;

[0033] Rendering the foreground image of the target lock screen image into a third view in the foreground view page component, wherein the third view is adjacent to a fourth view where the second foreground image is located, and a position of the third view relative to the fourth view is opposite to the sliding direction;

[0034] The correspondence between the view identifier of the third view and the index information of the target lock screen image is recorded in the second correspondence relationship, and the second correspondence relationship is used to record the correspondence between the index information of each foreground image displayed in the foreground view page component and the view identifier of the view where the each foreground image is located.

[0035] In this way, the foreground image of the target lock screen image can be displayed in time when sliding to the target lock screen image subsequently, and the foreground image data of the adjacent lock screen image of the target lock screen image can be updated to the foreground view page component according to the second object relationship.

[0036] As an example of the present application, after determining whether the target lock screen image is a depth of field lock screen image currently applied in the electronic device according to the first indication information and the index information of the target lock screen image, it also includes:

[0037] When the target lock screen image is not the depth of field lock screen image currently applied by the electronic device, the third view is set to empty, and the correspondence between the view identifier of the third view and the index information of the target lock screen image is recorded in the second correspondence.

[0038] In this way, when the target lock screen image is not the depth of field lock screen image currently applied by the electronic device, the third view will still be set to empty, and the correspondence between the view identifier of the third view and the index information of the target lock screen image will be recorded, so that when sliding to the target lock screen image subsequently, the foreground view page component will switch to the third view to ensure hand-following mobility.

[0039] As an example of the present application, the electronic device includes a touch event monitoring module and a magazine lock screen layout module;

[0040] The method of switching from a first background image to a second background image through a background view page component and switching from a first foreground image to a second foreground image through a foreground view page component in response to a sliding operation on the lock screen interface when the magazine lock screen function is turned on includes:

[0041] The touch event monitoring module sends a sliding event to the magazine lock screen layout module in response to the sliding operation, wherein the sliding event includes a sliding parameter of the sliding operation;

[0042] The magazine lock screen layout module sends the sliding event to the background view page component, and sends the sliding event to the foreground view page component;

[0043] When the background view page component determines according to the sliding parameter that the sliding event satisfies a preset sliding condition, the background view page component switches from the first background image to the second background image based on the sliding parameter, and the preset sliding condition is that the sliding distance in the horizontal direction is greater than or equal to half the length of the screen width;

[0044] When the foreground view page component determines according to the sliding parameter that the sliding event satisfies the preset sliding condition, the foreground view page component switches from the first foreground image to the second foreground image based on the sliding parameter.

[0045] In this way, after detecting a sliding operation on the lock screen interface, sliding events are sent to the background view page component and the foreground view page component respectively, so that the background view page component and the foreground view page component slide synchronously, thereby achieving hand tracking.

[0046] As an example of the present application, in the case where the lock screen image currently applied in the electronic device is a depth of field lock screen image, the type of the currently applied lock screen image includes a theme depth of field lock screen image or a custom depth of field lock screen image, the theme depth of field lock screen image is a depth of field lock screen image applied by a theme application, and the custom depth of field lock screen image is a depth of field lock screen image applied by a gallery application.

[0047] In this way, the depth of field lock screen image can be set through the theme application, and the depth of field lock screen image can also be set through the gallery application, which increases the setting method of the depth of field lock screen image. In addition, when the depth of field lock screen image is set through the theme application or the gallery application, the hand-following mobility can be achieved through the method provided by the present application, which improves the applicability of the method.

[0048] In a second aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for displaying a lock screen image as described in the first aspect when executing the computer program.

[0049] In a third aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes the method for displaying a lock screen image described in the first aspect.

[0050] In a fourth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method for displaying a lock screen image as described in the first aspect.

[0051] The technical effects obtained by the above-mentioned second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 is a schematic diagram showing a display of a lock screen interface according to an exemplary embodiment;

[0053] Figure 2 is a schematic diagram showing an application scenario according to an exemplary embodiment;

[0054] Figure 3 is a schematic diagram of an application scenario according to another exemplary embodiment;

[0055] Figure 4 is a schematic diagram of an application scenario according to another exemplary embodiment;

[0056] Figure 5is a schematic diagram of an application scenario according to another exemplary embodiment;

[0057] Figure 6 is a schematic diagram of an application scenario according to another exemplary embodiment;

[0058] Figure 7 is a schematic diagram of an application scenario according to another exemplary embodiment;

[0059] Figure 8 is a schematic diagram of the architecture of a software system of an electronic device according to an exemplary embodiment;

[0060] Fig. 9 is a schematic diagram of a framework for displaying a lock screen interface according to an exemplary embodiment;

[0061] Fig.10 is a flowchart of a method for initializing an application depth of field lock screen image according to an exemplary embodiment;

[0062] Fig.11 is a schematic diagram of a process of adding detailed information of a customized depth of field lock screen image to a magazine lock screen data list according to an exemplary embodiment;

[0063] Fig.12 is a schematic diagram of a process of adding detailed information of a theme depth of field lock screen image to a magazine lock screen data list according to an exemplary embodiment;

[0064] Fig.13 is a schematic diagram showing a process of updating a background view page component according to an exemplary embodiment;

[0065] Fig.14 is a schematic diagram showing a process of updating a foreground view page component according to an exemplary embodiment;

[0066] Fig.15 is a flowchart of a method for displaying a lock screen image according to another exemplary embodiment;

[0067] Fig.16 is a flowchart of a method for displaying a lock screen image according to another exemplary embodiment;

[0068] Fig.17 is a schematic diagram showing a layout of a background view page component according to an exemplary embodiment;

[0069] Fig.18 The diagram is a schematic diagram showing the structure of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0070] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0071] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.

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

[0073] Before introducing in detail the method for displaying a lock screen image provided in an embodiment of the present application, a brief introduction to the custom vocabulary and terms involved in the embodiment of the present application is first given.

[0074] Lock screen interface: refers to the user interface that is first displayed when the electronic device is locked with a password after the system is restarted or the screen is turned on again after being turned off.

[0075] Lock screen image: is the image applied to the lock screen interface. Users can usually set the lock screen image from the theme, or they can customize the lock screen image from the gallery.

[0076] Depth of field lock screen image: refers to an image with depth of field capability (referred to as depth of field image) as the lock screen image. The depth of field image includes a foreground image and a background image. When the depth of field image is displayed in the lock screen interface, the foreground image is displayed above the layer where the system time indicator in the lock screen interface is located, and partially blocks the system time indicator. For example, please refer to Figure 1 , Figure 1 is a schematic diagram of a depth-of-field lock screen image according to an exemplary embodiment, wherein part of the time information is partially blocked by the foreground image (ie, the image subject A).

[0077] Theme: refers to the interface style presented by the electronic device, including but not limited to: desktop images, lock screen images and other content. Users can set their favorite themes in electronic devices. When electronic devices apply different themes, the interface styles presented by the electronic devices are different. Theme-related lock screen images usually include dynamic lock screen images, depth of field lock screen images, etc. Dynamic lock screen images refer to lock screen images with dynamic effects. As an example, the depth of field lock screen image applied from the theme can be referred to as the theme depth of field lock screen image.

[0078] Customized lock screen image: usually refers to an image in the gallery application that is used as the lock screen image. Customized lock screen images usually include customized normal lock screen images and customized depth of field lock screen images. Among them, the customized depth of field lock screen image refers to an image with depth of field capability selected by the user from the gallery application as the lock screen image; the customized normal lock screen image usually refers to an image without depth of field capability, that is, the customized normal lock screen image refers to an ordinary image selected by the user from the gallery application as the lock screen image.

[0079] Magazine lock screen: refers to providing multiple different magazine lock screen images for electronic devices. When the magazine lock screen function is turned on, when the electronic device is in the lock screen state and the screen is on, one of the multiple magazine lock screen images is displayed in the lock screen interface, and when the user slides left or right in the lock screen interface, in response to the user's sliding operation, the electronic device can display the next or previous magazine lock screen image in the lock screen interface. These magazine lock screen images can come from one or more of the local preset resources, cloud resources, or resources manually added by the user.

[0080] In a possible application scenario, when the magazine lock screen function is turned on in an electronic device, a magazine lock screen image in the magazine lock screen resource is displayed in the lock screen interface after the electronic device turns on the screen. Afterwards, when the user slides the lock screen interface to the left or right, in response to the user's sliding operation, the electronic device displays the next or previous magazine lock screen image in the magazine lock screen resource, such as Figure 2As shown, after the user swipes left, the electronic device displays the next magazine lock screen image. In an embodiment of the present application, when the magazine lock screen function is turned on in the electronic device, the user can also set a depth of field lock screen image in the electronic device. In this case, the electronic device can add the set depth of field lock screen image to the magazine lock screen resource. Although the depth of field lock screen image includes a foreground image and a background image, when the user slides to the set depth of field lock screen image, it is usually required that the electronic device can still respond to the sliding operation in the lock screen interface in a timely manner, that is, the set depth of field lock screen image can be displayed in the lock screen interface in a timely manner. To this end, an embodiment of the present application provides a method for displaying a lock screen image, which can achieve chirality during the user sliding on the lock screen interface.

[0081] To facilitate understanding, the application scenarios involved in the embodiments of the present application are introduced below using an electronic device that is a mobile phone as an example.

[0082] For an example, see Figure 3 , Figure 3 is a schematic diagram of an application scenario according to an exemplary embodiment. In a possible application scenario, based on the magazine lock screen function of the mobile phone, if the user wants the mobile phone to display a depth of field lock screen image in the lock screen interface, the user can set the depth of field image through the theme application. Figure 3 In Figure (a), the user can click on the application identifier of the setting application; the mobile phone responds to the click operation on the application identifier of the setting application by displaying the following Figure 3 In the setting interface S1 shown in FIG. (b), the user can click the "wallpaper" option in the setting interface S1; in response to the click operation on the "wallpaper" option, the mobile phone can display the following Figure 3 The wallpaper setting interface S2 shown in FIG. (c) in FIG. 1 shows the type of lock screen image options, such as the "wallpaper" option (which is usually an option for a static lock screen image), the "theme" option, the "magazine lock screen" option, etc. The user can click the "theme" option. In response to the click operation on the "theme" option, the mobile phone displays the following Figure 3 The theme selection interface S3 shown in FIG. (d) in FIG. 1 displays lock screen images corresponding to different themes. For example, dynamic lock screen images corresponding to dynamic image themes named “Wandering (dynamic)”, “Forest (dynamic)” and “Stars (dynamic)” are displayed, and depth of field images corresponding to depth of field image themes named “People (depth of field)” are displayed. The user can select the depth of field image named “People (depth of field)” as the lock screen image. In response to the selection operation of the depth of field image named “People (depth of field)”, the mobile phone displays the following: Figure 3In the preset theme interface S4 shown in Figure (e), if the user decides to use the depth of field image as the lock screen image, the user clicks the "Apply" option in the preset theme interface S4; in response to the user's click on the "Apply" option, the mobile phone applies the depth of field image as the lock screen image, and adds the depth of field image to the magazine lock screen resource, so that the lock screen image in the magazine lock screen resource includes not only the magazine lock screen image, but also the set depth of field image.

[0083] In this case, see Figure 4 In Figure (a), after the phone screen is turned off, when it is turned on again, the phone displays a lock screen image from a magazine lock screen resource in the lock screen interface. The lock screen image may be a magazine lock screen image or a Figure 3 The theme depth of field lock screen image set by the process shown is, for example, Figure 4 As shown in Figure (b) of , it is assumed that a magazine lock screen image is displayed. In an example, Figure 4 As shown in Figure (c), when the user slides the lock screen interface to the left, in response to the user's left sliding operation, the mobile phone displays the next lock screen image in the magazine lock screen resource, for example, the next lock screen image is the set theme depth of field lock screen image. That is, when the magazine lock screen function is turned on and the theme depth of field lock screen image is also set, when sliding to the theme depth of field lock screen image, the mobile phone can display the set theme depth of field lock screen image in time, thereby achieving chirality.

[0084] In another example, see Figure 5 , Figure 5 is a schematic diagram of an application scenario according to another exemplary embodiment. In another possible application scenario, based on the magazine lock screen function of the mobile phone, the user can also set a lock screen image with depth of field capability in a customized manner. For example, please refer to Figure 5 In (a) of FIG. 1 , the user can click on the application logo of the gallery application; in response to the click operation on the application logo of the gallery application, the mobile phone displays the following Figure 5 The gallery preview interface S5 shown in FIG. (b) in FIG. 1 shows thumbnails of multiple stored images. The user can select a thumbnail of an image with depth of field capability and set the image corresponding to the selected thumbnail as the lock screen image. For example, the user can long-press the thumbnail of the selected image H. In response to the long-press operation on the thumbnail of image H, the following is displayed: Figure 5 In the editing window S6 shown in Figure (c), the editing window S6 displays a "Set as wallpaper" option; the user can click the "Set as wallpaper" option, and in response to the click operation on the "Set as wallpaper" option, the mobile phone applies the image H as the lock screen image and can add the image H to the magazine lock screen resources.

[0085] In this case, please refer to Figure 6 In Figure (a), the phone screen is turned off, and then when it is turned on again, the phone displays a lock screen image from the magazine lock screen resource on the lock screen interface. The lock screen image may be a magazine lock screen image, or it may be a lock screen image obtained through Figure 5 The custom depth of field lock screen image set by the process shown in the figure. Figure 6 As shown in Figure (b) of the figure, it is assumed that a magazine lock screen image is displayed. Please refer to Figure 6 In Figure (c), when the user slides the lock screen interface to the left, in response to the user's left sliding operation, the mobile phone displays the next lock screen image. It is assumed that the lock screen image is another magazine lock screen image in the magazine lock screen resource. Please refer to Figure 6 In Figure (d), when the user continues to slide the lock screen interface to the left, in response to the user's left sliding operation, the mobile phone displays the next lock screen image in the lock screen interface, and the lock screen image is the set image H. It can be seen that when the magazine lock screen function is turned on and a custom depth of field lock screen image is set, when sliding to the custom depth of field lock screen image, the mobile phone can also display the set custom depth of field lock screen image in time, thereby achieving chirality.

[0086] It should be noted that the above description is based on the example of left swiping. In another example, when the user swipes right to the set depth of field lock screen image, the mobile phone also achieves chirality, which will not be described in detail here.

[0087] It should also be noted that in the above Figure 6 When setting the lock screen image in the manner shown, if the image H is an image with a depth of field effect, the mobile phone can automatically display the image H in the lock screen interface in the form of a depth of field effect after the screen is turned on. Alternatively, in a possible implementation, the user can also select the display effect of the image H during the process of setting the lock screen image. For example, see Figure 7 , the phone displays Figure 7 In the case of the editing window S6 shown in FIG. (a), the user clicks the "Set as wallpaper" option; in response to the click operation on the "Set as wallpaper" option, when the image H is an image with depth of field capability, the mobile phone displays the following Figure 7 In the display effect selection window S7 shown in FIG. (b) of FIG. 1 , the user can select image H from the display effect selection window S7 as the display effect when the lock screen image is displayed. If the user clicks the "depth of field effect display" option, then in response to the click operation on the "depth of field effect display" option, the mobile phone can set the selected image H as the lock screen image. Afterwards, when the mobile phone displays image H in the lock screen interface, image H has a depth of field effect, for example, the display effect is as follows: Figure 7 As shown in Figure (c).

[0088] It should be noted that the above description is based on the example that the electronic device is a mobile phone. In another example, the electronic device may also be, but is not limited to, a mobile phone with a folding screen, a sports camera (GoPro), a digital camera, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, etc., which is not limited in the embodiments of the present application.

[0089] Next, the software system architecture of the electronic device is described. The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to exemplify the software system of the electronic device.

[0090] Figure 8 is a block diagram of a software system of an electronic device provided in an embodiment of the present application. Figure 8 The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system layer, and the kernel layer.

[0091] The application layer can include a series of application packages. Figure 8 As shown, the application layer may include system applications (System UI), theme applications, gallery applications, etc.

[0092] System UI is the first user-visible application during the system startup process of an electronic device, such as the lock screen interface displayed after the electronic device is turned on, and the desktop and status bar displayed after unlocking. System UI is a set of UI components that provide users with system-level information display and interaction, and can be used to control the display of lock screen images and desktop images. In an embodiment of the present application, System UI can be used to interact with a theme application or a gallery application to display the set depth of field lock screen image in the lock screen interface after the screen is turned on when a depth of field lock screen image is applied in the electronic device. In one example, please refer to Figure 8, System UI includes multiple functional modules, including but not limited to magazine lock screen layout module, broadcast monitoring module, lock screen image processing module, lock screen image drawing module, foreground view page component, foreground view adapter, background view page component and background view adapter. The magazine lock screen layout module is used to distribute touch events; the broadcast monitoring module is used to monitor wallpaper change broadcast messages; the lock screen image processing module is used to determine whether the changed lock screen image is a depth of field lock screen image when the wallpaper is changed, and is also used to control the display of the lock screen image; the lock screen image drawing module is used to notify the view to render the view; the foreground view page component includes multiple views, each view can be used to render the foreground image of the depth of field lock screen image, and the foreground view adapter is used to fill the view in the foreground view page component; the background view page component includes multiple views, each view can be used to render the background image of the depth of field lock screen image, and the background view adapter is used to fill the view in the background view page component. In one example, the foreground view adapter is coupled to the foreground view page component, and the background view adapter is coupled to the background view page component. In another example, the foreground view adapter is decoupled from the foreground view page component, and the background view adapter is decoupled from the background view page component.

[0093] The theme application provides a variety of theme images for users to set as the desktop image or lock screen image of the electronic device. The theme application can be a system built-in application or an installed third-party application.

[0094] The gallery application is used to store images, for example, images can be taken or from the cloud. As an example of the present application, the gallery application includes ordinary images and images with depth of field capabilities. Ordinary images do not have a depth of field effect when applied to the lock screen interface, and images with depth of field capabilities have a depth of field effect when applied to the lock screen interface. Users can select any image from the gallery application and set it as the lock screen image of the electronic device.

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

[0096] As an example of the present application, the application framework layer includes a wallpaper management service module, which is used to send a wallpaper change broadcast message to the System UI when it monitors the notification of the wallpaper change event of the theme application or the gallery application, so that the System UI performs wallpaper change processing. In one example, the wallpaper management service module is named WallpaperManagerService.

[0097] Please refer to Figure 8 , the application framework layer also includes a touch event detection module, a power management service module and a window management service module. The touch event detection module is used to detect touch events on the off screen and determine the event type. The power management service module is used to control the screen off or on when there is a screen off event or screen on event in the electronic device, and send a screen off notification or screen on notification to related modules. The window management service module is responsible for the management of the lock screen interface, such as displaying a lock screen image in the lock screen interface. In an example, the power management service module is named PowerManagerService, and the window management service module is named WindowManagerService.

[0098] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0099] The system library can include multiple functional modules, such as: surface manager, media library, 3D graphics processing library (such as: OpenGL ES), 2D graphics engine (such as: SGL), etc. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.

[0100] The kernel layer is the layer between hardware and software. The kernel layer contains at least the screen on / off driver, display driver, and camera driver. The screen on / off driver is used to detect the user's trigger operation on the button used to trigger the screen on / off.

[0101] Next, the display method of the lock screen image provided in the embodiment of the present application is introduced.

[0102] Please refer to Fig. 9 , Fig. 9 is a schematic diagram of a framework for displaying a lock screen image according to an exemplary embodiment. In implementation, Figure 3 As shown, users can set a lock screen image from the Themes app, or as Figure 5 As shown, the user can also set the lock screen image from the gallery application. As an example of the present application, no matter which method the user uses to set the lock screen image, when the lock screen image set by the user is a depth of field lock screen image, the foreground image (i.e., the image body) and background image of the set depth of field lock screen image will be stored in the lock screen directory and renamed separately. At most one background image and one foreground image are stored in the lock screen directory, that is, in the process of updating the background image and foreground image in the lock screen directory, the names of the updated foreground image and the updated background image in the lock screen directory remain unchanged. For example, the lock screen directory is data / themes / 0 / wallpaper, the foreground image is named unlock_depth_effect_wallpaper_0.jpg in the lock screen directory, and the background image is named unlock_wallpaper_0.jpg in the lock screen directory.

[0103] In one example, when a user sets a lock screen image from a theme application, after the user selects theme depth of field lock screen image A and applies it, that is, triggers the lock screen image setting operation, the theme application obtains a compressed package of theme depth of field lock screen image A, which includes a foreground image and a background image of theme depth of field lock screen image A, wherein the compressed package may be preset locally on the electronic device or preset in the cloud and obtained by the electronic device. Afterwards, the theme application decompresses the compressed package and stores the decompressed foreground image and background image in the lock screen directory. At the same time, the theme application can send a theme change message to the System UI to enable the System UI to change the layout of the lock screen interface.

[0104] In another example, when the user sets the lock screen image from a gallery application, after the user selects a custom depth of field lock screen image B in a gallery application and applies it, that is, triggers the lock screen image setting operation, the gallery application obtains the foreground image and background image of the pre-stored custom depth of field lock screen image B, and then saves the foreground image and background image of the custom depth of field lock screen image B to the lock screen directory.

[0105] It should be noted that the foreground image and background image of the custom depth of field lock screen image B pre-stored in the image application may be generated by the electronic device when it is idle, or may be generated by the electronic device when it is charging. Exemplarily, in the charging state, the electronic device can traverse the depth of field images in the gallery application, and each time a depth of field image is traversed, if the depth of field image has not been traversed before, the background image and foreground image of the depth of field image currently traversed can be separated by an artificial intelligence (AI) subject recognition method, and then the separated foreground image and background image are stored correspondingly with the depth of field image currently traversed. In this way, when the user sets any depth of field image in the gallery application as the lock screen image, the gallery application can directly save the foreground image and background image of any pre-stored depth of field image to the lock screen directory. In one example, after the user selects a depth of field image in the gallery application to be applied to the lock screen image, the gallery application can also store the background image of the depth of field image in the custom wallpaper frame of the electronic device.

[0106] It should also be noted that the above description is based on the example that the lock screen image set by the user is a depth of field image. In another example, if the lock screen image set by the user is not a depth of field image, the images stored in the lock screen directory only include a background image, which is the set lock screen image itself, that is, in this case, there is no foreground image in the lock screen directory.

[0107] Please continue to refer to Fig. 9 After receiving the user's lock screen image setting operation, the theme application or gallery application notifies the wallpaper management service module of the wallpaper change event. After the wallpaper management service module listens to the notification, it sends a wallpaper change broadcast message to the System UI so that the System UI can perform some initialization processing on the display of the lock screen image. For details, please refer to Fig.10 The initialization processing operations of System UI can include the following:

[0108] Step 1001: Receive a wallpaper change broadcast message.

[0109] In one possible case, the wallpaper change broadcast message is sent to the System UI after the wallpaper management service module monitors the wallpaper change event notification sent by the theme application. For example, see Figure 3 After the user sets a theme depth of field lock screen image in the theme application, the theme application notifies the wallpaper management service module of a wallpaper change event, after which the wallpaper management service module sends a wallpaper change broadcast message to the System UI.

[0110] In another possible case, the wallpaper change broadcast message is sent to the System UI after the wallpaper management service module monitors the wallpaper change event notification sent by the gallery application. Figure 4 After the user sets a custom depth of field lock screen image in the gallery application, the gallery application notifies the wallpaper management service module of a wallpaper change event. After that, the wallpaper management service module sends a wallpaper change broadcast message to the System UI.

[0111] As an example of the present application, System UI can receive wallpaper change broadcast messages through a broadcast monitoring module.

[0112] In one example, a wallpaper change broadcast message may carry second indication information, and the second indication information is used to indicate whether the currently set lock screen image is a theme lock screen image or a custom lock screen image. Specifically, since the wallpaper management service module can know whether the wallpaper change event is notified by the theme application or the gallery application, the wallpaper management service module can determine whether the currently set lock screen image is from the theme application or the gallery application. Based on this, when sending a wallpaper change broadcast message to the System UI, the second indication information can be carried in the wallpaper change broadcast message, so that the System UI can determine whether the currently set lock screen image is a theme lock screen image or a custom lock screen image based on the wallpaper change broadcast message. Exemplarily, when the second indication information is a preset identifier, the second indication information is used to indicate that the currently set lock screen image is a custom lock screen image, otherwise, when the second indication information is not a preset identifier, the second indication information is used to indicate that the currently set lock screen image is a theme lock screen image.

[0113] Optionally, the wallpaper change broadcast message may also carry event description information, and the event description information is used to indicate the application object of the wallpaper change, and the application object includes a user interface or a lock screen interface, that is, the event description information is used to indicate whether the desktop image is changed or the lock screen image is changed. The embodiment of the present application is described by taking the example that the event description information is used to indicate that the application object of the wallpaper change is the lock screen interface.

[0114] Step 1002: After receiving the wallpaper change broadcast message, determine whether the current system is restarting.

[0115] according to Fig. 9 As can be seen from the previous records, after the user sets the lock screen image, System UI will receive a wallpaper change broadcast message. In another possible case, after the electronic device is turned on and restarted, System UI will also receive a wallpaper change broadcast message. For example, the wallpaper management service module can send a wallpaper change broadcast message to System UI when the electronic device is turned on and restarted. For the above two situations, System UI handles them differently. Therefore, after receiving the wallpaper change message, System UI can first determine whether the current system is restarting.

[0116] In one example, the System UI can query whether the electronic device is currently displaying the desktop. If the electronic device is currently displaying the desktop, it is determined that the system has not been restarted. Otherwise, if the electronic device is not currently displaying the desktop, it is determined that the system has been restarted. Further, the System UI can determine whether the electronic device is currently displaying the desktop by querying the restart identifier. For example, when the restart identifier is true, it is determined that the electronic device is currently displaying the desktop, so that it can be determined that the system has not been restarted; when the restart identifier is false, it is determined that the electronic device is not currently displaying the desktop, so that it can be determined that the system has been restarted.

[0117] If it is determined that the current system is not restarting, the process proceeds to step 1003. Otherwise, if it is determined that the current system is restarting, the process proceeds to step 1008.

[0118] Step 1003: Determine whether the currently set lock screen image is a custom lock screen image.

[0119] As an example of the present application, the System UI can determine whether the currently set lock screen image is a custom lock screen image based on the second indication information carried in the wallpaper change broadcast message. For example, when the second indication information is a preset identifier, it is determined that the currently set lock screen image is a custom lock screen image; otherwise, when the second indication information is not a preset identifier, it is determined that the currently set lock screen image is not a custom lock screen image.

[0120] If the currently set lock screen image is a custom lock screen image, proceed to the operation of step 1004. Otherwise, if the currently set lock screen image is not a custom lock screen image, it means that the currently set lock screen image is a theme lock screen image. In this case, proceed to the operation of step 1008.

[0121] Step 1004: Determine whether the currently set custom lock screen image has depth of field capability.

[0122] As an example of the present application, since the lock screen directory is only used to store lock screen images, and when the set lock screen image is a depth of field image, the lock screen directory includes two images, unlock_depth_effect_wallpaper_0.jpg (foreground image) and unlock_wallpaper_0.jpg (background image), and when the set lock screen image is not a depth of field image, the lock screen directory only includes one image, unlock_wallpaper_0.jpg (background image), so the System UI can query whether there are both foreground images and background images in the lock screen directory, so as to determine whether the currently set custom lock screen image has depth of field capability. Specifically, when both foreground images and background images exist in the lock screen directory, it can be determined that the custom lock screen image currently set by the user has depth of field capability. Otherwise, when only the background image exists in the lock screen directory, it is determined that the custom lock screen image currently set by the user does not have depth of field capability.

[0123] If the currently set custom lock screen image has depth of field capability (hereinafter referred to as custom depth of field lock screen image), the following operations of step 1005 to step 1006 are performed. Otherwise, if the currently set custom lock screen image does not have depth of field capability, the following operation of step 1007 is performed.

[0124] Step 1005: Mark the type of the currently set lock screen image as 0.

[0125] In one example, the System UI may mark the type of the currently set lock screen image in the lightweight database. That is, when the currently set lock screen image is a custom depth of field lock screen image, the System UI writes the type of the currently set lock screen image in the lightweight database as 0. Exemplarily, the System UI may indicate the type of the currently set lock screen image through the first indication information.

[0126] It should be noted that the type of the currently set lock screen image recorded in the lightweight database is unique. The lightweight database may be SharedPreferences.

[0127] Step 1006: Add detailed information of the customized depth of field lock screen image to the magazine lock screen data list.

[0128] As an example of the present application, the detailed information of the custom depth of field lock screen image includes the background image, index information, image description information, etc. of the custom depth of field lock screen image. The background image can be obtained from the lock screen directory. The index information is used to query the detailed information of the custom depth of field lock screen image from the magazine lock screen data list. The image description information includes application widgets, text information, etc. The text information can be used to describe what the custom depth of field lock screen image represents, for example Figure 4 As shown in Figure (c), the text message is "Leisure time is a rainbow."

[0129] The magazine lock screen data list includes detailed information of each magazine lock screen image in multiple magazine lock screen images, and the detailed information of each magazine lock screen image is stored corresponding to the index information. As an example of the present application, regardless of whether the magazine lock screen function is turned on or not, the detailed information of the custom lock screen image can be added to the magazine lock screen data list. When the magazine lock screen function is turned off, the currently set lock screen image can be displayed when the lock screen interface is displayed subsequently, and the magazine lock screen image in the magazine lock screen resource is not displayed when the lock screen interface is slid.

[0130] As an example of this application, please refer to Fig.11 Step 1006, that is, adding the detailed information of the customized depth of field lock screen image to the magazine lock screen data list, may include the following steps:

[0131] A1: According to the principle of division by four with remainder zero, modify the index information of the currently set custom depth of field lock screen image.

[0132] Usually, the original index information of each lock screen image is a numerical value. Since the lock screen image type of 0 indicates a custom depth of field lock screen image, in order to facilitate subsequent identification that the currently set lock screen image is a custom depth of field lock screen image, it can be modified based on the original index information according to the principle of division by four with remainder zero.

[0133] As an example, a corresponding value that is equal to zero when divided by four can be determined by the following first formula (1) based on the original index information of the custom depth of field lock screen image, and then the index information of the currently set custom depth of field lock screen image is modified to the determined value that is equal to zero when divided by four.

[0134] (4-X1%4)+X1=Y1 (1)

[0135] It should be noted that, in the above first formula (1), X1 is the original index information of the custom depth of field lock screen image, Y1 is the modified value of zero after division by four, and % is the remainder symbol. For example, assuming that the original index information of the currently set custom depth of field lock screen image is 7, the corresponding value of zero after division by four can be determined by the above first formula (1), such as 8, and then the index information of the currently set custom depth of field lock screen image is changed from 7 to 8.

[0136] A2: Record the modified index information as cacheid.

[0137] In one example, the modified index information cacheid may be written into a lightweight database.

[0138] A3: Encapsulates the detailed information of the currently set custom depth of field lock screen image, and the detailed information at least includes the modified cacheid.

[0139] As an example of the present application, the System UI may encapsulate the detailed information into a data structure, such as BigPictureInfo. As an example and not a limitation, the System UI may also set some restrictions in BigPictureInfo, such as the restrictions may include that the custom depth of field lock screen image cannot be deleted and the lock screen automatic switching function is turned off.

[0140] A4: Add the details of the currently set custom depth of field lock screen image to the magazine lock screen data list.

[0141] The detailed information of the magazine lock screen image may include the index information, background thumbnail, image description information, etc. of the magazine lock screen image. The background thumbnail of the magazine lock screen image is obtained by compressing the magazine lock screen image according to a certain ratio. As an example of the present application, the detailed information of each magazine lock screen image corresponds to BigPictureInfo, that is, the magazine lock screen data list includes BigPictureInfo of multiple magazine lock screen images.

[0142] As an example of the present application, the detailed information of the currently set custom depth of field lock screen image can be randomly inserted into any position in the magazine lock screen data list.

[0143] In one example, the System UI can also prepare a background blur map of the currently set depth of field image. The background blur map can be displayed when the user slides up the lock screen interface, that is, when the user slides up the lock screen interface, the electronic device will have a blur effect. Among them, the background blur map can be generated based on the background image. For example, when the currently set lock screen image is a custom depth of field lock screen image, the background image can be obtained from the lock screen directory, and the background image can be Gaussian blurred to obtain the background blur map, which can then be stored.

[0144] As an example but not limitation, System UI adds the details of the custom depth of field lock screen image to the magazine lock screen data list through the lock screen image processing module. After the details of the custom depth of field lock screen image are added to the magazine lock screen data list, there are two magazine lock screen images in the magazine lock screen data list whose details are adjacent to the details of the custom depth of field lock screen image. In some examples, the custom depth of field lock screen image and the two magazine lock screen images can be said to be adjacent in the magazine lock screen resources.

[0145] It should be noted that the embodiment of the present application is described by taking the case where the currently set lock screen image is a depth of field lock screen image (including a custom depth of field lock screen image or a theme depth of field lock screen image) as an example, and the detailed information added in the magazine lock screen data list includes the background image of the depth of field lock screen image. In another example, when the set lock screen image is a depth of field lock screen image, the detailed information of the depth of field lock screen image added in the magazine lock screen data list includes a background thumbnail, but not a background image. That is, the background thumbnail of the depth of field lock screen image can be encapsulated in the detailed information, instead of encapsulating the background image in the detailed information, so that the storage space where the magazine lock screen data list is located can be saved.

[0146] After adding the detailed information of the customized depth of field lock screen image to the magazine lock screen data list, the System UI enters the following step 1013.

[0147] Step 1007: Mark the type of the currently set lock screen image as -1, and end the depth of field processing flow.

[0148] That is, when the currently set lock screen image is a custom ordinary lock screen image, the System UI writes the type of the currently set lock screen image in the lightweight database as -1, indicating that the currently set lock screen image is a custom lock screen image but not a depth of field image. After that, the System UI ends the depth of field processing flow.

[0149] Step 1008: Determine whether the currently set lock screen image is a static image.

[0150] As an example but not limitation, the System UI can determine whether the currently set lock screen image is a static image based on the wallpaper change broadcast message. For example, when the theme application notifies the wallpaper management service module of a wallpaper change event, it can indicate to the wallpaper management service module whether the lock screen image set by the user is a static image. Accordingly, when the wallpaper management service module sends a wallpaper change broadcast message to the System UI, it can indicate in the wallpaper change broadcast message so that the System UI determines whether the currently set lock screen image is a static image.

[0151] If the currently set lock screen image is a static image, proceed to the operation of the following step 1009. Otherwise, if the currently set lock screen image is not a static image, such as the set lock screen image is a dynamic image, the System UI ends the depth of field processing flow, as an example but not a limitation, and then can enter the dynamic image processing flow, etc., which is not limited in the embodiment of the present application.

[0152] Step 1009: Determine whether the currently set lock screen image has depth of field capability.

[0153] That is, it is determined whether the currently set lock screen image is a depth of field image. In implementation, System UI can query whether there are both foreground images and background images in the lock screen directory, so as to determine whether the currently set lock screen image has depth of field capability. Specifically, when both foreground images and background images exist in the lock screen directory, it can be determined that the lock screen image currently set by the user has depth of field capability. Otherwise, when only the background image exists in the lock screen directory, it is determined that the lock screen image currently set by the user does not have depth of field capability.

[0154] If the currently set lock screen image does not have depth of field capability, the System UI performs the operation of step 1007. Otherwise, if the currently set lock screen image has depth of field capability, the System UI enters the operation of the following step 1010.

[0155] Step 1010: Determine whether the currently set lock screen image is a custom depth-of-field lock screen image.

[0156] According to the above records and combined Fig. 9 It can be seen that, in one possible case, the system will be executed to step 1010 after restarting, and in another possible case, the system will be executed to step 1010 after the user sets the lock screen image. In the first possible case, the user may have set the custom depth of field lock screen image as the lock screen image before the system of the electronic device is restarted, so in this case, there is no need to perform subsequent operations such as initialization of the theme depth of field image. Therefore, it is necessary to determine whether the currently set lock screen image is a custom depth of field lock screen image.

[0157] If the currently set lock screen image is a custom depth of field lock screen image, perform the above steps 1005-1006. If the electronic device does not currently apply a custom depth of field lock screen image, it can be determined that the currently set lock screen image is a theme depth of field lock screen image. In this case, proceed to the following step 1011.

[0158] Step 1011: Mark the type of the currently set lock screen image as 3.

[0159] That is, when the currently set lock screen image is a theme depth of field lock screen image, System UI writes the type of the currently set lock screen image as 3 in the lightweight database, indicating that the currently set lock screen image is a theme lock screen image and has depth of field capability.

[0160] Of course, it should be noted that the implementation step of marking the type of the currently set lock screen image after receiving the wallpaper change broadcast message is optional. In another example, other steps may be included to meet exception handling requirements, or other methods may be used for marking. The main marking principle is: in the case of non-system restart, if the currently set lock screen image is a custom depth of field lock screen image, the type of the currently set lock screen image recorded in the lightweight database is 0; if the currently set lock screen image is a custom ordinary lock screen image, the type of the currently set lock screen image recorded in the lightweight database is -1; if the currently set lock screen image is a theme depth of field lock screen image, the type of the currently set lock screen image recorded in the lightweight database is 3. When the system restarts, if the lock screen image set before power-on is a static image and does not have depth of field capability, the type of the currently set lock screen image recorded in the lightweight database is -1; if the lock screen image set before power-on is a theme depth of field lock screen image, the type of the currently set lock screen image recorded in the lightweight database is 3; if the lock screen image set before power-on is a custom depth of field lock screen image, the type of the currently set lock screen image recorded in the lightweight database is 0.

[0161] As an example of the present application, the System UI can determine the type of the currently set lock screen image through the broadcast monitoring module after receiving the wallpaper change broadcast message, and mark the type of the currently set lock screen image in the lightweight data.

[0162] Step 1012: Add detailed information of the theme depth of field lock screen image to the magazine lock screen data list.

[0163] When it is determined that the currently set lock screen image is the theme depth of field lock screen image, System UI performs depth of field initialization based on the theme depth of field lock screen image. The main purpose is to add the detailed information of the currently set theme depth of field lock screen image to the magazine lock screen data list.

[0164] As an example of this application, please refer to Fig.12 Step 1012, that is, adding the detailed information of the theme depth of field lock screen image to the magazine lock screen data list, may include the following steps:

[0165] B1: Copy the background image in the lock screen directory to another preset directory.

[0166] To prevent the background image of the theme depth of field lock screen image from being replaced by a custom lock screen image later, SystemUI may copy the background image of the currently set theme depth of field lock screen image from the lock screen directory to a preset directory. For example, the preset directory may be data / user_de / 0 / com.android.systemui / files.

[0167] In a possible implementation, the replaced scene means that, assuming that the user currently sets the theme depth of field lock screen image Pz, the background image stored in the lock screen directory is the background image of the set theme depth of field lock screen image Pz, and the System UI adds the detailed information of the theme depth of field lock screen image Pz to the magazine lock screen data list. Afterwards, if the user resets the custom depth of field lock screen image Pd, in this case, the background image stored in the lock screen directory will be replaced by the background image of the custom depth of field lock screen image Pd, and the System UI adds the detailed information of the custom depth of field lock screen image Pd to the magazine lock screen data list, which will cause the magazine lock screen data list to no longer include the detailed information of the theme depth of field lock screen image Pz. However, in implementation, after setting the theme depth of field lock screen image Pz, in case of setting the custom depth of field lock screen image Pd, the previously set theme depth of field lock screen image Pz can be retained as a common lock screen image in the magazine lock screen resource, so that in response to the user's left or right swipe operation on the lock screen interface, when the lock screen interface of the electronic device turns the page and turns to the theme depth of field lock screen image Pz, the theme depth of field lock screen image Pz does not have a depth of field effect, and when the page is turned to the custom depth of field lock screen image Pd, the custom depth of field lock screen image Pd has a depth of field effect. Therefore, in order to achieve this effect, it is necessary to retain the background image of the theme depth of field lock screen image Pz, so in order to avoid the background image of the custom depth of field lock screen image Pd replacing the background image of the theme depth of field lock screen image Pz, the background image of the theme depth of field lock screen image Pz can be copied from the lock screen directory to another preset directory for storage during the depth of field initialization process based on the theme depth of field lock screen image Pz.

[0168] It should be noted that, as an example of the present application, in the process of setting the depth of field image as the lock screen image, the foreground image under the lock screen directory is unique, that is, the embodiment of the present application can only support setting one depth of field image (custom depth of field lock screen image or theme depth of field lock screen image) as the lock screen image.

[0169] B2: According to the principle of dividing by four and having a remainder of three, modify the index information of the currently set theme depth of field lock screen image.

[0170] Since the lock screen image type is 3, it indicates a theme depth of field lock screen image. Therefore, in order to facilitate the subsequent identification that the currently set lock screen image is the theme depth of field lock screen image, the index information can be modified based on the original index information of the theme depth of field lock screen image according to the principle of division by four and remainder by three.

[0171] As an example, based on the original index information of the theme depth of field lock screen image, a corresponding value that is divisible by four and remains three can be determined by the following second formula (2), and the index information of the currently set theme depth of field lock screen image can be modified to the determined value that is divisible by four and remains three.

[0172] (3-X2%4)+X2=Y2 (2)

[0173] It should be noted that in the above second formula (2), X2 is the original index information of the theme depth of field lock screen image, Y2 is the modified value of the remainder of three after division by four, and % is the remainder symbol. For example, assuming that the original index information of the currently set theme depth of field lock screen image is 10, the corresponding value of the remainder of three after division by four can be determined as 11 according to the above second formula (2), and then the index information of the currently set theme depth of field lock screen image is changed from 10 to 11.

[0174] B3: Record the modified index information as cacheid.

[0175] In one example, the modified index information cacheid may be written into a lightweight database.

[0176] B4: Encapsulates the detailed information of the currently set theme depth of field lock screen image, and the detailed information at least includes the modified cacheid.

[0177] In one example, the detailed information of the theme depth of field lock screen image may also include its image description information, background image, etc. The image description information includes application widgets, text information, etc. When the current lock screen image is set to the theme depth of field lock screen image, the background image of the theme depth of field lock screen image can be obtained from the preset directory data / user_de / 0 / com.android.systemui / files.

[0178] As an example of the present application, the System UI can also encapsulate the detailed information of the theme depth of field lock screen image into a data structure, which will not be described one by one in the embodiments of the present application.

[0179] B5: Add the detailed information of the currently set theme depth of field lock screen image to the magazine lock screen data list.

[0180] As an example of the present application, the specific implementation of adding the detailed information of the currently set theme depth of field lock screen image to the magazine lock screen data list can be: when the magazine lock screen data list includes the detailed information of the custom depth of field lock screen image, the detailed information of the custom depth of field lock screen image is deleted from the magazine lock screen data list, and the detailed information of the currently set theme depth of field lock screen image is added to the location where the detailed information of the custom depth of field lock screen image was located before deletion. When the magazine lock screen data list does not include the detailed information of the custom depth of field lock screen image, the detailed information of the currently set theme depth of field lock screen image is inserted into the magazine lock screen data list, and illustratively, a position can be randomly selected for insertion.

[0181] As an example but not limitation, System UI adds the detailed information of the theme depth of field lock screen image to the magazine lock screen data list through the lock screen image processing module. After the detailed information of the theme depth of field lock screen image is added to the magazine lock screen data list, there are two magazine lock screen images in the magazine lock screen data list whose detailed information is adjacent to the detailed information of the theme depth of field lock screen image. In some examples, the theme depth of field lock screen image and the two magazine lock screen images can be said to be adjacent in the magazine lock screen resources.

[0182] Optionally, there may be multiple user accounts that can log in to the electronic device, for example, multiple user accounts include a main user account and a sub-user account. The main user account may generally be the owner of the electronic device, and the sub-user account is generally not the owner of the electronic device, for example, it may only have partial usage permissions. In this case, before adding the detailed information of the theme depth of field lock screen image to the magazine lock screen data list, it is also possible to determine whether the currently logged in user account is a sub-user account. If the currently logged in user account is not a sub-user account and the current electronic device has not been initialized, the System UI adds the detailed information of the theme depth of field lock screen image to the magazine lock screen data list. Otherwise, if the currently logged in user account is a sub-user account, and / or the electronic device has been initialized, the subsequent process ends. This can improve the security of electronic devices.

[0183] Step 1013: Update the view page component, wherein the view page component is used to render image data to be displayed.

[0184] The Viewpager component is a view paging tool that provides a multi-page switching effect. It can be filled with multiple views through a view adapter. A single view can be used to render the image data of a lock screen image, thereby supporting users to switch between different views when swiping left or right.

[0185] Since the lock screen image includes a foreground image and a background image when the lock screen image is a depth of field lock screen image (such as a theme depth of field lock screen image or a custom depth of field lock screen image), as an example of the present application, the view page component includes a foreground view page component and a background view page component, wherein the foreground view page component is used to render the foreground image of the lock screen image to be displayed, and the background view page component is used to render the background image of the lock screen image to be displayed. Therefore, when the view page component is updated, it includes updating the background view page component and updating the foreground view page component.

[0186] As an example of the present application, since the magazine lock screen function is turned on, when the currently set lock screen image is displayed in the lock screen interface, the user may slide the lock screen interface to the left (or right). In this case, it is necessary to display the next (or previous) lock screen image of the currently set lock screen image in the magazine lock screen resource. Therefore, in order to quickly respond to the user's sliding operation, during the update, the foreground image of each of the three lock screen images can be rendered in the foreground view page component, and the background image of each of the three lock screen images can be rendered in the background view page component, that is, the image data of each lock screen image in the currently set lock screen image, the previous lock screen image of the currently set lock screen image in the magazine lock screen resource, and the next lock screen image are cached respectively.

[0187] As an example of this application, please refer to Fig.13 In step 1013, the update process of the view in the background view page component may include the following operations (bg11)-(bg15):

[0188] (bg11) Check whether the magazine lock screen function is enabled.

[0189] In implementation, the System UI may query the state of the magazine lock screen switch to determine whether the magazine lock screen function is enabled. When the magazine lock screen switch is enabled, it is determined that the magazine lock screen function is enabled. Otherwise, when the magazine lock screen switch is disabled, it is determined that the magazine lock screen function is disabled.

[0190] In one example, the state of the magazine lock screen switch can be represented by a switch identifier. When the switch identifier is a preset first identifier, it is determined that the magazine lock screen function is turned on. When the switch identifier is a preset second identifier, it is determined that the magazine lock screen function is turned off.

[0191] When the magazine lock screen function is enabled, the System UI enters the following operation (bg12). When the magazine lock screen function is not enabled, the process ends, that is, the following operation bg12 is not performed.

[0192] (bg12) Clear the background view page component.

[0193] That is, the image data of all previously rendered lock screen images in the background view page component is cleared. In addition, System UI also clears the cached information in the background view adapter to facilitate reloading the background image of each of the three lock screen images to be displayed. The background view adapter is used to provide loading data for the background view page component.

[0194] Optionally, before clearing the background view page component, it can also be determined whether it is the first time to start up with a password and whether the lock screen interface is invisible. If there is a password for the first time to start up, after the lock screen interface is displayed, the lock screen interface will not display the magazine lock screen image when receiving a left or right sliding operation. Therefore, if there is a password for the first time to start up, there is no need to execute the subsequent process. If there is no password for the first time to start up, after the lock screen interface is displayed, the lock screen interface needs to display the magazine lock screen image when receiving a left or right sliding operation. Therefore, the operation of clearing the background view page component can be executed. In addition, if the lock screen interface is invisible, for example, when the welcome interface is displayed at startup and the lock screen interface is not displayed, the operation of clearing the background view page component can be temporarily not executed, but the operation of clearing the background view page component can be executed after entering the lock screen interface (that is, the lock screen interface is visible).

[0195] (bg13) Get the views corresponding to the currently set lock screen image and the adjacent magazine lock screen image from the background view page component.

[0196] Each view is a view that is used to display the background image of a corresponding lock screen image. The number of views included in the background view page component can be set according to requirements. For example, the background view page component includes views Figure 1 ,See Figure 2 ,See Figure 3 ,See Figure 4 And Vision Figure 5 , you can get the video during the update process Figure 1 ,See Figure 2 And Vision Figure 3 .

[0197] (bg14) Obtain detailed information of the currently set lock screen image and adjacent magazine lock screen images from the magazine lock screen data list.

[0198] According to the previous records, the currently set lock screen image may be a custom depth of field lock screen image or a theme depth of field lock screen image, and its detailed information has been added to the magazine lock screen data list. Therefore, the detailed information of the currently set lock screen image, the detailed information of its previous lock screen image, and the detailed information of its next lock screen image can be obtained from the magazine lock screen data list. In one example, the System UI can obtain the detailed information of the currently set lock screen image and the adjacent magazine lock screen image from the magazine lock screen data list through the background view adapter.

[0199] In implementation, the location of the detailed information of the currently set lock screen image can be located from the magazine lock screen data list, and the System UI obtains the detailed information of the image from the magazine lock screen data list through the background view adapter according to the located location. The previous detailed information and the next detailed information are obtained from the magazine lock screen data list to obtain the detailed information of the adjacent magazine lock screen image.

[0200] (bg15) Based on the acquired detailed information, the background view adapter renders the background images of the currently set lock screen image and its adjacent magazine lock screen image into the acquired view respectively, and records the correspondence between the background images of each lock screen image and the view in which it is located.

[0201] For example, the background image carried in the details of the currently set lock screen image is set to the view through the background view adapter. Figure 2 and record the video Figure 2 The corresponding relationship between the view identifier and the index information of the currently set lock screen image; the background thumbnail carried in the detailed information of the previous magazine lock screen image of the currently set lock screen image is set to the view through the background view adapter Figure 1 and record the video Figure 1 The corresponding relationship between the view identifier and the index information of the previous magazine lock screen image; and setting the background thumbnail carried in the details information of the next magazine lock screen image of the currently set lock screen image to the view through the background view adapter Figure 3 and record the video Figure 3 The correspondence between the view identifier and the index information of the next magazine lock screen image.

[0202] In this way, the update of the background view page component is completed.

[0203] As an example of the present application, when the background view page component is updated, the System UI can also notify all interface elements of the lock screen interface so that the interface elements in the lock screen interface are blurred based on the lock screen image in the updated background view page component.

[0204] As an example of this application, please refer to Fig.14 In step 1013, the update process of the view in the foreground view page component may include the following operations (fg21)-(fg26):

[0205] (fg21) Check whether the magazine lock screen function is enabled.

[0206] When the magazine lock screen function is turned on, the System UI performs the following (fg22) operation. Otherwise, when the magazine lock screen function is not turned on, the process ends, that is, the System UI does not perform subsequent operations.

[0207] (fg22) Gets the type of the currently set lock screen image.

[0208] In one possible case, since both the theme depth of field lock screen image and the custom depth of field lock screen image may exist in the magazine lock screen resources, for example, the user first sets the theme depth of field lock screen image, and then sets the custom depth of field lock screen image, in this case, in order to facilitate the subsequent accurate judgment of whether the currently set lock screen image is the theme depth of field lock screen image or the custom depth of field lock screen image, the System UI obtains the type of the currently set lock screen image.

[0209] According to the previous records, the type of the currently set lock screen image is recorded in the lightweight database, so System UI can query the type of the currently set lock screen image from the lightweight database. When the lock screen image is a custom depth of field lock screen image, the type of the obtained lock screen image is 0, and when the lock screen image is a theme depth of field lock screen image, the type of the obtained lock screen image is 3.

[0210] Optionally, before executing operation (fg22), it can also be determined whether this is the first time the computer is turned on with a password and whether the lock screen interface is invisible. If it is the first time the computer is turned on with a password, or the lock screen interface is not visible, the subsequent process can be omitted to avoid affecting the boot speed; otherwise, if it is the first time the computer is turned on without a password and the lock screen interface is visible, an operation is performed to obtain the type of the currently set lock screen image.

[0211] (fg23) Determine whether the current lock screen image is a depth of field image based on the type of the currently set lock screen image.

[0212] In one possible case, the type of the currently set lock screen image is 0, which indicates that the currently set lock screen image is a custom depth of field lock screen image, that is, it is determined to be a depth of field image. In another possible case, the type of the currently set lock screen image is 3, which indicates that the currently set lock screen image is a theme depth of field lock screen image, that is, it is determined to be a depth of field image. In another possible case, the type of the currently set lock screen image is neither 0 nor 3. In this case, it is determined that the currently set lock screen image is not a depth of field image.

[0213] If the currently set lock screen image is not a depth of field image, proceed to the following operation (fg24). Otherwise, if the currently set lock screen image is a depth of field image, proceed to the following operation (fg25).

[0214] (fg24) Sets the foreground image of the current lock screen image to empty.

[0215] That is, when the currently set lock screen image is not a depth of field image, it means that the currently set lock screen image does not have a foreground image. In this case, the foreground image of the current lock screen image can be set to empty through the foreground view adapter.

[0216] As an example of the present application, three views to be rendered can be obtained from the foreground view page component. When the foreground image of the currently set lock screen image is empty, the correspondence between the view identifier of a blank view and the index information of the currently set lock screen image can be recorded in the foreground view adapter.

[0217] In one example, if the currently set lock screen image includes image description information, the image description information may be added to the view corresponding to the currently set lock screen image.

[0218] As an example but not limitation, the foreground view adapter may obtain the index information of the currently set lock screen image from the background view adapter.

[0219] (fg25) Get the foreground image from the lock screen directory through the foreground view adapter. The foreground view adapter is used to provide loading data for the foreground view page component.

[0220] Since the foreground image in the lock screen directory is unique, when the currently set lock screen image is a depth of field image, the image can be directly obtained from the lock screen directory, that is, the image named unlock_depth_effect_wallpaper_0.jpg can be obtained.

[0221] (fg26) Render the acquired foreground image to the corresponding view in the foreground view page component through the foreground view adapter.

[0222] In one example, when the detailed information of the currently set lock screen image also includes image description information, the image description information can also be rendered to an upper layer of the hierarchy where the foreground image is located through the foreground view adapter.

[0223] As an example, after rendering the foreground of the currently set lock screen image to the corresponding view in the foreground view page component, the foreground view adapter can record the correspondence between the view identifier of the rendered view and the index information of the currently set lock screen image.

[0224] (fg27) According to the index information of the currently set lock screen image, obtain the index information of the previous magazine lock screen image of the current lock screen image.

[0225] As an example but not limitation, the index information of the previous magazine lock screen image of the currently set lock screen image can be obtained from the background view adapter through the foreground view adapter.

[0226] (fg28) When it is determined according to the index information of the previous magazine lock screen image that it is not a depth of field image, the foreground image of the previous magazine lock screen image is set to empty.

[0227] As an example of the present application, the previous view adjacent to the view where the foreground image of the currently set lock screen image is located can be obtained from the foreground view page component, and then the correspondence between the obtained view and the index information of the previous magazine lock screen image can be recorded, that is, the foreground image of the previous magazine lock screen image is recorded as empty, that is, it does not exist.

[0228] (fg29) According to the index information of the currently set lock screen image, obtain the index information of the next magazine lock screen image of the current lock screen image.

[0229] As an example but not limitation, the index information of the next magazine lock screen image of the currently set lock screen image can be obtained from the background view adapter through the foreground view adapter.

[0230] (fg210) When it is determined according to the index information of the next magazine lock screen image that it is not a depth of field image, the foreground image of the next magazine lock screen image is set to be empty.

[0231] As an example of the present application, the next view adjacent to the view where the foreground image of the currently set lock screen image is located can be obtained from the foreground view page component, and then the correspondence between the obtained view and the index information of the next magazine lock screen image can be recorded, that is, the foreground image of the next magazine lock screen image is recorded as empty, that is, it does not exist.

[0232] In this way, the update of the foreground view page component is completed.

[0233] It should be noted that the operations of the above steps (bg11) to (bg15) and the operations of steps (fg21) to (fg210) are all optional. In another example, in order to meet the exception handling requirements, the specific implementation of the update view page component may not be limited to including these steps, and the embodiment of the present application does not limit this.

[0234] It should be noted that the embodiment of the present application is described by taking the case where the set lock screen image is a depth of field lock screen image, and rendering the background image of the depth of field lock screen image into the background view page component as an example. In another example, the detail information of the depth of field lock screen image includes a background thumbnail. In this case, after the background view adapter obtains the detail information of the depth of field lock screen image, it renders the background thumbnail included in the detail information of the depth of field lock screen image into the background view page component. Afterwards, during the bright screen display process, the background thumbnail can be displayed first, and then the corresponding background image can be obtained according to the index information of the depth of field lock screen image, and the displayed background thumbnail can be replaced with the background image. In this way, the cache space of the background view page component can be saved while ensuring the real-time display.

[0235] It should be noted that the embodiment of the present application is described by caching the image data of three lock screen images in the view page component at the same time. In another example, the image data of more lock screen images can also be cached at the same time. For example, the image data of five lock screen images can also be cached at the same time, which is not limited in the embodiment of the present application.

[0236] Based on the above embodiments, the method for displaying a lock screen image provided by the embodiments of the present application is described below. Here, an example is taken where the magazine lock screen function is turned on in an electronic device and the currently applied lock screen image is a depth of field lock screen image. Fig.15 , Fig.15 The present invention is a flowchart of a method for displaying a lock screen image according to an exemplary embodiment. The method can be executed by the above electronic device, and the electronic device can be implemented by multiple modules interacting. The method may include some or all of the following contents:

[0237] Step 1501: After receiving the user's lock screen image setting operation, the target application notifies the wallpaper management service module of the wallpaper change event.

[0238] As an example of this application, the target application may be a theme application or a gallery application. The process of a user triggering a lock screen image setting operation can be found in Figure 3 or Figure 5 The embodiment shown.

[0239] Step 1502: After monitoring the wallpaper change event, the wallpaper management service module sends a wallpaper change broadcast message to the broadcast monitoring module.

[0240] As an example of the present application, the wallpaper change broadcast message carries second indication information, and the second indication information is used to indicate that the currently set lock screen image is a theme lock screen image or a custom lock screen image.

[0241] Step 1503: The broadcast monitoring module determines the type of the currently set lock screen image and records the type of the currently set lock screen image in the lightweight database.

[0242] The specific implementation of step 1503 can be found in the previous text. Fig.10 Steps 1002 to 1005, and steps 1007 to 1011 in the illustrated embodiment.

[0243] Step 1504: When the currently set lock screen image is a depth of field lock screen image, the broadcast monitoring module sends a data adding instruction to the lock screen image processing module, and the data adding instruction is used to instruct the lock screen image processing module to add the detailed information of the currently set lock screen image to the magazine lock screen data list.

[0244] Step 1505: In response to the data adding instruction, the lock screen image processing module adds the detailed information of the currently set lock screen image to the magazine lock screen data list.

[0245] In the case where the currently set lock screen image is a custom depth of field lock screen image, the lock screen image processing module adds the detailed information of the currently set lock screen image to the magazine lock screen data list. For specific implementation, see Fig.10 Step 1006 in the illustrated embodiment.

[0246] In the case where the currently set lock screen image is a theme depth of field lock screen image, the lock screen image processing module adds the detailed information of the currently set lock screen image to the magazine lock screen data list. For specific implementation, see Fig.10 Step 1012 in the illustrated embodiment.

[0247] Step 1506: The lock screen image processing module updates the foreground images of the currently set lock screen image, the previous magazine lock screen image, and the next magazine lock screen image to the foreground view page component, and updates the background images of the three lock screen images to the background view page component.

[0248] The specific implementation of step 1506 can be found in Fig.10 Step 1013 in the illustrated embodiment.

[0249] Step 1507: After receiving the screen off operation, the screen on / off driver sends a screen off notification to the power management service module.

[0250] As an example of the present application, after the user sets the lock screen image, when the user triggers the electronic device to turn off the screen, the screen on and off driver will detect the corresponding screen off operation. In this case, the screen on and off driver sends a screen off notification to the power management service module to control the screen off through the power management service module.

[0251] Step 1508: The power management service module controls the screen to enter the screen-off state.

[0252] Step 1509: The screen light-on / off driver receives the screen light-off operation.

[0253] After the electronic device enters the screen-off state, when the user triggers the electronic device to turn on the screen, the screen-on and screen-off driver receives the screen-on operation. For example, when the screen-on and screen-off driver detects the user triggering the switch button of the electronic device, it determines that the screen-on operation is received.

[0254] Step 1510: The screen on / off driver sends a screen on notification to the power management service module.

[0255] That is, after the screen on / off driver detects the screen on operation, it notifies the power management service module to control the screen on.

[0256] Step 1511: The power management service module sends a screen light notification to the lock screen image drawing module through the window management service module.

[0257] In one example, if Fig.15 As shown, the power management service module sends a screen light notification to the window management service module, and then the window management service module sends a screen light notification to the lock screen image drawing module.

[0258] Step 1512: The lock screen image drawing module sends an image rendering instruction to the background view adapter and sends an image rendering instruction to the foreground view adapter. The image rendering instruction is used to instruct the image data of the lock screen image to be displayed to be rendered into the corresponding view page component.

[0259] Step 1513: When the rendering operation is completed, the background view adapter sends a rendering completion notification to the lock screen image drawing module.

[0260] In one possible case, the background view adapter has completed rendering when receiving the image rendering instruction. In this case, the background view adapter sends a rendering completion notification to the lock screen image drawing module to notify the lock screen image drawing module to complete the rendering operation. In another possible case, the background view adapter has not completed rendering when receiving the image rendering instruction. In this case, the background view adapter continues to perform the rendering operation and sends a rendering completion notification to the lock screen image drawing module after the rendering is completed.

[0261] The process of background view adapter rendering background image to background view page component can be seen in Fig.10 Step 1013 in the illustrated embodiment.

[0262] Step 1514: When the foreground view adapter completes the rendering operation, it sends a rendering completion notification to the lock screen image drawing module.

[0263] Similarly, in one possible case, the foreground view adapter has completed rendering when receiving the image rendering instruction. In this case, the foreground view adapter sends a rendering completion notification to the lock screen image drawing module to notify the lock screen image drawing module to complete the rendering operation. In another possible case, the foreground view adapter has not completed rendering when receiving the image rendering instruction. In this case, the foreground view adapter continues to perform the rendering operation and sends a rendering completion notification to the lock screen image drawing module after the rendering is completed.

[0264] The process of foreground view adapter rendering foreground image to foreground view page component can be seen in Fig.10 Step 1013 in the illustrated embodiment.

[0265] Step 1515: After receiving the rendering completion notifications respectively sent by the foreground view adapter and the background view adapter, the lock screen image drawing module sends a screen light instruction to the power management service module through the window management service module.

[0266] The lock screen image drawing module sends a screen light instruction to the window management service module, and the window management service module forwards the screen light instruction to the power management service module. The screen light instruction is used to indicate that the drawing of the lock screen image to be displayed has been completed.

[0267] Step 1516: The power management service module controls the screen to light up, and displays the first background image through the background view page component, and displays the first foreground image through the foreground view page component.

[0268] Since the background images of the three lock screen images to be displayed have been rendered into the background view page component, and the foreground images of the three lock screen images have been rendered into the foreground view page component, after the power management service module turns on the screen, the background image of one of the three lock screen images can be displayed in the lock screen interface through the background view page component, and the foreground image of the lock screen image can be displayed in the lock screen interface through the foreground view page component. In one example, the currently set depth of field lock screen image is displayed after the screen is turned on. In another example, any one of the three lock screen images, a magazine lock screen image, may also be displayed after the screen is turned on.

[0269] In some embodiments, the background image of the currently displayed lock screen image is referred to as a first background image, and the foreground image of the currently displayed lock screen image is referred to as a first foreground image.

[0270] Step 1517: The touch event detection module receives a sliding operation in the lock screen interface.

[0271] Please refer to Fig.16 After the lock screen image is displayed in the lock screen interface, if the user wants to trigger the electronic device to display the next lock screen image or the previous lock screen image in the magazine lock screen resource in the lock screen interface, the user can slide left or right in the lock screen interface, and accordingly, the touch event detection module can detect the sliding operation.

[0272] Step 1518: In response to the sliding operation, the touch event detection module sends a sliding event to the magazine lock screen layout module.

[0273] In one example, the sliding event includes sliding parameters of the sliding operation, for example, the sliding parameters include starting position information and ending position information in the lock screen interface.

[0274] As an example but not a limitation, the touch event detection module may send the sliding event to the magazine lock screen layout module through multiple modules in sequence, which is not limited in the embodiments of the present application.

[0275] Step 1519: The magazine lock screen layout module sends a sliding event to the foreground view page component, and sends a sliding event to the background view page component.

[0276] That is, after receiving the sliding event, the magazine lock screen layout module can distribute the sliding event to the foreground view page component and the background view page component respectively.

[0277] Step 1520: When determining that the sliding event meets the preset sliding condition, the foreground view page component switches to the foreground image corresponding to the sliding operation.

[0278] The preset sliding condition can be set as required. In one example, the foreground view page component can determine the sliding distance according to the starting position information and the ending position information in the sliding event, and when it is determined that the sliding distance of the sliding operation in the X-axis direction (i.e., the horizontal direction) is greater than or equal to half the length of the screen width, it is determined that the sliding event meets the preset sliding condition, otherwise, it is determined that the sliding event does not meet the preset sliding condition.

[0279] When it is determined that the sliding event meets the preset sliding conditions, the sliding direction is determined according to the starting position information and the ending position information, so that the sliding direction of the sliding operation can be determined, and then the lock screen image corresponding to the sliding direction is switched. For example, when it is determined that the sliding operation is a left swipe, the foreground view page component switches to the next view, and the lock screen interface displays the foreground image of the next lock screen image. For another example, when it is determined that the sliding operation is a right swipe, the foreground view page component switches to the previous view, and the lock screen interface displays the foreground image of the previous lock screen image.

[0280] It should be noted that, in the case of the next lock screen image or the lock screen image is not a depth of field lock screen image, the foreground image is empty, which can be understood as the foreground view page component switching to a blank view, or switching to a view with image description information.

[0281] In one example, the foreground image displayed after switching may be referred to as a second foreground image, and the view in which the second foreground image is located may be referred to as a fourth view.

[0282] Step 1521: The foreground view page component sends a switch confirmation notification to the magazine lock screen layout module.

[0283] In one example, when determining that the sliding event meets the preset sliding condition, the foreground view page component sends a switch confirmation notification to the magazine lock screen layout module to indicate that the foreground view page component confirms the page switch.

[0284] As an example but not limitation, the foreground view page component can notify the magazine lock screen layout module to confirm page switching through a callback.

[0285] Step 1522: When the background view page component determines that the sliding event meets the preset sliding condition, it switches to the background image corresponding to the sliding operation.

[0286] The method for the background view page component to determine whether a sliding event meets the preset sliding conditions can refer to the method for the foreground view page component to determine whether a sliding event meets the preset sliding conditions, which will not be repeated here.

[0287] Similarly, when it is determined that the sliding event meets the preset sliding conditions, the sliding direction is determined according to the starting position information and the ending position information, so that the sliding direction of the sliding operation can be determined, and then the lock screen image corresponding to the sliding direction is switched. For example, when it is determined that the sliding operation is a left swipe, the background view page component switches to the next view, and the lock screen interface displays the background image of the next lock screen image. For another example, when it is determined that the sliding operation is a right swipe, the background view page component switches to the previous view, and the lock screen interface displays the background image of the previous lock screen image.

[0288] It should be noted that if the previous lock screen image or the next lock screen image is a magazine lock screen image, the background thumbnail is displayed in the previous view or the next view after sliding, and then the magazine lock screen image can be obtained and the background thumbnail is replaced.

[0289] In one example, the background image displayed after switching may be referred to as a second background image, and the view in which the second background image is located may be referred to as a first view.

[0290] It should be noted that there is no strict order in which step 1520 and step 1522 are executed. In one example, step 1520 and step 1522 are executed synchronously.

[0291] It should be noted that the above description is based on the example that the sliding event meets the preset sliding condition. In another possible case, if the sliding event does not meet the preset sliding condition, the background view page component and the foreground view page component do not switch views, and do not need to perform subsequent update operations.

[0292] Step 1523: The background view page component sends a switch confirmation notification to the magazine lock screen layout module.

[0293] In one example, when the background view page component determines that the sliding event meets the preset sliding condition, the background view page component sends a switching confirmation notification to the magazine lock screen layout module to indicate that the background view page component confirms the page switching.

[0294] As an example but not limitation, the background view page component can notify the magazine lock screen layout module to confirm page switching through a callback.

[0295] Step 1524: After receiving the switch confirmation notifications sent by the foreground view page component and the background view page component respectively, the magazine lock screen layout module sends a data update instruction to the background view adapter, and sends a data update instruction to the foreground view adapter. The data update instruction carries the view identifier IDa of the view where the background image of the slid lock screen image Pa is located.

[0296] Step 1525: The background view adapter determines the index information of the lock screen image Pa according to the view identifier IDa.

[0297] In one example, the background view adapter records the correspondence between the view identifier and index information of each view in the background view page component that draws the background image. For example, the background view adapter records a first correspondence, and the first correspondence is used to record the correspondence between the index information of each background image displayed in the background view page component and the view identifier of the view where each background image is located. Therefore, the background view adapter can query the corresponding index information from the first correspondence according to the view identifier IDa, thereby determining the index information of the lock screen image Pa.

[0298] Step 1526: The background view adapter sends an image replacement instruction to the lock screen image processing module. The image update instruction carries the index information of the lock screen image Pa.

[0299] When the lock screen image Pa after sliding is not a depth of field lock screen image, since the background thumbnail is displayed first after switching and the clarity of the background thumbnail is insufficient, the background view adapter sends an image replacement instruction to the lock screen image processing module to instruct the lock screen image processing module to obtain the background image of the switched lock screen image Pa, that is, to obtain the magazine lock screen image, and replace the background thumbnail displayed in the lock screen interface.

[0300] Step 1527: The lock screen image processing module obtains the background image of the lock screen image Pa according to the index information of the lock screen image Pa.

[0301] In one example, when the slid lock screen image Pa is a magazine lock screen image, the lock screen image processing module obtains the corresponding magazine lock screen image from the magazine lock screen list according to the index information of the lock screen image Pa to obtain the background image of the lock screen image Pa. The magazine lock screen list includes multiple magazine lock screen images.

[0302] Step 1528: The lock screen image processing module sends the background image of the lock screen image Pa to the background view adapter.

[0303] Step 1529: The background view adapter renders the background image of the lock screen image Pa into the corresponding view.

[0304] In one example, the background view adapter determines the corresponding view identifier based on the index information of the lock screen image Pa, and then draws the acquired background image of the lock screen image Pa onto the view corresponding to the view identifier. In this way, the background thumbnail currently displayed in the lock screen interface is replaced with the acquired background image.

[0305] It should be noted that the embodiment of the present application is described by taking the case where the lock screen image Pa after sliding is not a depth of field lock screen image as an example. In one example, when the lock screen image Pa after sliding is a depth of field lock screen image currently applied by the electronic device, since the background image of the depth of field lock screen image is rendered when the background view page component is updated, that is, not the background thumbnail, the operations of the above steps 1526 to 1529 may not be performed at this time, and the operation of the following step 1530 may be directly entered.

[0306] In another example, when the lock screen image Pa after sliding is the depth of field lock screen image currently applied by the electronic device, if the background thumbnail of the depth of field lock screen image is rendered when the background view page component is updated, the operation of obtaining the background image of the depth of field lock screen image and replacing the displayed background thumbnail will still be performed. The difference from the above process is that in this case, the lock screen image processing module obtains the background image from the lock screen directory (that is, unlock_wallpaper_0.jpg) or from the preset directory (that is, data / user_de / 0 / com.android.systemui / files) according to the index information of the lock screen image Pa. For example, when the index information of the lock screen image Pa indicates that the lock screen image Pa is a custom depth of field lock screen image, the background image is obtained from unlock_wallpaper_0.jpg. When the index information of the lock screen image Pa indicates that the lock screen image Pa is a theme depth of field lock screen image, the background image is obtained from data / user_de / 0 / com.android.systemui / files.

[0307] As an example of the present application, after the user slides the lock screen interface, when the background image of the lock screen image corresponding to the sliding operation is switched, the view before sliding becomes the previous view. Fig.17 , assuming that the view in the background view page component is displayed after the screen is turned on Figure 2 , and see Figure 1 Includes background image 1, and video Figure 3 Includes background image 3, view Figure 4 And Vision Figure 5 When the user slides left, the view in the background view page component is displayed on the lock screen interface. Figure 3 , that is, display background image 2, Figure 2 Become the view displayed after sliding Figure 3 The previous view of .

[0308] Step 1530: The background view adapter obtains detailed information of the lock screen image Pb adjacent to the lock screen image Pa from the magazine lock screen data list according to the index information of the lock screen image Pa.

[0309] In some embodiments, the lock screen image Pb may be referred to as a target lock screen image.

[0310] Optionally, there is no strict order of execution between step 1530 and step 1526.

[0311] Step 1531: The background view adapter sets the background thumbnail in the detail information of the lock screen image Pb in the view of the background view page component.

[0312] In one example, the background view adapter sets the background thumbnail of the lock screen image Pb in the view Viewb, which is a view adjacent to the view Viewa (ie, the first view) where the background image of the lock screen image Pa is located.

[0313] In some embodiments, view Viewb may be referred to as a second view.

[0314] Step 1532: The background view adapter records the correspondence between the view identifier of the set view and the index information of the lock screen image Pb.

[0315] For example, see Fig.17 , update the background thumbnail of the lock screen image Pb to the view Figure 4 and record the video Figure 4 The correspondence between the view identifier and the index information of the lock screen image Pb.

[0316] Step 1533: The foreground view adapter determines the type of the lock screen image Pb according to the index information of the lock screen image Pb.

[0317] As an example of the present application, the foreground view adapter can obtain the index information of the lock screen image Pb from the background view adapter. For example, after the background view adapter obtains the detailed information of the lock screen image Pb from the magazine lock screen data list according to the index information of the lock screen image Pa, the index information of the lock screen image Pb can be sent to the foreground view adapter.

[0318] Step 1534: When the lock screen image Pb is not a depth-of-field lock screen image, the foreground view adapter determines that the foreground image of the lock screen image Pb is empty.

[0319] In one example, the foreground view adapter can record the correspondence between the view identifier of a blank view in the foreground view page component and the index information of the lock screen image Pb, so that when the user subsequently slides to the lock screen image Pb, the lock screen image Pb can be effectively displayed, and the index information of the lock screen image Pb can be updated to continue to update the image data of the next adjacent lock screen image of the lock screen image Pb to the foreground view page component and the background view page component.

[0320] In some embodiments, the blank view indicated by the view identifier corresponding to the index information of the lock screen image Pb may be referred to as the third view.

[0321] It should be noted that the above is explained using the example that the lock screen image Pb is not a depth of field lock screen image. When the lock screen image Pb is the depth of field lock screen image currently used by the electronic device, the foreground view adapter obtains the foreground image of the lock screen image Pb. Afterwards, the foreground view adapter sets the foreground image of the lock screen image Pb in the view of the foreground view page component (such as the third view), and records the correspondence between the view identifier of the set third view and the index information of the lock screen image Pb. For example, it can be recorded in the second correspondence, and the second correspondence is used to record the correspondence between the index information of each foreground image displayed in the foreground view page component and the view identifier of the view where each foreground image is located.

[0322] In an embodiment of the present application, when the magazine lock screen function is turned on, in response to a sliding operation on the lock screen interface, the background view page component switches from the first background image to the second background image, and the foreground view page component switches from the first foreground image to the second foreground image. The background view page component is used to render the background image data of the lock screen image, and the foreground view page component is used to render the foreground image data of the lock screen image. That is, after detecting the sliding operation of the user on the lock screen interface, the background view page component and the foreground view page component are triggered to switch at the same time. In this way, whether it is a magazine lock screen image or a depth of field lock screen image, the foreground image and the background image can be slid synchronously, thereby achieving hand-following mobility. In addition, the foreground image data of the target lock screen image is loaded into the foreground view page component, and the background image data of the target lock screen image is loaded into the background view page component. The target lock screen image is a lock screen image in the magazine lock screen resource that is adjacent to the currently displayed lock screen image and corresponds to the sliding direction of the sliding operation. In this way, when sliding to the target lock screen image later, the sliding operation can be responded to in time, and the foreground image and background image of the target lock screen image are displayed, thereby ensuring hand-following mobility during the sliding process.

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

[0324] It is to be understood that the structure illustrated in the embodiment 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 arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

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

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

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

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

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

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

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

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

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

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

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

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

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

[0338] The internal memory 121 can be used to store computer executable program codes, which include 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 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created by the electronic device 100 during use (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0339] 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 interface 170D and the application processor.

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

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

[0342] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part 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 process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (such as: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (such as: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may 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)).

[0343] The above are optional embodiments provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the technical scope disclosed in the present application shall be included in the protection scope of the present application.

Claims

1. A method for displaying a lock screen image, characterized in that: Applied to electronic equipment, the method comprises: When the magazine lock screen function is turned on, in response to a sliding operation on the lock screen interface, switching from the first background image to the second background image through the background view page component, and switching from the first foreground image to the second foreground image through the foreground view page component; The background view page component is used to render background image data of the lock screen image, and the foreground view page component is used to render foreground image data of the lock screen image, wherein the foreground image of the lock screen image is empty when the lock screen image is not a depth of field lock screen image, and when the depth of field lock screen image is displayed in the lock screen interface, the foreground image is at an upper layer of the hierarchy where the system time indicator is located and partially blocks the system time indicator; Load the foreground image data of the target lock screen image into the foreground view page component, and load the background image data of the target lock screen image into the background view page component, wherein the target lock screen image is a lock screen image in the magazine lock screen resource that is adjacent to the currently displayed lock screen image and corresponds to the sliding direction of the sliding operation.

2. The method according to claim 1, characterized in that The background view page component includes a background thumbnail of a lock screen image to be displayed after sliding; The method of switching from the first background image to the second background image through the background view page component in response to a sliding operation on the lock screen interface when the magazine lock screen function is turned on includes: When the magazine lock screen function is turned on, in response to the sliding operation on the lock screen interface, switching from the first background image to the background thumbnail corresponding to the second background image through the background view page component; Acquire the second background image; The background thumbnail currently displayed in the lock screen interface is replaced with the second background image through the background view page component.

3. The method according to claim 1 or 2, characterized in that: The loading of the foreground image data of the target lock screen image into the foreground view page component, and the loading of the background image data of the target lock screen image into the background view page component, include: According to the position of the second background image in the first view in the background view page component, obtaining detailed information of the target lock screen image from a magazine lock screen data list, wherein the magazine lock screen data list includes detailed information of a plurality of lock screen images; The background image data of the target lock screen image is loaded into the background view page component according to the detailed information of the target lock screen image, and the foreground image data of the target lock screen image is loaded into the foreground view page component according to the detailed information of the target lock screen image.

4. The method according to claim 3, characterized in that The acquiring detailed information of the target lock screen image from the magazine lock screen data list according to the position of the first view where the second background image is located in the background view page component includes: According to the view identifier of the first view, determine the index information of the second background image from a first correspondence relationship, wherein the first correspondence relationship is used to record the correspondence between the index information of each background image displayed in the background view page component and the view identifier of the view where the each background image is located; According to the index information of the second background image and the sliding direction of the sliding operation, detailed information of the target lock screen image is acquired from the magazine lock screen data list.

5. The method according to claim 4, characterized in that The detailed information of the target lock screen image includes background image data and index information of the target lock screen image; The step of loading the background image data of the target lock screen image into the background view page component according to the detailed information of the target lock screen image includes: Acquire a second view adjacent to the first view from the background view page component, wherein a position of the second view relative to the first view is opposite to the sliding direction; Rendering the background image data of the target lock screen image into the second view; The correspondence between the view identifier of the second view and the index information of the target lock screen image is recorded in the first correspondence.

6. The method according to claim 4, characterized in that The index information is used to indicate the type of the corresponding lock screen image; and the loading of the foreground image data of the target lock screen image into the foreground view page component according to the detailed information of the target lock screen image includes: Determining whether the target lock screen image is a depth of field lock screen image currently applied in the electronic device according to the first indication information and the index information of the target lock screen image, wherein the first indication information is used to indicate the type of the lock screen image currently applied by the electronic device, and the first indication information is recorded when setting the lock screen image of the electronic device; When the target lock screen image is a depth of field lock screen image currently applied by the electronic device, acquiring a foreground image of the target lock screen image from a first designated directory; Rendering the foreground image of the target lock screen image into a third view in the foreground view page component, wherein the third view is adjacent to a fourth view where the second foreground image is located, and a position of the third view relative to the fourth view is opposite to the sliding direction; The correspondence between the view identifier of the third view and the index information of the target lock screen image is recorded in the second correspondence relationship, and the second correspondence relationship is used to record the correspondence between the index information of each foreground image displayed in the foreground view page component and the view identifier of the view where the each foreground image is located.

7. The method according to claim 6, characterized in that After determining whether the target lock screen image is a depth of field lock screen image currently applied in the electronic device according to the first indication information and the index information of the target lock screen image, the method further includes: When the target lock screen image is not the depth of field lock screen image currently applied by the electronic device, the third view is set to empty, and the correspondence between the view identifier of the third view and the index information of the target lock screen image is recorded in the second correspondence.

8. The method according to claim 1, characterized in that The electronic device comprises a touch event monitoring module and a magazine lock screen layout module; The method of switching from a first background image to a second background image through a background view page component and switching from a first foreground image to a second foreground image through a foreground view page component in response to a sliding operation on the lock screen interface when the magazine lock screen function is turned on includes: The touch event monitoring module sends a sliding event to the magazine lock screen layout module in response to the sliding operation, wherein the sliding event includes a sliding parameter of the sliding operation; The magazine lock screen layout module sends the sliding event to the background view page component, and sends the sliding event to the foreground view page component; When the background view page component determines according to the sliding parameter that the sliding event satisfies a preset sliding condition, the background view page component switches from the first background image to the second background image based on the sliding parameter, and the preset sliding condition is that the sliding distance in the horizontal direction is greater than or equal to half the length of the screen width; When the foreground view page component determines according to the sliding parameter that the sliding event satisfies the preset sliding condition, the foreground view page component switches from the first foreground image to the second foreground image based on the sliding parameter.

9. The method according to any one of claims 1 to 8, characterized in that In the case where the lock screen image currently applied in the electronic device is a depth of field lock screen image, the type of the currently applied lock screen image includes a theme depth of field lock screen image or a custom depth of field lock screen image, the theme depth of field lock screen image is a depth of field lock screen image applied by a theme application, and the custom depth of field lock screen image is a depth of field lock screen image applied by a gallery application.

10. An electronic device, characterized in that: The electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 9 when executing the computer program.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 9.