CN111209065A - Dynamic wallpaper setting method and device, storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN111209065A
CN111209065A CN201911415154.6A CN201911415154A CN111209065A CN 111209065 A CN111209065 A CN 111209065A CN 201911415154 A CN201911415154 A CN 201911415154A CN 111209065 A CN111209065 A CN 111209065A
Authority
CN
China
Prior art keywords
dynamic
resource
wallpaper
file
dynamic wallpaper
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
CN201911415154.6A
Other languages
Chinese (zh)
Other versions
CN111209065B (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 CN201911415154.6A priority Critical patent/CN111209065B/en
Publication of CN111209065A publication Critical patent/CN111209065A/en
Application granted granted Critical
Publication of CN111209065B publication Critical patent/CN111209065B/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application discloses a dynamic wallpaper setting method, a device, a storage medium and electronic equipment, wherein 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; according to the dynamic resource data, the configuration file and the wallpaper service, drawing of the dynamic wallpaper is achieved so as to respond to a dynamic wallpaper setting instruction; and when the interface switching operation is detected, controlling the dynamic display of the dynamic wallpaper according to the animation script file, thereby realizing the cross-process dynamic wallpaper setting.

Description

Dynamic wallpaper setting 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 setting 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 the wallpaper with a dynamic display effect. The conventional dynamic wallpaper setting mode has complicated steps, a system wallpaper setting interface is required to be entered each time, preview and setting operation is carried out through a dynamic wallpaper selector, and cross-process dynamic wallpaper setting cannot be realized.
Disclosure of Invention
The embodiment of the application provides a dynamic wallpaper setting method and device, a storage medium and electronic equipment, which can realize cross-process dynamic wallpaper setting.
In a first aspect, an embodiment of the present application provides a dynamic wallpaper setting method, including:
when a dynamic wallpaper setting instruction sent by a target process is received, acquiring resource identification information corresponding to the dynamic wallpaper setting instruction;
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;
according to the dynamic resource data, the configuration file and the wallpaper service, drawing of dynamic wallpaper is achieved so as to respond to the dynamic wallpaper setting instruction;
and when the interface switching operation is detected, controlling the dynamic display of the dynamic wallpaper according to the animation script file.
In a second aspect, an embodiment of the present application further provides a dynamic wallpaper setting device, including:
the information acquisition unit is used for acquiring resource identification information corresponding to a dynamic wallpaper setting instruction when the dynamic wallpaper setting instruction sent by a target process is received;
a resource obtaining unit, configured to obtain a dynamic resource file based on the resource identification information, and parse the dynamic resource file to obtain dynamic resource data, a configuration file, and an animation script file;
the wallpaper drawing unit is used for realizing the drawing of dynamic wallpaper according to the dynamic resource data, the configuration file and the wallpaper service so as to respond to the dynamic wallpaper setting instruction;
and the dynamic display unit is used for controlling the dynamic display of the dynamic wallpaper according to the animation script file when the interface switching operation is detected.
In a third aspect, embodiments of the present application further provide a storage medium having a computer program stored thereon, where the computer program is executed on a computer, so that the computer executes the dynamic wallpaper setting 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 setting method provided in any embodiment of the present application by calling the computer program.
According to the technical scheme provided by the embodiment of the application, 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, a dynamic resource file is obtained based on the resource identification information, the dynamic resource file is analyzed to obtain dynamic resource data, a configuration file and an animation script file, the dynamic wallpaper is drawn according to the dynamic resource data, the configuration file and wallpaper service, when an interface switching operation is detected, the dynamic display of the dynamic wallpaper is controlled according to the animation script file, in this way, when the dynamic wallpaper needs to be set through an external process, the resource identification information can be transmitted to the dynamic wallpaper setting process based on the dynamic wallpaper setting instruction, the dynamic wallpaper setting process can obtain the dynamic resource file through the obtained resource identification and analyze the dynamic resource file, the dynamic wallpaper is drawn, when interface switching operation occurs in the electronic equipment, dynamic display of the dynamic wallpaper is controlled according to the animation script file, and cross-process setting of the dynamic wallpaper is achieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are 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 based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a first method for setting dynamic wallpaper according to an embodiment of the present application.
Fig. 2 is a schematic view of an application scenario of the dynamic wallpaper setting method according to the embodiment of the application.
Fig. 3 is a system framework diagram of a dynamic wallpaper setting method according to an embodiment of the present application.
Fig. 4 is a schematic flowchart of a second method for setting dynamic wallpaper according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a dynamic wallpaper setting device according to an embodiment of the application.
Fig. 6 is a schematic structural diagram of a first electronic device according to an embodiment of the present application.
Fig. 7 is a second structural schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below 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 inventive step, are within the scope of 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 body of the dynamic wallpaper setting method may be the dynamic wallpaper setting device provided in the embodiment of the present application, or an electronic device integrated with the dynamic wallpaper setting device, where the dynamic wallpaper setting 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 setting method according to an embodiment of the present application. The specific flow of the dynamic wallpaper setting method provided by the embodiment of the application can be as follows:
101. 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.
In a conventional dynamic wallpaper setting scheme, each dynamic wallpaper needs to register a WallpaperService in the APK to represent a dynamic wallpaper service. And the wallpaper setting needs to jump to a dynamic wallpaper selector for previewing and then set to the desktop for displaying. Therefore, the steps of setting the dynamic wallpaper are complicated, and the dynamic wallpaper to be set or updated at each time can be realized through a plurality of steps of 'dynamic wallpaper selector', 'preview', 'setting', and the like. Meanwhile, the setting mode leads the user to enter the dynamic wallpaper setting interface set by the system for setting, and the dynamic wallpaper resources acquired by other application programs cannot be directly set.
The electronic device is provided with a process for realizing dynamic wallpaper setting, 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 Android Interface Definition Language (AIDL). The other processes may be any other processes capable of acquiring the application program of the dynamic wallpaper resource, for example, processes of application programs such as a video management program, a theme store, and a resource manager.
Referring to fig. 2, fig. 2 is a schematic view of an application scenario of a dynamic wallpaper setting method according to an embodiment of the present application. In the embodiment of the application, the user can set the dynamic wallpaper in other processes except the dynamic wallpaper engine. For example, a user acquires a dynamic wallpaper resource through a target process, triggers a dynamic wallpaper setting instruction through a "set wallpaper" control in the options of the dynamic wallpaper, and sends the dynamic wallpaper setting instruction to a dynamic wallpaper engine through inter-process communication. The dynamic wallpaper setting instruction carries resource identification information corresponding to the dynamic wallpaper resource file, and other processes can acquire the dynamic wallpaper resource file according to the resource identification information. In some embodiments, the resource identification information may be a URI (uniform resource identifier). For example, after receiving the dynamic wallpaper setting instruction, the dynamic wallpaper engine may obtain the dynamic wallpaper resource file based on the uniform resource identifier, and directly set the dynamic wallpaper corresponding to the dynamic wallpaper resource file as the current dynamic wallpaper in the background.
102. And 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.
The dynamic resource file of the target process may be a file in a compressed format, such as a ZIP format. The compressed file is packed with dynamic resource data, configuration files and animation script files, wherein the dynamic resource data contains various resource data for realizing dynamic wallpaper display, such as pictures, videos, frame sequences and the like. The configuration file is attribute information for defining the dynamic wallpaper, and the file may be a text document, for example, a config format document, 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. The animation script file is mainly used for configuring the dynamic wallpaper to display different interfaces or animations at different occasions.
The external process needs to uniformly pack dynamic resource data, configuration files, animation script files and the like into a compression package, and the safety, timeliness and the like of the resources are controlled by an external application. The external process may embed the compressed package in its APP or in the SD card and generate a URI that the dynamic wallpaper engine can access. And the external process communicates with the dynamic wallpaper engine through an AIDL communication protocol agreed with the dynamic wallpaper engine, sends the URI of the available dynamic resource file to the dynamic wallpaper engine and sends a dynamic wallpaper setting instruction.
Referring to fig. 3, fig. 3 is a system framework diagram of a dynamic wallpaper setting method according to an embodiment of the present application. In the scheme in the embodiment of the application, the dynamic wallpaper engine comprises a resource management module, a communication module, an XML parsing submodule, a resource parsing 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 XML analysis submodule 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.
Taking the resource identification information as the URI as an example, after obtaining the URI, the dynamic wallpaper engine reads the received URI to obtain the dynamic resource file. In some embodiments parsing the dynamic resource file to obtain dynamic resource data, a configuration file, and an animation script file comprises: decompressing the dynamic resource file to obtain decompressed data, 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.
The resource manager analyzes the configuration file in the decompressed data to determine the format and name of the animation script file, and then 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.
103. And realizing the drawing of the dynamic wallpaper according to the dynamic resource data, the configuration file and the wallpaper service so as to respond to the dynamic wallpaper setting instruction.
And then, the dynamic wallpaper engine realizes the drawing of the dynamic wallpaper according to the acquired dynamic resource data, the configuration file and the wallpaper service. For example, the dynamic wallpaper engine determines a drawing mode of the dynamic wallpaper through the configuration file, and then realizes the drawing of the dynamic wallpaper according to the drawing mode through the wallpaper service.
104. And when the interface switching operation is detected, controlling the dynamic display of the dynamic wallpaper according to the animation script file.
After the dynamic wallpaper is set, the dynamic wallpaper displays different interfaces or animations at different display occasions, the effect is realized by using an animation script file, and when the electronic equipment performs interface switching operation, the dynamic display of the dynamic wallpaper can be controlled according to the animation script file.
The format of the animation script file may be XML (Extensible Markup Language) format, Json (JavaScript Object Notation) format, or the like. The animation script file is mainly used for configuring the dynamic wallpaper to display different interfaces or animations at different time. The animation script file is defined with a plurality of response methods, each response method corresponds to an interface switching operation, and the response methods define dynamic display methods, so that when the electronic equipment performs interface switching operation, the response method corresponding to the interface switching operation can be determined according to the animation script file, and dynamic resource data are controlled to be displayed according to the corresponding dynamic display modes according to the response method. For example, wallpaper will trigger some response method when it is first applied or visible from another application back to the desktop to perform some dynamic resource data loop play.
For example, when making dynamic wallpaper, the xml outermost node is defined as:
Figure BDA0002351003160000061
wherein, the root node LiveWallpapper is used for representing that the current document is used for analyzing the dynamic wallpaper.
The child nodes below < Elements/> nodes all represent Elements to be rendered, such as video, pictures, models, H264 format video and other Elements, different Elements have different attributes, but each element needs to be configured with a unique ID, namely a resource identifier.
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 may be play, shift, rotate, zoom, reflect animation, etc., and this is not particularly limited by the embodiments 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"): every few milliseconds. The response method may be set according to the need for dynamic effects, for example, the trigger response method onStart is initialized when a set of wallpaper is set or replaced. The first time the wallpaper is visible by the application or from another application back 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 onResumFromLock after locking the screen, the dynamic wallpaper engine performs some animation or other action, and so on.
In particular implementation, the present application is not limited by the execution sequence of the described steps, and some steps may be performed in other sequences or simultaneously without conflict.
From the above, the dynamic wallpaper setting method provided in this application embodiment obtains the resource identifier information corresponding to the dynamic wallpaper setting instruction when receiving the dynamic wallpaper setting instruction sent by the target process, obtains the dynamic resource file based on the resource identifier information, and parses the dynamic resource file to obtain the dynamic resource data, the configuration file, and the animation script file, and implements the drawing of the dynamic wallpaper according to the dynamic resource data, the configuration file, and the wallpaper service, and controls the dynamic display of the dynamic wallpaper according to the animation script file when detecting the interface switching operation, in this way, when the dynamic wallpaper needs to be set by the external process, the resource identifier information can be transmitted to the dynamic wallpaper setting process based on the dynamic wallpaper setting instruction, and the dynamic wallpaper setting process can obtain the dynamic resource file through the obtained resource identifier and perform parsing processing, the dynamic wallpaper is drawn, when interface switching operation occurs in the electronic equipment, dynamic display of the dynamic wallpaper is controlled according to the animation script file, and cross-process setting of the dynamic wallpaper is achieved.
The method according to the preceding embodiment is illustrated in further detail below by way of example.
Referring to fig. 4, fig. 4 is a second flowchart of a dynamic wallpaper setting method according to an embodiment of the invention. The method comprises the following steps:
201. 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.
The user acquires a dynamic wallpaper resource through a target process, triggers a dynamic wallpaper setting instruction through a wallpaper setting control in the options of the dynamic wallpaper, and sends the dynamic wallpaper setting instruction to a dynamic wallpaper engine through inter-process communication. And after receiving the dynamic wallpaper setting instruction, the dynamic wallpaper engine acquires the URI.
202. And 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.
After the dynamic wallpaper engine acquires the URI, reading the received URI to acquire a dynamic resource file. And decompressing the dynamic resource file, analyzing the configuration file in the decompressed data to determine the format and the name of the animation script file, and further determining the animation script file from the decompressed data according to the format and the 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.
203. And creating a first resource instance according to the configuration file and the dynamic resource data.
Referring to fig. 3, in the script parsing module of the dynamic wallpaper engine, corresponding parsing submodules, such as XML, Json, etc., are set for script files with different formats. The resource analysis module is provided with corresponding rendering sub-modules, such as normalvedo, normalmimage and the like, for different types of dynamic resource data. The resource parsing module determines a corresponding rendering sub-module according to the rendering type determined in 202, and creates a first resource instance based on the rendering sub-module and the dynamic resource data.
204. And determining a target analysis submodule corresponding to the script file format, and analyzing the animation script file according to the target analysis submodule to generate an analysis example.
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, generates an analysis example, and the analysis example is used for assisting the first resource example to respond to different interface switching operations and execute corresponding actions.
205. And realizing the drawing of the dynamic wallpaper according to the first resource instance and the wallpaper service so as to respond to the dynamic wallpaper setting instruction.
The dynamic wallpaper engine realizes drawing of dynamic wallpaper based on the wallpaper service module and the first resource instance. If the dynamic wallpaper engine sets the dynamic wallpaper for the first time, the dynamic wallpaper engine serves as a system level process, and a system method is called to realize a first resource instance on the basis of a Wallpaertervice implementation class built in the dynamic wallpaper engine in the background so as to set the dynamic wallpaper as the system wallpaper. If the dynamic wallpaper engine does not set the dynamic wallpaper for the first time, the current resource instance in the dynamic wallpaper engine is directly switched to the first resource instance.
206. Setting the first resource instance as a drawing execution class of the wallpaper service.
207. When interface switching operation is detected, determining a response method corresponding to the interface switching operation based on the first resource instance, determining target drawing operation corresponding to the response method from the analysis instance, and executing the target drawing operation.
208. And realizing the drawing operation through the wallpaper service so as to update a wallpaper display interface.
In some embodiments, when an interface switching operation is detected, determining, based on the first resource instance, a response method corresponding to the interface switching operation, determining, from the parsed instance, a target drawing operation corresponding to the response method, and executing the target drawing operation includes: when interface switching operation is detected, determining a response method corresponding to the interface switching operation based on the first resource instance; detecting whether the response method is contained in the analysis example; if so, determining a resource identifier and a drawing parameter corresponding to the response method from the analysis example; and controlling the animation element corresponding to the resource identifier to execute target drawing operation according to the drawing parameters based on the first resource instance.
The dynamic wallpaper engine sets the first resource instance as a drawing execution class of the wallpaper service, a user executes a certain operation on the electronic device, for example, the user returns to a desktop from a certain application, the electronic device executes an interface switching operation, determines a response method corresponding to the interface switching operation, then the dynamic wallpaper engine searches for the drawing operation to be executed in the corresponding method from the analysis instance, for example, a certain section of video is played, a certain picture is drawn, a certain resource data is controlled to move or rotate on the interface, and the like, that is, a resource identifier and drawing parameters are determined, and animation elements corresponding to the resource identifier are controlled to execute the drawing operation according to the drawing parameters.
And the dynamic wallpaper engine realizes the drawing operation through the wallpaper service module so as to update the wallpaper display interface, and the wallpaper displays the drawing operation. It will be appreciated that nothing is done if no corresponding response method is found.
As can be seen from the above, the dynamic wallpaper setting method provided in the embodiment of the present invention saves a complicated operation flow for a user, and directly implements setting and switching of dynamic wallpaper in the background, when the dynamic wallpaper needs to be set through an external process, resource identification information can be transmitted to a dynamic wallpaper setting process based on a dynamic wallpaper setting instruction, the dynamic wallpaper setting process can obtain a dynamic resource file through the obtained resource identification and perform parsing processing, so as to implement drawing of the dynamic wallpaper, and when an interface switching operation occurs on an electronic device, dynamic display of the dynamic wallpaper is controlled according to an animation script file, so as to implement cross-process setting of the dynamic wallpaper.
In one embodiment, a dynamic wallpaper setting device is also provided. Referring to fig. 5, fig. 5 is a schematic structural diagram of a dynamic wallpaper setting device 300 according to an embodiment of the present application. The dynamic wallpaper setting apparatus 300 is applied to an electronic device, and the dynamic wallpaper setting apparatus 300 includes an information obtaining unit 301, a resource obtaining unit 302, a wallpaper drawing unit 303, and a dynamic presentation unit 304, as follows:
an information obtaining unit 301, configured to obtain resource identifier information corresponding to a dynamic wallpaper setting instruction when the dynamic wallpaper setting instruction sent by a target process is received;
a resource obtaining unit 302, configured to obtain a dynamic resource file based on the resource identification information, and parse the dynamic resource file to obtain dynamic resource data, a configuration file, and an animation script file;
a wallpaper drawing unit 303, configured to implement drawing of a dynamic wallpaper according to the dynamic resource data, the configuration file, and a wallpaper service, so as to respond to the dynamic wallpaper setting instruction;
and the dynamic display unit 304 is configured to control dynamic display of the dynamic wallpaper according to the animation script file when an interface switching operation is detected.
In some embodiments, the resource obtaining unit 302 is further configured to:
decompressing the dynamic resource file to obtain decompressed data, 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.
In some embodiments, wallpaper drawing unit 303 is further to:
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 and the wallpaper service so as to respond to the dynamic wallpaper setting instruction.
In some embodiments, wallpaper drawing unit 303 is further to: and generating an analysis example based on the animation script file.
In some embodiments, the dynamic presentation unit 304 is further configured to:
setting the first resource instance as a drawing execution class of the wallpaper service;
when interface switching operation is detected, determining a response method corresponding to the interface switching operation based on the first resource instance, determining a target drawing operation corresponding to the response method from the analysis instance, and executing the target drawing operation;
and realizing the drawing operation through the wallpaper service so as to update a wallpaper display interface.
In some embodiments, the dynamic presentation unit 304 is further configured to:
when interface switching operation is detected, determining a response method corresponding to the interface switching operation based on the first resource instance;
detecting whether the response method is contained in the analysis example;
if so, determining a resource identifier and a drawing parameter corresponding to the response method from the analysis example;
and controlling the animation element corresponding to the resource identifier to execute target drawing operation according to the drawing parameters based on the first resource instance.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
It should be noted that the dynamic wallpaper setting device provided in the embodiment of the present application and the dynamic wallpaper setting method in the foregoing embodiment belong to the same concept, and any method provided in the dynamic wallpaper setting method embodiment may be run on the dynamic wallpaper setting device, and a specific implementation process thereof is described in detail in the dynamic wallpaper setting method embodiment, and is not described herein again.
From the above, the dynamic wallpaper setting device provided in this embodiment of the application, upon receiving a dynamic wallpaper setting instruction sent by a target process, obtains resource identifier information corresponding to the dynamic wallpaper setting instruction, obtains a dynamic resource file based on the resource identifier information, and parses the dynamic resource file to obtain dynamic resource data, a configuration file, and an animation script file, implements drawing of dynamic wallpaper according to the dynamic resource data, the configuration file, and a wallpaper service, and when an interface switching operation is detected, controls dynamic display of dynamic wallpaper according to the animation script file, in this way, when dynamic wallpaper needs to be set by an external process, resource identifier information can be transmitted to a dynamic wallpaper setting process based on the dynamic wallpaper setting instruction, and the dynamic wallpaper setting process can obtain the dynamic resource file through the obtained resource identifier and perform parsing processing, the dynamic wallpaper is drawn, when interface switching operation occurs in the electronic equipment, dynamic display of the dynamic wallpaper is controlled according to the animation script file, and cross-process setting of the dynamic wallpaper is achieved.
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. 6, fig. 6 is a schematic structural diagram 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, and 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 one or more processes of the computer program into the memory 402 according to the following steps, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions:
when a dynamic wallpaper setting instruction sent by a target process is received, acquiring resource identification information corresponding to the dynamic wallpaper setting instruction;
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;
according to the dynamic resource data, the configuration file and the wallpaper service, drawing of dynamic wallpaper is achieved so as to respond to the dynamic wallpaper setting instruction;
and when the interface switching operation is detected, controlling the dynamic display of the dynamic wallpaper according to the animation script file.
In some embodiments, please refer to fig. 7, and fig. 7 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., fingerprint), 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 one or more processes of the computer program into the memory 402 according to the following steps, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions:
when a dynamic wallpaper setting instruction sent by a target process is received, acquiring resource identification information corresponding to the dynamic wallpaper setting instruction;
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;
according to the dynamic resource data, the configuration file and the wallpaper service, drawing of dynamic wallpaper is achieved so as to respond to the dynamic wallpaper setting instruction;
and when the interface switching operation is detected, controlling the dynamic display of the dynamic wallpaper according to the animation script file.
In some embodiments, when parsing the dynamic resource file to obtain the dynamic resource data, the configuration file, and the animation script file, the processor 401 performs:
decompressing the dynamic resource file to obtain decompressed data, 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.
In some embodiments, when implementing the drawing of dynamic wallpaper according to the resource data, the configuration file, and the wallpaper service, processor 401 performs:
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 and the wallpaper service so as to respond to the dynamic wallpaper setting instruction.
In some embodiments, processor 401 further performs: and generating an analysis example based on the animation script file.
In some embodiments, when the interface switching operation is detected, and the dynamic presentation of the dynamic wallpaper is controlled according to the animation script file, the processor 401 executes:
setting the first resource instance as a drawing execution class of the wallpaper service;
when interface switching operation is detected, determining a response method corresponding to the interface switching operation based on the first resource instance, determining a target drawing operation corresponding to the response method from the analysis instance, and executing the target drawing operation;
and realizing the drawing operation through the wallpaper service so as to update a wallpaper display interface.
In some embodiments, when the interface switching operation is detected, the processor 401, when determining, based on the first resource instance, a response method corresponding to the interface switching operation, determining, from the parsing instance, a target drawing operation corresponding to the response method, and executing the target drawing operation, performs:
when interface switching operation is detected, determining a response method corresponding to the interface switching operation based on the first resource instance;
detecting whether the response method is contained in the analysis example;
if so, determining a resource identifier and a drawing parameter corresponding to the response method from the analysis example;
and controlling the animation element corresponding to the resource identifier to execute target drawing operation according to the drawing parameters based on the first resource instance.
From the above, an embodiment of the present application provides an electronic device, where the electronic device, when receiving a dynamic wallpaper setting instruction sent by a target process, obtains resource identifier information corresponding to the dynamic wallpaper setting instruction, obtains a dynamic resource file based on the resource identifier information, and parses the dynamic resource file to obtain dynamic resource data, a configuration file, and an animation script file, and implements drawing of dynamic wallpaper according to the dynamic resource data, the configuration file, and a wallpaper service, and when an interface switching operation is detected, controls dynamic display of the dynamic wallpaper according to the animation script file, in this way, when a dynamic wallpaper needs to be set through an external process, the resource identifier information can be transmitted to a dynamic wallpaper setting process based on the dynamic wallpaper setting instruction, and the dynamic wallpaper setting process can obtain the dynamic resource file through the obtained resource identifier and perform parsing processing, the dynamic wallpaper is drawn, when interface switching operation occurs in the electronic equipment, dynamic display of the dynamic wallpaper is controlled according to the animation script file, and cross-process setting of the dynamic wallpaper 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 setting method according to any 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 "include" and "have," 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 setting method, device, storage medium and 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 setting method is characterized by comprising the following steps:
when a dynamic wallpaper setting instruction sent by a target process is received, acquiring resource identification information corresponding to the dynamic wallpaper setting instruction;
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;
according to the dynamic resource data, the configuration file and the wallpaper service, drawing of dynamic wallpaper is achieved so as to respond to the dynamic wallpaper setting instruction;
and when the interface switching operation is detected, controlling the dynamic display of the dynamic wallpaper according to the animation script file.
2. The dynamic wallpaper setting method according to claim 1, wherein the parsing the dynamic resource file to obtain dynamic resource data, a configuration file and an animation script file comprises:
decompressing the dynamic resource file to obtain decompressed data, 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.
3. The dynamic wallpaper setting method as claimed in claim 1, wherein the implementing drawing of dynamic wallpaper according to the resource data, the configuration file and wallpaper service comprises:
creating a first resource instance according to the configuration file and the dynamic resource data;
and drawing the dynamic wallpaper according to the first resource instance and the wallpaper service.
4. The dynamic wallpaper setting method as claimed in claim 3, wherein before controlling the dynamic display of the dynamic wallpaper according to the animation script file when the interface switching operation is detected, further comprising:
and generating an analysis example based on the animation script file.
5. The dynamic wallpaper setting method as claimed in claim 4, wherein the controlling the dynamic display of the dynamic wallpaper according to the animation script file when the interface switching operation is detected comprises:
setting the first resource instance as a drawing execution class of the wallpaper service;
when interface switching operation is detected, determining a response method corresponding to the interface switching operation based on the first resource instance, determining a target drawing operation corresponding to the response method from the analysis instance, and executing the target drawing operation;
and realizing the drawing operation through the wallpaper service so as to update a wallpaper display interface.
6. The dynamic wallpaper setting method as claimed in claim 5, wherein when an interface switching operation is detected, determining a response method corresponding to the interface switching operation based on the first resource instance, determining a target drawing operation corresponding to the response method from the parsing instance, and executing the target drawing operation, comprises:
when interface switching operation is detected, determining a response method corresponding to the interface switching operation based on the first resource instance;
detecting whether the response method is contained in the analysis example;
if so, determining a resource identifier and a drawing parameter corresponding to the response method from the analysis example;
and controlling the animation element corresponding to the resource identifier to execute target drawing operation according to the drawing parameters based on the first resource instance.
7. A dynamic wallpaper setting device, comprising:
the information acquisition unit is used for acquiring resource identification information corresponding to a dynamic wallpaper setting instruction when the dynamic wallpaper setting instruction sent by a target process is received;
a resource obtaining unit, configured to obtain a dynamic resource file based on the resource identification information, and parse the dynamic resource file to obtain dynamic resource data, a configuration file, and an animation script file;
the wallpaper drawing unit is used for realizing the drawing of dynamic wallpaper according to the dynamic resource data, the configuration file and the wallpaper service so as to respond to the dynamic wallpaper setting instruction;
and the dynamic display unit is used for controlling the dynamic display of the dynamic wallpaper according to the animation script file when the interface switching operation is detected.
8. The dynamic wallpaper setting apparatus as recited in claim 7, wherein the resource acquisition unit is further configured to:
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 and the wallpaper service so as to respond to the dynamic wallpaper setting instruction.
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 setting method according to any one of claims 1 to 6.
10. An electronic device comprising a processor and a memory, said memory storing a computer program, wherein said processor is adapted to perform the dynamic wallpaper setting method according to any one of claims 1 to 6 by calling said computer program.
CN201911415154.6A 2019-12-31 2019-12-31 Dynamic wallpaper setting method and device, storage medium and electronic equipment Active CN111209065B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911415154.6A CN111209065B (en) 2019-12-31 2019-12-31 Dynamic wallpaper setting method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911415154.6A CN111209065B (en) 2019-12-31 2019-12-31 Dynamic wallpaper setting method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111209065A true CN111209065A (en) 2020-05-29
CN111209065B CN111209065B (en) 2023-12-08

Family

ID=70786480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911415154.6A Active CN111209065B (en) 2019-12-31 2019-12-31 Dynamic wallpaper setting method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111209065B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114296854A (en) * 2021-12-28 2022-04-08 珠海豹趣科技有限公司 Desktop wallpaper display method and device, electronic equipment and readable storage medium
CN115277924A (en) * 2022-07-26 2022-11-01 努比亚技术有限公司 Dynamic screen locking display control method and device and computer readable storage medium
CN115941836A (en) * 2022-10-28 2023-04-07 荣耀终端有限公司 Interface display method, electronic equipment and storage medium
CN116743908A (en) * 2022-09-13 2023-09-12 荣耀终端有限公司 Wallpaper display method and related device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060206803A1 (en) * 2005-03-14 2006-09-14 Smith Jeffrey C Interactive desktop wallpaper system
WO2011111926A2 (en) * 2010-03-12 2011-09-15 블루가 (주) Apparatus and method for implementing web-based user interface on mobile terminal
CN106598410A (en) * 2016-12-07 2017-04-26 掌阅科技股份有限公司 Display method, device and terminal equipment of electronic book
CN109168074A (en) * 2018-10-25 2019-01-08 苏宁智能终端有限公司 A kind of video broadcasting method and device
CN109727301A (en) * 2018-12-29 2019-05-07 北京字节跳动网络技术有限公司 Generate method, apparatus, electronic equipment and the storage medium of dynamic wallpaper
CN110069182A (en) * 2019-04-28 2019-07-30 努比亚技术有限公司 Wallpaper control method, mobile terminal and computer readable 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
US20060206803A1 (en) * 2005-03-14 2006-09-14 Smith Jeffrey C Interactive desktop wallpaper system
WO2011111926A2 (en) * 2010-03-12 2011-09-15 블루가 (주) Apparatus and method for implementing web-based user interface on mobile terminal
CN106598410A (en) * 2016-12-07 2017-04-26 掌阅科技股份有限公司 Display method, device and terminal equipment of electronic book
CN109168074A (en) * 2018-10-25 2019-01-08 苏宁智能终端有限公司 A kind of video broadcasting method and device
CN109727301A (en) * 2018-12-29 2019-05-07 北京字节跳动网络技术有限公司 Generate method, apparatus, electronic equipment and the storage medium of dynamic wallpaper
CN110069182A (en) * 2019-04-28 2019-07-30 努比亚技术有限公司 Wallpaper control method, mobile terminal and computer readable 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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114296854A (en) * 2021-12-28 2022-04-08 珠海豹趣科技有限公司 Desktop wallpaper display method and device, electronic equipment and readable storage medium
CN114296854B (en) * 2021-12-28 2024-04-26 珠海豹趣科技有限公司 Desktop wallpaper display method and device, electronic equipment and readable storage medium
CN115277924A (en) * 2022-07-26 2022-11-01 努比亚技术有限公司 Dynamic screen locking display control method and device and computer readable storage medium
CN115277924B (en) * 2022-07-26 2024-05-17 努比亚技术有限公司 Dynamic lock screen display control method, equipment and computer readable storage medium
CN116743908A (en) * 2022-09-13 2023-09-12 荣耀终端有限公司 Wallpaper display method and related device
CN116743908B (en) * 2022-09-13 2024-03-26 荣耀终端有限公司 Wallpaper display method and related device
CN115941836A (en) * 2022-10-28 2023-04-07 荣耀终端有限公司 Interface display method, electronic equipment and storage medium
CN115941836B (en) * 2022-10-28 2023-10-20 荣耀终端有限公司 Interface display method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111209065B (en) 2023-12-08

Similar Documents

Publication Publication Date Title
CN111240777B (en) Dynamic wallpaper generation method and device, storage medium and electronic equipment
CN111209065B (en) Dynamic wallpaper setting method and device, storage medium and electronic equipment
CN111240774B (en) Dynamic wallpaper generation method and device, storage medium and electronic equipment
US11706331B2 (en) Information processing method and apparatus, storage medium, and electronic device
CN112217671B (en) Method and equipment for performing interface display on front-end micro-service based on split deployment
CN112882709B (en) Rendering method, device, equipment and storage medium based on container engine system
CN111240776B (en) Dynamic wallpaper setting method and device, storage medium and electronic equipment
CN109857506B (en) Method and device for realizing guide information, electronic equipment and storage medium
CN112035768A (en) Page rendering method and device for fast application, storage medium and electronic equipment
CN113613064B (en) Video processing method, device, storage medium and terminal
CN110471701B (en) Image rendering method and device, storage medium and electronic equipment
CN113467663B (en) Interface configuration method, device, computer equipment and medium
US20240040069A1 (en) Image special effect configuration method, image recognition method, apparatus and electronic device
CN112420217A (en) Message pushing method, device, equipment and storage medium
CN113747199A (en) Video editing method, video editing apparatus, electronic device, storage medium, and program product
CN113313804A (en) Image rendering method and device, electronic equipment and storage medium
CN113220366A (en) Sub-application starting method and device, terminal and server
CN112257006A (en) Page information configuration method, device, equipment and computer readable storage medium
WO2022057889A1 (en) Method for translating interface of application, and related device
CN109814915B (en) Parameter configuration method, device, medium and electronic equipment based on lua
CN107291468B (en) Method for playing power-on/power-off animation, terminal and computer readable storage medium
US20220292141A1 (en) Quick Application Startup Method and Related Apparatus
CN114530148A (en) Control method and device and electronic equipment
CN112732250A (en) Interface processing method, device and storage medium
KR100603580B1 (en) Method for realizing user interface of mobile terminal

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