CN115390935A - Theme resource processing method and electronic equipment - Google Patents

Theme resource processing method and electronic equipment Download PDF

Info

Publication number
CN115390935A
CN115390935A CN202110919955.7A CN202110919955A CN115390935A CN 115390935 A CN115390935 A CN 115390935A CN 202110919955 A CN202110919955 A CN 202110919955A CN 115390935 A CN115390935 A CN 115390935A
Authority
CN
China
Prior art keywords
module
theme
resource
user
application
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.)
Pending
Application number
CN202110919955.7A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN115390935A publication Critical patent/CN115390935A/en
Pending legal-status Critical Current

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a theme resource processing method and electronic equipment, and under the condition that theme resources are not matched with a system, the function of changing themes of modules (such as service cards, large folders and the like) after the system is upgraded can be realized at the first time, so that the desktop visual effect of a user is better. The method comprises the following steps: a user request is received, the request being used to instruct the electronic device to apply the user-selected theme resource. It is determined that the topic resource of the first module is absent from the user-selected topic resources. And generating the theme resources of the first module according to a preset strategy. And displaying an interface of the theme resource selected by the application user and the theme resource of the first module.

Description

Theme resource processing method and electronic equipment
The present application claims priority of the chinese patent application entitled "a method for changing skin of a card" filed by the national intellectual property office at 21/05/2021 under the application number 2021105656464.3, the entire contents of which are incorporated herein by reference.
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a theme resource processing method and an electronic device.
Background
With the continuous development of terminal technology, more and more electronic devices support the function of changing the theme of the system desktop or the application program interface, and a user can modify the theme style of the system desktop or the application program interface according to the preference of the user.
At present, if an operating system (e.g., harmon operating system (harmony os), android, IOS, windows, etc.) of an electronic device is upgraded, a developer of an online theme pack needs to wait for a new version of the operating system to be released due to problems such as copyright, specification, etc., the developer of the online theme pack adapts the online theme pack to the new version of the operating system, and puts the online theme pack in an online theme mall, and a user can use the online theme pack, which is a long process period. After the operating system of the electronic device is upgraded, if the theme resources are not adapted to the system, the updated module (for example, a service card (service widget), a large folder, etc.) of the electronic device cannot realize the function of changing the theme in the first time.
Disclosure of Invention
The embodiment of the application provides a theme resource processing method and electronic equipment, and under the condition that theme resources are not adaptive to a system, a function of changing themes can be realized by modules (such as service cards, large folders and the like) after the system is upgraded at the first time, so that the desktop visual effect of a user is better.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a theme resource processing method, which is applied to an electronic device with a display screen, and the method includes: a user request is received, the request being used to instruct the electronic device to apply the user-selected theme resource. It is determined that the topic resource of the first module is absent from the user-selected topic resources. And generating the theme resources of the first module according to a preset strategy. And displaying an interface of the theme resource selected by the application user and the theme resource of the first module.
Based on the above technical solution, in the case that it is determined that the theme resource of the first module is absent in the theme resources selected by the user, for example: after the operating system is upgraded, the theme resource selected by the user is not adapted to the upgraded operating system, that is, under the condition that the theme resource selected by the user lacks the resource of the module (namely, the first module) after the system is upgraded, the theme resource of the first module can be generated according to the preset strategy, and then an interface applying the theme resource selected by the user and the theme resource of the first module is displayed, so that the function of changing the theme of the module (such as a service card, a large folder and the like) after the system is upgraded can be realized at the first time, and the desktop visual effect of the user is better.
In one possible design, the theme resources of the first module include background resources of the first module.
In one possible design, the user-selected theme resource includes mask layer information and mask layer information. Generating the theme resources of the first module according to a preset strategy, wherein the theme resources comprise: and generating the background resource of the first module according to the mask layer information and the mask layer information. Based on the design, the background resource of the first module can be generated according to the mask layer information and the mask layer information in the theme resource selected by the user, so that the theme of the background of the first module (such as a service card, a large folder and the like) can be successfully replaced at the first time, and the desktop visual effect of the user is better.
In one possible design, the user-selected theme resource includes small folder background information. Generating the theme resources of the first module according to a preset strategy, wherein the theme resources comprise: and generating the background resource of the first module according to the background information of the small file. Based on the design, the theme resources of the first module can be generated according to the background information of the small files in the theme resources selected by the user, so that the background of the first module (such as a service card, a large folder and the like) can be successfully changed into the theme in the first time, and the desktop visual effect of the user is better.
In one possible design, the small file background information includes background color information, and the background color information includes picture information or color values. Based on the design, the theme resource of the first module is generated according to the background information of the small file included in the theme resource selected by the user, which may be specifically implemented according to the background color information included in the background of the small folder, for example: the picture information, color values, etc. generate the background resources of the first module. Illustratively, the background picture of the small folder is used as the background of the first module, or the background color of the small folder is used as the background color of the first module. Therefore, the background of the first module (such as a service card, a large folder and the like) can be successfully changed with the theme in the first time, and the desktop visual effect of the user is better.
In one possible design, the theme resources of the first module further include font resources of the first module. Generating the theme resources of the first module according to a preset strategy, wherein the theme resources comprise: and generating the font resource of the first module according to the background resource of the first module.
In one possible design, the background resource of the first module includes background information, and the background information includes any one or more of variance, complexity, and contrast. Generating font resources of the first module according to the background resources of the first module, wherein the font resources of the first module comprise: and generating the font resource of the first module according to the background information of the first module. Based on the design, font resources of the first module are generated according to the background information of the first module so as to meet the requirement that characters can be clearly identified, and meanwhile, the theme of the characters on the desktop can be replaced at the first time, so that the desktop visual effect of a user is better.
In one possible design, prior to receiving the user request, the method further includes: and replacing the second module by the first module according to the replacement rule. The first module (for example, a service card, a large folder and the like) mentioned in the embodiment of the application can provide better service experience for the user, so based on the design, the system can generate the first module according to the replacement rule, so that the user can experience the related functions of the first module.
In one possible design, the replacement rules include any one or more of: replacing the second module by the first module with the same number of the grids occupied by the length and the width as the second module; replacing the second module by the first module with the length and width occupying grids smaller than the second module; replacing a second module occupying a second number of cells with a first module occupying a first number of cells, the first number being less than the second number; the second module occupying the number of the fourth number of cells is replaced by the first module occupying the number of the third number of cells, and the third number is larger than the fourth number.
In one possible design, the first module is a service card and/or a large folder, and the second module is a widget.
In a second aspect, embodiments of the present application provide an electronic device, including a processor, a memory, and a display screen, the memory and the display screen being coupled to the processor, the memory being configured to store computer program code, the computer program code including computer instructions, which when read by the processor from the memory, cause the electronic device to perform the method as set forth in any one of the above first aspects.
In a third aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program or instructions are stored, which, when run on a computer, cause the computer to perform the method as set forth in any of the above-mentioned first aspects.
In a fourth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes: computer program or instructions for causing a computer to perform the method as set forth in any of the preceding designs of the first aspect when the computer program or instructions is run on a computer.
In a fifth aspect, an embodiment of the present application provides a chip system, including at least one processor and at least one interface circuit, where the at least one interface circuit is configured to perform a transceiving function and send an instruction to the at least one processor, and when the at least one processor executes the instruction, the at least one processor performs the method as designed in any one of the first aspects.
It should be noted that, for technical effects brought by any design in the second aspect to the fifth aspect, reference may be made to technical effects brought by corresponding designs in the first aspect, and details are not described here.
Drawings
Fig. 1a is a schematic diagram of a related interface including a widget according to an embodiment of the present application;
fig. 1b is a schematic diagram of another related interface including a widget according to an embodiment of the present application;
fig. 1c is a schematic diagram of another related interface including a widget according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a related interface including a service card according to an embodiment of the present disclosure;
FIG. 3a is a schematic diagram of a related interface including a large folder according to an embodiment of the present application;
fig. 3b is a schematic diagram of an interface directly entering a corresponding interface through an icon in a large folder according to an embodiment of the present application;
fig. 4 is a schematic interface diagram for prompting a user that a theme is incompatible with a system according to an embodiment of the present application;
FIG. 5a is a schematic diagram of another interface for prompting a user that a theme is incompatible with a system according to an embodiment of the present application;
FIG. 5b is a schematic interface diagram of a theme with incompatible applications and systems according to an embodiment of the present application;
fig. 6 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application;
fig. 7 is a block diagram of a software structure of an electronic device according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a related interface for a user to select a topic according to an embodiment of the present application;
FIG. 9 is a schematic interface diagram of a theme with incompatible applications and systems provided in an embodiment of the present application;
fig. 10 is a schematic flowchart of a method for processing a subject resource according to an embodiment of the present application;
fig. 11 is a flowchart illustrating a method for generating font resources of a service card according to an embodiment of the present application;
FIG. 12 is a schematic flowchart of another method for processing a subject resource according to an embodiment of the present application;
fig. 13 is a schematic view of an interface for replacing a widget with a service card according to an embodiment of the present application;
fig. 14 is a schematic view of an interface related to replacing a widget with a service card according to an embodiment of the present application;
fig. 15 is a schematic view of a related interface for replacing a widget with a service card according to an embodiment of the present application;
fig. 16 is a schematic diagram of an interface that does not support desktop layout adjustment according to an embodiment of the present application;
fig. 17 is a schematic view of an interface for replacing a widget with a service card according to an embodiment of the present application;
fig. 18a is a schematic flowchart of a method for replacing a widget with a service card according to an embodiment of the present application;
fig. 18b is a flowchart illustrating a method for replacing a widget with a service card according to an embodiment of the present application;
fig. 19 is a schematic diagram of an interface for replacing a widget with a service card and migrating data in the widget to the service card according to an embodiment of the present application;
fig. 20 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 21 is a schematic structural diagram of a chip system according to an embodiment of the present disclosure.
Detailed Description
The subject resource processing method and the electronic device provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The terms "comprises" and "comprising," and any variations thereof, as used in the description of the embodiments of the present application, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "such as" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the embodiments of the present application, the meaning of "a plurality" means two or more unless otherwise specified. "and/or" herein is merely an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone. The terms "first," "second," and the like do not denote any order or importance, but rather the terms "first," "second," and the like do not denote any order or importance.
First, for the sake of understanding, the following description will be made of terms and concepts related to the embodiments of the present application.
1. Small parts (widget)
widgets are components of applications, which are views of mini-applications. widgets may be embedded in other applications (e.g., desktops). One application may support multiple widgets. The user can add the needed widget to the desktop in the form of an add-on component. For example, the weather module 101 shown in fig. 1a, the memo module 102 shown in fig. 1b, and the clock module 103 shown in fig. 1c are all widgets, and corresponding functions can be implemented by clicking the widget to enter an interface of a corresponding application program.
Attributes supported by a widget include minimum size placement, period to update the widget, initial placement resources, maximum width and minimum height, among others, which indicate the width and height occupied by the widget. The arrangement of the widgets on the screen is based on the grids which can also be called grids. For example, the size of the weather module 101 shown in fig. 1a is 4 × 1 grid; note module 102 shown in fig. 1b is 2 x 2 squares in size; the clock module 103 shown in fig. 1c has a size of 4 × 1 grid.
2. Service card
Important information of a user application program (APP) is displayed on a desktop in a service card mode, and a user can use the service card through a shortcut gesture so as to achieve the purposes of directly reaching a service and reducing level jump. Alternatively, each application may configure the service card as desired. Wherein, an application program can configure at least one service card.
Illustratively, modules 201 and 202 shown in fig. 2 are service cards. The service card can increase the use convenience of the application program, and the functions which can be realized only by opening the APP before can be directly realized through the service card.
In some embodiments, the design criteria and/or specific implementation of the service card are different from existing widgets, i.e., both are completely different components.
In other embodiments, the design criteria and/or implementation of the service card are the same as the existing widget, but there is a difference in function and/or display effect, i.e. they are similar. For example: replacing an existing widget with a service card means that the replaced service card can present contents contained in the existing widget on a desktop in different forms, that is, with different display effects, and/or the replaced service card can provide more and more humanized functions compared with the existing widget, for example: the user can share the contents such as articles, pages and the like in a service card mode by adopting card operation, and friends can directly open and watch the contents without downloading.
3. Large folder
The large folder supports applications in the folder to be opened directly on the desktop without opening the folder. Illustratively, the module 301 shown in FIG. 3a is a large folder. When the large folder is used for APP classification, the user can be automatically helped to perform similar application classification. Through the APP icons in the large folder, the application programs corresponding to the icons can be directly accessed. Illustratively, clicking on the clock APP icon 302 in the large folder may directly enter a clock APP interface 300 such as that shown in FIG. 3b, without first opening the large folder.
4. Parameters of an image
Parameters of an image (which may also be referred to as a picture, wallpaper, etc.) include contrast, variance, complexity, etc.
The contrast ratio refers to the contrast ratio of the pure white picture brightness and the overall average brightness of the wallpaper. The smaller the contrast, the lighter the picture color. The greater the contrast, the darker the picture color.
Variance refers to the deviation of the brightness of each area of the wallpaper from the overall average brightness. The smaller the variance, the closer the brightness of each region of wallpaper. The larger the variance is, the larger the brightness difference of each area of the wallpaper is. If the variance is large (for example, larger than 6000), the brightness difference of each area of the wallpaper is large, and the requirement of the identifiability of all the areas cannot be met only by changing the brightness of the characters, so that a black mask can be added on the wallpaper to improve the identifiability of the characters.
Complexity refers to the complexity of the wallpaper texture. The less complex, the coarser the wallpaper texture, e.g.: only one horizontal line is arranged on a pure color picture, and the complexity of the picture is small. The greater the complexity, the finer the texture, for example: a pure color picture has many irregular lines and shapes, and the picture has a high complexity.
At present, if an operating system of an electronic device is upgraded, if modules (such as contacts, status bars, desktops, and the like) in an online theme pack are incompatible, an existing solution directly and strongly prompts a user to accept the current situation. For example, as shown in fig. 4, a user selects a theme from a theme mall, and if the theme is incompatible with the current operating system, the electronic device may display an interface 400 such as that shown in fig. 4 to prompt the user during the process of browsing the theme by the user, and the theme may not be used currently.
Or, if there is an incompatibility situation among the modules in the online theme pack, the existing solution will directly switch the available theme for the user, which is very unfriendly to the user. Illustratively, as shown in fig. 5a, during the process of browsing the theme by the user, the electronic device displays an interface 500 for prompting the user that the theme is incompatible with the current operating system. If a user indication of an operation to select the theme is detected, such as detecting that the user has clicked on button 501, the electronic device may present an interface 510 as shown in FIG. 5b. In this interface 510, the final display effect of the modules 502 and 503 is not consistent with the display effect of other icons (such as gallery icons), so that the whole interface is not harmonious and not beautiful.
In order to solve the above technical problem, an embodiment of the present application provides a theme resource processing method and an electronic device. The electronic device receives a user request instructing the electronic device to apply the user-selected theme resource. The electronic equipment determines that the theme resources selected by the user lack the theme resources of the first module, then generates the theme resources of the first module according to a preset strategy, and finally displays an interface applying the theme resources selected by the user and the theme resources of the first module. Under the condition that the theme resources selected by the user are not matched with the system, namely when the theme resources selected by the user lack the resources of the module after the system is upgraded, the theme resources of the module after the system is upgraded can be generated according to the preset strategy, the generated theme resources of the module after the system is upgraded are adopted as the module replacing theme after the system is upgraded, the function of replacing the theme of the module after the system is upgraded (such as a service card, a large folder and the like) can be realized at the first time, and the desktop visual effect of the user is better.
The subject resource processing method provided by the embodiment of the application can be applied to the electronic device 600 or a system including the electronic device 600.
Optionally, the electronic device 600 may specifically be a mobile phone, a tablet computer, an in-vehicle device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), an artificial intelligence (artificial intelligence) device, a wearable device, and other terminal devices having a voice recognition function, and the wearable device may be a smart watch, a smart bracelet, a wireless headset, smart glasses, a smart meter, a blood glucose meter, a blood pressure meter, and the like. The embodiment of the present application does not set any limit to the specific type of the electronic device 600.
For example, fig. 6 shows a schematic structural diagram of the electronic device 600. The electronic device 600 may include a processor 610, an external memory interface 620, an internal memory 621, a Universal Serial Bus (USB) interface 630, a charging management module 640, a power management module 641, a battery 642, an antenna 1, an antenna 2, a mobile communication module 650, a wireless communication module 660, an audio module 670, a sensor module 680, a button 690, a motor 691, a pointer 692, a camera 693, a display 694, and a Subscriber Identity Module (SIM) card interface 695, among others. Among other things, sensor module 680 may include touch sensor 681.
Processor 610 may include one or more processing units, such as: the processor 610 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be, among other things, a neural center and a command center of the electronic device 600. The controller can generate an operation control signal according to the instruction operation code and the time sequence signal to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 610 for storing instructions and data. In some embodiments, the memory in the processor 610 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 610. If the processor 610 needs to use the instruction or data again, it can be called directly from memory. Avoiding repeated accesses reduces the latency of the processor 610, thereby increasing the efficiency of the system.
The charging management module 640 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger.
The power management module 641 is configured to connect the battery 642, the charging management module 640 and the processor 610. The power management module 641 receives the input from the battery 642 and/or the charging management module 640, and supplies power to the processor 610, the internal memory 621, the external memory, the display 694, the camera 693, the wireless communication module 660, and the like.
The wireless communication function of the electronic device 600 may be implemented by the antenna 1, the antenna 2, the mobile communication module 650, the wireless communication module 660, the modem processor, the baseband processor, and the like.
The mobile communication module 650 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the electronic device 600. The mobile communication module 650 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like.
The wireless communication module 660 may provide a solution for wireless communication applied to the electronic device 600, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like.
The electronic device 600 implements display functions via the GPU, the display screen 694, and the application processor, among other things. The GPU is a microprocessor for image processing, connected to the display screen 694 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 610 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 694 is used to display images, video, and the like. In some embodiments, the electronic device 600 may include 1 or N display screens 694, where N is a positive integer greater than 1. In some embodiments of the present application, the display screen 694 can be used to display an interface that applies the theme resources selected by the user and the theme resources of the first module.
The electronic device 600 may implement a capture function via the ISP, the camera 193, the video codec, the GPU, the display 694, and the application processor, among others.
The camera 693 is used to capture still images or video.
The external memory interface 620 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100.
Internal memory 621 may be used to store computer-executable program code, including instructions. The internal memory 621 may include a program storage area and a data storage area. The internal memory 621 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 610 executes various functional applications of the electronic device 600 and data processing by executing instructions stored in the internal memory 621 and/or instructions stored in a memory provided in the processor.
The audio module 670 includes a speaker, a receiver, a microphone, an earphone interface, and the like.
The audio module 670 serves to convert digital audio data into analog audio electrical signal output and also serves to convert analog audio electrical signal input into digital audio data, and the audio module 670 may include an analog-to-digital converter and a digital-to-analog converter.
In some embodiments, the electronic device 600 may implement audio functionality through the audio module 670, as well as an application processor and the like. Such as music playing, recording, etc.
The touch sensor 681 is also called a "touch device". The touch sensor 681 may be disposed on the display screen 694, and the touch sensor 681 and the display screen 694 form a touch screen, which is also referred to as a "touch screen". The touch sensor 681 is used to detect a touch operation applied thereto or therearound. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided via the display screen 694. In other embodiments, the touch sensor 681 can be disposed on the surface of the electronic device 600 at a different location than the display screen 694.
Optionally, the sensor module 680 may further include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation to the electronic device 600. In other embodiments of the present application, the electronic device 600 may include more or fewer components than illustrated, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The software system of the electronic device 600 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the invention takes an Android system with a layered architecture as an example, and exemplarily illustrates a software structure of the electronic device 600.
Fig. 7 is a block diagram of a software configuration of an electronic device 600 according to an embodiment of the present invention.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 7, the application packages may include camera, gallery, calendar, call, map, navigation, WLAN, bluetooth, music, video, theme, etc. applications.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 7, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a Package Manager Service (PMS), and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
Content providers are used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions for the electronic device 600. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to notify download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scrollbar text in a status bar at the top of the system, such as a notification of a running application in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The PMS runs in a system server (system server) process and is mainly used for realizing functions of application installation and uninstallation, component lookup and matching, authority management and the like. Under the condition that the application installation function is realized, the PMS scans a specified directory in the system, finds out files in which android packages (apks) end, analyzes the files to obtain all information of the application program, and completes the installation process of the application program.
In some embodiments of the present application, when a user upgrades an operating system of an electronic device through an over the air technology (OTA) or other related technologies, a desktop (which may also be referred to as a desktop application, launcher, etc.) may query the current aggregated information of the supported service cards through the PMS to complete the process of replacing a widget with a service card. Specific implementations are not described herein and will be set forth in detail below. It should be understood that the system upgrade referred to in the embodiment of the present application may be a small version upgrade, for example, the version 11.1 is upgraded to the version 11.2, or a large version upgrade, for example, the version 11 is upgraded to the version 12, which is not limited in this application.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following illustrates the workflow of the software and hardware of the electronic device 600 in conjunction with a subject resource processing scenario. When touch sensor 681 receives a touch event, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, time stamp information of the touch operation). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a single-click operation, and taking a control corresponding to the single-click operation as a control for applying a theme selected by the user as an example, optionally, the theme may be a theme downloaded to the local by the user through a theme application. At this time, the desktop of the application layer is run, the desktop loads and analyzes the theme resource package selected by the user through the PMS of the application framework layer, and when it is determined that the theme resource of the first module (for example, a service card, a large folder, or the like) is absent in the theme resource, the processor 610 generates the theme resource of the first module according to a preset policy, and finally invokes the display driver of the kernel layer, and displays the theme resource selected by the application user and the interface of the theme resource of the first module through the display screen 694. The preset strategy is not described here, and will be described in detail later. It should be understood that the theme resource package selected by the user means a data package in which the theme resource selected by the user is located, and for convenience of description, it is simply referred to as the theme resource package selected by the user, and is collectively described herein.
The following detailed description is made with reference to the accompanying drawings. Illustratively, as shown in fig. 8, the interface 800 includes a theme APP, and when the user clicks an icon 801 of the theme APP, the electronic device may jump to the interface 810, and in the interface 810, the user may select a theme according to his/her preference. Taking the theme selected by the user as the theme 802 as an example, the operation of the user for selecting the theme 802 is detected, for example, when the user is detected to click on the theme 802, the electronic device jumps to the interface 820. In the interface 820, the user can preview the topic 802. When detecting an operation instruction of the user to download the theme 802, for example, detecting that the user clicks the button 803, the electronic device downloads the theme to the local, and after the downloading is completed, the electronic device may jump to the interface 830, when detecting an operation instruction of the user to apply the theme 802, for example, detecting that the user clicks the button 804, the electronic device starts to configure the theme for the desktop, and after the configuration is completed, when detecting an operation instruction of the user returning to the desktop, the electronic device may jump to the interface shown in fig. 9.
After the operating system of the electronic equipment is upgraded, the first module exists in the electronic equipment, but the theme resource of the first module may not exist in the theme resource selected by the user, so the theme resource of the first module is generated according to the workflow, so that the theme can be replaced for the first module. Optionally, the first module may be a module newly generated by the electronic device, or may be a module generated by replacing the second module with the first module, where the second module is a module existing before the operating system of the electronic device is upgraded. The present application does not limit the specific implementation manner of generating the first module.
Therefore, optionally, before the electronic device executes the workflow, the electronic device may execute a process of replacing the second module with the first module, thereby generating the first module. The following specifically describes a process of replacing a widget with a service card, taking the first module as a service card and the second module as a widget as an example.
When a user upgrades an operating system of the electronic device, the desktop of the application program layer queries the set information of the currently supported service cards from the internal memory 121 according to the PMS of the application program framework layer, and determines whether to replace the widget on the desktop with the corresponding service card according to the set information.
The set information includes Identifier (ID) information of an application supporting the widget to be replaced by the service card, and the identifier information may be used for the electronic device to identify each application. It should be understood that if an application supports the replacement of a widget with a service card, the widget included with the application also supports the replacement of a service card. Optionally, the set information may also include identification information of an application that does not support widget replacement into a service card, in this case, the set information further needs to indicate which application identification information that supports widget replacement into a service card is specific, and which application identification information that does not support widget replacement into a service card is specific, so that the electronic device can identify whether each application supports widget replacement into a service card.
The method comprises the steps that a complete mapping relation is preset in an electronic equipment system, and the mapping relation is the relation among a widget, a service card package name and a provider (provider), so that the electronic equipment can replace the widget with a service card according to the mapping relation. Optionally, the mapping relationship may exist in the form of a mapping table, or may exist in the form of a key-value pair, which is not limited in this application
For example, the mapping relationship may be as shown in table 1.
TABLE 1
widget ID Service card ID provider ID
widget1 FA1 provider1
widget2 FA2 provider2
As shown in table 1, for convenience of description, the service card is denoted by FA. The widget ID is used for identifying the widget, the service card ID is used for identifying the service card, namely the name of the service card packet replaced by the widget, the provider ID is used for identifying the provider, and the provider is used for completing the process of replacing the widget by the service card. Illustratively, the provider may be an application, a light application, or an application capable of generating a service card and/or widget, and the like. The name of the service card packet replaced by the widget1 is FA1, and the provider1 is used for completing the replacement process between the widget1 and the FA 1. The name of the service card packet replaced by the widget2 is FA2, and the provider2 is used for completing the replacement process between the widget2 and the FA 2.
Optionally, a replacement rule is further stored in the electronic device system in advance, and the electronic device may execute the process of replacing the widget with the service card according to the preset replacement rule. The alternative rules are not described here and will be described in detail later.
Optionally, in the process of loading and analyzing the theme resource package selected by the user on the desktop, the theme may generate the theme resource package of the first module in the theme resource package selected by the user in advance according to the result of replacing the second module with the first module returned by the desktop, and use the theme resource package name identifier of the first module. For example: data/the ms/com. Wherein, the s is the packet name of the theme resource packet selected by the user, and com. And subsequently, generating the theme resources of the first module according to a preset rule, and storing the theme resources of the first module into a pre-generated theme resource package of the first module.
Optionally, before storing the theme resource of the first module in the pre-generated theme resource package of the first module, the theme resource of the first module may also be stored in a temporary path of the electronic device, for example: in a cache of the electronic device. And then copying the theme resources of the first module to a pre-generated theme resource package of the first module.
As shown in fig. 10, a theme resource processing method provided in this embodiment may be applied to an electronic device with a display screen, and the method includes the following steps:
s1001, receiving a user request.
Wherein the request is used for indicating the theme resources selected by the user of the electronic equipment application. It should be understood that the data packet in which the theme resource is located includes a theme, which may be a desktop theme or other theme, and the theme may be a theme downloaded locally from a theme application by a user, which is not limited in this application.
For example, the electronic device may receive a user request through the display screen, where the user request may be an instruction input by the user on the display screen of the electronic device, for example, a click operation of the button 804 in the interface 830 shown in fig. 8 by the user.
S1002, determining that the theme resources selected by the user lack the theme resources of the first module.
For example, the first module may be a module newly generated by a user after upgrading an operating system of the electronic device. Optionally, the first module may be a service card and/or a large folder, which is not limited in this application.
For example, the theme resource package selected by the user may include the contents shown in table 2.
TABLE 2
Figure BDA0003207104800000101
For example, the content in the com.android.contacts file is a topic resource of a contact, the content in the com.huawei.android.launcher file is a topic resource of a desktop, the content in the description.xml file is a version number of the topic, and the like, which are not described one by one here.
And S1003, generating the theme resource of the first module according to the preset strategy.
Wherein the theme resources of the first module comprise background resources of the first module.
In a possible implementation manner, the theme resource selected by the user includes mask layer information and mask layer information, and the background resource of the first module may be generated according to the mask layer information and the mask layer information. It should be understood that the mask layer and the mask layer are layers of a picture, and a picture may be composed of the mask layer and the mask layer. The mask layer may also be referred to as a mask, and the mask layer may also be referred to as a mask. The mask layer and the mask, and the mask layer and the mask mentioned in the present application are the same meaning without additional description.
For example, taking the first module as a service card as an example, the electronic device parses a theme resource package selected by a user, obtains mask layer information and mask layer information included in the theme resource package, generates a new layer, that is, a background resource of the service card, when the mask layer information and the mask layer information are fused with a background of the service card, stores the layer in the theme resource package of the service card, and then applies the layer to the background of the corresponding service card by using a service card package name, that is, a theme resource package name of the service card. It should be noted that the service card may be an operation card, a non-operation card, a three-party card, a card developed by a manufacturer, and the like, which is not limited in this application and is described in a unified manner herein, and will not be described in detail herein.
In another possible implementation manner, the theme resource selected by the user includes small folder background information, and the background resource of the first module may be generated according to the small folder background information, where the small folder background information includes background color information. Illustratively, the module 901 shown in FIG. 9 is a small folder.
Wherein, in this implementation, the following design may also be included:
design 1, the background color information of the small file comprises picture information, and background resources of the first module are generated according to the picture information. Optionally, the format of the picture included in the picture information may be png or jpg, which is not limited in this application.
For example, taking the first module as a service card, the electronic device analyzes the theme resource package selected by the user, and obtains background color information of the small folder included in the theme resource package. And under the condition that the background color information comprises the picture information, acquiring the color value of the specified area of the picture, and taking the color value as the background of the service card, namely generating the background resource of the service card. For example, the obtaining of the color value of the designated area of the picture may be implemented in various ways, and this is not particularly limited in this application. For example: the color value of the specified circular picture can be obtained by taking the center of the picture as the center of a circle and the width of the small folder as the radius. Another example is: or the center of the picture can be used as the center of a circle, the length of the diagonal line of the small folder can be used as the radius, and the quarter-sector-shaped picture color value can be obtained. Another example is: the color value of the picture with the designated ellipse size can be obtained by taking the center of the picture as the center of a circle, taking 2 times of the width of the small folder as the long diameter and taking the length of the diagonal line of the small folder as the short diameter. It should be noted that the designated area may be an area of any shape and any size, and the present application is not limited to this.
Design 2, the background color information of the small folder comprises color values, and background resources of the first module are generated according to the color values.
For example, still taking the first module as a service card as an example, the electronic device analyzes the theme resource package selected by the user, and obtains background color information of the small folder included in the theme resource package. And in the case that the background color information comprises a color value, taking the color value as the background color of the service card, namely, generating the background resource of the service card. Optionally, the number of the color values may be 1 or more, and any one of the color values may be used as the background color of the service card.
Optionally, the theme resource of the first module further includes a font resource of the first module, and the font resource of the first module may be generated according to the background resource of the first module. Wherein, the background resource of the first module comprises background information, and the background information comprises any one or more of variance, complexity and contrast. The font resource of the first module may be generated according to the background information of the first module. It should be understood that here variance, complexity, contrast refer to parameters of the background of the first module (i.e. the wallpaper of the first module).
It should be noted that the font resource of the first module can be used to replace the theme resource of the text included in the first module.
In one possible implementation, in a case that the background information includes a variance and a complexity, if the variance is greater than or equal to a first threshold and the complexity is greater than or equal to a second threshold, the generated font resource includes a mask of a first degree. Alternatively, the mask may be a black mask or a mask of another color, which is not limited in this application. It is understood that the first degree refers to the depth of the mask color, for example: the first degree may be 10%. Optionally, the generated font resource may further include shadow information.
In another possible implementation, in a case that the background information includes a variance, a contrast, and a complexity, if the variance is smaller than a first threshold, the complexity is smaller than a second threshold, and the contrast is smaller than a third threshold, the background resource of the first module is updated. Alternatively, the updating may be understood as re-selecting the wallpaper color value for the first module.
In another possible implementation manner, in a case that the background information includes a variance, a contrast, and a complexity, if the variance is smaller than a first threshold, the complexity is smaller than a second threshold, and the contrast is larger than a fourth threshold, the generated font resource includes shadow information.
In yet another possible implementation manner, in a case that the background information includes a variance, a contrast, and a complexity, if the variance is smaller than a first threshold, the complexity is smaller than a second threshold, and the contrast is greater than or equal to a third threshold and less than or equal to a fourth threshold, the generated font resource includes a second degree of mask. Wherein the second degree is less than the first degree. It will be appreciated that the second degree also refers to the depth of the mask colour, for example: the second degree may be 5%. Optionally, shadow information may also be included in the generated font resource.
Optionally, the generated font resource may further include a font type, for example: regular script, bold, song script, etc., as well as non-limiting aspects of the present application.
The first threshold, the second threshold, the third threshold, and the fourth threshold may be designed by a developer according to actual requirements. For example, the first threshold may be 6000, the second threshold may be 10, the third threshold may be 1.9, the fourth threshold may be 7, and these thresholds may be other values, which is not limited in this application.
For example, the first module is used as a service card, and the characters in the service card are defaulted to white fonts, it should be understood that the characters included in the first module may also be fonts of other colors, and the application is not limited thereto. After the background resource of the service card is generated according to the method, the font resource of the first module may be generated according to the variance, complexity, contrast, and the like of the wallpaper included in the background resource.
The following description will be given by way of example with reference to the accompanying drawings, and as shown in fig. 11, it is an exemplary flowchart of a method for generating a service card font resource provided by the embodiment of the present application, where the method includes the following steps:
s1101, judging whether the variance of the service card wallpaper is larger than or equal to a first threshold value, and the complexity of the service card wallpaper is larger than or equal to a second threshold value.
For example, the first threshold may be 6000, or other values. The second threshold may be 10, or may be other values, which are not specifically limited in the present application.
It should be understood that the wallpaper is the wallpaper included in the background resource of the service card generated according to the above method.
If yes, go to step S1102, otherwise go to step S1103.
S1102, generating a font resource containing a white font, a first degree black mask and a first standard shadow.
Wherein, the first degree black mask can be added on the wallpaper whole of the service card, and the first standard shadow can be added on the characters. The first criterion refers to the degree of the added shadow, and the meaning of the first criterion refers to the above description, which is not repeated herein.
For example, the first degree may be 10%, the first criterion may be 20%, and the first degree and the first criterion may be other values, which are not specifically limited in the present application.
S1103, judging whether the variance of the service card wallpaper is smaller than a first threshold value or not, and the complexity of the service card wallpaper is smaller than a second threshold value.
If yes, go to step S1104, otherwise, end.
And S1104, judging whether the contrast of the wallpaper of the service card is smaller than a third threshold.
For example, the third threshold may be 1.9, or may be other values, which are not specifically limited in this application.
If yes, go to step S1105, otherwise go to step S1106.
And S1105, updating the color value of the service card wallpaper.
The smaller the contrast is, the lighter the picture color is, so that the color of the wallpaper of the service card is extremely close to the color of the characters, and the characters cannot be recognized by a user, so that the color value of the wallpaper can be changed, and the user can recognize the characters in the wallpaper. For example, the color of the service card wallpaper may be modified to be black or other colors, which is not limited in the present application.
Alternatively, this step may be replaced with updating the color values of the service card font. For example, the font is modified into a black font or a font with other colors, which is not limited in this application.
S1106, judging whether the contrast of the service card wallpaper is larger than a fourth threshold value.
For example, the fourth threshold may be 7, or may be other values, which are not limited in this application.
If so, step S1107 is executed, and if not, step S1108 is executed.
S1107, font resources including white fonts and the first standard shadow are generated.
Wherein a first standard shadow may be added over the text.
S1108, whether the contrast of the service card is greater than or equal to a third threshold value and less than or equal to a fourth threshold value is judged.
If yes, go to step S1109, otherwise, end.
And S1109, generating a font resource comprising a white font, a second-degree black mask and a first standard shadow.
Wherein the second degree black mask can be added to the wallpaper of the service card as a whole, and the first standard shadow can be added on the characters.
For example, the second degree may be 5% or other values, and the present application does not specifically limit this.
Optionally, one or more first criteria in the steps S1102, S1107, and S1109 may also be replaced by a second criterion, where the second criterion is different from the first criterion, that is, the embodiment of the present application does not limit the degree of shading in the above steps to be the same to some extent.
The present application does not limit the execution order of the above steps.
And S1004, displaying the theme resources selected by the application user and the interface of the theme resources of the first module.
Illustratively, the interface may be as shown in FIG. 9.
The data packet generated by the electronic device according to the method and including the theme resource selected by the user and the theme resource of the first module may be as shown in table 3.
TABLE 3
Figure BDA0003207104800000131
The content in the com.huawei.fa file is the main resource of the first module. It is understood that the file name of com.huawei.fa is only an example, and does not limit the function of the file, and other names are possible, which are not limited in the present application.
Optionally, taking the first module as a service card as an example, a theme resource package of multiple service cards (for example, a service card for a weather application, a service card for a clock application, a service card for a calendar application, and the like) may exist in the com.huawei.fa file, and each service card may apply a theme resource in the corresponding theme resource package. The name of the theme resource package where the theme resource of each service card is located may be the service card ID described in table 1, for example: if the theme resource package name of the service card of the weather application is FA1, the service card of the weather application can apply the theme resource included in FA 1.
Based on the technical scheme, under the condition that theme resources are not matched with the system, the function of changing the skin of the upgraded module (such as a service card, a large folder and the like) of the system can be realized at the first time, so that the desktop visual effect of a user is better. In addition, through the technical scheme, the same theme resource can be compatibly used on the operating systems of different electronic devices, and theme resources do not need to be redesigned by theme developers, so that the theme resources are adaptive to the operating systems of the electronic devices, and the rights and interests of the theme developers are guaranteed.
Optionally, the method shown in fig. 10 may further include the following steps, as shown in fig. 12.
S1005, replacing the second module by the first module according to the replacement rule.
Illustratively, the first module may be a service card and the second module may be a widget.
Wherein the replacement rule comprises any one or more of the following:
replacement rule 1: and replacing the second module by the first module with the same number of the grids occupied by the length and the width as the second module. Taking the service card replacing widget as an example, the widget is replaced by the service card with the same occupied number of the long grids and the wide grids. For example: and replacing the 2 x 4 widgets with the 2 x 4 service cards.
Illustratively, as shown in fig. 13, widget1301 of 2 × 4 in interface 1300 is replaced with service card 1302 of 2 × 4 in interface 1310.
Based on the replacement rule, the desktop layout of the user can be prevented from being modified when the first module is used for replacing the second module, so that the user experience is better.
And (3) replacing the second module by adopting a first module of which the length and width occupy the grids, and the number of which is less than that of the second module. Optionally, in order to achieve better replacement effect and better user experience, the second module may be replaced with a first module having a length and a width occupying grid number which are both smaller than and closest to the length and the width occupying grid number of the second module. It should be understood that "closest to" here means that the number of cells occupied by the first module length is closest to the number of cells occupied by the second module length, and the number of cells occupied by the first module width is closest to the number of cells occupied by the second module width. Or replacing the widget with the service card, for example, replacing the widget with the service card which occupies the cells with the length and the width which are smaller than and closest to the widget. For example: replace 3 × 4 widgets with 2 × 4 service cards.
Illustratively, as shown in fig. 14, widget1401 at 3 x 4 in interface 1400 is replaced with service card 1402 at 2 x 4 in interface 1410.
And replacing the second module occupying the second quantity of grids by adopting a first module occupying the first quantity of grids, wherein the first quantity is smaller than the second quantity. Optionally, to make the replacing effect better and the user experience better, the first number may be closest to the second number. It should be understood that the first number refers to the total number of cells occupied by the first module and the second number is the total number of cells occupied by the second module. It should be noted that, when the replacement rule is adopted, the desktop needs to support layout adjustment, that is, the replacement process can be completed by moving the position of the icon. However, in some cases, the desktop may not support layout adjustment, e.g., the layout of the second module located on the desktop satisfies the condition that the top is the top of the screen and the widget and/or service card is below. Thus, in such a case, the replacement rule may not apply.
For example, taking the service card to replace the widget as an example, the widget is replaced by the service card occupying the number of the grids which is smaller than and closest to the number of the grids occupied by the widget. For example: replacing 1 × 5 and/or 1 × 4 widgets with 2 × 2 service cards.
Illustratively, as shown in fig. 15, widget 1501 at 1 × 4 in interface 1500 is replaced with service card 1502 at 2 × 2 in interface 1510.
Illustratively, as shown in fig. 16, 4 × 1 widget 1601 of interface 1600, on top of the screen, and below is service card 1602, in which case the desktop does not support layout adjustment.
And replacing the second module occupying the fourth quantity of grids by adopting the first module occupying the third quantity of grids, wherein the third quantity is greater than the fourth quantity. It should be understood that the third number refers to the total number of cells occupied by the first module and the fourth number is the total number of cells occupied by the second module. Optionally, in order to improve the replacement effect and improve the user experience, the third number may be closest to the fourth number, in addition, the first module may be added to the screen interface where the second module is located, or another screen interface may be selected to add the first module, which is not specifically limited in this application. Optionally, the first module may be preferentially added to the screen interface where the second module is located, and if the remaining space of the current screen interface is not enough to accommodate the first module, another screen interface may be selected to add the first module, for example: the first module can be directly added to the screen interface located at the last, and if the remaining space of the screen interface located at the last is not enough to accommodate the first module, a screen interface can be added to add the first module. And if the number of the screens of the desktop exceeds the maximum number preset by the developer, the preset rule is not adopted to replace the second module. It should be understood that the preset maximum number can be set by a developer according to actual requirements, and the preset maximum number can be 18 or other values as an example, which is not limited in this application.
Or taking the service card to replace the widget as an example, replacing the widget by the service card occupying a grid number which is greater than and closest to the grid number occupied by the widget. For example: and replacing the widget of 1 × 2 with the service card of 2 × 2.
Illustratively, as shown in fig. 17, a widget 1701 at 1 × 2 in interface 1700 is replaced with a service card 1702 at 2 × 2 in interface 1710.
Optionally, the replacement rule may further have a priority, and the priority order may be: replacement rule 1> replacement rule 2> replacement rule 3> replacement rule 4. Therefore, when the replacement rule includes a plurality of the above, the electronic device may execute the process of replacing the second module by the first module according to the priority of each replacement rule. For example, taking the example that the replacement rules include the replacement rule 1 to the replacement rule 4, the desktop in the electronic device replaces the second module according to the replacement rule 1, and if the replacement rule 1 is not satisfied, the desktop replaces the second module according to the replacement rule 2, and so on.
Illustratively, the service cards in the above examples may include a variety of specifications, such as: 2 x 1, 2 x 2, 2 x 4, 4 x 4, etc., which are not limited in this application.
Taking the first module as a service card and the second module as a widget as an example, the following describes a process of replacing the widget with the service card in detail with reference to the accompanying drawings.
Exemplarily, as shown in fig. 18a and 18b, the flowchart of the method for replacing a widget by a service card provided by the embodiment of the present application is schematic, and the method includes the following steps:
s1801, operation of upgrading an operating system of the electronic device is detected.
The upgrade may be a large version upgrade or a small version upgrade, which is not limited in the present application. The operating system may be an android, IOS, harmony os, windows, etc., although this application is not so limited.
S1802, whether the user selects a new desktop layout or not is judged.
In the process of updating the operating system of the electronic device, the user is prompted whether to select a new desktop layout, if it is determined that the user selects the new desktop layout, step S1803a or S1803b is executed, and if the user does not select the new desktop layout, the process is ended.
Specifically, if the electronic device detects that the user selects a new desktop layout, which indicates that the user currently has a requirement for using the new desktop layout, it is determined to generate a new desktop layout for the user, for example: a desktop is generated that includes service cards, large folders, etc. If it is detected that the user does not select a new desktop, the original desktop layout is maintained, for example: a desktop including a widget.
Optionally, before replacing the widget with the service card, that is, before performing the subsequent step S1806, there are many possible implementation manners of the specific replacement process.
In a possible implementation manner, the electronic device may first query applications supporting the service cards, and then replace widgets of the applications on the desktop with corresponding service cards, as shown in steps S1803a to S1805a shown in fig. 18 a.
S1803a, desktop inquiry supports the application of the service card.
The desktop inquires the set information of the support service cards through the PMS, and determines the application of the support service cards according to the set information. The information of the set is referred to the above, and is not described herein again.
It should be noted that, if the desktop determines that the application supporting the service card does not exist currently according to the set information, the subsequent steps are not executed.
Optionally, the electronic device also presets a complete mapping relationship for the applications, and the specific content of the mapping relationship refers to the above, which is not described herein again.
And S1804a, judging whether the widgets of the application supporting the service cards are completely replaced.
If yes, go to step S1808. If not, step S1805a is executed.
S1805a, judging whether a widget supporting the application of the service card exists on the desktop.
It should be noted that one application may support multiple widgets, and the widgets may or may not exist on the desktop. The desktop needs to determine whether a widget supporting an application of the service card is located on the desktop. For example, the desktop can determine whether a widget is located on the desktop by looking up its own database. If the identification information of a widget exists in the database of the desktop, the desktop can determine that the widget is located on the desktop. If the identification information of a widget does not exist in the desktop database, the desktop may determine that the widget is not located on the desktop. It can be understood that the identification information of the widget is used to identify the identity of the widget.
If so, step S1806 is executed, and if not, step S1804a is executed.
In another possible implementation manner, the electronic device may first query a widget existing on the desktop, and then query whether the application to which the widget belongs supports the service card, as shown in steps S1803b to S1805b shown in fig. 18 b.
And S1803b, querying the widget on the desktop.
The method for querying the widget on the desktop may refer to step S1805a, which is not described herein again.
And S1804b, judging whether the widget on the desktop is completely replaced.
If yes, go to step S1808. If not, step S1805b is executed.
And S1805b, judging whether the application to which the widget on the desktop belongs supports the service card.
For example, the electronic device may determine whether the application to which the widget belongs supports the service card according to the set information of the support service card.
For example: the electronic device may first determine an ID of an application to which the widget belongs, then determine whether the ID is located in the set information of the service card, and if the ID is located, determine that the widget may be replaced by a corresponding service card, and then execute step S1806. Otherwise, determining that the widget cannot be replaced by the corresponding service card, and executing step S1804b. The set information refers to the above description, and is not described herein again.
And S1806, replacing the widget with the service card according to the replacement rule.
For the replacement rule, please refer to the above description, which is not repeated herein.
And S1807, transferring the replaced widget ID to the corresponding application for the application to execute data migration.
And the application can transmit the data in the original widget to the replaced service card. Illustratively, as shown in fig. 19, widget 1901 in interface 1900, and related data set and/or saved by the user included in widget 1901, such as "thursday meeting", "saturday work", and the like. After replacing the widget with the service card, as shown in the service card 1902 in the interface 1910, the service card 1902 contains related data that the user previously set and/or saved in the widget, such as: "Thursday club", saturday office, etc.
By the operation, the situation that a user needs to reset or input data after replacing the widget by the service card can be avoided, convenience is brought to the user, and experience is better.
After step S1807 is executed, step S1804a or step S1804b is executed.
After the above steps S1803b and S1804b are executed, if it is determined that the widgets on the desktop are not completely replaced, the replacement process is executed on the widget that is not replaced.
Specifically, the single widget may be replaced sequentially, that is, the above steps S1805b to S1807 may be performed sequentially for the single widget. For example: executing steps S1805b to S1807 once to finish the replacement of the widget 1; then, step S1804b is executed, it is determined that there is a widget that is not replaced, and steps S1805b to S1807 are executed again to complete replacement of widget2. It should be understood that this example is illustrated with the application to which both widget1 and widget2 belong supporting a service card.
Multiple widgets may also be replaced at the same time, that is, steps S1805b to S1807 may be performed sequentially for multiple widgets. For example: steps S1805b to S1807 are executed once to complete the replacement of widget1 and widget2, then step S1804b is executed to determine that widget is not executed, and steps S1805b to S1807 are executed once again to complete the replacement of widget3 and widget4. It should be understood that this example is illustrated with the application to which widget1, widget2, widget3, and widget4 all belong supporting a service card. It should be noted that the number of widgets replaced each time and which of the widgets are specifically replaced may be selected by a developer according to actual requirements, which is not specifically limited in the present application.
And S1808, displaying the new desktop layout.
In a possible implementation manner, widgets on the original desktop can be replaced with corresponding service cards, and the layout of the new desktop only includes the service cards.
In another possible implementation manner, a part of the widget on the original desktop may be replaced with a corresponding service card, and the new desktop layout includes the service card and the widget at the same time.
In another possible implementation manner, the widget on the original desktop may not be replaced by the corresponding service card, and then the new desktop layout only includes the widget.
Optionally, step S1804a and/or step S1804b may also be located after step S1807, and the present application does not limit the execution order of the above steps.
The above steps S1805a to S1807 are executed in sequence for each application. The following description is made with reference to specific examples.
The applications supporting the service card include application 1, application 2, and application 3. Assume that application 1 includes 4 widgets and that the widget currently located on the desktop includes widget1 and widget2. Application 2 includes 2 widgets, and no widget is currently on the desktop. Application 3 includes 2 widgets, and the widgets currently located on the desktop include widget3 and widget4.
The electronic device executes the step S1803a, and determines that the applications supporting the service card include application 1, application 2, and application 3. Then, step S1804a is executed to determine that the widget of the application supporting the service card is not completely replaced. Step S1805a is executed, and it is assumed that the widget replacement process of application 1 is executed first, and it is determined that widget1 and widget2 of application 1 exist on the desktop.
It should be noted that the replacement process of which application is executed first may be determined by the priority of the application, for example: the replacing process of the widget of the application with higher priority is executed firstly. Optionally, the priority may be divided according to a vendor to which the application belongs, or according to a type of the application, which is not limited in this application.
Then, step S1806 is executed, and the widget1 and the widget2 are respectively replaced by the service card according to the replacement rule, where the replacement process may be executed simultaneously or sequentially, and this application is not limited to this. And finally, executing the step S1807 to finish the replacement of all the widgets positioned on the desktop of the application 1.
Then, step S1804a is executed to determine that all the widgets of the application supporting the service card have not been replaced, and the widget of application 2 and the widget of application 3 have not been replaced. The replacement of the widget of application 2 is performed next. Step S1805a is executed to determine that there is no widget of the application 2 on the desktop, and therefore the subsequent steps are executed again. At this point, the process returns to step S1804a, determines that the widget of application 3 has not been replaced, and then starts to replace the widget of application 3. Here, the widget replacement process of application 3 is the same as the widget replacement process of application 1, and details are not described here.
It should be noted that, the interfaces are only schematic diagrams, and in practical applications, more or fewer interfaces than the illustrated interfaces may be included, and more or fewer contents may also be included in each interface, which is not limited in this application.
The scheme provided by the embodiment of the application is mainly introduced from the perspective of the method. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. The elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein may be embodied in hardware or in a combination of hardware and computer software. Whether a function is performed as hardware or computer-driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the subject matter of the embodiments of the present application.
In the present application, the electronic device may be divided into the functional modules according to the above method examples, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a hardware form or a software functional module form. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
As shown in fig. 20, which is a schematic structural diagram of an electronic device according to an embodiment of the present application, the electronic device 2000 may be used to implement the methods described in the above method embodiments. Illustratively, the electronic device 2000 may specifically include: a processing unit 2001 and a display unit 2002.
The processing unit 2001 is configured to enable the electronic device 2000 to perform steps S1001 to S1003 in fig. 10. And/or processing unit 2001 is used to support electronic device 2000 in performing steps S1101-S1109 in fig. 11. And/or the processing unit 2001 is used to support the electronic device 2000 to perform steps S1005-S1003 in fig. 12. And/or the processing unit 2001 is used to support the electronic device 2000 to perform steps S1801-S1807 in fig. 18 a. And/or the processing unit 2001 is used to support the electronic device 2000 in performing steps S1801-S1807 in fig. 18 b. And/or the processing unit 2001 is also used to support the electronic device 2000 in performing other steps performed by the electronic device in the embodiments of the present application. The display unit 2002 is used to support the electronic device 2000 to execute step S1004 in fig. 10 and 12. And/or the display unit 2002 is configured to support the electronic device 2000 to execute step S1808 in fig. 18a and 18 b. And/or the display unit 2002 may also be used to support the electronic device 2000 to perform other steps performed by the electronic device in the embodiments of the present application.
Optionally, the electronic device 2000 shown in fig. 20 may further include a transceiver unit (not shown in fig. 20), which may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The transceiving unit may include a receiving unit and a transmitting unit. The receiving unit is used for receiving data sent by the calibration equipment or the server. And the sending unit is used for sending data to the calibration equipment or the server. The embodiment of the present application does not specifically limit the specific implementation manner of the transceiver unit.
Optionally, the electronic device 2000 shown in fig. 20 may further include a storage unit (not shown in fig. 20) that stores programs or instructions. The program or instructions, when executed by the processing unit 2001, enable the electronic device 2000 shown in fig. 20 to perform the subject resource processing method related to the above-described method embodiment.
For technical effects of the electronic device 2000 shown in fig. 20, reference may be made to technical effects of the subject resource processing method related to the foregoing method embodiment, and details are not repeated here. The processing unit 2001 involved in the electronic device 2000 shown in fig. 20 may be implemented by a processor or a processor-related circuit component, which may be a processor or a processing module. The display unit 2002 may be implemented by display-related components, which may include a display screen.
An embodiment of the present application further provides a chip system, as shown in fig. 21, where the chip system includes at least one processor 2101 and at least one interface circuit 2102. The processor 2101 and the interface circuit 2102 may be interconnected by wires. For example, the interface circuit 2102 may be used to receive signals from other devices. As another example, the interface circuit 2102 may be used to send signals to other devices (e.g., the processor 2101). Illustratively, the interface circuit 2102 may read instructions stored in the memory and send the instructions to the processor 2101. The instructions, when executed by the processor 2101, may cause an electronic device to perform the various steps performed by the electronic device in the embodiments described above. Of course, the chip system may further include other discrete devices, which is not specifically limited in this embodiment of the present application.
Optionally, the system on a chip may have one or more processors. The processor may be implemented by hardware or by software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
Optionally, the memory in the system-on-chip may also be one or more. The memory may be integrated with the processor or may be separate from the processor, which is not limited in this application. For example, the memory may be a non-transitory processor, such as a read only memory ROM, which may be integrated with the processor on the same chip or separately disposed on different chips, and the type of the memory and the arrangement of the memory and the processor are not particularly limited in this application.
The system-on-chip may be, for example, a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit (DSP), a Microcontroller (MCU), a Programmable Logic Device (PLD), or other integrated chips.
It should be understood that the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor.
Embodiments of the present application provide a computer-readable storage medium, on which a computer program or instructions are stored, which, when run on a computer, cause the computer to perform the method described in the above method embodiments.
An embodiment of the present application provides a computer program product, including: computer program or instructions which, when run on a computer, cause the computer to perform the method described in the above method embodiments.
In addition, an apparatus, which may be specifically a component or a module, may include a processor and a memory connected to each other; wherein the memory is used for storing computer executable instructions, and when the apparatus runs, the processor can execute the computer executable instructions stored by the memory to make the apparatus execute the method in the above method embodiments.
In addition, the electronic device, the computer-readable storage medium, the computer program product, or the chip provided in the embodiments of the present application are all configured to execute the corresponding method provided above, so that the beneficial effects achieved by the electronic device, the computer-readable storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. The embodiments may be combined with each other or referenced to each other without conflict. The above-described embodiments of the electronic device are merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of modules or units through some interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product stored in a storage medium, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. A theme resource processing method is applied to an electronic device with a display screen, and is characterized by comprising the following steps:
receiving a user request, wherein the request is used for instructing the electronic equipment to apply the theme resources selected by the user;
determining that a first module of the theme resources selected by the user is absent;
generating the theme resource of the first module according to a preset strategy;
and displaying an interface for applying the theme resources selected by the user and the theme resources of the first module.
2. The method of claim 1, wherein the topic resource of the first module comprises a context resource of the first module.
3. The method of claim 2, wherein the user-selected theme resources include mask layer information and mask layer information; the generating the theme resource of the first module according to the preset strategy comprises:
and generating a background resource of the first module according to the mask layer information and the mask layer information.
4. The method of claim 2 or 3, wherein the user-selected theme resources include small folder background information; the generating the theme resource of the first module according to the preset strategy comprises:
and generating the background resource of the first module according to the doclet background information.
5. The method of claim 4, wherein the doclet background information comprises background color information, and wherein the background color information comprises picture information or color values.
6. The method of any of claims 2-5, wherein the topic resource of the first module further comprises a font resource of the first module; the generating the theme resource of the first module according to the preset strategy comprises:
and generating font resources of the first module according to the background resources of the first module.
7. The method of claim 6, wherein the background resource of the first module comprises background information, and the background information comprises any one or more of variance, complexity, and contrast; the generating the font resource of the first module according to the background resource of the first module comprises:
and generating font resources of the first module according to the background information of the first module.
8. The method of any of claims 1-7, wherein prior to receiving the user request, the method further comprises:
and replacing the second module by the first module according to the replacement rule.
9. The method of claim 8, wherein the replacement rules include any one or more of:
replacing the second module by the first module with the same number of the grids occupied by the length and the width as the second module;
replacing the second module by the first module, wherein the number of the grids occupied by the length and the width of the first module is less than that of the second module;
replacing a second module occupying a second number of cells with a first module occupying a first number of cells, the first number being less than the second number;
replacing a second module occupying a fourth number of cells with a first module occupying a third number of cells, the third number being greater than the fourth number.
10. The method of any of claims 1-9, wherein the first module is a service card and/or a large folder and the second module is a widget.
11. An electronic device comprising a processor, a memory, and a display, the memory, the display coupled with the processor, the memory for storing computer program code, the computer program code comprising computer instructions that, when read from the memory by the processor, cause the electronic device to perform the method of any of claims 1-10.
12. A computer-readable storage medium, having stored thereon a computer program or instructions, which, when run on a computer, cause the computer to perform the method of any one of claims 1-10.
13. A computer program product, the computer program product comprising: computer program or instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-10.
CN202110919955.7A 2021-05-21 2021-08-11 Theme resource processing method and electronic equipment Pending CN115390935A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110563464 2021-05-21
CN2021105634643 2021-05-21

Publications (1)

Publication Number Publication Date
CN115390935A true CN115390935A (en) 2022-11-25

Family

ID=84114501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110919955.7A Pending CN115390935A (en) 2021-05-21 2021-08-11 Theme resource processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN115390935A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116069437A (en) * 2023-04-06 2023-05-05 深圳开鸿数字产业发展有限公司 Atomization service card theme management method, device, terminal and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116069437A (en) * 2023-04-06 2023-05-05 深圳开鸿数字产业发展有限公司 Atomization service card theme management method, device, terminal and storage medium

Similar Documents

Publication Publication Date Title
US20230077467A1 (en) Card Display Method, Electronic Device, and Computer Readable Storage Medium
US20140179377A1 (en) Mobile electronic device having program notification function and program notification method thereof
US11853820B2 (en) Cross-process communication method, apparatus, and device
CN114003324A (en) Method for combining multiple applications and simultaneously starting multiple applications and electronic equipment
CN115348350A (en) Information display method and electronic equipment
JP2023545659A (en) Application interface layout methods and electronic devices
CN116450251A (en) Method for adapting page layout of multiple devices and electronic device
CN114138139A (en) Application card management method, electronic device, product and medium
WO2022100326A1 (en) Electronic device and inter-device screen collaboration method and medium thereof
CN115390935A (en) Theme resource processing method and electronic equipment
CN113792328A (en) Authority management method, user interface and electronic equipment
CN114168237A (en) Theme pack adaptation method and device
CN112000932A (en) Mobile terminal and application control method thereof
WO2023029985A1 (en) Method for displaying dock bar in launcher and electronic device
CN113360122B (en) Mobile terminal and text display method thereof
CN115686700A (en) Rendering method and electronic equipment
WO2024032022A1 (en) Application icon visualization method and device
CN113407082B (en) Font color control method and related device applied to terminal equipment
EP4343533A1 (en) Screen projection method and related apparatus
CN113253905B (en) Touch method based on multi-finger operation and intelligent terminal
CN115357273B (en) Reminding method for system upgrading and electronic equipment
CN114816169B (en) Desktop icon display method and device and storage medium
US20230418445A1 (en) Method for migrating display element across applications and electronic device
WO2024055875A1 (en) Method for adding service card, and electronic device and computer-readable storage medium
CN112764832A (en) Application program installing and uninstalling method and communication 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