Marquee display method and device, and storage medium

CN116680017BActive Publication Date: 2026-10-30BEIJING HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210162839.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-22
Publication Date
2026-10-30
Estimated Expiration
2042-02-22

AI Technical Summary

Technical Problem

但当显示屏上存在多个跑马灯时,UI界面跑马灯显示区域的内容容易出现字体闪烁的问题

Benefits of technology

[0030]应当理解的是,本申请的第二方面至第五方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116680017B_ABST
    Figure CN116680017B_ABST
Patent Text Reader

Abstract

A method and device for marquee display and a storage medium, relating to the technical field of terminals, comprising: in response to an Nth hard interrupt signal, setting a rendering start flag bit to a first value and setting a target flag bit of a first rendering task to a second value; rendering content of M marquee display regions; if the content of the M marquee display regions is rendered completely, setting a rendering completion flag bit of a second rendering task to a third value, setting a rendering completion flag bit of the first rendering task to a fourth value, and updating the target flag bit to a fifth value; when an N+1th hard interrupt signal arrives, if the target flag bit is not updated to the fifth value, the first rendering task is continuously executed; when an N+2th hard interrupt signal arrives, if the target flag bit is updated to the fifth value, a display task is executed. The method reduces the misexecution of the terminal device when the hard interrupt signal arrives, improves the integrity of the first rendering task, and reduces the flickering of the content of the marquee display region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a method, device and storage medium for displaying a marquee light. Background Technology

[0002] With the development of terminal technology, more and more users are opting for small, lightweight, and easy-to-wear smartwatches. As a mobile terminal device, smartwatches offer a variety of additional services besides telling time, such as checking health status, two-way calling, countdown timers, music playback, and location navigation. However, due to the limitations of smartwatch form factors, the display screen is often around 40mm thick. When displaying text or images, the screen may not be able to show the entire content.

[0003] In one possible implementation, the smartwatch displays text or images in a scrolling marquee format on the screen. However, when multiple marquees are displayed, the content in the marquee display area of ​​the UI interface is prone to flickering. Summary of the Invention

[0004] This application provides a method, apparatus, and storage medium for displaying a marquee effect. The terminal device sets a target flag for a first rendering task to a second or fifth value. Specifically, when a hard interrupt signal arrives, if the target flag is the second value, the terminal device continues executing the first rendering task; if the target flag is the fifth value, the terminal device executes the display task. This reduces the likelihood of erroneous execution by the terminal device when a hard interrupt signal arrives, improves the integrity of the first rendering task, and reduces the problem of incomplete rendering of the marquee display area, resulting in flickering text.

[0005] In a first aspect, embodiments of this application provide a marquee display method, comprising: responding to an Nth hard interrupt signal, setting a rendering start flag to a first value and setting a target flag of a first rendering task to a second value; rendering the content of M marquee display areas; wherein, if the content of the M marquee display areas is rendered, the rendering completion flag of the second rendering task is set to a third value, the rendering completion flag of the first rendering task is set to a fourth value, and the target flag is updated to a fifth value; when the (N+1)th hard interrupt signal arrives, if the target flag is not updated to the fifth value, the first rendering task continues to be executed; when the (N+2)th hard interrupt signal arrives, if the target flag is updated to the fifth value, a display task is executed. This implementation reduces the risk of erroneous execution by the terminal device when a hard interrupt signal arrives, allowing the terminal device to complete the first rendering task and continuously update the content of the marquee display areas, thereby reducing the problem of text flickering in the marquee areas.

[0006] It should be noted that, in order to facilitate the description of the marquee display method, the values ​​of the flag bits are distinguished by the first value to the fifth value in this embodiment of the application. In actual implementation, the first value to the fifth value can be the same or different.

[0007] In one possible implementation, the terminal device renders the content of M scrolling marquee display areas, including: sequentially rendering the content of the M scrolling marquee display areas based on a second rendering task. In this way, the terminal device can render the content of multiple scrolling marquee display areas, allowing the user to browse the scrolling content within these areas, thereby improving the user experience.

[0008] In one possible implementation, the first rendering task includes a lightweight GUI rendering task (Lite GUIRender Task); the second rendering task includes a system rendering task (Render Task).

[0009] In one possible implementation, before the terminal device renders the content of the M marquee display areas, the process includes: obtaining the rendering component of the target interface, which includes the M marquee display areas; resolving the hierarchical relationship of the target interface based on the rendering component; obtaining the top view based on the hierarchical relationship; traversing the hierarchical relationship and obtaining the root view based on the top view; the root view includes a view component containing the content of the M marquee display areas. In this way, the terminal device can obtain the root view corresponding to the marquee display areas based on the hierarchical relationship, and then render the content of the M marquee display areas based on the root view, thus improving the user experience.

[0010] In one possible implementation, the terminal device renders the content of M marquee display areas, which also includes: rendering the borders corresponding to the M marquee display areas according to the hierarchical relationship; drawing the content within the borders based on the root view; and traversing and rendering the content of the borders of the M marquee display areas. In this way, the terminal device renders the content of the M marquee display areas based on the root view and the borders, improving the user experience.

[0011] In one possible implementation, upon the arrival of the (N+1)th hard interrupt signal, the process further includes: if the target flag is updated to the fifth value, executing the display task. This way, the terminal device executes the display task when the hard interrupt signal arrives and the first rendering task is completed, reducing erroneous execution by the terminal device, minimizing flickering in the marquee display area, and improving the user experience.

[0012] In one possible implementation, upon the arrival of the (N+2)th hard interrupt signal, the following steps are also included: if the target flag has not been updated to the fifth value, continue executing the first rendering task. This allows the terminal device to complete the first rendering task, reducing erroneous execution by the terminal device, minimizing flickering in the marquee display area, and improving the user experience.

[0013] In one possible implementation, performing the display task includes: writing the content of the rendering result into a frame buffer according to the instruction to display the rendering result; and displaying the rendering result within the border of the marquee display area based on the frame buffer. In this way, the terminal device can display the rendering result in the marquee display area, improving the user experience.

[0014] In one possible implementation, the display task includes a liquid crystal display task (LCD Task); the instructions for displaying the rendering results include ioctrl; and the frame buffer includes Framebuffer.

[0015] Secondly, embodiments of this application provide a marquee display device, which can be a terminal device, or a chip or chip system within a terminal device. The marquee display device may include a display unit and a processing unit. When the marquee display device is a terminal device, the display unit may be a display screen. The display screen is used to perform display steps to enable the terminal device to implement a marquee display method described in the first aspect or any possible implementation of the first aspect. When the marquee display device is a terminal device, the processing unit may be a processor.

[0016] The marquee display device may further include a communication unit and a storage unit. The communication unit may be an interface circuit, and the storage unit may be a memory. The communication unit is used to perform receiving and / or transmitting steps to enable the terminal device to implement a marquee display method described in the first aspect or any possible implementation of the first aspect. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit to enable the terminal device to implement a marquee display method described in the first aspect or any possible implementation of the first aspect. When the marquee display device is a chip or chip system within the terminal device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit to enable the terminal device to implement a marquee display method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (e.g., a register, cache, etc.) or a storage unit located outside the chip within the terminal device (e.g., a read-only memory, random access memory, etc.).

[0017] For example, a processor renders content in a user-relevant marquee display area and pushes it to a display screen; the display screen displays a user page including the marquee display area.

[0018] In one possible implementation, in response to the Nth hard interrupt signal, the processor sets the rendering start flag to a first value and the target flag of the first rendering task to a second value; the processor renders the content of M marquee display areas; wherein, if the content of the M marquee display areas has been rendered, the processor sets the rendering completion flag of the second rendering task to a third value, the rendering completion flag of the first rendering task to a fourth value, and updates the target flag to a fifth value. When the (N+1)th hard interrupt signal arrives, if the target flag has not been updated to the fifth value, the processor continues to execute the first rendering task; when the (N+2)th hard interrupt signal arrives, if the target flag has been updated to the fifth value, the processor executes the display task.

[0019] In one possible implementation, the processor renders the content of M marquee display areas, including: the processor sequentially renders the content of the M marquee display areas based on a second rendering task.

[0020] In one possible implementation, the first rendering task includes a lightweight GUI rendering task (Lite GUIRender Task); the second rendering task includes a system rendering task (Render Task).

[0021] In one possible implementation, before the processor renders the content of the M marquee display areas, the process further includes: the processor obtaining the rendering component of the target interface, the target interface including the M marquee display areas; the processor resolving the hierarchical relationship of the target interface based on the rendering component; the processor obtaining the top view according to the hierarchical relationship; the processor traversing the hierarchical relationship and obtaining the root view based on the top view; the root view including the view component of the content of the M marquee display areas.

[0022] In one possible implementation, the processor renders the content of M marquee display areas, and also includes: the processor rendering the borders corresponding to the M marquee display areas according to the hierarchical relationship; the processor drawing the content in the borders based on the root view; and the processor traversing and rendering the content of the borders of the M marquee display areas.

[0023] In one possible implementation, when the (N+1)th hard interrupt signal arrives, the processor also performs a display task if the target flag is updated to the fifth value.

[0024] In one possible implementation, when the (N+2)th hard interrupt signal arrives, the processor continues to execute the first rendering task if the target flag is not updated to the fifth value.

[0025] In one possible implementation, the processor performs a display task, including: the processor writing the content of the rendering result into a frame buffer according to an instruction to display the rendering result; and the display screen displaying the rendering result within the border of the marquee display area based on the frame buffer.

[0026] In one possible implementation, the display task includes a liquid crystal display task (LCD Task); the instructions for displaying the rendering results include ioctrl; and the frame buffer includes Framebuffer.

[0027] Thirdly, embodiments of this application provide an electronic device, including: a processor, a display screen, and a memory. The processor is configured to invoke a program in the memory to cause the electronic device to execute any method of the first aspect or any possible implementation thereof. The display screen is configured to execute the steps shown in any method of the first aspect or any possible implementation thereof.

[0028] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed, implement any method of the first aspect or any possible implementation of the first aspect.

[0029] Fifthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0030] It should be understood that the second to fifth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of one possible scenario for a marquee display.

[0032] Figure 2 This is a schematic diagram of one possible scenario for a marquee display.

[0033] Figure 3 This is a flowchart illustrating one possible implementation of a marquee display method.

[0034] Figure 4 This is a flowchart illustrating one possible implementation of a marquee display method.

[0035] Figure 5 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application;

[0036] Figure 6A schematic diagram of the software structure of the electronic device 100 provided in the embodiments of this application;

[0037] Figure 7 A flowchart illustrating a marquee display method provided in an embodiment of this application;

[0038] Figure 8 A flowchart illustrating a marquee display method provided in an embodiment of this application;

[0039] Figure 9 This is a schematic diagram of the rendering hierarchy in a marquee display method provided in an embodiment of this application;

[0040] Figure 10 A flowchart illustrating a marquee display method provided in an embodiment of this application;

[0041] Figure 11 A flowchart illustrating a marquee display method provided in an embodiment of this application;

[0042] Figure 12 This is a schematic diagram of the structure of a marquee display device provided in an embodiment of this application. Detailed Implementation

[0043] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:

[0044] 1. User Interface (UI): This is the medium through which the system interacts and exchanges information with the user. In this application, the UI primarily refers to the display screen of a smartwatch.

[0045] 2. Rendering: When an electronic device displays its UI, the text, images, and other elements in the interface are rendered and presented to the user on the screen.

[0046] 3. Lightweight IoT System (Lite Operating System, LiteOS): The LiteOS basic kernel is a streamlined LiteOS operating system code, including basic operating system components such as task management, memory management, time management, communication mechanisms, interrupt management, queue management, event management, and timers, which can run independently.

[0047] 4. UIKit: A lightweight, modular, and definable front-end framework that enables rapid construction of web front-end interfaces. UIKit can build UI interfaces using rendering components (Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), and JavaScript (JS)).

[0048] 5. View Components: The UI in LiteOS is composed of views, viewgroups, and their derived classes. View is the base class for all UI components, and viewgroup is a container that holds views and their derived classes.

[0049] 6. Hardware interrupt signal (terminal equipment callback, TEcallback): An interrupt signal periodically generated by the interrupt management module in LiteOS.

[0050] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order of execution. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.

[0051] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0052] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.

[0053] With the development of terminal technology, smartwatches have become widely popular. Smartwatches offer services that meet some user needs, such as checking health status, two-way calling, countdown timers, playing music, and location navigation. Due to size limitations, the display screens of compact and lightweight smartwatches are relatively small, and in many implementations, a scrolling marquee is used to display text or images.

[0054] Meanwhile, the size limitations of smartwatches also lead to insufficient hardware performance. When rendering the marquee, the rendering refresh speed of smartwatches is slower than that of high-performance electronic devices such as mobile phones, tablets, and computers. When there are multiple marquees on the smartwatch UI, the rendering refresh time is too long, resulting in incomplete updates of the marquee text and a flickering visual effect.

[0055] The following is combined Figure 1 and Figure 2 The interface diagram illustrates its scenario.

[0056] For example, Figure 1 This diagram illustrates a possible implementation of a scenario with multiple scrolling LED displays. The terminal device is a smartwatch as an example. The smartwatch's display interface can include multiple scrolling LED display areas. For example... Figure 1 As shown in 'a', the smartwatch's display interface has four scrolling marquees. When the smartwatch's hardware performance is insufficient, refreshing the content of the four scrolling marquee display areas takes too long, and the content of one of the marquees may not display correctly. For example, if the user has noted multiple important dates in the countdown, such as... Figure 1 As shown in b, each note corresponds to a marquee display area. When an anomaly occurs, the text "How long until Saturday" in this interface flickers, thus reducing the user experience.

[0057] For example, Figure 2 This diagram illustrates one possible implementation of a marquee display scenario. When a smartwatch is running an application, the UI may display a multi-row / column marquee area. If the smartwatch's hardware performance is insufficient, refreshing the content of this multi-row / column marquee display area may take a long time, resulting in incomplete text display on the UI. For example... Figure 2 As shown, when the smartwatch is running the Kuaishou app and using the camera function, multiple lines of prompt text in the UI cannot be fully displayed, resulting in missing fonts and thus reducing the user experience.

[0058] It should be pointed out that, Figure 1 and Figure 2The illustrations use smartwatches as an example to illustrate application scenarios. These application scenario examples are also applicable to other smart electronic devices with smaller displays and / or smart electronic devices with larger displays where text flickering may occur in the marquee display area due to insufficient hardware performance. This application does not limit the appearance or display shape of smart electronic devices.

[0059] The above briefly explained the scenarios for displaying marquee lights in the UI of terminal devices. Below, we will combine this with... Figure 3 and Figure 4 This explains why the text in the marquee display area of ​​the UI interface flickers in the above scenario.

[0060] First, combine Figure 3 This section describes the possible implementation of the marquee display process. For example, the possible marquee display flow in a possible implementation is as follows: Figure 3 As shown, the number of marquee display areas M is relatively small, for example, M≤3.

[0061] S301. In response to the Nth hard interrupt signal, set the rendering start flag to the first value.

[0062] S302, Render the content of M marquee display areas.

[0063] S303, the content of the M marquee display areas has been rendered, and the rendering completion flag of the second rendering task has been set to the third value.

[0064] S304. Set the rendering completion flag for the first rendering task to the fourth value.

[0065] The rendering completion flag for the first rendering task is set to the fourth value, indicating that the first rendering task has been completed. The terminal device can then execute step S305.

[0066] S305. When the (N+1)th hard interrupt signal arrives, if the completion flag of the first rendering task is the fourth value, then the display task is executed.

[0067] When the number M is small, the terminal device can complete one rendering task and one display task within one hard interrupt signal cycle. For example, the terminal device can execute the Kth rendering task when the Nth hard interrupt signal arrives; when the N+1th hard interrupt signal arrives, the terminal device can execute the Kth display task, refreshing the Kth rendering result to the marquee display area. When the N+2th hard interrupt signal arrives, the terminal device can execute the K+1th rendering task; when the N+3th hard interrupt signal arrives, the terminal device can execute the K+1th display task, and so on. The terminal device can refresh the content of M marquee display areas by repeatedly executing rendering and display tasks.

[0068] When the number of M is small, the terminal device can complete the first rendering task and display the rendering result normally in the marquee display area. However, when the number of M is large, the terminal device needs to render the content of each marquee display area sequentially. When the terminal device's hardware performance is insufficient, the rendering time may be too long, causing the content of a certain marquee display area to be incompletely rendered, which may result in flickering of some content in the UI interface.

[0069] For example, the following is combined with Figure 4 This section describes a possible abnormal display process of the marquee light in a given implementation. For example, the display flow of the marquee light in a possible implementation is as follows: Figure 4 As shown, the number of marquee display areas M is relatively large, for example, M>3.

[0070] S401. In response to the Nth hard interrupt signal, set the rendering start flag to the first value.

[0071] S402, Render the content of M marquee display areas.

[0072] S403, the content of the M marquee display areas has been rendered, and the rendering completion flag of the second rendering task is set to the third value.

[0073] The completion flag of the second rendering task being set to the third value indicates that the second rendering task has been completed. In normal operation, after the completion flag of the second rendering task is set to the third value, the terminal device can set the completion flag of the first rendering task to the fourth value to indicate that the first rendering task has been completed. When the number of M is large, the execution time of step S402 by the terminal device may be too long, thus extending the completion time of the first rendering task. If a hard interrupt signal arrives after the terminal device completes step S403, the terminal device can execute step S404.

[0074] S404. When the (N+1)th hard interrupt signal arrives, if the rendering completion flag of the second rendering task is the third value, then the rendering start flag is set to the first value.

[0075] When the rendering completion flag of the first rendering task is at the fourth value and a hard interrupt signal arrives, the terminal device can execute the Kth display task, as described in step S305. When the rendering completion flag of the second rendering task is at the third value and a hard interrupt signal arrives, the terminal device can execute the (K+1)th rendering task, as described in step S404. The terminal device begins executing the (K+1)th first rendering task.

[0076] S405. Set the rendering completion flag for the first rendering task to the fourth value.

[0077] The rendering start flag is set to the first value, allowing the terminal device to execute the (K+1)th rendering task. The terminal device can also execute steps not performed in the first rendering task of the Kth time (S405). At this point, the first value of the rendering start flag of the (K+1)th time is invalidated by the fourth value of the rendering completion flag of the first rendering task of the Kth time, causing the terminal device to terminate the execution of the (K+1)th rendering task. The rendering result of the (K+1)th rendering task is incomplete, resulting in missing content displayed on the marquee display area by the terminal device. When an abnormal rendering result occurs during continuous refresh of the marquee display area, the content (fonts or images, etc.) in the marquee display area of ​​the UI interface flickers.

[0078] In view of this, this application provides a method for displaying a marquee effect. When the Nth hard interrupt signal arrives, the target flag of the first rendering task is set to a second value; after the content of M marquee display areas is rendered, the target flag of the first rendering task is updated to a fifth value; when the N+b (b>0)th hard interrupt signal arrives, if the target flag has not been updated to the fifth value, the first rendering task continues; if the target flag has been updated to the fifth value, the display task is executed. This method uses the target flag to indicate whether the first rendering task has been completed. When a hard interrupt signal arrives, the target flag is updated to the fifth value, and the terminal device can execute the display task; otherwise, the first rendering task continues. This reduces the chance of erroneous execution by the terminal device when a hard interrupt signal arrives, improves the integrity of the first rendering task, reduces the timing disorder of the first rendering task, and thus reduces the occurrence of content flickering in the marquee display area of ​​the UI interface, improving the user experience.

[0079] To better understand the embodiments of this application, the structure of the electronic device capable of executing the marquee display method of the embodiments of this application is described below:

[0080] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0081] like Figure 5As shown, the electronic device 100 may include a processor 110, internal memory 121, a universal serial bus (USB) interface, a charging management module 140, a power management module 141, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a sensor module 180, buttons 190, an indicator 192, a camera 193, and a display screen 194, etc. The sensor module 180 may include: a gyroscope sensor, a barometer, a magnetic sensor, an accelerometer, a proximity sensor 1, a temperature sensor, a touch sensor, and an ambient light sensor, etc.

[0082] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0083] The processor 110 may include one or more processing units. These processing units may be independent devices or integrated within one or more processors. The processor 110 may also include memory for storing instructions and data.

[0084] The charging management module 140 receives charging input from the charger. The charger can be a wireless charger or a wired charger. The power management module 141 connects the charging management module 140 to the processor 110.

[0085] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0086] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antennas in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0087] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation.

[0088] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.

[0089] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering.

[0090] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0091] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0092] Camera 193 is used to capture still images or videos. In some embodiments, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0093] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area.

[0094] Electronic device 100 can implement audio functions such as music playback and recording through audio module 170, speaker 170A, receiver 170B, and application processor.

[0095] Audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music or make hands-free calls through speaker 170A. Receiver 170B, also called a "handset," is used to convert audio electrical signals into sound signals. When electronic device 100 answers a phone call or voice message, it can listen to the voice by bringing receiver 170B close to the listener's ear.

[0096] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. The magnetic sensor 180D includes a Hall sensor.

[0097] The barometer 180C is used to measure air pressure. In some embodiments, the electronic device 100 can calculate altitude using the air pressure value measured by the barometer 180C to assist in positioning and navigation. In this embodiment, the barometer 180C is used to measure the air pressure conditions at which the electronic device 100 is located; for example, the barometer 180C can be used to detect whether the electronic device 100 is underwater.

[0098] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes). In this embodiment, accelerometer 180E is used to detect whether electronic device 100 is in motion.

[0099] The proximity sensor 180G can be used to detect the approach and distance between an object and the electronic device 100. The ambient light sensor 180L is used to sense the ambient light intensity. The temperature sensor 180J is used to detect the temperature. In this embodiment, the temperature sensor is used to detect the temperature of the environment in which the electronic device 100 is located.

[0100] The touch sensor 180K is also known as a "touch device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 together form a touch screen, also known as a "touch screen".

[0101] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, and also to indicate messages, missed calls, notifications, etc.

[0102] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture, etc. This application embodiment uses a layered architecture system as an example to illustrate the software structure of electronic device 100.

[0103] For example, taking electronic device 100 as a smartwatch, Figure 6 This is a schematic diagram of the software structure of a smartwatch provided in an embodiment of this application.

[0104] like Figure 6As shown, the layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the software architecture of a smartwatch can be divided into five layers, from top to bottom: application (APP) layer, framework layer, algorithm layer, hardware abstraction layer (HAL), and kernel layer.

[0105] This application layer can include a series of applications. For example, these applications may include: watch face applications, health applications, calling applications, and system applications.

[0106] This framework layer provides system support for applications in the application layer. For example, this framework layer may include modules such as UIKit, communication services, audio services, device management, and fitness and health.

[0107] The UIKit module provides a framework for building and managing the user interface of an application layer. It uses rendering components to render the user interface, such as animations, text, and images. For example, a UIKit module may include a graphical user interface (GUI) framework, a dial template module, a font module, a layout module, and a view module. In this embodiment, the GUI framework, font module, layout module, and view module can work together to render the user interface, thereby displaying the content of the marquee display area within the user interface.

[0108] This algorithm layer provides algorithmic support for the framework layer. For example, it may include audio algorithms, breathing algorithms, sleep algorithms, and pedestrian dead reckoning (PDR) algorithms. These algorithms support communication, audio, and sports and health service modules within the framework layer.

[0109] In the Hardware Abstraction Layer (HAL), all hardware-related operations required by the upper layers of the system need to call the relevant application programming interface (API) of the HAL. Each hardware device's software architecture layer specifies certain functionalities, which the HAL layer can use to implement.

[0110] This hardware abstraction layer may include interfaces for C++ libraries, storage interfaces, display interfaces, touch interfaces, Bluetooth interfaces, and global positioning system (GPS) interfaces.

[0111] The kernel layer can be considered the layer between hardware and software. The kernel refers to system software that provides functions such as a hardware abstraction layer, disk and file system control, and multitasking. The kernel is the core of an operating system and its most fundamental part. It manages system processes, memory, device drivers, file and network systems, and determines system performance and stability. It is part of the software that provides secure access to computer hardware for numerous applications; this access is limited, and the kernel determines when a program can operate on a particular part of the hardware and for how long.

[0112] This kernel layer can be a lightweight operating system kernel (LiteOS).

[0113] The scrolling marquee display process provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that "at...time" in the embodiments of this application can refer to the instant at which a certain situation occurs, or to a period of time after the occurrence of a certain situation. The embodiments of this application do not specifically limit this.

[0114] It should be noted that the terminal device can be a smartwatch or other smart electronic devices with a smaller display screen.

[0115] The application scenarios of possible implementations of the embodiments of this application have been illustrated above. The following will combine... Figure 7 The method for performing a marquee display provided in the embodiments of this application is described below.

[0116] For example, Figure 7 A flowchart illustrating a marquee display method according to an embodiment of this application is shown.

[0117] S701. In response to the Nth hard interrupt signal, the terminal device sets the rendering start flag to the first value.

[0118] The render start flag is used to indicate the start of a rendering task. The render start flag can be `renderstart g_flag` or other flag types. The first value of the render start flag can be 1, 0, or other values ​​or codes that indicate the start of rendering.

[0119] S702, The terminal device sets the target flag of the first rendering task to the second value; the first rendering task is used to call the rendering result of the second rendering task, and the second rendering task includes the rendering of the content of M marquee display areas, where M is an integer greater than 1.

[0120] In this embodiment, the first rendering task is a rendering task for interface display. For example, the first rendering task can be a lightweight GUI render task, where GUI stands for graphical user interface. The second rendering task is a system rendering task, which can render the GUI display interface or other interfaces. For example, the second rendering task can be a render task.

[0121] The terminal device can identify the start or completion of the first rendering task by setting the target flag bit to different values. The target flag bit can be a new flag or a flag bit named in other ways. For example, in this embodiment, the second value of the target flag bit can be used to identify the start of the first rendering task, and the fifth value of the target flag bit can be used to identify the completion of the first rendering task. The second value can be 1, 0, or other values ​​or codes that can identify the start of the first rendering task, and the fifth value can be 0, 1, or other values ​​or codes that can identify the completion of the first rendering task. It is understood that the first to fifth values ​​are names defined in this embodiment to clearly illustrate the rendering process of the marquee display method; other naming methods can also be used, and this application does not impose any restrictions.

[0122] In this embodiment of the application, the terminal device can periodically generate a hard interrupt signal. When the hard interrupt signal arrives, the terminal device can perform a rendering task or a display task.

[0123] In one possible implementation, the marquee display area of ​​the UI is refreshed in real time so that the content in that area is presented to the user in a scrolling manner. The UI may include M marquee display areas, where M is an integer greater than 1.

[0124] During a marquee display, the content of the marquee display area can be rendered and displayed upon the arrival of a hardware interrupt signal. For example, the terminal device can render the content of M marquee display areas through a second rendering task, and then use the rendering result of the second rendering task called by the first rendering task to further display the content based on the rendering result.

[0125] It is understood that steps S701-S702 can be two separate steps or combined into one step, and this application does not impose any restrictions on this.

[0126] S703, The terminal device renders the content of M marquee display areas.

[0127] S704. If the content of the M marquee display areas has been rendered, the terminal device will set the rendering completion flag of the second rendering task to the third value.

[0128] S705, The terminal device sets the rendering completion flag of the first rendering task to the fourth value.

[0129] S706, The terminal device updates the target flag to the fifth value.

[0130] In this embodiment of the application, the rendering completion flag of the second rendering task can be used to indicate that the second rendering task has been completed. The rendering completion flag can be renderfinish, renderend, g_flag, or other forms of flags. The third value of the rendering completion flag of the second rendering task can be 0, 1, or other values ​​or codes that can indicate that the second rendering task has been completed.

[0131] The rendering completion flag of the first rendering task can be used to indicate that the first rendering task has been completed. The rendering completion flag can be `renderend g_flag` or other forms of flags. The fourth value of the rendering completion flag of the first rendering task can be 0, 1, or other values ​​or codes that can indicate that the first rendering task has been completed.

[0132] For example, if the rendering completion flag of the first rendering task is the fourth value, the terminal device can determine that the first rendering task has been completed, and the terminal device can update the target flag of the first rendering task to the fifth value. If the rendering completion flag of the first rendering task is not the fourth value, the terminal device can determine that the first rendering task has not been completed, and the terminal device can keep the target flag of the first rendering task at the second value.

[0133] For example, when the second rendering task begins, the terminal device can render the content of the M marquee display areas sequentially. After rendering is complete, the terminal device can set the rendering completion flag of the second rendering task to a third value and set the rendering completion flag of the first rendering task to a fourth value.

[0134] When the rendering completion flag for the first rendering task is set to the fourth value, the terminal device determines that the first rendering task has been completed. The terminal device can then update the target flag for the first rendering task from the second value to the fifth value. It should be noted that the first to fifth values ​​are values ​​or codes used to distinguish different flags. In possible implementations, the first to fifth values ​​can be the same or different; this application does not impose any restrictions on this.

[0135] It is understood that steps S703-S706 can be multiple separate steps or can be combined into one step, and this application does not limit this.

[0136] S707. When the N+1th hard interrupt signal arrives, if the target flag is not updated to the fifth value, the terminal device continues to execute the first rendering task.

[0137] The terminal device periodically generates hardware interrupt signals. When the (N+1)th hardware interrupt signal arrives, the terminal device may have completed the first rendering task, or the first rendering task may not have completed due to the large number of scrolling lights and the long execution time. The terminal device can determine the execution status of the first rendering task based on whether the target flag bit of the first rendering task is updated from the second value to the fifth value. If the target flag bit has not been updated from the second value to the fifth value, the first rendering task is still in progress. The terminal device can continue executing the first rendering task that was not completed in the Kth iteration when the (N+1)th hardware interrupt signal arrives.

[0138] Once the first rendering task is completed, the terminal device can update the target flag to the fifth value.

[0139] S708. When the (N+2)th hard interrupt signal arrives, if the target flag is updated to the fifth value, execute the display task; the display task is used to display the content of the M marquee display areas according to the rendering results of the M marquee display areas.

[0140] The display task is used to display the rendering results of the first rendering task on the UI interface after the first rendering task has been completed. For example, the display task can be a liquid crystal display task (LCD task) or other types of display tasks.

[0141] When the (N+2)th hard interrupt signal arrives, the terminal device may have already completed the first rendering task, or the first rendering task may not have been completed due to the large number of scrolling lights and the long processing time. If the target flag is the fifth value, it indicates that the first rendering task has been completed, and the terminal device can execute the display task when the (N+2)th hard interrupt signal arrives. The terminal device displays the rendering result of the Kth time on the area corresponding to the M scrolling lights in the terminal device's UI interface.

[0142] The marquee display method provided in this application involves the terminal device setting the target flag of the first rendering task to a second value at the start of the first rendering task, and updating the target flag to a fifth value after the first rendering task is completed. When the target flag is at the fifth value, the terminal device executes the display task upon the arrival of a hard interrupt signal; when the target flag is at the second value, the terminal device continues to execute the first rendering task upon the arrival of a hard interrupt signal. This method reduces erroneous execution operations by the terminal device upon the arrival of a hard interrupt signal by setting the target flag, improves the integrity of the first rendering task, reduces the occurrence of timing errors in the first rendering task, thereby reducing the occurrence of screen flickering problems in the marquee display area of ​​the UI interface and improving the user experience.

[0143] The above provides an exemplary description of the marquee display method according to embodiments of this application. The following description, in conjunction with... Figure 8 The methods of the embodiments of this application will be described in detail.

[0144] S801, in response to the Nth hard interrupt signal, receives a transmission event.

[0145] Transmission events can trigger rendering events in the marquee display area of ​​the UI interface; for example, a transmission event can be a TEevent.

[0146] In one possible implementation, the user taps the application icon in the UI, and the terminal device responds to the touch, entering the UI interface including a marquee. The application layer of the terminal device transmits the rendering events of the marquee display area to the framework layer. When a hard interrupt signal arrives, the UIKit module of the framework layer processes the transmitted events, and the terminal device begins to execute the rendering task.

[0147] For example, when a user clicks the "Countdown" icon in the smartwatch's menu bar, the terminal device responds and enters the countdown program's UI, which may include multiple scrolling marquee display areas. The terminal device's application layer receives the rendering events for these scrolling marquee display areas. The terminal device can then transmit these events to the framework layer. When a hardware interrupt signal arrives, the UIKit module renders the transmitted event and displays the rendering result in the application layer's countdown marquee display area.

[0148] For example, the period of the hard interrupt signal can be set to 1 / 60s, that is, the time interval between the arrival time of the Kth hard interrupt signal and the arrival time of the K+1th hard interrupt signal is 1 / 60s. It is understood that the period of the hard interrupt signal can be set to different values ​​depending on the terminal device, and this application does not limit it.

[0149] S802, The terminal device sets the rendering start flag to the first value.

[0150] For example, after the UIKit module receives the transmission event, the terminal device can set the render start flag to the first value and begin executing the first rendering task. For example, the form of setting the render start flag to the first value can be renderstart g_flag1, or it can be another form.

[0151] S803, The terminal device sets the target flag of the first rendering task to the second value.

[0152] Understandably, after setting the rendering start flag to the first value, the terminal device can set the target flag of the first rendering task to the second value. For example, the target flag of the first rendering task can be set to the second value in the form of "new flag 1" or other forms. It should be noted that when executing the first rendering task, the terminal device can create a new flag as the target flag, such as "new flag", or it can set an existing flag in the first rendering task as the target flag; this application does not impose any restrictions on this.

[0153] S804, The terminal device renders the content of M marquee display areas.

[0154] After the target flag of the first rendering task is set to the second value, the terminal device can begin executing the second rendering task. For example, the first rendering task is a lightweight GUI rendering task (Lite GUI Render Task), and the second rendering task is a system rendering task (Render Task). When a GUI interface rendering task exists on the terminal device, the first rendering task can call the rendering result of the system rendering task, and the system rendering task can then complete the GUI interface rendering task. It can be understood that, in addition to the first rendering task being able to call the second rendering task, other tasks can also call the second rendering task, which is open-source.

[0155] The UI interface may include multiple marquee display areas. The terminal device can render each marquee display area sequentially until all M marquee display areas have been rendered. Alternatively, the terminal device can randomly select a single marquee display area to render until all M marquee display areas have been rendered.

[0156] Once the content of the S805 and M marquee display areas has been rendered, the terminal device will set the rendering completion flag of the second rendering task to the third value.

[0157] The rendering completion flag for the second rendering task is set to a third value to indicate that the second rendering task has been completed. For example, the third value of the rendering completion flag for the second rendering task can be in the form of renderfinish renderend g_flag 0, or it can be in other forms.

[0158] S806, The terminal device sets the rendering completion flag of the first rendering task to the fourth value.

[0159] The rendering completion flag for the first rendering task is set to the fourth value to indicate that the first rendering task has been completed. For example, the form of the rendering completion flag for the first rendering task being set to the fourth value can be renderend g_flag 0, or it can be another form.

[0160] S807, The terminal device updates the target flag of the first rendering task to the fifth value.

[0161] Before executing step S807, the target flag of the first rendering task is set to the second value. When the rendering completion flag of the first rendering task is set to the fourth value, the terminal device can determine that the first rendering task has been completed and update the target flag to invalidate the second value of the target flag. For example, the target flag of the first rendering task can be in the form of new flag 0, or other forms.

[0162] S808: When the N+2th hard interrupt signal arrives, if the target flag is updated to the fifth value, the terminal device executes the display task.

[0163] The target flag for the first rendering task is updated to the fifth value, and the terminal device can display the rendering results in M ​​marquee display areas. For example, the terminal device can execute an LCD display task to present the rendering results of the M marquee display areas to the UI interface.

[0164] Optionally, when the terminal device performs a display task, the kernel layer receives the ioctrl instruction from the frame layer to display the rendering result. The terminal device writes the rendering result of the first rendering task to the framebuffer. The terminal device then displays the rendering result within the border of the marquee display area based on the framebuffer.

[0165] It should be noted that step S809 may also be included between steps S804 and S806.

[0166] S809. When the N+1th hard interrupt signal arrives, if the target flag is not updated to the fifth value, the terminal device continues to execute the first rendering task.

[0167] For example, if a hardware interrupt signal arrives before the fifth value of the target flag bit in the first rendering task invalidates the second value of the target flag bit, the terminal device can continue executing the first rendering task. Once the target flag bit is updated to the fifth value, the terminal device can execute the display task.

[0168] It is understood that the above embodiment describes the flow of the Kth rendering and display task. The visualization of the M marquee display areas depends on the terminal device alternately executing multiple single rendering and display tasks. In this embodiment, steps S801-S809 can be executed cyclically. For example, after step S808 is completed, the terminal device can receive the next transmission event and start executing step S801.

[0169] Optionally, the terminal device can set a first flag bit to indicate whether it can execute a rendering task or a display task when a hard interrupt signal arrives. For example, the target flag bit for the first rendering task is updated to the fifth value, and the terminal device can set the first flag bit to the sixth value. After the display task is completed, the terminal device updates the first flag bit to the seventh value. For instance, when a hard interrupt signal arrives, the terminal device detects the first flag bit; if the first flag bit is at the sixth value, the terminal device can execute the display task; if the first flag bit is at the seventh value, the terminal device can execute the rendering task.

[0170] In the marquee display method provided in this application embodiment, steps S801-S809 are exemplary examples and may also include other situations.

[0171] The UI may include one or more scrolling marquees. When there are many scrolling marquees, the execution time of the first rendering task may exceed the sum of the time intervals of multiple hard interrupt signals. That is, the first rendering task can be completed before the (N+1)th hard interrupt signal, before the (N+2)th hard interrupt signal, or before the (N+a)th hard interrupt signal (where a is an integer greater than 2).

[0172] For example, when the (N+1)th hard interrupt signal arrives, in addition to the scenario shown in step S809, the marquee display method provided in this application embodiment may further include:

[0173] S810. If the target flag of the first rendering task is updated to the fifth value, the terminal device executes the display task.

[0174] When the (N+1)th hard interrupt signal arrives, the terminal device detects the target flag of the first rendering task. If the target flag is updated to the fifth value, the terminal device can execute step S810 to display the rendering result on the M marquee display areas.

[0175] If the target flag is not updated to the fifth value, the terminal device can execute step S809 to continue executing the first rendering task that has not yet been completed.

[0176] For example, when the (N+2)th hard interrupt signal arrives, in addition to the scenario shown in step S808, the marquee display method provided in this application embodiment may further include:

[0177] S811. If the target flag of the first rendering task is not updated to the fifth value, the terminal device continues to execute the first rendering task.

[0178] If, when the (N+2)th hard interrupt signal arrives, the terminal device detects that the target flag of the first rendering task is at the second value, the terminal device can continue to execute the unfinished first rendering task. The terminal device will then execute the display task when the next hard interrupt signal arrives, until the target flag of the first rendering task is updated to the fifth value.

[0179] The marquee display method provided in this application involves the terminal device setting the target flag of the first rendering task to a second value at the start of the first rendering task, and updating the target flag to a fifth value after the first rendering task is completed. When the target flag is at the fifth value and a hard interrupt signal arrives, the terminal device executes the display task; when the target flag is at the second value and a hard interrupt signal arrives, the terminal device continues to execute the first rendering task. This method, by setting the target flag of the first rendering task, reduces the possibility of erroneous execution by the terminal device when a hard interrupt signal arrives, thereby reducing the possibility of timing errors in the first rendering task and reducing flickering of the content in the marquee display area of ​​the UI interface.

[0180] Optional, see below Figure 9 The rendering process (i.e., step S804) for the content of the M marquee display areas in this application embodiment will be described. Before step S804, the following may be included:

[0181] S901, The terminal device obtains the rendering components of the target interface, which includes M marquee display areas.

[0182] The target interface can be the current UI of the terminal device, which includes M marquee display areas. For example... Figure 9 As shown in Figure b, interface A is the target interface, interface B is the border of the marquee display area, and interface C is the marquee display area. The target interface includes the border of the marquee display area, the marquee display area itself, and other display interfaces. It can be understood that when a terminal device launches an application with a marquee display, the marquee display area in the UI is dynamically displayed, while other areas can be statically displayed. At this time, the terminal device can render the dynamically displayed area to be updated multiple times according to the rendering component.

[0183] For example, the rendering component may include Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), and Javascript, and the terminal device may render the UI interface based on the rendering component.

[0184] S902, The terminal device parses the hierarchical relationship of the target interface based on the rendering component.

[0185] In a UI interface, view components and view containers have a hierarchical relationship, with different view components corresponding to the rendering and display of content in different display areas. After receiving a transmission event, the terminal device can parse the hierarchical relationship of the target interface in the transmission event to form a rendering tree. For example, the hierarchical relationship is as follows: Figure 9 As shown in diagrams a and b, view component D1 corresponds to the rendering and display of content on interface A, view components D8 and D9 correspond to the rendering and display of content on interface B, and view components D10 and D12 correspond to the rendering and display of content on interface C. The rendering tree can be a Class UIViewGroup.

[0186] S903. Obtain the top view based on the hierarchical relationship.

[0187] After parsing the hierarchical relationship of the target interface into a rendering tree, the terminal device can obtain and refresh the top view. For example: Figure 9 As shown in Figure a, view component D1 is the top view in the rendering tree. For example, the top view could be TopView.

[0188] S904. Traverse the hierarchy and obtain the root view based on the top view; the root view includes view components containing the contents of M marquee display areas.

[0189] Once the terminal device obtains the top view, it can trace back to the root view based on the top view and hierarchical relationships. For example, after obtaining view component D1, the terminal device obtains multiple view components D2-D7 of view component D1 according to the hierarchical relationship. Among them, D2 and D4 have parent nodes, and the terminal device can obtain view component D8 of view component D2 according to the hierarchical relationship. The terminal device then obtains view components D10 and D11 of view component D8 according to the hierarchical relationship, and D10 and D11 are the root views of the rendering tree. The terminal device can then trace back to the view component D10 corresponding to the marquee display area according to the hierarchical relationship of D1-D2-D8-D10.

[0190] The rendering tree can include multiple root views. When the display area corresponding to a root view is refreshed, the terminal device renders and displays that area according to the root view. For example, Figure 9As shown in Figure b, the UI interface includes two marquee display areas. The terminal device locates the view components D10 and D12 corresponding to the two marquee display areas based on the hierarchical relationships D1-D2-D8-D10 and D1-D4-D9-D12. The terminal device can detect the refresh status of view components D10 and D12. If D10 and D12 are refreshed, the terminal device can render and display the marquee display areas corresponding to D10 and D12.

[0191] In the marquee display method provided in this application embodiment, the terminal device can render the content of the marquee display area according to the hierarchical relationship in the above embodiments. For example, the rendering process of the marquee display area can be as follows.

[0192] S1001. Based on the hierarchical relationship, render the borders corresponding to the M marquee display areas.

[0193] For example, the marquee display area in the UI interface includes an outer border. The terminal device renders the border of the marquee display area sequentially. The marquee display area can be a DealRect, and the border can be a user label (UI label). The rendering order of the terminal device can be DealRect M,1, DealRect M,2, DealRect M,3…DealRect M,M. For example, when the terminal device renders DealRect M,1, it can also render the UI label corresponding to DealRect M,1.

[0194] Understandably, during non-first UI refreshes, the terminal device displays both dynamically displayed marquee content and other statically displayed content. During the first UI refresh (when the terminal device renders the entire target interface according to steps S901-S904), the terminal device displays the rendering result on the UI. To reduce the rendering workload, the terminal device can render the marquee display area during non-first refresh rendering tasks, while other static display areas are not re-rendered. That is, the terminal device can render the border and the content within the border during non-first UI rendering tasks, ignoring the rendering of other display areas.

[0195] S1002. Draw the content within the border based on the root view.

[0196] The root view is the rendering component that renders the content of the marquee display area. After obtaining the border, the terminal device can draw the content within the border based on the root view. For example, the terminal device can draw content within the border using the format `Draw Label:Draw TextOne Line` and `Draw Utils:Draw Letter`. The terminal device can add printing functionality to confirm whether `Draw Text One Line` has been executed completely.

[0197] Based on the result of the Kth rendering, the terminal device draws the content of the marquee display area in the (K+1)th rendering to achieve the effect of shifting the text or image within the frame to the left, right, or other directions. For example, using... Figure 1 Take the countdown UI as an example. In the Kth rendering task, the content of the frame is drawn as "Near National Day", in the K+1th rendering task, the content of the frame is drawn as "Near National Day", and in the K+2th rendering task, the content of the frame is drawn as "National Day is still to come". The UI can achieve the effect of scrolling "Near National Day" based on the above text drawing.

[0198] S1003, traverse and render the content of the borders of M marquee display areas.

[0199] The terminal device renders the borders corresponding to the marquee display areas sequentially according to the order of DealRect M,1 to DealRect M,M, and draws the content within the borders until all M marquee display areas have been rendered. The terminal device can then terminate the rendering process of the second rendering task.

[0200] The marquee display method provided in this application renders the border of the marquee display area through a hierarchical relationship and draws content in the border, so as to achieve the effect of the content of the marquee display area scrolling in the UI interface, thereby improving the user experience.

[0201] For example, Figure 10 This document illustrates the flowchart of a marquee display method according to an embodiment of this application. In this embodiment, the first rendering task is a Lite GUI Render Task, and the second rendering task is a Render Task. In possible implementations, the functions in steps S701-S708 may not be the functions or code shown in this embodiment. This embodiment exemplifies the marquee display method provided by this application and does not limit the specific form of the functions and code.

[0202] For example, Figure 10 Taking M=4 as an example, the code or function for the marquee display method is shown below:

[0203] TECallback g_flag 0 / / The hard interrupt signal is TECallback. The interrupt management module periodically generates hard interrupt signals. The flag bit of TECallback g_flag 0 is used to indicate the arrival of a hard interrupt signal.

[0204] Send TEevent to ACE / / The frame layer of the terminal device calls the transport event TEevent.

[0205] `renderstart g_flag 1` / / Rendering start flag. Setting `renderstart g_flag` to 1 allows the terminal device to perform rendering tasks.

[0206] New flag 1 / / The target flag for the first rendering task. When the New flag is set to 1, the terminal device can execute the first rendering task, the Lite GUI Render Task.

[0207] DealRect 4,1ace

[0208] DealRect 4,2zho

[0209] DealRect 4,3new

[0210] DealRect 4,4goo / / In this embodiment, M=4 is used as an example, and the number of DealRects in the marquee display area is 4. The terminal device executes the second rendering task and renders the content of the 4 marquee display areas in sequence.

[0211] `renderfinish renderend g_flag 0` / / When a Render Task is completed, the terminal device can set the rendering completion flag of the Render Task to 0. `renderfinish renderend g_flag 0` indicates that the Render Task has been completed.

[0212] `renderend g_flag 0` / / After the Lite GUI Render Task has finished executing, the terminal device can set the rendering completion flag of the Lite GUI Render Task to 0. `renderend g_flag 0` indicates that the Lite GUI Render Task has finished executing.

[0213] New flag 0 / / The terminal device can update the target flag New flag from 1 to 0. New flag 0 invalidates New flag 1.

[0214] TECallback g_flag 0 / / After the rendering task is completed, the terminal device can perform the display task when TECallback arrives.

[0215] send ioctrl 0

[0216] FB WRITE / / The terminal device can execute the LCD Task, displaying the rendering results of the Render Task on four marquee display areas.

[0217] When TECallback occurs, if the New flag is set to 1, the terminal device continues to execute the Lite GUI Render Task and Render Task; if the New flag is set to 0, the terminal device executes the LCD Task.

[0218] Understandably, the terminal device does not set the New flag, meaning it does not execute New flag 1 or New flag 0. If a TECallback occurs after the terminal device executes renderfinish and renderend g_flag 0, the terminal device can execute the following process:

[0219] renderfinish renderend g_flag 0 / / After the Kth Render Task is executed, renderfinish renderend g_flag is set to 0.

[0220] TECallback g_flag 0 / / TECallback is coming.

[0221] Send TEevent to ACE / / The framework layer of the terminal device calls TEevent for the K+1th time.

[0222] renderstart g_flag 1 / / The terminal device can start executing the K+1th rendering task, set renderstart g_flag to 1.

[0223] renderend g_flag 0

[0224] The terminal device continues executing the Kth Lite GUI Render Task, which is still incomplete, and sets `renderend g_flag` to 0. At this point, the `renderend g_flag` flag invalidates the `renderstart g_flag` flag, indicating that the (K+1)th rendering task has ended. The terminal device then stops executing the (K+1)th rendering task, resulting in an incomplete rendering result.

[0225] For example, Figure 11 The process and code for rendering the content of four marquee display areas on a terminal device are shown, such as... Figure 11 As shown.

[0226] The JS App Task is a framework-level task. When TECallback arrives, the terminal device can handle the TE event. Partial code is shown below:

[0227] LiteGuiRenderTaskRunOnce / / Lightweight GUI rendering task. LiteGuiRenderTaskRunOnce is used to launch rendering tasks from open-source libraries.

[0228] TaskExecute

[0229] RenderTask / / A rendering task used to execute UIKit's rendering tasks. A RenderTask can parse rendering components and render the root view.

[0230] The scrolling display area of ​​DealRect / / DealRect 4,1

[0231] RenderRect

[0232] RenderPart

[0233] RootviewDrawTop / / Render the top view based on the hierarchy

[0234] RootviewDraw / / Obtains the root view based on the hierarchy and the top view; the terminal device renders the root view.

[0235] UILabel:OnDraw

[0236] The border corresponding to the marquee display area of ​​UILabel:Draw / / DealRect 4,1.

[0237] DrawLabel:DrawTextOneLine

[0238] DrawUtils:DrawLetter / / Draws the content of the marquee display area within the border.

[0239] The terminal device can continue drawing the content of the marquee display area of ​​DealRect 4,2, DealRect 4,3 and DealRect 4,4 according to the order of DealRect-DrawUtils:DrawLetter.

[0240] RenderEnd g_renderingFlag FALSE / / Render Task execution completed

[0241] RenderEnd g_renderingFlag FALSE / / Lite GUI Render Task completed

[0242] When the next TECallback arrives, the terminal device can handle the LCD Task, as shown in the following code:

[0243] FbWrite() / / Writes the rendered result to the framebuffer.

[0244] Frame buffer show / / The terminal device displays the contents of the frame buffer in the marquee area of ​​the UI.

[0245] It should be noted that the code in the marquee display process provided in this embodiment may have calling relationships. For example, the Lite GUI Render Task can call the rendering result of the Render Task. Repeated calls to `g_renderingFlag setMC_FALSE` can cause erroneous execution of the TECallback. This situation may interrupt the normal execution of rendering tasks on the terminal device, causing rendering task timing to become disordered, resulting in incomplete display of the marquee display area. The probability of this situation occurring increases when there are many marquee display areas or when rendering time is long due to other reasons.

[0246] The marquee display method provided in this application uses "New flag 1" to indicate that the rendering task has not been completed, and "New flag 0" to indicate that the rendering task has been completed. During "New flag 1", the terminal device can continue to execute the rendering task until "New flag 0" is reached. When a TECallback occurs, if "New flag 0" is reached, the terminal device executes the display task. This reduces the probability of rendering task timing disorder caused by repeated calls to `g_renderingFlag set MC_FALSE`, improves the integrity of the rendering result, reduces flickering in the marquee display area, and enhances the user experience.

[0247] The above combination Figures 1-11 The methods provided in the embodiments of this application have been described. The apparatus for executing the above methods, provided in the embodiments of this application, is described below. Figure 12 As shown, Figure 12 This is a schematic diagram of the structure of a marquee display device provided in an embodiment of this application. The marquee display device can be a terminal device in the embodiment of this application, or a chip or chip system within the terminal device.

[0248] like Figure 12 As shown, the marquee display device 120 can be used in communication equipment, circuits, hardware components, or chips. The marquee display device includes a processor 1202 and a display screen 1204. The display screen 1204 supports the display steps performed by the marquee display device; the processor 1202 supports the information processing steps performed by the marquee display device. The display screen 1204 can also be referred to as a display unit; the processor 1202 can also be referred to as a processing unit.

[0249] Specifically, in the embodiment of this application, a marquee display device 120 is provided. In response to the Nth hard interrupt signal, the processor 1202 sets the rendering start flag to a first value and sets the target flag of the first rendering task to a second value. The first rendering task is used to call the rendering result of the second rendering task. The second rendering task includes the rendering of the contents of M marquee display areas, where M is an integer greater than 1.

[0250] Processor 1202 renders the content of M marquee display areas; wherein, if the content of the M marquee display areas has been rendered, processor 1202 sets the rendering completion flag of the second rendering task to the third value, sets the rendering completion flag of the first rendering task to the fourth value, and updates the target flag to the fifth value.

[0251] When the (N+1)th hard interrupt signal arrives, if the target flag is not updated to the fifth value, the processor 1202 continues to execute the first rendering task; when the (N+2)th hard interrupt signal arrives, if the target flag is updated to the fifth value, the processor 1202 executes the display task; the display task is used to display the content of the M marquee display areas on the display screen 1204 according to the rendering results of the M marquee display areas.

[0252] In one possible implementation, the processor 1202 renders the content of M marquee display areas, including: the processor 1202 sequentially renders the content of the M marquee display areas based on a second rendering task.

[0253] In one possible implementation, the first rendering task includes a lightweight GUI rendering task (Lite GUIRender Task); the second rendering task includes a system rendering task (Render Task).

[0254] In one possible implementation, before the processor 1202 renders the content of the M marquee display areas, the process further includes: the processor 1202 obtaining the rendering component of the target interface, the target interface including the M marquee display areas; the processor 1202 parsing the hierarchical relationship of the target interface based on the rendering component; the processor 1202 obtaining the top view according to the hierarchical relationship; the processor 1202 traversing the hierarchical relationship and obtaining the root view based on the top view; the root view including the view component of the content of the M marquee display areas.

[0255] In one possible implementation, the processor 1202 renders the content of M marquee display areas, and further includes: the processor 1202 renders the borders corresponding to the M marquee display areas according to the hierarchical relationship; the processor 1202 draws the content in the borders based on the root view; and the processor 1202 traverses and renders the content of the borders of the M marquee display areas.

[0256] In one possible implementation, when the (N+1)th hard interrupt signal arrives, the processor 1202 executes a display task if the target flag is updated to the fifth value.

[0257] In one possible implementation, when the (N+2)th hard interrupt signal arrives, the processor 1202 continues to execute the first rendering task if the target flag is not updated to the fifth value.

[0258] In one possible implementation, the processor 1202 performs a display task, including: the processor 1202 writes the content of the rendering result into a frame buffer according to the instruction to display the rendering result; and the display screen 1204 displays the rendering result in the border of the marquee display area based on the frame buffer.

[0259] In one possible implementation, the display task includes a liquid crystal display task (LCD Task); the instructions for displaying the rendering results include ioctrl; and the frame buffer includes Framebuffer.

[0260] In one possible embodiment, the marquee display device may further include an interface circuit 1203 and a memory 1201. The memory 1201, processor 1202, interface circuit 1203, and display screen 1204 are connected via wiring. The interface circuit 1203 supports the marquee display device in performing receiving or sending steps. The memory 1201 supports the marquee display device in performing storing steps. The interface circuit 1203 may also be referred to as a communication unit, and the memory 1201 may also be referred to as a storage unit.

[0261] The storage unit 1201 may include one or more memories, which may be devices in one or more devices or circuits used to store programs or data.

[0262] The storage unit 1201 can exist independently, or it can be connected to the processor 1202 of the scrolling light display device via a communication line. Alternatively, the storage unit 1201 can be integrated with the processor 1202.

[0263] The storage unit 1201 may store computer execution instructions of the method in the terminal device, so that the processor 1202 executes the method in the above embodiments.

[0264] Storage unit 1201 can be a register, cache, or random access memory (RAM), etc., and storage unit 1201 can be integrated with processor 1202. Storage unit 1201 can also be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and storage unit 1201 can be independent of processor 1202.

[0265] In possible implementations, the computer execution instructions in the embodiments of this application may also be referred to as application code, and the embodiments of this application do not specifically limit this.

[0266] Optionally, the interface circuit 1203 may further include a transmitter and / or a receiver. Optionally, the processor 1202 may include one or more GPUs or central processing units (CPUs), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0267] This application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted on a computer-readable medium. A computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.

[0268] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0269] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0270] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for displaying a marquee light, characterized in that, The method includes: In response to the Nth hard interrupt signal, the rendering start flag is set to the first value, and the target flag of the first rendering task is set to the second value; the first rendering task is used to call the rendering result of the second rendering task, the second rendering task includes rendering the content of M marquee display areas, where M is an integer greater than 1; Render the content of the M marquee display areas; wherein, if the content of the M marquee display areas has been rendered, the rendering completion flag of the second rendering task is set to the third value, the rendering completion flag of the first rendering task is set to the fourth value, and the target flag is updated to the fifth value. If the target flag is not updated to the fifth value when the (N+1)th hard interrupt signal arrives, the first rendering task continues to be executed. When the (N+2)th hard interrupt signal arrives, if the target flag is updated to the fifth value, a display task is executed; the display task is used to display the content of the M marquee display areas according to the rendering results of the M marquee display areas.

2. The method according to claim 1, characterized in that, The rendering of the content of the M marquee display areas includes: Based on the second rendering task, the contents of the M marquee display areas are rendered sequentially.

3. The method according to claim 1 or 2, characterized in that, The first rendering task includes a Lite GUI Render Task; the second rendering task includes a system rendering task.

4. The method according to claim 3, characterized in that, Before rendering the content of the M marquee display areas, the process also includes: Obtain the rendering components of the target interface, which includes M marquee display areas; The rendering component is used to parse the hierarchical relationship of the target interface; Obtain the top view based on the hierarchy; Traverse the hierarchical relationship and obtain the root view based on the top view; the root view includes view components containing the content of M marquee display areas.

5. The method according to claim 4, characterized in that, The rendering of the content of the M marquee display areas also includes: Based on the hierarchical relationship, render the borders corresponding to the M marquee display areas; Draw the content within the border based on the root view; Iterate through and render the content of the borders of the M marquee display areas.

6. The method according to any one of claims 1-2 and 4-5, characterized in that, The process of receiving the (N+1)th hard interrupt signal also includes: If the target flag is updated to the fifth value, the display task is executed.

7. The method according to any one of claims 1-2 and 4-5, characterized in that, When the (N+2)th hard interrupt signal arrives, it also includes: If the target flag is not updated to the fifth value, continue executing the first rendering task.

8. The method according to any one of claims 1-2 and 4-5, characterized in that, The execution of the display task includes: According to the instruction to display the rendering result, the content of the rendering result is written into the frame buffer; The rendering result is displayed within the border of the marquee display area based on the frame buffer.

9. The method according to claim 8, characterized in that, The display task includes a liquid crystal display task (LCDTask); the instruction for displaying the rendering result includes ioctrl; and the frame buffer includes Framebuffer.

10. An electronic device, characterized in that, include: A processor, a display screen, and a memory, the processor being configured to invoke a program in the memory to cause the electronic device to perform the method according to any one of claims 1-9; The display screen is used to perform the steps shown in the method according to any one of claims 1-9.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, cause a computer to perform the method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Rolling speed adjustment method for marquee and display device

    CN106211511A

  • Image display method and device, electronic equipment and storage medium

    CN111209422A