Display method and device and electronic equipment

By stopping refreshing parallel closing resources in the distributed decoder and creating and obtaining video streams containing keyframes, the problem of time-consuming switching of display scenes is solved, and the picture continuity and user experience are improved.

CN120281956APending Publication Date: 2025-07-08XIAN NOVASTAR TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510580228.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The distributed decoder takes too long to switch display scenes, resulting in poor user experience.

Method used

When a switching operation is received, the refresh of the first display scene is stopped, the resource is closed in parallel, the layer of the second display scene is created, and the video stream containing the keyframe is obtained, and the second display data is replaced and refreshed.

Benefits of technology

The screen continuity of the display device is achieved, the screen black phenomenon is avoided, the switching time is shortened, and the user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281956A_ABST
    Figure CN120281956A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of display, in particular to a display method and device and electronic equipment. The method comprises the following steps: receiving a switching operation, stopping refreshing first display data corresponding to a first display scene, and closing resources occupied by the first display scene; the switching operation is used for indicating to switch the first display scene to a second display scene, and the first display scene is different from the second display scene; creating at least one layer in the second display scene, and obtaining a video stream corresponding to the at least one layer; wherein the video stream comprises a key frame; determining that the key frame corresponding to the at least one image layer is pulled; replacing the first display data with second display data corresponding to the video stream, and refreshing and displaying the second display data; wherein the second display data comprises a key frame.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of display technologies, and particularly to a display method, apparatus, and electronic device. Background Art

[0002] A distributed decoder can receive video streams transmitted from multiple encoders and display the video streams on a display connected thereto. Different video streams are played in different display areas of the display (one area corresponds to one video layer). When a user wants to switch the display scene of the display, the decoder needs to first turn off each video layer and then obtain a new video stream, which takes a large amount of time for the entire process.

[0003] Therefore, how to reduce the switching time consumption of the distributed decoder when switching the display scene has become an urgent problem to be solved. Summary of the Invention

[0004] To solve the above technical problems, the present disclosure provides a display method, apparatus, and electronic device.

[0005] In a first aspect, the present disclosure provides a display method, including: receiving a switching operation, stopping the refresh of first display data corresponding to a first display scene, and closing the resources occupied by the first display scene in parallel; the switching operation is used to indicate switching the first display scene to a second display scene, where the first display scene is different from the second display scene; creating at least one layer in the second display scene, and obtaining video streams corresponding to the at least one layer; where the video stream includes key frames; determining that key frames corresponding to the at least one layer are pulled; replacing the first display data with second display data corresponding to the video stream, and refreshing and displaying the second display data; where the second display data includes key frames.

[0006] In a second aspect, the present disclosure provides a display apparatus, including: a processing module, configured to determine that the transceiver module receives a switching operation, stop the refresh of first display data corresponding to a first display scene, and close the resources occupied by the first display scene in parallel; the switching operation is used to indicate switching the first display scene to a second display scene, where the first display scene is different from the second display scene;

[0007] The processing module is further configured to create at least one layer in the second display scene, and obtain video streams corresponding to the at least one layer; where the video stream includes key frames; the processing module is further configured to determine that key frames corresponding to the at least one layer are pulled; the processing module is further configured to replace the first display data with second display data corresponding to the video stream, and refresh and display the second display data; where the second display data includes key frames.

[0008] In a third aspect, the present invention provides an electronic device, comprising: a memory and a processor, the memory being configured to store a computer program; the processor being configured to, when executing the computer program, cause the electronic device to implement the display method according to any one of the first aspect.

[0009] In a fourth aspect, the present invention provides a computer-readable storage medium, comprising: a computer program stored on the computer-readable storage medium, the computer program being executed by a controller to implement the display method according to any one of the first aspect.

[0010] In a fifth aspect, the present invention provides a computer program product, which, when running on a computer, causes the computer to execute the display method according to any one of the first aspect.

[0011] It should be noted that the above computer instructions may be stored in whole or in part on a first computer-readable storage medium. Among them, the first computer-readable storage medium may be packaged together with the controller of the display device or separately packaged from the controller of the display device. The present disclosure does not limit this. The descriptions of the second aspect, the third aspect, the fourth aspect, and the fifth aspect in the present disclosure may refer to the detailed description of the first aspect; and the beneficial effects of the descriptions of the second aspect, the third aspect, the fourth aspect, and the fifth aspect may refer to the analysis of the beneficial effects of the first aspect, which will not be elaborated here.

[0012] In the present disclosure, the name of the above display device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to those of the present disclosure and fall within the scope of the claims of the present disclosure and equivalent technologies.

[0013] These aspects or other aspects of the present disclosure will be more clearly understood in the following description.

[0014] The technical solution provided by the present disclosure has the following advantages compared with the prior art:

[0015] The display method provided by the present disclosure, when a switching operation is received, stops refreshing the first display data corresponding to the first display scene. Since the last frame of the first display data corresponding to the first display scene has been cached, the display device can still obtain the last cached frame of the first display data of the first display scene. Furthermore, the display device can continue to display this first display data, avoiding the phenomenon of a black screen on the screen of the display device. At the same time, resources occupied by the first display scene are closed in parallel. Since resources occupied by each layer are not closed one by one, the processing time can be shortened. After that, at least one layer in the second display scene is created, and a video stream corresponding to at least one layer is obtained. Since the video stream contains key frames, after the video stream corresponding to at least one layer in the second display scene is pulled, the first display data is replaced with the second display data corresponding to the video stream. Since the first display data in the frame buffer is replaced with the second display data corresponding to the video stream, and the second display data contains key frames, the display device can directly display the second display data, saving the time for the display device to wait for key frames. After that, the second display data is refreshed and displayed, thus realizing the continuity of the displayed picture on the display device, ensuring the user experience, and solving the problem of how to reduce the switching time when the distributed decoder switches display scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.

[0017] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or in the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0018] Figure 1 It is a schematic flowchart of a display method provided by an embodiment of the present disclosure;

[0019] Figure 2 It is a schematic diagram of an application scenario of a display method provided by an embodiment of the present disclosure;

[0020] Figure 3 It is a schematic flowchart of another display method provided by an embodiment of the present disclosure;

[0021] Figure 4 It is a schematic flowchart of another display method provided by an embodiment of the present disclosure;

[0022] Figure 5 It is a schematic flowchart of another display method provided by an embodiment of the present disclosure;

[0023] Figure 6 Schematic flowchart of yet another display method provided by an embodiment of the present disclosure;

[0024] Figure 7 Schematic flowchart of a display device provided by an embodiment of the present disclosure;

[0025] Figure 8 Schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Detailed implementation manners

[0026] In order to more clearly understand the above objects, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.

[0027] Many specific details are set forth in the following description in order to fully understand the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all the embodiments.

[0028] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0029] The I-frame in the embodiment of the present disclosure refers to an Intra-frame, that is, a key frame, which contains complete image information and can be decoded and displayed without referring to other frames.

[0030] The B-frame in the embodiment of the present disclosure refers to a Bidirectional-frame, that is, a bidirectional prediction frame, which can be encoded by referring to either the previous I-frame or P-frame, or the subsequent I-frame or P-frame.

[0031] The P-frame in the embodiment of the present disclosure refers to a Predictive-frame, that is, a prediction frame, which records the difference information between the current frame and the reference frame, that is, the residual data after motion compensation.

[0032] In the prior art, when the distributed decoder creates all the layers of a new display scene, the distributed decoder needs to pull the corresponding video stream through the encoder of each layer, and can only send it to the layer cache for display when the I-frame in the pulled video stream is obtained. However, the key frames (I-frames) in the video stream are sent only at intervals, and the decoder has to wait for a long time to obtain the key frames. Therefore, when the distributed decoder performs a display scene switch, it takes a lot of time. During this process, the display window will go black, bringing a poor display experience to the user. To solve the above problems, the display method provided by the embodiments of the present disclosure, when receiving a switch operation, stops the refresh of the first display data corresponding to the first display scene, and closes the resources occupied by the first display scene in parallel; the switch operation is used to indicate switching the first display scene to the second display scene, and the first display scene is different from the second display scene; creates at least one layer in the second display scene, and obtains the video stream corresponding to at least one layer; wherein, the video stream includes key frames; determines that the key frames corresponding to at least one layer are pulled; replaces the first display data with the second display data corresponding to the video stream, and refreshes and displays the second display data; wherein, the second display data includes key frames. In this way, the continuity of the displayed picture of the display device can be realized, and the user experience can be guaranteed. The specific implementation process is as follows:

[0033] Embodiment 1

[0034] Figure 1 FIG. shows a schematic flowchart of the display method. The execution subject of this example can be a distributed decoder, such as Figure 1 shown, and the method includes:

[0035] S11. Receive a switch operation, stop the refresh of the first display data corresponding to the first display scene, and close the resources occupied by the first display scene in parallel. Wherein, the switch operation is used to indicate switching the first display scene to the second display scene, and the first display scene is different from the second display scene.

[0036] In some examples, the display system to which the display method provided by the embodiments of the present disclosure is applied, such as Figure 2 shown, includes: at least one decoding node 1, an electronic device 2 (which can also be referred to as a display device, for example, a display) connected to the decoding node 1, a switch 3, at least one encoding node 4, and a user device 5 (which can also be referred to as an output source device, for example, a computer). One decoding node corresponds to one distributed decoder, and one encoding node corresponds to one encoder. Among them, the decoding node 1, the electronic device 2, the switch 3, the encoding node 4, and the user device 5 are in the same local area network.

[0037] When a user needs to play required multimedia data on the electronic device 2, the user shares the required multimedia data from the user device 5 to the electronic device 2 through the switch 3. Meanwhile, the user can control the electronic device 2 to switch the display scene through the user device 5, such as the user logging in to the control page of the distributed decoder on the user device 5. After that, the user can select the display scene that the electronic device 2 needs to display on the control page, such as any one of display scene 1, display scene 2, display scene 3, and display scene 4. At this time, when the decoding node 1 (such as decoding node A) connected to the electronic device 2 receives the switching operation instruction for the display scene, it stops refreshing the first display data in the frame buffer and simultaneously closes the resources occupied by each layer included in the first display scene (such as display scene 1). After that, the decoding node A creates each layer included in the second display scene (such as display scene 2) corresponding to the switching operation. After the decoding node A creates each layer included in the second display scene, it pulls the video stream corresponding to each layer from the encoding node 4 through the switch 3. After the decoding node A pulls the video stream corresponding to each layer, it replaces the first display data with the second display data corresponding to the video stream and controls the frame buffer to continue refreshing the second display data. In some examples, the first display scene is different from the second display scene.

[0038] In some examples, one layer corresponds to one encoding node 4.

[0039] In some examples, when receiving the switching operation instruction for the display scene, in order to prevent the screen of the display from going black because the video stream has not been obtained for a long time, by stopping refreshing the first display data in the frame buffer, it is ensured that the display data of the last frame image is always stored in the frame buffer. In this way, the electronic device 2 can always display the display data of the last frame image.

[0040] In some examples, when the decoder closes the resources occupied by each layer included in the first display scene, it can close all the layers included in the first display scene in parallel through the Software Development Kit (SDK) interface of the decoding chip, and release the resources occupied by each layer in the first display scene; where the resources include the Central Processing Unit (CPU), Graphics Processing Unit (GPU), memory, audio and video transmission hardware interfaces, etc., and closing in parallel can achieve the effect of releasing the layer resources of the first display scene at the fastest speed.

[0041] S12. Create at least one layer in the second display scene and obtain the video stream corresponding to the at least one layer; where the video stream includes key frames.

[0042] In some examples, the second display scene is the display scene that the switching operation needs to switch to, that is, the display scene selected by the switching operation.

[0043] In some examples, the decoder creates each layer included in the second display scene corresponding to the switching operation, including: the decoder creates all the layers included in the second display scene, and at the same time the decoder applies for corresponding resources, where the resources include the CPU, GPU, memory, audio-video transmission hardware interfaces, etc., and parallel creation can achieve the effect of creating new layer resources at the fastest speed.

[0044] S13. Determine that key frames corresponding to at least one layer are pulled.

[0045] In some examples, when the decoder fails to pull the key frames of all layers, it continues to pull the key frames from the encoder corresponding to the layers for which the key frames have not been pulled until the video stream corresponding to each layer containing the key frames is pulled, and then replaces the first display data with the second display data corresponding to the video stream, and controls the frame buffer to continue to refresh the second display data.

[0046] S14. Replace the first display data with the second display data corresponding to the video stream, and refresh and display the second display data; where the second display data includes key frames.

[0047] In some examples, after all the layers of the second display scene are successfully created, a first request message for obtaining a video stream and a second request message for obtaining a key frame (such as an I-frame) are sent to the encoder through the network; after receiving the request, the encoder transmits the encoded video stream to the decoder; after receiving the video stream, the decoder decodes it and caches the decoded image data in the frame buffer. After all the layers of the second display scene are cached in the frame buffer, the decoder unfreezes the screen image, that is, replaces the first display data with the second display data corresponding to the video stream. Since the first display data in the frame buffer is replaced with the second display data corresponding to the video stream, the electronic device 2 can obtain the second display data from the frame buffer, and thus the displayed image of the electronic device 2 can be switched from the image corresponding to the first display data to the image corresponding to the second display data, avoiding the situation of a black screen. At the same time, the decoder controls the frame buffer to continue to refresh the second display data, so that the continuity of the displayed image of the electronic device 2 can be achieved, ensuring the user experience.

[0048] As can be seen from the above, the display method provided by the embodiment of the present disclosure stops refreshing the first display data corresponding to the first display scene when receiving a switching operation. Since the first display data of the last frame corresponding to the first display scene has been cached, the display device can still obtain the first display data of the last frame cached by the first display scene, and then the display device can continue to display the first display data, avoiding the black screen phenomenon of the display device. At the same time, the resources occupied by the first display scene are closed in parallel. Since the resources occupied by each layer are not closed one by one, the processing time can be shortened; then, at least one layer in the second display scene is created, and the video stream corresponding to at least one layer is obtained; since the video stream contains key frames, after pulling the video stream corresponding to each layer, the first display data is replaced with the second display data corresponding to the video stream. Since the first display data in the frame buffer is replaced with the second display data corresponding to the video stream, and the second display data contains key frames, the display device can directly display the second display data, saving the time for the display device to wait for the key frames. Afterwards, the second display data is refreshed and displayed, so that the continuity of the picture displayed by the display device can be achieved, ensuring the user experience.

[0049] In some possible implementation examples, combined with Figure 1 ,like Figure 3 As shown, the above S12 can be specifically implemented through the following S120 and S121.

[0050] S120, obtaining configuration information of at least one layer in the second display scene; wherein the configuration information at least includes starting point position information, width, height, identification code of the coding node, and stacking order of the layers.

[0051] S121. Based on the configuration information, create at least one layer in the second display scene, and obtain a video stream corresponding to the at least one layer.

[0052] As can be seen from the above, the display method provided by the embodiment of the present disclosure stops refreshing the first display data corresponding to the first display scene when receiving a switching operation. Since the first display data of the last frame corresponding to the first display scene has been cached, the display device can still obtain the first display data of the last frame cached by the first display scene, and then the display device can continue to display the first display data, avoiding the phenomenon of a black screen on the screen of the display device. At the same time, the resources occupied by the first display scene are closed in parallel. Since the resources occupied by each layer are not closed one by one, the processing time can be shortened; then, the configuration information of at least one layer in the second display scene is obtained; based on the configuration information, at least one layer in the second display scene is created, and the video stream corresponding to the at least one layer is obtained; since the video stream contains key frames, after pulling the video stream corresponding to each layer, the first display data is replaced with the second display data corresponding to the video stream. Since the first display data in the frame buffer is replaced with the second display data corresponding to the video stream, and the second display data contains key frames, the display device can directly display the second display data, saving the time for the display device to wait for the key frames. Afterwards, the second display data is refreshed and displayed, so that the continuity of the picture displayed by the display device can be achieved, ensuring the user experience.

[0053] In some possible implementation examples, combined with Figure 1 ,like Figure 4 As shown, the above S13 can be specifically implemented through the following S130 and S131.

[0054] S130: Create at least one layer in the second display scene, determine that creation of at least one layer in the second display scene is complete, and send acquisition information for acquiring key frames to an encoding node corresponding to each layer.

[0055] In some examples, when the decoder creates the layer of the second display scene, it sends an I frame request message to the encoder through a target protocol (eg, Transmission Control Protocol (TCP)).

[0056] In some examples, a key frame may be an I frame.

[0057] S131. Receive a video stream containing key frames sent by an encoding node.

[0058] In some examples, when the decoder obtains an I-frame from the video stream, it can decode and display it independently. When it receives a B-frame or a P-frame, it cannot decode and display it independently. I-frames are transmitted in the video stream at fixed time intervals. Users can adjust the I-frame transmission interval by configuring the Group of Pictures (GOP) interval. If the I-frame interval is set too small, it will result in a relatively large video stream bandwidth, increasing network pressure and causing packet loss. If the I-frame interval is set too large, it will cause the distributed decoder of the decoder to wait a relatively long time for the I-frame when pulling the video stream for the first time, resulting in a slow display of the first-frame image. Therefore, for the display method provided by the embodiments of the present invention, after each layer included in the second display scene is created, acquisition information for obtaining key frames is sent to the encoder corresponding to each layer, so that the I-frame can be obtained at the fastest speed, without increasing the pressure on the video stream network bandwidth, and it can also solve the problem that the I-frame is missed due to slow switching of the switch or the I-frame is lost due to network packet loss. When pulling the stream, allowing the encoder to actively push the I-frame can accelerate the display speed of the layer images of the distributed decoder of the decoder and ensure the user experience.

[0059] As can be seen from the above, for the display method provided by the embodiments of the present disclosure, when a switching operation is received, the refresh of the first display data corresponding to the first display scene is stopped. Since the last frame of the first display data corresponding to the first display scene has been cached, the display device can still obtain the last frame of the first display data cached in the first display scene. Furthermore, the display device can continue to display this first display data, avoiding the phenomenon of a black screen on the screen of the display device. At the same time, the resources occupied by the first display scene are closed in parallel. Since the resources occupied by each layer are not closed one by one, the processing time can be shortened. After that, at least one layer in the second display scene is created. After determining that at least one layer in the second display scene is created, acquisition information for obtaining key frames is sent to the encoding node corresponding to each layer; a video stream containing key frames sent by the encoding node is received; since the video stream contains key frames, after the video stream corresponding to each layer is pulled, the first display data is replaced with the second display data corresponding to the video stream. Since the first display data in the frame buffer is replaced with the second display data corresponding to the video stream, and the second display data contains key frames, the display device can directly display the second display data, saving the time for the display device to wait for the key frame. After that, the second display data is refreshed and displayed, so that the continuity of the displayed picture of the display device can be realized and the user experience can be ensured.

[0060] In some feasible examples, in combination with Figure 4 , as Figure 5 shown, the above S1300 can be specifically implemented by the following S1300 and S1301.

[0061] S1300. Create at least one layer in the second display scene, determine that the creation of at least one layer in the second display scene is completed, and obtain the historical moment when the video stream containing key frames was last obtained.

[0062] S1301. When the difference between the current moment and the historical moment is greater than the time threshold, send acquisition information for obtaining key frames to the encoder corresponding to each layer.

[0063] In some examples, after creating each layer included in the second display scene, send acquisition information for obtaining key frames to the encoder corresponding to each layer. At this time, when the encoder receives the acquisition information for obtaining key frames, it actively encodes and pushes an I-frame to the decoder.

[0064] To avoid the decoder frequently obtaining I-frames from the encoder, in the display method provided by the embodiments of the present disclosure, the decoder calculates the difference between the current moment and the historical moment when the acquisition information for obtaining key frames was last sent to the encoder corresponding to each layer, and then determines whether to send the acquisition information for obtaining key frames to the encoder based on the size relationship between the difference and the time threshold (such as 100 ms). For example, when the difference between the current moment and the historical moment is greater than the time threshold, the decoder sends the acquisition information for obtaining key frames to the encoder corresponding to each layer; when the difference between the current moment and the historical moment is less than or equal to the time threshold, the decoder stops sending the acquisition information for obtaining key frames to the encoder corresponding to each layer. In this way, it is possible to avoid the problem that the encoder receives multiple I-frame requests within a short period of time, and then the encoder pushes multiple I-frames, resulting in an instantaneous increase in the video stream network bandwidth.

[0065] It should be noted that the above example is described by taking the decoder as an example, which calculates the difference between the current moment and the historical moment when the acquisition information for obtaining key frames was last sent to the encoder corresponding to each layer, and then determines whether to send the acquisition information for obtaining key frames to the encoder based on the size relationship between the difference and the time threshold.

[0066] In other examples, the encoder calculates the difference between the current moment and the historical moment when the acquisition information for obtaining key frames sent by the decoder was last received, and then determines whether to send the video stream containing key frames to the decoder based on the size relationship between the difference and the time threshold. For example, when the encoder determines that the difference between the current moment and the historical moment is greater than the time threshold, it sends the video stream containing key frames to the decoder; or when the encoder determines that the difference between the current moment and the historical moment is less than or equal to the time threshold, it does not send the video stream containing key frames to the decoder.

[0067] In some implementable examples, the key frames are determined by an encoding node based on preset conditions, and the preset conditions include: within a preset duration after sending a video stream containing key frames, if one or more acquisition messages are received, the current key frame is determined based on the previously sent key frame and the preset duration.

[0068] Exemplarily, assume that the currently displayed video stream contains 5 key frames, namely key frame 1, key frame 2, key frame 3, key frame 4, and key frame 5.

[0069] After the decoder 1 creates each layer included in the second display scene, it sends acquisition messages for obtaining key frames to the encoder corresponding to each layer. For example, this key frame is key frame 1. At this time, after receiving this acquisition message, the encoder sends a video stream containing this key frame 1 to the decoder 1.

[0070] After that, in order to avoid sending video streams containing key frames multiple times in a short period, which may cause the encoder to occupy a large amount of network resources, the display method provided by the embodiments of the present disclosure is: within a preset duration (such as 100 ms) after sending this key frame 1, if the decoder 1 continuously sends one or more acquisition messages, at this time, the encoder no longer processes the acquisition messages sent by this decoder 1. Instead, after accumulating the preset duration (such as 100 ms) after sending this key frame 1, in the order of 5 key frames, it continues to send a video stream containing key frame 2 to this decoder 1, and so on, until all key frames are sent.

[0071] In some other examples, if the video frame corresponding to the accumulated preset duration (such as 100 ms) after sending this key frame 1 is key frame 3, then key frame 2 is skipped and key frame 3 is directly sent. The specific sending method is subject to actual use, and the present application does not limit this.

[0072] In this way, it is possible to avoid the encoder occupying a large amount of network resources, resulting in video stuttering.

[0073] As can be seen from the above, the display method provided by the embodiment of the present disclosure stops refreshing the first display data corresponding to the first display scene when receiving a switching operation. Since the first display data of the last frame corresponding to the first display scene has been cached, the display device can still obtain the first display data of the last frame cached in the first display scene, and then the display device can continue to display the first display data, thereby avoiding the phenomenon of a black screen on the display device. At the same time, the resources occupied by the first display scene are closed in parallel. Since the resources occupied by each layer are not closed one by one, the processing time can be shortened; thereafter, at least one layer in the second display scene is created, and it is determined that the creation of at least one layer in the second display scene is completed, and the historical moment when the video stream containing the key frame was last obtained is obtained. When the difference between the current moment and the historical moment is greater than the time threshold, the acquisition information for acquiring the key frame is sent to the encoder corresponding to each layer; the video stream containing the key frame sent by the encoding node is received; since the video stream contains the key frame, after pulling the video stream corresponding to each layer, the first display data is replaced with the second display data corresponding to the video stream. Since the first display data in the frame buffer is replaced with the second display data corresponding to the video stream, and the second display data contains the key frame, the display device can directly display the second display data, saving the time for the display device to wait for the key frame. After that, the second display data is refreshed and displayed, so that the continuity of the picture displayed by the display device can be achieved, ensuring the user experience.

[0074] In some feasible examples, the frame buffer includes a first buffer for caching display data currently displayed by the display and a second buffer for caching display data to be displayed by the display, and the first buffer stores the first display data; Figure 1 ,like Figure 6 As shown, the above S14 can be specifically implemented through the following S140 and S141.

[0075] S140, after the key frame is pulled, storing the second display data including the key frame in a first buffer for storing data to be displayed;

[0076] S141, replacing the first display data in the second buffer with the second display data in the first buffer, and controlling the second buffer to refresh and display the second display data; wherein the second display data includes a key frame.

[0077] In some examples, when the decoder receives a switching operation, it controls the second buffer to stop refreshing the video stream data (i.e., the first display data of the first display scene); after creating at least one layer included in the second display scene, it fetches the key frames corresponding to at least one layer; when the video stream including the key frames corresponding to each layer is fetched, it buffers the video stream including the key frames into the first buffer. After that, it replaces the first display data in the second buffer with the second display data in the first buffer, thus completing the replacement of the first display data with the second display data corresponding to the video stream. After that, when the second display data of the second display scene arrives, the decoder refreshes the second display data to the second buffer in real time.

[0078] As can be seen from the above, in the display method provided by the embodiments of the present disclosure, when receiving a switching operation, it stops the refresh of the first display data corresponding to the first display scene. Since the last frame of the first display data corresponding to the first display scene has been cached, the display device can still obtain the last cached frame of the first display data of the first display scene. Thus, the display device can continue to display the first display data, avoiding the phenomenon of a black screen on the display device screen. At the same time, it parallelly closes the resources occupied by the first display scene. Since it does not close the resources occupied by each layer one by one, the processing time can be shortened. After that, it creates at least one layer in the second display scene and obtains the video stream corresponding to at least one layer. Since the video stream includes key frames, after fetching the video stream corresponding to each layer and after fetching the key frames, it stores the second display data including the key frames into the first buffer for storing the data to be displayed; it replaces the first display data in the second buffer with the second display data in the first buffer. Since the first display data in the frame buffer is replaced with the second display data corresponding to the video stream and the second display data includes key frames, the display device can directly display the second display data, saving the time for the display device to wait for the key frames. After that, it controls the second buffer to refresh and display the second display data, thus realizing the continuity of the displayed picture on the display device and ensuring the user experience.

[0079] Embodiment 2

[0080] The structural schematic diagram of the display device provided by the second embodiment of the present application is as Figure 7 shown. The display device includes: a processing module 201 and a transceiver module 202.

[0081] The processing module 201 is configured to determine that the transceiver module 202 receives a switching operation, stop the refresh of the first display data corresponding to the first display scene, and parallelly close the resources occupied by the first display scene; the switching operation is used to indicate switching the first display scene to the second display scene, and the first display scene is different from the second display scene;

[0082] The processing module 201 is further configured to create at least one layer in the second display scene and obtain the video stream corresponding to at least one layer; wherein, the video stream includes key frames.

[0083] The processing module 201 is further configured to determine that key frames corresponding to at least one layer are pulled.

[0084] The processing module 201 is further configured to replace the first display data with the second display data corresponding to the video stream and refresh the display of the second display data; wherein, the second display data includes key frames.

[0085] In some feasible examples, the transceiver module 202 is specifically configured to obtain the configuration information of at least one layer in the second display scene; wherein, the configuration information at least includes the starting point position information, width, height, the identification code of the encoding node, and the stacking order of the layers. The processing module 201 is specifically configured to create at least one layer in the second display scene based on the configuration information obtained by the transceiver module 202.

[0086] In some feasible examples, the processing module 201 is specifically configured to determine that at least one layer in the second display scene is created, and control the transceiver module 202 to send acquisition information for obtaining key frames to the encoding node corresponding to each layer. The transceiver module 202 is specifically configured to receive the video stream including key frames sent by the encoding node.

[0087] In some feasible examples, the key frames are determined by the encoding node based on preset conditions. The preset conditions include: within a preset duration after sending the video stream including key frames, if one or more acquisition information is received, determine the current key frames based on the previous key frames sent and the preset duration.

[0088] In some feasible examples, the processing module 201 is specifically configured to store the second display data including key frames in the first buffer for storing data to be displayed after pulling the key frames. The processing module 201 is specifically configured to replace the first display data in the second buffer with the second display data in the first buffer and control the second buffer to refresh the display of the second display data; wherein, the second display data includes key frames.

[0089] Wherein, all relevant contents of each step involved in the above method embodiment can be cited to the function description of the corresponding functional module, and its function will not be elaborated here.

[0090] Of course, the display device provided in the embodiment of the present invention includes but is not limited to the above modules. For example, the display device may further include a storage module 203. The storage module 203 can be used to store the program code of the display device and can also be used to store the data generated during the operation of the display device, such as diagnostic data, etc.

[0091] A schematic structural diagram of an electronic device provided by an embodiment of the present invention is as follows Figure 8 As shown, the electronic device may include: at least one processor 51, a memory 52, a communication interface 53, and a communication bus 54.

[0092] The following specifically introduces each component of the electronic device:

[0093] Among them, the processor 51 is the control center of the electronic device, which may be a single processor or a collective term for multiple processing elements. For example, the processor 51 is a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as: one or more DSPs, or one or more field programmable gate arrays (FPGAs).

[0094] In a specific implementation, as an embodiment, the processor 51 may include one or more CPUs, such as CPU0 and CPU1 included in the CPU. And, as an embodiment, the electronic device may include multiple processors, such as the processor 51 and the processor 55 included in the CPU. Each of these processors may be a single-core processor (Single-CPU) or a multi-core processor (Multi-CPU). Here, the processor may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0095] The memory 52 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or it can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 52 can exist independently and be connected to the processor 51 through the communication bus 54. The memory 52 can also be integrated with the processor 51.

[0096] In a specific implementation, the memory 52 is used to store the data in the present invention and execute the software program of the present invention. The processor 51 can execute various functions of the electronic device by running or executing the software program stored in the memory 52 and calling the data stored in the memory 52.

[0097] The communication interface 53 uses any device such as a transceiver to communicate with other devices or communication networks, such as a radio access network (RAN), a wireless local area network (WLAN), a terminal, the cloud, etc. The communication interface 53 can include a transceiver module to implement the receiving and acquiring functions.

[0098] The communication bus 54 can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used to represent it, but it does not mean that there is only one bus or one type of bus.

[0099] As an example, the functions implemented by the transceiver module 202 of the display device are the same as those of the communication interface 53, the functions implemented by the processing module 201 in the display device are the same as those of the processor 51, and the functions implemented by the storage module 203 in the display device are the same as those of the memory 52.

[0100] An embodiment of this application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method in any one of the embodiments.

[0101] The foregoing are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but rather will be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A display method, characterized in that Including: Receiving a switching operation, stopping the refresh of the first display data corresponding to the first display scene, and concurrently closing the resources occupied by the first display scene; The switching operation is used to indicate switching the first display scene to a second display scene, where the first display scene is different from the second display scene; Creating at least one layer in the second display scene and obtaining a video stream corresponding to the at least one layer; wherein, the video stream includes key frames; Determining that key frames corresponding to the at least one layer have been pulled; Replacing the first display data with second display data corresponding to the video stream and refreshing the display of the second display data; wherein, the second display data includes the key frames.

2. The display method according to claim 1, wherein The creating at least one layer in the second display scene includes: Obtaining configuration information of at least one layer in the second display scene; wherein, the configuration information at least includes starting point position information, width, height, identification code of an encoding node, and stacking order of the layers; Based on the configuration information, creating at least one layer in the second display scene.

3. The display method according to claim 1, characterized in that, Obtaining the video stream corresponding to the at least one layer includes: Determining that at least one layer in the second display scene has been created, and sending acquisition information for obtaining key frames to the encoding node corresponding to each layer; Receiving the video stream containing the key frames sent by the encoding node.

4. The display method according to claim 3, characterized in that The key frames are determined by the encoding node based on preset conditions, and the preset conditions include: within a preset duration after sending the video stream containing the key frames, if one or more acquisition information is received, determining the current key frames based on the previously sent key frames and the preset duration.

5. The display method according to claim 1, characterized in that The replacing the first display data with second display data corresponding to the video stream and refreshing the display of the second display data, where the second display data includes the key frames, includes: After pulling the key frames, storing the second display data containing the key frames into a first buffer for storing data to be displayed; Replacing the first display data in a second buffer with the second display data in the first buffer and controlling the second buffer to refresh the display of the second display data; wherein, the second display data includes the key frames.

6. A display device, characterized in that, Including: A processing module, configured to determine that the transceiver module has received a switching operation, stop the refresh of the first display data corresponding to the first display scene, and concurrently close the resources occupied by the first display scene; the switching operation is used to indicate switching the first display scene to a second display scene, where the first display scene is different from the second display scene; The processing module is further configured to create at least one layer in the second display scene and obtain a video stream corresponding to the at least one layer; wherein, the video stream includes key frames; The processing module is further configured to determine that key frames corresponding to the at least one layer have been pulled; The processing module is further configured to replace the first display data with second display data corresponding to the video stream and refresh the display of the second display data; wherein, the second display data includes the key frames.

7. The display device according to claim 6, characterized in that, The transceiver module is specifically configured to obtain configuration information of at least one layer in the second display scenario; wherein, the configuration information at least includes starting point position information, width, height, identification code of the encoding node, and stacking order of the layers. The processing module is specifically configured to create at least one layer in the second display scenario based on the configuration information obtained by the transceiver module.

8. The display device according to claim 7, wherein, The processing module is specifically configured to determine that at least one layer in the second display scenario is created, and control the transceiver module to send acquisition information for acquiring key frames to the encoding node corresponding to each layer. The transceiver module is specifically configured to receive the video stream including the key frames sent by the encoding node.

9. An electronic device, characterized in that, The electronic device includes: a processor; a memory configured to store executable instructions of the processor; wherein, the processor is configured to execute the instructions to implement the display method according to any one of claims 1-7.

10. A computer program product comprising instructions, characterized in that, When the instructions run on the electronic device, the electronic device is caused to execute the display method according to any one of claims 1-7.