Content rendering method and device, electronic equipment, chip and storage medium

By judging the type of content update message in the smartwatch and rendering it only when the target message is rendered, the problem of excessive rendering frequency of video dials is solved, and the frame buffer utilization rate and system battery life are improved.

CN120371186APending Publication Date: 2025-07-25BEIJING X RING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411546644.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

When rendering the video dial of the smartwatch, the rendering events of animation and video are triggered asynchronously, resulting in excessive rendering frequency, increasing system power consumption and affecting battery life.

Method used

By determining whether the content update message is a target message, only obtain the content to be rendered for rendering when it is a target message, ensure that the rendering frequency is consistent with the higher of the animation timer and video frame rate, and avoid asynchronous event overlay.

Benefits of technology

It improves the utilization rate of frame buffer, reduces system power consumption, and improves the battery life of smart watches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371186A_ABST
    Figure CN120371186A_ABST
Patent Text Reader

Abstract

The invention provides a content rendering method and device, electronic equipment, a chip and a storage medium, and relates to the field of display control. The method comprises the steps of determining whether a content updating message is a target message or not under the condition that the content updating message is received; under the condition that the content updating message is a target message, obtaining current to-be-rendered target content; and rendering and displaying the target content. Therefore, the event capable of triggering the rendering thread is specific, the problem of rendering frequency superposition caused by a plurality of asynchronous events is avoided, the utilization rate of frame buffer is improved, and the power consumption of the system is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of display control, and in particular, to a content rendering method, apparatus, electronic device chip, and storage medium. Background Art

[0002] With the popularization of smart wearable devices, people's demand for smart watches has risen from the functional level to a higher aesthetic level, with more diverse personalized needs. Driven by these increasingly rich demands, the dial design of smart watches has become increasingly complex, evolving from the initial basic dials to video dials that can play videos.

[0003] However, when rendering such video dials, since the rendering events of animations and videos are triggered asynchronously, it is easy to result in an excessively high rendering frequency, increasing system power consumption and affecting the battery life of smart watches. Therefore, a rendering method with lower power consumption is needed to improve the user experience. Summary of the Invention

[0004] The present disclosure aims to solve at least one of the technical problems in the related art to some extent.

[0005] A first aspect embodiment of the present disclosure provides a content rendering method, including:

[0006] When receiving a content update message, determining whether the content update message is a target message;

[0007] When the content update message is a target message, obtaining the target content to be rendered currently;

[0008] Rendering and displaying the target content.

[0009] A second aspect embodiment of the present disclosure provides a content rendering apparatus, including:

[0010] A determination module, configured to determine whether the content update message is a target message when receiving the content update message;

[0011] An obtaining module, configured to obtain the target content to be rendered currently when the content update message is a target message;

[0012] A display module, configured to render and display the target content.

[0013] A third aspect embodiment of the present disclosure provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the content rendering method as provided in the first aspect embodiment of the present disclosure is implemented.

[0014] In a fourth aspect embodiment of the present disclosure, a chip is proposed. The chip includes a processing circuit and an interface circuit. Among them, the interface circuit is used to obtain an instruction and send the instruction to the processing circuit, and the processing circuit is used to execute the instruction to implement the content rendering method proposed in the first aspect embodiment of the present disclosure.

[0015] In a fifth aspect embodiment of the present disclosure, a computer-readable storage medium is proposed, storing a computer program. When the computer program is executed by a processor, the content rendering method proposed in the first aspect embodiment of the present disclosure is implemented.

[0016] The content rendering method, device, electronic device, chip and storage medium provided by the present disclosure have the following beneficial effects:

[0017] In the embodiments of the present disclosure, by determining whether each received content update message is a message of a target type, and in the case of being a target message, then obtaining the content to be rendered for rendering and display, it makes the event triggering the rendering thread specific, avoids the problem of the rendering frequency superposition caused by multiple asynchronous events, improves the utilization rate of the frame buffer, and reduces the system power consumption.

[0018] The additional aspects and advantages of the present disclosure will be partly given in the following description, partly will become obvious from the following description, or will be understood through the practice of the present disclosure. Description of the Drawings

[0019] The above-mentioned and / or additional aspects and advantages of the present disclosure will become obvious and easy to understand from the following description of the embodiments in conjunction with the drawings, where:

[0020] Figure 1 It is a rendering schematic diagram of a video dial provided by the present disclosure;

[0021] Figure 2 It is a flow schematic diagram of a content rendering method provided by an embodiment of the present disclosure;

[0022] Figure 3 It is a flow schematic diagram of a content rendering method provided by another embodiment of the present disclosure;

[0023] Figure 4 It is a flow schematic diagram of a video dial stage provided by an embodiment of the present disclosure;

[0024] Figure 5 It is a flow schematic diagram of a content rendering method provided by another embodiment of the present disclosure

[0025] Figure 6 It is a flow schematic diagram of a content rendering method provided by another embodiment of the present disclosure

[0026] Figure 7 A flowchart of a content rendering method provided by another embodiment of the present disclosure

[0027] Figure 8 A schematic diagram of the structure of a content rendering device provided in an embodiment of the present disclosure;

[0028] Figure 9 A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present disclosure is shown;

[0029] Figure 10 It is a schematic diagram of the structure of a chip proposed in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0031] The content rendering method, device, electronic device, chip, and storage medium of the embodiments of the present disclosure are described below with reference to the accompanying drawings.

[0032] Currently, in smart watches that already support video dials, the display form of their dials can generally be abstracted into two layers: video layer and graphic layer. Figure 1 As shown, Figure 1 is a rendering of the video dial. Figure 1 In the video layer ( Figure 1 The circle in the figure is the video display area), and the video layer plays a built-in or user-defined imported video. The animation object is located in the graphics layer, which generally displays calendar / time information, and the displayed time information may have animation effects such as analog watch hands. In the existing more mature graphics rendering framework, the animation is implemented by sending animation update messages to the rendering thread through a periodic timer to trigger rendering periodically. The refresh of the video screen is triggered by the video frame rate control module in the media thread sending video update messages to the rendering thread to trigger rendering.

[0033] Therefore, in a video dial, there are two events that trigger rendering: the periodic timer of the animation component and the frame rate control module in the media framework. These two events are two unrelated asynchronous events in the existing graphics rendering framework, which will cause the actual rendering frequency to be higher than either the animation timer or the video frame rate, resulting in unnecessary redundant rendering and display, increasing the system power consumption during the application of the video dial and reducing the battery life of the device. At the same time, the redundant rendering will reduce the utilization rate of the frame buffer (FB), resulting in the normal rendering requirements not getting an idle FB at certain moments, thus causing frame dropping.

[0034] For example, when both the video frame rate and the frequency of the animation timer are less than or equal to 1 / 2 of the TE (Tearing Effect output) signal frequency, and the video frame rate and the frequency of the animation timer are the same but with opposite phases, the video frame rate control module and the animation timer will alternately trigger rendering and display in sequence, directly resulting in the rendering and display frequency being higher than the expected frequency, causing redundant power consumption overhead in the rendering and display links.

[0035] Or, when at least one of the video frame rate or the frequency of the animation timer is greater than 1 / 2 of the TE frequency, in a system with only 2-frame FB, the decrease in FB utilization rate caused by redundant rendering may cause frame dropping, bringing an unsmooth feeling to the user experience.

[0036] Therefore, the present disclosure proposes a content rendering method, using one of the animation update message or the video update message as the condition for triggering rendering, such that the rendering frequency is the higher of the video frame rate and the frequency of the animation timer, which can solve the problem that both animation update and video update trigger rendering, resulting in a low utilization rate of the frame buffer.

[0037] The embodiments of the present disclosure are illustrated by taking this content rendering method as being configured in a content rendering device. It should be noted that this content rendering device can be applied to electronic devices such as smart watches and smart wearable devices, and can be applicable to other scenarios that require simultaneous rendering of video objects and animation objects.

[0038] Figure 2 It is a schematic flowchart of a content rendering method provided by an embodiment of the present disclosure.

[0039] As Figure 2 shown, the content rendering method may include the following steps:

[0040] Step 201, when receiving a content update message, determine whether the content update message is a target message.

[0041] Among them, the target message refers to a specific type of message that can trigger the rendering thread, which can be one of a video update message or an animation update message.

[0042] In the present disclosure, the video object and the animation object periodically send update messages according to the video frame rate and the frequency of the animation timer. To maximize the utilization rate of the idle FB and ensure that both the video and the animation can be updated in a timely manner, the higher value of the video frame rate and the frequency of the animation timer can be selected as the rendering trigger frequency, and each time the rendering is triggered, the video frames and the animation graphics that can be rendered simultaneously can be obtained. Therefore, the type of message with a higher update frequency in the video update message and the animation update message can be determined as the target message.

[0043] In the embodiment of the present disclosure, since there are three types of content update messages that can trigger rendering in the video dashboard, including the video update message sent by the video frame rate control module, the animation update message sent by the animation cycle timer, and the message related to the input event. And the content rendering system of the present disclosure will trigger the rendering operation only when receiving the target information in the video dashboard. Therefore, after receiving the content update message, the type of the content update message can be first determined, whether it is a video update message or an animation update message, and then the type of the content update message is matched with the type of the target message, so as to determine whether the content update message is the target message. When the type of the content update message is consistent with the type of the target message, it can be determined that the content update message is the target message.

[0044] Among them, the input event refers to a rendering event triggered by operating the touch screen or the physical button. Since the input event is not a periodic event, the message related to the input event will not be used as the target information in the present disclosure.

[0045] Among them, the video frame rate control module is a module that controls the sending time of each video frame according to the frame rate of the video in the media thread and sends the video frames to the display queue in turn for rendering.

[0046] Among them, the animation timer refers to a periodic timer bound to a graphic object when creating an animation object, which is used to operate the graphic object periodically (such as moving, rotating, scaling, etc.) to achieve the animation effect.

[0047] Step 202, when the content update message is the target message, obtain the target content to be rendered currently.

[0048] In an embodiment of the present disclosure, after determining that the content update message is a target message, the rendering thread can be triggered, and then the content that needs to be updated on the device currently can be obtained for rendering, that is, the target content to be rendered currently. The target content may include the video frame and the animation graphic to be updated currently, or may only include the animation graphic to be updated currently.

[0049] For example, when the target message is an animation update message, it can be checked whether there is a video frame to be displayed currently. If there is a video frame to be displayed, both the video frame and the animation update content can be used as the target content to synchronously update the video data. Or, when there is no video frame to be displayed, the animation graphic to be updated currently can be determined as the target content to be rendered currently.

[0050] Or, when the target message is a video update message, since the update of the animation graphic is in progress all the time, the animation graphic should be rendered synchronously during rendering. Then, the video frame to be rendered in the video update message and the animation graphic determined at the current moment can be determined as the target content to be rendered currently.

[0051] Step 203: Render and display the target content.

[0052] In an embodiment of the present disclosure, an idle frame buffer FB can be obtained (if there is no idle FB currently, it can wait until there is an idle FB), the target content to be rendered currently is rendered, and then the FB after rendering is sent to the display queue to be sent. The display thread monitors the display queue to be sent. When the display queue to be sent contains the FB to be displayed and the TE signal is received, the image data after rendering the target content is sent to the screen for display.

[0053] It should be noted that when the target content includes a video frame and an animation graphic, it can be rendered onto the FB under the unified control of the graphics rendering framework through a graphics processing unit (GPU), and then sent to the screen by the display thread.

[0054] In an embodiment of the present disclosure, when a content update message is received, first it is determined whether the content update message is a target message, and then when the content update message is a target message, the target content to be rendered currently is obtained, and the target content is rendered and displayed. Thus, by judging whether each received content update message is a message of the target type, and when it is a target message, then the content to be rendered is obtained for rendering and display, the event triggering the rendering thread is specific, avoiding the problem that the rendering frequency is superimposed due to multiple asynchronous events, improving the utilization rate of the frame buffer, and reducing the system power consumption.

[0055] Figure 3The flowchart of a content rendering method provided by an embodiment of the present disclosure is shown as Figure 3 follows. The content rendering method may include the following steps:

[0056] Step 301: Obtain the frame rate of the currently to-be-displayed video and the frequency of the animation timer.

[0057] The frame rate of the currently to-be-displayed video refers to the playback frame rate of the video and can be obtained from the attribute information of the to-be-displayed video file.

[0058] The frequency of the animation timer refers to the frequency of animation refreshing and can be the reciprocal of the time required for one cycle of the animation loop. The frequency of the animation timer has been determined during the design of the video dial. After determining the to-be-displayed animation, the corresponding frequency of the animation timer can be directly obtained.

[0059] It should be noted that when the to-be-displayed video and animation remain unchanged, the determined target message is fixed. In the case of video update, since the frame rate of the updated video may be different from that of the previous video, the target message needs to be re-determined. Therefore, the frame rate of the currently to-be-displayed video and the frequency of the animation timer can be obtained to re-judge whether the target information is a video update message or an animation update message. This can ensure that the messages triggering the rendering are all high-frequency events, further improving the stability of content rendering and reducing system power consumption.

[0060] Step 302: When the frame rate of the to-be-displayed video is greater than or equal to the frequency of the animation timer, determine that the target message is a video update message.

[0061] In the embodiment of the present disclosure, when the frame rate of the to-be-displayed video is greater than or equal to the frequency of the animation timer, it indicates that using the update frequency of the video as the rendering frequency of the video dial can also ensure the timely update of the animation. Therefore, the target message can be determined as a video update message.

[0062] It should be noted that after determining that the target message is a video update message, the animation timer can be disabled to avoid the animation timer sending invalid animation update messages and improve resource utilization.

[0063] Step 303: When the frame rate of the to-be-displayed video is less than the frequency of the animation timer, determine that the target message is an animation update message.

[0064] In the embodiment of the present disclosure, when the frame rate of the to-be-displayed video is less than the frequency of the animation timer, it indicates that the update frequency of the video is less than the update frequency of the animation. The update frequency of the animation can be used as the rendering frequency of the video dial, that is, determine that the target message is an animation update message.

[0065] It should be noted that after determining that the target message is an animation update message, there is no need to prohibit the video frame rate control module in the media thread from sending video update messages. The video frame rate control module still sends video frames to the display queue in sequence according to the video frame rate. Then, when updating the animation, it can be checked whether there are video frames to be rendered in the queue, which can ensure the timely update of the video frames.

[0066] It should be noted that when the frame rate of the video is the same as the frequency of the animation timer, either the video update message or the animation update message can be used as the target message.

[0067] In the embodiments of the present disclosure, the frame rate of the currently to-be-displayed video and the frequency of the animation timer are obtained. When the frame rate of the to-be-displayed video is greater than the frame rate of the animation timer, the target message is determined to be the video update message. Or, when the frame rate of the to-be-displayed video is less than the frame rate of the animation timer, the target message is determined to be the animation update message. Thus, the actual rendering and display frequency is determined as the higher frequency of the animation timer frequency and the video frame rate, which can avoid the problem of the superposition of the frequencies of two asynchronous rendering trigger events, eliminate redundant rendering and display, and reduce the system power consumption.

[0068] It should be noted that the determination of the target message is in the initialization stage of the video dial. Because once the video object or animation object in the video dial is changed, the target message needs to be re-determined. The following is combined with Figure 4 to illustrate, Figure 4 is a schematic flowchart of the initialization stage of the video dial.

[0069] In Figure 4 , the first stage is the initialization stage of the video dial, and the second stage is the stage of receiving update messages and obtaining the content to be rendered for rendering and display, that is, the stage described in the first embodiment of the present disclosure.

[0070] From Figure 4 it can be seen that in the first stage, the animation object and the video object can be initialized first, and the frame rate information of the video in the current video dial and the period of the animation timer can be obtained. Then, the video frame rate and the animation refresh rate are compared. When the video frame rate is greater than the animation refresh rate, the working mode (MODE) of the video dial is the video mode, that is, the target message in the above embodiment is the video update message. Then, the animation timer can be disabled to avoid the rendering triggered by the animation update message.

[0071] Or, when the video frame rate is less than or equal to the animation refresh rate, the working mode (MODE) of the video dial is the animation mode, that is, the target message in the above embodiment is the animation update message. Then, the animation timer can be used to trigger rendering every time the animation update time arrives.

[0072] After that, the video playback can be started to initiate the rendering thread of the video dial.

[0073] Figure 5 The flowchart of a content rendering method provided by an embodiment of the present disclosure is shown as Figure 5 shown, and the content rendering method may include the following steps:

[0074] Step 501: When receiving a content update message, determine whether the content update message is a target message.

[0075] For the detailed description of the above step 501, reference can be made to other embodiments of the present disclosure, which will not be elaborated here.

[0076] Step 502: When the content update message is a target message and the target message is a video update message, obtain a video frame from the video queue to be displayed.

[0077] In an embodiment of the present disclosure, the media thread can decode the video to be displayed and control the frame rate. When the decoded video frame reaches the display time, the video frame rate control module in the media thread can add the video frame to the video frame queue to be displayed, and then send a video update message to the rendering thread. Then the rendering thread can obtain the video frame from the video queue to be displayed as the target content to be rendered.

[0078] Step 503: Determine the animated graphics to be displayed based on the current moment.

[0079] It can be understood that no matter whether the change of the animated graphics is translation, rotation, scaling, etc., the change of the animated graphics is periodic and should satisfy a function rule. Then the current moment can be substituted into the function rule to determine the animated graphics to be displayed at the current moment.

[0080] Step 504: Determine the video frame and the animated graphics as the target content.

[0081] It can be understood that every time the video frame is updated, the animated graphics change compared with the graphics displayed at the previous moment. Therefore, at this time, it is necessary to determine the animated graphics that should be displayed at the current moment, and then determine both the animated graphics and the video frame in the video queue to be displayed as the target content to be rendered.

[0082] Step 505: Render and display the target content.

[0083] For the detailed description of the above step 505, reference can be made to other embodiments of the present disclosure, which will not be elaborated here.

[0084] In this embodiment, when the content update message is the target message and the target message is a video update message, first obtain a video frame from the video queue to be displayed, and determine the animated graphic to be displayed based on the current moment, and then determine the video frame and the animated graphic together as the target content. This can ensure that when the video update triggers the rendering thread, the animation can be updated synchronously, improving the utilization rate of the frame buffer and reducing the risk of frame loss.

[0085] Figure 6 It is a schematic flowchart of a content rendering method provided by an embodiment of the present disclosure. As Figure 4 shown, the content rendering method may include the following steps:

[0086] Step 601, when receiving a content update message, determine whether the content update message is the target message.

[0087] For the detailed description of the above step 601, reference can be made to other embodiments of the present disclosure, which will not be elaborated here.

[0088] Step 602, when the content update message is the target message and the target message is an animation update message, determine the animated graphic to be displayed based on the current moment.

[0089] It can be understood that regardless of whether the change of the animated graphic is translation, rotation, scaling, etc., the change of the animated graphic is periodic and should satisfy a function rule. Then the current moment can be substituted into the function rule to determine the animated graphic to be displayed at the current moment.

[0090] In an embodiment of the present disclosure, when the content update message is the target message and the target message is an animation update message, it can be determined that the animated graphic on the screen needs to be updated and rendered, and then the animated graphic to be displayed at the current moment can be determined as the content to be rendered.

[0091] Step 603, when the video queue to be displayed does not contain a video frame, determine the animated graphic as the target content.

[0092] In an embodiment of the present disclosure, when the target message is an animation update message, the currently to-be-displayed video frame can be obtained from the video queue to be displayed and used together with the animated graphic as the target content for rendering to ensure the timely update of the video object in the video dial.

[0093] It can be understood that when the target message is an animation update message, the video frame rate is less than the frequency of the animation timer at this time, and the video update is slower than the animation update. Then when receiving the animation update message, the video frame does not necessarily need to be updated, and compared with the previous rendering, the video queue to be displayed does not necessarily contain a video frame.

[0094] Therefore, when the video queue to be displayed does not contain video frames, it is only necessary to determine the animation graphics at the current moment as the target content and perform rendering and updating.

[0095] It should be noted that when the video queue to be displayed contains video frames, the animation graphics and video frames can be determined as the target content. Then, after determining the target content, clear the video queue to be displayed to ensure that the video queue does not contain video frames that have already been rendered, and avoid repeated processing.

[0096] Step 604, perform rendering and display of the target content.

[0097] For the detailed description of the above step 604, reference can be made to other embodiments of the present disclosure, which will not be elaborated here.

[0098] In this embodiment, when the content update message is the target message and the target message is the video update message, first determine the animation graphics to be displayed based on the current moment, and then when the video queue to be displayed does not contain video frames, determine the animation graphics as the target content. Thus, it can be ensured that when the animation timer triggers the rendering thread, the video frames can be synchronously updated, improving the utilization rate of the frame buffer and reducing the risk of frame loss.

[0099] Figure 7 It is a schematic flowchart of a content rendering method provided by an embodiment of the present disclosure. As Figure 7 shown, the content rendering method may include the following steps:

[0100] Step 701, when receiving a content update message, determine whether the content update message is the target message.

[0101] Step 702, when the content update message is the target message, obtain the target content to be rendered currently.

[0102] For the detailed description of the above steps 701 and 702, reference can be made to other embodiments of the present disclosure, which will not be elaborated here.

[0103] Step 703, when the first frame buffer queue contains at least one first frame buffer, obtain a first frame buffer from the first frame buffer queue.

[0104] Wherein, the first frame buffer refers to an idle frame buffer (Framebuffer, FB).

[0105] In an embodiment of the present disclosure, when there is at least one first frame buffer in the first frame buffer queue, it can be determined that there is sufficient resource space to perform rendering processing on the target content to be rendered currently. Then, a first frame buffer can be obtained from the first frame buffer queue for storing the data after rendering the target content.

[0106] It can be understood that when there is no first frame buffer in the first frame buffer queue, it can continuously wait until there is an idle FB.

[0107] Step 704: Render the target content into the first frame buffer to obtain a second frame buffer.

[0108] Among them, the second frame buffer refers to the data that has been rendered but not yet sent for display.

[0109] In an embodiment of the present disclosure, after obtaining a first frame buffer from the first frame buffer queue, the target content can be rendered and stored in the first frame buffer to obtain a second frame buffer.

[0110] Step 705: Add the second frame buffer to the second frame buffer queue.

[0111] Among them, the second frame buffer queue is the frame buffer queue to be sent for display.

[0112] In an embodiment of the present disclosure, the second frame buffer after rendering can be sent to the second frame buffer queue. Then, the display thread monitors the second frame buffer queue. When there is a second frame buffer in the second frame buffer queue and a TE signal is received, the data in the second frame buffer can be sent to the screen for display, and the frame buffer is released to the idle state.

[0113] That is to say, the process of rendering and sending the picture for display is to first take an idle frame from the idle frame queue, and then put the rendered frame into the second queue to be displayed and wait for display.

[0114] In this embodiment, when there is at least one first frame buffer in the first frame buffer queue, first obtain a first frame buffer from the first frame buffer queue, then render the target content into the first frame buffer to obtain a second frame buffer. Then add the second frame buffer to the second frame buffer queue. Thus, by obtaining an idle frame buffer to complete the rendering and sending of the target content, the rendering efficiency can be improved, and the independence and stability of the rendering operation can be ensured.

[0115] To implement the above embodiment, the present disclosure also proposes a content rendering device.

[0116] Figure 8 It is a schematic structural diagram of the content rendering device provided by the embodiment of the present disclosure.

[0117] As shown Figure 8 the content rendering device 800 may include

[0118] a determination module 801, configured to determine whether a content update message is a target message when receiving the content update message;

[0119] an acquisition module 802, configured to acquire target content to be currently rendered when the content update message is a target message;

[0120] a display module 803, configured to render and display the target content.

[0121] Optionally, the determination module 801 may further be configured to:

[0122] acquire the frame rate of the video to be currently displayed and the frequency of the animation timer;

[0123] determine that the target message is a video update message when the frame rate of the video to be displayed is greater than or equal to the frequency of the animation timer;

[0124] Optionally, the determination module 801 may further be configured to:

[0125] determine that the target message is an animation update message when the frame rate of the video to be displayed is less than the frequency of the animation timer.

[0126] Optionally, the determination module 801 may specifically be configured to:

[0127] acquire the frame rate of the video to be currently displayed and the frequency of the animation timer in the case of video update.

[0128] Optionally, the acquisition module 802 may specifically be configured to:

[0129] acquire video frames from the video queue to be displayed when the target message is a video update message;

[0130] determine the animation graphics to be displayed based on the current moment;

[0131] determine the video frames and the animation graphics as the target content.

[0132] Optionally, the acquisition module 802 may specifically be configured to:

[0133] determine the animation graphics to be displayed based on the current moment when the target message is an animation update message;

[0134] determine the animation graphics as the target content when the video queue to be displayed does not include video frames.

[0135] Optionally, the display module 803 may specifically be configured to:

[0136] When there is at least one first frame buffer in the first frame buffer queue, obtain a first frame buffer from the first frame buffer queue;

[0137] Render the target content into a first frame buffer to obtain a second frame buffer;

[0138] Add the second frame buffer to the second frame buffer queue.

[0139] For the functions and specific implementation principles of the above-mentioned modules in the embodiments of the present disclosure, reference may be made to the above-mentioned method embodiments, and details are not described herein again.

[0140] The content rendering device in the embodiments of the present disclosure determines whether each received content update message is a message of a target type. When it is a target message, the content to be rendered is obtained for rendering and display, so that the event triggering the rendering thread is specific, avoiding the problem of the rendering frequency superposition caused by multiple asynchronous events, improving the utilization rate of the frame buffer, and reducing the system power consumption. To implement the above embodiments, the present disclosure also proposes an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the content rendering method proposed in the foregoing embodiments of the present disclosure.

[0141] Figure 9 A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present disclosure is shown. Figure 9 The illustrated electronic device 12 is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

[0142] As Figure 9 shown, the electronic device 12 is presented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0143] Bus 18 represents one or more of several types of bus architectures, including a memory bus or memory controller, a peripheral bus, an Accelerated Graphics Port, a processor bus, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0144] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including both volatile and nonvolatile media, removable and non-removable media.

[0145] Memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / nonvolatile computer system storage media. By way of example only, storage system 34 can be used for reading and writing on non-removable, nonvolatile magnetic media ( Figure 9 not shown, typically called a "hard disk drive"). Although Figure 9 not shown in the figure, a disk drive for reading and writing on a removable nonvolatile disk (such as a "floppy disk") and an optical disk drive for reading and writing on a removable nonvolatile optical disk (such as a Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc Read Only Memory (DVD-ROM), or other optical media) can be provided. In these cases, each drive can be connected to bus 18 through one or more data media interfaces. Memory 28 can include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0146] A program / utilities 40 having a set (at least one) of program modules 42 can be stored, for example, in a memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules 42 generally execute the functions and / or methods in the embodiments described in the present disclosure.

[0147] The electronic device 12 can also communicate with one or more external devices 14 (such as a keyboard, a pointing device, a display 24, etc.), can also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or can communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through an input / output (I / O) interface 22. Moreover, the electronic device 12 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. As shown in the figure, the network adapter 20 communicates with other modules of the electronic device 12 through a bus 18. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0148] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the foregoing embodiments.

[0149] The technical solution of the present disclosure makes the event that triggers the rendering thread specific, avoids the problem of the rendering frequency superposition caused by multiple asynchronous events, improves the utilization rate of the frame buffer, and reduces the system power consumption.

[0150] To implement the above embodiments, the present disclosure also proposes a chip, which includes a processing circuit and an interface circuit; wherein, the interface circuit is used to obtain instructions and send the instructions to the processing circuit, and the processing circuit is used to execute the instructions to implement the content rendering method as proposed in the foregoing embodiments of the present disclosure.

[0151] Figure 10 It is a schematic structural diagram of the chip proposed in the embodiments of the present disclosure. Reference can be made to Figure 10 the schematic structural diagram of the chip 1000 shown, but not limited thereto.

[0152] The chip 1000 includes a processing circuit 1001, and the processing circuit 1001 is configured to execute any of the above methods.

[0153] In some embodiments, the chip 1000 further includes one or more interface circuits 1002. Optionally, the interface circuit 1002 is connected to a memory 1003. The interface circuit 1002 can be used to receive signals from the memory 1003 or other devices, and the interface circuit 1002 can be used to send signals to the memory 1003 or other devices. For example, the interface circuit 1002 can read the instructions stored in the memory 1003 and send the instructions to the processing circuit 1001.

[0154] In some embodiments, the interface circuit 1002 executes at least one of the communication steps such as sending and / or receiving in the above method, and the processing circuit 1001 executes other steps.

[0155] In some embodiments, terms such as interface circuit, interface, transceiver pin, transceiver, etc. can be used interchangeably.

[0156] In some embodiments, the chip 1000 further includes one or more memories 1003 for storing instructions. Optionally, all or part of the memory 1003 can be outside the chip 1000.

[0157] To implement the above embodiments, the present disclosure also proposes a computer-readable storage medium storing a computer program, which when executed by a processor, implements the content rendering method as proposed in the foregoing embodiments of the present disclosure.

[0158] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0159] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present disclosure, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0160] Any process or method description represented in the flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logical function or process. The scope of the preferred embodiments of the present disclosure includes additional implementations, where functions may be executed in a substantially simultaneous manner or in a reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present disclosure pertain.

[0161] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered a sequenced list of executable instructions for implementing a logical function, and can be specifically implemented in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable medium on which the program can be printed, as the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or other appropriate processing as necessary, and then stored in a computer memory.

[0162] It should be understood that various parts of the present disclosure can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following technologies well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0163] Those of ordinary skill in the art can understand that all or part of the steps carried out in implementing the above-mentioned embodiment methods can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0164] In addition, in each of the various embodiments of the present disclosure, the functional units can be integrated into one processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. When the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0165] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disc, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.

Claims

1. A content rendering method, characterized in that, including: When receiving a content update message, determining whether the content update message is a target message; When the content update message is a target message, obtaining the target content to be currently rendered; Rendering and displaying the target content.

2. The method according to claim 1, characterized in that Before determining whether the content update message is a target message, it further includes: Obtaining the frame rate of the video to be currently displayed and the frequency of the animation timer; When the frame rate of the video to be displayed is greater than or equal to the frequency of the animation timer, determining that the target message is a video update message.

3. The method according to claim 2, wherein After obtaining the frame rate of the video to be currently displayed and the frequency of the animation timer, it further includes: When the frame rate of the video to be displayed is less than the frequency of the animation timer, determining that the target message is an animation update message.

4. The method according to claim 2, wherein The obtaining the frame rate of the video to be currently displayed and the frequency of the animation timer includes: When there is a video update, obtaining the frame rate of the video to be currently displayed and the frequency of the animation timer.

5. The method according to any one of claims 1-4, characterized in that, The obtaining the target content to be currently rendered includes: When the target message is a video update message, obtaining video frames from the video queue to be displayed; Determining the animation graphics to be displayed based on the current time; Determining the video frames and the animation graphics as the target content.

6. The method according to any one of claims 1-4, characterized in that The obtaining the target content to be currently rendered includes: When the target message is an animation update message, determining the animation graphics to be displayed based on the current time; When the video queue to be displayed does not contain video frames, determining the animation graphics as the target content.

7. The method according to any one of claims 1-4, characterized in that, The rendering and displaying the target content includes: When the first frame buffer queue contains at least one first frame buffer, obtaining a first frame buffer from the first frame buffer queue; Rendering the target content into the first frame buffer to obtain a second frame buffer; Adding the second frame buffer to the second frame buffer queue.

8. A content rendering device, characterized in that, including: A determining module, configured to determine whether the content update message is a target message when receiving a content update message; An obtaining module, configured to obtain the target content to be currently rendered when the content update message is a target message; A display module, configured to render and display the target content.

9. An electronic device, characterized in that, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the content rendering method according to any one of claims 1-7.

10. A chip, characterized in that, The chip includes a processing circuit and an interface circuit; wherein, the interface circuit is configured to obtain an instruction and send the instruction to the processing circuit, and the processing circuit is configured to execute the instruction to implement the content rendering method according to any one of claims 1-7.

11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the content rendering method according to any one of claims 1-7.