Wallpaper generation method and device and electronic equipment

By layering the target image and intelligently matching dynamic image elements, combined with the device screen shape parameters, a dynamic wallpaper that matches the screen shape is generated, solving the problem that dynamic wallpapers cannot be personalized and adapted in the existing technology, and improving the user experience.

CN121962350APending Publication Date: 2026-05-01LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LENOVO (BEIJING) LTD
Filing Date
2026-01-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing methods for generating live wallpapers cannot achieve personalized customization, are complicated for users, generate live wallpapers that do not meet user needs, and cannot match the device's screen shape.

Method used

By acquiring pixel features of the target image and dividing it into layers, dynamic image elements of the image layer are determined. Motion transformation parameters are calculated based on the real-time shape parameters of the device screen, and the image elements are controlled to move in a coordinated manner when the screen shape changes, so as to generate a dynamic wallpaper that matches the current screen shape.

Benefits of technology

It enables personalized live wallpapers, enhances visual realism and intelligent adaptability to new screen forms, and solves the problem of flat live wallpaper content and mismatch between device form factor in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962350A_ABST
    Figure CN121962350A_ABST
Patent Text Reader

Abstract

The invention discloses a wallpaper generation method and apparatus, and an electronic device. The method comprises the steps of obtaining a to-be-processed target image; performing image layering based on pixel features in the target image to obtain image layers with different depth ranges; determining a dynamic image element corresponding to each image layer; determining a motion transformation parameter of a dynamic image element of each image layer based on a real-time morphological parameter of a target screen of the electronic equipment; and in response to the form change of the target screen, controlling the dynamic image element to move on the corresponding image layer based on the motion transformation parameter so as to generate target dynamic wallpaper matched with the current screen form.
Need to check novelty before this filing date? Find Prior Art

Description

A method, apparatus and electronic device for generating wallpaper Technical Field

[0001] This application relates to the field of image processing technology, and more specifically to a wallpaper generation method, apparatus, and electronic device. Background Technology

[0002] With the development of electronic device display technology, users' demand for personalized and dynamic wallpapers is increasing. Currently, live wallpapers are mainly implemented in two ways: one is a pre-set, fixed dynamic video that cannot be customized; the other allows users to customize it, but this usually requires tedious manual editing and effect compositing, resulting in a complex process. This leads to poor adaptation and accuracy between the generated live wallpapers and users' personalized needs. Summary of the Invention

[0003] In view of the above, this application provides the following technical solution:

[0004] A wallpaper generation method includes:

[0005] Obtain the target image to be processed;

[0006] Image layering is performed based on pixel features in the target image to obtain image layers with different depth ranges;

[0007] Determine the dynamic image elements corresponding to each of the image layers;

[0008] Based on the real-time morphological parameters of the target screen of the electronic device, the motion transformation parameters of the dynamic image elements of each image layer are determined.

[0009] In response to changes in the shape of the target screen, the dynamic image elements are controlled to move on the corresponding image layer based on the motion transformation parameters to generate a target dynamic wallpaper that matches the current screen shape.

[0010] Optionally, the step of performing image layering based on pixel features in the target image to obtain image layers with different depth ranges includes:

[0011] Obtain the depth information of each pixel in the target image;

[0012] Image layering is performed based on the depth information of each pixel, and pixels with depth values ​​in the same depth range are grouped into the same image layer to obtain image layers with different depth ranges.

[0013] Optionally, determining the motion image element corresponding to each of the image layers includes at least one of the following:

[0014] Based on the depth information of each image layer, guide information is output to prompt the user to add dynamic image elements, so as to determine the dynamic image elements corresponding to each image layer based on the guide information;

[0015] In response to a user's request to generate a live wallpaper, candidate live image elements matching each image layer are generated based on the semantic content of the image layer; in response to a user's selection instruction for the candidate live image elements, the live image elements corresponding to each image layer are determined.

[0016] The target image is subjected to image element recognition to obtain target image elements; based on the image features of the image layer, the target image elements are determined as dynamic image elements of the corresponding image layer.

[0017] Optionally, determining the motion transformation parameters of dynamic image elements in each image layer based on the real-time morphological parameters of the target screen of the electronic device includes:

[0018] In response to the fact that the target screen of the electronic device is a scrollable screen, the real-time telescopic displacement of the scrollable screen is obtained;

[0019] Based on the real-time scaling displacement, the displacement scaling factor of the dynamic image element in each image layer is determined; wherein, the smaller the image layer depth value, the smaller its corresponding displacement scaling factor.

[0020] Based on the displacement scaling factor and the real-time expansion and contraction displacement of the scroll screen, the motion transformation parameters of each dynamic image element are determined.

[0021] Optionally, determining the motion transformation parameters of each dynamic image element in the image based on the real-time morphological parameters of the target screen of the electronic device includes:

[0022] In response to the fact that the target screen of the electronic device is a foldable screen, the folding parameters of the foldable screen are obtained;

[0023] Based on the depth information of each dynamic image element in the image layer, determine the mapping relationship of the position transformation coefficients corresponding to the morphological folding parameters;

[0024] Based on the position transformation coefficient mapping relationship, the motion transformation parameters of each dynamic image element are determined.

[0025] Optionally, before generating the target live wallpaper that matches the current screen shape, the method further includes:

[0026] In response to the shape change of the target screen, a target resolution that matches the real-time resolution of the screen in the current shape is determined from multiple candidate resolutions;

[0027] The process of generating a target live wallpaper that matches the current screen format includes: rendering and compositing the image layer and dynamic image elements based on the target resolution to obtain the target live wallpaper.

[0028] Optionally, before generating the target live wallpaper that matches the current screen shape, the method further includes:

[0029] Based on the target resolution of the target screen, the image layer and dynamic image elements are preprocessed to generate a reference image set;

[0030] Controlling the motion of the dynamic image elements on the corresponding image layer includes:

[0031] In response to the shape change of the target screen, the reference image corresponding to the target image layer is retrieved from the reference image set, and the spatial position of the reference image is transformed according to the motion transformation parameters.

[0032] Optionally, controlling the motion of the dynamic image elements on the corresponding image layer includes:

[0033] Based on the depth range of the image layers, determine the visual sequence of each image layer and its dynamic image elements;

[0034] In the process of composing the target live wallpaper, the image layers and dynamic image elements with overlapping areas are rendered according to the visual sequence to obtain the target live wallpaper.

[0035] A wallpaper generation device, comprising:

[0036] The first acquisition unit is used to acquire the target image to be processed;

[0037] The second acquisition unit is used to perform image layering based on pixel features in the target image to obtain image layers with different depth ranges;

[0038] The first determining unit is used to determine the dynamic image elements corresponding to each of the image layers;

[0039] The second determining unit is used to determine the motion transformation parameters of the dynamic image elements of each image based on the real-time morphological parameters of the target screen of the electronic device.

[0040] A control unit is configured to respond to changes in the shape of the target screen and, based on the motion transformation parameters, control the dynamic image elements to move on the corresponding image layer to generate a target dynamic wallpaper that matches the current screen shape.

[0041] An electronic device, comprising:

[0042] A memory for storing computer programs and the data generated by the execution of said computer programs;

[0043] A processor for executing the computer program to achieve:

[0044] Obtain the target image to be processed;

[0045] Image layering is performed based on pixel features in the target image to obtain image layers with different depth ranges;

[0046] Determine the dynamic image elements corresponding to each of the image layers;

[0047] Based on the real-time morphological parameters of the target screen of the electronic device, the motion transformation parameters of the dynamic image elements of each image are determined.

[0048] In response to changes in the shape of the target screen, the dynamic image elements are controlled to move on the corresponding image layer based on the motion transformation parameters to generate a target dynamic wallpaper that matches the current screen shape. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0050] Figure 1 is a schematic flowchart of a wallpaper generation method provided in an embodiment of this application;

[0051] Figure 2 is a flowchart illustrating an application scenario provided in an embodiment of this application;

[0052] Figure 3 is a schematic diagram of user interaction and effect synthesis of dynamic wallpaper based on depth layer provided in an embodiment of this application;

[0053] Figure 4 is a schematic diagram of generating a dynamic wallpaper parallax effect suitable for scrolling screens according to an embodiment of this application;

[0054] Figure 5 is a schematic diagram of the perspective change of a dynamic wallpaper suitable for foldable screens provided in an embodiment of this application;

[0055] Figure 6 is a schematic diagram of the structure of a wallpaper generation device provided in an embodiment of this application. Detailed Implementation

[0056] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0057] The terms "first" and "second," etc., used in this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units may include steps or units not listed, but may include steps or units not listed.

[0058] This application provides a wallpaper generation method, apparatus, and electronic device. The method can be applied to electronic devices such as personal computers, tablets, and smartphones, and is suitable for devices with variable-form screens, such as rollable screens, foldable screens, and dual-screen devices. The method acquires a target image to be processed and automatically performs depth layering based on pixel features to create image layers with different visual depths. Then, it intelligently matches or generates corresponding dynamic image elements for each image layer, and calculates differentiated motion transformation parameters for each dynamic element based on the real-time physical shape parameters of the device screen. Finally, the system responds to dynamic changes in screen shape, precisely controls the coordinated movement of dynamic elements in each layer, and synthesizes and renders a personalized dynamic wallpaper that matches the current screen shape and possesses an immersive spatial sense and parallax effect in real time. This application improves the personalization capabilities, visual realism, and intelligent adaptability of dynamic wallpapers to new screen forms.

[0059] Referring to Figure 1, which shows a flowchart of a wallpaper generation method provided in an embodiment of this application, the method can generate dynamic wallpapers for electronic device display screens, and the method may include the following steps:

[0060] S101. Obtain the target image to be processed.

[0061] The target image refers to any static image that the user wishes to convert into a live wallpaper. Sources include, but are not limited to, photos, screenshots, artwork stored locally by the user, and AI images generated through the creator zone using artificial intelligence (AI). Supported image formats include JPG, PNG, and BMP. For example, when a user selects the image upload function through the wallpaper generation system's interface, the electronic device's processing system will call the device's file reading interface to obtain the target image selected by the user. The system will then perform format verification and preprocessing on the image (such as unifying the image color space and removing invalid pixels) to ensure compatibility with subsequent processing.

[0062] S102. Based on the pixel features in the target image, perform image layering to obtain image layers with different depth ranges.

[0063] Pixel features in a target image refer to the depth information of each pixel. Depth information represents the distance of the scene object corresponding to the pixel in three-dimensional space. Image layering refers to grouping pixels with depth values ​​within the same range into an image layer based on pixel depth information, forming a multi-level image structure, which provides a foundation for subsequent layered control of dynamic effects.

[0064] Image layering can be achieved by analyzing the visual attributes or spatial relationships of pixels. For example, the RGB / HSV color values, brightness, saturation, and other visual features of each pixel can be obtained. Clustering algorithms can then group pixels with similar colors or brightness into the same layer, achieving layering based on color or brightness. Alternatively, regions can be divided based on pixel coordinates, such as dividing the image into different layers according to a preset grid or contour regions obtained through edge detection, achieving layering based on spatial structure. Furthermore, semantic segmentation models can be combined to identify object categories in the image, grouping pixels belonging to the same semantic category (such as sky, trees, and buildings) into the same layer, achieving layering based on content semantics.

[0065] To further improve the accuracy of image layering, in this embodiment, after obtaining the target image, the target image can be processed according to a pre-generated depth prediction model. This model can output the depth value of each pixel (e.g., in the range of 0-50, where a smaller value indicates that the object is closer and a larger value indicates that the object is farther away). Then, the obtained depth values ​​can be binned according to a preset step size k, and pixels with depth values ​​in the same range can be divided into the same image layer. For example, when k=25, pixels with depth values ​​of 0-25 are grouped into the near-field layer, and pixels with depth values ​​of 25-50 are grouped into the far-field layer. For example, in a photo of a mountain forest, after prediction by a depth prediction model, the pixel depth values ​​of foreground objects such as trees and rocks in the forest are 5-20, while the pixel depth values ​​of distant objects such as mountains and the sky are 30-45. The system sets k=20, dividing pixels of 0-20 into Layer 1 (foreground layer), pixels of 20-40 into Layer 2 (midground layer), and pixels of 40-50 into Layer 3 (distant layer), ultimately obtaining three image layers with different depth ranges. In this embodiment, pixel-level precise layering can be achieved through an artificial intelligence model, solving the limitations of existing manual layering or fixed-area layering, providing a foundation for layered movement of dynamic elements and layered application of special effects, and enhancing the spatial hierarchy of dynamic wallpapers.

[0066] S103. Determine the dynamic image elements corresponding to each image layer.

[0067] Dynamic image elements refer to visual elements that can present dynamic effects on the image layer, including natural scene elements (raindrops, petals, clouds, fog, etc.), light and shadow effects (starlight twinkling, halos flowing, etc.), and object movement elements (falling leaves, flowing streams, etc.). Dynamic elements must match the depth information and semantic content of the corresponding image layer to ensure visual harmony.

[0068] In this embodiment, dynamic image elements can originate from user-defined and selected elements, such as rain, snow, particles, halos, etc., selected from a preset effects library, or uploaded custom images and video sequences. Alternatively, they can be intelligently generated or extracted by the electronic device's processing system. For example, a generative artificial intelligence model can generate matching dynamic visual sequences in real time based on the semantic content of the image layer, or directly identify and separate scene areas with dynamic potential from the original target image, transforming them into dynamic elements specific to that layer. The system can also combine the depth, color, and semantic features of the image layer to provide intelligent guidance suggestions to the user, or recommend candidate elements based on the user's natural language commands. Finally, through user confirmation or automatic system assignment, a precise association is established between the dynamic image elements and the corresponding image layer, providing a content foundation for subsequent motion control based on screen shape. For example, after analyzing the three layers of the aforementioned forest photo, the system recommends the following: Layer 1 (foreground layer) matches the dynamic element of "falling leaves," Layer 2 (midground layer) matches the dynamic element of "flowing mist," and Layer 3 (background layer) matches the dynamic element of "drifting clouds." Users can directly adopt the recommendations or replace them with other dynamic elements such as "flying butterflies" or "sunlight shining through." This implementation achieves precise matching between dynamic elements and layers, avoiding the separation of dynamic effects from the scene, and also provides a method for determining dynamic elements, balancing user convenience and personalized needs.

[0069] S104. Based on the real-time morphological parameters of the target screen of the electronic device, determine the motion transformation parameters of the dynamic image elements of each image layer.

[0070] Real-time morphological parameters of the target screen refer to key data characterizing the current physical form of the screen. Different screen forms have different parameter types (e.g., the telescopic displacement of a rollable screen, the folding angle or curvature of a foldable screen). Motion transformation parameters refer to parameters that control the motion state of dynamic image elements, including displacement velocity, scaling ratio, position offset, and sharpness adjustment coefficient. Their values ​​are related to the screen morphological parameters and image layer depth information. Specifically, the processing system of the electronic device collects the morphological parameters of the target screen in real time through the sensor interface of the electronic device (e.g., hinge angle sensor, strain sensor, optical sensor) and establishes a mapping model between morphological parameters and motion transformation parameters. Combining the depth information of each image layer (near-field layer, mid-field layer, far-field layer), the motion transformation parameters of dynamic elements on each layer are calculated through the model. For example, the displacement velocity of dynamic elements in the near-field layer is greater than that in the far-field layer to ensure compliance with the laws of human vision. In the embodiments of this application, the motion transformation parameters are matched with the screen form and layer depth to provide data support for the real-time adaptation of the dynamic wallpaper when the screen form changes, ensuring the continuity and rationality of the dynamic effect.

[0071] S105. In response to changes in the shape of the target screen, based on motion transformation parameters, control the dynamic image elements to move on the corresponding image layer to generate a target dynamic wallpaper that matches the current screen shape.

[0072] User physical operations on the device screen cause changes in the screen's shape, such as unfolding or collapsing a rollable screen, folding or unfolding a foldable screen, or adjusting the angle of a dual-screen device. Then, motion transformation parameters are determined based on the shape parameters corresponding to the current target screen's shape change. These parameters are then used to control the dynamic image elements; that is, the position, speed, and scaling of the dynamic elements are adjusted in real time according to the motion transformation parameters. This is combined with the visual order of the layers for rendering and compositing, ultimately generating a complete dynamic wallpaper.

[0073] Specifically, the electronic device's processing system monitors changes in screen shape parameters in real time. When a shape change is detected (such as a folding screen unfolding from 90° to 180°), the corresponding motion transformation parameters are immediately invoked. The image rendering engine then controls the dynamic elements on each layer to move according to these parameters. Simultaneously, all layers and dynamic elements are composited to ensure visual continuity, ultimately generating a target dynamic wallpaper adapted to the current screen shape and applying it to the device's desktop. This achieves real-time response of the dynamic wallpaper to changes in screen shape, resolving issues such as stretching, deformation, or dynamic breakage of the wallpaper when the screen shape changes, while also enhancing visual immersion through layered motion.

[0074] This application provides a wallpaper generation method that performs image layering on the image pixel features of the acquired target image to determine the dynamic image elements corresponding to each image layer. Based on the real-time morphological parameters of the target screen of the electronic device, the motion change parameters of the dynamic image elements in each image layer are determined. Based on these motion change parameters, the dynamic image elements are controlled to move on the corresponding image layers to generate a target dynamic wallpaper that matches the current screen shape. Through automated layering based on image pixel features, a precise spatial depth structure is constructed for the static image, allowing the addition of dynamic elements to be based on real spatial relationships, thereby enhancing the visual hierarchy and immersive experience of the dynamic wallpaper. By performing differentiated motion control of dynamic elements based on real-time screen morphological parameters, intelligent linkage and adaptive feedback between wallpaper content and hardware physical form are achieved, enabling the wallpaper to present a coordinated and accurate parallax effect as the screen folds, unfolds, or rolls. This method effectively solves the problems of flat content and mismatch with device form in existing dynamic wallpapers, providing users with a personalized, naturally interactive, and spatially realistic dynamic visual experience.

[0075] The wallpaper generation method of this application embodiment will be described below with reference to the corresponding implementation methods.

[0076] In some embodiments of this application, the process of performing image layering based on pixel features in the target image to obtain image layers with different depth ranges may include: obtaining depth information of each pixel in the target image; performing image layering based on the depth information of each pixel, grouping pixels with depth values ​​in the same depth range into the same image layer, and obtaining image layers with different depth ranges.

[0077] In this embodiment, the depth information of a pixel represents the quantified data of the distance between the object corresponding to that pixel and the observer in a 3D scene. For example, in this embodiment, the depth information is represented by a numerical range of 0-50. The smaller the value, the closer the object is to the observer; the larger the value, the farther the object is from the observer. The acquisition of depth information relies on a pre-trained depth prediction artificial intelligence model, which can accurately predict the depth value of each pixel based on visual features such as texture, brightness, and perspective of the image. The depth range refers to the interval of depth values ​​divided according to actual application needs. The division is based on a preset step size k, where k is a positive integer and can be set by the system default or defined by the user. An image layer refers to an independent image unit composed of pixels of the same depth range. Each image layer retains the visual features of the corresponding region of the original image and has a clear depth attribute. Specifically, the processing system of an electronic device can have a built-in depth prediction model. The preprocessed target image is input into the model, which uses a convolutional neural network to extract and analyze features from the image and outputs a depth map with the same resolution as the target image. The gray value of each pixel in the depth map corresponds to a depth value of 0-50 (e.g., gray value 0 corresponds to depth value 0, gray value 255 corresponds to depth value 50). The system decodes the depth map to obtain the specific depth value of each pixel and stores it in a depth information matrix. Correspondingly, the processing system can preset a default bucketing step size k (e.g., k=25), and users can modify the k value through the interactive interface to adjust the number of layers. The system traverses all pixels in the depth information matrix, filters out pixels whose depth values ​​are in the range [k×(n-1), k×n] (n is a positive integer, n≥1), and groups them into the nth image layer. If the maximum depth value does not reach k×n, the depth range of the last image layer is [k×(n-1), maximum depth value]. After layering, the system adds a depth attribute label (e.g., "Layer 1: Depth 0-25") to each image layer and stores the pixel data of each layer. In this implementation, pixel depth information is extracted through a depth prediction model, and accurate image layering is achieved according to preset bucketing rules, without requiring professional user operation, thus improving the accuracy of image layering.

[0078] In some embodiments of this application, the motion image elements corresponding to each image layer include at least one of the following:

[0079] (1) Based on the depth information of each image layer, output guidance information to prompt the user to add dynamic image elements, so as to determine the dynamic image elements corresponding to each image layer based on the guidance information.

[0080] Guidance information refers to dynamic element recommendations generated by the electronic device processing system based on the image layer depth attributes (near-ground, mid-ground, and far-ground). The prompts combine the visual patterns of the depth scene (such as the dynamic effects of near-ground elements being more obvious and the dynamic effects of far-ground elements being smoother) to provide users with a clear direction for selection. This approach is user-centric, with the system only providing guidance and the user ultimately determining the dynamic elements.

[0081] For example, the processing system pre-determines a matching rule library between depth ranges and dynamic elements (e.g., for the foreground layer, elements with obvious dynamic effects such as "raindrops, falling leaves, and butterflies" are recommended; for the midground layer, elements with moderate dynamic effects such as "fog, smoke, and pedestrians" are recommended; and for the background layer, elements with gentle dynamic effects such as "clouds, sunset, and birds" are recommended). The processing system reads the depth range labels of each image layer, queries the rule library to generate corresponding guidance information, and displays it to the user through an interactive interface, such as "Foreground layer (depth 0-20) recommends adding: falling leaves, fluttering butterflies; click to select or add custom elements." The user selects the system-recommended dynamic elements based on the guidance information or uploads custom dynamic elements. The system records the user's selection and determines the corresponding dynamic image elements for each layer. In this implementation, the guidance information is generated based on depth information, conforms to visual principles, and can help users quickly determine suitable dynamic image elements, improving user convenience and personalization.

[0082] (2) In response to the user's request to generate a live wallpaper, generate candidate live image elements that match each image layer based on the semantic content of the image layer; in response to the user's selection instruction for the candidate live image elements, determine the live image elements corresponding to the image layer.

[0083] In this context, a user's dynamic wallpaper generation request refers to their explicitly inputted wallpaper generation needs, such as "I want a rainy forest" or "I want a grassland under the starry sky." The semantic content of the image layer refers to the core scene information of the layer extracted through image recognition technology (such as "forest vegetation," "grassland," and "starry sky"). Candidate dynamic image elements refer to a set of dynamic elements generated by the system based on the matching of abstract needs and semantic content; users can select one or more of these as dynamic elements for the corresponding layer. For example, the electronic device processing system has a built-in image semantic recognition model and a dynamic element requirement matching model. When a user submits a dynamic wallpaper generation request (such as "I want a rainy forest") through a text input box, the processing system calls the semantic recognition model to analyze the core scene of each image layer (such as "forest vegetation" in the foreground layer, "valley" in the midground layer, and "sky" in the background layer). The system inputs user requirements and the semantic content of each layer into a matching model to generate candidate dynamic image elements (e.g., for the foreground layer, candidates are "raindrops falling and leaves swaying"; for the midground layer, candidates are "rain flowing and fog spreading"; and for the background layer, candidates are "clouds moving and lightning flashing"). The processing system displays a preview of the candidate elements on the interactive interface. Users click to select the corresponding element for each layer, and the system records the selection result. In this implementation, a dynamic wallpaper generation request can be generated based on user input, and candidate elements can be accurately matched through semantic analysis, thereby improving the satisfaction of user needs.

[0084] (3) Perform image element recognition on the target image to obtain the target image elements; based on the image features of the image layer, determine the target image elements as the dynamic image elements of the corresponding image layer.

[0085] Target image elements refer to static elements with dynamic potential extracted from a target image using image recognition technology (such as waterfalls, flags, smoke, flowing water, etc.). Image layer features refer to the visual content, texture structure, and other information of the layer, used to determine the layer to which the target image element belongs. This method requires no additional selection by the user; the system automatically converts the static elements of the original image into dynamic elements of the corresponding layer, preserving the core features of the original image. For example, the processing system of an electronic device calls an image element recognition model (such as a convolutional neural network) to perform a full-image scan of the target image, identifying target image elements with dynamic potential (such as identifying "waterfall," "stream," and "swaying leaves" from an image of "mountain waterfall"). Combining the pixel range and image features of each image layer, the layer to which each target image element belongs is determined (e.g., "waterfall" pixels belong to the foreground layer, and "stream" pixels belong to the midground layer). The processing system has a built-in mapping relationship between static elements and dynamic effects (e.g., "waterfall" corresponds to the "falling water" dynamic effect, and "leaves" corresponds to the "swaying in the wind" dynamic effect), converting the target image elements into corresponding dynamic image elements and assigning them to their respective layers. This implementation method automatically identifies dynamic elements in the original image and converts them into dynamic effects, preserving the style and core features of the original image. This makes the dynamic wallpaper more closely related to the user-uploaded image, requiring no additional user operation, achieving fully automated dynamic element matching, and improving generation efficiency.

[0086] The wallpaper generation method provided in this application can be adapted to electronic devices with different screen shapes. Correspondingly, the process of determining the motion transformation parameters of dynamic image elements in each image layer based on the real-time shape parameters of the target screen of the electronic device includes: in response to the target screen of the electronic device being a scrollable screen, obtaining the real-time scaling displacement of the scrollable screen; determining the displacement scaling factor of the dynamic image elements in each image layer based on the real-time scaling displacement; wherein, the smaller the image layer depth value, the smaller its corresponding displacement scaling factor; and determining the motion transformation parameters of each dynamic image element based on the displacement scaling factor and the real-time scaling displacement of the scrollable screen.

[0087] A rollable screen refers to a flexible screen that can be unfolded (expanding the display area) or retracted (shrinking the display area) through physical operations. Its morphological parameter is the real-time extension / retraction displacement. The real-time extension / retraction displacement can be represented as the ratio (percentage) of the current unfolded length to the maximum unfolded length, ranging from 0% to 100%, where 0% represents fully retracted and 100% represents fully unfolded. This data is collected by a displacement sensor built into the device. For example, the electronic device's processing system first identifies the screen type through the device's hardware interface. When the target screen is confirmed to be a rollable screen, the displacement sensor data acquisition function is activated. The displacement sensor detects the screen's extension / retraction status in real time, converting the physical displacement into a percentage of the real-time extension / retraction displacement (e.g., if the maximum unfolded length is 20cm and the current unfolded length is 10cm, then the extension / retraction displacement is 50%). The system acquires sensor data at a preset frequency (e.g., 10 times / second) to ensure real-time performance.

[0088] The displacement scaling factor is a proportional coefficient used to adjust the displacement speed of dynamic image elements. Its value is related to the real-time scaling displacement and the image layer depth value. For example, the smaller the depth value (near-view layer), the smaller the displacement scaling factor; the larger the depth value (far-view layer), the larger the displacement scaling factor. This conforms to the human eye's visual perception of moving objects (the relative displacement of near-view objects is more obvious, and the speed needs to be controlled to avoid visual clutter; the relative displacement of far-view objects is not obvious, and the speed can be increased to enhance the sense of dynamism). For example, the processing system presets the calculation model of the displacement scaling factor as follows: Displacement scaling factor = Base coefficient × (Upper limit of depth value range / Maximum depth value) × (Real-time scaling displacement / 100%). The base coefficient is the system default value (e.g., 1.0), which can be adjusted according to user needs. The maximum depth value is 50 (e.g., the depth value range is 0-50 in this embodiment). The system reads the upper limit of the depth value range of each image layer (e.g., for the near-field layer 0-20, the upper limit is 20; for the mid-field layer 20-35, the upper limit is 35; for the far-field layer 35-50, the upper limit is 50), and combines it with the real-time scaling displacement to calculate the displacement scaling coefficient of each layer.

[0089] The motion transformation parameters of dynamic image elements include core parameters such as displacement speed, displacement direction, and scaling ratio. Among these, displacement speed is the key parameter, determined by the displacement scaling factor, the base displacement speed (the default motion speed of the dynamic element), and the real-time scaling displacement. Other parameters (such as displacement direction) are preset based on the dynamic element type and layer semantics (e.g., clouds drift horizontally by default, and raindrops fall vertically by default). For example, the processing system presets the base displacement speed of dynamic elements (e.g., the base speed of nature-type dynamic elements is 3 pixels / frame, which can be adjusted by the user). Displacement speed = base displacement speed × displacement scaling factor × (1 + real-time scaling displacement / 100%). Combining the displacement scaling factor of each layer, the real-time scaling displacement, and the base displacement speed of the dynamic element, the displacement speed of each dynamic element is calculated. At the same time, parameters such as displacement direction and scaling ratio are determined (e.g., scaling ratio = 1.0 + real-time scaling displacement / 200%, ensuring that the dynamic element is appropriately enlarged when the screen is expanded to match the change in display area), and the complete motion transformation parameters of each dynamic element are obtained.

[0090] For example, a user using a rollable screen phone uploads a photo of a grassland to the system to generate a live wallpaper. The system layers the image into a foreground layer (0-18: grassland vegetation, wildflowers, with the dynamic element "wildflowers swaying"), a midground layer (18-32: grassland hinterland, sheep, with the dynamic element "sheep moving"), and a background layer (32-48: distant mountains, sky, with the dynamic element "clouds drifting"). When the user expands the screen from fully collapsed (0%) to 70% (a real-time scaling displacement of 70%), the system uses a displacement sensor to obtain this parameter and calculates the displacement scaling factor for each layer, such as 0.252 for the foreground layer, 0.448 for the midground layer, and 0.672 for the background layer. This is combined with the basic displacement speed (wildflowers swaying 3 pixels / frame, sheep moving 4 pixels / frame, clouds drifting 2 pixels / frame). The system calculates motion transformation parameters, such as a near-field displacement speed of 1.28 pixels / frame and a scaling ratio of 1.35; a mid-field displacement speed of 3.06 pixels / frame and a scaling ratio of 1.35; and a far-field displacement speed of 2.28 pixels / frame and a scaling ratio of 1.35. When the user continues to expand the screen to 100%, the system updates the expansion displacement to 100% in real time and recalculates the parameters: the near-field displacement scaling factor is 0.36, the displacement speed is 2.16 pixels / frame, and the scaling ratio is 1.5; the mid-field and far-field parameters are adjusted synchronously, and the motion speed and scaling ratio of dynamic elements change naturally with the screen expansion, presenting a harmonious dynamic effect.

[0091] This application provides a motion transformation parameter processing method tailored to the shape characteristics of rollable screen devices, solving the problem of poor dynamic wallpaper adaptation when the screen is unfolded / collapsed. By collecting the stretching displacement in real time and combining it with layer depth information to determine the displacement scaling coefficient, coordinated motion transformation parameters are calculated to ensure that the movement speed and scaling ratio of dynamic elements are synchronized with the changes in screen shape and conform to visual rules, thus improving the dynamic wallpaper user experience for rollable screen device users.

[0092] In this embodiment of the application, the target screen of the electronic device can also be a foldable screen. In response to the target screen of the electronic device being a foldable screen, the folding parameters of the foldable screen are obtained; the position change coefficient mapping relationship corresponding to the folding parameters is determined based on the depth information of each dynamic image element in the image layer; and the motion transformation parameters of each dynamic image element are determined based on the position transformation coefficient mapping relationship.

[0093] Foldable screens refer to screens that can change their display form through folding. Folding parameters are data characterizing their folded state. Different types of foldable screens have different parameter types. For example, in multi-screen devices with physical hinges, the folding parameters can be the real-time folding angle between the screens (e.g., obtained through angle sensors at the hinge). If the foldable screen is a flexible display device, the folding parameters can be the real-time bending curvature or equivalent folding angle (e.g., obtained through strain sensors or optical sensors within the screen). For multi-axis devices with three screens or more, the parameters are the real-time angles of each folding axis.

[0094] Position transformation coefficients refer to parameters used to adjust the spatial position of dynamic image elements, including position offset coefficients and sharpness adjustment coefficients. The position transformation coefficient mapping relationship refers to the correspondence between shape folding parameters and position transformation coefficients. This relationship is determined in conjunction with image layer depth information. For example, the smaller the folding angle (the closer the screen is to the folded state), the larger the position offset coefficient of dynamic elements in the near-field layer (farther from the folding axis) and the smaller the sharpness adjustment coefficient (more blurred), while the smaller the position offset coefficient and the larger the sharpness adjustment coefficient of dynamic elements in the far-field layer. Conversely, the larger the folding angle (the closer the screen is to the unfolded state), the smaller the position offset coefficient of the near-field layer (closer to the folding axis) and the larger the sharpness adjustment coefficient (more sharp), while the opposite applies to the far-field layer. This ensures that dynamic image elements are not obscured by the folded area during folding and are naturally distributed during unfolding. Motion transformation parameters include the position coordinate offset of dynamic image elements, sharpness value, and motion speed. The position coordinate offset is calculated from the position offset coefficient and screen size, the sharpness value is calculated from the sharpness adjustment coefficient and basic sharpness, and the motion speed is dynamically adjusted in conjunction with the folding angle change rate (the faster the folding speed, the faster the dynamic element position adjustment speed).

[0095] For example, a user can use a three-screen foldable tablet (with two folding axes) to upload images of city night scenes to generate a live wallpaper. The system will then layer the images into a near view (0-20: streets, streetlights, with the dynamic element "flickering lights"), a mid view (20-35: buildings, traffic, with the dynamic element "moving traffic"), and a far view (35-50: night sky, high-rise buildings, with the dynamic element "gradual light changes"). When the user unfolds the tablet from a fully folded state (both folding axes are 0°) to an intermediate state (the first folding axis is 120° and the second folding axis is 90°), the system uses angle sensors to obtain the folding parameters of the two folding axes and queries the mapping database to determine the position transformation coefficients of each layer: for example, the position offset coefficient of the near-field layer corresponding to the first folding axis is 0.08, the sharpness adjustment coefficient is 0.8, the mid-field layer offset coefficient is 0.05, the sharpness coefficient is 0.7, and the far-field layer offset coefficient is 0.02, and the sharpness coefficient is 0.6; after the second fold, the position offset coefficient of the near-field layer is 0.12, the sharpness adjustment coefficient is 0.7, the mid-field layer offset coefficient is 0.07, the sharpness coefficient is 0.6, and the far-field layer offset coefficient is 0.03, and the sharpness coefficient is 0.5. Based on a screen width of 1920 pixels, motion transformation parameters are calculated: the position offset of the "flickering light" element in the foreground layer of the first folding axis region is 153.6 pixels, with a sharpness value of 204; the position offset of the foreground layer in the second folding axis region is 230.4 pixels, with a sharpness value of 178.5; parameters for the mid-range and background layers are calculated simultaneously. As the user continues to unfold the screen to its fully unfolded state (both folding axes are at 180°), the system updates the folding parameters in real time, re-queries the mapping database, and adjusts the position offset coefficients (approaching 0) and sharpness adjustment coefficients (approaching 1.0) of each dynamic element. The dynamic elements gradually move closer to the center of the screen, significantly improving sharpness and presenting a naturally adapted dynamic effect.

[0096] It should be noted that the relevant data (including but not limited to depth value range, displacement scaling factor, folding angle threshold, resolution value, etc.) involved in the embodiments of this application are only specific values ​​listed for the purpose of illustrative explanation and simplified description. In actual application scenarios, the relevant data can be adaptively adjusted or other reasonable values ​​can be adopted according to specific hardware performance, image content, user preferences or system configuration. The scope of protection of this application is not limited to the specific values ​​or parameter examples listed in the embodiments.

[0097] This application provides differentiated methods for acquiring morphological parameters and calculating motion transformation parameters for different types of foldable screens (physical hinge multi-screen, flexible single-screen, and multi-folding hinge), solving the problems of occlusion, unbalanced clarity, and uncoordinated motion in dynamic wallpapers when the foldable screen changes shape. By acquiring folding parameters and establishing a mapping relationship between position transformation coefficients and layer depth, appropriate motion transformation parameters are calculated to ensure that the dynamic wallpaper maintains reasonable element distribution, coordinated clarity, and natural motion during folding and unfolding, thus improving the user experience of dynamic wallpapers on foldable screen devices.

[0098] In some embodiments of this application, before generating a target live wallpaper that matches the current screen shape, the method further includes: in response to a change in the shape of the target screen, determining a target resolution that matches the real-time resolution of the screen in the current shape from a plurality of candidate resolutions. Correspondingly, generating a target live wallpaper that matches the current screen shape includes: rendering and compositing the image layer and dynamic image elements based on the target resolution to obtain the target live wallpaper.

[0099] Candidate resolutions refer to a pre-calculated and stored set of optimal display resolutions covering all possible screen configurations. Each candidate resolution corresponds to a specific screen configuration parameter (such as the telescopic displacement of a rollable screen or the folding angle of a folding screen). Real-time resolution refers to the actual display resolution of the screen in its current configuration (e.g., 1080×1200 resolution when the folding screen is half-unfolded and 2160×1200 when fully unfolded). Target resolution refers to the resolution selected from the candidate resolutions that is consistent with or closest to the real-time resolution, used for subsequent rendering and compositing. For example, when an electronic device's processing system first starts up, it acquires the screen's hardware resolution range (e.g., minimum resolution 1080×2400, maximum resolution 2160×2400), combines this with possible values ​​for screen configuration parameters (e.g., folding screen angles from 0° to 180°, divided in 10° intervals), calculates the optimal display resolution corresponding to each configuration parameter (ensuring no image stretching and no pixel waste), forms a candidate resolution set, and stores it. When a screen shape change is detected, the system obtains the real-time resolution under the current shape and searches for a resolution that matches the real-time resolution from the candidate resolution set using a fast matching algorithm (such as hash matching). If no completely matching resolution is found, the closest resolution is selected as the target resolution.

[0100] Rendering and compositing image layers and dynamic image elements involves adjusting the size, calibrating the position, and overlaying layers of each image layer and its corresponding dynamic image element according to the target resolution. The final result is a complete dynamic wallpaper that matches the target resolution, ensuring precise matching between the wallpaper and the current screen display resolution without stretching or blurring. For example, the processing system of an electronic device calls the image rendering engine to adjust the size of each image layer according to the target resolution (e.g., using bilinear interpolation to ensure no loss of layer details). Based on the motion transformation parameters of the dynamic image elements, their positions are calibrated (ensuring the dynamic elements are in their appropriate positions within their corresponding layers). The layers are then overlaid and composited according to their visual order (foreground layers first, background layers last), while simultaneously processing transition effects between layers (e.g., adjusting transparency) to generate the target dynamic wallpaper. The composited dynamic wallpaper is in a video format (e.g., MP4) adapted to the device's desktop.

[0101] This embodiment achieves real-time adaptation of dynamic wallpaper resolution to screen shape changes by using preset candidate resolutions and a fast matching mode, solving the performance loss and poor visual effects caused by real-time scaling calculations in existing technologies. Pre-calculating candidate resolutions reduces real-time processing pressure, while fast matching ensures timely resolution adaptation. Rendering and compositing based on the target resolution achieves precise matching between the dynamic wallpaper and the current screen, resulting in clear and natural visual effects. It also improves the efficiency of dynamic wallpaper generation and updates, balancing performance and user experience.

[0102] Correspondingly, in this embodiment, the image layer and dynamic elements can be preprocessed based on the maximum resolution (or preset target resolution) of the target screen to generate a reference image set. When the screen shape changes, there is no need to re-render the dynamic elements; simply call the corresponding reference image from the reference image set and perform spatial position transformation according to motion transformation parameters to quickly synthesize a new frame, significantly reducing real-time processing pressure and improving the response speed and smoothness of the live wallpaper. In some embodiments of this application, before generating a target live wallpaper that matches the current screen shape, the method further includes: preprocessing the image layer and dynamic elements based on the target resolution of the target screen to generate a reference image set. Correspondingly, controlling the movement of dynamic image elements on the corresponding image layer includes: responding to changes in the shape of the target screen, calling the reference image corresponding to the target image layer from the reference image set, and performing spatial position transformation on the reference image according to motion transformation parameters.

[0103] The target resolution can be the specific resolution of the target screen of the current electronic device, preferably the maximum resolution of the screen (such as the resolution when a foldable screen is fully unfolded, or the resolution when a rollable screen is fully unfolded), ensuring that the reference image has the highest clarity and adapts to the screen resolution under all forms. Preprocessing of image layers and dynamic image elements refers to the process of adjusting the size of each image layer, fusing dynamic elements, and optimizing the effect. The reference image set refers to the collection containing the reference images corresponding to each image layer. Each reference image is a static frame sequence (or dynamic material) fused with the corresponding dynamic elements, stored locally on the device for easy and quick retrieval. For example, the maximum resolution of the target screen (such as the maximum resolution of a foldable screen, 2160×1200) is obtained and used as the target resolution. The image layers are then resized according to this resolution (using a high-quality interpolation algorithm to ensure detail preservation), and the corresponding dynamic image elements of each layer are fused with the layers (such as overlaying the keyframe sequence of the "wave undulation" dynamic element with the foreground image to generate the fused dynamic material). The merged materials are optimized (e.g., noise reduction, color calibration) to obtain a reference image for each layer (in the form of dynamic materials). The reference images of all layers are then integrated to form a reference image set, which is stored in the device's high-speed storage area.

[0104] In this embodiment, spatial position transformation represents simple geometric transformations such as translation, scaling, and rotation of the reference image. It eliminates the need to re-render dynamic elements; only the display position and range of the reference image are adjusted to adapt to the current screen shape. The transformation process is based on motion transformation parameters (such as position offset and scaling ratio) to ensure precise matching between the transformed reference image and the current screen shape. When a screen shape change is detected, the system first determines the real-time shape parameters of the current screen (such as folding angle and scaling displacement) and calculates the motion transformation parameters (position offset, scaling ratio, etc.) of the dynamic elements in each layer. The system retrieves the reference images corresponding to each target image layer from the reference image set; it then performs spatial position transformation on the reference images using the image processing engine. This involves adjusting the display coordinates of the reference images based on the position offset and adjusting the display size of the reference images based on the scaling ratio to ensure that the reference images are presented reasonably within the current screen display area. After the transformation is complete, the transformed reference images of each layer are superimposed and synthesized to generate the dynamic wallpaper frame in the current shape.

[0105] This embodiment solves the performance loss and response latency issues caused by real-time redrawing of existing dynamic wallpapers by pre-rendering a set of reference images and spatial position transformation. The high-resolution reference images generated through preprocessing ensure clear visual effects, while the spatial position transformation involves less computation and faster response, improving the smoothness of the dynamic wallpaper and the device's battery life. Correspondingly, this processing method adapts to all screen shape changes, eliminating the need to render materials separately for different shapes, reducing system complexity and storage usage, and balancing performance, user experience, and resource efficiency.

[0106] In some embodiments of this application, the process of controlling the movement of dynamic image elements on the corresponding image layer includes: determining the visual order of each image layer and its dynamic image elements based on the depth range of the image layer; and rendering the image layers and dynamic image elements with overlapping areas according to the visual order during the synthesis of the target dynamic wallpaper to obtain the target dynamic wallpaper.

[0107] Visual priority refers to the display priority of each image layer in the final composite wallpaper. Layers with higher priority are closer to the observer and will obscure lower-priority layers. Visual priority is determined by the depth range of the image layers: smaller depth values ​​(near-view layers) result in higher visual priority; larger depth values ​​(far-view layers) result in lower visual priority, consistent with the real-world phenomenon of near objects occluding distant objects. The visual priority of dynamic image elements is consistent with their respective layers. For example, by reading the depth range labels of each image layer and extracting the lower (or upper) limit of the depth value range as the sorting criterion, the image layers are sorted in ascending order of depth value. The layer with the smallest depth value is the visually foreground layer, and the layer with the largest depth value is the visually background layer. For example, for a near-view layer (0-20), a mid-view layer (20-35), and a far-view layer (35-50), the sorting result is near-view layer > mid-view layer > far-view layer. Dynamic image elements on each layer inherit the visual priority of their respective layers; that is, dynamic elements in the near-view layer have higher priority than dynamic elements in the mid-view and far-view layers.

[0108] Furthermore, the overlapping area refers to the region where the coordinates of two or more layers (and dynamic elements) coincide during compositing. Rendering refers to rendering layers (and dynamic elements) with lower priority first, followed by layers (and dynamic elements) with higher priority, according to visual sequence. Higher priority elements will cover lower priority elements in the overlapping area, thus achieving a natural occlusion relationship. For example, rendering layers and dynamic elements in visual sequence from low to high: rendering the background layer and its dynamic elements, then the mid-ground layer and its dynamic elements (the overlapping area between the mid-ground and background layers, with mid-ground elements covering the background layer), and finally the foreground layer and its dynamic elements (the overlapping area between the foreground layer and the mid-ground and background layers, with foreground elements covering other layers). During the rendering process, if an alpha blending algorithm is used to process the overlapping areas of semi-transparent dynamic elements (such as fog or halos), a natural transition is ensured, ultimately generating a target dynamic wallpaper with correct occlusion relationships.

[0109] This embodiment solves the problems of chaotic occlusion relationships and lack of spatial sense in existing dynamic wallpapers by clearly defining the visual sequence and properly handling the rendering of overlapping areas. The visual sequence design based on depth range conforms to the laws of human vision, and the coverage and blending of overlapping areas achieves a natural integration of dynamic elements into the scene. The final generated dynamic wallpaper has clear spatial hierarchy and correct occlusion relationships, enhancing visual immersion and providing users with a more realistic and comfortable dynamic wallpaper experience.

[0110] The wallpaper generation method of this application embodiment will be illustrated below with specific application scenarios.

[0111] Taking a scenario where a user inputs a static image to be processed and expects to generate a corresponding dynamic wallpaper as an example, see Figure 2, which shows a flowchart of an application scenario provided by an embodiment of this application. The dynamic wallpaper processing method is executed by the processing system of an electronic device (hereinafter referred to as the system in the following description of this embodiment). The system first receives the static image provided by the user and may selectively receive text prompts describing the dynamic effects input by the user. The static image (and optional text prompts) are input into an image-to-video generation model. Based on its learned prior video knowledge, the model expands the static image into a video sequence with temporal continuity, providing basic motion content for the dynamic wallpaper. Simultaneously, the system calls pre-programmed wallpaper effects libraries (such as blur, jitter, halo, etc.) and dynamic element libraries that can be generated in real time by generative models (such as raindrops, petals, starlight, etc.) as addable dynamic materials. To further enhance the sense of space, the system uses artificial intelligence deep deformation technology to analyze the original image, infer its scene depth information, and deconstruct the image into multiple effect layers with different depths of field. Subsequently, the system intelligently allocates and blends the generated video sequence, selected effects, and dynamic elements into corresponding effect layers based on their semantic and depth relationships. Finally, by invoking the operating system's underlying desktop overlay technology, the composited multi-layered dynamic content is rendered and set as the desktop background, thereby generating a dynamic wallpaper that is coherent with the original static image content and possesses rich dynamic effects and a deep sense of immersion. This process achieves end-to-end automated generation from static input to a dynamic desktop environment. The introduction of video sequences allows the dynamic effects to go beyond simple element translation, encompassing more complex scene-level movements and changes.

[0112] It should be noted that the video sequence output by the "image-to-video generation model" in this scenario embodiment is one way to achieve high-quality dynamic effects in this application. This video sequence is a multi-frame dynamic image that is temporally continuous and visually coherent, and its content originates from the spatiotemporal extension prediction of the input static image. This differs from simply transforming a static image frame by frame or looping a preset animation. The dynamic image elements and the generated target dynamic wallpaper in the above embodiments both include a technical solution using this type of video sequence as the core carrier of dynamic content. This method can greatly enhance the naturalness of movement and the immersive experience of the dynamic wallpaper.

[0113] Referring to Figure 3, it illustrates a user interaction and effect compositing diagram of a depth-layer-based dynamic wallpaper according to an embodiment of this application. In Figure 3, the system first performs depth analysis on the original wallpaper and achieves automatic layer separation based on depth of field. Then, the user can intuitively insert personalized dynamic effects at different depth levels. Finally, the system completes the compositing and rendering of all layers according to the depth order, thereby realizing a dynamic wallpaper creation process with spatial logic and high customization. Specifically, the system first estimates and analyzes the depth of the original wallpaper and automatically separates the wallpaper image into multiple layers based on different depth ranges according to the depth information. For example, a landscape image may be separated into a foreground tree layer, a midground lake layer, and a background mountain and sky layer. These layers intuitively reflect the spatial relationship between the elements in the image. The system presents this layered structure to the user. Users can selectively insert various dynamic visual effects into different layers according to their personal preferences and creativity. For example, users can choose to add a "falling leaves" effect to the foreground tree layer, a "shimmering waves" effect to the midground lake layer, and a "floating clouds" effect to the background sky layer. Finally, the system composites and renders the user-added effects with the corresponding original layer content according to the depth order of each layer. Through this depth-based, customizable layered effect addition method, this embodiment enables users to generate dynamic wallpapers with a strong sense of three-dimensionality and personalized style through intuitive and physically spatial logic operations.

[0114] Referring to Figure 4, it illustrates a schematic diagram of generating a parallax effect for a dynamic wallpaper suitable for a scrollable screen, according to an embodiment of this application. In Figure 4, the left side shows the screen range of the scrollable screen in its collapsed state, and the right side shows the change in screen range during the unfolding process. In this embodiment, the dynamic wallpaper includes dynamic image elements located in different depth layers, such as clouds in the background layer and cylinders in the foreground layer. When the screen is detected to unfold upwards, the system acquires the real-time scaling displacement and calculates and applies different displacement scaling coefficients for the clouds and cylinders based on the depth information of the layers in which each element is located. For example, as the screen unfolds, the clouds in the background produce a relatively small vertical displacement, with a smooth movement, simulating the visual stability of a distant background. The cylinders in the foreground, on the other hand, produce a significant and large vertical displacement, and their rapid upward movement creates a strong "jumping out" effect visually. This layer-depth-based, differentiated element movement produces a vivid parallax scrolling effect when the wallpaper content changes the physical form of the screen, that is, a clear relative movement occurs between the foreground and background elements. Through the above processing, this application realizes intelligent linkage and visual synchronization between dynamic wallpaper content and the unfolding action of the scrolling screen hardware, providing users with a deeply immersive experience where the visual world is presented synchronously as the screen physically unfolds.

[0115] Referring to Figure 5, it illustrates a schematic diagram of the perspective transformation of a dynamic wallpaper suitable for foldable screens according to an embodiment of this application. In Figure 5, the left side illustrates the display of a foldable screen (taking a dual-screen example) in its fully unfolded state. Screen 1 and Screen 2 are on the same plane, jointly displaying a complete dynamic wallpaper image based on depth layering. At this time, each layer (such as foreground, midground, and background layers) and its dynamic image elements (e.g., the cylinder in the foreground, the trees in the midground, and the clouds and sun in the background) are in their base layout positions, and the image has normal perspective. The right side illustrates the process of the screen changing to a folded state. As the folding angle of the screen decreases (i.e., the angle between the two screens becomes smaller), the system obtains the shape parameters in real time according to the method of this application and calculates the corresponding position and deformation parameters for layers of different depths. Specifically, elements in closer layers (such as cylinders) respond sharply, producing significant positional shifts and deformations; elements in middle layers (such as trees) are less affected; while elements in distant layers (such as clouds and the sun) remain relatively stable or only produce minor visual adjustments. This differentiated response based on folding angle and layer depth accurately simulates the dynamic perspective effect of "near objects moving, far objects remaining still" when the viewpoint changes in the real world. Through the above processing, the content of the live wallpaper can intelligently respond to the physical folding action of the screen, making each element in the picture appear to be in a real three-dimensional scene, moving in coordination with the change of viewpoint. This creates a deeply immersive interactive experience on foldable devices, where the screen contains a three-dimensional and dynamic element, achieving intelligent collaboration and perceptual unity between software visual content and hardware physical form.

[0116] This application also provides a wallpaper generation device, as shown in Figure 6, which includes:

[0117] The first acquisition unit 601 is used to acquire the target image to be processed;

[0118] The second acquisition unit 602 is used to perform image layering based on pixel features in the target image to obtain image layers with different depth ranges;

[0119] The first determining unit 603 is used to determine the dynamic image elements corresponding to each of the image layers;

[0120] The second determining unit 604 is used to determine the motion transformation parameters of the dynamic image elements of each image based on the real-time morphological parameters of the target screen of the electronic device.

[0121] The control unit 605 is configured to respond to changes in the shape of the target screen and, based on the motion transformation parameters, control the dynamic image elements to move on the corresponding image layer to generate a target dynamic wallpaper that matches the current screen shape.

[0122] In some possible implementations, the second acquisition unit includes:

[0123] The first acquisition subunit is used to obtain the depth information of each pixel in the target image;

[0124] The layering subunit is used to perform image layering based on the depth information of each pixel, grouping pixels with depth values ​​in the same depth range into the same image layer, thus obtaining image layers with different depth ranges.

[0125] In some possible implementations, determining the motion picture element corresponding to each of the image layers includes at least one of the following:

[0126] Based on the depth information of each image layer, guide information is output to prompt the user to add dynamic image elements, so as to determine the dynamic image elements corresponding to each image layer based on the guide information;

[0127] In response to a user's request to generate a live wallpaper, candidate live image elements matching each image layer are generated based on the semantic content of the image layer; in response to a user's selection instruction for the candidate live image elements, the live image elements corresponding to each image layer are determined.

[0128] The target image is subjected to image element recognition to obtain target image elements; based on the image features of the image layer, the target image elements are determined as dynamic image elements of the corresponding image layer.

[0129] In some possible implementations, the second determining unit includes:

[0130] The second acquisition subunit is used to obtain the real-time telescopic displacement of the scroll screen in response to the target screen of the electronic device being a scroll screen.

[0131] The first determining subunit is used to determine the displacement scaling factor of the dynamic image element of each image layer based on the real-time scaling displacement; wherein, the smaller the image layer depth value, the smaller its corresponding displacement scaling factor.

[0132] The second determining subunit is used to determine the motion transformation parameters of each of the dynamic image elements based on the displacement scaling coefficient and the real-time expansion and contraction displacement of the scroll screen.

[0133] In some possible implementations, the second determining unit includes:

[0134] The third acquisition subunit is used to acquire the folding parameters of the foldable screen in response to the fact that the target screen of the electronic device is a foldable screen.

[0135] The third determining subunit is used to determine the position transformation coefficient mapping relationship with the morphological folding parameters based on the depth information of each dynamic image element in the image layer.

[0136] The fourth determining subunit is used to determine the motion transformation parameters of each of the dynamic image elements according to the position transformation coefficient mapping relationship.

[0137] Optionally, before generating the target live wallpaper that matches the current screen configuration, the device further includes:

[0138] The third determining unit is used to determine, in response to the shape change of the target screen, a target resolution that matches the real-time resolution of the screen in the current shape from multiple candidate resolutions.

[0139] The process of generating a target live wallpaper that matches the current screen format includes: rendering and compositing the image layer and dynamic image elements based on the target resolution to obtain the target live wallpaper.

[0140] In some possible implementations, before generating the target live wallpaper that matches the current screen configuration, the device further includes:

[0141] The preprocessing unit is used to preprocess the image layer and dynamic image elements based on the target resolution of the target screen to generate a reference image set;

[0142] Controlling the motion of the dynamic image elements on the corresponding image layer includes:

[0143] In response to the shape change of the target screen, the reference image corresponding to the target image layer is retrieved from the reference image set, and the spatial position of the reference image is transformed according to the motion transformation parameters.

[0144] In some possible implementations, the control unit includes:

[0145] The fourth determining subunit is used to determine the visual sequence of each image layer and its dynamic image elements based on the depth range of the image layer.

[0146] The rendering subunit is used to render the image layers and dynamic image elements with overlapping areas according to the visual sequence during the synthesis of the target live wallpaper, so as to obtain the target live wallpaper.

[0147] It should be noted that the specific implementation of each unit and subunit in this embodiment can be referred to the corresponding content above, and will not be described in detail here.

[0148] In another embodiment of this application, a readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the wallpaper generation method as described above.

[0149] In another embodiment of this application, an electronic device is also provided, comprising:

[0150] A memory for storing computer programs and the data generated by the execution of said computer programs;

[0151] A processor for executing the computer program to achieve:

[0152] Obtain the target image to be processed;

[0153] Image layering is performed based on pixel features in the target image to obtain image layers with different depth ranges;

[0154] Determine the dynamic image elements corresponding to each of the image layers;

[0155] Based on the real-time morphological parameters of the target screen of the electronic device, the motion transformation parameters of the dynamic image elements of each image are determined.

[0156] In response to changes in the shape of the target screen, the dynamic image elements are controlled to move on the corresponding image layer based on the motion transformation parameters to generate a target dynamic wallpaper that matches the current screen shape.

[0157] It should be noted that the specific implementation of the processor in this embodiment can be referred to the corresponding content above, and will not be described in detail here.

[0158] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0159] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0160] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0161] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating wallpaper, comprising: Obtain the target image to be processed; Image layering is performed based on pixel features in the target image to obtain image layers with different depth ranges; The dynamic image elements corresponding to each of the image layers are determined; based on the real-time shape parameters of the target screen of the electronic device, the motion transformation parameters of the dynamic image elements of each of the image layers are determined; in response to the shape change of the target screen, based on the motion transformation parameters, the dynamic image elements are controlled to move on the corresponding image layers to generate a target dynamic wallpaper that matches the current screen shape.

2. The method according to claim 1, wherein performing image layering based on pixel features in the target image to obtain image layers with different depth ranges includes: Obtain the depth information of each pixel in the target image; Image layering is performed based on the depth information of each pixel, and pixels with depth values ​​in the same depth range are grouped into the same image layer to obtain image layers with different depth ranges.

3. The method according to claim 1, wherein determining the dynamic image element corresponding to each of the image layers includes at least one of the following: outputting guidance information for prompting the user to add dynamic image elements based on the depth information of each of the image layers, so as to determine the dynamic image element corresponding to each image layer based on the guidance information; In response to a user's request to generate a live wallpaper, candidate live image elements matching each image layer are generated based on the semantic content of the image layer; in response to a user's selection instruction for the candidate live image elements, the live image elements corresponding to each image layer are determined. Image element recognition is performed on the target image to obtain the target image elements; Based on the image features of the image layer, the target image element is determined as the dynamic image element of the corresponding image layer.

4. The method according to claim 1, wherein determining the motion transformation parameters of the dynamic image elements of each image layer based on the real-time morphological parameters of the target screen of the electronic device includes: In response to the fact that the target screen of the electronic device is a scrollable screen, the real-time telescopic displacement of the scrollable screen is obtained; Based on the real-time scaling displacement, the displacement scaling factor of the dynamic image element in each image layer is determined; wherein, the smaller the image layer depth value, the smaller its corresponding displacement scaling factor; based on the displacement scaling factor and the real-time scaling displacement of the scroll screen, the motion transformation parameters of each dynamic image element are determined.

5. The method according to claim 1, wherein determining the motion transformation parameters of each dynamic image element of the image based on the real-time morphological parameters of the target screen of the electronic device includes: In response to the fact that the target screen of the electronic device is a foldable screen, the folding parameters of the foldable screen are obtained; Based on the depth information of each dynamic image element in the image layer, determine the mapping relationship of the position transformation coefficients corresponding to the morphological folding parameters; Based on the position transformation coefficient mapping relationship, the motion transformation parameters of each dynamic image element are determined.

6. The method according to claim 1, further comprising, before generating the target live wallpaper matching the current screen configuration: In response to the shape change of the target screen, a target resolution that matches the real-time resolution of the screen in the current shape is determined from multiple candidate resolutions; The process of generating a target live wallpaper that matches the current screen format includes: rendering and compositing the image layer and dynamic image elements based on the target resolution to obtain the target live wallpaper.

7. The method according to claim 1, further comprising, before generating the target live wallpaper matching the current screen configuration: Based on the target resolution of the target screen, the image layer and dynamic image elements are preprocessed to generate a reference image set; The method of controlling the motion of the dynamic image elements on the corresponding image layer includes: in response to the shape change of the target screen, calling the reference image corresponding to the target image layer from the reference image set, and performing spatial position transformation on the reference image according to the motion transformation parameters.

8. The method according to claim 1, wherein controlling the motion of the dynamic image element on the corresponding image layer comprises: Based on the depth range of the image layers, determine the visual sequence of each image layer and its dynamic image elements; In the process of composing the target live wallpaper, the image layers and dynamic image elements with overlapping areas are rendered according to the visual sequence to obtain the target live wallpaper.

9. A wallpaper generating device, comprising: The first acquisition unit is used to acquire the target image to be processed; The second acquisition unit is used to perform image layering based on pixel features in the target image to obtain image layers with different depth ranges; the first determination unit is used to determine the dynamic image elements corresponding to each of the image layers; The second determining unit is used to determine the motion transformation parameters of each dynamic image element of the image based on the real-time shape parameters of the target screen of the electronic device; the control unit is used to control the dynamic image elements to move on the corresponding image layer based on the motion transformation parameters in response to the shape change of the target screen, so as to generate a target dynamic wallpaper that matches the current screen shape.

10. An electronic device, comprising: A memory for storing computer programs and the data generated by the execution of said computer programs; A processor is configured to execute the computer program to acquire a target image to be processed. Image layering is performed based on pixel features in the target image to obtain image layers with different depth ranges; dynamic image elements corresponding to each image layer are determined; motion transformation parameters of the dynamic image elements of each image are determined based on the real-time shape parameters of the target screen of the electronic device; in response to the shape change of the target screen, the dynamic image elements are controlled to move on the corresponding image layer based on the motion transformation parameters to generate a target dynamic wallpaper that matches the current screen shape.