CN111240777A - Dynamic wallpaper generation method and device, storage medium and electronic equipment - Google Patents

Dynamic wallpaper generation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111240777A
CN111240777A CN201911421652.1A CN201911421652A CN111240777A CN 111240777 A CN111240777 A CN 111240777A CN 201911421652 A CN201911421652 A CN 201911421652A CN 111240777 A CN111240777 A CN 111240777A
Authority
CN
China
Prior art keywords
dynamic
resource data
display
wallpaper
dynamic resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911421652.1A
Other languages
Chinese (zh)
Other versions
CN111240777B (en
Inventor
邓楚坤
付光鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201911421652.1A priority Critical patent/CN111240777B/en
Publication of CN111240777A publication Critical patent/CN111240777A/en
Application granted granted Critical
Publication of CN111240777B publication Critical patent/CN111240777B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The embodiment of the application discloses a dynamic wallpaper generation method, a dynamic wallpaper generation device, a storage medium and electronic equipment, wherein dynamic resource data set by a user are determined; acquiring setting information input by a user, and determining the display hierarchy, static display information and dynamic display information of dynamic resource data according to the setting information; determining a display order of the plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data; generating an animation script file according to the display sequence, the static display information and the dynamic display information of each dynamic resource data; determining first attribute information of each dynamic resource data and second attribute information of the animation script file, and generating a configuration file according to the second attribute information and the plurality of first attributes; and packaging the plurality of dynamic resource data, the animation script files and the configuration files to generate dynamic wallpaper resource files, so that the generation of dynamic wallpaper based on local resources is realized.

Description

Dynamic wallpaper generation method and device, storage medium and electronic equipment
Technical Field
The application relates to the technical field of terminals, in particular to a dynamic wallpaper generation method and device, a storage medium and electronic equipment.
Background
The wallpaper of the electronic device can be divided into dynamic wallpaper and static wallpaper according to the expression form of the wallpaper, wherein the static wallpaper refers to a picture which is used as a background picture of the wallpaper and is static, and the dynamic wallpaper is wallpaper with a dynamic display effect. Most of the existing dynamic wallpapers exist in the form of a single program, and a user can only use the dynamic wallpaper provided by the system or download the dynamic wallpaper from a theme store for installation, but cannot generate the dynamic wallpaper according to local resources.
Disclosure of Invention
The embodiment of the application provides a dynamic wallpaper generation method and device, a storage medium and electronic equipment, which can realize the generation of dynamic wallpaper based on local resources.
In a first aspect, an embodiment of the present application provides a dynamic wallpaper generation method, including:
determining dynamic resource data set by a user;
acquiring setting information input by a user, and determining the display hierarchy, static display information and dynamic display information of the dynamic resource data according to the setting information;
determining a display order of the plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data;
generating an animation script file according to the display sequence, the static display information and the dynamic display information of each dynamic resource data;
determining first attribute information of each dynamic resource data and second attribute information of the animation script file, and generating a configuration file according to the second attribute information and the plurality of first attribute information;
and packaging the plurality of dynamic resource data, the animation script files and the configuration files to generate dynamic wallpaper resource files.
In a second aspect, an embodiment of the present application further provides a dynamic wallpaper generation apparatus, including:
the resource determining unit is used for determining dynamic resource data set by a user;
the information acquisition unit is used for acquiring setting information input by a user and determining the display hierarchy, the static display information and the dynamic display information of the dynamic resource data according to the setting information;
a resource ordering unit, configured to determine a display order of the plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data;
the script compiling unit is used for generating an animation script file according to the display sequence, the static display information and the dynamic display information of each dynamic resource data;
a configuration determining unit, configured to determine first attribute information of each piece of dynamic resource data and second attribute information of the animation script file, and generate a configuration file according to the second attribute information and the plurality of pieces of first attribute information;
and the wallpaper generation unit is used for packaging the dynamic resource data, the animation script file and the configuration file to generate a dynamic wallpaper resource file.
In a third aspect, an embodiment of the present application further provides a storage medium, on which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the dynamic wallpaper generation method provided in any embodiment of the present application.
In a fourth aspect, an embodiment of the present application further provides an electronic device, which includes a processor and a memory, where the memory has a computer program, and the processor is configured to execute the dynamic wallpaper generation method provided in any embodiment of the present application by calling the computer program.
The technical scheme provided by the embodiment of the application determines dynamic resource data set by a user and setting information input by the user, determines the display hierarchy, static display information and dynamic display information of the dynamic resource data according to the setting, determines the display sequence of a plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data, generates an animation script file according to the display sequence and the static display information and the dynamic display information of each dynamic resource data, determines first attribute information of each dynamic resource data and second attribute information of the animation script file, generates a configuration file by combining the plurality of second attribute information and the first attribute information, packages the dynamic resource data, the animation script file and the configuration file to generate a dynamic wallpaper resource file, and generates the dynamic wallpaper resource file based on the dynamic wallpaper resource file when the user needs to create the dynamic wallpaper according to the local dynamic resource data, the local dynamic resource data to be used can be determined according to the process, the related parameter information is set, and then the data are correspondingly processed, so that the dynamic wallpaper resource file can be generated for setting the dynamic wallpaper, and the generation of the dynamic wallpaper based on the local resource is realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a first flowchart of a dynamic wallpaper generation method according to an embodiment of the present application.
Fig. 2 is a schematic view of a dynamic wallpaper creation interface of a dynamic wallpaper generation method according to an embodiment of the present application.
Fig. 3 is a system framework diagram of a dynamic wallpaper generation method according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a dynamic wallpaper generation apparatus according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a first electronic device according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a second electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below clearly and completely with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without any inventive effort, are intended to be covered by the present application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
An execution main body of the dynamic wallpaper generation method may be the dynamic wallpaper generation device provided in the embodiment of the present application, or an electronic device integrated with the dynamic wallpaper generation device, where the dynamic wallpaper generation device may be implemented in a hardware or software manner. The electronic device may be a smart phone, a tablet computer, a palm computer, a notebook computer, or a desktop computer.
Referring to fig. 1, fig. 1 is a first flowchart illustrating a dynamic wallpaper generation method according to an embodiment of the present application. The specific process of the dynamic wallpaper generation method provided by the embodiment of the application can be as follows:
101. and determining the dynamic resource data set by the user.
An electronic device user is provided with functionality for dynamic wallpaper generation, based on which the user may select dynamic resource data local to the electronic device to create a personalized dynamic wallpaper. For example, a user may trigger a dynamic wallpaper creation instruction based on a dynamic wallpaper creation control, which when received by the electronic device, displays a dynamic wallpaper creation interface. The user may set dynamic resource data based on the dynamic wallpaper creation interface and configure relevant parameters for the dynamic resource data.
102. And acquiring setting information input by a user, and determining the display hierarchy, the static display information and the dynamic display information of the dynamic resource data according to the setting information.
Referring to fig. 2, fig. 2 is a schematic diagram of a dynamic wallpaper creation interface in a dynamic wallpaper generation method according to an embodiment of the present application.
The user can select local dynamic resource data according to the corresponding control on the dynamic wallpaper creating interface. The dynamic resource data may be a dynamic picture (e.g., a Gif graph), a video, a sequence of frames, a still image, or the like. After determining the dynamic resource data set by the user, the user can set relevant parameters including display hierarchy, static display information and dynamic display information for the dynamic resource data based on the dynamic wallpaper creation interface. The display level is used for representing the level of the dynamic resource data in the whole dynamic wallpaper, the dynamic resource data with the high display level is displayed on the dynamic data with the low display level, and the dynamic resource data with the high display level is displayed on the bottom layer as the level is lower. For example, if the user uploads three frames of images with different sizes as three pieces of dynamic resource data and sets the levels of the three frames of images to 1, 2, and 3, respectively, the image at level 3 is displayed on the image at level 2, and the image at level 2 is displayed on the image at level 1 in the finally generated dynamic wallpaper.
The static display data is used for defining a display mode of the dynamic resource data in the display interface in the initial state, and the static display data may include parameters such as position coordinates, a rotation angle and display transparency. The dynamic display data is used to define a dynamic display mode of the dynamic resource data, for example, a static picture, and assuming that a certain dynamic resource data is a static image, the dynamic display data may include animation parameters, such as displacement information, an attribute change interval, and a rotation angle interval, where the attribute change interval may be a transparency change interval.
In addition, in some embodiments, the dynamic display parameters may also include an interface switch parameter that defines the timing of animation execution, for example, "always display", or "back to desktop view from application," or "back to desktop view from lock screen," or "bright screen," or "slide desktop," or "touch event," etc.
The electronic device comprises a dynamic resource creation interface, a display interface and a dynamic resource data adding interface, wherein the dynamic resource creation interface is also provided with a control for adding new dynamic resource data, a user can trigger a dynamic resource data adding instruction based on the control to set a plurality of dynamic resource data, and after receiving the dynamic resource data adding instruction, the electronic device adds a new dynamic data creation interface on the display interface. The scheme of the embodiment of the application can support the user to add one or more dynamic resource data to create the dynamic wallpaper.
After the display hierarchy, the static display information and the dynamic display information are input through the dynamic wallpaper creating interface according to a user, the electronic equipment acquires the data and is used for creating an animation script file.
103. Determining a display order of the plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data.
After the display levels, the static display information and the dynamic display information corresponding to the dynamic resource data are obtained, the display sequence of the dynamic resource data is determined according to the display levels of the dynamic resource data.
In some embodiments, determining a display order of a plurality of the dynamic resource data according to the display hierarchy of each of the plurality of the dynamic resource data comprises: and determining the display sequence of the dynamic resource data according to the sequence of the corresponding display levels from high to low, wherein the dynamic resource data with the high display level is displayed on the dynamic data with the low display level.
104. And generating an animation script file according to the display sequence, the static display information and the dynamic display information of each dynamic resource data.
And then, performing script compiling processing according to the display sequence and the static display information and the dynamic display information of the plurality of dynamic resource data to generate an animation script file. For example, the dynamic resource creation interface corresponds to a preset script template, the script template is matched with parameters included in the dynamic resource creation interface, and the display hierarchy, the static display information and the dynamic display information corresponding to each of a plurality of dynamic resource data input by a user are added to the script template to generate the animation script file. The format of the animation script file may be an XML (Extensible Markup Language) format, a Json (JavaScript Object Notation) format, or the like. It can be understood that the format of the script file is different, and the corresponding script templates are also different. The animation script file is mainly used for configuring the dynamic wallpaper to display different interfaces or animations at different occasions.
105. Determining first attribute information of each dynamic resource data and second attribute information of the animation script file, and generating a configuration file according to the second attribute information and the plurality of first attribute information.
Next, first attribute information of each dynamic resource data is determined, the attribute information including an ID, a name, a version number, a rendering type, and the like. And determines second attribute information of the animation script file, the second attribute information including a name, a format, etc. of the animation script file. And integrating the first attribute information and the second attribute information to generate a configuration file. The configuration file is attribute information for defining the dynamic wallpaper, and the file may be a text document, for example, a document in a config format, and is used for defining the ID, version number, name, rendering type, engine version, name and format of the animation script file, and the like of the dynamic wallpaper.
106. And packaging the plurality of dynamic resource data, the animation script files and the configuration files to generate dynamic wallpaper resource files.
And packaging the dynamic resource data, the animation script file and the configuration file, for example, generating a file in a compressed format, such as a file in a ZIP format, as the dynamic wallpaper resource file.
After the dynamic wallpaper resource file is generated, a Uniform Resource Identifier (URI) that can be accessed by other processes is generated, and the dynamic wallpaper resource file can be acquired by other processes through the URI. For example, a user may send a URI to an application, such as a theme store, via inter-process communication to share the dynamic wallpaper to other users.
The dynamic wallpaper generation method provided by the embodiment of the application determines dynamic resource data set by a user and setting information input by the user, determines the display level, static display information and dynamic display information of the dynamic resource data according to the setting, determines the display sequence of a plurality of dynamic resource data according to the display level of each of the plurality of dynamic resource data, generates an animation script file according to the display sequence and the static display information and the dynamic display information of each dynamic resource data, determines first attribute information of each dynamic resource data and second attribute information of the animation script file, generates a configuration file by combining a plurality of second attribute information and the first attribute information, packs and processes the dynamic resource data, the animation script file and the configuration file, generates the dynamic wallpaper resource file, and based on the dynamic wallpaper resource file, when a user needs to create dynamic wallpaper according to local dynamic resource data, the local dynamic resource data needed to be used can be determined according to the process, relevant parameter information is set, and then the data are correspondingly processed by the application, so that a dynamic wallpaper resource file can be generated for setting the dynamic wallpaper, and the generation of the dynamic wallpaper based on the local resource is realized.
In some embodiments, determining the dynamic resource data set by the user includes: when a dynamic wallpaper creating instruction is received, displaying a dynamic wallpaper creating interface; and determining dynamic resource data set by a user based on the dynamic wallpaper creation interface, and generating a storage path corresponding to the dynamic resource data.
Generally, the dynamic resource data for generating the dynamic wallpaper needs to be stored locally, please refer to fig. 2, a user selects a dynamic resource from the local based on a control for selecting the resource, and the electronic device automatically generates a storage path corresponding to the dynamic resource data according to the selection operation of the user and displays the storage path at a corresponding position in the interface.
In addition, the electronic device also identifies the resource format of the dynamic resource data set by the user and displays the resource format at the corresponding position of the dynamic resource creation interface.
In some embodiments, packaging a plurality of the dynamic resource data, the animation script file, and the configuration file to generate a dynamic wallpaper resource file comprises: obtaining the dynamic resource data from the storage path; and packaging the dynamic resource data, the animation script file and the configuration file to generate a dynamic wallpaper resource file.
In this embodiment, the dynamic resource data is read from the storage path and written into the cache, and the dynamic resource data in the cache, the animation script file, and the configuration file are packaged to generate the dynamic wallpaper resource file.
In some embodiments, generating an animation script file according to the display order, the static display information and the dynamic display information of each dynamic resource data comprises: for each dynamic resource data, acquiring an interface switching parameter and an animation parameter from dynamic display information corresponding to the dynamic resource data; determining a response method corresponding to the interface switching parameter; and generating an animation script file according to the display sequence, the static display information of each dynamic resource data, the response method and the animation parameters.
Each response method corresponds to an interface switching parameter, each interface switching parameter corresponds to an interface switching operation, and the response methods define dynamic display methods. The response method is mainly used for: when the electronic equipment performs interface switching operation, a response method corresponding to the interface switching operation can be determined according to the animation script file, and then the dynamic resource data is controlled to be displayed according to a corresponding dynamic display mode according to the response method. For example, wallpaper will trigger some response method when it is first applied or seen back from other applications to the desktop to perform some dynamic resource data loop play.
After determining a response method corresponding to an interface switching parameter set by a user, compiling scripts by combining a display sequence, the static display information of each dynamic resource data, the response method, animation parameters and attribute information (such as name, ID and the like) of the dynamic resource data, and generating an animation script file.
Taking an animation script file in xml format as an example, the outermost node may be defined as:
Figure BDA0002352544300000071
Figure BDA0002352544300000081
wherein, the root node LiveWallpapper is used for representing that the current document is used for analyzing the dynamic wallpaper.
Sub-nodes under the < Elements/> node all represent dynamic resource data to be rendered, such as dynamic resource data of videos, pictures, models, H264 format videos and the like, different dynamic resource data have different attributes, but each dynamic resource data needs to be configured with a unique ID.
Different Animations will be configured under < interactions/> nodes, each animation also needs to be configured with a unique ID, and each animation needs to be bound to one or more elements. The animation can be play, shift, rotate, zoom, reflect animation, etc., and is generated according to animation parameters. This is not particularly limited by the examples of the present application.
Various response Methods are configured under < Methods/> nodes, each of which can specify that an animation is to be executed once or played in a loop or interval. Whether to loop will be determined by the attribute value. For example: "loop": and (5) circularly playing. "once": playing only once and then pausing. "specific numerical value" (eg: "5000"): played every few milliseconds. The response method may be set according to the need for the dynamic effect, for example, the response method onStart is triggered when a set of wallpaper is set or changed. The first time the wallpaper is applied or seen back from other applications to the desktop will trigger the response method onResume, the dynamic wallpaper engine performs some animation or other action. Returning to the desktop trigger response method onResumeFrmLock after locking the screen, the dynamic wallpaper engine performs some animation or other action, and so on.
In some embodiments, the packaging processing of the plurality of dynamic resource data, animation script files and configuration files, and after the generation of the dynamic wallpaper resource file, further comprises: when a dynamic wallpaper setting instruction sent by a target process is received, resource identification information corresponding to the dynamic wallpaper setting instruction is obtained; acquiring a dynamic resource file based on the resource identification information, and analyzing the dynamic resource file to acquire dynamic resource data, a configuration file and an animation script file; creating a first resource instance according to the configuration file and the dynamic resource data; and realizing the drawing of the dynamic wallpaper according to the first resource instance, the animation script file and the wallpaper service so as to respond to the dynamic wallpaper setting instruction.
The electronic device is provided with a process for realizing dynamic wallpaper setting, the process can be a system level process, hereinafter referred to as a dynamic wallpaper engine, and other processes running in the electronic device can realize cross-process communication with the process through a preset communication protocol, for example, communication between the dynamic wallpaper engine and other processes is realized through an Aid Interface Definition Language (AIDL). Among other processes may be video management applications, theme stores, resource managers, and the like.
Referring to fig. 3, fig. 3 is a schematic diagram of a system framework of a dynamic wallpaper generation method according to an embodiment of the present application. In the scheme of the embodiment of the application, the dynamic wallpaper engine comprises a resource management module, a communication module, a script analysis module, a resource analysis module and a wallpaper service module. Wherein the external application communicates with the dynamic wallpaper engine through the communication module. And the resource management module acquires the dynamic wallpaper resource through ADIL. The script analysis module is used for analyzing the animation script file, and the resource analysis module controls the dynamic resource data to be displayed according to the definition of the script file through Wallpaertervice.
After the dynamic wallpaper engine acquires the URI, reading the received URI to acquire the dynamic resource file. In some embodiments parsing the dynamic resource file to obtain dynamic resource data, configuration files, and animation script files comprises: decompressing the dynamic resource file and acquiring a configuration file from the decompressed data; analyzing the configuration file to determine the format and the rendering type of the script file; and acquiring an animation script file corresponding to the script file format from the decompressed data, and acquiring dynamic resource data matched with the rendering type from the decompressed data.
And the resource manager analyzes the configuration file in the decompressed data to determine the format and name of the animation script file, and further determines the animation script file from the decompressed data according to the format and name. In addition, the resource manager can also determine the rendering type according to the configuration file, and further acquire dynamic resource data matched with the rendering type from the decompressed data.
In the script parsing module in the dynamic wallpaper engine, corresponding parsing sub-modules, such as XML, Json and the like, are set for script files of different formats. The resource analysis module is provided with corresponding rendering sub-modules for different types of dynamic resource data, such as a video rendering sub-module, an image rendering sub-module, and the like. In some embodiments, creating a first resource instance based on the configuration file and the dynamic resource data comprises: determining a rendering type according to the configuration file, and starting a rendering sub-module corresponding to the rendering type; and processing the dynamic resource data based on the rendering submodule to generate a first resource instance.
The script analysis module determines a script file format corresponding to the animation script file, determines a target analysis submodule from the plurality of analysis submodules, starts the target analysis submodule to analyze the animation script file, and generates an analysis example, wherein the analysis example is used for assisting the first resource example to respond to the actually executed action of different interface switching operations. The dynamic wallpaper engine is used for realizing the drawing of the dynamic wallpaper according to the wallpaper service module and the first resource instance.
In addition, in some embodiments, the dynamic wallpaper engine also provides the user with the functionality of dynamic wallpaper generation based on which the user may select dynamic resource data local to the electronic device to create a personalized dynamic wallpaper. For example, a user may trigger a dynamic wallpaper creation instruction based on a dynamic wallpaper creation control provided by a dynamic wallpaper engine, upon which the electronic device displays a dynamic wallpaper creation interface. The user may set dynamic resource data based on the dynamic wallpaper creation interface and configure relevant parameters for the dynamic resource data. The dynamic wallpaper engine obtains dynamic resource data set by a user and creates a dynamic wallpaper resource file corresponding to the dynamic wallpaper for configuring relevant parameters for the dynamic resource data.
As can be seen from the above, according to the dynamic wallpaper generation method provided in the embodiment of the application, when a dynamic wallpaper needs to be set through an external process, resource identification information may be transmitted to a dynamic wallpaper setting process based on a dynamic wallpaper setting instruction, the dynamic wallpaper setting process may acquire a dynamic resource file through the acquired resource identification and perform parsing processing to obtain a first resource instance for implementing dynamic wallpaper drawing, and a wallpaper service draws a dynamic wallpaper based on the first resource instance, thereby implementing cross-process dynamic wallpaper setting.
In one embodiment, a dynamic wallpaper generation device is further provided. Referring to fig. 4, fig. 4 is a schematic structural diagram of a dynamic wallpaper generation apparatus 300 according to an embodiment of the present application. The dynamic wallpaper generation apparatus 300 is applied to an electronic device, and the dynamic wallpaper generation apparatus 300 includes a resource determination unit 301, an information acquisition unit 302, a resource sorting unit 303, a script compiling unit 304, a configuration determination unit 305, and a wallpaper generation unit 306, as follows:
a resource determining unit 301, configured to determine dynamic resource data set by a user;
an information obtaining unit 302, configured to obtain setting information input by a user, and determine a display hierarchy, static display information, and dynamic display information of the dynamic resource data according to the setting information;
a resource sorting unit 303, configured to determine a display order of the plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data;
a script compiling unit 304, configured to generate an animation script file according to the display sequence, the static display information and the dynamic display information of each dynamic resource data;
a configuration determining unit 305, configured to determine first attribute information of each piece of dynamic resource data and second attribute information of the animation script file, and generate a configuration file according to the second attribute information and a plurality of pieces of the first attribute information;
a wallpaper generating unit 306, configured to package the plurality of dynamic resource data, the animation script file, and the configuration file, and generate a dynamic wallpaper resource file.
In some embodiments, the resource determination unit 301 is further configured to: when a dynamic wallpaper creating instruction is received, displaying a dynamic wallpaper creating interface;
and determining dynamic resource data set by a user based on the dynamic wallpaper creation interface, and generating a storage path corresponding to the dynamic resource data.
In some embodiments, the resource ordering unit 303 is further configured to: and determining the display sequence of the dynamic resource data according to the sequence of the corresponding display levels from high to low, wherein the dynamic resource data with the high display level is displayed on the dynamic data with the low display level.
In some embodiments, the script compiling unit 304 is further configured to: for each dynamic resource data, acquiring an interface switching parameter and an animation parameter from dynamic display information corresponding to the dynamic resource data;
determining a response method corresponding to the interface switching parameter;
and generating an animation script file according to the display sequence, the static display information of each dynamic resource data, the response method and the animation parameters.
In some embodiments, wallpaper generation unit 306 is further configured to: acquiring the dynamic resource data from the storage path;
and packaging the dynamic resource data, the animation script file and the configuration file to generate a dynamic wallpaper resource file.
In some embodiments, the static data includes position coordinates and a rotation angle; the dynamic data comprises displacement information, an attribute change interval and a rotation angle interval; the dynamic resource data includes video, images and sequence frames.
It should be noted that the dynamic wallpaper generation apparatus provided in the embodiment of the present application and the dynamic wallpaper generation method in the foregoing embodiment belong to the same concept, and any method provided in the dynamic wallpaper generation method embodiment may be run on the dynamic wallpaper generation apparatus, and a specific implementation process thereof is described in detail in the dynamic wallpaper generation method embodiment, and is not described herein again.
As can be seen from the above, the dynamic wallpaper generation apparatus provided in the embodiment of the present application determines dynamic resource data set by a user and setting information input by the user, determines a display hierarchy, static display information, and dynamic display information of the dynamic resource data according to the setting, determines a display order of a plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data, generates an animation script file according to the display order and the static display information and the dynamic display information of each of the plurality of dynamic resource data, determines first attribute information of each of the plurality of dynamic resource data and second attribute information of the animation script file, generates a configuration file by combining the plurality of second attribute information and the first attribute information, packages the dynamic resource data, the animation script file, and the configuration file, and generates a dynamic wallpaper resource file, based on the method, when a user needs to create the dynamic wallpaper according to the local dynamic resource data, the local dynamic resource data needed to be used can be determined according to the process, relevant parameter information is set, and then the data are correspondingly processed, so that the dynamic wallpaper resource file can be generated for setting the dynamic wallpaper, and the generation of the dynamic wallpaper based on the local resource is realized.
The embodiment of the application also provides the electronic equipment. The electronic device can be a smart phone, a tablet computer and the like. Referring to fig. 5, fig. 5 is a schematic view of a first structure of an electronic device according to an embodiment of the present disclosure. The electronic device 400 comprises a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.
The processor 401 is a control center of the electronic device 400, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by running or calling a computer program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
Memory 402 may be used to store computer programs and data. The memory 402 stores computer programs containing instructions executable in the processor. The computer program may constitute various functional modules. The processor 401 executes various functional applications and data processing by calling a computer program stored in the memory 402.
In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to processes of one or more computer programs into the memory 402 according to the following steps, and the processor 401 runs the computer programs stored in the memory 402, so as to implement various functions:
determining dynamic resource data set by a user;
acquiring setting information input by a user, and determining the display hierarchy, static display information and dynamic display information of the dynamic resource data according to the setting information;
determining a display order of the plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data;
generating an animation script file according to the display sequence, the static display information and the dynamic display information of each dynamic resource data;
determining first attribute information of each dynamic resource data and second attribute information of the animation script file, and generating a configuration file according to the second attribute information and the plurality of first attribute information;
and packaging the plurality of dynamic resource data, the animation script files and the configuration files to generate dynamic wallpaper resource files.
In some embodiments, please refer to fig. 6, and fig. 6 is a second structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device 400 further comprises: radio frequency circuit 403, display 404, control circuit 405, input unit 406, audio circuit 407, sensor 408, and power supply 409. The processor 401 is electrically connected to the radio frequency circuit 403, the display 404, the control circuit 405, the input unit 406, the audio circuit 407, the sensor 408, and the power source 409.
The radio frequency circuit 403 is used for transceiving radio frequency signals to communicate with a network device or other electronic devices through wireless communication.
The display screen 404 may be used to display information entered by or provided to the user as well as various graphical user interfaces of the electronic device, which may be comprised of images, text, icons, video, and any combination thereof.
The control circuit 405 is electrically connected to the display screen 404, and is configured to control the display screen 404 to display information.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., finger prints), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The input unit 406 may include a fingerprint recognition module.
The audio circuit 407 may provide an audio interface between the user and the electronic device through a speaker, microphone. Wherein the audio circuit 407 comprises a microphone. The microphone is electrically connected to the processor 401. The microphone is used for receiving voice information input by a user.
The sensor 408 is used to collect external environmental information. The sensors 408 may include one or more of ambient light sensors, acceleration sensors, gyroscopes, etc.
The power supply 409 is used to power the various components of the electronic device 400. In some embodiments, the power source 409 may be logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are implemented through the power management system.
Although not shown in the drawings, the electronic device 400 may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to processes of one or more computer programs into the memory 402 according to the following steps, and the processor 401 runs the computer programs stored in the memory 402, so as to implement various functions:
determining dynamic resource data set by a user;
acquiring setting information input by a user, and determining the display hierarchy, static display information and dynamic display information of the dynamic resource data according to the setting information;
determining a display order of the plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data;
generating an animation script file according to the display sequence, the static display information and the dynamic display information of each dynamic resource data;
determining first attribute information of each dynamic resource data and second attribute information of the animation script file, and generating a configuration file according to the second attribute information and the plurality of first attribute information;
and packaging the plurality of dynamic resource data, the animation script files and the configuration files to generate dynamic wallpaper resource files.
In some embodiments, in determining the dynamic resource data set by the user, processor 401 performs:
when a dynamic wallpaper creating instruction is received, displaying a dynamic wallpaper creating interface;
and determining dynamic resource data set by a user based on the dynamic wallpaper creation interface, and generating a storage path corresponding to the dynamic resource data.
In some embodiments, when determining the display order of a plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data, the processor 401 performs:
and determining the display sequence of the dynamic resource data according to the sequence of the corresponding display levels from high to low, wherein the dynamic resource data with the high display level is displayed on the dynamic data with the low display level.
In some embodiments, in generating the animation script file according to the display order, the static display information and the dynamic display information of each dynamic resource data, the processor 401 performs:
for each dynamic resource data, acquiring an interface switching parameter and an animation parameter from dynamic display information corresponding to the dynamic resource data;
determining a response method corresponding to the interface switching parameter;
and generating an animation script file according to the display sequence, the static display information of each dynamic resource data, the response method and the animation parameters.
In some embodiments, when packaging a plurality of the dynamic resource data, the animation script file, and the configuration file to generate a dynamic wallpaper resource file, the processor 401 performs:
acquiring the dynamic resource data from the storage path;
and packaging the dynamic resource data, the animation script file and the configuration file to generate a dynamic wallpaper resource file.
In view of the above, an embodiment of the present application provides an electronic device, where the electronic device determines dynamic resource data set by a user and setting information input by the user, determines a display hierarchy, static display information, and dynamic display information of the dynamic resource data according to the setting, determines a display order of a plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data, generates an animation script file according to the display order and the static display information and the dynamic display information of each of the plurality of dynamic resource data, determines first attribute information of each of the plurality of dynamic resource data and second attribute information of the animation script file, generates a configuration file by combining the plurality of second attribute information and the first attribute information, packages the dynamic resource data, the animation script file, and the configuration file, and generates a dynamic wallpaper resource file, based on the method, when a user needs to create the dynamic wallpaper according to the local dynamic resource data, the local dynamic resource data needed to be used can be determined according to the process, the relevant parameter information is set, then the data are correspondingly processed, the dynamic wallpaper resource file can be generated for setting the dynamic wallpaper, and the generation of the dynamic wallpaper based on the local resource is achieved.
An embodiment of the present application further provides a storage medium, where a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer executes the dynamic wallpaper generation method according to any one of the above embodiments.
It should be noted that, all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, which may include, but is not limited to: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Furthermore, the terms "first", "second", and "third", etc. in this application are used to distinguish different objects, and are not used to describe a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules listed, but rather, some embodiments may include other steps or modules not listed or inherent to such process, method, article, or apparatus.
The dynamic wallpaper generation method, the dynamic wallpaper generation device, the storage medium and the electronic device provided by the embodiments of the present application are described in detail above. The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A dynamic wallpaper generation method is characterized by comprising the following steps:
determining dynamic resource data set by a user;
acquiring setting information input by a user, and determining the display hierarchy, static display information and dynamic display information of the dynamic resource data according to the setting information;
determining a display order of the plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data;
generating an animation script file according to the display sequence, the static display information and the dynamic display information of each dynamic resource data;
determining first attribute information of each dynamic resource data and second attribute information of the animation script file, and generating a configuration file according to the second attribute information and the plurality of first attribute information;
and packaging the plurality of dynamic resource data, the animation script files and the configuration files to generate dynamic wallpaper resource files.
2. The dynamic wallpaper generation method as claimed in claim 1, wherein the determining of the dynamic resource data set by the user comprises:
when a dynamic wallpaper creating instruction is received, displaying a dynamic wallpaper creating interface;
and determining dynamic resource data set by a user based on the dynamic wallpaper creation interface, and generating a storage path corresponding to the dynamic resource data.
3. The method for generating dynamic wallpaper according to claim 1, wherein the determining a display order of the plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data comprises:
and determining the display sequence of the dynamic resource data according to the sequence of the corresponding display levels from high to low, wherein the dynamic resource data with the high display level is displayed on the dynamic data with the low display level.
4. A dynamic wallpaper generation method as claimed in claim 1, wherein the generating an animation script file according to the display order, the static display information and the dynamic display information of each dynamic resource data comprises:
for each dynamic resource data, acquiring an interface switching parameter and an animation parameter from dynamic display information corresponding to the dynamic resource data;
determining a response method corresponding to the interface switching parameter;
and generating an animation script file according to the display sequence, the static display information of each dynamic resource data, the response method and the animation parameters.
5. The method for generating dynamic wallpaper according to claim 2, wherein the step of packaging a plurality of dynamic resource data, animation script files and configuration files to generate dynamic wallpaper resource files comprises:
acquiring the dynamic resource data from the storage path;
and packaging the dynamic resource data, the animation script file and the configuration file to generate a dynamic wallpaper resource file.
6. A dynamic wallpaper generation method as claimed in any one of claims 1 to 5, wherein the static data comprises position coordinates and rotation angles; the dynamic data comprises displacement information, an attribute change interval and a rotation angle interval; the dynamic resource data includes video, images and sequence frames.
7. A dynamic wallpaper generation apparatus, comprising:
the resource determining unit is used for determining dynamic resource data set by a user;
the information acquisition unit is used for acquiring setting information input by a user and determining the display hierarchy, the static display information and the dynamic display information of the dynamic resource data according to the setting information;
a resource ordering unit, configured to determine a display order of the plurality of dynamic resource data according to the display hierarchy of each of the plurality of dynamic resource data;
the script compiling unit is used for generating an animation script file according to the display sequence, the static display information and the dynamic display information of each dynamic resource data;
a configuration determining unit, configured to determine first attribute information of each piece of dynamic resource data and second attribute information of the animation script file, and generate a configuration file according to the second attribute information and the plurality of pieces of first attribute information;
and the wallpaper generation unit is used for packaging the dynamic resource data, the animation script file and the configuration file to generate a dynamic wallpaper resource file.
8. The dynamic wallpaper generation apparatus as recited in claim 7, wherein the resource ordering unit is further to: and determining the display sequence of the dynamic resource data according to the sequence of the corresponding display levels from high to low, wherein the dynamic resource data with the high display level is displayed on the dynamic data with the low display level.
9. A storage medium having stored thereon a computer program, characterized in that, when the computer program is run on a computer, it causes the computer to execute the dynamic wallpaper generation method according to any one of claims 1 to 6.
10. An electronic device comprising a processor and a memory, the memory storing a computer program, wherein the processor is configured to execute the dynamic wallpaper generation method according to any one of claims 1 to 6 by calling the computer program.
CN201911421652.1A 2019-12-31 2019-12-31 Dynamic wallpaper generation method and device, storage medium and electronic equipment Active CN111240777B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911421652.1A CN111240777B (en) 2019-12-31 2019-12-31 Dynamic wallpaper generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911421652.1A CN111240777B (en) 2019-12-31 2019-12-31 Dynamic wallpaper generation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111240777A true CN111240777A (en) 2020-06-05
CN111240777B CN111240777B (en) 2023-09-12

Family

ID=70865432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911421652.1A Active CN111240777B (en) 2019-12-31 2019-12-31 Dynamic wallpaper generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111240777B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112099683A (en) * 2020-09-03 2020-12-18 维沃移动通信有限公司 Wallpaper display method and device and electronic equipment
CN113687904A (en) * 2021-10-26 2021-11-23 成都中科合迅科技有限公司 Interface dynamic generation method based on configuration file
CN114428656A (en) * 2021-12-17 2022-05-03 北京达佳互联信息技术有限公司 Popup display method and device
CN114510307A (en) * 2022-01-28 2022-05-17 统信软件技术有限公司 Dynamic wallpaper implementation method, computing device and storage medium
WO2023093664A1 (en) * 2021-11-24 2023-06-01 华为技术有限公司 Method for displaying linkage animation, and related apparatus

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120059869A1 (en) * 2010-09-06 2012-03-08 Seo Sung-Jong Web browsing system and method for rendering dynamic resource uris using script
CN104616336A (en) * 2015-02-26 2015-05-13 苏州大学 Animation construction method and device
US20180018936A1 (en) * 2016-07-12 2018-01-18 Nxp Usa, Inc. Method and apparatus for managing graphics layers within a graphics display component
CN108460818A (en) * 2017-02-17 2018-08-28 阿里巴巴集团控股有限公司 A kind of method and device of data export and animation play
CN109117239A (en) * 2018-09-21 2019-01-01 维沃移动通信有限公司 A kind of screen wallpaper display methods and mobile terminal
CN109308207A (en) * 2018-09-28 2019-02-05 珠海市君天电子科技有限公司 A kind of display methods of dynamic wallpaper, device, electronic equipment and storage medium
CN110209460A (en) * 2019-06-10 2019-09-06 Oppo广东移动通信有限公司 A kind of implementation method of dynamic wallpaper, device, storage medium and terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120059869A1 (en) * 2010-09-06 2012-03-08 Seo Sung-Jong Web browsing system and method for rendering dynamic resource uris using script
CN104616336A (en) * 2015-02-26 2015-05-13 苏州大学 Animation construction method and device
US20180018936A1 (en) * 2016-07-12 2018-01-18 Nxp Usa, Inc. Method and apparatus for managing graphics layers within a graphics display component
CN108460818A (en) * 2017-02-17 2018-08-28 阿里巴巴集团控股有限公司 A kind of method and device of data export and animation play
CN109117239A (en) * 2018-09-21 2019-01-01 维沃移动通信有限公司 A kind of screen wallpaper display methods and mobile terminal
CN109308207A (en) * 2018-09-28 2019-02-05 珠海市君天电子科技有限公司 A kind of display methods of dynamic wallpaper, device, electronic equipment and storage medium
CN110209460A (en) * 2019-06-10 2019-09-06 Oppo广东移动通信有限公司 A kind of implementation method of dynamic wallpaper, device, storage medium and terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112099683A (en) * 2020-09-03 2020-12-18 维沃移动通信有限公司 Wallpaper display method and device and electronic equipment
CN113687904A (en) * 2021-10-26 2021-11-23 成都中科合迅科技有限公司 Interface dynamic generation method based on configuration file
WO2023093664A1 (en) * 2021-11-24 2023-06-01 华为技术有限公司 Method for displaying linkage animation, and related apparatus
CN114428656A (en) * 2021-12-17 2022-05-03 北京达佳互联信息技术有限公司 Popup display method and device
CN114510307A (en) * 2022-01-28 2022-05-17 统信软件技术有限公司 Dynamic wallpaper implementation method, computing device and storage medium

Also Published As

Publication number Publication date
CN111240777B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
CN111240777B (en) Dynamic wallpaper generation method and device, storage medium and electronic equipment
CN111240774B (en) Dynamic wallpaper generation method and device, storage medium and electronic equipment
CN108845856B (en) Object-based synchronous updating method and device, storage medium and equipment
CN110795195A (en) Webpage rendering method and device, electronic equipment and storage medium
WO2021008334A1 (en) Data binding method, apparatus, and device of mini program, and storage medium
CN111416756B (en) Protocol testing method, device, computer equipment and storage medium
CN111597000B (en) Small window management method and terminal
WO2023093414A1 (en) Micro-application development method and apparatus, and device, storage medium and program product
CN111596998A (en) Page processing method of ink screen and terminal
CN112257006A (en) Page information configuration method, device, equipment and computer readable storage medium
CN111209065A (en) Dynamic wallpaper setting method and device, storage medium and electronic equipment
CN112217671B (en) Method and equipment for performing interface display on front-end micro-service based on split deployment
CN112035768A (en) Page rendering method and device for fast application, storage medium and electronic equipment
CN110045958B (en) Texture data generation method, device, storage medium and equipment
CN113467663B (en) Interface configuration method, device, computer equipment and medium
CN106383705B (en) Method and device for setting mouse display state in application thin client
CN113613064B (en) Video processing method, device, storage medium and terminal
CN111399955B (en) Mobile terminal and interface display method of application program thereof
CN114546113A (en) Menu operation method and device, storage medium and electronic equipment
CN111163220B (en) Display method, communication terminal and computer storage medium
KR100603580B1 (en) Method for realizing user interface of mobile terminal
CN112181442B (en) Unloading page display method, device, terminal, server and storage medium
CN113407283A (en) Interface display method and device and electronic equipment
CN111240776B (en) Dynamic wallpaper setting method and device, storage medium and electronic equipment
US10924602B2 (en) Electronic device and method for controlling same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant