Interface display method and electronic device
By reloading resources after the interface switching event in wearable devices, the problem of screen blur when switching from sports applications to music applications is solved, ensuring that the interface display is complete and improving user experience and fluency.
Patent Information
- Application Number
- CN202310384589.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-06
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2043-04-06
AI Technical Summary
When a wearable device switches from a sports application to a music application, icons or text may appear that do not belong to the interface, resulting in a poor user experience, which is called the blurred screen phenomenon.
When receiving an interface switching event, if the resource corresponding to the interface switching event is missing, reload the resource and display the interface based on the reloaded resource to avoid resource loss and screen distortion caused by memory release.
By reloading resources, the interface display is ensured to be complete, the occurrence of screen blur is reduced, and the user experience and interface fluency are improved.
Smart Images

Figure CN117130699B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an interface display method and an electronic device. Background Art
[0002] Wearable devices (such as smart watches, bracelets, etc.) are devices that integrate various interactive technologies such as recognition technology, sensor technology, cloud services, etc. As a portable device, wearable devices can provide users with functions such as life entertainment and human body monitoring.
[0003] Currently, when a wearable device switches from an interface of a sports application to an interface of a music application, icons or texts that do not originally belong to the interface may be displayed on the interface of the music application, resulting in a poor user experience. Summary of the invention
[0004] The embodiments of the present application provide an interface display method and an electronic device for solving the problem of screen distortion during the display process.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, the present application provides an interface display method, which is applied to an electronic device, and the method includes: receiving an interface switching event; if the type of the first interface corresponding to the interface switching event is a preset type and the resources corresponding to the first interface have been loaded, reloading the resources corresponding to the first interface; and displaying the first interface according to the reloaded resources.
[0007] It can be understood that compared with the resources that have not been reloaded (corresponding to the first interface), which are more likely to be partially released due to limited memory space, the reloaded resources (corresponding to the first interface) are more complete, so that the first interface displayed based on the reloaded resources can completely cover the interface displayed when the electronic device receives an interface switching event, avoiding the appearance of icons and texts that do not belong to the interface on the first interface, thereby reducing the screen distortion phenomenon.
[0008] In an implementation provided in the first aspect, the method also includes: obtaining a first operating system and an audio list, the first operating system being an operating system used by a terminal device currently connected to the electronic device, or the first operating system being an operating system used by a terminal device most recently connected to the electronic device, and the audio list containing music present in the electronic device; if the first operating system is a preset system and the audio list is empty, determining that the first interface is a preset type.
[0009] That is to say, in actual application, if the first operating system is a preset system and the audio list is empty, the electronic device can display one type of interface (i.e., a preset type of interface); if the first operating system is not a preset system or the audio list is not empty, the electronic device can display another type of interface (i.e., a non-preset type of interface). The first operating system can be an IOS system, an Android TM system, or other systems.
[0010] In an implementation provided in the first aspect, the method further includes: obtaining an audio list, the audio list including music present in the electronic device; if the audio list is empty, determining that the first interface is a preset type.
[0011] That is to say, in actual application, if the audio list is empty, the electronic device can display one type of interface (ie, a preset type of interface); if the audio list is not empty, the electronic device can display another type of interface (ie, a non-preset type of interface).
[0012] In an implementation manner provided in the first aspect, the interface switching event is used to instruct the electronic device to switch from the second interface of the second application to the first interface of the first application.
[0013] In an embodiment provided by the first aspect, before receiving an interface switching event, the method includes: in response to an operation of starting a second application, loading resources of the second application and resources of the first application, the resources of the second application including resources corresponding to multiple interfaces of the second application, and the resources of the first application including resources corresponding to multiple interfaces of the first application; displaying a second interface of the second application, the second interface being the first interface displayed after the second application is started.
[0014] In other words, the electronic device can load the resources of the first application when opening the second application, thereby preloading the resources, which is helpful in reducing display delay and improving fluency.
[0015] In an implementation provided in the first aspect, the interface switching event includes a left swipe operation of the user on any one of the multiple interfaces of the second application. That is, by swiping left on any one of the multiple interfaces of the second application, the first interface can be displayed.
[0016] In an embodiment provided in the first aspect, the method also includes: receiving a touch operation of the user, and obtaining the coordinates corresponding to the touch operation; if the coordinates corresponding to the touch operation include a first coordinate and a second coordinate, and the first difference is greater than a first threshold and the second difference is greater than a second threshold, determining that the touch operation is a left-swipe operation; wherein the first coordinate is the starting coordinate of the touch operation, the second coordinate is the ending coordinate of the touch operation, the first difference is the difference between the horizontal coordinate of the first coordinate and the horizontal coordinate of the second coordinate, the second difference is the difference between the vertical coordinate of the first coordinate and the vertical coordinate of the second coordinate, and the first threshold is greater than the second threshold.
[0017] In an implementation manner provided in the first aspect, the first application is a music application, and the second application is a sports application.
[0018] In an embodiment provided in the first aspect, the electronic device includes an embedded multimedia card and a pseudo-static random access memory, the embedded multimedia card includes resources corresponding to a first interface, and reloading the resources corresponding to the first interface includes: re-reading the resources corresponding to the first interface from the embedded multimedia card; and decompressing the resources corresponding to the first interface to the pseudo-static random access memory.
[0019] In an implementation manner provided in the first aspect, the electronic device includes a pseudo-static random access memory, and resources corresponding to the first interface have been loaded to indicate that the pseudo-static random access memory includes resources corresponding to the first interface.
[0020] In a second aspect, the present application provides an electronic device, comprising: one or more processors; a memory storing computer instructions; a display screen for detecting touch operations and displaying an interface; when the computer instructions are executed by one or more processors, the electronic device executes a method as in any one of the embodiments of the first aspect.
[0021] In a third aspect, the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, causes the electronic device to execute a method as in any one of the embodiments of the first aspect.
[0022] In a fourth aspect, the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device executes the method of the first aspect and any possible design thereof.
[0023] In a fifth aspect, the present application provides a chip system, which includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by lines. The above chip system can be applied to an electronic device including a communication module and a memory. The interface circuit is used to receive a signal from the memory of the electronic device and send the received signal to the processor, where the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device can execute the method of the first aspect and any possible design thereof.
[0024] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A software processing flow chart of an electronic device provided in an embodiment of the present application;
[0026] Figure 2 A schematic diagram of an interface of a flower screen display provided in an embodiment of the present application;
[0027] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0028] Figure 4 A software structure block diagram of an electronic device provided in an embodiment of the present application;
[0029] Figure 5 A schematic diagram of a method for displaying an interface provided in an embodiment of the present application Figure 1 ;
[0030] Figure 6 Schematic diagrams of two different types of interfaces provided for embodiments of the present application;
[0031] Figure 7 A schematic diagram of a method for displaying an interface provided in an embodiment of the present application Figure 2 ;
[0032] Figure 8 A schematic diagram of interface switching of a smart watch provided in an embodiment of the present application;
[0033] Fig. 9 A schematic diagram of multiple interfaces of a sports application provided in an embodiment of the present application;
[0034] Fig. 10A A schematic diagram of an interface for adding and managing music provided in an embodiment of the present application;
[0035] Fig. 10B Schematic diagrams of two different types of interfaces provided for embodiments of the present application;
[0036] Fig.11 A schematic diagram of position coordinates corresponding to touch operations provided in an embodiment of the present application;
[0037] Fig.12 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0039] The embodiment of the present application provides an interface display method, which can be applied to an electronic device including a display screen. Specifically, the method can be applied to the process in which the electronic device displays an image on the display screen in response to a user operation.
[0040] The user operation includes a user's touch operation on a touch panel (TP), an operation on a button, or a user's voice control operation, etc., which is not specifically limited here.
[0041] See also Figure 1 , which takes the sliding operation as an example, and illustrates the software processing flow of the electronic device from the time when the electronic device receives the sliding operation (e.g., a left sliding operation on interface 101) to the time when the display screen displays the interface corresponding to the sliding operation (e.g., interface 102). Figure 1 As shown, the software processing flow of the electronic device includes:
[0042] (1) The touch panel (TP) senses the user's sliding operation and sends a sliding event to the APP affected by the sliding operation. The sliding event may include information such as the starting coordinates, ending coordinates, touch start time, and touch end time of the sliding operation. In addition, the touch panel can send the sliding event to the APP affected by the sliding operation through a related interface.
[0043] (2) APP loads the resources corresponding to the sliding event. The APP refers to the application on which the sliding operation acts. The resources may include pictures, texts, etc. required to display the changed interface. Specifically, the APP can access the embedded multi-media card (embedded multi-media card, eMMC) through an interface, read the picture resources corresponding to the sliding event from the eMMC, and decompress the picture resources from the eMMC to the pseudo static random access memory (psram). In an optional embodiment, data transmission can be performed between the eMMC and the PSRAM through a secure digital input and output (SDIO) interface.
[0044] (3) The APP calls the UI framework to render the resources. Specifically, the UI framework reads resources from the PSRAM, draws one or more layers based on the resources, renders one or more layers, and synthesizes the rendered one or more layers to obtain image frames, and finally stores the image frames in the frame buffer. The UI framework can call the graphics processing unit (GPU) through an interface to read resources from the PSRAM and render layers of the read resources. The GPU can read resources from the PSRAM through a flexible memory controller (FMC).
[0045] (4) The liquid crystal display (LCD) displays the image frames. Specifically, the LCD driver can read the image frames from the frame buffer at a preset frequency (e.g., 60 times / second), and send the image frames to the LCD for display by the LCD. In an optional embodiment, the LCD driver can be an LCD display device controller (LCD-TFT display controller, LTDC), and the LTDC can read the image frames from the frame buffer through a mobile industry processor interface (mobile industry processor interface, MIPI) interface.
[0046] In the above process, the time from "the touch screen senses the user's sliding operation" to "the LCD displays the image frame" can be called display delay. Specifically, the longer the display delay of the electronic device, the worse the fluency of the electronic device; the shorter the display delay of the electronic device, the better the fluency of the electronic device. Among them, the better the fluency of the electronic device, the better the user experience of controlling the electronic device through user operation, and the smoother it feels.
[0047] In a method provided by the related art, in order to reduce display delay, for some target interfaces with fixed content, the electronic device can pre-load the resources corresponding to the target interface before receiving the user operation to display the target interface (i.e., pre-perform step (2) in the above flowchart). In this way, when the electronic device actually receives the operation to display the target interface, there is no need to load the image resources corresponding to the interface, and it can be directly rendered and displayed (i.e., execute the above steps (3) and (4)), thereby shortening the display delay and improving the fluency.
[0048] However, there is a problem with this approach: before the electronic device displays the target interface in response to user operations, part of the pre-loaded resources may have been released due to limited memory space. As a result, when the electronic device displays the target interface, the icons or background on the target interface are incomplete due to missing resources and cannot cover the interface originally displayed by the electronic device, resulting in the presence of icons or text on the target interface that do not originally belong to the interface, i.e., a screen distortion phenomenon occurs.
[0049] At present, when an electronic device switches from a sports application interface to a music application interface, a screen distortion phenomenon often occurs. Figure 2 As shown in (a) of FIG. 1 , the smart watch may display an interface 201 of a sports application. The interface 201 may include information such as heart rate, speed, distance, time, etc. In response to the user swiping left on the interface 201, the smart watch may display an interface of a music application. For example, the interface of the music application may be Figure 2 The interface 202 shown in (b) in FIG. 1 can be seen that the interface 202 includes an icon 202a that originally belongs to the interface 201, that is, there is a screen distortion phenomenon.
[0050] In view of this, the present application provides an interface display method. After receiving an interface switching event, if it is determined that there is a high probability that the resources corresponding to the first interface requested by the interface switching event are missing, the method reloads the resource file corresponding to the first interface and displays the first interface based on the reloaded resources, thereby avoiding the screen distortion phenomenon caused by the missing resource file corresponding to the first interface due to memory release.
[0051] The interface display method provided in the embodiment of the present application can be applied to electronic devices. In the embodiment of the present application, the electronic device can be an electronic device including a display screen, such as a smart watch, a smart bracelet, an augmented reality (AR) / virtual reality (VR) device, a television, a mobile phone, etc. The implementation method of the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings.
[0052] See also Figure 3 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3As shown, the electronic device may include a processor 110, a memory 120, a display screen 130, a sensor module 140 and a wireless communication module 150. The processor 110 may include one or more interfaces for connecting to other components of the electronic device. Among them, the one or more interfaces may include: an input / output (Input / Output, I / O) interface (also called an I / O pin), an interrupt pin and a data bus interface, etc. Among them, the data bus interface may include: one or more of the interfaces such as a serial peripheral interface (serial peripheral interface, SPI), an integrated circuit (inter-integrated circuit, I2C) interface. For example, in an embodiment of the present application, the processor 110 can be connected to the sensor module 140 via an I / O pin, an interrupt pin or a data bus interface.
[0053] The memory 120 may be used to store program codes, such as program codes for electronic devices to wirelessly communicate with other electronic devices (e.g., mobile phones), and program codes for electronic devices to display UIs, etc. The processor 110 may be used to execute the above application code and call related modules to implement the functions of the electronic devices in the embodiments of the present application. For example, the UI display function, motion monitoring function, wireless communication function, etc. of the electronic device may be implemented.
[0054] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors. Different processing units may be independent devices or integrated into one or more processors 110.
[0055] The electronic device implements the display function through a GPU, a display screen 130, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 130 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0056] The display screen 130 is used to display images, videos, and application interfaces. The display screen 130 includes a display panel. The display panel can 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.
[0057] Among them, the display screen 130 in the embodiment of the present application can be a touch screen. That is, a touch sensor is integrated in the display screen 130. The touch sensor can also be called a "touch panel". In other words, the display screen 130 may include a display panel and a touch panel, and the touch sensor and the display screen 130 form a touch screen, also known as a "touch screen". The touch sensor is used to detect touch operations acting on or near it. After the touch operation is detected by the touch sensor, it can be passed to the upper layer by the driver of the kernel layer to determine the type of touch event. Visual output related to the touch operation can be provided by the display screen 130. In other embodiments, the touch sensor can also be arranged on the surface of the electronic device, which is different from the position of the display screen 130. In an optional embodiment, the touch sensor may include a screen capacitor, and the capacitance value of the screen capacitor may vary according to different pressures.
[0058] The sensor module 140 may include sensors such as an accelerometer and a gyroscope for monitoring parameters such as the number of steps and exercise time of the user.
[0059] The wireless communication module 150 can support data exchange between electronic devices and other electronic devices through wireless communications including Bluetooth, global navigation satellite system (GNSS), wireless LAN, frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
[0060] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device. Figure 3More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Figure 3 The various components shown may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.
[0061] The software system of the electronic device can adopt a layered architecture, including an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. TM The system is taken as an example to illustrate the software structure of the electronic device. It should be understood that the system in the embodiment of the present application can also be other systems, such as Android TM (Android) system, etc., this application does not limit this.
[0062] Figure 4 The software structure diagram of the electronic device provided in the embodiment of the present application is shown in FIG. The layered architecture divides the software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, LiteOS TM The system is divided into five layers, from top to bottom: application layer, application framework layer, system service layer, hardware abstract layer (HAL) and kernel layer.
[0063] The application layer can include a series of application packages. Figure 4 As shown, the application package may include a sports application, a music application, a health application, a settings application, etc.
[0064] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. Figure 4 As shown, the application framework layer may include a meta-capability cross-platform execution environment (ACE) user interface (UI) framework, audio services, communication services, device management services, sports services, health services, Bluetooth services, etc.
[0065] Among them, the ACE UI framework can provide infrastructure such as view layout, UI components, event response mechanism, etc. for UI development. The ACE UI framework can also parse the UI interface of the application, generate specific drawing instructions by creating specific back-end UI components, performing layout calculations, resource loading, etc., and send the drawing commands to the rendering engine. The rendering engine converts the drawing instructions into specific screen pixels, and finally converts the application into a visible interface effect through the display device to display to the user. The UI framework can be a UI kit framework, or a UI framework such as touch GFX, and there is no specific restriction here.
[0066] The audio service is used to provide upper-layer applications with functions such as music playback, audio management, voice broadcast, voice service, and music control.
[0067] Communication services can provide upper-layer applications with functions such as messaging, calling, interconnection, and contact management.
[0068] Device management services can provide upper-layer applications with functions such as device control, display management, sensor management, and Bluetooth management.
[0069] Sports services can provide upper-level applications with functions such as exercise records, daily activity records, data storage synchronization, and training status evaluation.
[0070] Health services can provide upper-level applications with functions such as heart rate statistics, sleep monitoring, respiratory pressure monitoring, heart health monitoring, and blood oxygen monitoring.
[0071] The Bluetooth service can provide Bluetooth connection functions such as Bluetooth (BT) and Bluetooth low energy (BLE).
[0072] The system service layer includes basic libraries, algorithm libraries, and Bluetooth protocol stacks. The basic library is used to provide some basic databases, such as JerryScript, cJSON, etc. The basic library provides an API for users to develop applications. The algorithm library includes algorithms required for the implementation of upper-layer application functions, such as gesture algorithms, heart rate algorithms, sleep algorithms, audio algorithms, etc. The Bluetooth protocol stack is used to provide BT and / or BLE protocol specifications so that electronic devices can support BT and / or BLE.
[0073] The HAL layer can encapsulate the kernel layer's drivers and provide a calling interface to the upper layer. The HAL layer may include Bluetooth HAL, LCD HAL, memory (such as flash) HAL, etc.
[0074] The kernel layer is the layer between hardware and software. The kernel layer includes the basic algorithms of the operating system and the drivers of various hardware, such as Bluetooth driver, LCD driver, memory driver, etc.
[0075] The interface display method provided by the embodiment of the present application is described below with reference to the accompanying drawings.
[0076] See also Figure 5 , which is a flow chart of an interface display method provided in an embodiment of the present application Figure 1 .like Figure 5 As shown, the interface display method includes:
[0077] S510: The electronic device receives an interface switching event.
[0078] The interface switching event includes an event that triggers the electronic device to switch interfaces. In an optional implementation, the user can actively initiate an interface switching event for the device interface through the interface interaction entrance of the electronic device, and the interface switching event includes but is not limited to an interface switching event initiated by a touch screen / button (such as sliding the display screen, etc.), and an interface switching event initiated by voice (such as voice commands "open the music application", "start mountaineering", etc.).
[0079] S520: If the type of the first interface corresponding to the interface switching event is a preset type and the resources of the first interface have been loaded, the electronic device reloads the resources corresponding to the first interface.
[0080] The first interface corresponding to the interface switching event refers to the interface that the electronic device needs to display under the effect of the interface switching event. The fact that the resources of the first interface have been loaded can be understood as the resources of the first interface have been decompressed to the PSRAM.
[0081] As an optional implementation, the interface may include two types, namely, a variable type and an immutable type. Among them, a variable type interface means that the interface can be different with the change of icons and controls on the interface; an immutable type interface means that the interface does not change.
[0082] For example, see Figure 6 , which is a schematic diagram of two types of interfaces. Among them, the variable type interface can be Figure 6 The interface 601 shown in (a) of FIG. 6 includes buttons such as play, previous song, and next song, as well as content such as the music being played. The content displayed in the interface 601 may change depending on the different playing states and the different music being played. The immutable type interface may be Figure 6 The interface 602 shown in (b) in FIG. 6 indicates that there is no music in the current music APP, and reminds the user to add and manage music through the sports health application on the mobile phone. The content displayed in the interface 602 is fixed.
[0083] In the embodiment of the present application, the preset type may refer to the above-mentioned immutable type.
[0084] As an optional implementation, the variable type and the immutable type have different identifiers. For example, the identifier of the variable type is false (wrong), and the identifier of the immutable type is true (correct). If the electronic device determines that the type of the first interface corresponding to the interface switching event is true, it can be determined that the type of the first interface is a preset type.
[0085] As another optional implementation, the electronic device may display different types of interfaces in different scenarios, and the electronic device may determine whether the type of the interface to be displayed (eg, the first interface) is a preset type by identifying the scenario.
[0086] For example, in a scenario where the playlist of the music application is not empty, the electronic device may display the following when opening the music application: Figure 6 Interface 601 (i.e., a variable type interface) shown in (a) of FIG. 1 ; in a scenario where the playlist of a music application is empty, the electronic device may display when opening the music application Figure 6 In this way, the electronic device can determine whether the playlist of the music application is empty, and determine that the first interface is of the preset type when the playlist of the music application is empty, or determine that the first interface is not of the preset type when the playlist of the music application is not empty.
[0087] As an optional implementation, the loaded resources and the unloaded resources may have different identifiers. For example, the identifier of the loaded resources is 1, and the identifier of the unloaded resources is 0. If the electronic device determines that the identifier of the resources of the first interface is 1, it can be determined that the resources of the first interface have been loaded; if the electronic device determines that the identifier of the resources of the first interface is 0, it can be determined that the resources of the first interface have not been loaded.
[0088] Reloading the resources corresponding to the first interface may be re-reading the resources corresponding to the first interface from the eMMC and decompressing the re-read resources corresponding to the first interface into the PSRAM.
[0089] S530: The electronic device displays the first interface according to the reloaded resources.
[0090] In an embodiment of the present application, the electronic device may render the reloaded resources to obtain an image frame (ie, an image frame corresponding to the first interface), and then display the rendered image frame (ie, display the first interface).
[0091] It can be understood that compared with the resources that have not been reloaded (corresponding to the first interface), which are more likely to be partially released due to limited memory space, the reloaded resources (corresponding to the first interface) are more complete, so that the first interface displayed based on the reloaded resources can completely cover the interface displayed when the electronic device receives an interface switching event, avoiding the appearance of icons and texts that do not belong to the interface on the first interface, thereby reducing the screen distortion phenomenon.
[0092] Optionally, if the first application to which the first interface belongs is different from the second application to which the second interface belongs, the type of the first interface is a preset type, and the resources of the first interface have been loaded, the electronic device can reload the resources corresponding to the first interface. The second interface is the interface displayed when the electronic device receives an interface switching event. That is, the interface switching event is used to switch the electronic device from the second interface to the first interface.
[0093] Understandably, if the first interface and the second interface belong to different applications, the resources belonging to the first interface are not currently needed by the electronic device and are more likely to be released. In this case, reloading the resources corresponding to the first interface can better avoid the phenomenon of screen distortion in the first interface.
[0094] Considering that in a smartwatch, when a sports app is turned on, the smartwatch will preload the resources of the music app. This causes a certain delay between loading the resources of the music app and displaying the interface of the music app. Due to limited memory space, the resources of the music app are likely to be partially released before the interface of the music app is displayed. Therefore, when the interface of the music app is displayed, there may be a lack of resources for the music interface, resulting in the interface of the music app being unable to completely cover the previous interface, resulting in a distorted screen on the interface of the music app.
[0095] The following takes the electronic device as a smart watch, the first application as a music application, and the second application as a mountain climbing application as an example to illustrate the software process of the interface display method provided in the embodiment of the present application being applied to the process of the smart watch switching from the mountain climbing application to the music application to avoid the screen distortion in the music application.
[0096] See also Figure 7 , which is a flow chart of an interface display method provided in an embodiment of the present application Figure 2 .like Figure 7 As shown, the interface display method includes:
[0097] S710: receiving a first operation of the user to start a mountain climbing application, and the smart watch loads resources of the mountain climbing application and resources of the music application.
[0098] As an optional implementation, the first operation of the user to start the mountaineering application includes the user selecting the mountaineering application on the interface including the mountaineering application. Figure 8 , is a schematic diagram of the interface switching of a smart watch provided in an embodiment of the present application. Figure 8 As shown in (a) of FIG. 8 , the smart watch displays an interface 801, and the interface 801 may provide icons of various sports applications for the user to select. For example, the interface 801 includes icons of applications such as swimming, mountain climbing 801a, and hiking. The user may switch the icons of the applications displayed on the interface 801 by swiping up / down on the interface 801. The first operation of opening the mountain climbing application may include the user selecting (e.g., clicking, long pressing, etc.) mountain climbing 801a on the interface 801. In response to the user selecting the operation of mountain climbing 801a, as shown in FIG. Figure 8 As shown in (b) , the smart watch can display interface 802, which is the first interface displayed after the mountaineering application is started.
[0099] As another optional implementation, the first operation of the user to start the mountain climbing application may include an operation initiated by the user through voice, such as “Hello YOYO, start the mountain climbing application”.
[0100] The mountain climbing application may include multiple interfaces, and the resources of the mountain climbing application include resources such as icons and texts of the multiple interfaces of the mountain climbing application. For example, the mountain climbing application includes 6 interfaces, and the 6 interfaces may be as follows: Fig. 9 In response to the user's swipe up / down operation, the interface displayed by the smart watch can switch between the six interfaces. For example, in response to the user's swipe down operation on interface 901, the smart watch can display interface 902; in response to the user's swipe down operation on interface 902, the smart watch can display interface 903; or, in response to the user's swipe up operation on interface 902, the smart watch can display interface 901.
[0101] The resources of the music application include icons, files and other resources of multiple interfaces of the music application. As an optional implementation, the music application includes two interfaces, and the two interfaces can be respectively as follows: Figure 6 As shown in (a) and (b) in the figure. Figure 6 The interface 601 (i.e., a variable type interface) shown in (a) is interface 1. Figure 6 The interface 602 (i.e., an immutable type interface) shown in (b) is interface 2, and the resources of the music application include a first resource corresponding to interface 1 and a second resource corresponding to interface 2. The first resource includes resources such as pictures and texts in interface 1; the second resource includes resources such as pictures and texts in interface 2.
[0102] It should be noted that the embodiment of the present application only takes a mountain climbing application as an example, and the mountain climbing application can be replaced by any one of the above-mentioned sports applications.
[0103] S720: The smart watch displays interface 3 requested by the first operation.
[0104] This interface 3 is the first interface after the mountaineering application is started. For example, this interface 3 can be Figure 8 Interface 802 shown in (b).
[0105] The resources of the first application include resources corresponding to interface 3. The smart watch can render the resources corresponding to interface 3 to obtain image frames (i.e., image frames corresponding to interface 3), and then display the rendered image frames (i.e., display interface 3).
[0106] S730, in response to the user's left swipe operation on interface 3, the smart watch determines whether the first operating system is a preset system and whether the music play list is empty.
[0107] If the smart watch determines that the first operating system is the preset system and the music play list is empty, execute S740; if the first operating system is not the preset system and the music play list is empty, or the first operating system is not the preset system and the music play list is not empty, or the first operating system is the preset system and the music play list is not empty, execute S760.
[0108] In an embodiment of the present application, the smart watch can determine whether the type of the first interface corresponding to the left swipe operation is a preset type according to whether the first operating system is a preset type and whether the play list is empty.
[0109] The first operating system is the operating system used by the terminal device that the smart watch is currently connected to, or the operating system used by the terminal device that the smart watch was most recently connected to. Specifically, if the smart watch is currently connected to a terminal device, the first operating system is the operating system used by the terminal device that the smart watch is currently connected to. If the smart watch is not currently connected to a terminal device, the first operating system is the operating system used by the terminal device that the smart watch was most recently connected to.
[0110] In this way, the smart watch can directly obtain the first operating system from the storage device.
[0111] As an optional implementation, the operating system is divided into two categories, namely, IOS system and Android system. TM The two types of operating systems have different identifiers, such as Android TM The identifier of the system is 1, and the identifier of the IOS system is 2. If the operating system type read by the smart watch is 2, it can be determined that the first operating system is the IOS system.
[0112] In an embodiment of the present application, when a smart watch establishes a connection (e.g., a Bluetooth connection) with a terminal device (e.g., a mobile phone), the terminal device may send its own operating system type to the smart watch. After the connection is established, the smart watch may store the device information of the terminal device. The device information of the terminal device includes the operating system type of the terminal device, the media access control (MAC) address, etc.
[0113] In the embodiment of the present application, the preset system may be an IOS system.
[0114] Whether the music list is empty can be understood as whether the number of music included locally on the smart watch is 0. If the number of music included locally on the smart watch is 0, the music list is empty; if the number of music included locally on the smart watch is not 0, the music list is not empty.
[0115] The music of the smart watch can be added and managed through the terminal device connected to it. Specifically, the terminal device connected to the smart watch has a sports health application installed on it, and the user can add and manage the music through the sports health application. Fig. 10A As shown in (a) of FIG. 1 , a terminal device (such as a mobile phone) may display an interface 901, which may also be referred to as a main interface of the terminal device. The interface 901 includes a sports health application 901a. In response to the user's operation of opening the sports health application 901a, Fig. 10A As shown in (b) of FIG. 1 , the terminal device may display an interface 902. The interface 902 includes options such as a device 902a, a dial market 902b, and music 902c. If the user wishes to add and manage music on the smart watch, the user may click on the music 902c to enter the corresponding interface for setting.
[0116] In this embodiment, when the smart watch receives an operation to open a music application, it can determine the scene the smart watch is in, and display a corresponding interface according to the scene the smart watch is in, which is one of the above-mentioned interfaces 1 or 2.
[0117] As an optional implementation, Fig. 10B As shown in (a), in response to the user's left sliding operation on the motion interface 1001, when the first operating system is the iOS system and the music list is empty, the smart watch can display when opening the music application Fig. 10B In response to the user opening the music application in the motion interface, the first operating system is Android TM When the system or the first operating system is IOS system and the music list is empty, the smart watch can display when opening the music application Fig. 10BThe interface 1003 (i.e., a variable type interface) shown in (c) in FIG.
[0118] That is to say, the purpose of the smart watch determining whether the first operating system is a preset system and whether the music play list is empty is to determine whether the interface corresponding to the left swipe operation is of a preset type. If the first operating system is a preset system and the music play list is empty, it can be determined that the interface corresponding to the left swipe operation is interface 2, thereby determining that the interface corresponding to the left swipe operation is of a preset type. If the first operating system is not a preset system and the music play list is empty, or the first operating system is not a preset system and the music play list is not empty, or the first operating system is a preset system and the music play list is not empty, it can be determined that the interface corresponding to the left swipe operation is interface 1, thereby determining that the interface corresponding to the left swipe operation is not of a preset type.
[0119] It should be noted that the embodiments of the present application are only Figure 8 The interface 802 shown is an example of interface 3. In other embodiments, the smartwatch displays any other interface of the sports application (eg Fig. 9 When the user's left swipe operation is received when the first operating system is in any one of the interfaces 902, 903, 904, 905 and 906 shown in the figure, it can be determined whether the first operating system is the preset system and whether the music play list is empty, and S740 is executed when it is determined that the first operating system is the preset system and the music play list is empty; S760 is executed when the first operating system is not the preset system and the music play list is empty, or the first operating system is not the preset system and the music play list is not empty, or the first operating system is the preset system and the music play list is not empty.
[0120] S740: The smart watch reloads the second resource.
[0121] The second resource is the resource corresponding to interface 2. That is to say, when it is determined that the type of interface 2 is the preset type and the second resource has been loaded, the smart watch can reload the second resource. The smart watch can re-read the second resource from the eMMC and decompress the re-read second resource to the PSRAM to achieve reloading of the second resource.
[0122] It can be understood that only the second resource is reloaded here, and the first resource of the music application is not loaded, so that the consumption of I / O resources can be reduced.
[0123] S750: The smart watch displays interface 2 according to the reloaded second resource.
[0124] In the embodiment of the present application, the smartwatch can render the reloaded second resource to obtain an image frame (i.e., the image frame corresponding to interface 2), and then display the rendered image frame (i.e., display interface 2). Since the reloaded second resource is more complete than the unreloaded second resource, the content contained in interface 2 displayed according to the second resource is also more complete, reducing the situation where interface 3 cannot be covered, thereby reducing the occurrence of screen distortion.
[0125] S760, the smart watch reloads the first resource.
[0126] That is to say, when the first operating system is not the preset system and the music playlist is empty, or the first operating system is not the preset system and the music playlist is not empty, or the first operating system is the preset system and the music playlist is not empty, the interface corresponding to the left swipe operation is interface 1. However, since interface 1 is a variable type interface, in order to ensure the correctness of the content displayed on interface 1, the first resource needs to be reloaded. The process of loading the first resource is similar to the process of loading the second resource, both of which are read from eMMC and decompressed to PSRAM.
[0127] S770, the smart watch displays interface 1 according to the reloaded first resource.
[0128] Optionally, before S710, the interface display method provided in the embodiment of the present application further includes: receiving a touch operation of the user, and determining the type of the touch operation, wherein the type of the touch operation includes left swipe, right swipe, click, long press, and the like.
[0129] As an optional implementation, the smartwatch can obtain the coordinates corresponding to the touch operation through TP. For example, if the type of touch operation is left swipe or right swipe, the coordinates corresponding to the touch operation include the sliding start coordinates and the sliding end coordinates. For another example, if the type of touch operation is click or long press, the coordinates corresponding to the touch operation include the coordinates of the touch point. Exemplarily, the coordinate system where the coordinates are located is as follows: Fig.11 As shown, the coordinate system uses two lines that are tangent to the dial and perpendicular to each other as the x-axis and y-axis, and the intersection of the two lines as the coordinate origin.
[0130] Thus, if the TP determines that the touch operation corresponds to two coordinates, the touch operation can be determined to be a sliding operation; if the TP determines that the touch operation corresponds to one coordinate, the touch operation can be determined to be a click or a long press.
[0131] Furthermore, the smart watch can determine whether the sliding operation is a left sliding operation or a right sliding operation according to the relative positions of the sliding start coordinates and the sliding end coordinates.
[0132] As an optional implementation, the smartwatch can calculate the first difference between the horizontal coordinate of the sliding start coordinate and the horizontal coordinate of the sliding end coordinate. If the first difference is greater than a first threshold, it can be determined that the sliding operation is a left sliding operation. The first threshold is a value greater than 0 and is related to the diameter of the dial. For example, the larger the diameter of the dial, the larger the first threshold. For example, Fig.11 As shown, the sliding start coordinate is P1 (x1, y1), and the sliding end coordinate is P2 (x2, y2). If x1-x2 is greater than the first threshold, it can be determined that the sliding operation is a left sliding operation.
[0133] As an optional implementation, the smart watch can calculate the first difference and the second difference. The first difference is the difference between the horizontal coordinate of the sliding start coordinate and the horizontal coordinate of the sliding end coordinate, and the second difference is the absolute value of the difference between the vertical coordinate of the sliding start coordinate and the vertical coordinate of the sliding end coordinate. If the first difference is greater than the first threshold and the second difference is greater than the second threshold, it can be determined that the sliding operation is a left sliding operation. The second threshold is a value greater than 0, and the second threshold is less than the first threshold. For example, the larger the diameter of the dial, the larger the second threshold can be. Exemplary, such as Fig.11 As shown, the sliding start coordinate is P1 (x1, y1), and the sliding end coordinate is P2 (x2, y2). If x1-x2 is greater than the first threshold and |y1-y2| is greater than the second threshold, it can be determined that the sliding operation is a left sliding operation.
[0134] The present application also provides an electronic device, which includes a memory and one or more processors; wherein the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device performs each function or step in the above method embodiment. The structure of the electronic device can refer to Figure 3 The structure of the electronic device shown.
[0135] The present application also provides a chip system, such as Fig.12 As shown, the chip system includes at least one processor 1201 and at least one interface circuit 1202. The processor 1201 and the interface circuit 1202 can be interconnected via lines. For example, the interface circuit 1202 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 1202 can be used to send signals to other devices (such as processor 1201). Exemplarily, the interface circuit 1202 can read instructions stored in the memory and send the instructions to the processor 1201. When the instructions are executed by the processor 1201, the electronic device can execute the various steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0136] An embodiment of the present application also provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step executed by the smart watch in the above-mentioned method embodiment.
[0137] The embodiment of the present application also provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes each function or step executed by the smart watch in the above method embodiment.
[0138] It is understandable that the electronic device provided in the embodiment of the present application includes a hardware structure and / or software module corresponding to each function in order to realize the above functions. Those skilled in the art should easily realize that, in conjunction with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiment of the present application.
[0139] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0140] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0141] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0142] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0143] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0144] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0145] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. An interface display method, characterized in that: Applied to electronic equipment, the method comprises: Receive an interface switching event; If the type of the first interface corresponding to the interface switching event is a preset type and the resources corresponding to the first interface have been loaded, reload the resources corresponding to the first interface; the preset type is an immutable type in which the interface does not change; The first interface is displayed according to the reloaded resources.
2. The method according to claim 1, characterized in that The method further comprises: Acquire a first operating system and an audio list, where the first operating system is an operating system used by a terminal device currently connected to the electronic device, or the first operating system is an operating system used by a terminal device most recently connected to the electronic device, and the audio list includes music in the electronic device; If the first operating system is a preset system and the audio list is empty, it is determined that the first interface is of a preset type.
3. The method according to claim 1, characterized in that The method further comprises: Acquire an audio list, wherein the audio list includes music stored in the electronic device; If the audio list is empty, it is determined that the first interface is a preset type.
4. The method according to any one of claims 1 to 3, characterized in that: The interface switching event is used to instruct the electronic device to switch from the second interface of the second application to the first interface of the first application.
5. The method according to claim 4, characterized in that Before receiving the interface switching event, the method includes: In response to the operation of opening the second application, loading resources of the second application and resources of the first application, wherein the resources of the second application include resources corresponding to multiple interfaces of the second application, and the resources of the first application include resources corresponding to multiple interfaces of the first application; The second interface of the second application is displayed, where the second interface is the first interface displayed after the second application is started.
6. The method according to claim 5, characterized in that The interface switching event includes a left swipe operation by a user on any one of the multiple interfaces of the second application.
7. The method according to claim 6, characterized in that The method further comprises: Receiving a touch operation from a user, and obtaining coordinates corresponding to the touch operation; If the coordinates corresponding to the touch operation include a first coordinate and a second coordinate, and the first difference is greater than a first threshold and the second difference is greater than a second threshold, the touch operation is determined to be a left-slide operation; wherein the first coordinate is the starting coordinate of the touch operation, the second coordinate is the ending coordinate of the touch operation, the first difference is the difference between the horizontal coordinate of the first coordinate and the horizontal coordinate of the second coordinate, the second difference is the difference between the vertical coordinate of the first coordinate and the vertical coordinate of the second coordinate, and the first threshold is greater than the second threshold.
8. The method according to claim 4, characterized in that The first application is a music application, and the second application is a sports application.
9. The method according to any one of claims 1 to 3, characterized in that: The electronic device includes an embedded multimedia card and a pseudo-static random access memory, the embedded multimedia card includes resources corresponding to the first interface, and reloading the resources corresponding to the first interface includes: Rereading resources corresponding to the first interface from the embedded multimedia card; Decompress the resources corresponding to the first interface into the pseudo-static random access memory.
10. The method according to any one of claims 1 to 3, characterized in that: The electronic device includes a pseudo-static random access memory, and the resources corresponding to the first interface have been loaded to indicate that the pseudo-static random access memory includes the resources corresponding to the first interface.
11. An electronic device, characterized in that: include: one or more processors; a memory, wherein computer instructions are stored in the memory; Display screen, used to detect touch operation and display interface; When the computer instructions are executed by the one or more processors, the electronic device executes the method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 10.
