Interface rendering method and device, wearable device, and readable storage medium

By identifying the interface type and selecting the appropriate operating system for interface rendering, the problem of large power consumption of the interface rendering function of wearable devices is solved, and the battery life of the device is extended.

CN114691130BActive Publication Date: 2025-01-07GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011641335.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2025-01-07
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

The interface rendering function of wearable devices consumes a lot of power, resulting in insufficient battery life, which has become a shortcoming in its development.

Method used

By identifying the interface type carried in the interface rendering instruction, if it belongs to the preset first type interface, it will be rendered by the first operating system; if it belongs to the second type interface, it will be rendered by the second operating system, so as to control the appropriate The operating system performs interface rendering to reduce power consumption.

Benefits of technology

It effectively reduces the power consumption of wearable devices during interface rendering and extends the battery life of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691130B_ABST
    Figure CN114691130B_ABST
Patent Text Reader

Abstract

The present application relates to an interface rendering method and apparatus, a wearable device, and a computer-readable storage medium, the method comprising: responding to an interface rendering instruction, and determining the interface type of the interface to be rendered. If the interface type belongs to a preset first-class interface, the first operating system performs interface rendering to generate a first target interface. Because the power consumption when running the second operating system on the wearable device is greater than the power consumption when running the first operating system on the wearable device, by identifying the interface type of the interface to be rendered carried in the interface rendering instruction, if the interface type belongs to the preset first-class interface, the first operating system is controlled to perform interface rendering, and there is no need to use the second operating system for interface rendering. Obviously, the power consumption of the wearable device when performing interface rendering is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an interface rendering method and apparatus, a wearable device, and a readable storage medium. Background Art

[0002] With the continuous development of computer technology, wearable devices are becoming more and more powerful and more and more popular. Wearable devices have brought a lot of convenience to people's daily life and travel.

[0003] However, for the purpose of portability and thinness, wearable devices are relatively small in size and cannot carry large-capacity batteries like mobile phones and other electronic devices. Therefore, the battery life of wearable devices has always been a shortcoming that hinders their development. Among them, interface rendering is one of the functions that consumes more power on wearable devices. Therefore, how to reduce the power consumption of interface rendering on wearable devices has become a difficult problem that needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present application provide an interface rendering method and apparatus, a wearable device, and a readable storage medium, which can reduce the power consumption of the wearable device when performing interface rendering.

[0005] An interface rendering method is applied to a wearable device, wherein a first operating system and a second operating system can be run on the wearable device, and the power consumption when the second operating system is run on the wearable device is greater than the power consumption when the first operating system is run on the wearable device. The method comprises:

[0006] Responding to the interface rendering instruction, and determining the interface type of the interface to be rendered;

[0007] If the interface type belongs to the preset first type of interface, the first operating system performs interface rendering to generate a first target interface;

[0008] If the interface type belongs to a preset second type of interface, the second operating system performs interface rendering to generate a second target interface.

[0009] An interface rendering device is applied to a wearable device, wherein a first operating system and a second operating system can be run on the wearable device, and the power consumption when the second operating system is run on the wearable device is greater than the power consumption when the first operating system is run on the wearable device, and the device comprises:

[0010] An interface type identification module, used to respond to an interface rendering instruction and determine the interface type of the interface to be rendered;

[0011] A first interface rendering module, configured to generate a first target interface by performing interface rendering by the first operating system if the interface type belongs to a preset first type of interface;

[0012] The second interface rendering module is used to generate a second target interface by performing interface rendering by the second operating system if the interface type belongs to a preset second type of interface.

[0013] A wearable device includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the interface rendering method described above.

[0014] A computer-readable storage medium stores a computer program, which implements the steps of the interface rendering method described above when executed by a processor.

[0015] The above-mentioned interface rendering method and device, wearable device, and computer-readable storage medium are applied to wearable devices. The wearable device can run a first operating system and a second operating system, and the power consumption when the second operating system is run on the wearable device is greater than the power consumption when the first operating system is run on the wearable device. The method includes: responding to an interface rendering instruction and determining the interface type of the interface to be rendered. If the interface type belongs to a preset first-class interface, the first operating system performs interface rendering to generate a first target interface; if the interface type belongs to a preset second-class interface, the second operating system performs interface rendering to generate a second target interface. Because the power consumption when the second operating system is run on the wearable device is greater than the power consumption when the first operating system is run on the wearable device, by identifying the interface type of the interface to be rendered carried in the interface rendering instruction, if the interface type belongs to the preset first-class interface, the first operating system is controlled to perform interface rendering, and there is no need to use the second operating system for interface rendering. Obviously, the power consumption of the wearable device when performing interface rendering is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 An application environment diagram of an interface rendering method in an embodiment;

[0018] Figure 2 is a flowchart of an interface rendering method in an embodiment;

[0019] Figure 3 is a flowchart of an interface rendering method in another embodiment;

[0020] Figure 4 A flowchart of an interface rendering method in yet another embodiment;

[0021] Figure 5 A schematic diagram of a distributed architecture of an interface rendering method based on dual virtual machines in one embodiment;

[0022] Figure 6 is a flow chart of communication between an Android system running on an AP and an RTOS system running on an MCU in one embodiment;

[0023] Figure 7 It is a schematic diagram of splitting a dial rendering function into a first dial rendering class and a second dial rendering class in one embodiment;

[0024] Figure 8 It is a flowchart of an interface rendering method in a specific embodiment;

[0025] Fig. 9 It is a structural block diagram of an interface rendering device in an embodiment;

[0026] Fig.10 It is a structural block diagram of an interface rendering device in yet another embodiment;

[0027] Fig.11 FIG. 4 is a schematic diagram of the internal structure of a wearable device in one embodiment. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0029] Figure 1 FIG. 1 is an application scenario diagram of an interface rendering method in an embodiment. Figure 1As shown, the application environment includes a wearable device 120, on which a first operating system and a second operating system can be run, and the power consumption when the second operating system is run on the wearable device is greater than the power consumption when the first operating system is run on the wearable device. The wearable device 120 responds to the interface rendering instruction and determines the interface type of the interface to be rendered through the interface rendering method in this application; if the interface type belongs to the preset first type of interface, the first operating system performs interface rendering to generate the first target interface; if the interface type belongs to the preset second type of interface, the second operating system performs interface rendering to generate the second target interface. Here, a wearable device refers to a portable device that is worn directly on the body or integrated into the user's clothes or accessories. The wearable device 120 can be a terminal device such as a smart bracelet, a smart watch, smart glasses, smart gloves, smart socks, a smart belt, etc., which is not limited in this application.

[0030] Figure 2 FIG. 1 is a flowchart of an interface rendering method in an embodiment. The interface rendering method in this embodiment is executed on Figure 1 The wearable device 120 in the embodiment is used as an example to describe that the first operating system and the second operating system can be run on the wearable device, and the power consumption when the second operating system is run on the wearable device is greater than the power consumption when the first operating system is run on the wearable device. Figure 2 As shown, an interface rendering method is provided, including steps 220 to 260. Among them,

[0031] Step 220, respond to the interface rendering instruction and determine the interface type of the interface to be rendered.

[0032] The wearable device may run a first operating system and a second operating system, wherein the power consumption when the second operating system is run on the wearable device is greater than the power consumption when the first operating system is run on the wearable device. For example, the second operating system may be an Android system, and the first operating system may be a real-time operating system, such as an RTOS system (real-time operating system), etc., which is not limited in this application.

[0033] Among them, the RTOS system consumes less power when running, and the system can be used to support the basic functions of wearable devices, such as time display, alarm schedule, physiological data monitoring, call reminder, etc. However, the Android system consumes more power when running, and the Andriod system can be used to support the complex functions of wearable devices, such as video and voice call services, games, audio and video playback, WIFI, power management, etc.

[0034] If the wearable device is a smart watch or a smart bracelet, preset events can be set. If the wearable device detects that a preset event has occurred, the interface rendering instruction is triggered, and the interface rendering is performed based on the interface rendering instruction. Among them, rendering refers to the process of the GPU reading data from the cache and rendering it to the screen. In general, a drawing process may also be included before rendering. Drawing refers to the process in which the CPU converts the content to be rendered into data and stores it in the cache. Here, preset events include acceleration data greater than a preset threshold, displacement within a preset time period greater than a preset threshold, gaze events (the user's eyes gaze at the screen for more than a preset time), touch events, etc., which are not limited in this application.

[0035] For example, if a user wears a wearable device on his arm, when the user raises his arm, the wearable device detects that a preset event has occurred, and triggers an interface rendering instruction on the wearable device. That is, when the user raises his arm, the acceleration sensor in the wearable device detects that the acceleration data is greater than a preset threshold, and it is considered that a preset event has occurred. The triggering interface rendering instruction is used to instruct interface rendering, which is dial rendering for smart watches or smart bracelets.

[0036] Specifically, after the interface rendering instruction is triggered on the wearable device, the interface rendering instruction is received through the first operating system. The first operating system then continues to identify the interface type of the interface to be rendered carried in the interface rendering instruction. Among them, the interface rendering instruction carries the interface type of the interface to be rendered. The rendering screen can be classified based on the number of elements contained in the interface to be rendered, the color types of the elements, and the complexity of the elements. For example, it is divided into a first type of interface, a second type of interface, and a third type of interface, wherein the number of elements contained in the third type of interface, the color types of the elements, and the complexity of the elements are all greater than those of the second type of interface, and the number of elements contained in the second type of interface, the color types of the elements, and the complexity of the elements are all more than or greater than those of the first type of interface.

[0037] Step 240: If the interface type belongs to the preset first type of interface, the first operating system performs interface rendering to generate a first target interface.

[0038] If the first operating system identifies that the interface type of the interface to be rendered carried in the interface rendering instruction belongs to the preset first category interface, the first operating system is controlled to perform interface rendering to generate the first target interface according to the interface rendering instruction. Among them, the first target interface belongs to the first category interface. Because the number of elements contained in the first category interface, the color types of the elements, and the complexity of the elements are all small, it is sufficient to control the first operating system to perform interface rendering, and there is no need to use the second operating system to perform interface rendering. The power consumption when running the second operating system on the wearable device is greater than the power consumption when running the first operating system on the wearable device. Therefore, by controlling the first operating system to render the first category interface, the power consumption of interface rendering on the wearable device can be reduced.

[0039] Step 260: If the interface type belongs to the preset second type of interface, the second operating system performs interface rendering to generate a second target interface.

[0040] Specifically, if the first operating system identifies that the interface type of the interface to be rendered carried in the interface rendering instruction belongs to the preset second type of interface, the first operating system is controlled to perform interface rendering to generate a second target interface according to the interface rendering instruction. Among them, the second target interface belongs to the second type of interface. Because the number of elements, the types of colors of the elements, and the complexity of the elements contained in the second type of interface are more or greater than the number of elements, the types of colors of the elements, and the complexity of the elements contained in the first type of interface, the first operating system is not sufficient to support the rendering of the second type of interface, so the second operating system is controlled to perform interface rendering. Because the first operating system can be used to support the basic functions of wearable devices, and the second operating system can be used to support the complex functions of wearable devices.

[0041] Among them, responding to the interface rendering instruction, and determining the interface type of the interface to be rendered. If the interface type belongs to the preset second type of interface, the second operating system performs interface rendering to generate the second target interface. Because the number of elements, color types of elements, and complexity of elements contained in the second type of interface are more or greater than the number of elements, color types of elements, and complexity of elements contained in the first type of interface, the first operating system is not sufficient to support the rendering of the second type of interface, so the second operating system is controlled to perform interface rendering to meet the demand for rendering a more complex interface on the wearable device.

[0042] In an embodiment of the present application, an interface rendering instruction is responded to, and the interface type of the interface to be rendered is determined. If the interface type belongs to the preset first type of interface, the first operating system performs interface rendering to generate a first target interface. If the interface type belongs to the preset second type of interface, the second operating system performs interface rendering to generate a second target interface. Because the power consumption when running the second operating system on the wearable device is greater than the power consumption when running the first operating system on the wearable device, by identifying the interface type of the interface to be rendered carried in the interface rendering instruction, if the interface type belongs to the preset first type of interface, the first operating system is controlled to perform interface rendering, and there is no need to use the second operating system for interface rendering. Obviously, the power consumption of the wearable device when performing interface rendering is reduced.

[0043] In one embodiment, in response to the interface drawing and rendering instruction, determining the interface type of the interface to be drawn and rendered includes:

[0044] An interface rendering instruction is received through the first operating system, and the first operating system determines the interface type of the interface to be rendered.

[0045] In the embodiment of the present application, after the interface rendering instruction is triggered on the wearable device, the interface rendering instruction is received by the first operating system, and then the interface type of the interface to be rendered is determined by the first operating system. Of course, the interface rendering instruction can also be received by the second operating system, and then the interface type of the interface to be rendered is determined by the second operating system, and this application does not limit this.

[0046] In one embodiment, Figure 3 As shown, an interface rendering method is provided, which also includes:

[0047] Step 280, if the interface to be rendered belongs to the third type of interface, the first operating system and the second operating system both perform interface rendering to generate a third target interface, where the third target interface is an interface synthesized from the first target interface and the second target interface.

[0048] Specifically, if the first operating system identifies that the interface type of the interface to be rendered carried in the interface rendering instruction belongs to the preset third type of interface, the first operating system is controlled to perform interface rendering to generate a third target interface according to the interface rendering instruction. Among them, the third target interface belongs to the third type of interface. Because the number of elements, the color types of elements, and the complexity of elements contained in the third type of interface are more or greater than the number of elements, the color types of elements, and the complexity of elements contained in the second type of interface, the second operating system is not sufficient to support the rendering of the third type of interface, or even if the second operating system can support the rendering of the third type of interface, the power consumption of rendering is high, so the first operating system and the second operating system are controlled to perform interface rendering together. Specifically, the third target interface includes two parts, and the first operating system can be used to render a part of the third target interface, and the second operating system can be used to render another part of the third target interface. The rendering of these two parts has a sequence, but this application does not limit this sequence. Because the power consumption when running the second operating system on the wearable device is greater than the power consumption when running the first operating system on the wearable device, combining the two operating systems for rendering can reduce the power consumption of the wearable device during the interface rendering process while achieving the rendering of the complex third target interface.

[0049] In an embodiment of the present application, an interface rendering instruction is responded to, and the interface type of the interface to be rendered is determined. If the interface type belongs to a preset third-category interface, the second operating system performs interface rendering to generate a third target interface. Because the number of elements, the types of colors of the elements, and the complexity of the elements contained in the third-category interface are more or greater than the number of elements, the types of colors of the elements, and the complexity of the elements contained in the second-category interface, the second operating system is not sufficient to support the rendering of the second-category interface, or even if the second operating system can support the rendering of the third-category interface, the power consumption of the rendering is high, so the first operating system and the second operating system are controlled to perform interface rendering to meet the need for rendering a more complex interface on the wearable device. And because the power consumption when running the first operating system is relatively small, the first operating system is also used here to render a part of the third target interface, so the power consumption of the wearable device during the interface rendering process can be reduced.

[0050] In one embodiment, a first virtual machine is run on a first operating system, and a second virtual machine is run on a second operating system; the first virtual machine and the second virtual machine can run the same type of application programs; step 240, the first operating system performs interface rendering to generate a first target interface, including:

[0051] The first operating system performs interface rendering by running the first virtual machine to generate a first target interface.

[0052] Specifically, if the first operating system is an RTOS system, the RTOS system generally runs on the coprocessor MCU of the wearable device, and the software on the MCU is often written in C language. If the second operating system is an Android system, the Android system generally runs on the main processor CPU of the wearable device, and the software on the CPU is often written in high-level architecture and language, such as JAVA language. In this way, because the RTOS system and the Android system are written in different languages, they cannot be compiled and deployed together, nor can they achieve a distributed architecture.

[0053] Therefore, a lightweight JVM virtual machine (Java Virtual Machine, Java virtual machine) is run on the first operating system (such as an RTOS system), and a DVM (Dalvik Virtual Machine) virtual machine is run in the second operating system (such as an Andriod system). And the first virtual machine and the second virtual machine can run the same type of application, wherein the same type of application can be a JAVA application. That is, through the first virtual machine and the second virtual machine, it is realized that the JAVA application can be run on both the first operating system and the second operating system. Furthermore, the co-compilation and deployment of the JAVA application in the first operating system and the second operating system is realized, and the efficiency of compilation and deployment is improved. Among them, JVM is a fictitious computer, which is realized by simulating various computer functions on an actual computer. A very important feature of the Java language is its independence from the platform, and the use of the Java virtual machine is the key to achieving this feature. If a general high-level language is to run on different platforms, it must at least be compiled into different target codes. After the introduction of the Java virtual machine, the Java language does not need to be recompiled when it runs on different platforms. The Java language uses the Java virtual machine to shield the information related to the specific platform, so that the Java language compiler only needs to generate the target code (bytecode) running on the Java virtual machine, and it can run on multiple platforms without modification. When the Java virtual machine executes the bytecode, it interprets the bytecode into machine instructions on the specific platform for execution. This is why Java can be "compiled once and run everywhere".

[0054] All Java programs in the Android system run on the DVM. Each program in the Android system has its own thread, and the DVM only executes the .dex Dalvik executable file. Each Android application has an independent DVM instance at the bottom layer and executes under its interpretation.

[0055] In this way, running the JVM virtual machine in the first operating system can realize the DVM virtual machine running in the second operating system, which is written in JAVA language, thereby realizing joint compilation and deployment and distributed architecture. That is, running the JVM virtual machine in the first operating system for interface rendering can be realized.

[0056] Specifically, the wearable device responds to the interface rendering instruction and determines the interface type of the interface to be rendered. If the interface type belongs to a preset first type of interface, the first operating system performs interface rendering by running the first virtual machine to generate a first target interface.

[0057] In an embodiment of the present application, a first virtual machine is run on a first operating system, for example, a JVM virtual machine is run on an RTOS system. In this way, by running the JVM virtual machine in the first operating system, it is realized that the DVM virtual machine running in the second operating system is written in JAVA language, and then the interface rendering process can be jointly compiled, deployed and distributed. That is, it is possible to run the JVM virtual machine in the first operating system to perform interface rendering. Thus, the wearable device responds to the interface rendering instruction and determines the interface type of the interface to be rendered. If the interface type belongs to the preset first type of interface, the first operating system performs interface rendering by running the first virtual machine to generate a first target interface. It is realized that the first target interface is rendered separately in the first operating system.

[0058] Continuing from the previous embodiment, a second virtual machine is run on a second operating system; step 260, the second operating system performs interface rendering to generate a second target interface; including:

[0059] The second operating system runs the second virtual machine to perform interface rendering to generate a second target interface.

[0060] In the embodiment of the present application, a second virtual machine is run on a second operating system, for example, a DVM virtual machine is run in an Android system. The second operating system runs the second virtual machine to render the interface and generate a second target interface. The second target interface is rendered on the second operating system with more or greater number of elements, color types of elements, and complexity of elements than the first type of interface. Because the first operating system is not sufficient to support the rendering of the second type of interface, the second operating system is controlled to run the second virtual machine to render the interface to meet the demand for rendering a more complex interface on the wearable device.

[0061] In one embodiment, the second operating system runs the second virtual machine to perform interface rendering to generate a second target interface; including:

[0062] Sending an interface rendering instruction to the second operating system through the first operating system;

[0063] According to the interface rendering instruction, the second operating system is controlled to run the second virtual machine to perform interface rendering to generate a second target interface.

[0064] like Figure 4 As shown, an interface rendering method is provided, including:

[0065] Step 402, receiving an interface rendering instruction through the first operating system; proceeding to step 404;

[0066] Step 404, determining whether the interface type of the interface to be rendered carried in the interface rendering instruction is a first-class interface; if so, proceeding to step 406; if not, proceeding to step 408;

[0067] Step 406, controlling the first operating system to run the first virtual machine to perform interface rendering to generate a first target interface according to the interface rendering instruction;

[0068] Step 408, sending an interface rendering instruction to the second operating system through the first operating system;

[0069] Step 410: Control the second operating system to run the second virtual machine to perform interface rendering according to the interface rendering instruction to generate a second target interface.

[0070] The interface rendering instruction is sent from the first operating system to the second operating system by the first operating system, and the first virtual machine in the first operating system and the second virtual machine in the second operating system communicate through a virtual interface (VirtualAPI). In fact, direct communication is not possible through VirtualAPI, and must be transferred through the underlying dual-core communication interface (API). However, for the Java caller, it looks like scheduling is directly performed between the two virtual machines.

[0071] In an embodiment of the present application, a first virtual machine is run on a first operating system, for example, a JVM virtual machine is run on an RTOS system. In this way, by running a JVM virtual machine in the first operating system, it is realized that the DVM virtual machine running in the second operating system is written in JAVA language, and then the interface rendering process can be jointly compiled, deployed and distributed. And the first operating system and the second operating system can communicate through the virtual interface (VirtualAPI) between the first virtual machine and the second virtual machine. Therefore, if the first operating system determines that the interface type of the interface to be rendered carried in the interface rendering instruction is not a first-class interface, the interface rendering instruction is sent to the second operating system through the first operating system, and after the first operating system makes a judgment, the second operating system is controlled to run the second virtual machine for interface rendering to generate a second target interface. That is, the interface rendering process can be jointly compiled, deployed and distributed.

[0072] Continuing from the previous embodiment, sending an interface rendering instruction to a second operating system through a first operating system includes:

[0073] The first operating system is controlled to forward the interface rendering instruction to the second operating system through the dual-system communication interface.

[0074] like Figure 5 , which is a schematic diagram of a distributed architecture of an interface rendering method based on dual virtual machines in one embodiment. Among them, an AP (Application Processor) 520 can run a second operating system, such as an Android system. An MCU (Microcontroller Unit) 540 can run a first operating system, such as an RTOS system.

[0075] Wear OS Clackwork is running on the second operating system, and Wear OS Clackwork (written in JAVA language) can communicate with DVM through Virtual Dual-core Communication, and DVM can communicate with the underlying dual-core communication module (Dual-core communication) through JNI (Java Native Interface). Among them, the dual-core communication module is written based on C language. Correspondingly, Light-WatchFace is running on the first operating system, and Light-WatchFace (written in JAVA language) can communicate with Embeded JVM through Virtual Dual-core Communication, and Embeded JVM can communicate with the underlying dual-core communication module (Dual-core communication) through JNI. A dual-system communication interface 560 is configured between the dual-core communication module on the first operating system and the dual-core communication module on the second operating system, and dual-system communication can be achieved through the dual-system communication interface 560. Among them, the dual-system communication interface 560 can be an SPI interface (Serial Peripheral Interface), of course, this application does not limit this.

[0076] Among them, there is a virtual interface (Virtual API) between the Virtual Dual-core Communication on the first operating system and the Virtual Dual-core Communication on the second operating system, but in fact, direct communication is impossible through the Virtual API, and it must be transferred through the underlying dual-core communication interface (API, Application Programming Interface). The specific reasons are not repeated here.

[0077] In the embodiment of the present application, based on the above-mentioned distributed architecture, the Wear OSClackwork of the first operating system can be controlled to forward the interface rendering instructions to the second operating system from top to bottom through the dual-system communication interface. After the dual-system communication interface of the second operating system receives the interface rendering instructions, it transmits the interface rendering instructions to the Embeded JVM from bottom to top. Then, the interface rendering is performed in the Embeded JVM according to the interface rendering instructions to generate a second target interface. If the interface type of the interface to be rendered carried in the interface rendering instruction belongs to the preset second type of interface, the second operating system is controlled to perform interface rendering according to the interface rendering instruction to generate the second target interface. Because the first operating system is not sufficient to support the rendering of the second type of interface, the second operating system is controlled to run the second virtual machine for interface rendering to meet the needs of rendering more complex interfaces on wearable devices.

[0078] In one embodiment, controlling the first operating system to forward the interface rendering instruction to the second operating system through the dual-system communication interface includes:

[0079] Sending the interface rendering instruction to the hardware abstraction layer of the first operating system through the application framework layer of the first operating system;

[0080] The interface rendering instruction is sent to the hardware abstraction layer of the second operating system through the hardware abstraction layer of the first operating system via the peripheral interface.

[0081] like Figure 6The figure shows the communication flow chart between the Android system running on the AP and the RTOS system running on the MCU. Android adopts a layered architecture, which can be divided into four layers. From the top to the bottom, it is divided into the application layer (app+System apps), the application framework layer (Java API Framework), the system runtime and runtime environment layer (Libraries+android Runtime) and the Linux kernel layer (HAL+Linux Kernel). Among them, HAL is the hardware abstraction layer (Hardware Abstraction Layer).

[0082] in, Figure 6 The first operating system in the system includes, from the upper layer to the lower layer, an application layer 602, an application framework layer 604, a system runtime library 606, and a hardware abstraction layer 608. The other layered structures are not yet described. Figure 6 And the algorithm for identifying the interface type of the interface to be rendered carried in the interface rendering instruction is stored in the system runtime library 606. Accordingly, Figure 6 The second operating system in the embodiment includes, from the upper layer to the lower layer, an application layer 610, an application framework layer 612 and a hardware abstraction layer 614. The other layered structures are not yet described. Figure 6 Shown in.

[0083] Specifically, Figure 6 As shown, an interface rendering method is provided. After receiving the interface rendering instruction, the first operating system of the wearable device determines the interface type of the interface to be rendered carried in the current interface rendering instruction through the algorithm in the system runtime library 606. If it is determined that the interface type of the interface to be rendered is the first type of interface, the interface rendering instruction is sent to the application framework layer 604, and then sent to the application layer 602 through the application framework layer 604, and the application layer 602 performs rendering to generate the first target interface.

[0084] If the system runtime 606 determines that the interface type of the interface to be rendered is the second type of interface, the interface rendering instruction is sent to the application framework layer 604, and then sent to the hardware abstraction layer 608 through the application framework layer 604. The hardware abstraction layer 608 sends the interface rendering instruction to the hardware abstraction layer 614 of the second operating system through the peripheral interface, and informs the second operating system to perform rendering. Specifically, the hardware abstraction layer 614 sends the interface rendering instruction to the application framework layer 612, and then the application framework layer 612 sends it to the application layer 610 for rendering to generate the second target interface.

[0085] In the embodiment of the present application, if the interface type belongs to the preset second type of interface, the interface rendering instruction is sent to the hardware abstraction layer of the first operating system through the application framework layer of the first operating system, and the interface rendering instruction is sent to the hardware abstraction layer of the second operating system through the hardware abstraction layer of the first operating system via the peripheral interface. Thus, the interface rendering instruction is sent from the first operating system to the second operating system, so that the second operating system performs interface rendering to generate the second target interface.

[0086] In one embodiment, an interface rendering method is provided, further comprising:

[0087] Split the dial rendering function into the first dial rendering class and the second dial rendering class in advance;

[0088] Loading a first interface rendering class into the first virtual machine, where the first interface rendering class is used to render a first type of interface;

[0089] The second interface rendering class is loaded into the second virtual machine, and the second interface rendering class is used to render the second type of interface.

[0090] like Figure 7 As shown, in the traditional method, the dial rendering function is run on the AP, while in the embodiment of the present application, the dial rendering function is pre-split into a first dial rendering class and a second dial rendering class. The first interface rendering class is loaded into the first virtual machine in the MCU, and the first interface rendering class is used to render the first type of interface. The second interface rendering class is loaded into the second virtual machine in the AP, and the second interface rendering class is used to render the second type of interface.

[0091] Because the dial rendering function is split into the first dial rendering class and the second dial rendering class, and both dial rendering classes can run independently under the corresponding operating system, it is possible to call the first interface rendering class in the first virtual machine according to the interface rendering instruction if the interface type belongs to the preset first type of interface, so as to perform interface rendering in the application layer of the first operating system to generate the first type of interface. At the same time, if the interface type belongs to the preset second type of interface, the second interface rendering class is called in the second virtual machine to perform interface rendering in the application layer of the second operating system to generate the second type of interface.

[0092] In the embodiment of the present application, because the dial rendering function is divided into the first dial rendering class and the second dial rendering class, and the two dial rendering classes can be independently run under the corresponding operating system, it is possible to control different operating systems to perform interface rendering based on the different interface types to be rendered carried in the interface rendering instruction. There is no need to perform interface rendering under the second operating system, which reduces the power consumption of the wearable device when performing interface rendering.

[0093] In one embodiment, the first operating system runs the first virtual machine to perform interface rendering to generate the first target interface, including:

[0094] The first interface rendering class is called in the first virtual machine to perform interface rendering in the application layer of the first operating system to generate a first type of interface.

[0095] In the embodiment of the present application, because the dial rendering function is divided into the first dial rendering class and the second dial rendering class, and the two dial rendering classes can be independently run under the corresponding operating system, if the interface to be rendered carried in the interface rendering instruction belongs to the preset first class interface, the first operating system is controlled to perform interface rendering. It is not necessary to perform interface rendering under the second operating system, which reduces the power consumption of the wearable device when performing interface rendering.

[0096] In one embodiment, the second operating system runs the second virtual machine to perform interface rendering to generate the second target interface, including:

[0097] The second interface rendering class is called in the second virtual machine to perform interface rendering in the application layer of the second operating system to generate a second type of interface.

[0098] In the embodiment of the present application, because the dial rendering function is divided into the first dial rendering class and the second dial rendering class, and the two dial rendering classes can be independently run under the corresponding operating system, if the interface to be rendered carried in the interface rendering instruction belongs to the preset second class interface, the second operating system is controlled to perform interface rendering. The first operating system is not sufficient to support the rendering of the second class interface, so the second operating system is controlled to perform interface rendering to meet the demand for rendering a more complex interface on the wearable device.

[0099] In one embodiment, at least one of the brightness, the number of elements included, and the color type of the elements of the second type of interface is greater than the brightness, the number of elements included, and the color type of the elements of the first type of interface.

[0100] Specifically, the number of elements included in the second-category interface may be greater than the number of elements included in the first-category interface, the color types of the elements included in the second-category interface may be greater than the color types of the elements included in the first-category interface, or the brightness of the second-category interface may be greater than the brightness of the first-category interface. Of course, the brightness of the second-category interface, the number of elements included, and the color types of the elements may all be greater than those of the first-category interface, and this application does not limit this. For example, for a wearable watch or bracelet, the second-category interface may be an ordinary dial with multiple colors and multiple elements, and the first-category interface may be a black-and-white dim dial that only displays a time pointer.

[0101] In an embodiment of the present application, the second type of interface is distinguished from the first type of interface from at least one of the following aspects: brightness, the number of elements contained, and the color type of the elements. In order to respond to the interface rendering instruction and determine the interface type of the interface to be rendered, if the interface type belongs to the preset first type of interface, the first operating system is controlled to perform interface rendering to generate the first target interface according to the interface rendering instruction. If the interface type belongs to the preset second type of interface, the second operating system is controlled to perform interface rendering to generate the second target interface according to the interface rendering instruction. Thus, it is possible to control different operating systems to perform interface rendering based on the different interface types of the interface to be rendered carried in the interface rendering instruction. There is no need to perform interface rendering under the second operating system, which reduces the power consumption of the wearable device when performing interface rendering.

[0102] In a specific embodiment, Figure 8 As shown, an interface rendering method is provided, which is applied to a wearable watch or a wristband, and a first operating system and a second operating system can be run on the wearable watch or the wristband, and the power consumption when the second operating system is run on the wearable watch or the wristband is greater than the power consumption when the first operating system is run on the wearable watch or the wristband, and the method includes:

[0103] Step 802, the wearable watch or bracelet receives an interface rendering instruction through the RTOS system;

[0104] Step 804, determining whether the interface type of the interface to be rendered carried in the interface rendering instruction is a twilight dial; if so, proceeding to step 806; if not, proceeding to step 808;

[0105] Step 806, controlling the RTOS system according to the interface rendering instruction, calling the twilight dial rendering class in the JVM virtual machine to render and generate a twilight dial.

[0106] Step 808, sending an interface rendering instruction to the Android system through the RTOS system;

[0107] Step 810, controlling the Android system according to the interface rendering instruction, calling the non-twilight dial rendering class in the DVM virtual machine to perform interface rendering, and generating a non-twilight dial.

[0108] In the embodiment of the present application, because the power consumption when running the Android system on the wearable device is greater than the power consumption when running the RTOS system on the wearable device, by identifying the interface type of the interface to be rendered carried in the interface rendering instruction, if the interface type belongs to the preset twilight dial, the TOS system can be controlled to perform interface rendering, and there is no need to use the Android system for interface rendering. Obviously, the power consumption of the wearable device when performing interface rendering is reduced.

[0109] In one embodiment, Fig. 9 As shown, an interface rendering device 900 is provided, which is applied to a wearable device. A first operating system and a second operating system can be run on the wearable device, and the power consumption when the second operating system is run on the wearable device is greater than the power consumption when the first operating system is run on the wearable device. The device includes:

[0110] The interface type identification module 920 is used to respond to the interface rendering instruction and determine the interface type of the interface to be rendered;

[0111] A first interface rendering module 940, configured to generate a first target interface by performing interface rendering by a first operating system if the interface type belongs to a preset first type of interface;

[0112] The second interface rendering module 960 is used to generate a second target interface by performing interface rendering by the second operating system if the interface type belongs to the preset second type of interface.

[0113] In one embodiment, the interface type identification module 920 is further configured to receive an interface rendering instruction through the first operating system, and determine the interface type of the interface to be rendered by the first operating system.

[0114] In one embodiment, an interface rendering device 900 is provided, which also includes a third interface rendering module; the third interface rendering module is used to generate a third target interface by performing interface rendering by both the first operating system and the second operating system if the interface to be rendered belongs to the third type of interface, and the third target interface is an interface obtained by synthesizing the first target interface and the second target interface.

[0115] In one embodiment, a first virtual machine is run on a first operating system, and a second virtual machine is run on a second operating system; the first interface rendering module 940 is also used for the first operating system to perform interface rendering by running the first virtual machine to generate a first target interface; the second interface rendering module is also used for the second operating system to run the second virtual machine to perform interface rendering to generate a second target interface.

[0116] In one embodiment, the second interface rendering module 960 includes an interface rendering instruction sending unit, which is used to send an interface rendering instruction to the second operating system through the first operating system; the interface rendering unit is used to control the second operating system to run the second virtual machine to perform interface rendering according to the interface rendering instruction to generate a second target interface.

[0117] In one embodiment, the interface rendering instruction sending unit is further used to control the first operating system to forward the interface rendering instruction to the second operating system through the dual-system communication interface.

[0118] In one embodiment, the interface rendering instruction sending unit is also used to send the interface rendering instruction to the hardware abstraction layer of the first operating system through the application framework layer of the first operating system; and send the interface rendering instruction to the hardware abstraction layer of the second operating system through the hardware abstraction layer of the first operating system via the peripheral interface.

[0119] In one embodiment, Fig.10 As shown, an interface rendering device 900 is provided, which also includes a dial rendering function splitting module 980; the dial rendering function splitting module 980 is used to pre-split the dial rendering function into a first dial rendering class and a second dial rendering class; the first interface rendering class is loaded into a first virtual machine, and the first interface rendering class is used to render a first type of interface; the second interface rendering class is loaded into a second virtual machine, and the second interface rendering class is used to render a second type of interface.

[0120] In one embodiment, the first interface rendering module 940 is further used to call the first interface rendering class in the first virtual machine to perform interface rendering in the application layer of the first operating system to generate a first type of interface.

[0121] In one embodiment, the second interface rendering module 960 is further used to call the second interface rendering class in the second virtual machine to perform interface rendering in the application layer of the second operating system to generate a second type of interface.

[0122] In one embodiment, at least one of the brightness, the number of elements included, and the color type of the elements of the second type of interface is greater than the brightness, the number of elements included, and the color type of the elements of the first type of interface.

[0123] In one embodiment, the first operating system is an RTOS system, and the second operating system is an Android system.

[0124] In one embodiment, the first virtual machine is a JVM virtual machine, and the second virtual machine is a DVM virtual machine.

[0125] It should be understood that, although the various steps in the flowcharts in the above-mentioned figures are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the above-mentioned figures may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0126] The division of the various modules in the above interface rendering device is only for illustration. In other embodiments, the interface rendering device may be divided into different modules as needed to complete all or part of the functions of the above interface rendering device.

[0127] For the specific definition of the interface rendering device, please refer to the definition of the interface rendering method above, which will not be repeated here. Each module in the above-mentioned interface rendering device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0128] In one embodiment, a wearable device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of an interface rendering method provided in the above embodiments.

[0129] Fig.11 FIG. 1 is a schematic diagram of the internal structure of a wearable device in one embodiment. Fig.11 As shown, the wearable device includes a processor and a memory connected via a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire wearable device. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement an interface rendering method provided in each of the above embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium. The wearable device can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, etc.

[0130] The implementation of each module in the interface rendering device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a wearable device or a wearable device. The program modules constituted by the computer program may be stored in the memory of the wearable device or the wearable device. When the computer program is executed by the processor, the steps of the method described in the embodiment of the present application are implemented.

[0131] The embodiment of the present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, enable the processors to perform the steps of the interface rendering method.

[0132] A computer program product comprising instructions enables the computer to perform an interface rendering method when the computer program product is run on the computer.

[0133] Any reference to memory, storage, database or other media used in the embodiments of the present application may include non-volatile and / or volatile memory. Suitable non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM).

[0134] The above interface rendering embodiments only express several implementation methods of the present application, and the descriptions are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present application. It should be pointed out that for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the patent of the present application shall be based on the attached claims.

Claims

1. An interface rendering method, characterized in that: Applied to a wearable device, the wearable device can run a first operating system and a second operating system, and the power consumption when the second operating system is run on the wearable device is greater than the power consumption when the first operating system is run on the wearable device, the method includes: In response to the interface rendering instruction, determine the interface type of the interface to be rendered; If the interface type belongs to the preset first type of interface, the first operating system performs interface rendering to generate a first target interface; If the interface type belongs to a preset second type of interface, the second operating system performs interface rendering to generate a second target interface.

2. The method according to claim 1, characterized in that The step of determining the interface type of the interface to be rendered in response to the interface rendering instruction includes: An interface rendering instruction is received through the first operating system, and the first operating system determines the interface type of the interface to be rendered.

3. The method according to claim 1, characterized in that The method further comprises: If the interface to be rendered belongs to the third type of interface, the first operating system and the second operating system both perform interface rendering to generate a third target interface, and the third target interface is an interface synthesized by the first target interface and the second target interface.

4. The method according to claim 1, characterized in that A first virtual machine runs on the first operating system, a second virtual machine runs on the second operating system, and the first virtual machine and the second virtual machine can run the same type of application programs; The generating a first target interface by performing interface rendering by the first operating system includes: The first operating system performs interface rendering by running the first virtual machine to generate a first target interface; The second operating system performs interface rendering to generate a second target interface; comprising: The second operating system runs the second virtual machine to perform interface rendering to generate a second target interface.

5. The method according to claim 4, characterized in that The second operating system runs the second virtual machine to perform interface rendering to generate a second target interface; comprising: Sending the interface rendering instruction to the second operating system through the first operating system; According to the interface drawing instruction, the second operating system is controlled to run the second virtual machine to perform interface rendering to generate a second target interface.

6. The method according to claim 5, characterized in that The sending the interface rendering instruction to the second operating system through the first operating system includes: Control the first operating system to forward the interface rendering instruction to the second operating system through the dual-system communication interface.

7. The method according to claim 6, characterized in that The controlling the first operating system to forward the interface rendering instruction to the second operating system through the dual-system communication interface includes: Sending the interface rendering instruction to the hardware abstraction layer of the first operating system through the application framework layer of the first operating system; The interface rendering instruction is sent to the hardware abstraction layer of the second operating system through the hardware abstraction layer of the first operating system via a peripheral interface.

8. The method according to claim 4, characterized in that The method further comprises: Split the dial rendering function into the first interface rendering class and the second interface rendering class in advance; Loading the first interface rendering class into the first virtual machine, where the first interface rendering class is used to render a first type of interface; The second interface rendering class is loaded into the second virtual machine, where the second interface rendering class is used to render a second type of interface.

9. The method according to claim 8, characterized in that The step of running the first virtual machine by the first operating system to perform interface rendering and generate a first target interface includes: The first interface rendering class is called in the first virtual machine to perform interface rendering in the application layer of the first operating system to generate a first type of interface.

10. The method according to claim 8, characterized in that The step of running the second virtual machine by the second operating system to perform interface rendering and generate a second target interface includes: The second interface rendering class is called in the second virtual machine to perform interface rendering in the application layer of the second operating system to generate a second type of interface.

11. The method according to claim 1, characterized in that: At least one of the brightness of the second-type interface, the number of elements included, and the color type of the elements is greater than the brightness of the first-type interface, the number of elements included, and the color type of the elements.

12. The method according to any one of claims 1 to 11, characterized in that: The first operating system is an RTOS system, and the second operating system is an Android system.

13. The method according to any one of claims 4 to 10, characterized in that: The first virtual machine is a JVM virtual machine, and the second virtual machine is a DVM virtual machine.

14. An interface rendering device, characterized in that: Applied to a wearable device, the wearable device can run a first operating system and a second operating system, and the power consumption when the second operating system is run on the wearable device is greater than the power consumption when the first operating system is run on the wearable device, the device comprises: An interface type identification module, used to respond to an interface rendering instruction and determine the interface type of the interface to be rendered; A first interface rendering module, configured to generate a first target interface by performing interface rendering by the first operating system if the interface type belongs to a preset first type of interface; The second interface rendering module is used to generate a second target interface by performing interface rendering by the second operating system if the interface type belongs to a preset second type of interface.

15. A wearable device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the computer program is executed by the processor, the processor executes the steps of the interface rendering method according to any one of claims 1 to 13.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the interface rendering method according to any one of claims 1 to 13 are implemented.

Citation Information

Patent Citations

  • Multi-interface intelligent system, intelligent projection system and interface management method

    CN105511716A

  • Rendering method based on dynamic VSYNC signal, mobile terminal and storage medium

    CN107220019A