Theme preview method, theme generation method and electronic equipment

By allowing users to upload resources to generate theme preview images and select personalized themes, the problem of limited theme selection on terminal devices is solved, improving theme generation efficiency and user experience.

CN121764566APending Publication Date: 2026-03-31HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, users cannot satisfy their demand for personalized themes when selecting existing themes on their terminal devices, which affects the user experience.

Method used

Based on user-uploaded resources, electronic devices generate and display preview images of the theme, supporting diverse theme page displays and generating personalized themes according to user selections.

Benefits of technology

It improves the efficiency and diversity of theme generation, meets users' needs for personalized themes, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764566A_ABST
    Figure CN121764566A_ABST
Patent Text Reader

Abstract

The invention provides a theme preview method, a theme generation method and electronic equipment, relates to the technical field of terminals, and can obtain a first resource uploaded by a user, obtain at least one theme corresponding to the first resource, and display a preview image corresponding to the at least one theme. Wherein the first resource is a picture or a video, one theme comprises at least one type of theme page, the contents of the first resource displayed on the same type of theme page of the plurality of themes are different, and the preview image comprises any one theme page in the themes, so that the diversity of theme preview is improved, the demand of a user for a personalized theme is met, and the user experience is improved. And the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a theme preview method, a theme generation method, and an electronic device. Background Technology

[0002] With the iterative innovation of terminal device software versions, users' requirements for software experience are gradually increasing. Among them, themes have become a key focus for users, evolving from static to dynamic, and from a single lock screen or wallpaper to the association between lock screen and wallpaper, gradually supporting user personalization.

[0003] Currently, users typically choose one of the existing themes on their devices to apply the theme. However, this approach does not meet users' demands for personalized themes and negatively impacts their user experience. Summary of the Invention

[0004] This application provides a theme preview method, a theme generation method, and an electronic device that automatically generates and displays preview images of at least one theme corresponding to a user-uploaded resource, thereby meeting the user's demand for personalized themes and improving the user experience.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0006] Firstly, a theme preview method is provided, taking an electronic device as an example. In this theme preview method, firstly, the electronic device responds to a user's first operation by acquiring a first resource; then, the electronic device generates at least one theme corresponding to the first resource based on the first resource; and finally, the electronic device displays a preview image corresponding to at least one theme.

[0007] For example, the first operation is either the user uploading a first resource or the user selecting a first resource from the album.

[0008] The primary resource is either an image or a video.

[0009] In this context, at least one theme includes at least one type of theme page, and multiple themes in at least one theme display different content of the first resource on the same type of theme page.

[0010] For example, different types of theme pages refer to pages displayed when the electronic device screen is in Always On Display (AOD) state, pages displayed when the electronic device screen is locked, or pages displayed when the electronic device screen is in desktop mode.

[0011] The preview images include any one of the theme pages from at least one theme.

[0012] For example, any topic page can be one of at least one topic page corresponding to a topic, or it can be a carousel of at least two topic pages corresponding to a topic.

[0013] The above-described theme preview method generates at least one theme corresponding to the user-uploaded resources and displays preview images of each theme, thereby improving the efficiency and diversity of theme generation and meeting users' needs for personalized themes.

[0014] In one possible implementation of the first aspect, when the electronic device generates at least one theme corresponding to a first resource, it first acquires at least one sub-resource from the first resource; then, for one of the at least one sub-resource, it acquires a script file corresponding to that sub-resource; next, based on the sub-resource and the script file, it generates a theme package corresponding to the sub-resource; finally, based on the theme package, it generates a theme corresponding to the sub-resource, including at least one type of theme page. Here, a sub-resource represents any one of the following in the first resource: a target object, characters, or video clips. The target object is at least one of a person, animal, building, or object; the characters are at least one of numbers or text. The script file is used to generate the theme page in combination with the sub-resource. It is evident that the electronic device can generate corresponding theme packages using each sub-resource of the first resource and its corresponding script file, lowering the barrier to theme creation, improving the efficiency and convenience of theme creation, and also increasing the richness of the generated themes.

[0015] In one possible implementation of the first aspect, preview images corresponding to multiple themes are displayed in a preset order, which is determined based on the matching degree between the first resource and the multiple themes corresponding to the first resource. It is evident that sorting the preview images corresponding to each theme according to the matching degree allows for the priority display of preview images of themes with high matching degrees, improving user viewing experience and the success rate of subsequent theme applications.

[0016] In one possible implementation of the first aspect, the preview images corresponding to at least one theme include a first preview image. The theme corresponding to the first preview image includes at least two of a first theme page, a second theme page, or a third theme page. The first theme page represents a page displayed when the screen is in AOD (Always-On) mode, the second theme page represents a page displayed when the screen is locked, and the third theme page represents a page displayed when the screen is in desktop mode. After the electronic device displays the preview images corresponding to at least one theme, the electronic device also responds to the user's selection operation on the first preview image by setting the various theme pages in the theme corresponding to the first preview image as the pages displayed when the screen is in the corresponding mode. Therefore, the user can select a theme corresponding to one of the preview images corresponding to at least one theme for application, increasing the user's range of choices and meeting the needs of different users for personalized themes.

[0017] In one possible implementation of the first aspect, when the electronic device responds to a user's selection operation on a first preview image and sets multiple theme pages from the theme corresponding to the first preview image as pages displayed when the screen is in the corresponding state, firstly, the electronic device responds to the user's selection operation on the first preview image by displaying a preview page of the theme corresponding to the first preview image; then, the electronic device responds to the user's selection operation on the preview page by setting multiple theme pages from the theme corresponding to the first preview image as pages displayed when the screen is in the corresponding state, wherein the preview page includes at least one theme page from the theme corresponding to the first preview image. It is evident that by viewing the effects of different themes displayed on the preview page, users can select a theme for their desired application, improving the convenience and satisfaction of users when applying themes.

[0018] In one possible implementation of the first aspect, when the first resource is an image and the sub-resource is the target object in the image, only the target object in the image is displayed on the first theme page of the electronic device, while the first resource is displayed on the second theme page and / or the third theme page of the electronic device. It is evident that by using user-uploaded images, the target object and the image are respectively displayed as screen elements of the electronic device in different states, enabling a smooth transition between the target object and the image when the screen state of the electronic device is subsequently changed. This improves the diversity of page display and the user's visual experience, satisfying the user's need for personalized themes.

[0019] In one possible implementation of the first aspect, when the first resource is a video and the sub-resources include a first video segment and a second video segment within the video, the first frame of the first video segment is displayed on a first theme page of the electronic device, the last frame of the first video segment or the first frame of the second video segment is displayed on a second theme page of the electronic device, and the last frame of the second video segment is displayed on a third theme page. It is evident that creating corresponding themes based on user-uploaded videos lowers the barrier to video theme creation and satisfies the user's viewing experience when switching electronic device screen states.

[0020] In one possible implementation of the first aspect, a first video clip and a second video clip are played during the process of the electronic device screen switching from AOD state to desktop display state. It is evident that using video clips as transition videos for the electronic device screen state switching satisfies the user's need for a synchronized effect between the electronic device's switching actions and visual perception, thereby improving the user experience.

[0021] In one possible implementation of the first aspect, a second video clip is played in reverse during the transition of the electronic device screen from desktop display to lock screen state. It is evident that different transition processes of the electronic device have corresponding playback methods, which can increase the visual impact on the user and improve the user's visual experience.

[0022] In one possible implementation of the first aspect, the similarity between the last frame of the first video segment and the first frame of the second video segment is within a preset range, thereby making the video seen by the user when switching screen states coherent and improving the user's viewing experience.

[0023] In one possible implementation of the first aspect, when the sub-resource is a character, the first resource with updated characters is displayed on at least two pages of the first, second, or third theme page of the electronic device. It is evident that users can adjust the characters in images / videos according to their needs and preferences, improving the flexibility of theme creation. Furthermore, updating the characters can improve the accuracy and timeliness of image content, increasing user satisfaction with personalized themes.

[0024] Secondly, a theme generation method is provided. Taking an electronic device as an example, in this theme generation method, firstly, the electronic device responds to a user's first operation by acquiring a first resource; then, the electronic device displays at least one theme page corresponding to the first resource based on the first resource; finally, the electronic device responds to a selection operation on a target theme page by generating a theme corresponding to the target theme page.

[0025] The primary resource is either an image or a video.

[0026] In this case, the content of the first resource displayed on multiple theme pages within at least one theme page is different.

[0027] At least one of the topic pages includes the target topic page.

[0028] In the above-described theme generation method, the electronic device can first display the theme page corresponding to the first resource, and then generate the theme corresponding to the theme page selected by the user through the user's selection. This eliminates the need to generate a theme for each theme page, reduces the power consumption of the electronic device during theme generation, further improves the generation efficiency of the theme that the user wants to apply, and enhances the user experience.

[0029] In one possible implementation of the second aspect, when the electronic device generates a theme corresponding to the target theme page, it first obtains sub-resources from the first resource corresponding to the target theme page; then, it obtains the script file corresponding to the target theme page; next, based on the sub-resources and the script file, it generates a theme package corresponding to the target theme page; and finally, based on the theme package, it generates the theme corresponding to the target theme page. Here, a sub-resource represents any one of the following in the first resource: a target object, characters, or video clips; a target object is at least one of a person, animal, building, or object; and characters are at least one of numbers or text. It is evident that the electronic device can generate a corresponding theme package based on the sub-resources and script file corresponding to the target theme page, thereby generating the theme corresponding to the target theme page. This lowers the barrier to theme creation for users, increases the theme generation speed, and improves the user experience.

[0030] Thirdly, an electronic device is provided, the electronic device including a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform a theme preview method as in the first aspect and any implementation thereof, or to perform a theme generation method as in the second aspect and any implementation thereof.

[0031] Fourthly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform a theme preview method as described in the first aspect and any implementation thereof, or to perform a theme generation method as described in the second aspect and any implementation thereof.

[0032] Fifthly, a computer program product is provided that, when the computer program product is run on an electronic device, causes the electronic device to execute the theme preview method as described in the first aspect and any implementation thereof, or to execute the theme generation method as described in the second aspect and any implementation thereof.

[0033] The beneficial effects that the electronic equipment provided in the third aspect, the computer-readable storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect can achieve can be referred to the beneficial effects that the first aspect and any of its implementations, and the second aspect and any of its implementations can achieve, and will not be repeated here. Attached Figure Description

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

[0035] Figure 2 This illustration shows one of the software structure diagrams of an electronic device provided in an embodiment of this application;

[0036] Figure 3 This is a second schematic diagram of the software structure of an electronic device provided in an embodiment of this application;

[0037] Figure 4 A flowchart of a topic preview method provided in an embodiment of this application is shown;

[0038] Figure 5 This illustration shows a schematic diagram of an embodiment of the present application for uploading resources;

[0039] Figure 6 This document illustrates a flowchart of an embodiment of obtaining a sub-resource provided in this application.

[0040] Figure 7 This illustration shows a schematic diagram of a script file provided in an embodiment of this application;

[0041] Figure 8 This document illustrates a flowchart of a method for generating a theme package according to an embodiment of this application.

[0042] Figure 9 A schematic diagram of one subject matter provided in an embodiment of this application is shown;

[0043] Figure 10 This illustration shows one of the schematic diagrams of a theme preview and theme application provided in an embodiment of this application;

[0044] Figure 11 This illustration shows a second schematic diagram of a theme preview and theme application provided in an embodiment of this application;

[0045] Figure 12 This illustration shows one of the schematic diagrams of a subject display provided in an embodiment of this application;

[0046] Figure 13 This illustration shows a second schematic diagram of a subject display provided in an embodiment of this application;

[0047] Figure 14A flowchart of a topic generation method provided in an embodiment of this application is shown;

[0048] Figure 15 A schematic diagram of the hardware structure of another electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0049] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0050] Furthermore, the business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the emergence of new business scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0051] The theme creation process typically involves a design team from planning and design to production, and a technical team from gathering requirements to releasing features. This combined process can take several months. Clearly, theme creation is time-consuming and costly, and the final theme is dependent on system version upgrades before it becomes usable. Alternatively, third-party theme creation tools can be used, but these require writing code to create personalized themes, which is technically challenging. Furthermore, these tools have high hardware requirements, limiting their applicability and making them unsuitable for widespread adoption.

[0052] When applying a theme, users typically switch between existing themes on their device to achieve the desired effect, such as changing a single lock screen, wallpaper image, or GIF, or replacing simple elements in a theme. However, this method is limited to the existing themes on the device, resulting in a limited range of themes and failing to meet users' demands for personalized themes, thus impacting the user experience.

[0053] In view of this, embodiments of this application provide a theme preview method and a theme generation method.

[0054] In one theme preview method, user-uploaded resources are used to display preview images of each theme corresponding to the resources on an electronic device. The preview images include any type of theme page for the corresponding theme. Different themes display different content of resources on the same type of theme page, which increases the diversity of theme previews, meets users' demands for personalized themes, and improves the user experience.

[0055] In some embodiments, taking the above-described theme preview method applied to an electronic device as an example, firstly, the electronic device responds to a user's first operation by acquiring a first resource; then, the electronic device generates at least one theme corresponding to the first resource based on the first resource; and finally, the electronic device displays a preview image corresponding to at least one theme.

[0056] For example, the first operation is either the user uploading a first resource or the user selecting a first resource from the album.

[0057] The primary resource is either an image or a video.

[0058] In this context, at least one theme includes at least one type of theme page, and multiple themes in at least one theme display different content of the first resource on the same type of theme page.

[0059] For example, the type of theme page is related to the screen state of the electronic device. For instance, different types of theme pages may be pages displayed when the electronic device screen is in AOD state, pages displayed when the electronic device screen is locked, or pages displayed when the electronic device screen is in desktop state.

[0060] The preview images include any one of the theme pages from at least one theme.

[0061] For example, for each theme, any theme page displayed in the preview image corresponding to the theme can be any type of theme page corresponding to the theme, or it can be a carousel of at least two types of theme pages corresponding to the theme.

[0062] The above-mentioned theme preview method displays preview images for each theme corresponding to the resources uploaded by users, which improves the diversity of theme previews, meets users' needs for personalized themes, and enhances the user experience.

[0063] In one theme generation method, taking its application to an electronic device as an example, firstly, the electronic device responds to a user's first operation by acquiring a first resource; then, the electronic device displays at least one theme page corresponding to the first resource based on the first resource; finally, the electronic device responds to a selection operation on a target theme page by generating a theme corresponding to the target theme page.

[0064] For example, the first operation is either the user uploading a first resource or the user selecting a first resource from the album.

[0065] The primary resource is either an image or a video.

[0066] In this case, the content of the first resource displayed on multiple theme pages within at least one theme page is different.

[0067] At least one topic page includes the target topic page.

[0068] In the above-described theme generation method, based on the resources uploaded by the user, at least one theme page can be displayed first. The user can select a theme page from the at least one theme page and generate the theme corresponding to that theme page. It is not necessary to generate a theme for each theme page. Only the theme that the user wants to apply is generated, which reduces the power consumption of electronic devices during the theme generation process, further improves the theme generation efficiency, and enhances the user experience.

[0069] In some embodiments, such as Figure 1As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a user identification module (SIM) card interface 195, etc.

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

[0071] Processor 110 may include one or more processing units ( Figure 1 (Not shown in the image), for example, processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, 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.

[0072] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0073] In some possible implementations, the controller can specifically control the electronic device 100 to acquire the first resource uploaded by the user, the controller can also specifically control the electronic device 100 to generate at least one theme corresponding to the first resource, and the controller can also specifically control the electronic device 100 to display a preview image corresponding to at least one theme.

[0074] In some other possible implementations, the controller may specifically control the electronic device 100 to acquire a first resource in response to a user's first operation. The controller may also specifically control the electronic device 100 to display at least one topic page corresponding to the first resource based on the first resource, wherein the content of the first resource displayed on each topic page is different. The controller may also specifically control the electronic device 100 to generate a topic corresponding to the target topic page in response to a selection operation on the target topic page; wherein at least one topic page includes the target topic page.

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

[0076] In some embodiments, processor 110 may include one or more interfaces ( Figure 1 (Not shown in the image). For example, USB interface 130 is an interface conforming to the USB standard specification, specifically a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.

[0077] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.

[0078] 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 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.

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

[0080] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on the electronic device 100. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0081] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 receives electromagnetic waves via antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.

[0082] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

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

[0084] In some possible implementations, the electronic device 100 may display a preview image corresponding to at least one theme via the display screen 194. The electronic device 100 may also display a first resource or a sub-resource of the first resource via the display screen 194 in different states; the state may be any one of AOD state, lock screen state, and desktop display state; the sub-resource may represent any one of the following contents in the first resource: target object, character, or video clip; the target object may be at least one of the following: person, animal, building, or object; the character may be at least one of the following: number or text.

[0085] In some other possible implementations, the electronic device 100 may display at least one topic page corresponding to the first resource via the display screen 194.

[0086] It is understood that the display screen 194 mentioned herein can serve as the screen in the following embodiments.

[0087] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0088] The I SP is used to process data fed back from camera 193. Camera 193 is used to capture still images or videos.

[0089] A digital signal processor (DSP) is used to process digital signals, including digital image signals and other digital signals. A video codec is used to compress or decompress digital video. An NPU (Neural Processing Unit) is a neural network (NN) computing processor that, by borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, rapidly processes input information and can continuously learn. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, speech recognition, and text understanding.

[0090] In some possible implementations, the electronic device 100 can use a digital signal processor to perform image enhancement, image compression, edge detection, feature extraction, and other processing on user-uploaded images in order to optimize image quality and improve image processing efficiency and performance.

[0091] In some possible implementations, the electronic device 100 can decode the user-uploaded video using a video codec and perform some basic processing, such as noise removal, brightness and contrast adjustment, to further improve the video quality.

[0092] In some possible implementations, the electronic device 100 can identify the resources uploaded by the user through the NPU in order to obtain the sub-resources within the resources.

[0093] 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 perform data storage functions.

[0094] In some possible implementations, the electronic device 100 can store a first resource, at least one sub-resource of the first resource, a script file, and a theme package via an external storage card; the script file is used to generate a theme page by combining the sub-resources, and the theme package represents a collection of files and resources, including user-uploaded resources, at least one sub-resource of the resources, and the corresponding script file.

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

[0096] In some possible implementations, the electronic device 100 may also store the first resource, at least one sub-resource of the first resource, script files, and theme packages in its internal memory 121.

[0097] Electronic device 100 can implement audio functions through audio module 170 and application processor, such as music playback and recording. Audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. Audio module 170 can also be used for encoding and decoding audio signals.

[0098] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, or to indicate messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card.

[0099] based on Figure 1 The electronic device shown implements the theme preview method in the embodiments of this application. By using resources uploaded by users, it displays preview images of different themes corresponding to the resources, which improves the diversity of theme previews, meets the user's needs for personalized themes, and enhances the user experience.

[0100] based on Figure 1 The electronic device shown implements the theme generation method in the embodiments of this application. Based on the resources uploaded by the user, it displays at least one theme page corresponding to the resources, generates only themes corresponding to the theme pages selected by the user in at least one theme page, reduces unnecessary theme generation steps, reduces the power consumption of the electronic device, improves the efficiency of theme generation, meets the user's needs for personalized themes, and improves the user experience.

[0101] In some embodiments, such as Figure 2 As shown, the electronic device 100 can also adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered Android system as an example to exemplify the software structure of the electronic device 100.

[0102] like Figure 2 As shown, the layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the system service layer, and the kernel layer.

[0103] The application layer can include a series of application packages.

[0104] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0105] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions.

[0106] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0107] The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. The display interface can consist of one or more views.

[0108] The system service layer can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc.

[0109] In some possible implementations, the system service layer may include a theme creation module, which, in response to a first operation, obtains a first resource, generates at least one theme corresponding to the first resource, and displays a preview image corresponding to at least one theme.

[0110] In some other possible implementations, the theme creation module is also used to respond to the user's first operation, obtain a first resource, display at least one theme page corresponding to the first resource based on the first resource, and generate a theme corresponding to the target theme page in response to the selection operation of the target theme page; wherein, at least one theme page includes the target theme page.

[0111] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0112] based on Figure 2 The electronic device shown implements the theme preview method in the embodiments of this application. It can generate at least one theme corresponding to the resources uploaded by the user, thereby displaying preview images of different themes corresponding to the resources. It provides a variety of theme preview effects for users to choose from, improves the diversity of theme previews, meets users' needs for personalized themes, and improves the user experience.

[0113] based on Figure 2 The electronic device shown implements the theme generation method in this application embodiment. It can display at least one theme page corresponding to the resources uploaded by the user, generate only the theme corresponding to the theme page selected by the user in at least one theme page, reduce unnecessary theme generation processes, reduce the power consumption of the electronic device, thereby improving the theme generation efficiency, meeting the user's demand for personalized themes, and improving the user experience.

[0114] In some embodiments, the structure of the electronic device 100 may also be as follows: Figure 3As shown, the electronic device 100 includes a theme editing module, a theme management module, a theme storage module, a theme engine module, and a theme display module. The theme editing module provides an upload interface to obtain resources uploaded by users and sends the obtained resources to the theme management module. The theme management module obtains at least one sub-resource from the resource and generates a theme corresponding to each sub-resource. It then sends the theme corresponding to each sub-resource to the theme storage module and sends a notification to the theme display module. The theme storage module stores the theme corresponding to each sub-resource in the corresponding theme resource directory. The theme display module receives the notification and sends a request to the theme engine module to load the theme engine. The theme engine module retrieves the theme corresponding to each sub-resource from the theme storage module according to the request and renders it. The theme display module displays a preview image of each theme corresponding to the resource.

[0115] In other embodiments, the theme editing module provides an upload interface to obtain resources uploaded by the user and sends the obtained resources to the theme management module. The theme management module obtains at least one sub-resource from the resources and generates a theme page corresponding to each sub-resource. It then sends a notification to the theme display module about the theme pages corresponding to each sub-resource. The theme display module displays the theme pages corresponding to each sub-resource, receives the target theme page selected by the user, and notifies the theme management module. The theme management module generates a theme corresponding to the target theme page, sends the theme corresponding to the target theme page to the theme storage module, and notifies the theme display module. The theme storage module stores the theme corresponding to the target theme page in the corresponding theme resource directory. The theme display module receives the notification and sends a request to the theme engine module to load the theme engine. The theme engine module retrieves the theme corresponding to the target theme page from the theme storage module according to the request and applies it.

[0116] based on Figure 3 The electronic device shown implements the theme preview method in the embodiments of this application. It can display preview images of each theme corresponding to the resources uploaded by users, thereby improving the theme generation speed and the diversity of previews, meeting users' needs for personalized themes, and improving the user experience.

[0117] based on Figure 3 The electronic device shown implements the theme generation method in this application embodiment. It can display at least one theme page corresponding to the resource uploaded by the user, and generate only the theme corresponding to the theme page selected by the user from the at least one theme page. This reduces the power consumption of the electronic device, improves the theme generation speed, meets the user's demand for personalized themes, and improves the user experience.

[0118] The aforementioned electronic devices can be mobile phones, tablets, wearable devices (such as smartwatches, smart bracelets, etc.), smart home devices (such as televisions, etc.), in-vehicle systems (such as vehicle terminals), etc. Among them, mobile phones can be foldable screen phones or non-foldable screen phones.

[0119] The following uses a mobile phone as an example to illustrate the theme preview method and theme generation method provided in the embodiments of this application.

[0120] Example 1

[0121] See Figure 4 As shown, the above-mentioned theme preview method may include the following steps S401-S403.

[0122] S401: The mobile phone responds to the user's first operation and obtains the first resource.

[0123] The primary resource is either an image or a video.

[0124] For example, the first operation is either the user uploading a first resource, or the user selecting a first resource from their photo album. The user uploading the first resource includes either a click operation or a drag-and-drop operation; for example, the click operation to upload the first resource could be on the theme creation interface provided by the phone, where the user selects the image / video they want to upload from their phone's photo album, and then... Figure 4 On the mobile phone interface shown, the user clicks the "Upload" control to upload images / videos; for example, the drag-and-drop operation of selecting the first resource in the album can be like this... Figure 5 As shown, when the phone screen is displayed in split mode, the user can drag and drop the pictures / videos they want to upload from the second split-screen album to the "upload" control displayed in the first split-screen, thus uploading the pictures / videos.

[0125] For example, user-uploaded images / videos can be taken with a mobile phone camera, downloaded from the network, or created through drawing, splicing, and cropping.

[0126] For example, a mobile phone can determine whether a first resource is an image or a video by the file extension in the name of the first resource. For instance, if the name of the first resource is xxx.jpg, then the first resource is an image; if the name of the first resource is xxx.mp4, then the first resource is a video.

[0127] S402. The mobile phone generates at least one theme corresponding to the first resource based on the first resource.

[0128] In this context, at least one theme includes at least one type of theme page, and multiple themes in at least one theme display different content of the first resource on the same type of theme page.

[0129] For example, the type of theme page is related to the screen state of the mobile phone. For instance, the type of theme page can be any of the following states: AOD state, lock screen state, or desktop state. Desktop state can be the desktop state, or it can be a state where a small window page is displayed on the desktop, a pop-up window is displayed on the desktop, or a drop-down menu is displayed on the desktop. For example, a theme includes two theme pages: a theme page for the lock screen state and a theme page for the desktop state.

[0130] For example, multiple themes displaying different content in the first resource on the same type of theme page can either display different content in the first resource, or display the content in the first resource in different display methods. The display method can be any one of dynamic display, static display, dynamic and static combined display, forward playback, or reverse playback.

[0131] In some embodiments, when the mobile phone generates at least one theme corresponding to the first resource, firstly, the mobile phone obtains at least one sub-resource in the first resource; then, for one of the at least one sub-resource, the mobile phone obtains a script file corresponding to the sub-resource; secondly, the mobile phone generates a theme package corresponding to the sub-resource based on the sub-resource and the script file; finally, the mobile phone generates a theme corresponding to the sub-resource that includes at least one type of theme page based on the theme package.

[0132] Among them, sub-resources refer to any one of the target objects, characters, and video clips in the first resource; the target objects are at least one of people, animals, buildings, or objects; and the characters are at least one of numbers or text.

[0133] For example, such as Figure 6As shown, after acquiring the first resource, the mobile phone performs automated analysis on it. This automated analysis involves the mobile phone determining the sub-resources corresponding to each theme type in the first resource based on multiple preset theme types. Then, it automatically disassembles and breaks down the sub-resources corresponding to each theme type in the first resource. Theme types can include element-sharing, simple image, one-shot, data type, and other types. When the theme type is element-sharing, the corresponding sub-resource is the target object; when the theme type is data type, the corresponding sub-resource is characters; when the theme type is one-shot, the corresponding sub-resource is a video clip; the simple image type has no corresponding sub-resources; and when the theme type is other types, the corresponding sub-resources can be video clips or video frame images different from those of the one-shot type.

[0134] For example, when the first resource is an image, automated analysis can be artificial intelligence (AI) image automated analysis. It can determine the target object and / or character in the image by using at least one of the following features: sharpness, color, brightness, contrast, size, position, shape, texture, and deep learning features. For example, a mobile phone can identify the area in the image with a sharpness greater than a corresponding preset threshold as the foreground area. Within the foreground area, it can identify the obvious target object by identifying the area with a contrast greater than the corresponding preset threshold. Then, it can use AI image automated decomposition to cut out the target object in the image. The mobile phone can also extract the deep learning features in the image to determine the character in the image and use AI image automated decomposition to obtain the character in the image.

[0135] For example, when the primary resource is video, automated analysis can be AI-powered video analysis. A mobile phone can determine video segments based on keyframes and duration within the video, and then extract these segments using AI-driven video decomposition. Assuming a single transition video is less than 1.2 seconds long, the phone can perform loop matching within the video. Taking one keyframe per second within 1.2 seconds as an example, if the phone determines that there are more than two keyframes within the current 1.2 seconds, it indicates a significant change in the video frame images within that timeframe. The segment within that 1.2 seconds is then identified as a single transition video. Furthermore, the AI-driven video decomposition method is used to trim each transition video segment according to its corresponding keyframe, yielding the video segments.

[0136] The script file is used to generate theme pages by combining sub-resources.

[0137] For example, the script file can be in JSON format, and the script file includes code for triggering logic, code for executing content, and code for rendering content.

[0138] For example, when the theme type is a one-shot sequence, the script file corresponding to the one-shot sequence type can be like this: Figure 7 As shown, the triggering logic EventTriger includes the trigger name "Aod2Lock" for triggering event 1 (the phone screen state changes from AOD to lock screen state) and the execution name "OneShotAodLock" for the corresponding execution content storyBoard. The trigger name "Lock2Home" for triggering event 2 (the phone screen state changes from lock screen state to desktop state) and the execution name "OneShotLockHome" for the corresponding execution content storyBoard. The execution content StoryBoard includes the execution name "OneShotAodLock" and the corresponding resource name "aod2lock.mp4", the execution name "OneShotLockHome" and the corresponding resource name "lock2home.mp4". The rendering content includes the settings of some rendering-required attributes, such as whether a background is required (isBackground is set to true if no background is required), and the settings of the rendering height and width. Therefore, when the phone screen switches from AOD state to lock screen state, the phone uses the sub-resource named "aod2 lock.mp4" for rendering, and when the phone screen switches from lock screen state to desktop state, the phone uses the sub-resource named "lock2home.mp4" for rendering.

[0139] For example, for each theme type corresponding to a sub-resource, the mobile phone can package the script file, the first resource, and the sub-resources corresponding to that theme type into a theme package. For example, Figure 8As shown, the theme types corresponding to the first resource include element sharing, simple image, one-shot, data type, and other types. The sub-resource for the element sharing type is the target object. The target object, the script file corresponding to the element sharing type, and the image (the first resource is an image) are packaged together to obtain the theme package corresponding to the element sharing type. The sub-resource for the data type is characters. The characters, the script file corresponding to the data type, and the image (the first resource is an image) / the video frame image containing the characters (the first resource is video) are packaged together to obtain the theme package corresponding to the data type. The simple image type has no corresponding sub-resource. The script file corresponding to the simple image type and the image (the first resource is a video) are packaged together to obtain the theme package corresponding to the simple image type. The following methods are used to package the script files and video clips for different types of content: First, package the script files and video clips (the first resource being video) for one-shot videos. Second, package the script files and video clips (the first resource being video) for one-shot videos. Third, package the script files and video clips for other types of content (the first resource being video) for one-shot videos.

[0140] For example, during the execution of the script file in the theme package, the mobile phone can fill in the name of the first resource and the name of the corresponding sub-resource into the corresponding position in the script file to generate the theme page corresponding to that theme type. The collection of theme pages for each type of that theme type (any one of AOD state, lock screen state, or show desktop state) is taken as the theme corresponding to that theme type. For example, the theme corresponding to the one-shot type can be as follows: Figure 9 As shown.

[0141] For example, the sub-resource is the target object, which is a cow in an image. The theme type corresponding to the cow is the element sharing type. The mobile phone obtains the script file corresponding to the element sharing type, packages the image, the cow, and the script file together, and associates the script file with the image and the cow to obtain the theme package corresponding to the element sharing type. The mobile phone executes the script file in the theme package. During execution, the name of the image or the name of the cow is entered in the corresponding position in the script file to display the theme page corresponding to the element sharing type.

[0142] For example, a sub-resource consists of two video clips, namely the first video clip and the second video clip from a video. The theme type corresponding to the two video clips is "one-shot" or "through-the-scenes". The mobile phone obtains the script file corresponding to the "one-shot" or "through-the-scenes" theme, packages the first video clip, the second video clip, and the script file together, and associates the script file with the first and second video clips to obtain a theme package corresponding to the "one-shot" or "through-the-scenes" theme. The mobile phone executes the script file in the theme package. During execution, the names of the first video clip and / or the second video clip are entered at the corresponding positions in the script file to display the theme page corresponding to the "one-shot" or "through-the-scenes" theme.

[0143] For example, if the sub-resource is a character, and the character is weather data, the theme type corresponding to the weather data is a data type. The mobile phone obtains the script file corresponding to the data type, packages the first resource (which can be an image or a video frame), the weather data, and the script file together, so as to associate the script file with the first resource and the weather data, and obtain the theme package corresponding to the data type. The mobile phone executes the script file in the theme package. During the execution, the name of the first resource or the name of the weather data is filled in at the corresponding position in the script file so as to display the theme page corresponding to the data type. The weather data in the displayed theme page can be edited by the user.

[0144] As can be seen, mobile phones can automatically generate corresponding theme packages based on sub-resources and corresponding script files. Different theme packages can be generated through different types of sub-resources, which lowers the threshold for theme creation and improves the efficiency and convenience of theme creation.

[0145] S403, The phone displays a preview image corresponding to at least one theme.

[0146] The preview images include any one of the theme pages from at least one theme.

[0147] For example, after the mobile phone obtains at least one theme corresponding to the first resource, the mobile phone displays a preview image corresponding to at least one theme.

[0148] For example, for each theme, any theme page displayed in the preview image corresponding to that theme can be any type of theme page corresponding to that theme, or it can be a carousel of multiple types of theme pages corresponding to that theme. For instance, the preview image corresponding to that theme can only display the theme page in the lock screen state, or it can display a carousel of the theme page in the AOD state, the theme page in the lock screen state, and the theme page in the desktop state.

[0149] The above-mentioned theme preview method can display preview images of each theme corresponding to the resources uploaded by users, which lowers the threshold for theme creation, increases the diversity of theme previews, meets users' needs for personalized themes, and allows users to intuitively see the actual effect of each theme generated by the phone. This ensures that the theme selected by the user matches their personal preferences and aesthetic expectations, avoids the situation of being dissatisfied only after application, reduces the number of frequent changes, improves the success rate of theme application, and enhances the user experience.

[0150] In some embodiments, preview images corresponding to multiple themes are displayed in a preset order, which is determined based on the matching degree between the first resource and the multiple themes corresponding to the first resource.

[0151] For example, a mobile phone can determine the matching degree between the first resource and each of the multiple topics corresponding to the first resource based on at least one sub-resource of the first resource.

[0152] For example, if the first resource is an image, the matching degree between the first resource and at least one topic corresponding to the image is higher than the matching degree between the first resource and at least one topic corresponding to the video. The mobile phone can obtain at least one topic with a matching degree greater than a first preset matching threshold from the matching degree between the first resource and at least one topic corresponding to the image, or it can obtain at least one topic with a matching degree greater than a second preset matching threshold from the matching degree between the first resource and each preset topic. The first preset matching threshold and the second preset matching threshold can be the same or different. Similarly, if the first resource is a video, the matching degree between the first resource and at least one topic corresponding to the video is higher than the matching degree between the first resource and at least one topic corresponding to the image. The mobile phone can obtain at least one topic with a matching degree greater than a first preset matching threshold from the matching degree between the first resource and at least one topic corresponding to the video, or it can obtain at least one topic with a matching degree greater than a second preset matching threshold from the matching degree between the first resource and each preset topic.

[0153] For example, after determining that the first resource is an image, the mobile phone can obtain the matching degree of at least one sub-resource with at least one theme corresponding to the image based on at least one sub-resource in the first resource. For example, when the mobile phone determines that multiple sub-resources are target objects and characters, the theme corresponding to the target object (which can also be the shared element type in the above example) has the highest matching degree with the first resource, followed by the theme corresponding to the character (which can also be the data type in the above example), and finally the theme corresponding to the simple image. If there is no target object in the first resource, and if there is a sub-resource that is a character, the theme corresponding to the data type has the highest matching degree, followed by the theme corresponding to the simple image. The mobile phone can also obtain the matching degree of at least one sub-resource with at least one theme corresponding to the video based on at least one sub-resource in the first resource. For example, when the mobile phone determines that the sub-resource includes a first video clip and a second video clip, the theme corresponding to the two video clips (which can also be the one-shot type in the above example) has the highest matching degree with the first resource, followed by other types.

[0154] As can be seen, by sorting the themes corresponding to the first resource by matching degree, the preview pages of each theme corresponding to the first resource can be displayed in that order, and the preview page of the theme with the best matching effect can be displayed first, thereby improving the success rate of theme application and user experience.

[0155] In some embodiments, after a preview image corresponding to at least one theme is displayed on the mobile phone screen, the mobile phone responds to the user's selection operation on the first preview image by setting multiple theme pages in the theme corresponding to the first preview image as the pages displayed when the mobile phone screen is in the corresponding state.

[0156] For example, the preview image corresponding to at least one theme includes a first preview image, and the theme corresponding to the first preview image includes at least two of a first theme page, a second theme page, or a third theme page; the first theme page is used to represent the page displayed when the screen is in AOD state, the second theme page is used to represent the page displayed when the screen is in lock screen state, and the third theme page is used to represent the page displayed when the screen is in desktop display state.

[0157] For example, in the preview images corresponding to each theme, users can preview each preview image by swiping up and down or left and right on the current phone screen. If the phone screen also displays the theme type corresponding to each preview image, users can also preview each preview image by swiping up and down or left and right on the theme type, or they can click on a theme type to view the corresponding preview image. For example, Figure 9As shown, users can view the preview image of the next theme by swiping left with finger ① on the phone screen, or by swiping left with finger ②.

[0158] For example, a user's selection of the first preview image among the preview images corresponding to each theme can be a click on the first preview image, a click on the theme type corresponding to the first preview image, or a selection of the first preview image or its corresponding theme type followed by clicking on a corresponding control (e.g., an "Apply" control). For instance, if the preview images for each theme are displayed in a carousel format showing multiple theme pages within that theme, the application of a theme can be done as follows: Figure 10 As shown, users can apply Theme 1 by tapping Theme 1 with finger ③, or by tapping the preview image of Theme 1 with finger ④. Alternatively, users can first select Theme 1 by tapping Theme 1 with finger ③ or the preview image of Theme 1 with finger ④, and then apply Theme 1 by tapping the "Apply" control with finger ⑤. This allows users to set the various theme pages in Theme 1 to be displayed on the phone screen in the corresponding state.

[0159] In some embodiments, when the mobile phone responds to the user's selection operation on the first preview image and sets multiple theme pages in the theme corresponding to the first preview image as the pages displayed when the mobile phone screen is in the corresponding state, the mobile phone may also respond to the user's selection operation on the first preview image and display the preview page of the theme corresponding to the first preview image. Then, in response to the user's selection operation on the preview page for the theme corresponding to the first preview image, the mobile phone sets multiple theme pages in the theme corresponding to the first preview image as the pages displayed when the screen is in the corresponding state.

[0160] For example, the preview page includes at least one theme page from the themes corresponding to the first preview image.

[0161] For example, the selection operation of the theme corresponding to the first preview image can be a user's click operation on the theme corresponding to the first preview image, or a click operation on the "Apply" control in the preview page.

[0162] For example, if a user selects the preview image corresponding to theme 1 (assuming it's a shared element type) as the first preview image for each theme, the preview page displayed on the phone will look like this: Figure 11As shown, the preview page displays theme pages corresponding to the shared element type (theme pages in AOD state and theme pages in lock screen state). Users can also swipe left to display the theme page corresponding to the shared element type in desktop state. Users can click the "Apply" control or the title control of the displayed shared element type on the preview page to apply the theme corresponding to that shared element type.

[0163] As can be seen, users can preview the effects of different themes on the preview page and choose a theme they want to use, which improves the convenience and satisfaction of users when applying themes.

[0164] In some embodiments, where the first resource is an image and the sub-resource is a target object in the image, only the target object in the image is displayed on the first topic page, while the second topic page and / or the third topic page display the first resource.

[0165] For example, if the sub-resource is the target object in the image, the phone can display only the target object in the image in AOD mode and display the image in lock screen mode; or, the phone can display only the target object in the image in AOD mode and display the image in desktop mode; or, the phone can display only the target object in the image in AOD mode and display the image in both lock screen mode and desktop mode.

[0166] For example, when a phone applies a theme of the shared element type, the phone will execute the script file in the theme package corresponding to the shared element type again. During execution, the phone references the name of an image or the name of a target object in the theme package at the corresponding location in the script file, so that the display on the phone screen in the corresponding state is replaced with that image or target object. For example, if a user uploads an image where the foreground shows a person holding a bicycle on a grassy slope and the background shows a passerby running on the grassy slope, and the user selects the element-sharing type of theme and the target object is a person holding a bicycle, the display on the phone screen in different states will be as follows: Figure 12 As shown, when the phone screen is in AOD (Always On Demand) mode, the first theme page, which is the target object (a person holding a bicycle), is displayed. When the screen is locked or the desktop is displayed, the image is displayed.

[0167] As can be seen, by using user-uploaded images, the target object and the image in the image are displayed as the phone screen in different states, so that when the phone screen state is changed later, the transition between the target object and the image can be realized. This improves the diversity of page display and the user's visual experience, and meets the user's demand for personalized themes.

[0168] In some embodiments, where the first resource is a video and the sub-resources include a first video segment and a second video segment, the first theme page displays the first frame of the first video segment, the second theme page displays the last frame of the first video segment or the first frame of the second video segment, and the third theme page displays the last frame of the second video segment.

[0169] For example, the first frame refers to the first frame of a video clip. In some cases, if the first frame starts from frame zero, then the first frame is the zeroth frame. Similarly, the last frame is the last frame of a video clip.

[0170] For example, such as Figure 13 As shown, the phone screen displays the first frame of the first video clip in AOD mode, which is an image of a person running on a distant hillside. The phone can also respond to the user's operation of changing the phone screen from AOD mode to lock screen mode. That is, during the process of switching the phone screen from AOD mode to lock screen mode, the first video clip is played on the phone screen. The first video clip is a clip of a person running on a distant hillside to the middle of the hillside. After the first video clip finishes playing, the last frame of the first video clip (the second theme page) is displayed on the phone screen, and the phone screen becomes lock screen mode. The last frame of the first video clip is an image of a person running in the middle of the hillside.

[0171] For example, such as Figure 13 As shown, the phone can also respond to the user's operation of changing the phone screen from the lock screen state to the desktop state. That is, during the process of the phone screen switching from the lock screen state to the desktop state, a second video clip is played on the phone screen. The second video clip is a clip of a person running from the middle of a hillside to the nearest hillside position. After the second video clip finishes playing, the last frame of the second video clip (the third theme page) is displayed on the phone screen, and the phone screen changes to the desktop state. The last frame of the second video clip is an image of the person running at the nearest hillside position.

[0172] For example, in response to the user's operation of changing the phone screen from AOD state to desktop state, that is, during the process of the phone screen switching from AOD state to desktop state, the first video clip and the second video clip are played on the phone screen. After the second video clip finishes playing, the last frame image (third theme page) of the second video clip is displayed on the phone screen, and the phone screen changes to desktop state.

[0173] For example, the mobile phone can also respond to the user's operation of changing the mobile phone screen from the desktop display state to the AOD state. That is, during the process of the mobile phone screen switching from the desktop display state to the AOD state, the second video clip and the first video clip are played in reverse on the mobile phone screen. After the first video clip finishes playing in reverse, the first frame image (first theme page) of the first video clip is displayed on the mobile phone screen, and the mobile phone screen changes to the AOD state.

[0174] For example, the mobile phone can also respond to the user's operation of changing the mobile phone screen from displaying the desktop state to the lock screen state. That is, during the process of the mobile phone screen switching from displaying the desktop state to the lock screen state, the second video clip is played in reverse on the mobile phone screen. After the second video clip finishes playing in reverse, the first frame image (second theme page) of the second video clip is displayed on the mobile phone screen, and the mobile phone screen becomes the lock screen state.

[0175] For example, the mobile phone can also respond to the user's operation of changing the mobile phone screen from the lock screen state to the AOD state. That is, during the process of the mobile phone screen switching from the lock screen state to the AOD state, the first video clip is played in reverse on the mobile phone screen. After the first video clip finishes playing in reverse, the first frame image (first theme page) of the first video clip is displayed on the mobile phone screen, and the mobile phone screen changes to the AOD state.

[0176] For example, the first video clip and the second video clip can be different video clips or the same video clip. The similarity between the last frame of the first video clip and the first frame of the second video clip is within a preset range, so that the video seen by the user when switching screen states has continuity, improving the user's viewing experience.

[0177] It is evident that creating corresponding themes based on user-uploaded videos lowers the barrier to video theme creation, satisfies users' viewing experience when switching mobile phone screen states, increases visual impact, and improves users' visual experience.

[0178] In some embodiments, when the sub-resource is a character, the first resource with the updated character is displayed on at least two of the first theme page, the second theme page, or the third theme page.

[0179] For example, a sub-resource can be characters in an image or characters in a video frame.

[0180] For example, when one of the sub-resources in the first resource is a character, the character in the first resource is editable. Users can modify the character before application, or associate the character with third-party application software (such as weather application software or location application software) so as to update periodically and dynamically. The updated first resource is displayed when the mobile phone screen is in the locked state or in the desktop state.

[0181] For example, when the characters are weather data or geographic location data, users can associate the weather data with weather apps and the geographic location data with location apps. The phone can replace the weather data in the first resource with the current weather data in the weather app (e.g., dynamically refreshed every minute / hour), and the phone can replace the geographic location data in the first resource with the phone's current location data in the location app (e.g., dynamically refreshed every 12 hours).

[0182] As can be seen, users can adjust the characters in images / videos according to their needs and preferences, which improves the flexibility of theme creation. In addition, updating the characters can improve the accuracy and timeliness of image content, thereby increasing user satisfaction with personalized themes.

[0183] In some embodiments, when the user selects a simple image type as the theme type, the simple image type can be a theme type where the first resource is an image and does not contain any target objects or characters. When the phone screen is in any of the following states: locked screen, AOD (Always On Demand) state, or desktop display state, the first resource is displayed on the phone screen. Therefore, user-uploaded images can also be directly displayed as wallpapers, meeting different user needs for image display and improving user satisfaction.

[0184] In some embodiments, when the user selects another theme type, this other type can be a theme where the first resource is a video and the video does not contain more than two transition videos. This can involve using several video clips as transitions between different screen states, using several video frames as displays for different screen states, or combining at least one video clip and at least one video frame as displays for different screen states. Therefore, user-uploaded videos can generate a variety of different themes, increasing the diversity of video themes and the success rate of theme application, thus improving the user experience.

[0185] Example 2

[0186] See Figure 14 As shown, the topic generation method described above may include the following steps S1401-S1403.

[0187] S1401: The mobile phone responds to the user's first operation and obtains the first resource.

[0188] The primary resource is either an image or a video.

[0189] For example, the first operation is either the user uploading a first resource or the user selecting a first resource from the album.

[0190] S1402. The mobile phone displays at least one theme page corresponding to the first resource based on the first resource.

[0191] In this case, the content of the first resource displayed on multiple theme pages within at least one theme page is different.

[0192] For example, the types of at least one theme page corresponding to the first displayed resource can be the same or different. The type of theme page is related to the screen state of the mobile phone. For example, the type of theme page can be the type corresponding to any of the states of AOD, lock screen, or desktop display. A theme page is any type of theme page corresponding to a theme type. The theme type can include element sharing type, simple image type, one-shot type, data type, and other types. Each theme page in the at least one theme page displayed on the mobile phone corresponds to a different theme type.

[0193] For example, the phone has three pre-set theme types, each corresponding to a theme page in the lock screen state. The phone can generate the corresponding lock screen theme page for each theme type based on the first resource uploaded by the user, and then preview and display the three lock screen theme pages corresponding to the first resource.

[0194] For example, when generating the theme page for the lock screen state corresponding to the first resource under each theme type, the phone can execute only the part of the script file for each theme type corresponding to the lock screen state, thereby generating the theme page for each theme type under the lock screen state.

[0195] S1403, The mobile phone responds to the selection operation of the target theme page and generates the theme corresponding to the target theme page.

[0196] At least one topic page includes the target topic page.

[0197] For example, such as Figure 14As shown, the selection operation of the target theme page can be a user's finger ① clicking on the target theme page, a user's finger ② clicking on the theme type corresponding to the target theme page, or a user selecting the target theme page or the theme type corresponding to the target theme page and then clicking on the corresponding control (such as the "Create Theme" control) with finger ③.

[0198] In some possible implementations, when the mobile phone generates the theme corresponding to the target theme page, firstly, the mobile phone obtains the sub-resources in the first resource corresponding to the target theme page; then, the mobile phone obtains the script file corresponding to the target theme page; secondly, the mobile phone generates the theme package corresponding to the target theme page based on the sub-resources and the script file; and finally, the mobile phone generates the theme corresponding to the target theme page based on the theme package.

[0199] Among them, sub-resources refer to any one of the target objects, characters, and video clips in the first resource; the target objects are at least one of people, animals, buildings, or objects; and the characters are at least one of numbers or text.

[0200] For example, a mobile phone can obtain the theme type corresponding to the target theme page, determine the script file and sub-resources corresponding to the theme type, and then generate the theme package corresponding to the theme type. After executing the theme package, the theme corresponding to the target theme page is generated.

[0201] For example, if the first resource is an image, and the theme type corresponding to the target theme page is the element-sharing type, obtain the script file corresponding to the element-sharing type. The sub-resources of the element-sharing type are the target objects in the image. Extract the target objects from the image and name them to obtain their names. Fill the names of the target objects and the image into the corresponding positions in the script file, update the script file, and package the updated script file, target objects, and images to obtain the theme package. Execute the theme package to generate the theme corresponding to the target theme page, which includes three types of theme pages: mobile AOD state, lock screen state, and desktop display state.

[0202] As can be seen, the mobile phone can obtain the sub-resources and script files corresponding to the target theme page selected by the user, thereby generating the theme package corresponding to the target theme page and obtaining the theme corresponding to the target theme. This lowers the threshold for users to create themes, increases the theme generation speed, and the method of previewing before generating the theme can increase the application rate of the generated theme, thereby improving the user experience.

[0203] In some possible implementations, after the mobile phone generates the theme corresponding to the target theme page, the mobile phone can display each type of theme page included in the generated theme, so that users can understand the preview effect of the selected theme in different states on the mobile phone screen, thereby improving the user experience.

[0204] In some possible implementations, after the phone generates the theme corresponding to the target theme page, it can set each of the various theme pages included in the generated theme as the page displayed in the corresponding screen state. Therefore, the phone can directly apply the theme after generation, simplifying the preview of each type of theme page and improving the efficiency of theme application.

[0205] For example, the method by which the mobile phone applies the theme after generating the theme is similar to the method described above for setting multiple theme pages in the theme corresponding to the first preview image as the pages displayed when the screen is in the corresponding state, and will not be repeated here.

[0206] In the above-described theme generation method, the mobile phone first displays at least one theme page corresponding to the uploaded resource, and then generates only the theme corresponding to the theme page selected by the user from the at least one theme page. This reduces unnecessary theme generation steps, lowers the power consumption of the mobile phone in generating themes, thereby improving the efficiency of the mobile phone in generating themes that meet user needs, satisfying users' needs for generating personalized themes, and improving the user experience.

[0207] It is understood that, in order to achieve the above functions, the aforementioned electronic device includes hardware and / or software modules corresponding to perform each function. Based on the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware 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 in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0208] This application embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0209] This application also provides an electronic device, such as... Figure 15As shown, the electronic device may include one or more processors 1501, memory 1502 and communication interface 1503.

[0210] The memory 1502, communication interface 1503, and processor 1501 are coupled together. For example, the memory 1502, communication interface 1503, and processor 1501 can be coupled together via bus 1504.

[0211] The communication interface 1503 is used for data transmission with other devices. The memory 1502 stores computer program code. The computer program code includes computer instructions, which, when executed by the processor 1501, cause the electronic device to perform the theme preview method or theme generation method as described in this application.

[0212] The processor 1501 may be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0213] The bus 1504 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1504 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 15 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0214] This application also provides a computer-readable storage medium storing computer program code. When the processor executes the computer program code, the electronic device executes the relevant method steps in the above method embodiments.

[0215] The electronic devices and computer storage media provided in this application are used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0216] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0217] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0218] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0219] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0220] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0221] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for previewing a theme, the method comprising: The method comprises: in response to a first operation of a user, obtaining a first resource; the first resource is a picture or a video; generating at least one theme corresponding to the first resource according to the first resource; one of the at least one theme includes at least one type of theme page, and the contents of the first resource displayed on the theme pages of the same type are different among the multiple themes in the at least one theme; displaying preview images corresponding to the at least one theme, wherein the preview images include any one of the theme pages in the at least one theme.

2. The method of claim 1, wherein, The generating of the at least one theme corresponding to the first resource comprises: obtaining at least one sub-resource in the first resource; the sub-resource represents any one of the contents in the first resource, such as a target object, a character, or a video segment; the target object is at least one of a person, an animal, a building, or an object; the character is at least one of a number or a letter; for one of the at least one sub-resource, obtaining a script file corresponding to the sub-resource; the script file is used to generate a theme page in combination with the sub-resource; generating a theme package corresponding to the sub-resource according to the sub-resource and the script file; generating a theme including at least one type of theme page corresponding to the sub-resource according to the theme package.

3. The method according to claim 1 or 2, characterized in that, The preview images corresponding to the multiple themes are displayed in a preset order; the preset order is determined according to the matching degrees of the first resource and the multiple themes corresponding to the first resource.

4. The method of claim 2, wherein, The first preview image is included in the preview images corresponding to the at least one theme, and the theme corresponding to the first preview image includes at least two of a first theme page, a second theme page, or a third theme page; the first theme page is used to represent a page displayed when a screen is in an AOD state, the second theme page is used to represent a page displayed when the screen is in a lock screen state, and the third theme page is used to represent a page displayed when the screen is in a desktop display state. After the display of the preview images corresponding to the at least one theme, the method further comprises: in response to a selection operation of the first preview image by the user, setting multiple theme pages in the theme corresponding to the first preview image as pages displayed when a screen is in corresponding states, respectively.

5. The method of claim 4, wherein, The setting of the multiple theme pages in the theme corresponding to the first preview image as the pages displayed when the screen is in the corresponding states, respectively, in response to the selection operation of the first preview image by the user, comprises: in response to the selection operation of the first preview image by the user, displaying a preview page of the theme corresponding to the first preview image; the preview page includes at least one theme page in the theme corresponding to the first preview image; in response to a selection operation of the theme corresponding to the first preview image by the user in the preview page, setting multiple theme pages in the theme corresponding to the first preview image as pages displayed when a screen is in corresponding states, respectively.

6. The method according to claim 4 or 5, characterized in that, In a case where the first resource is a picture and the sub-resource is a target object in the picture, only the target object in the picture is displayed on the first theme page, and the second theme page and / or the third theme page displays the first resource.

7. The method according to any one of claims 4-5, characterized in that, In a case where the first resource is a video and the sub-resource includes a first video clip and a second video clip in the video, a first frame image of the first video clip is displayed on the first theme page, a last frame image of the first video clip or a first frame image of the second video clip is displayed on the second theme page, and a last frame image of the second video clip is displayed on the third theme page.

8. The method of claim 7, wherein, The first video clip and the second video clip are played during switching of the screen from the AOD state to a desktop display state.

9. The method according to claim 7 or 8, characterized in that, The second video clip is played in reverse during switching of the screen from the desktop display state to a lock screen state.

10. The method according to any one of claims 7-9, characterized in that, The last frame image of the first video clip and the first frame image of the second video clip have a similarity within a preset range.

11. The method according to any one of claims 4-10, characterized in that, In a case where the sub-resource is a character, the first resource after the character is updated is displayed on at least two of the first theme page, the second theme page, and the third theme page.

12. The method according to any one of claims 1 to 11, characterized in that, The first operation is an operation of uploading the first resource by the user or an operation of selecting the first resource in an album by the user.

13. A theme generation method characterized by comprising: The method comprises: In response to a first operation of the user, a first resource is acquired; The first resource is a picture or a video; According to the first resource, at least one theme page corresponding to the first resource is displayed; contents of the first resource displayed on multiple theme pages of the at least one theme page are different; In response to a selection operation on a target theme page, a theme corresponding to the target theme page is generated, wherein the at least one theme page includes the target theme page.

14. The method of claim 13, wherein, The generation of the theme corresponding to the target theme page comprises: A sub-resource in the first resource corresponding to the target theme page is acquired; the sub-resource represents any one of a target object, a character, and a video clip in the first resource; the target object is at least one of a person, an animal, a building, or an object; the character is at least one of a number or a character; A script file corresponding to the target theme page is acquired; According to the sub-resource and the script file, a theme package corresponding to the target theme page is generated; According to the theme package, the theme corresponding to the target theme page is generated.

15. An electronic device, comprising: An electronic device comprises a memory and one or more processors; the memory is coupled to the processors; the memory stores computer program codes including computer instructions, when the computer instructions are executed by the processors, the electronic device performs the theme preview method according to any one of claims 1-12 or the theme generation method according to any one of claims 13-14.

16. A computer readable storage medium characterized by Computer program product comprising computer instructions which, when the computer program product is run on an electronic device, cause the electronic device to perform the theme preview method according to any one of claims 1-12, or the theme generation method according to any one of claims 13-14.

17. A computer program product, characterised in that, Computer program product which, when run on an electronic device, causes the electronic device to perform the theme preview method according to any one of claims 1-12, or the theme generation method according to any one of claims 13-14.