技术领域Technical Field
本申请涉及终端领域,尤其涉及一种显示方法、电子设备及系统。The present application relates to the field of terminals, and in particular to a display method, electronic equipment and system.
背景技术Background Art
随着便携式电子设备的技术发展,人们使用便携式电子设备处理日常任务的频率也越来越高。常见的便携式电子设备可以是智能手表、智能手环等等。以智能手表为例,其可以和终端(例如手机)建立无线通信连接以进行数据交互。基于上述无线通信连接,智能手表和终端可以协同为用户提供相应的功能。例如,用户在运动的过程中,终端和智能手表可以在双方建立了无线通信的基础上,为用户进行运动计时。然而,在一些场景下,当智能手表执行运动计时功能时,若终端主动终止了运动计时功能,智能手表的显示屏会出现异常显示的情况,导致智能手表响应较慢的问题。With the development of technology of portable electronic devices, people use portable electronic devices to handle daily tasks more and more frequently. Common portable electronic devices may be smart watches, smart bracelets, and the like. Taking a smart watch as an example, it can establish a wireless communication connection with a terminal (such as a mobile phone) for data interaction. Based on the above wireless communication connection, the smart watch and the terminal can work together to provide corresponding functions for the user. For example, when the user is exercising, the terminal and the smart watch can time the user's exercise on the basis of wireless communication established between the two parties. However, in some scenarios, when the smart watch performs the exercise timing function, if the terminal actively terminates the exercise timing function, the display screen of the smart watch will display abnormally, resulting in the problem of slow response of the smart watch.
发明内容Summary of the invention
本申请提供了一种显示方法、电子设备及系统,实现了避免因定时器尚未停止计时而无法清空运动页面的相关资源所导致的显示异常,使第二电子设备的表盘页面可以保持正常显示,提高了电子设备200的响应效率。The present application provides a display method, electronic device and system, which avoids display anomalies caused by the inability to clear related resources of a sports page because the timer has not stopped timing, so that the dial page of the second electronic device can maintain normal display, thereby improving the response efficiency of the electronic device 200.
第一方面,本申请提供了一种显示方法,包括:接收并响应于第一电子设备发送的第一指令,该第二电子设备将该提示界面的图像数据和该第一界面的图像数据加载至帧缓冲framebuffer中。该第二电子设备基于该提示界面的图像数据显示提示界面,其中,该提示界面包括设置提示信息,该设置提示信息用于提示配置第一界面中的显示内容,该第一指令用于触发该第二电子设备执行第一功能。当该提示界面的显示时长尚未达到预设时长时,该第二电子设备接收到该第一电子设备发送的第二指令。其中,该第二指令用于触发该第二电子设备停止执行该第一功能。若提示界面标志位的值为第二值,该第二电子设备清空该framebuffer中的该提示界面的图像数据和该第一界面的图像数据。其中,该提示界面标志位用于指示该提示界面是否显示。该第二电子设备将表盘页面的图像数据加载至该framebuffer中。该第二电子设备基于该表盘页面的图像数据,显示该表盘页面。In a first aspect, the present application provides a display method, comprising: receiving and responding to a first instruction sent by a first electronic device, the second electronic device loading the image data of the prompt interface and the image data of the first interface into a frame buffer framebuffer. The second electronic device displays a prompt interface based on the image data of the prompt interface, wherein the prompt interface includes setting prompt information, the setting prompt information is used to prompt the configuration of the display content in the first interface, and the first instruction is used to trigger the second electronic device to perform a first function. When the display time of the prompt interface has not reached a preset time, the second electronic device receives a second instruction sent by the first electronic device. Wherein, the second instruction is used to trigger the second electronic device to stop executing the first function. If the value of the prompt interface flag is a second value, the second electronic device clears the image data of the prompt interface and the image data of the first interface in the framebuffer. Wherein, the prompt interface flag is used to indicate whether the prompt interface is displayed. The second electronic device loads the image data of the dial page into the framebuffer. The second electronic device displays the dial page based on the image data of the dial page.
在一种可能的实现方式中,在该第二电子接收并响应于第一电子设备发送的第一指令之前,该方法还包括:该第二电子设备将该提示界面标志位的值初始化为第一值。其中,该第一值用于指示该第二电子设备未显示该提示界面。In a possible implementation, before the second electronic device receives and responds to the first instruction sent by the first electronic device, the method further includes: the second electronic device initializes the value of the prompt interface flag to a first value, wherein the first value is used to indicate that the second electronic device does not display the prompt interface.
在一种可能的实现方式中,在该第二电子设备基于该提示界面的图像数据显示提示界面之后,该方法还包括:该第二电子设备将该提示界面标志位的值设置为第二值。其中,该第二值用于指示该第二电子设备显示该提示界面。In a possible implementation, after the second electronic device displays the prompt interface based on the image data of the prompt interface, the method further includes: the second electronic device sets the value of the prompt interface flag to a second value, wherein the second value is used to instruct the second electronic device to display the prompt interface.
在一种可能的实现方式中,在该第二电子设备基于该提示界面的图像数据显示提示界面之后,该方法还包括:该第二电子设备触发定时器开始计时。其中,该定时器用于控制该提示界面的显示时长。In a possible implementation, after the second electronic device displays the prompt interface based on the image data of the prompt interface, the method further includes: the second electronic device triggering a timer to start timing, wherein the timer is used to control the display duration of the prompt interface.
在一种可能的实现方式中,接收并响应于第一电子设备发送的第一指令,该第二电子设备将该提示界面的图像数据和该第一界面的图像数据加载至帧缓冲framebuffer中,包括:接收并响应于第一电子设备发送的第一指令时,该第二电子设备判断该设置提示信息的显示次数是否小于预设次数。若该设置提示信息的显示次数小于该预设次数,该第二电子设备将该提示界面的图像数据和该第一界面的图像数据加载至帧缓冲framebuffer中。In a possible implementation, receiving and responding to a first instruction sent by a first electronic device, the second electronic device loads the image data of the prompt interface and the image data of the first interface into a frame buffer, including: when receiving and responding to the first instruction sent by the first electronic device, the second electronic device determines whether the display times of the setting prompt information are less than a preset number of times. If the display times of the setting prompt information are less than the preset number of times, the second electronic device loads the image data of the prompt interface and the image data of the first interface into a frame buffer.
在一种可能的实现方式中,若提示界面标志位的值为第二值,该第二电子设备清空该framebuffer中的该提示界面的图像数据和该第一界面的图像数据,包括:若该提示界面标志位的值为第二值,该第二电子设备触发该定时器停止计时。该第二电子设备清空该framebuffer中的该提示界面的图像数据和该第一界面的图像数据。In a possible implementation, if the value of the prompt interface flag is a second value, the second electronic device clears the image data of the prompt interface and the image data of the first interface in the framebuffer, including: if the value of the prompt interface flag is a second value, the second electronic device triggers the timer to stop timing. The second electronic device clears the image data of the prompt interface and the image data of the first interface in the framebuffer.
在一种可能的实现方式中,在该第二电子设备清空该framebuffer中的该提示界面的图像数据和该第一界面的图像数据之后,该方法还包括:该第二电子设备将该提示界面标志位的值设置为第一值。In a possible implementation, after the second electronic device clears the image data of the prompt interface and the image data of the first interface in the framebuffer, the method further includes: the second electronic device sets the value of the prompt interface flag to the first value.
第二方面,本申请实施例提供了一种电子设备,为第二电子设备,包括:显示屏、一个或多个处理器和一个或多个存储器。其中,该一个或多个处理器与该显示屏、该一个或多个存储器耦合,该一个或多个存储器用于存储计算机指令,该一个或多个处理器用于执行该计算机指令以使得该电子设备执行上述第一方面任一项可能的实现方式中的方法。In a second aspect, an embodiment of the present application provides an electronic device, which is a second electronic device, comprising: a display screen, one or more processors, and one or more memories. The one or more processors are coupled to the display screen and the one or more memories, the one or more memories are used to store computer instructions, and the one or more processors are used to execute the computer instructions so that the electronic device executes the method in any possible implementation of the first aspect.
第三方面,本申请实施例提供了一种芯片系统,应用于电子设备,该芯片系统包括处理电路和接口电路,该接口电路用于接收代码指令并传输至该处理电路,该处理电路用于运行该代码指令以执行该计算机指令以使得该电子设备执行上述第一方面任一项可能的实现方式中的方法。In a third aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes a processing circuit and an interface circuit. The interface circuit is used to receive code instructions and transmit them to the processing circuit. The processing circuit is used to run the code instructions to execute the computer instructions so that the electronic device executes the method in any possible implementation of the first aspect above.
第四方面,本申请实施例提供了一种计算机可读存储介质,包括指令,当该指令在电子设备上运行时,使得该电子设备执行该计算机指令以使得该电子设备执行上述第一方面任一项可能的实现方式中的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, cause the electronic device to execute the computer instructions so that the electronic device executes a method in any possible implementation of the first aspect described above.
第五方面,本申请实施例提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行该计算机指令以使得该电子设备执行上述第一方面任一项可能的实现方式中的方法。In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the computer instruction so that the electronic device executes the method in any possible implementation of the first aspect above.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种通信系统10的架构示意图;FIG1 is a schematic diagram of the architecture of a communication system 10 provided in an embodiment of the present application;
图2A-图2G本申请实施例提供的一种电子设备200显示异常的场景示意图;2A-2G are schematic diagrams of a scene in which an electronic device 200 displays an abnormality, provided by an embodiment of the present application;
图3为本申请实施例提供的一种用户界面显示的流程示意图;FIG3 is a schematic diagram of a flow chart of a user interface display provided in an embodiment of the present application;
图4为本申请实施例涉及的一种电子设备200显示异常的流程示意图;FIG. 4 is a schematic diagram of a flow chart of an abnormal display of an electronic device 200 according to an embodiment of the present application;
图5为本申请实施例提供的一种显示方法的流程示意图;FIG5 is a schematic diagram of a flow chart of a display method provided in an embodiment of the present application;
图6A为本申请实施例提供的一种电子设备200的装置架构示意图;FIG6A is a schematic diagram of a device architecture of an electronic device 200 provided in an embodiment of the present application;
图6B为本申请实施例提供的一种电子设备100的软件架构示意图;FIG6B is a schematic diagram of a software architecture of an electronic device 100 provided in an embodiment of the present application;
图7为本申请实施例提供的一种显示方法的模块交互示意图;FIG7 is a schematic diagram of module interaction of a display method provided in an embodiment of the present application;
图8A为本申请实施例提供的另一种显示方法的具体流程示意图;FIG8A is a schematic diagram of a specific process of another display method provided in an embodiment of the present application;
图8B为本申请实施例提供的另一种显示方法的流程示意图;FIG8B is a schematic diagram of a flow chart of another display method provided in an embodiment of the present application;
图9为本申请实施例提供的一种电子设备100的硬件结构示意图;FIG9 is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application;
图10为本申请实施例提供的一种电子设备200的硬件结构示意图。FIG. 10 is a schematic diagram of the hardware structure of an electronic device 200 provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请得到说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指包含一个或多个所列出项目的任何或所有可能组合。在本申请实施例中,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the present specification and the appended claims, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear contrary indication in its context. It should also be understood that the term "and/or" used in the present application refers to any or all possible combinations containing one or more of the listed items. In the embodiments of the present application, the terms "first" and "second" are only used for description purposes, and cannot be understood as implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" can expressly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more.
图1为本申请实施例提供的一种通信系统10的架构示意图。FIG1 is a schematic diagram of the architecture of a communication system 10 provided in an embodiment of the present application.
如图1所示,通信系统10可以包括:电子设备100(可以被称为第一电子设备)和电子设备200(可以被称为第二电子设备)。As shown in FIG. 1 , a communication system 10 may include an electronic device 100 (which may be referred to as a first electronic device) and an electronic device 200 (which may be referred to as a second electronic device).
电子设备100可以是手机、平板电脑、PC、超级移动个人计算机(ultra-mobilepersonal computer,UMPC)、上网本、个人数字助理(personaldigital assistant,PDA)等电子设备。本申请对该电子设备100的具体类型不作任何限制。The electronic device 100 may be a mobile phone, a tablet computer, a PC, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The present application does not impose any limitation on the specific type of the electronic device 100 .
电子设备200可以是智能手表、智能手环等可穿戴设备、便携式设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备等电子设备。本申请对该电子设备200的具体类型不作任何限制。The electronic device 200 may be a wearable device such as a smart watch or a smart bracelet, a portable device, an augmented reality (AR)/virtual reality (VR) device, etc. The present application does not impose any restrictions on the specific type of the electronic device 200.
电子设备100可以和电子设备200建立无线通信连接,并基于上述无线通信连接和电子设备200进行数据通信。电子设备100可以通过上述无线通信连接向电子设备200发送数据(例如,运动计时开启指令和运动计时关闭指令等)。电子设备100也可以通过上述无线通信连接接收到电子设备200发送的数据。其中,该无线通信连接可以是蓝牙连接、无线保真(wireless fidelity,Wi-Fi)等等,本申请实施例以蓝牙连接为例进行说明。The electronic device 100 can establish a wireless communication connection with the electronic device 200, and perform data communication with the electronic device 200 based on the wireless communication connection. The electronic device 100 can send data (for example, a motion timing on instruction and a motion timing off instruction, etc.) to the electronic device 200 through the wireless communication connection. The electronic device 100 can also receive data sent by the electronic device 200 through the wireless communication connection. Among them, the wireless communication connection can be a Bluetooth connection, wireless fidelity (wireless fidelity, Wi-Fi), etc., and the embodiment of the present application takes the Bluetooth connection as an example for explanation.
在一些示例中,电子设备100可以和电子设备200建立有线通信连接从而进行数据交互。例如,电子设备100可以和电子设备200可以通过用串行总线(universalserialbus,USB)建立有线连接,并基于上述有限通信连接的方式互相传输数据信息。In some examples, the electronic device 100 can establish a wired communication connection with the electronic device 200 to exchange data. For example, the electronic device 100 can establish a wired connection with the electronic device 200 using a universal serial bus (USB) and transmit data information to each other based on the above limited communication connection.
需要说明的是,本申请实施例示出的示例性通信系统架构并不构成对通信系统10的具体限定,在本申请另一些实施例中,通信系统10可以包括比图示更多或更少的电子设备,也可以包括与图示中不同类型的电子设备。例如,通信系统10中还可以包括多个与电子设备200建立无线/有线通信连接的电子设备100,例如具有通信功能的显示器,和/或平板电脑,和/或PC等,本申请对此不作限制。It should be noted that the exemplary communication system architecture shown in the embodiments of the present application does not constitute a specific limitation on the communication system 10. In other embodiments of the present application, the communication system 10 may include more or fewer electronic devices than shown in the figure, and may also include electronic devices of different types than those shown in the figure. For example, the communication system 10 may also include multiple electronic devices 100 that establish wireless/wired communication connections with the electronic device 200, such as displays with communication functions, and/or tablet computers, and/or PCs, etc., and the present application does not limit this.
电子设备200可以和电子设备100建立无线通信连接以进行数据交互。基于上述无线通信连接,电子设备100和电子设备200可以协同为用户提供相应的功能。例如,用户在运动的过程中,电子设备100和电子设备200可以在双方建立了无线通信的基础上,为用户进行运动计时。然而,在一些应用场景下,当电子设备200执行运动计时功能时,若电子设备100主动终止了运动计时,电子设备200会出现显示异常,导致电子设备200响应较慢的问题。The electronic device 200 can establish a wireless communication connection with the electronic device 100 for data exchange. Based on the above wireless communication connection, the electronic device 100 and the electronic device 200 can cooperate to provide corresponding functions for the user. For example, when the user is exercising, the electronic device 100 and the electronic device 200 can perform exercise timing for the user on the basis of wireless communication established between the two parties. However, in some application scenarios, when the electronic device 200 performs the exercise timing function, if the electronic device 100 actively terminates the exercise timing, the electronic device 200 will display abnormalities, resulting in the problem of slow response of the electronic device 200.
图2A-图2F为本申请实施例提供的一种电子设备200显示异常的场景示意图。2A-2F are schematic diagrams of a scenario in which an electronic device 200 displays an abnormality, provided in an embodiment of the present application.
图2A-图2F所示的场景中,电子设备200已恢复出厂设置,且没有开启常亮模式。电子设备200在检测到用户没有使用电子设备200的时长达到预设时长T1时,电子设备200即从亮屏状态切换为熄屏状态。其中,常亮模式可以理解为:如果用户没有使用电子设备200,只要电子设备200没有接收到用户的熄屏输入(例如按压物理按键等),电子设备200不会处于熄屏状态,而是一直处于亮屏状态。熄屏状态指的是电子设备200上显示屏的像素点不被点亮,亮屏状态指的是电子设备200上显示屏的部分/全部像素点点亮以显示界面元素。黑屏状态为亮屏状态的一种特殊情景,即电子设备200上显示屏的部分/全部像素点点亮显示为黑色。In the scenarios shown in Figures 2A to 2F, the electronic device 200 has been restored to factory settings, and the always-on mode is not turned on. When the electronic device 200 detects that the user has not used the electronic device 200 for a preset time length T1, the electronic device 200 switches from the screen-on state to the screen-off state. Among them, the always-on mode can be understood as: if the user does not use the electronic device 200, as long as the electronic device 200 does not receive the user's screen-off input (such as pressing a physical button, etc.), the electronic device 200 will not be in the screen-off state, but will always be in the screen-on state. The screen-off state refers to the pixels of the display screen on the electronic device 200 are not lit, and the screen-on state refers to some/all pixels of the display screen on the electronic device 200 are lit to display interface elements. The black screen state is a special scenario of the screen-on state, that is, some/all pixels of the display screen on the electronic device 200 are lit and displayed as black.
如图2A所示,电子设备100可以显示出桌面210。该桌面210可以显示有一个或多个应用图标。其中,该一个或多个应用图标可以包括天气应用图标、股票应用图标、计算器应用图标、设置应用图标、邮件应用图标、主题应用图标、视频应用图标和运动健康应用(即本申请实施例中描述的运动应用)图标211等。可选的,桌面210还可以显示有状态栏。其中,状态栏可以包括移动通信信号(又可以称为蜂窝信号)的一个或多个信号强度指示符、无线保真(wireless fidelity,Wi-Fi)信号的信号强度指示符、电池状态指示符、时间指示符等等。As shown in Figure 2A, the electronic device 100 can display a desktop 210. The desktop 210 can display one or more application icons. Among them, the one or more application icons may include a weather application icon, a stock application icon, a calculator application icon, a settings application icon, a mail application icon, a theme application icon, a video application icon, and a sports health application (i.e., the sports application described in the embodiment of the present application) icon 211, etc. Optionally, the desktop 210 can also display a status bar. Among them, the status bar may include one or more signal strength indicators of a mobile communication signal (also referred to as a cellular signal), a signal strength indicator of a wireless fidelity (wireless fidelity, Wi-Fi) signal, a battery status indicator, a time indicator, and the like.
电子设备100可以接收到作用于运动健康应用图标211上的触摸操作(例如点击),响应于该触摸操作,电子设备100可以显示出运动应用页面。The electronic device 100 may receive a touch operation (eg, a click) on the sports and health application icon 211 , and in response to the touch operation, the electronic device 100 may display a sports application page.
如图2B所示,电子设备100可以显示出运动应用页面220。该运动应用页面220可以包括一个或多个界面切换控件(例如“健康”界面切换控件、“运动”界面切换控件、“设备”界面切换控件和“我的”界面切换控件等)。当前电子设备100显示的是运动界面。在该运动界面中,可以记录用户户外跑步的公里数(例如“0.00公里”等)。运动界面还可以包括一个或多个功能控件,例如“户外跑步”功能控件、“瑜伽”功能控件、“体操”功能控件和“骑行”功能控件,以及运动计时功能控件221。As shown in FIG. 2B , the electronic device 100 may display a sports application page 220. The sports application page 220 may include one or more interface switching controls (e.g., a "health" interface switching control, a "sports" interface switching control, a "device" interface switching control, and a "my" interface switching control, etc.). The current electronic device 100 displays a sports interface. In the sports interface, the number of kilometers of the user's outdoor running (e.g., "0.00 kilometers", etc.) may be recorded. The sports interface may also include one or more function controls, such as an "outdoor running" function control, a "yoga" function control, a "gymnastics" function control, and a "cycling" function control, as well as a sports timing function control 221.
电子设备100可以接收到作用于运动计时功能控件221上的触摸操作(例如点击),响应于该触摸操作,当电子设备100和电子设备200建立蓝牙连接时,电子设备100和电子设备200可以执行运动计时功能。电子设备100可以显示出运动计时界面。当电子设备200恢复出厂设置或电子设备100被用户购买且处于出厂状态下,设置提示信息(也可以称为提示信息1)的显示次数小于预设次数时,电子设备200可以显示出提示界面。其中,该设置提示信息可以用于提示用户设置电子设备200上运动计时界面的显示内容。The electronic device 100 may receive a touch operation (e.g., click) acting on the motion timing function control 221. In response to the touch operation, when the electronic device 100 and the electronic device 200 establish a Bluetooth connection, the electronic device 100 and the electronic device 200 may perform the motion timing function. The electronic device 100 may display a motion timing interface. When the electronic device 200 is restored to factory settings or the electronic device 100 is purchased by the user and is in the factory state, when the display number of the setting prompt information (also referred to as prompt information 1) is less than the preset number, the electronic device 200 may display a prompt interface. Among them, the setting prompt information can be used to prompt the user to set the display content of the motion timing interface on the electronic device 200.
如图2C所示,电子设备100可以显示出运动计时界面230,该运动计时界面230可以包括一项或多项用户的运动数据,例如用户的运动公里数提示信息(例如文本信息“0.00公里”)、消耗热量数提示信息(例如文本信息“0千卡”)、运动用时数提示信息(例如文本信息“00:00:00用时”)和速度提示信息(例如文本信息“--配速”)、一个或多个控件(例如运动中止控件231)等等。As shown in Figure 2C, the electronic device 100 can display a sports timing interface 230, which may include one or more user sports data, such as the user's exercise mileage prompt information (such as the text message "0.00 kilometers"), the calorie consumption prompt information (such as the text message "0 kcal"), the exercise time prompt information (such as the text message "00:00:00 time") and the speed prompt information (such as the text message "--pace"), one or more controls (such as the exercise stop control 231), etc.
如图2C所示,电子设备200可以显示出提示界面240。该提示界面240可以包括设置提示信息,例如文本信息“长按可定制显示内容”。As shown in Fig. 2C, the electronic device 200 may display a prompt interface 240. The prompt interface 240 may include setting prompt information, such as text information "Long press to customize the displayed content".
电子设备100可以接收到作用于运动中止控件231上的触摸操作,响应于该触摸操作,电子设备100可以在运动计时界面230上显示出运动结束控件。The electronic device 100 may receive a touch operation on the exercise stop control 231 , and in response to the touch operation, the electronic device 100 may display an exercise end control on the exercise timing interface 230 .
如图2D所示,电子设备100可以在运动计时界面230上显示出运动结束控件232。电子设备100可以接收到作用于运动结束控件232上的触摸操作(例如点击),响应于该触摸,电子设备100可以从运动计时界面230切换显示为运动应用页面220。并且,电子设备100可以通过蓝牙连接向电子设备200发送运动计时关闭指令。As shown in FIG2D , the electronic device 100 may display a sports end control 232 on the sports timing interface 230. The electronic device 100 may receive a touch operation (e.g., click) on the sports end control 232, and in response to the touch, the electronic device 100 may switch the display from the sports timing interface 230 to the sports application page 220. In addition, the electronic device 100 may send a sports timing closing instruction to the electronic device 200 via a Bluetooth connection.
如图2D所示,响应于运动计时关闭指令,电子设备200可以从提示界面240切换显示为表盘页面250。该表盘页面250可以显示出状态栏。其中,状态栏可以包括移动通信信号(又可以称为蜂窝信号)的一个或多个信号强度指示符、无线保真(wireless fidelity,Wi-Fi)信号的信号强度指示符等。表盘页面250还可以显示出时间指示符、一项或多项用户的生理数据信息,例如热量数据78、步行数据1502和一分钟的心跳数据87等。As shown in FIG2D , in response to the motion timing off instruction, the electronic device 200 can switch from the prompt interface 240 to the dial page 250. The dial page 250 can display a status bar. The status bar may include one or more signal strength indicators of a mobile communication signal (also referred to as a cellular signal), a signal strength indicator of a wireless fidelity (Wi-Fi) signal, etc. The dial page 250 can also display a time indicator, one or more physiological data information of the user, such as calorie data 78, walking data 1502, and one-minute heartbeat data 87.
然而,电子设备200上的表盘页面250仅仅显示了一定的时长(例如,1秒、2秒等,该时长小于预设时长T1),就从表盘页面250切换显示为了黑屏界面,处于黑屏状态。若电子设备200检测到用户没有使用电子设备200的时长达到预设时长T1时,可以从黑屏状态切换显示为熄屏状态。However, the dial page 250 on the electronic device 200 is only displayed for a certain period of time (for example, 1 second, 2 seconds, etc., which is less than the preset period of time T1), and then the dial page 250 is switched to a black screen interface, and the screen is in a black state. If the electronic device 200 detects that the user has not used the electronic device 200 for a preset period of time T1, the screen can be switched from the black screen state to the off screen state.
如图2E所示,电子设备100仍然显示出运动应用页面220。电子设备200上的表盘页面250仅仅显示了一定的时长(例如,1秒、2秒等),就从表盘页面250切换显示为了黑屏状态。若电子设备200检测到用户没有使用电子设备200的时长达到预设时长T1时,可以从黑屏状态切换显示为熄屏状态。此时,在电子设备200处于熄屏状态下,如图2E中的(a)所示,电子设备200接收到用户点亮屏幕的输入(例如,按压物理按键251),响应于该输入,如图2E中的(b)所示,电子设备200显示出黑屏界面260。其中,黑屏界面可以理解为电子设备200上显示屏的像素点点亮显示为黑色的界面。然后,电子设备200可以接收到用户作用于电子设备200上表盘的长按输入,响应于该长按输入,如图2E中的(c)所示,电子设备200可以从黑屏界面260切换显示为表盘样式设置界面270。其中,表盘样式设置界面270可以用于展示一个或多个表盘页面的样式,例如,表盘样式设置界面270可以显示出“极速韵律”表盘样式。As shown in Figure 2E, the electronic device 100 still displays the sports application page 220. The dial page 250 on the electronic device 200 only displays a certain duration (for example, 1 second, 2 seconds, etc.), and then switches from the dial page 250 to a black screen state. If the electronic device 200 detects that the user has not used the electronic device 200 for a preset duration T1, it can switch from a black screen state to an off-screen state. At this time, when the electronic device 200 is in the off-screen state, as shown in (a) of Figure 2E, the electronic device 200 receives an input from the user to light up the screen (for example, pressing a physical button 251), and in response to the input, as shown in (b) of Figure 2E, the electronic device 200 displays a black screen interface 260. Among them, the black screen interface can be understood as an interface in which the pixels of the display screen on the electronic device 200 are lit and displayed as black. Then, the electronic device 200 may receive a long press input from the user on the dial of the electronic device 200. In response to the long press input, as shown in (c) of FIG. 2E , the electronic device 200 may switch from the black screen interface 260 to the dial style setting interface 270. The dial style setting interface 270 may be used to display the styles of one or more dial pages. For example, the dial style setting interface 270 may display the "Extreme Rhythm" dial style.
当电子设备200显示出表盘样式设置界面时,电子设备200可以接收到用户针对物理按键的按压输入,响应于该按压输入,电子设备200可以从表盘样式设置界面切换显示为表盘页面。When the electronic device 200 displays the dial style setting interface, the electronic device 200 may receive a user's pressing input on a physical button. In response to the pressing input, the electronic device 200 may switch the display from the dial style setting interface to the dial page.
如图2F所示,电子设备200可以显示出表盘样式设置界面270。电子设备200可以接收到用户针对物理按键251的按压输入。响应于该按压输入,电子设备200可以从表盘样式设置界面270切换显示为表盘页面250。As shown in FIG2F , the electronic device 200 may display a dial style setting interface 270. The electronic device 200 may receive a user's pressing input on the physical button 251. In response to the pressing input, the electronic device 200 may switch the display from the dial style setting interface 270 to the dial page 250.
在一种可能的实现方式中,若电子设备200上的表盘页面250仅仅显示了一定的时长(例如,1秒、2秒等,该时长小于预设时长T1),就从表盘页面250切换显示为了黑屏界面,处于黑屏状态。在该黑屏状态下,电子设备200可以接收到用户作用于电子设备200上表盘的长按输入,响应于该长按输入,电子设备200可以从黑屏界面切换显示为表盘样式设置界面270。其中,表盘样式设置界面270可以用于展示一个或多个表盘页面的样式,例如,表盘样式设置界面270可以显示出“极速韵律”表盘样式。In a possible implementation, if the dial page 250 on the electronic device 200 is only displayed for a certain duration (for example, 1 second, 2 seconds, etc., which is less than the preset duration T1), the dial page 250 is switched to a black screen interface, and the display is in a black screen state. In the black screen state, the electronic device 200 can receive a long press input from the user on the dial on the electronic device 200. In response to the long press input, the electronic device 200 can switch from the black screen interface to the dial style setting interface 270. Among them, the dial style setting interface 270 can be used to display the style of one or more dial pages. For example, the dial style setting interface 270 can display the "Extreme Rhythm" dial style.
图2A-图2D、图2G为本申请实施例提供的另一种电子设备200显示异常的场景示意图。2A-2D and 2G are schematic diagrams of another electronic device 200 showing an abnormal display scenario according to an embodiment of the present application.
图2A-图2D、图2G所示的场景中,电子设备200已恢复出厂设置且开启常亮模式。In the scenarios shown in FIG. 2A-FIG . 2D and FIG. 2G , the electronic device 200 has been restored to factory settings and the always-on mode is turned on.
其中,图2A-图2D的说明可以参考前述实施例,在此不再赘述。The description of FIG. 2A to FIG. 2D may refer to the aforementioned embodiments and will not be repeated here.
然而,电子设备200上的表盘页面仅仅显示了一定的时长(例如,1秒、2秒等,该时长小于预设时长T1),然后,电子设备200的表盘页面上仅仅显示出背景图片,不再显示状态栏、时间指示符、一项或多项用户的生理数据信息等界面元素。However, the dial page on the electronic device 200 is only displayed for a certain period of time (for example, 1 second, 2 seconds, etc., which is less than the preset period of time T1), and then, the dial page of the electronic device 200 only displays the background picture, and no longer displays the status bar, time indicator, one or more user's physiological data information and other interface elements.
如图2G所示,电子设备100仍然显示出运动应用页面220,电子设备200上的表盘页面250仅仅显示了一定的时长(例如,1秒、2秒等),然后,电子设备200的表盘页面250上仅仅显示出背景图片,不再显示状态栏、时间指示符、一项或多项用户的生理数据信息或功能控件等界面元素。As shown in Figure 2G, the electronic device 100 still displays the sports application page 220, and the dial page 250 on the electronic device 200 is only displayed for a certain length of time (for example, 1 second, 2 seconds, etc.), and then, the dial page 250 of the electronic device 200 only displays the background picture, and no longer displays interface elements such as the status bar, time indicator, one or more users' physiological data information or function controls.
本申请实施例中,图2A-图2G仅仅用于示例性解释本申请,并不构成任何限制。In the embodiments of the present application, FIGS. 2A to 2G are merely used to exemplify the present application and do not constitute any limitation.
图3为本申请实施例提供的一种用户界面显示的流程示意图。FIG3 is a flow chart of a user interface display provided in an embodiment of the present application.
如图3所示,用户界面的显示所涉及的模块可以包括:资源存储模块、微控制器(microcontroller unit,MCU)和显示屏,其中,资源存储模块可以包括UI资源模块、微控制器可以包括文件系统、图形处理器(GPU/DMA2D)和伪静态随机存储器(pseudo staticrandom access memory,PSRAM),显示屏可以包括静态随机存储器(static random accessmemory,SRAM),PSRAM中可以包括资源压缩/解压模块、资源缓存模块和帧缓冲区(framebuffer)等。As shown in FIG3 , the modules involved in the display of the user interface may include: a resource storage module, a microcontroller unit (MCU) and a display screen, wherein the resource storage module may include a UI resource module, the microcontroller may include a file system, a graphics processor (GPU/DMA2D) and a pseudo static random access memory (PSRAM), the display screen may include a static random access memory (SRAM), and the PSRAM may include a resource compression/decompression module, a resource cache module and a frame buffer, etc.
首先,文件系统可以通过安全数字输入输出(securedigitalinputandoutput,SDIO)接口从UI资源模块中读取到用于用户界面显示的UI资源。如果UI资源为压缩文件,则资源压缩/解压模块通过现场可编程门阵列夹层卡(field-programmable gate arraymezzanine card,FMC)接口从文件系统中读取到UI资源并进行解压。然后,将解压后的UI资源发送给资源缓存模块。资源缓存模块可以通过FMC接口将UI资源发送给图形处理器(GPU或者DMA2D)。图像处理器可以基于UI资源合成出图像,该图像包括用户界面的图像数据。然后,图像处理器可以通过FMC接口将图像渲染到帧缓冲区framebuffer中。接下来,framebuffer可以将图像数据通过移动行业处理器接口(mobileindustryprocessorinterface,MIPI)将图像数据发送给SRAM中。显示屏可以基于SRAM中的图像数据显示出相应的用户界面。First, the file system can read the UI resources for user interface display from the UI resource module through the secure digital input and output (SDIO) interface. If the UI resource is a compressed file, the resource compression/decompression module reads the UI resource from the file system through the field-programmable gate array mezzanine card (FMC) interface and decompresses it. Then, the decompressed UI resource is sent to the resource cache module. The resource cache module can send the UI resource to the graphics processor (GPU or DMA2D) through the FMC interface. The image processor can synthesize an image based on the UI resource, and the image includes the image data of the user interface. Then, the image processor can render the image into the frame buffer framebuffer through the FMC interface. Next, the framebuffer can send the image data to the SRAM through the mobile industry processor interface (MIPI). The display screen can display the corresponding user interface based on the image data in the SRAM.
图3仅仅用于示例性解释本申请,不对本申请构成任何限制。FIG. 3 is only used to exemplify the present application and does not constitute any limitation to the present application.
图4为本申请实施例涉及的一种电子设备200显示异常的流程示意图。FIG. 4 is a schematic diagram of a flow chart of an abnormal display of an electronic device 200 according to an embodiment of the present application.
如图4所示,该电子设备200显示异常的流程可以包括:As shown in FIG. 4 , the process of displaying an abnormality of the electronic device 200 may include:
S401:电子设备100和电子设备200建立无线通信连接。S401: The electronic device 100 and the electronic device 200 establish a wireless communication connection.
具体的,本申请实施例以蓝牙连接为例。电子设备100可以通过蓝牙模块发射信号来探测或扫描电子设备200,与电子设备200建立无线通信连接并传输数据。其中,蓝牙模块可以提供包括经典蓝牙或蓝牙低功耗中一项或多项蓝牙通信的解决方案。在一些实施例中,电子设备100也可以通过WLAN模块发射信号来探测或扫描电子设备200,与电子设备200建立无线通信连接并传输数据。其中,WLAN模块可以提供包括Wi-Fi direct、Wi-Fi LAN或Wi-Fi softAP中一项或多项WLAN通信的解决方案。在另一些实施例中,电子设备100也可以和电子设备200通过调频(frequency modulation,FM)、近距离无线通信技术(near fieldcommunication,NFC)。本申请实施例以蓝牙连接为例作说明。Specifically, the embodiment of the present application takes Bluetooth connection as an example. The electronic device 100 can transmit a signal through the Bluetooth module to detect or scan the electronic device 200, establish a wireless communication connection with the electronic device 200 and transmit data. Among them, the Bluetooth module can provide a solution including one or more Bluetooth communications in classic Bluetooth or Bluetooth low energy. In some embodiments, the electronic device 100 can also transmit a signal through the WLAN module to detect or scan the electronic device 200, establish a wireless communication connection with the electronic device 200 and transmit data. Among them, the WLAN module can provide a solution including one or more WLAN communications in Wi-Fi direct, Wi-Fi LAN or Wi-Fi softAP. In other embodiments, the electronic device 100 can also communicate with the electronic device 200 through frequency modulation (FM) and near field communication (NFC). The embodiment of the present application takes Bluetooth connection as an example for illustration.
S402:电子设备100接收到开启运动计时功能的操作1。S402: The electronic device 100 receives operation 1 for starting the sports timing function.
示例性的,操作1可以是前述图2B中作用于运动计时功能控件221上的触摸操作(例如点击)。不限于此,操作1也可以是其他操作(例如,指节敲击显示屏的操作等)。For example, operation 1 may be a touch operation (eg, click) on the sports timing function control 221 in Fig. 2B. Not limited thereto, operation 1 may also be other operations (eg, knuckles tapping the display screen, etc.).
S403:电子设备100向电子设备200发送运动计时开启指令。S403: The electronic device 100 sends a motion timing start instruction to the electronic device 200.
由于在S401中电子设备100已经和电子设备200建立了无线通信连接,因此,本步骤中电子设备100可以通过无线通信连接向电子设备200发送运动计时开启指令。其中,该运动计时开启指令可以用于指示电子设备200执行运动计时功能(可以称为第一功能),对用户的运动进行计时。Since the electronic device 100 has established a wireless communication connection with the electronic device 200 in S401, the electronic device 100 can send a motion timing start instruction to the electronic device 200 through the wireless communication connection in this step. The motion timing start instruction can be used to instruct the electronic device 200 to execute a motion timing function (which can be called a first function) to time the user's motion.
S404:响应于运动计时开启指令,电子设备200创建运动页面。S404: In response to the sports timing start instruction, the electronic device 200 creates a sports page.
其中,响应于运动计时开启指令,电子设备200可以启动电子设备200上的运动应用,并创建运动页面(也可以称为TrainingView页面)。该运动页面可以用于显示以及管理后续电子设备200上的提示界面和运动计时界面。In response to the exercise timing start instruction, the electronic device 200 can start the exercise application on the electronic device 200 and create a exercise page (also called a TrainingView page). The exercise page can be used to display and manage the prompt interface and exercise timing interface on the subsequent electronic device 200.
S405:电子设备200判断设置提示信息的显示次数是否小于预设次数。S405: The electronic device 200 determines whether the display times of the setting prompt information is less than the preset times.
其中,电子设备200可以从快闪存储器(flash memory)中读取用于记录设置提示信息显示次数的计数器。如果电子设备200从计数器中读取到设置提示信息的显示次数小于预设次数,则电子设备200可以显示出设置提示信息,用于提示用户可以配置电子设备200上运动计时界面的显示内容。The electronic device 200 can read a counter for recording the number of times the setting prompt information is displayed from a flash memory. If the electronic device 200 reads from the counter that the number of times the setting prompt information is displayed is less than a preset number, the electronic device 200 can display the setting prompt information to prompt the user to configure the display content of the sports timing interface on the electronic device 200.
其中,预设次数可以是2次、3次等。The preset number of times may be 2 times, 3 times, etc.
该设置提示信息的显示时长为预设时长T2。也即是说,若电子设备200显示出设置提示信息的时长达到了预设时长T2,则电子设备200不再显示设置提示信息,转而显示为运动计时界面。预设时长T2可以为5秒、4秒、6秒等。The display duration of the setting prompt information is the preset duration T2. That is, if the electronic device 200 displays the setting prompt information for a duration that reaches the preset duration T2, the electronic device 200 will no longer display the setting prompt information and will instead display the exercise timing interface. The preset duration T2 may be 5 seconds, 4 seconds, 6 seconds, etc.
S406:若设置提示信息的显示次数小于预设次数,电子设备200将提示界面的图像数据加载至framebuffer中。其中,提示界面的图像数据用于显示提示界面。S406: If the display times of the set prompt information are less than the preset times, the electronic device 200 loads the image data of the prompt interface into the framebuffer, wherein the image data of the prompt interface is used to display the prompt interface.
S407:电子设备200将运动计时界面的图像数据加载至framebuffer中。其中,运动计时界面的图像数据用于显示运动计时界面。S407: The electronic device 200 loads the image data of the sports timing interface into the framebuffer, wherein the image data of the sports timing interface is used to display the sports timing interface.
其中,需要说明的是,提示界面的图像数据和运动计时界面的图像数据加载至framebuffer中的时序没有先后之分。该运动计时界面可以包括一项或多项用户的运动数据,例如用户的运动公里数提示信息、消耗热量数提示信息、运动用时数提示信息和速度提示信息等。It should be noted that there is no difference in the timing of loading the image data of the prompt interface and the image data of the exercise timing interface into the framebuffer. The exercise timing interface may include one or more user exercise data, such as the user's exercise mileage prompt information, calorie consumption prompt information, exercise time prompt information and speed prompt information.
在一种可能的实现方式中,若设置提示信息的显示次数大于或等于预设次数,则电子设备200将运动计时界面的图像数据加载至framebuffer中。此时,电子设备200并不会将提示界面的图像数据加载至framebuffer中。In a possible implementation, if the display times of the prompt information are set to be greater than or equal to the preset times, the electronic device 200 loads the image data of the sports timing interface into the framebuffer. At this time, the electronic device 200 does not load the image data of the prompt interface into the framebuffer.
S408:电子设备200通过framebuffer合成提示界面的图像数据和运动计时界面的图像数据,并基于合成后的提示界面的图像数据和运动计时界面的图像数据,在运动页面中显示提示界面。其中,该提示界面可以包括设置提示信息。S408: The electronic device 200 synthesizes the image data of the prompt interface and the image data of the motion timing interface through the framebuffer, and displays the prompt interface in the motion page based on the synthesized image data of the prompt interface and the image data of the motion timing interface. The prompt interface may include setting prompt information.
其中,framebuffer中此时同时存储有提示界面的图像数据和运动计时界面的图像数据。电子设备200可以通过framebuffer合成提示界面的图像数据和运动计时界面的图像数据。合成之后,提示界面的图像数据位于第一个图层,运动计时界面的图像数据位于第二个图层,也即是说提示界面图像数据所在的图层位于运动计时界面图像数据所在的图层之上。此时,虽然framebuffer中提示界面的图像数据和运动计时界面的图像数据都能发送给显示屏,但由于提示界面图像数据所在的图层在上,运动计时界面图像数据所在的图层在下,所以运动页面中只显示出提示界面。Among them, the image data of the prompt interface and the image data of the motion timing interface are stored in the framebuffer at this time. The electronic device 200 can synthesize the image data of the prompt interface and the image data of the motion timing interface through the framebuffer. After synthesis, the image data of the prompt interface is located in the first layer, and the image data of the motion timing interface is located in the second layer, that is to say, the layer where the image data of the prompt interface is located is above the layer where the image data of the motion timing interface is located. At this time, although the image data of the prompt interface and the image data of the motion timing interface in the framebuffer can be sent to the display screen, because the layer where the image data of the prompt interface is located is on the top, and the layer where the image data of the motion timing interface is located is on the bottom, only the prompt interface is displayed on the motion page.
S409:电子设备200触发设置提示信息对应的定时器开始计时。S409: The electronic device 200 triggers the timer corresponding to the setting prompt information to start timing.
其中,提示界面和设置提示信息的示例,可以参考前述图2C中的描述。For examples of the prompt interface and setting prompt information, please refer to the description in the aforementioned FIG. 2C .
设置提示信息对应的定时器可以用于计时设置显示信息的显示时长(也即可以计时提示界面的显示时长)。当定时器计时至预设时长T2时,电子设备200不再显示设置提示信息和提示界面,转而显示为运动计时界面。也即是说,定时器可以控制提示界面和设置提示信息的显示时长。The timer corresponding to the setting prompt information can be used to time the display duration of the setting display information (that is, the display duration of the prompt interface can be timed). When the timer reaches the preset duration T2, the electronic device 200 no longer displays the setting prompt information and the prompt interface, and instead displays the motion timing interface. In other words, the timer can control the display duration of the prompt interface and the setting prompt information.
在一种可能的实现方式中,若设置提示信息的显示次数等于预设次数,则电子设备200不必显示提示界面,也不必显示设置提示信息,而是直接基于运动计时界面的图像数据,显示出运动计时界面。In a possible implementation, if the display times of the setting prompt information are equal to the preset times, the electronic device 200 does not need to display the prompt interface or the setting prompt information, but directly displays the motion timing interface based on the image data of the motion timing interface.
当定时器尚未计时至预设时长T2时:When the timer has not reached the preset duration T2:
S410:电子设备100接收到关闭运动计时功能的操作2。S410: The electronic device 100 receives operation 2 to turn off the sports timing function.
示例性的,操作2可以是前述图2D中作用于运动结束控件232上的触摸操作(例如点击)。不限于此,操作2也可以是其他操作(例如,三指下滑操作等)。For example, operation 2 may be a touch operation (eg, click) on the motion end control 232 in FIG. 2D . Not limited thereto, operation 2 may also be other operations (eg, a three-finger slide operation, etc.).
S411:电子设备100向电子设备200发送运动计时关闭指令。S411: The electronic device 100 sends a motion timing off instruction to the electronic device 200.
由于在S401中电子设备100已经和电子设备200建立了无线通信连接,因此,本步骤中电子设备100可以通过无线通信连接向电子设备200发送运动计时关闭指令。其中,该运动计时关闭指令可以用于指示电子设备200停止执行运动计时功能,不再对用户的运动进行计时。Since the electronic device 100 has established a wireless communication connection with the electronic device 200 in S401, the electronic device 100 can send a motion timing off instruction to the electronic device 200 through the wireless communication connection in this step. The motion timing off instruction can be used to instruct the electronic device 200 to stop executing the motion timing function and stop timing the user's motion.
S412:响应于运动计时关闭指令,电子设备200加载表盘页面的图像数据至framebuffer中。其中,表盘页面的图像数据用于显示表盘页面。S412: In response to the sports timing off instruction, the electronic device 200 loads the image data of the dial page into the framebuffer, wherein the image data of the dial page is used to display the dial page.
S413:基于表盘页面的图像数据,电子设备200显示表盘页面。S413: Based on the image data of the dial page, the electronic device 200 displays the dial page.
示例性的,表盘页面可以是前述图2D所示的表盘页面250。Exemplarily, the dial page may be the dial page 250 shown in aforementioned FIG. 2D .
当定时器计时至预设时长T2时:When the timer reaches the preset duration T2:
S414:当定时器计时至预设时长T2时,清空framebuffer中的图像数据(包括提示界面的图像数据、运动计时界面的图像数据和表盘页面的图像数据等)。S414: When the timer reaches the preset duration T2, the image data in the framebuffer (including the image data of the prompt interface, the image data of the sports timing interface, and the image data of the dial page, etc.) is cleared.
S415:电子设备200显示异常。S415: The electronic device 200 displays an abnormality.
本申请实施例中,当设置提示信息对应的定时器尚未计时至预设时长T2,但电子设备200已经接收到运动计时关闭指令时,电子设备200不能清空运动页面的相关资源(包括运动计时界面的图像数据等),其原因在于:定时器和运动页面相关联,以便设置提示信息的显示时长达到预设时长T2之后电子设备200可以通过运动页面移除提示界面,及时显示出运动计时界面。若定时器没有停止,则运动页面的相关资源无法被清空。In the embodiment of the present application, when the timer corresponding to the set prompt information has not yet counted to the preset duration T2, but the electronic device 200 has received the motion timing off instruction, the electronic device 200 cannot clear the related resources of the motion page (including the image data of the motion timing interface, etc.), the reason is that: the timer is associated with the motion page, so that after the display duration of the set prompt information reaches the preset duration T2, the electronic device 200 can remove the prompt interface through the motion page and display the motion timing interface in time. If the timer is not stopped, the related resources of the motion page cannot be cleared.
并且,由于此时电子设备200已经接收到运动计时关闭指令,需要从提示界面转而切换显示为表盘页面,因此,电子设备200可以加载表盘页面的图像数据至framebuffer中。电子设备200可以基于表盘页面的图像数据显示出表盘页面。Furthermore, since the electronic device 200 has received the instruction to close the sports timer, it needs to switch from the prompt interface to the dial page, so the electronic device 200 can load the image data of the dial page into the framebuffer. The electronic device 200 can display the dial page based on the image data of the dial page.
此时,framebuffer存储有提示界面的图像数据、运动计时界面的图像数据和表盘页面的图像数据。当定时器计时至预设时长T2时,电子设备200可以通过函数~trainingView PNG::clearALLCache()清空运动页面的相关资源,但此时,电子设备200会清空framebuffer中的所有图像数据(包括运动计时界面的图像数据和表盘页面的图像数据等),因此,电子设备200仅显示了一定时长的表盘页面即出现黑屏,从而导致电子设备200出现如图2D~图2F、图2G所示的异常显示状态。At this time, the framebuffer stores the image data of the prompt interface, the image data of the sports timing interface, and the image data of the dial page. When the timer reaches the preset duration T2, the electronic device 200 can clear the related resources of the sports page through the function ~trainingView PNG::clearALLCache(), but at this time, the electronic device 200 will clear all the image data in the framebuffer (including the image data of the sports timing interface and the image data of the dial page, etc.), so the electronic device 200 only displays the dial page for a certain duration, that is, a black screen appears, resulting in the electronic device 200 showing an abnormal display state as shown in Figures 2D to 2F and 2G.
因此,本申请提供了一种显示方法,在该显示方法中,电子设备200可以为提示界面设置一个标志位,该标志位可以称为提示界面标志位。当电子设备200没有显示提示界面时,电子设备200可以将该提示界面标志位的值设置为第一值(例如false);当电子设备200显示出提示界面时,电子设备200可以将该提示界面标志位的值设置为第二值(例如true)。在电子设备200接收到运动计时关闭指令时,可以查询提示界面标志位的值。若提示界面标志位的值为第二值(例如true),则表示电子设备200此时正在显示提示界面,定时器正在计时中,运动页面的相关资源无法清空。因此,电子设备200可以触发定时器停止计时并清空运动页面的相关资源,然后,加载表盘页面的图像数据至framebuffer中。电子设备200可以基于表盘页面的图像数据显示出表盘页面。Therefore, the present application provides a display method, in which the electronic device 200 can set a flag for the prompt interface, and the flag can be called a prompt interface flag. When the electronic device 200 does not display the prompt interface, the electronic device 200 can set the value of the prompt interface flag to a first value (e.g., false); when the electronic device 200 displays the prompt interface, the electronic device 200 can set the value of the prompt interface flag to a second value (e.g., true). When the electronic device 200 receives a motion timing off instruction, the value of the prompt interface flag can be queried. If the value of the prompt interface flag is the second value (e.g., true), it means that the electronic device 200 is displaying the prompt interface at this time, the timer is timing, and the relevant resources of the motion page cannot be cleared. Therefore, the electronic device 200 can trigger the timer to stop timing and clear the relevant resources of the motion page, and then load the image data of the dial page into the framebuffer. The electronic device 200 can display the dial page based on the image data of the dial page.
实施例本申请提供的显示方法,电子设备200可以避免因定时器尚未停止计时而无法清空运动页面的相关资源所导致的显示异常,使电子设备200的表盘页面可以保持正常显示,提高了电子设备200的响应效率。The display method provided in the embodiment of the present application can enable the electronic device 200 to avoid display anomalies caused by the inability to clear related resources of the sports page because the timer has not stopped timing, so that the dial page of the electronic device 200 can maintain normal display, thereby improving the response efficiency of the electronic device 200.
实施本申请提供的显示方法,电子设备200所显示的用户界面可以参考前述图2A~图2D所示的实施例,但与前述显示异常的场景不同的是,若电子设备200如图2D所示显示出表盘页面250,此时,若电子设备200没有设置常亮模式,则电子设备200在检测到用户没有使用电子设备200的时长达到预设时长T1时,电子设备200即从显示表盘页面的亮屏状态切换为熄屏状态,在熄屏状态下按压物理按键可以再次显示出表盘页面;若电子设备200设置了常亮模式,如果用户没有使用电子设备200,只要电子设备200没有接收到用户的熄屏输入(例如按压物理按键等),电子设备200不会处于熄屏状态,而是一直处于亮屏状态,保持显示表盘页面。When implementing the display method provided in the present application, the user interface displayed by the electronic device 200 can refer to the embodiments shown in the aforementioned Figures 2A to 2D, but unlike the aforementioned display abnormality scenario, if the electronic device 200 displays the dial page 250 as shown in Figure 2D, at this time, if the electronic device 200 is not set to the always-on mode, then when the electronic device 200 detects that the user has not used the electronic device 200 for a preset time period T1, the electronic device 200 switches from the screen-on state of displaying the dial page to the screen-off state, and the dial page can be displayed again by pressing a physical button in the screen-off state; if the electronic device 200 is set to the always-on mode, if the user does not use the electronic device 200, as long as the electronic device 200 does not receive the user's screen-off input (such as pressing a physical button, etc.), the electronic device 200 will not be in the screen-off state, but will remain in the screen-on state to keep displaying the dial page.
图5为本申请实施例提供的一种显示方法的流程示意图。FIG5 is a schematic flow chart of a display method provided in an embodiment of the present application.
如图5所示,该显示方法的流程具体可以包括:As shown in FIG5 , the process of the display method may specifically include:
S501:电子设备200设置提示界面标志位,将提示界面标志位的值初始化为第一值。其中,提示界面标志位用于指示提示界面是否显示。S501: The electronic device 200 sets a prompt interface flag and initializes the value of the prompt interface flag to a first value, wherein the prompt interface flag is used to indicate whether the prompt interface is displayed.
本申请实施例中,“将提示界面标志位的值初始化为第一值”可以理解为:当电子设备200出厂或恢复出厂设置时,电子设备200可以预置提示界面标志位,并将提示界面标志位的设置为第一值。其中,提示界面标志位可以用于指示提示界面是否显示,第一值可以用于指示提示界面和设置提示信息没有显示,定时器也没有计时。第一值可以是false,也可以是其他值,本申请对此不作限制。In the embodiment of the present application, "initializing the value of the prompt interface flag to the first value" can be understood as: when the electronic device 200 leaves the factory or restores the factory settings, the electronic device 200 can preset the prompt interface flag and set the prompt interface flag to the first value. Among them, the prompt interface flag can be used to indicate whether the prompt interface is displayed, and the first value can be used to indicate that the prompt interface and the setting prompt information are not displayed, and the timer is not timing. The first value can be false or other values, and this application does not limit this.
本申请实施例中,当提示界面显示时,设置提示信息即显示。当提示界面结束显示时,设置提示信息也结束显示,也即是说,在本申请实施例中,提示界面和设置提示信息的显示是同步的。提示界面标志位用于指示提示界面是否显示,也即可以看作用于指示设置提示信息是否显示。In the embodiment of the present application, when the prompt interface is displayed, the setting prompt information is displayed. When the prompt interface ends displaying, the setting prompt information also ends displaying, that is, in the embodiment of the present application, the display of the prompt interface and the setting prompt information are synchronized. The prompt interface flag is used to indicate whether the prompt interface is displayed, that is, it can be regarded as indicating whether the setting prompt information is displayed.
S502:电子设备100和电子设备200建立无线通信连接。S502: The electronic device 100 and the electronic device 200 establish a wireless communication connection.
本步骤的说明可以参考前述S401,在此不赘述。The description of this step can refer to the aforementioned S401 and will not be repeated here.
S503:电子设备100接收到开启运动计时功能的操作1。S503: The electronic device 100 receives operation 1 to start the sports timing function.
本步骤的说明可以参考前述S402,在此不赘述。The description of this step can refer to the aforementioned S402 and will not be repeated here.
S504:电子设备100向电子设备200发送运动计时开启指令(可以称为第一指令)。S504: The electronic device 100 sends a motion timing start instruction (which may be referred to as a first instruction) to the electronic device 200.
本步骤的说明可以参考前述S403,在此不赘述。The description of this step can refer to the aforementioned S403 and will not be repeated here.
S505:响应于运动计时开启指令,电子设备200创建运动页面。S505: In response to the sports timing start instruction, the electronic device 200 creates a sports page.
本步骤的说明可以参考前述S404,在此不赘述。The description of this step can refer to the aforementioned S404 and will not be repeated here.
S506:电子设备200判断设置提示信息的显示次数是否小于预设次数。S506: The electronic device 200 determines whether the display times of the setting prompt information is less than a preset number of times.
本步骤的说明可以参考前述S405,在此不赘述。The description of this step can refer to the aforementioned S405 and will not be repeated here.
S507:若设置提示信息的显示次数小于预设次数,电子设备200将提示界面的图像数据加载至framebuffer中。其中,提示界面的图像数据用于显示提示界面。S507: If the display times of the set prompt information are less than the preset times, the electronic device 200 loads the image data of the prompt interface into the framebuffer, wherein the image data of the prompt interface is used to display the prompt interface.
S508:电子设备200将运动计时界面(可以称为第一界面)的图像数据加载至framebuffer中。其中,运动计时界面的图像数据用于显示运动计时界面。S508: The electronic device 200 loads the image data of the sports timing interface (which may be referred to as the first interface) into the framebuffer, wherein the image data of the sports timing interface is used to display the sports timing interface.
本步骤的说明可以参考前述S407,在此不赘述。The description of this step can refer to the aforementioned S407 and will not be repeated here.
S509:电子设备200通过framebuffer合成提示界面的图像数据和运动计时界面的图像数据,并基于合成后的提示界面的图像数据和运动计时界面的图像数据,在运动页面中显示提示界面。其中,该提示界面可以包括设置提示信息。S509: The electronic device 200 synthesizes the image data of the prompt interface and the image data of the motion timing interface through the framebuffer, and displays the prompt interface in the motion page based on the synthesized image data of the prompt interface and the image data of the motion timing interface. The prompt interface may include setting prompt information.
本步骤的说明可以参考前述S408,在此不赘述。The description of this step can refer to the aforementioned S408 and will not be repeated here.
S510:电子设备200触发设置提示信息对应的定时器开始计时。S510: The electronic device 200 triggers the timer corresponding to the setting prompt information to start timing.
本步骤的说明可以参考前述S409,在此不赘述。The description of this step can refer to the aforementioned S409 and will not be repeated here.
S511:电子设备200将提示界面标志位的值设置为第二值。S511: The electronic device 200 sets the value of the prompt interface flag to the second value.
其中,第二值可以用于指示电子设备200正在显示提示界面和设置提示信息,定时器正在进行计时。第二值可以是true,也可以是其他值,本申请不作限制。The second value may be used to indicate that the electronic device 200 is displaying the prompt interface and setting the prompt information, and the timer is timing. The second value may be true or other values, which are not limited in this application.
当定时器尚未计时至预设时长T2:When the timer has not reached the preset duration T2:
S512:电子设备100接收到关闭运动计时功能的操作2。S512: The electronic device 100 receives operation 2 to turn off the sports timing function.
本步骤的说明可以参考前述S410,在此不赘述。The description of this step can refer to the aforementioned S410 and will not be repeated here.
S513:电子设备100向电子设备200发送运动计时关闭指令(可以称为第二指令)。S513: The electronic device 100 sends a motion timing off instruction (which may be referred to as a second instruction) to the electronic device 200.
本步骤的说明可以参考前述S411,在此不赘述。The description of this step can refer to the aforementioned S411 and will not be repeated here.
S514:当提示界面标志位的值为第二值时,电子设备200停止定时器的计时。S514: When the value of the prompt interface flag is the second value, the electronic device 200 stops the timer.
当电子设备200接收到运动计时指令时,电子设备200可以查询提示界面标志位的值。若提示界面标志位的值为第二值时,则指示电子设备200正在显示提示界面和设置提示信息,定时器仍然在进行计时。因此,电子设备200可以停止定时器的计时。When the electronic device 200 receives the motion timing instruction, the electronic device 200 can query the value of the prompt interface flag. If the value of the prompt interface flag is the second value, it indicates that the electronic device 200 is displaying the prompt interface and setting the prompt information, and the timer is still timing. Therefore, the electronic device 200 can stop the timer.
S515:电子设备200清空framebuffer中的图像数据(包括提示界面的图像数据和运动计时界面的图像数据)。S515: The electronic device 200 clears the image data in the framebuffer (including the image data of the prompt interface and the image data of the motion timing interface).
此时,提示界面标志位的值为第一值,表示提示界面和设置提示信息不再显示,定时器的计时已经停止,所以和定时器相关联的运动页面的相关资源可以被清空。因此,电子设备200清空framebuffer中的图像数据(包括提示界面的图像数据和运动计时界面的图像数据)。由于电子设备200尚未加载表盘页面的图像数据,因此,framebuffer中不存在表盘页面的图像数据。At this time, the value of the prompt interface flag is the first value, indicating that the prompt interface and the setting prompt information are no longer displayed, and the timer has stopped, so the related resources of the motion page associated with the timer can be cleared. Therefore, the electronic device 200 clears the image data in the framebuffer (including the image data of the prompt interface and the image data of the motion timing interface). Since the electronic device 200 has not yet loaded the image data of the dial page, the image data of the dial page does not exist in the framebuffer.
S516:电子设备200将提示界面标志位的值设置为第一值。S516: The electronic device 200 sets the value of the prompt interface flag to the first value.
由于电子设备200已清空提示界面的图像数据,不再显示出提示界面和设置提示信息,因此电子设备200可以将提示界面标志位的值设置为第一值。Since the electronic device 200 has cleared the image data of the prompt interface and no longer displays the prompt interface and sets the prompt information, the electronic device 200 can set the value of the prompt interface flag to the first value.
S517:电子设备200加载表盘页面的图像数据至framebuffer中。其中,表盘页面的图像数据用于显示表盘页面。S517: The electronic device 200 loads the image data of the dial page into the framebuffer, wherein the image data of the dial page is used to display the dial page.
S518:基于表盘页面的图像数据,电子设备200显示表盘页面。S518: Based on the image data of the dial page, the electronic device 200 displays the dial page.
示例性的,表盘页面可以是前述图2D所示的表盘页面250。Exemplarily, the dial page may be the dial page 250 shown in aforementioned FIG. 2D .
实施例图5所示的具体流程,当电子设备200接收到运动计时关闭指令时,电子设备200可以基于提示界面标志位的值停止定时器的计时,从而及时清空运动页面的相关资源,这样,电子设备200可以正常显示表盘页面,提高电子设备200的响应效率。The specific process shown in Example Figure 5 is that when the electronic device 200 receives a sports timing off instruction, the electronic device 200 can stop the timer based on the value of the prompt interface flag, thereby clearing the relevant resources of the sports page in time. In this way, the electronic device 200 can display the dial page normally, thereby improving the response efficiency of the electronic device 200.
图6A为本申请实施例提供的一种电子设备200的装置架构示意图。FIG6A is a schematic diagram of a device architecture of an electronic device 200 provided in an embodiment of the present application.
如图6A所示,电子设备200的装置架构可以包括:应用层、业务框架层、系统库层、内核层和硬件层。其中:As shown in FIG6A , the device architecture of the electronic device 200 may include: an application layer, a service framework layer, a system library layer, a kernel layer, and a hardware layer.
应用层可以包括多个应用程序包,例如信息、天气、运动应用、表盘管理和闹钟等。The application layer can include multiple application packages, such as information, weather, sports applications, watch face management, and alarm clocks.
业务框架层可以为应用层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。业务框架层包括一些预先定义的服务,可以包括日志服务、音频管理、通话服务、内存管理模块和UI框架等。其中:日志服务可以用于记录电子设备200上的程序的运行过程,音频管理可以用于管理电子设备200上的声音/视频的播放,通话服务可以用于管理电子设备200的通话功能,内存管理模块可以用于管理电子设备200的存储状态,UI框架可以用于管理电子设备200的显示状态。The business framework layer can provide an application programming interface (API) and a programming framework for the application program of the application layer. The business framework layer includes some predefined services, which may include log service, audio management, call service, memory management module and UI framework, etc. Among them: the log service can be used to record the running process of the program on the electronic device 200, the audio management can be used to manage the playback of sound/video on the electronic device 200, the call service can be used to manage the call function of the electronic device 200, the memory management module can be used to manage the storage status of the electronic device 200, and the UI framework can be used to manage the display status of the electronic device 200.
系统库可以包括多个算法功能模块,例如压力算法、运动算法、生日周期算法、血压算法和蓝牙协议栈等等。其中,压力算法可以用于确定用户的压力值,生日周期算法可以用于确定用户的生理周期,运动算法可以用于确定用户的运动数据,血压算法可以用于确定用户的血压值,蓝牙协议栈可以用于进行蓝牙通信等。The system library may include multiple algorithm function modules, such as pressure algorithm, motion algorithm, birthday cycle algorithm, blood pressure algorithm and Bluetooth protocol stack, etc. Among them, the pressure algorithm can be used to determine the user's pressure value, the birthday cycle algorithm can be used to determine the user's physiological cycle, the motion algorithm can be used to determine the user's motion data, the blood pressure algorithm can be used to determine the user's blood pressure value, and the Bluetooth protocol stack can be used for Bluetooth communication, etc.
内核层是硬件和软件之间的层。内核层可以包括内核核心(kernel-Core)、硬件抽象层(hardware abstraction layer,HAL)、硬件驱动。硬件驱动中可以包括显示屏驱动和蓝牙驱动,显示屏驱动可以包括framebuffer。其中,蓝牙驱动可以用于进行蓝牙通信,framebuffer可以用于存储图像数据,以便显示屏基于framebuffer中的图像数据显示相应的界面/页面。The kernel layer is a layer between hardware and software. The kernel layer may include a kernel core (kernel-Core), a hardware abstraction layer (HAL), and a hardware driver. The hardware driver may include a display driver and a Bluetooth driver, and the display driver may include a framebuffer. The Bluetooth driver may be used for Bluetooth communication, and the framebuffer may be used to store image data so that the display screen displays a corresponding interface/page based on the image data in the framebuffer.
硬件层可以包括多个电子设备200的硬件。例如显示屏、摄像头和麦克风等等。The hardware layer may include hardware of multiple electronic devices 200, such as display screens, cameras, microphones, and the like.
本申请实施例中,图6A仅用于示例性解释本申请,并不构成任何限制。In the embodiments of the present application, FIG. 6A is only used to exemplify the present application and does not constitute any limitation.
图6B为本申请实施例提供的一种电子设备100的软件架构示意图。FIG6B is a schematic diagram of a software architecture of an electronic device 100 provided in an embodiment of the present application.
如图6B所示,电子设备的装置架构可以包括:应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,硬件抽象层(hardware abstract layer)和内核层。其中:As shown in FIG6B , the device architecture of the electronic device may include: an application layer, an application framework layer, an Android runtime and a system library, a hardware abstract layer and a kernel layer. Among them:
应用程序层可以包括一系列应用程序包,例如相机、日历、备忘录、天气、浏览器、计算器和运动应用等。The application layer can include a series of application packages, such as camera, calendar, memo, weather, browser, calculator, and sports applications.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数,可以包括窗口管理器,内容提供器,资源管理器,通知管理器等。其中:窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The application framework layer provides an application programming interface (API) and a programming framework for the application of the application layer. The application framework layer includes some predefined functions, which may include a window manager, a content provider, a resource manager, a notification manager, etc. Among them: the window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloads, message reminders, etc. The notification manager can also be a notification that appears in the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。2D图形引擎是2D绘图的绘图引擎。The system library can include multiple functional modules. For example: surface manager, 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.
本申请实施例中,系统库还可以蓝牙协议栈,用于进行蓝牙通信。In the embodiment of the present application, the system library can also be a Bluetooth protocol stack for Bluetooth communication.
内核层是硬件和软件之间的层。内核层可以包括显示驱动、摄像头驱动、音频驱动和蓝牙驱动等等。上述各驱动可以分别调用相应的硬件以执行相关功能。The kernel layer is the layer between hardware and software. The kernel layer may include display drivers, camera drivers, audio drivers, Bluetooth drivers, etc. Each of the above drivers can call the corresponding hardware to perform related functions.
本申请实施例中,图6B所示的装置架构仅用于示例性解释本申请,并不构成限制。In the embodiment of the present application, the device architecture shown in FIG. 6B is only used to exemplify the present application and does not constitute a limitation.
图7为本申请实施例提供的一种显示方法的模块交互示意图。FIG. 7 is a schematic diagram of module interaction of a display method provided in an embodiment of the present application.
如图7所示,该显示方法的模块交互具体可以包括:As shown in FIG. 7 , the module interaction of the display method may specifically include:
S701:UI框架设置提示界面标志位,将提示界面标志位的值初始化为第一值。S701: The UI framework sets the prompt interface flag and initializes the value of the prompt interface flag to a first value.
本步骤的说明可以参考前述S501中的描述,在此不赘述。The description of this step can refer to the description in the aforementioned S501 and will not be repeated here.
S702:电子设备100的蓝牙驱动和电子设备200的蓝牙驱动建立无线通信连接。S702: The Bluetooth driver of the electronic device 100 and the Bluetooth driver of the electronic device 200 establish a wireless communication connection.
本步骤的说明可以参考前述S502,在此不赘述。The description of this step can refer to the aforementioned S502 and will not be repeated here.
S703:电子设备100中的运动应用接收到开启运动计时功能的操作1。S703: The sports application in the electronic device 100 receives operation 1 to turn on the sports timing function.
本步骤的说明可以参考前述S503,在此不赘述。The description of this step can refer to the aforementioned S503 and will not be repeated here.
S704:电子设备100中的运动应用向蓝牙协议栈发送运动计时开启指令。S704: The sports application in the electronic device 100 sends a sports timing start instruction to the Bluetooth protocol stack.
S705:电子设备100中的蓝牙协议栈向电子设备100中的蓝牙驱动发送运动计时开启指令。S705: The Bluetooth protocol stack in the electronic device 100 sends a motion timing start instruction to the Bluetooth driver in the electronic device 100.
S706:电子设备100中的蓝牙驱动向电子设备200中的蓝牙驱动发送运动计时开启指令。S706: The Bluetooth driver in the electronic device 100 sends a motion timing start instruction to the Bluetooth driver in the electronic device 200.
S707:电子设备200中的蓝牙驱动向电子设备200中的蓝牙协议栈发送运动计时开启指令。S707: The Bluetooth driver in the electronic device 200 sends a motion timing start instruction to the Bluetooth protocol stack in the electronic device 200.
S708:电子设备200中的蓝牙协议栈向电子设备200中的运动应用发送运动计时开启指令。S708: The Bluetooth protocol stack in the electronic device 200 sends a sports timing start instruction to the sports application in the electronic device 200.
S709:电子设备200中的运动应用向UI框架发送Training View对象创建指令。S709: The sports application in the electronic device 200 sends a Training View object creation instruction to the UI framework.
其中,该Training View对象用于创建运动页面。Training View对象和定时器相关联,Training View对象可以通过Handler函数和定时器进行通信、调用定时器等。因此,当定时器尚未停止计时之前,Training View对象被定时器占用,所以Training View对象依然存在于存储空间中不能清除,即运动页面的相关资源不能清除,从而造成framebuffer中的运动计时界面的图像数据不能被清空。The Training View object is used to create a sports page. The Training View object is associated with the timer. The Training View object can communicate with the timer through the Handler function and call the timer. Therefore, before the timer stops timing, the Training View object is occupied by the timer, so the Training View object still exists in the storage space and cannot be cleared, that is, the related resources of the sports page cannot be cleared, resulting in the image data of the sports timing interface in the framebuffer cannot be cleared.
S710:UI框架创建Training View对象。S710: The UI framework creates a Training View object.
S711:UI框架通过Training View对象创建运动页面。S711: The UI framework creates a sports page through the Training View object.
S712:UI框架通过Training View对象判断设置提示信息的显示次数是否小于预设次数。S712: The UI framework determines through the Training View object whether the display times of the set prompt information is less than the preset times.
本步骤的说明可以参考前述S506,在此不赘述。The description of this step can refer to the aforementioned S506 and will not be repeated here.
S713:若设置提示信息的显示次数小于预设次数,UI框架通过Training View对象调用内存管理模块将提示界面的图像数据加载至framebuffer中。S713: If the display times of the set prompt information are less than the preset times, the UI framework calls the memory management module through the Training View object to load the image data of the prompt interface into the framebuffer.
S714:UI框架通过Training View对象调用内存管理模块将运动计时界面的图像数据加载至framebuffer中。S714: The UI framework calls the memory management module through the Training View object to load the image data of the motion timing interface into the framebuffer.
本步骤的说明可以参考前述S508的描述。For the description of this step, please refer to the description of S508 above.
S715:framebuffer合成提示界面的图像数据和运动计时界面的图像数据。S715: framebuffer synthesizes the image data of the prompt interface and the image data of the motion timing interface.
S716:显示屏从framebuffer中读取合成后的提示界面的图像数据和运动计时界面的图像数据。S716: The display screen reads the synthesized image data of the prompt interface and the image data of the motion timing interface from the framebuffer.
S717:显示屏在运动页面中显示提示界面。S717: The display screen displays a prompt interface on the exercise page.
其中,S715~S717的说明可以参考前述S509的描述。The description of S715 to S717 may refer to the description of S509 mentioned above.
S718:UI框架向内存管理模块发送定时器计时指令。S718: The UI framework sends a timer timing instruction to the memory management module.
其中,内存管理模块可以预先存储设置提示信息对应的定时器。The memory management module may pre-store a timer corresponding to the setting prompt information.
S719:响应于定时器计时指令,内存管理模块触发定时器开始计时。S719: In response to the timer timing instruction, the memory management module triggers the timer to start timing.
本步骤的说明可以参考前述S510,在此不赘述。The description of this step can refer to the aforementioned S510 and will not be repeated here.
S720:UI框架将提示界面标志位的值设置为第二值。S720: The UI framework sets the value of the prompt interface flag to the second value.
本步骤的说明可以参考前述S511,在此不赘述。The description of this step can refer to the aforementioned S511 and will not be repeated here.
S721:电子设备100中的运动应用接收到关闭运动计时功能的操作1。S721: The sports application in the electronic device 100 receives operation 1 to turn off the sports timing function.
本步骤的说明可以参考前述S512,在此不赘述。The description of this step can refer to the aforementioned S512 and will not be repeated here.
S722:电子设备100中的运动应用向电子设备100中的蓝牙协议栈发送运动计时关闭指令。S722: The sports application in the electronic device 100 sends a sports timing off instruction to the Bluetooth protocol stack in the electronic device 100.
S723:电子设备100中的蓝牙协议栈向电子设备100中的蓝牙驱动发送运动计时关闭指令。S723: The Bluetooth protocol stack in the electronic device 100 sends a motion timing off instruction to the Bluetooth driver in the electronic device 100.
S724:电子设备100中的蓝牙驱动向电子设备200中的蓝牙驱动发送运动计时关闭指令。S724: The Bluetooth driver in the electronic device 100 sends a motion timing off instruction to the Bluetooth driver in the electronic device 200.
S725:电子设备200中的蓝牙驱动向电子设备200中的蓝牙协议栈发送运动计时关闭指令。S725: The Bluetooth driver in the electronic device 200 sends a motion timing off instruction to the Bluetooth protocol stack in the electronic device 200.
S726:电子设备200中的蓝牙协议栈向电子设备200中的运动应用发送运动计时关闭指令。S726: The Bluetooth protocol stack in the electronic device 200 sends a sports timing off instruction to the sports application in the electronic device 200.
S727:电子设备200中的运动应用向UI框架发送Training View对象清除指令。S727: The sports application in the electronic device 200 sends a Training View object clear instruction to the UI framework.
S728:接收到Training View对象清除指令,且提示界面标志位的值为第二值时,UI框架向内存管理模块发送定时器停止指令。S728: When a Training View object clear instruction is received and the value of the prompt interface flag is the second value, the UI framework sends a timer stop instruction to the memory management module.
S729:响应于定时器停止指令,内存管理模块触发定时器停止计时。S729: In response to the timer stop instruction, the memory management module triggers the timer to stop timing.
其中,S728~S729的说明可以参考前述S514,在此不赘述。Among them, the description of S728~S729 can refer to the aforementioned S514 and will not be repeated here.
S730:UI框架向内存管理模块发送Training View对象清除指令。S730: The UI framework sends a Training View object clearing instruction to the memory management module.
S731:响应于Training View对象清除指令,内存管理模块清除framebuffer中的图像数据。S731: In response to the Training View object clear instruction, the memory management module clears the image data in the framebuffer.
本步骤的说明可以参考前述S515的描述。For the description of this step, please refer to the description of S515 above.
S732:UI框架将提示界面标志位的值设置为第一值。S732: The UI framework sets the value of the prompt interface flag to the first value.
本步骤的说明可以参考前述S516的描述,在此不赘述。The description of this step can refer to the description of S516 above, which will not be repeated here.
S733:电子设备200中的运动应用向表盘管理发送Main View对象创建指令。S733: The sports application in the electronic device 200 sends a Main View object creation instruction to the dial management.
S734:表盘管理向UI框架发送Main View对象创建指令。S734: The dial management sends a Main View object creation instruction to the UI framework.
S735:UI框架通过Training View对象创建表盘页面。S735: The UI framework creates a dial page through the Training View object.
S736:UI框架通过Main View对象调用内存管理模块将表盘页面的图像数据加载至framebuffer中。S736: The UI framework calls the memory management module through the Main View object to load the image data of the dial page into the framebuffer.
S737:显示屏从framebuffer中读取表盘页面的图像数据。S737: The display screen reads the image data of the dial page from the framebuffer.
S738:显示基于表盘页面的图像数据显示出表盘页面的元素。S738: Displaying image data based on the dial page to show elements of the dial page.
其中,S733~S738的说明可以参考前述S517~S518的描述,在此不赘述。Among them, the description of S733~S738 can refer to the description of S517~S518 mentioned above, which will not be repeated here.
如果未实施图7所示的实现方式,而是实施图4所示的实现方式,则当电子设备200接收到运动计时关闭指令,但定时器未停止计时,Training View对象被定时器占用,所以Training View对象依然存在于存储空间中不能被清除,从而造成运动页面的相关资源不能被清除,framebuffer中的运动计时界面的图像数据不能被清空。而此时,电子设备200需要切换显示为表盘页面,所以表盘页面的图像数据会加载至framebuffer中,framebuffer中会同时存在运动计时界面的图像数据和表盘页面的图像数据。当定时器停止计时,Training View对象被清除,同时会清空运动页面的相关资源,但此时,framebuffer中的所有图像数据会被清空,此时表盘页面的图像数据也会一并被清空。若电子设备200未设置常亮模式,此时会如图2D~图2F所示表盘出现黑屏的显示异常;若电子设备200设置常亮模式,此时会如图2G所示,电子设备200单独刷新显示出表盘页面的背景图片,从而使得电子设备200只显示出表盘页面的背景元素。If the implementation shown in FIG. 7 is not implemented, but the implementation shown in FIG. 4 is implemented, then when the electronic device 200 receives the motion timing off instruction, but the timer does not stop timing, the Training View object is occupied by the timer, so the Training View object still exists in the storage space and cannot be cleared, resulting in the related resources of the motion page cannot be cleared, and the image data of the motion timing interface in the framebuffer cannot be cleared. At this time, the electronic device 200 needs to switch the display to the dial page, so the image data of the dial page will be loaded into the framebuffer, and the image data of the motion timing interface and the image data of the dial page will exist in the framebuffer at the same time. When the timer stops timing, the Training View object is cleared, and the related resources of the motion page will be cleared at the same time, but at this time, all image data in the framebuffer will be cleared, and the image data of the dial page will also be cleared. If the electronic device 200 is not set to the always-on mode, a black screen display abnormality will appear on the dial as shown in Figures 2D to 2F; if the electronic device 200 is set to the always-on mode, as shown in Figure 2G, the electronic device 200 will refresh and display the background image of the dial page alone, so that the electronic device 200 only displays the background elements of the dial page.
然而,实施本申请提供的图7所示的模块交互流程,当电子设备200接收到运动计时关闭指令,但定时器未停止计时,而电子设备200查询到提示界面标志位的值为第二值时,则电子设备200在将表盘页面的图像数据通过Main View对象加载至framebuffer之前,可以及时停止定时器计时,使得Training View对象不再被定时器占用,因此,电子设备200可以清除Training View对象,同时清空运动页面的相关资源,包括framebuffer中的图像数据。然后,电子设备200再创建Main View对象,并通过Main View对象将表盘页面的图像数据加载至framebuffer中,使得电子设备200可以基于表盘页面的图像数据显示表盘页面,保证了表盘页面的正常显示,提高了电子设备200的响应效率。However, when implementing the module interaction process shown in FIG. 7 provided by the present application, when the electronic device 200 receives a motion timing off instruction, but the timer has not stopped timing, and the electronic device 200 inquires that the value of the prompt interface flag is the second value, the electronic device 200 can stop the timer timing in time before loading the image data of the dial page into the framebuffer through the Main View object, so that the Training View object is no longer occupied by the timer. Therefore, the electronic device 200 can clear the Training View object and clear the related resources of the motion page, including the image data in the framebuffer. Then, the electronic device 200 creates the Main View object again, and loads the image data of the dial page into the framebuffer through the Main View object, so that the electronic device 200 can display the dial page based on the image data of the dial page, ensuring the normal display of the dial page and improving the response efficiency of the electronic device 200.
图8A为本申请实施例提供的另一种显示方法的具体流程示意图。FIG. 8A is a schematic diagram of a specific flow chart of another display method provided in an embodiment of the present application.
如图8A所示,该显示方法的流程具体可以包括:As shown in FIG8A , the process of the display method may specifically include:
S801:电子设备200设置提示界面标志位,将提示界面标志位的值初始化为第一值。其中,提示界面标志位用于指示提示界面是否显示。S801: The electronic device 200 sets the prompt interface flag bit and initializes the value of the prompt interface flag bit to a first value, wherein the prompt interface flag bit is used to indicate whether the prompt interface is displayed.
S802:电子设备100和电子设备200建立无线通信连接。S802: The electronic device 100 and the electronic device 200 establish a wireless communication connection.
S803:电子设备100接收到开启运动计时功能的操作1。S803: The electronic device 100 receives operation 1 for turning on the sports timing function.
S804:电子设备100向电子设备200发送运动计时开启指令。S804: The electronic device 100 sends a motion timing start instruction to the electronic device 200.
S805:响应于运动计时开启指令,电子设备200创建运动页面。S805: In response to the sports timing start instruction, the electronic device 200 creates a sports page.
S806:电子设备200判断设置提示信息的显示次数是否小于预设次数。S806: The electronic device 200 determines whether the display times of the setting prompt information is less than the preset times.
S807:若设置提示信息的显示次数小于预设次数,电子设备200将提示界面的图像数据加载至framebuffer中。其中,提示界面的图像数据用于显示提示界面。S807: If the display times of the set prompt information are less than the preset times, the electronic device 200 loads the image data of the prompt interface into the framebuffer, wherein the image data of the prompt interface is used to display the prompt interface.
S808:电子设备200将运动计时界面的图像数据加载至framebuffer中。其中,运动计时界面的图像数据用于显示运动计时界面。S808: The electronic device 200 loads the image data of the sports timing interface into the framebuffer, wherein the image data of the sports timing interface is used to display the sports timing interface.
S809:电子设备200通过framebuffer合成提示界面的图像数据和运动计时界面的图像数据,并基于合成后的提示界面的图像数据和运动计时界面的图像数据,在运动页面中显示提示界面。其中,该提示界面可以包括设置提示信息。S809: The electronic device 200 synthesizes the image data of the prompt interface and the image data of the motion timing interface through the framebuffer, and displays the prompt interface in the motion page based on the synthesized image data of the prompt interface and the image data of the motion timing interface. The prompt interface may include setting prompt information.
S810:电子设备200触发设置提示信息对应的定时器开始计时。S810: The electronic device 200 triggers the timer corresponding to the setting prompt information to start timing.
S811:电子设备200将提示界面标志位的值设置为第二值。S811: The electronic device 200 sets the value of the prompt interface flag to the second value.
其中,S801~S811的说明可以参考前述S501~S511中的描述。The description of S801 to S811 may refer to the description of S501 to S511 mentioned above.
S812:当定时器计时至预设时长T2时,电子设备200移除提示界面,在运动页面中显示出运动计时界面。S812: When the timer reaches the preset duration T2, the electronic device 200 removes the prompt interface and displays the exercise timing interface on the exercise page.
此时,提示界面和设置提示信息的显示时长已达到预设时长T2,所以,电子设备200可以移除提示界面,显示出运动计时界面。At this time, the display time of the prompt interface and the setting prompt information has reached the preset time T2, so the electronic device 200 can remove the prompt interface and display the exercise timing interface.
S813:电子设备200将提示界面标志位的值设置为第一值。S813: The electronic device 200 sets the value of the prompt interface flag to the first value.
S814:电子设备100接收到关闭运动计时功能的操作2。S814: The electronic device 100 receives operation 2 to turn off the sports timing function.
本步骤的说明可以参考前述S512,在此不赘述。The description of this step can refer to the aforementioned S512 and will not be repeated here.
S815:电子设备100向电子设备200发送运动计时关闭指令。S815: The electronic device 100 sends a motion timing off instruction to the electronic device 200.
本步骤的说明可以参考前述S513,在此不赘述。The description of this step can refer to the aforementioned S513 and will not be repeated here.
S816:当提示界面标志位的值为第一值时,电子设备200清空framebuffer中的图像数据(包括提示界面的图像数据和运动计时界面的图像数据)。S816: When the value of the prompt interface flag is the first value, the electronic device 200 clears the image data in the framebuffer (including the image data of the prompt interface and the image data of the motion timing interface).
此时,提示界面标志位的值为第一值,表示提示界面和设置提示信息不再显示,定时器的计时已经停止,所以和定时器相关联的运动页面的相关资源可以被清空。因此,电子设备200可以清空framebuffer中的图像数据(包括提示界面的图像数据和运动计时界面的图像数据)。由于电子设备200尚未加载表盘页面的图像数据,因此,framebuffer中不存在表盘页面的图像数据。At this time, the value of the prompt interface flag is the first value, indicating that the prompt interface and the setting prompt information are no longer displayed, and the timer has stopped, so the related resources of the motion page associated with the timer can be cleared. Therefore, the electronic device 200 can clear the image data in the framebuffer (including the image data of the prompt interface and the image data of the motion timing interface). Since the electronic device 200 has not yet loaded the image data of the dial page, the image data of the dial page does not exist in the framebuffer.
在一种可能的实现方式中,提示界面的图像数据也可以在电子设备200移除提示界面,显示出运动计时界面时被清空。In a possible implementation, the image data of the prompt interface may also be cleared when the electronic device 200 removes the prompt interface and displays the exercise timing interface.
S817:电子设备200加载表盘页面的图像数据至framebuffer中。其中,表盘页面的图像数据用于显示表盘页面。S817: The electronic device 200 loads the image data of the dial page into the framebuffer, wherein the image data of the dial page is used to display the dial page.
S818:电子设备200基于表盘页面的图像数据,显示表盘页面。S818: The electronic device 200 displays the dial page based on the image data of the dial page.
示例性的,表盘页面可以是前述图2D所示的表盘页面250。Exemplarily, the dial page may be the dial page 250 shown in aforementioned FIG. 2D .
图8B为本申请实施例提供的另一种显示方法的流程示意图。FIG. 8B is a flow chart of another display method provided in an embodiment of the present application.
如图8B所示,该显示方法的流程具体可以包括:As shown in FIG8B , the process of the display method may specifically include:
S8001:电子设备200设置提示界面标志位,将提示界面标志位的值初始化为第一值。其中,提示界面标志位用于指示提示界面是否显示。S8001: The electronic device 200 sets the prompt interface flag bit and initializes the value of the prompt interface flag bit to a first value, wherein the prompt interface flag bit is used to indicate whether the prompt interface is displayed.
S8002:电子设备100和电子设备200建立无线通信连接。S8002: The electronic device 100 and the electronic device 200 establish a wireless communication connection.
S8003:电子设备100接收到开启运动计时功能的操作1。S8003: The electronic device 100 receives operation 1 to turn on the sports timing function.
S8004:电子设备100向电子设备200发送运动计时开启指令。S8004: The electronic device 100 sends a motion timing start instruction to the electronic device 200.
S8005:响应于运动计时开启指令,电子设备200创建运动页面。S8005: In response to the sports timing start instruction, the electronic device 200 creates a sports page.
S8006:电子设备200判断设置提示信息的显示次数是否小于预设次数。S8006: The electronic device 200 determines whether the display times of the setting prompt information is less than the preset times.
S8007:若设置提示信息的显示次数等于预设次数,电子设备200将运动计时界面的图像数据加载至framebuffer中。其中,运动计时界面的图像数据用于显示运动计时界面。S8007: If the display times of the set prompt information are equal to the preset times, the electronic device 200 loads the image data of the sports timing interface into the framebuffer, wherein the image data of the sports timing interface is used to display the sports timing interface.
S8008:电子设备200基于运动计时界面的图像数据,在运动页面中显示出运动计时界面。S8008: The electronic device 200 displays the exercise timing interface on the exercise page based on the image data of the exercise timing interface.
S8009:电子设备100接收到关闭运动计时功能的操作2。S8009: The electronic device 100 receives operation 2 to turn off the sports timing function.
本步骤的说明可以参考前述S814,在此不赘述。The description of this step can refer to the aforementioned S814 and will not be repeated here.
S8010:电子设备100向电子设备200发送运动计时关闭指令。S8010: The electronic device 100 sends a motion timing off instruction to the electronic device 200.
本步骤的说明可以参考前述S815,在此不赘述。The description of this step can refer to the aforementioned S815 and will not be repeated here.
S8011:当提示界面标志位的值为第一值时,电子设备200清空framebuffer中的图像数据(包括运动计时界面的图像数据)。S8011: When the value of the prompt interface flag is the first value, the electronic device 200 clears the image data in the framebuffer (including the image data of the motion timing interface).
此时,提示界面标志位的值为第一值,表示提示界面和设置提示信息没有显示,定时器没有计时,所以和定时器相关联的运动页面的相关资源可以被清空。因此,电子设备200可以清空framebuffer中的图像数据(包括运动计时界面的图像数据)。At this time, the value of the prompt interface flag is the first value, indicating that the prompt interface and the setting prompt information are not displayed, and the timer is not timing, so the related resources of the motion page associated with the timer can be cleared. Therefore, the electronic device 200 can clear the image data in the framebuffer (including the image data of the motion timing interface).
S8012:电子设备200加载表盘页面的图像数据至framebuffer中。其中,表盘页面的图像数据用于显示表盘页面。S8012: The electronic device 200 loads the image data of the dial page into the framebuffer, wherein the image data of the dial page is used to display the dial page.
S8013:电子设备200基于表盘页面的图像数据,显示表盘页面。S8013: The electronic device 200 displays the dial page based on the image data of the dial page.
示例性的,表盘页面可以是前述图2D所示的表盘页面250。Exemplarily, the dial page may be the dial page 250 shown in aforementioned FIG. 2D .
图9为本申请实施例提供的一种电子设备100的硬件结构示意图。FIG. 9 is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application.
电子设备100可以包括处理器901、存储器902、无线通信模块903、显示屏904、传感器模块905、音频模块906和扬声器907等。上述各个模块可以通过总线或者其它方式连接,本申请实施例以通过总线连接为例。The electronic device 100 may include a processor 901, a memory 902, a wireless communication module 903, a display screen 904, a sensor module 905, an audio module 906, and a speaker 907. The above modules may be connected via a bus or other means, and the embodiment of the present application takes the bus connection as an example.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合来实现。It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器901可以包括一个或多个处理器单元,例如处理器901可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 901 may include one or more processor units, for example, the processor 901 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
处理器901中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器901中的存储器为高速缓冲存储器。该存储器可以保存处理器901刚用过或循环使用的指令或数据。如果处理器901需要再次使用该指令或数据,可以从所述存储器中直接调用。避免了重复存取,减少了处理器901的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 901 for storing instructions and data. In some embodiments, the memory in the processor 901 is a cache memory. The memory may store instructions or data that the processor 901 has just used or cyclically used. If the processor 901 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 901, and thus improves the efficiency of the system.
在一些实施例中,处理器901可以包括一个或多个接口。接口可以包括集成电路(int er-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或USB接口等。In some embodiments, the processor 901 may include one or more interfaces. The interface may include an integrated circuit (IC) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a USB interface, etc.
在一种可能的实现方式中,电子设备100可以通过USB接口与电子设备200建立有线通信连接,并基于上述有线通信连接的方式互相传输数据信息。In a possible implementation, the electronic device 100 may establish a wired communication connection with the electronic device 200 via a USB interface, and transmit data information to each other based on the wired communication connection.
存储器902与处理器901耦合,用于存储各种软件程序和/或多组指令。具体实现中,存储器902可以包括易失性存储器(volatile memory),例如随机存取存储器(randomaccessmemory,RAM);也可以包括非易失性存储器(non-vlatile memory),例如ROM、快闪存储器(flash memory)、硬盘驱动器(Hard Disk Drive,HDD)或固态硬盘(So lid StateDrives,SSD);存储器902还可以包括上述种类的存储器的组合。存储器902可以存储一些程序代码,以便于处理器901调用存储器902中存储的程序代码,以实现本申请实施例在电子设备100中的实现方法。存储器902可以存储操作系统,例如uCO S、VxWorks、RTLinux等嵌入式操作系统。The memory 902 is coupled to the processor 901 and is used to store various software programs and/or multiple groups of instructions. In a specific implementation, the memory 902 may include a volatile memory, such as a random access memory (RAM); it may also include a non-volatile memory, such as a ROM, a flash memory, a hard disk drive (HDD) or a solid state drive (SSD); the memory 902 may also include a combination of the above-mentioned types of memories. The memory 902 may store some program codes so that the processor 901 calls the program codes stored in the memory 902 to implement the implementation method of the embodiment of the present application in the electronic device 100. The memory 902 may store an operating system, such as an embedded operating system such as uCO S, VxWorks, RTLinux, etc.
无线通信模块903可以包括有蓝牙通信模块903A等等。蓝牙通信模块903A可以发射信号来探测扫描电子设备100附近的设备,使得电子设备100可以使用蓝牙或WLAN中的一种或多种无线通信技术发现附近设备,例如电子设备200。电子设备100可以基于蓝牙通信模块903A中的一种或多种无线通信技术传输数据至电子设备200。电子设备100也可以通过上述无线通信连接获取到电子设备200发送的数据指令(例如,包括有第一控件的标识的数据指令等)。其中,蓝牙通信模块903A可以提供包括经典蓝牙(basic rate/enhanceddatarate,BR/EDR)或蓝牙低功耗(bluetooth low energy,BLE)中一项或多项蓝牙通信的解决方案。无线通信模块903可以经由天线(图9未示出)接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器901。无线通信模块903还可以从处理器901接收待发送的信号,对其进行调频,放大,经天线转为电磁波辐射出去。The wireless communication module 903 may include a Bluetooth communication module 903A and the like. The Bluetooth communication module 903A may transmit a signal to detect and scan devices near the electronic device 100, so that the electronic device 100 can use one or more wireless communication technologies in Bluetooth or WLAN to find nearby devices, such as the electronic device 200. The electronic device 100 may transmit data to the electronic device 200 based on one or more wireless communication technologies in the Bluetooth communication module 903A. The electronic device 100 may also obtain data instructions (for example, data instructions including the identification of the first control, etc.) sent by the electronic device 200 through the above-mentioned wireless communication connection. Among them, the Bluetooth communication module 903A may provide a solution including one or more Bluetooth communications in classic Bluetooth (basic rate/enhanceddatarate, BR/EDR) or Bluetooth low energy (bluetooth low energy, BLE). The wireless communication module 903 may receive electromagnetic waves via an antenna (not shown in FIG. 9), frequency modulate the electromagnetic wave signal and filter it, and send the processed signal to the processor 901. The wireless communication module 903 may also receive a signal to be sent from the processor 901, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna.
在一些实施例中,无线通信模块903还可以提供应用在电子设备100上的包括全球导航卫星系统(global navigation satellite system,GNSS)、调频(frequencymodulation,FM)、近距离无线通信技术(near field communication,NFC)、红外技术(infrared,IR)等无线通信的解决方案。In some embodiments, the wireless communication module 903 can also provide wireless communication solutions for application on the electronic device 100, including global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.
显示屏904可以用于显示图像、视频等。显示屏904可以包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitti ng diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dotlight emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏904,N为大于1的正整数。The display screen 904 can be used to display images, videos, etc. The display screen 904 may include a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 904, where N is a positive integer greater than 1.
传感器模块905可以包括触摸传感器905A等等。触摸传感器905A也可以称为“触控器件”。触摸传感器905A可以设置于显示屏904,由触摸传感器905A与显示屏904组成触摸屏,也称“触控屏”。触摸传感器905A可以用于检测作用于其上或附近的触摸操作。可选的,传感器模块905还可以包括有陀螺仪传感器(图9未示出)、加速度传感器(图9未示出)等等。The sensor module 905 may include a touch sensor 905A and the like. The touch sensor 905A may also be referred to as a "touch device". The touch sensor 905A may be provided on the display screen 904, and the touch sensor 905A and the display screen 904 form a touch screen, also referred to as a "touch screen". The touch sensor 905A may be used to detect a touch operation acting on or near the touch sensor 905A. Optionally, the sensor module 905 may also include a gyroscope sensor (not shown in FIG. 9 ), an acceleration sensor (not shown in FIG. 9 ), and the like.
音频模块906可以用于将数字音频信息转换成模拟音频信号输出,也可以用于将模拟音频输入转换成数字音频信号。音频模块906还可以用于对音频信号编码和解码。在一些实施例中,音频模块906还可以设置于处理器901中,或将音频模块906的部分功能模块设置于处理器901中。The audio module 906 can be used to convert digital audio information into analog audio signal output, and can also be used to convert analog audio input into digital audio signal. The audio module 906 can also be used to encode and decode audio signals. In some embodiments, the audio module 906 can also be arranged in the processor 901, or some functional modules of the audio module 906 can be arranged in the processor 901.
扬声器907,也可以称为“喇叭”,用于将音频电信号转换成为声音信号。电子设备100可以通过扬声器907收听音乐,或收听免提电话。The speaker 907 , which may also be called a “speaker”, is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or a hands-free phone call through the speaker 907 .
图10为本申请实施例提供的一种电子设备200的硬件结构示意图。FIG. 10 is a schematic diagram of the hardware structure of an electronic device 200 provided in an embodiment of the present application.
如图10所示,电子设备200可以包括有处理器1001、存储器1002、无线通信模块1003、电源开关1004、显示屏1005和无线通信模块1003等等。上述各个模块可以通过总线或者其它方式连接,本申请实施例以通过总线连接为例。As shown in Figure 10, the electronic device 200 may include a processor 1001, a memory 1002, a wireless communication module 1003, a power switch 1004, a display screen 1005, and a wireless communication module 1003, etc. The above modules may be connected via a bus or other means, and the embodiment of the present application takes the bus connection as an example.
处理器1001可以用于读取和执行计算机可读指令。具体实现中,处理器1001可以主要包括控制器、运算器和寄存器。其中,控制器主要负责指令译码,并为指令对应的操作发出控制信号。运算器主要负责保存指令执行过程中临时存放的寄存器操作数和中间操作结果等。具体实现中,处理器1001的硬件架构可以是专用集成电路(ASIC)架构、MIPS架构、ARM架构或者NP架构等等。The processor 1001 can be used to read and execute computer-readable instructions. In a specific implementation, the processor 1001 can mainly include a controller, an arithmetic unit and a register. Among them, the controller is mainly responsible for decoding instructions and sending control signals for operations corresponding to the instructions. The arithmetic unit is mainly responsible for saving register operands and intermediate operation results temporarily stored during the execution of instructions. In a specific implementation, the hardware architecture of the processor 1001 can be an application-specific integrated circuit (ASIC) architecture, a MIPS architecture, an ARM architecture or an NP architecture, etc.
在一些实施例中,处理器1001可以用于解析无线通信模块1003接收到的数据信息。处理器1001可以根据该数据信息进行响应,执行相应的操作。处理器1001还可以用于生成无线通信模块1003向外发送的信号,如蓝牙信号等。In some embodiments, the processor 1001 may be used to parse the data information received by the wireless communication module 1003. The processor 1001 may respond according to the data information and perform corresponding operations. The processor 1001 may also be used to generate a signal sent out by the wireless communication module 1003, such as a Bluetooth signal.
存储器1002与处理器1001耦合,用于存储各种软件程序和/或多组指令。具体实现中,存储器1002可以包括高速随机存取的存储器,并且也可以包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。存储器1002还可以存储通信程序,该通信程序可用于与电子设备100,或其他电子设备进行通信。The memory 1002 is coupled to the processor 1001 and is used to store various software programs and/or multiple sets of instructions. In a specific implementation, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 1002 may also store a communication program, which may be used to communicate with the electronic device 100 or other electronic devices.
无线通信模块1003可以包括蓝牙通信模块1003A或其他。电子设备200可以通过蓝牙通信模块1003A中的一项或多项接收或发射无线信号,与电子设备100建立无线通信连接。电子设备200可以通过上述无线通信连接获取到电子设备100传输的数据。其中,蓝牙通信模块1003A可以提供包括经典蓝牙(basic rate/enhanceddatarate,BR/EDR)或蓝牙低功耗(bluetooth low energy,BLE)中一项或多项蓝牙通信的解决方案。The wireless communication module 1003 may include a Bluetooth communication module 1003A or others. The electronic device 200 may receive or transmit wireless signals through one or more of the Bluetooth communication modules 1003A to establish a wireless communication connection with the electronic device 100. The electronic device 200 may obtain data transmitted by the electronic device 100 through the above wireless communication connection. Among them, the Bluetooth communication module 1003A may provide a solution including one or more Bluetooth communications in classic Bluetooth (basic rate/enhanceddatarate, BR/EDR) or Bluetooth low energy (bluetooth low energy, BLE).
电源开关1004可以用于控制电源向电子设备200的供电。The power switch 1004 may be used to control the supply of power to the electronic device 200 .
显示屏1005可以用于显示图像、视频、控件、文字信息等。显示屏1005可以包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备200可以包括1个或N个显示屏1005,N为大于1的正整数。The display screen 1005 can be used to display images, videos, controls, text information, etc. The display screen 1005 may include a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include 1 or N display screens 1005, where N is a positive integer greater than 1.
可选的,电子设备200可以包括有一个或多个物理按键。该一个或多个物理按键可以接收用户作用在该按键上的输入操作(例如,按下该物理按键)。响应于该输入操作,电子设备200可以执行与该物理按键对应的显示屏上所显示控件相应的操作。Optionally, the electronic device 200 may include one or more physical buttons. The one or more physical buttons may receive an input operation (e.g., pressing the physical button) from a user. In response to the input operation, the electronic device 200 may perform an operation corresponding to the control displayed on the display screen corresponding to the physical button.
可选的,该电子设备200还可以包括有表带和表盘。表盘可以包括有显示屏1005,以用于显示图像、视频、控件、文字信息等等。表带可以用于将电子设备200固定在人体四肢部位以便于穿戴。实际应用中,电子设备200还可以包括比图示更多或更少的部件,这里不作限制。Optionally, the electronic device 200 may also include a watch strap and a dial. The dial may include a display screen 1005 for displaying images, videos, controls, text information, etc. The watch strap may be used to fix the electronic device 200 to the limbs of the human body for easy wearing. In practical applications, the electronic device 200 may also include more or fewer components than those shown in the figure, which is not limited here.
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410979746.5ACN119003065B (en) | 2024-07-19 | 2024-07-19 | Display method, electronic device and system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410979746.5ACN119003065B (en) | 2024-07-19 | 2024-07-19 | Display method, electronic device and system |
| Publication Number | Publication Date |
|---|---|
| CN119003065A CN119003065A (en) | 2024-11-22 |
| CN119003065Btrue CN119003065B (en) | 2025-07-04 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410979746.5AActiveCN119003065B (en) | 2024-07-19 | 2024-07-19 | Display method, electronic device and system |
| Country | Link |
|---|---|
| CN (1) | CN119003065B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114157755A (en)* | 2022-02-09 | 2022-03-08 | 荣耀终端有限公司 | Display method and electronic equipment |
| CN114579068A (en)* | 2020-11-30 | 2022-06-03 | 华为技术有限公司 | Multi-screen cooperative display method and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2015183567A1 (en)* | 2014-05-28 | 2015-12-03 | Polyera Corporation | Low power display updates |
| US11302156B1 (en)* | 2018-07-06 | 2022-04-12 | Amazon Technologies, Inc. | User interfaces associated with device applications |
| CN115878056A (en)* | 2021-09-27 | 2023-03-31 | 华为技术有限公司 | Display method and electronic equipment |
| KR20230128649A (en)* | 2022-02-28 | 2023-09-05 | 엘지전자 주식회사 | Display device and operating method thereof |
| CN114422639B (en)* | 2022-03-16 | 2022-09-06 | 荣耀终端有限公司 | Information display method and wearable device |
| CN117714759B (en)* | 2022-09-06 | 2025-03-14 | 华为技术有限公司 | Method and system for screen projection display and electronic equipment |
| CN117939008A (en)* | 2022-10-26 | 2024-04-26 | 荣耀终端有限公司 | Card display method and electronic device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114579068A (en)* | 2020-11-30 | 2022-06-03 | 华为技术有限公司 | Multi-screen cooperative display method and electronic equipment |
| CN114157755A (en)* | 2022-02-09 | 2022-03-08 | 荣耀终端有限公司 | Display method and electronic equipment |
| Publication number | Publication date |
|---|---|
| CN119003065A (en) | 2024-11-22 |
| Publication | Publication Date | Title |
|---|---|---|
| EP4321994A1 (en) | Display method and electronic device | |
| CN114077529B (en) | Log uploading method and device, electronic equipment and computer readable storage medium | |
| CN116257235B (en) | Drawing method and electronic equipment | |
| CN115017003A (en) | Load prediction method and load prediction device | |
| KR20150027459A (en) | Content transmission method and apparatus | |
| KR20150057085A (en) | Apparatas and method for reducing a power consumption in an electronic device | |
| WO2021051982A1 (en) | Method for calling hardware interface and electronic device | |
| CN114257502B (en) | Log reporting method and device | |
| CN115016868B (en) | Screen control method and terminal equipment | |
| CN119003065B (en) | Display method, electronic device and system | |
| US20240045702A1 (en) | User interface display method and apparatus, device, and storage medium | |
| CN116389898B (en) | Image processing methods, equipment and storage media | |
| WO2024131486A1 (en) | Performance analysis method, readable storage medium, program product and electronic device | |
| WO2024179072A1 (en) | Camera application configuration method, device and storage medium | |
| CN115550497B (en) | Message collaboration method and device | |
| WO2023169276A1 (en) | Screen projection method, terminal device, and computer-readable storage medium | |
| KR20150045560A (en) | Apparatas and method for sorting a contents using for updated post information in an electronic device | |
| CN117992397A (en) | A method and electronic device for estimating cold and hot data | |
| CN116743908A (en) | Wallpaper display method and related device | |
| CN116089109B (en) | Step counting data transmission method and related device | |
| CN116339562B (en) | A quick input method and electronic device | |
| CN119155513B (en) | Video jamming detection method and related device | |
| CN116700660B (en) | Audio playing method and electronic device | |
| EP4621592A1 (en) | Sports data synchronization method and electronic device | |
| WO2025026022A1 (en) | Operating system starting method, and terminal device |
| 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 | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information | Country or region after:China Address after:Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Applicant after:Honor Terminal Co.,Ltd. Address before:3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Applicant before:Honor Device Co.,Ltd. Country or region before:China | |
| GR01 | Patent grant | ||
| GR01 | Patent grant |