Methods, devices, and storage media for controlling bullet screen layers.
By eliminating the rendering and compositing of the bullet screen layer in scenarios without bullet screens, the problem of ineffective power consumption in video and live streaming applications is solved, achieving power optimization and ensuring user experience.
Patent Information
- Application Number
- CN202410115114.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-26
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-01-26
AI Technical Summary
In existing technologies, when video and live streaming applications enable the bullet comment function, the bullet comment layer still participates in the layer rendering and compositing process even if there is no bullet comment content, resulting in wasted power consumption of the terminal device.
By determining whether the current scene is without bullet comments, the layer rendering and compositing of the bullet comment layer is only performed when there is bullet comment content; otherwise, no rendering and compositing is performed, thereby reducing the power consumption of the terminal device.
It effectively reduces the power consumption required for layer rendering and compositing on terminal devices, avoids unnecessary power consumption, and ensures the normal display of bullet screen content.
Smart Images

Figure CN119255039B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method, device and storage medium for controlling bullet screen layers. Background Technology
[0002] Currently, with the development of terminal technology, more and more terminal devices support video and live streaming applications. To enhance the entertainment and interactivity for users watching videos and live streams, these applications typically provide bullet screen controls in their interfaces, allowing users to enable or disable bullet screen functionality by interacting with these controls.
[0003] However, in actual use, some video and live streaming applications, once the bullet screen function is enabled, will participate in the layer rendering and compositing process on the live streaming interface, regardless of whether there is bullet screen content or not, as long as the video playback is not exited. This results in a waste of power consumption of the terminal device. Summary of the Invention
[0004] To address the aforementioned technical issues, this application provides a method, device, and storage medium for managing bullet screen layers. The aim is to determine whether the current scene is without bullet screens, and then, when it is determined that the current scene is without bullet screens, to not perform layer rendering and compositing processing on bullet screen layers that do not contain bullet screen content, thereby reducing the power consumption required for layer rendering and compositing of the terminal device.
[0005] In a first aspect, embodiments of this application provide a method for managing a bullet screen layer. The method includes: responding to a first operation by launching a first application and displaying a first interface, the first interface including an option corresponding to a first video, the first application being a preset whitelist application, the preset whitelist applications being applications where the video layer and the bullet screen layer do not belong to the same layer; responding to a second operation acting on the option corresponding to the first video by displaying a second interface, the second interface including a multimedia screen corresponding to the first video and a first control, the first control being used to enable the bullet screen function; responding to a third operation acting on the first control by enabling the bullet screen function; when the bullet screen function is enabled, if the multimedia screen currently corresponding to the first video contains corresponding bullet screen content, displaying a third interface, the third interface being rendered and synthesized from N layers, the N layers including a video layer corresponding to the multimedia screen and a bullet screen layer containing bullet screen content, N being an integer greater than 1; when the bullet screen function is enabled, if the multimedia screen currently corresponding to the first video does not contain corresponding bullet screen content, displaying a fourth interface, the fourth interface being rendered and synthesized from N-1 layers, the N-1 layers including a video layer but excluding bullet screen layers without bullet screen content.
[0006] Therefore, in scenarios where the first application running in the foreground is a pre-selected whitelist application, i.e., an application where the bullet screen layer and the video layer do not belong to the same layer, when the user enables the bullet screen function while playing the first video using the first application, the system determines whether the current scenario is without bullet screens. If the current scenario is without bullet screens, the system does not perform layer rendering and compositing on the bullet screen layer that does not contain bullet screen content, thereby reducing the power consumption required for layer rendering and compositing on the terminal device.
[0007] According to the first aspect, after enabling the bullet screen function, the method further includes: the first application draws N layers, including a bullet screen layer; wherein, when the bullet screen function is enabled, if the multimedia screen corresponding to the first video currently contains corresponding bullet screen content, a third interface is displayed, including: when the bullet screen function is enabled, if the multimedia screen corresponding to the first video currently contains corresponding bullet screen content, performing layer rendering and compositing on the N layers to obtain the third interface; and displaying the third interface; wherein, when the bullet screen function is enabled, if the multimedia screen corresponding to the first video currently does not contain corresponding bullet screen content, a fourth interface is displayed, including: when the bullet screen function is enabled, if the multimedia screen corresponding to the first video currently does not contain corresponding bullet screen content, performing layer rendering and compositing on the N-1 layers excluding the bullet screen layer to obtain the fourth interface; and displaying the fourth interface.
[0008] Therefore, based on the bullet screen layer management method provided in this application embodiment, if the first application draws N layers but there is no bullet screen content at present, only N-1 layers other than the bullet screen layer are selected for layer rendering and compositing. If there is bullet screen content, N layers including the bullet screen layer are selected for layer rendering and compositing. This can both avoid missing the display of bullet screen content and reduce the power consumption required for layer rendering and compositing of the terminal device.
[0009] According to the first aspect, or any implementation of the first aspect above, when the bullet screen function is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, a fourth interface is displayed, including: when the bullet screen function is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, a third interface is displayed; after displaying the third interface for a first duration, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, a fourth interface is displayed.
[0010] Therefore, the control method for the bullet screen layer provided in this application embodiment is not executed for a period of time after a touch operation (touch event) (bullet screen layers without bullet screen content do not participate in layer rendering and compositing). The control method for the bullet screen layer provided in this application embodiment is executed only after a period of time. This avoids conflicts between the touch event and the control method for the bullet screen layer provided in this application embodiment, thus ensuring the user experience.
[0011] According to the first aspect, or any implementation of the first aspect above, after enabling the bullet screen function, the method further includes: not displaying the first control, displaying the second control, the second control being used to disable the bullet screen function; disabling the bullet screen function in response to the fourth operation applied to the second control; and displaying the fifth interface when the bullet screen function is disabled, the fifth interface being rendered and composited from N-1 layers, the N-1 layers including the video layer but excluding the bullet screen layer.
[0012] Therefore, for the first application that enables the bullet screen function first and then disables it without destroying the bullet screen layer, the power consumption required for layer rendering and compositing on the terminal device is reduced by setting the undestroyed bullet screen layer not to participate in the layer rendering and compositing process.
[0013] Optionally, a touch event occurs when the user performs a fourth operation, such as turning off the bullet screen function. In this case, the control of the bullet screen layer can be delayed for a period of time, such as a first duration, and then controlled based on the bullet screen layer control method provided in this application embodiment. This can avoid conflicts between the touch event and the bullet screen layer control method provided in this application embodiment, thus ensuring the user experience.
[0014] According to the first aspect, or any implementation of the first aspect above, after the bullet screen function is turned off, the method further includes: the first application draws N layers, including the bullet screen layer; wherein, when the bullet screen function is turned off, displaying the fifth interface includes: when the bullet screen function is turned off, performing layer rendering and compositing on the N-1 layers excluding the bullet screen layer to obtain the fifth interface; and displaying the fifth interface.
[0015] According to the first aspect, or any implementation of the first aspect above, in response to the first operation, the first application is launched and the first interface is displayed, including: in response to the first operation, the first application is launched, the application information of the first application is obtained, the application information of the first application is determined to be the same as the application information of the preset whitelisted applications, and the first interface is displayed.
[0016] According to the first aspect, or any implementation of the first aspect above, determining whether the application information of the first application is the same as the application information of the preset whitelist application includes: when it is determined that the application information of the first application is the same as the application information of the preset whitelist application, setting a first flag of a first value, wherein the first flag of the first value is used to indicate that the first application is a preset whitelist application.
[0017] According to the first aspect, or any implementation of the first aspect above, when the bullet screen function is enabled, if there is no corresponding bullet screen content on the multimedia screen corresponding to the first video, the fourth interface is displayed, including: when the bullet screen function is enabled, if the first video is played in the first playback mode and there is no corresponding bullet screen content on the multimedia screen corresponding to the first video, the fourth interface is displayed, where the first playback mode is a full-screen playback mode or a half-screen playback mode.
[0018] According to the first aspect, or any implementation of the first aspect above, the method further includes: when the bullet screen function is enabled, if the first video is played in the second playback mode, a sixth interface is displayed. The sixth interface is rendered and synthesized by M layers, including a video layer, where M is an integer greater than 1, and the second playback mode is a picture-in-picture playback mode.
[0019] According to the first aspect, or any implementation of the first aspect above, when the first video is played in the first playback mode, the method further includes: setting a second flag with a first value, the second flag of the first value being used to indicate that the first video is played in the first playback mode.
[0020] According to the first aspect, or any implementation of the first aspect above, when the bullet screen function is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, the fourth interface is displayed, including: when the first mark is set to the first value, the second mark is set to the first value, and the first application enables the bullet screen function, determining whether the N layers drawn by the first application include a bullet screen layer without bullet screen content.
[0021] If it is determined that among the N layers drawn by the first application is a bullet screen layer without bullet screen content, the fourth interface is displayed.
[0022] According to the first aspect, or any implementation of the first aspect above, determining whether the N layers drawn by the first application include a bullet screen layer without bullet screen content includes: determining whether the N layers drawn by the first application include a first control based on the artificial intelligence image recognition function; and determining that the N layers drawn by the first application include a bullet screen layer without bullet screen content if it is determined that the first control is included in the N layers drawn by the first application.
[0023] Based on the first aspect, or any implementation of the first aspect above, determining whether the N layers drawn by the first application include a barrage layer without barrage content includes: determining the drawing frame rate of each layer drawn by the first application; and determining whether the N layers drawn by the first application include a barrage layer without barrage content based on the drawing frame rate.
[0024] According to the first aspect, or any implementation of the first aspect above, based on the drawing frame rate, determine whether the N layers drawn by the first application include a bullet screen layer without bullet screen content, including: for each layer, if the drawing frame rate is 0 for multiple consecutive frames, determine that the layer is a bullet screen layer without bullet screen content.
[0025] According to the first aspect, or any implementation of the first aspect above, the method further includes: in response to the fifth operation, closing the first video, displaying the first interface, and changing the second flag from the first value to the second value, wherein the second flag of the second value is used to indicate that the decoder corresponding to the first video has been destroyed.
[0026] According to the first aspect, or any implementation of the first aspect above, the method further includes: in response to the sixth operation, exiting the first application and changing the first flag from a first value to a second value, changing the second flag from a first value to a second value, wherein the first flag of the second value is used to indicate that the preset whitelist application has been exited, and the second flag of the second value is used to indicate that the decoder corresponding to the first video has been destroyed.
[0027] According to the first aspect, or any implementation of the first aspect above, the method further includes: in response to the seventh operation, launching the second application and displaying the seventh interface, the seventh interface including the option corresponding to the second video, the second application not being a preset whitelist application; in response to the eighth operation acting on the option corresponding to the second video, displaying the eighth interface, the eighth interface including the multimedia screen corresponding to the second video and a third control, the third control being used to enable the bullet screen function; in response to the ninth operation acting on the third control, enabling the bullet screen function; when the bullet screen function is enabled, if the multimedia screen currently corresponding to the second video has corresponding bullet screen content, displaying the ninth interface, the ninth interface being rendered and synthesized from K layers, the K layers including the video layer corresponding to the multimedia screen and the bullet screen layer with bullet screen content, K being an integer greater than 1; when the bullet screen function is enabled, if the multimedia screen currently corresponding to the second video does not have corresponding bullet screen content, displaying the tenth interface, the tenth interface being rendered and synthesized from K layers, the K layers including the video layer and the bullet screen layer without bullet screen content.
[0028] Secondly, embodiments of this application provide a terminal device. The terminal device includes: a memory and a processor, coupled together; the memory stores program instructions, which, when executed by the processor, cause the terminal device to perform the method of the first aspect or any possible implementation thereof.
[0029] Thirdly, embodiments of this application provide a computer-readable medium for storing a computer program, the computer program including instructions for performing the method in the first aspect or any possible implementation of the first aspect.
[0030] Fourthly, embodiments of this application provide a computer program including instructions for performing the method in the first aspect or any possible implementation thereof.
[0031] Fifthly, embodiments of this application provide a chip including a processing circuit and transceiver pins. The transceiver pins and the processing circuit communicate with each other via an internal connection path. The processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive signals and to control the transmitting pin to transmit signals. Attached Figure Description
[0032] Figure 1 This is an illustrative diagram illustrating a scenario where a video application is used to play a video.
[0033] Figure 2 This is an illustrative diagram showing how, in a scenario without bullet comments, the bullet comment layer of a video application still participates in the layer rendering and compositing process.
[0034] Figure 3 This is an illustrative diagram illustrating a scenario without bullet comments where the bullet comment layer of a video application does not participate in the layer rendering and compositing process.
[0035] Figure 4 This is a schematic diagram of the hardware structure of a terminal device as an example.
[0036] Figure 5 This is a schematic diagram of the software structure of a terminal device as an example.
[0037] Figure 6 This is an example illustration of the interaction logic of the bullet screen layer control method provided in an embodiment of this application;
[0038] Figure 7 This is an example illustration of a timestamp corresponding to a layer with drawn content;
[0039] Figure 8 This is an example illustration of a timestamp corresponding to a layer with no drawn content.
[0040] Figure 9 This is an illustrative diagram illustrating a scenario where a video application is used to play a video.
[0041] Figure 10 This is an illustrative diagram illustrating yet another scenario of playing video using a video application;
[0042] Figure 11 This is an illustrative diagram illustrating yet another scenario of playing video using a video application;
[0043] Figure 12 This is an illustrative diagram illustrating yet another scenario of playing video using a video application;
[0044] Figure 13 This is an illustrative diagram illustrating yet another scenario of playing video using a video application;
[0045] Figure 14 This is an illustrative diagram illustrating yet another scenario of playing video using a video application. Detailed Implementation
[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0047] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0048] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.
[0049] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0050] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.
[0051] In the description of the embodiments of this application, the terminal device may also be referred to as a terminal, user equipment (UE), mobile terminal (MT), etc.
[0052] The terminal device can be a mobile phone, smart TV, tablet computer, computer with wireless transceiver capabilities, virtual reality (VR) terminal device, augmented reality (AR) terminal device, etc. The embodiments of this application do not limit the specific technology or device form used in the terminal device.
[0053] With the development of terminal technology, more and more terminal devices, such as mobile phones, tablets, and smart TVs, are able to support video applications (APPs, hereinafter referred to as "applications") and live streaming applications that support long video content, short video content, and live video streaming. To enhance the entertainment and interactivity for users watching videos and live streams, these video and live streaming applications also provide interactive capabilities while playing videos. For example, taking video applications as an example, most currently offer users the ability to send bullet comments (or danmaku) during video playback. Correspondingly, video applications will display the bullet comments sent by the user (which may include text and animated emoticons).
[0054] To better understand the bullet screen feature provided by video and live streaming applications, we will take video applications as an example and explain it in detail with examples.
[0055] For example, during full-screen video playback on a terminal device, such as a mobile phone, the phone responds to user actions, such as touch operations on the display screen, by displaying the currently playing video content and some controls for user interaction on the current interface. Figure 1 As shown in (1), in response to the user's touch operation on the display screen, the mobile phone can display a control 10a-1 for enabling the bullet screen function in interface 1.
[0056] It should be noted that after the video application is launched, without enabling the bullet screen function, interface 1 is mainly obtained by rendering and compositing layer 10a-2 containing video content.
[0057] For example, when a user clicks control 10a-1, the phone responds to the operation by enabling the bullet comment function. After enabling the bullet comment function, control 10a-1 will be the control that disables the bullet comment function, such as... Figure 1 The control 10a-3 shown in (2) is replaced.
[0058] For example, taking the displayable bullet comment content after enabling the bullet comment function as an example, see [link to example]. Figure 1 In section (2), when the bullet screen function is enabled, the interface of the currently playing video will display not only the video content, i.e., the content of layer 10a-2, but also the bullet screen content (such as...). Figure 1 The text in (2) shows "High Energy Warning", "Awesome", "666", "6666", "66666", "So Envious", etc., as well as the control 10a-4 for setting the bullet screen attributes and the control 10d-5 for sending bullet screen content.
[0059] To distinguish it from Interface 1 where the bullet screen function is not enabled, this embodiment of the application refers to the interface with the bullet screen function enabled and the bullet screen content displayed as Interface 2.
[0060] It should be noted that currently, some video applications render the bullet comments and video content on separate layers; that is, the video content has a separate layer, such as... Figure 1 As shown in (2), layer 10a-2, the bullet screen content also has a separate layer, such as Figure 1 Layer 10a-6 is shown in (2). In cases where the bullet screen layer (layer 10a-6) and the video layer (layer 10a-2) are not the same layer, the background of the bullet screen layer is usually transparent. This ensures that the content located under the bullet screen layer, such as the video content in the video layer, can be displayed in interface 2 and seen by the user.
[0061] Therefore, by providing a bullet screen feature in video applications, users can easily send and view bullet screen content, thereby enhancing the entertainment and interactivity of watching videos.
[0062] The use of the bullet screen function provided by live streaming applications is similar to that provided by video applications, and will not be described in detail in this application embodiment.
[0063] However, in actual use, for video and live streaming applications where the bullet comment layer and the video layer are not the same layer, some video and live streaming applications will participate in the layer rendering and compositing process as long as the video playback is not exited after enabling the bullet comment function, regardless of whether there is bullet comment content.
[0064] For example Figure 2 In the scenario shown in (1), when the bullet screen function is enabled but there is no bullet screen content in the current time period, the bullet screen layer (layer 10a-6) without bullet screen content will still participate in the rendering and compositing process together with the video layer (layer 10a-2) with video content, and thus obtain the content that can be displayed in interface 3.
[0065] For example Figure 2In the scenario shown in (2), when the bullet screen function is enabled, after the user clicks control 10a-3 to disable the bullet screen function, some video applications and some live streaming applications will not destroy the bullet screen layer, that is, layer 10a-6 still exists. Since the user has already disabled the bullet screen function, they will not receive bullet screen content, so the bullet screen layer will not display bullet screen content. However, since the bullet screen layer is not destroyed, the bullet screen layer without bullet screen content (layer 10a-6) will still participate in the rendering and compositing process together with the video layer with video content (layer 10a-2), and thus obtain the content that can be displayed in interface 4.
[0066] Because the rendering and compositing of layers consumes power from the terminal device, the more layers involved in the rendering and compositing process, the greater the power consumption. However, whether or not a bullet comment layer without bullet comment content participates in the rendering and compositing process has no impact on the final content displayed on the user interface, but it does affect the power consumption of the terminal device. In other words, participating a bullet comment layer without bullet comment content in the rendering and compositing process results in a waste of power for the terminal device.
[0067] In view of this, the present application provides a method for managing bullet screen layers, which aims to determine whether the current scene is without bullet screens. When it is determined that the current scene is without bullet screens, the bullet screen layer without bullet screen content is not subjected to layer rendering and compositing processing, thereby reducing the power consumption required for layer rendering and compositing of the terminal device.
[0068] It should be noted that the no-bullet-screen scenario mentioned in the embodiments of this application includes a scenario where the bullet screen function is turned off but the bullet screen layer is not destroyed (hereinafter referred to as: Scenario 1); and a scenario where the bullet screen function is turned on but there is currently no bullet screen content (hereinafter referred to as: Scenario 2).
[0069] Optionally, in scenario 2, such as some less popular videos or live streams, there are often long periods without any comments, even if the comment function is enabled. Therefore, in such scenarios, the comment layer without content does not need to participate in the rendering and compositing process.
[0070] Therefore, in terminal devices, such as mobile phones, Figure 3 The scene shown in (1), or Figure 3 In the scenario shown in (2), based on the bullet screen layer control method provided in this application embodiment, it can be determined whether the mobile phone is currently in scenario 1 or scenario 2. Therefore, bullet screen layers without bullet screen content will not participate in the rendering and compositing process, such as... Figure 3 As shown, the video layer (layer 10a-2) will be rendered and composited to obtain the interface 3 displayed in scene 1, or the interface 4 displayed in scene 2.
[0071] The following describes the specific implementation logic of the bullet screen layer management method provided in the embodiments of this application, such as the implementation details of determining whether the current scene is without bullet screens, and the implementation details of controlling the bullet screen layer without bullet screen content not to participate in the rendering and compositing process when the current scene is without bullet screens. In order to better understand the technical solution provided in the embodiments of this application, before describing the technical solution of the embodiments of this application, the hardware structure and software structure of the terminal devices (such as mobile phones, tablet computers, smart TVs, etc.) to which the embodiments of this application are applicable will be described first with reference to the accompanying drawings.
[0072] For ease of explanation, we will use a mobile phone as an example.
[0073] See Figure 4 This example illustrates the hardware structure of a mobile phone as a terminal device. Figure 4 As shown, the mobile phone 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0074] Optionally, the mobile phone 100 may include one or N displays 194, one or N cameras, and one or N SIM card interfaces. Wherein, N is a positive integer greater than 1.
[0075] Antenna 1 can be coupled to mobile communication module 150, and antenna 2 can be coupled to wireless communication module 160, thereby enabling the transmission and reception of electromagnetic wave signals.
[0076] Among them, the mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G for use on the mobile phone 100.
[0077] The wireless communication module 160 can provide solutions for wireless communication applications on the mobile phone 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.
[0078] The audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, and a headphone jack 170D. For example, the mobile phone 100 can implement audio functions through the application processor and the speaker 170A, receiver 170B, microphone 170C, and headphone jack 170D in the audio module 170. Specifically, in the technical solution provided in this application embodiment, the playback of videos and live streams requires sound to be played through the audio module.
[0079] The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc., which will not be listed here, and this application does not limit them.
[0080] Specifically, in the technical solution provided in this application embodiment, the sensor module 180 needs to include at least a touch sensor. Thus, the data collected by the touch sensor can determine whether the user has made a touch event on the display screen 194 while watching a video or live stream (specifically, whether it's a touch down or a touch up). Furthermore, if no touch event is made within a set time, the detection of a blank bullet screen layer (a bullet screen layer without bullet screen content) is performed to determine whether the current scenario is a no-bullet-screen scene. For details on the detection of the blank bullet screen layer, see [link to relevant documentation]. Figure 6 The description of step S111 in the illustrated embodiment will not be repeated here.
[0081] The processor 110 may include one or more processing units. Examples include application processors (APs), modems, graphics processing units (GPUs), image signal processors (ISPs), controllers, media codecs, digital signal processors (DSPs), baseband processors, neural network processing units (NPUs), etc., which will not be listed here and this application does not limit the scope of the application.
[0082] It should be noted that, specifically in the technical solution provided in this application embodiment, the controller, acting as the nerve center and command center of the mobile phone 100, can generate operation control signals based on instruction operation codes and timing signals to complete the control of fetching and executing instructions. A media encoder can compress or decompress digital audio and video. An application processor, through corresponding services such as layer rendering and compositing services, can render and composite the content decompressed by the media encoder to obtain the image or video to be displayed. Finally, the obtained image or video is displayed on the display screen 194.
[0083] Furthermore, it should be noted that, regarding the processor 110 including the aforementioned processing units, in some implementations, the different processing units can be independent devices. That is, each processing unit can be considered as a processor. In other implementations, the different processing units can also be integrated into one or more processors.
[0084] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the only limitation of this embodiment.
[0085] Furthermore, it should be noted that the processor 110 may also include a memory for storing instructions and data. In some implementations, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110, as mentioned above, has just used or is cyclically used by the controller. If the processor 110 needs to reuse the instruction or data, it can directly retrieve it from the memory, thereby avoiding repeated accesses, reducing the processor 110's waiting time, and improving system efficiency.
[0086] That concludes the introduction to the hardware structure of the Mobile 100. It should be understood that... Figure 4The mobile phone 100 shown is merely an example. In a specific implementation, the mobile phone 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. Figure 4 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0087] against Figure 4 The software system of the mobile phone 100 with the hardware structure shown includes, but is not limited to, Windows, Android, and iOS systems. These software systems may employ a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture.
[0088] For ease of explanation, this application uses the layered architecture of the Android system as an example to illustrate the software structure of the mobile phone 100.
[0089] See Figure 5 The diagram illustrates, for example, the software architecture of a mobile phone 100. Figure 5 As shown, the layered architecture of the mobile phone 100 divides the software system into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some implementations, the Android system is divided into three layers, from top to bottom: the application (APP) layer, the application framework (FWK) layer, and the kernel layer.
[0090] The application layer can include a series of application packages. For example... Figure 5 As shown, the application package may include applications such as video, settings, and gallery, which will not be listed here, and this application does not impose any restrictions on them.
[0091] Alternatively, a video application (video application) may be an application where the video content and the bullet screen content are displayed on separate layers. That is, the bullet screen layer and the video layer do not belong to the same layer.
[0092] Furthermore, it should be noted that in some possible implementations, the APP layer may also include live streaming applications where the bullet screen layer and video layer do not belong to the same layer, as well as power management applications required to implement the technical solutions provided in the embodiments of this application.
[0093] Alternatively, in one possible implementation, the power management application may be, for example, an application without a user interface, i.e., an application that does not display a corresponding icon on the desktop.
[0094] Optionally, the power management application can be loaded and run when the terminal device, such as a mobile phone, starts up, or when a video application or live streaming application starts up.
[0095] The operations performed by power management applications located in the APP layer are similar to those of power management services integrated in the FWK layer. For details, please refer to the description of power management services below, which will not be explained here.
[0096] Understandably, only one power management application located at the APP layer and one power management service integrated at the FWK layer are needed. This application embodiment takes adding a power management service at the FWK layer as an example.
[0097] The application framework layer provides application programming interfaces (APIs) and programming frameworks (which can be described as functions) for applications within the application layer. In some embodiments, the application framework layer includes predefined functions. Figure 5 As shown, the application framework layer may include functions such as Activity Manager Service (AMS), Media Codec Service, Surface Flinger Service, and Power Management Service, which will not be listed here, and this application does not impose any restrictions on them.
[0098] The Activity Manager Service (AMS) is primarily responsible for managing and tracking the activity tasks and lifecycle of all applications. When an application is opened, AMS starts the application's process and allocates processor resources and memory to it. When the application is no longer in the foreground or background, or when system memory is insufficient, AMS terminates or kills the application's process.
[0099] Specifically, in the technical solution provided in this application embodiment, stub functions can be pre-embedded in the startActivity() method of the activity task used to start the application. In this way, when the AMS executes the startActivity() method during the startup process of the application in the APP layer, such as a video application, it can send the currently launched application information, such as the application name, or other identifiers that can uniquely identify the application, to the power management service through the embedded stub functions.
[0100] Media codec service is used to create decoders when video applications play videos.
[0101] Specifically, in the technical solutions provided in the embodiments of this application, stub functions can also be pre-embedded in the method for creating the decoder. In this way, when the media codec service executes the method for creating the decoder, during the process of creating the decoder, the embedded stub functions can be used to send the application name, such as the application name, or other identifiers that can uniquely identify the application to the power management service to start playing the video.
[0102] Optionally, stub functions are pre-embedded in the startActivity() method and the method for creating the decoder, such as the push function based on Android push.
[0103] Understandably, Android push is a message push mechanism in Android. Calling this function will not affect the execution of other functions in the startActivity() method and the decoder creation method.
[0104] In addition, after the media codec has created the decoder and decoded the video source, the corresponding process of the video application can draw layers, such as video layers and bullet screen layers.
[0105] The power management service is used to determine whether the currently launched application is a pre-selected whitelist application based on the application information sent by the stub function when the startActivity() method is executed by AMS.
[0106] Optionally, a whitelist of applications can be preset, such as video applications and / or live streaming applications where the bullet screen layer and the video layer belong to different layers.
[0107] Alternatively, a hash map can be used to record a pre-defined whitelist of applications.
[0108] The power management service is also used to set a first flag and set the first flag to a first value when it is determined that the currently launched application is a preset whitelist application.
[0109] Optionally, the first token can be of type boolean.
[0110] Optionally, the first value can be defined as true.
[0111] Optionally, when it is determined that the currently launched application is not a pre-selected whitelist application, a first flag can be set and the first flag can be set to a second value.
[0112] Optionally, the second value can be specified as false.
[0113] Optionally, in some implementations, isWhiteAppFGRunning can be used to represent the first flag. For this implementation, when it is determined that the currently launched application is a pre-selected whitelist application, "boolean isWhiteAppFGRunning = true" can be set. When it is determined that the currently launched application is not a pre-selected whitelist application, "boolean isWhiteAppFGRunning = false" can be set.
[0114] Optionally, if the currently launched application is not a pre-selected whitelist application, the first flag may not need to be set.
[0115] The power management service is also used to obtain the layer information to be rendered and composed from the layer rendering and compositing service, such as the layer name and layer size, after receiving the application information sent by the stub function when the media codec service executes the method to create the decoder. Then, based on the layer information, it determines whether the video application playing the current video should use the preset playback mode to play the video.
[0116] Optionally, a preset playback mode can be selected, such as full-screen playback mode or half-screen playback mode. That is, a playback mode that is not picture-in-picture playback mode.
[0117] It should be noted that the picture-in-picture playback mode (or small window playback mode) uses a relatively small window for playing the video. Furthermore, in practice, there are other application layers below the video playback window, making it difficult to identify the comment layer. Therefore, this playback mode does not require control over the comment layer, i.e., the comment layer control method provided in this application embodiment is not executed.
[0118] The power management service is also used to set a second flag and set the second flag to the first value when it is determined that the video application currently playing the video is using a preset playback mode or is not in picture-in-picture playback mode.
[0119] Optionally, the second token can be of type boolean.
[0120] Optionally, the first value can be defined as true.
[0121] Optionally, if it is determined that the video application currently playing the video is using picture-in-picture playback mode, a second flag can be set and the second flag can be set to a second value.
[0122] Optionally, in some implementations, the second flag can be represented by `isVideoPlaying`. For this implementation, if it's determined that the video application playing the current video is using a preset playback mode, or is not in picture-in-picture playback mode, then `boolean isVideoPlaying = true` can be set. If it's determined that the video application playing the current video is using picture-in-picture playback mode, then `boolean isVideoPlaying = false` can be set.
[0123] The power management service is also used to detect blank bullet screen layers when it is determined that the video application playing the current video is using a preset playback mode or is not in picture-in-picture playback mode, that is, to determine whether the current scene is without bullet screens.
[0124] Optionally, the detection of blank bullet screen layers can be determined, for example, by artificial intelligence (AI) image recognition function, or by analyzing the number of existing layers and the display frame rate (drawing frame rate).
[0125] The power management service is also used to issue a first control command to the layer rendering and compositing service when it is determined that the current scene is without bullet comments; and to issue a second control command to the layer rendering and compositing service when it is determined that the current scene is with bullet comments.
[0126] Optionally, the first control command is a command that instructs the bullet screen layer not to participate in rendering and compositing. The second control command is a command that instructs the bullet screen layer to participate in rendering and compositing.
[0127] Optionally, in one possible implementation (implementation 1), the presence or absence of a bullet screen scene can be determined before rendering and compositing each frame's corresponding layer is completed. After obtaining the determination result, a corresponding control command, such as a first control command or a second control command, is sent to the layer rendering and compositing service based on the current determination result. That is, in this scenario, the control commands issued twice consecutively may be the same.
[0128] Optionally, in another possible implementation (implementation 2), the presence or absence of a bullet screen scene can be determined before rendering and compositing each frame's corresponding layer is completed. After obtaining the determination result, it is then determined whether the current determination result is the same as the previous one. Accordingly, if the two determination results are the same, the corresponding control command does not need to be sent to the layer rendering and compositing service; if the two determination results are different, the control command corresponding to the current determination result can be sent to the layer rendering and compositing service. That is, in this scenario, the two control commands issued are different.
[0129] In practical applications, isLastResult can be used to represent the result of the previous judgment, and curResult can be used to represent the result of the current judgment.
[0130] Optionally, isLastResult and curResult can be of type integer (int).
[0131] Optionally, it can be agreed that when the judgment result is 1, the corresponding control command is the first control command; and when the judgment result is 0, the corresponding control command is the second control command.
[0132] For implementation method 2, if isLastResult = curResult, no control command needs to be sent to the layer rendering compositing service. If isLastResult ≠ curResult and curResult = 1, a first control command can be sent to the layer rendering compositing service; if isLastResult ≠ curResult and curResult = 0, a second control command can be sent to the layer rendering compositing service.
[0133] Furthermore, for implementation method 2, when isLastResult ≠ curResult, the power management service, in addition to issuing control commands to the layer rendering and compositing service based on curResult, also needs to update isLastResult using curResult. That is, the value of isLastResult is set to the value of curResult.
[0134] Optionally, in some possible implementations, the control commands issued by the power management service to the layer rendering and compositing service may include curResult (e.g., 0 or 1) and the layer name (specifically, the name of the bullet screen layer). In this way, when the layer rendering service is responsible for rendering the composite layer, it can choose to include the bullet screen layer in the rendering and compositing process, or exclude it, based on the control commands.
[0135] The kernel layer is the layer between hardware and software. It includes at least sensor drivers, display drivers, and media codec drivers. Sensor drivers can include drivers for things like touch sensors, used to detect touch events on the display screen; media codec drivers drive the media codec to decode video sources; and display drivers drive the display layer rendering and compositing module to composite the content.
[0136] That concludes the introduction to the software structure of the mobile phone 100. It is understandable that... Figure 5The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the mobile phone 100. In other embodiments of this application, the mobile phone 100 may include more or fewer layers than illustrated, and each layer may include more or fewer components; this application does not impose any limitations.
[0137] Taking a video application as an example, in the process of implementing the bullet screen layer management method provided in this application embodiment on mobile phone 100, the specific interactions and operations between the video application, window management service, media codec service, layer rendering and compositing service, and power consumption management service can be as follows: Figure 6 As shown.
[0138] S101, the video application sends a command to the Activity Manager service to start the video application.
[0139] Optionally, when a user clicks the icon of a video application installed on the phone, the phone responds to the user's action and, during the process of launching the video application, the video application sends a command to the Activity Manager service to launch the video application.
[0140] Optionally, the instruction sent by the video application to the Activity Manager service to launch the video application may include video application information, such as the application name, or other content that can uniquely identify the application.
[0141] S102, after receiving the instruction to start the video application, the Activity Manager service starts the activity task of the video application and pushes the video application information to the power management service through the pre-embedded stub functions.
[0142] Because the Activity Manager server is responsible for managing and tracking the activity tasks and lifecycle of all applications, during the startup process of the video application, the Activity Manager service starts the video application's process using the startActivity() method and allocates processor resources and memory to it.
[0143] Optionally, in the technical solution provided in this application embodiment, a stub function is pre-embedded in the startActivity() method. Therefore, during the process of launching the activity task of the video application, the pre-embedded stub function will be executed in the startActivity() method, and then the application information of the currently launched video application will be pushed to the power management service through the stub function. Specifically, in this embodiment, since a video application is launched, the video application information is pushed.
[0144] Optionally, the pushed video application information may be the same as the video application information included in the instruction sent by the video application to the Activity Manager service to launch the video application, such as the application name or other content that can uniquely identify the application.
[0145] For ease of explanation, this application embodiment uses the pushed video application information as the application name as an example.
[0146] S103, the power management service determines whether the currently launched video application is a preset whitelist application based on the received video application information.
[0147] For example, using the received application name, iterate through a preset whitelist application table, such as a HashMap, to see if there is an application name that is the same as the received application name.
[0148] Accordingly, if an application name matching the received application name is encountered during iteration, it is determined that the currently launched video application is a pre-selected whitelist application. Otherwise, it is determined that the currently launched video application is not a pre-selected whitelist application.
[0149] S104, if the currently launched video application is a preset whitelist application, the power management service sets the first flag of the first value.
[0150] That is, it marks the currently launched video application as a preset whitelist application (video applications whose video layer and bullet screen layer do not belong to the same layer).
[0151] S105, the video application sends a command to the media codec service to play the video.
[0152] Optionally, when a user clicks on the icon / control corresponding to the video they want to watch, and the phone responds to the user's action by jumping to the interface for playing the selected video, the video application sends a command to the media codec service to play the video.
[0153] Optionally, the instructions sent by the video application to the media codec service to play the video may include the video source of the video selected by the user.
[0154] S106 After receiving the instruction to play the video, the media codec service creates a decoder to decode the video source and pushes video application information to the power management service through pre-embedded stub functions.
[0155] Optionally, the pushed video application information may include, for example, the application name or other content that can uniquely identify the application.
[0156] For ease of explanation, this application embodiment still uses the pushed video application information as the application name as an example.
[0157] In addition, it should be noted that the video data decoded by the media codec service can be handed over to the corresponding process of the video application for layer drawing, and then the drawn layer is sent to the layer rendering and compositing service for rendering and compositing processing.
[0158] Figure 6 To illustrate this process, the example shown is of the drawn layer being sent from the media codec service to the layer rendering and compositing service.
[0159] S107, the power management service obtains the corresponding layer information from the layer rendering and compositing service based on the video application information.
[0160] Optionally, the power management service obtains unrendered layer information from the layer rendering and compositing service based on video application information, such as the application name, including layer name and layer size.
[0161] Optionally, the power management service obtains unrendered layer information from the buffer corresponding to the layer rendering and compositing service based on video application information, such as the application name. This information may include, for example, the layer name and layer size.
[0162] Understandably, each layer cached in the buffer corresponding to the layer rendering and compositing service has its own layer name. However, it is not possible to distinguish which layer is the video layer and which layer is the bullet comment layer based solely on the layer name. Therefore, it is also necessary to determine the preset playback mode based on the layer size.
[0163] Optionally, the layer size can be obtained from the buffer, for example, as the coordinate information of the four vertices (top left, top right, bottom left, bottom right) of each layer. Based on these four vertex coordinates, the layer size of each layer can be determined.
[0164] S108, the power management service determines whether the currently playing video is in the preset playback mode based on the layer information.
[0165] Optionally, there is a correspondence between layer names and layer sizes. The layer size corresponding to each layer name is determined based on the coordinate information of the four vertices.
[0166] It should be noted that, generally, the zoomable layer is the video layer. Layers that cannot be zoomed may be the subtitle / comment layer. Further identification of non-scalable layers can be performed when determining whether a scene belongs to a non-comment / comment scene. For details on identifying non-scalable layers to determine whether a scene belongs to a non-comment / comment scene, please refer to the description of step S111, which will not be repeated here.
[0167] Optionally, after identifying the video layer based on its size, the size of the video layer can be used to determine whether the current playback mode is full-screen, half-screen, or picture-in-picture.
[0168] Optionally, the preset playback modes in this embodiment are full-screen playback mode and half-screen playback mode. Therefore, if the size of the identified video layer belongs to full-screen playback mode or half-screen playback mode, it can be determined that the currently playing video belongs to the preset playback mode.
[0169] S109, when the currently playing video is in the preset playback mode, the power management service sets the second flag of the first value.
[0170] For example, set boolean isWhiteAppFGRunning = true.
[0171] S110, the power management service listens for touch events on the display screen within a set time period.
[0172] Optionally, in some implementations, such as when the current playback is in half-screen mode, the user may click on the full-screen control displayed on the current interface to switch the playback mode from half-screen mode to full-screen mode.
[0173] Alternatively, in other possible implementations, such as when the video is currently playing in full-screen mode, the user may click on control 10a-1 as described in the above embodiments to enable the bullet screen function.
[0174] In other words, when a video just starts playing, the user may perform a series of touch operations on the screen, resulting in touch events. Therefore, to avoid conflicts between touch events and the management of the bullet comment layer, the management operations for the bullet comment layer can be delayed for a certain period of time. That is, the power management service can listen for touch events on the screen within a set time.
[0175] S111: If no touch event occurs on the display screen within a set time, the power management service obtains layer information to determine whether the current scene is a no-bullet-screen scenario.
[0176] Optionally, if no touch events occur on the display screen within a set time, such as no touch down events occurring after a previous touch up event within the set time, the power management service can obtain layer information to determine whether the current scenario is a no-bullet-screen scene.
[0177] It should be noted that some video and live streaming applications enable and then disable the bullet comment feature. To allow users to easily re-enable the bullet comment feature mid-stream, the user interface can quickly display the bullet comment content. Alternatively, to enable advertising content delivery through the bullet comment layer, the bullet comment layer is not destroyed when the bullet comment feature is disabled. Therefore, the number of layers obtained from the layer rendering and compositing service remains unchanged when the bullet comment feature is disabled. Therefore, to identify whether a bullet comment layer exists within the currently existing layers, and whether bullet comment content exists within that layer, it can be achieved through the following implementation methods 1 and 2.
[0178] Implementation Method 1: Use AI image recognition to determine whether the current scene is a non-bullet screen scene.
[0179] First, the power management service obtains the layers that have been drawn and need to be rendered and composited from the layer rendering and compositing service. Then, the power management service uses AI image recognition to identify whether the control included in the layer that needs to be rendered and composited is control 10a-1 or control 10a-3.
[0180] Accordingly, if we determine that the currently existing control is control 10a-1, we can determine that the bullet screen function is not currently enabled.
[0181] Accordingly, if it is determined that the bullet screen function is not currently enabled, it can be determined that the current scene is without bullet screens, that is, the bullet screen layer does not participate in the rendering and compositing process.
[0182] Implementation Method 2: Determine whether the current scene belongs to the no-bullet-screen scenario by drawing the frame rate.
[0183] It's important to note that when there is no bullet comment content, the rendering frame rate of the bullet comment layer is 0. That is, the bullet comment layer does not undergo any rendering process; it only participates in rendering and compositing. Therefore, by checking whether the layer has rendering frames and the frame rate, one can determine whether bullet comment content exists (whether it belongs to a no-bullet-comment scene) without destroying the bullet comment layer.
[0184] like Figure 7 As shown, the timestamps corresponding to the multiple frames drawn are recorded, such as "23397965643625" and "23397991271177". Based on the difference in the interval between two adjacent timestamps, the time difference between two adjacent frames is approximately 16 milliseconds (ms). According to the relationship between drawing time and frame rate, for a drawing time of 16ms, the frame rate is 60 frames per second (fps).
[0185] like Figure 8 As shown, for layers that are not drawn, the timestamp for each frame is 0, and the time difference is also 0.
[0186] Based on this, the power consumption management service can push out the drawing frame rate corresponding to the layer by traversing the layers cached in the buffer corresponding to the layer rendering and synthesis service of the video-playing device, as well as the drawing time (transmission cycle) between the layers corresponding to each frame. For any layer, if the determined drawing frame rate is stable, such as always 30fps, or 25fps, or 60fps, etc., it indicates that the layer is a video layer. If the determined drawing frame rate is occasionally 30fps, or 25fps, or 60fps, and occasionally 0fps, it indicates that the layer is a bullet screen layer (the bullet screen content is random, sometimes there is, sometimes there is not).
[0187] Thus, by identifying the time difference of the most recent n frames, if all are 0 or the time difference of the most recent k (k < n) frames is 0, it means that there is no drawing processing operation for the current layer. That is, the layer is a bullet screen layer without bullet screen content, and currently belongs to the bullet screen-free scenario.
[0188] Thus, through the above implementation method 1 and / or implementation method 2, it is possible to determine whether it currently belongs to the bullet screen-free scenario.
[0189] In addition, it should also be noted that in some other possible implementation methods, for the drawing frame rate of video content, it is usually 30fps or 25fps. For bullet screen content, due to the high refresh rate, the drawing frame rate is usually above 60fps. Based on this, when the identified drawing frame rate of multiple frames continues to be 0fps, it can be determined that it belongs to the bullet screen-free scenario; when there is a drawing frame rate greater than or equal to 60fps among the identified drawing frame rates, it can be determined that it belongs to the bullet screen scenario.
[0190] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment, and does not serve as the sole limitation of this embodiment.
[0191] In addition, it should also be noted that for some video applications or live broadcast applications, in the scenario of swiping gifts, new layers will be added additionally to display the swiped gifts. Therefore, the control of bullet screen content will not affect the scenario of swiping gifts.
[0192] S112. In the case that it currently belongs to the bullet screen-free scenario, the power consumption management service sends a first control command to the layer rendering and synthesis service.
[0193] Optionally, the first control command is used to instruct the layer rendering and synthesis service not to participate in the rendering and synthesis processing for the bullet screen layer, that is, the layer with a time difference of 0 or a drawing frame rate of 0fps.
[0194] Optionally, the power management service can send the first control command to the layer rendering and compositing service via the Binder mechanism (an inter-process communication mechanism in Android). Correspondingly, subsequent second and third control commands are also sent to the layer rendering and compositing service via the Binder mechanism.
[0195] S113, the layer rendering and compositing service is set so that the bullet screen layer does not participate in the layer rendering and compositing process.
[0196] Optionally, upon receiving the first control command, the layer rendering compositing service can set the layer indicated in the first control command (determined by the layer name) to an invisible attribute. This prevents the layer, i.e., the bullet screen layer, from participating in the layer rendering compositing process.
[0197] S114, In the case that the current scene is not a bullet screen-free scene, the power management service sends a second control command to the layer rendering and compositing service.
[0198] Optionally, the second control command is used to instruct the layer rendering and compositing service to perform rendering and compositing processing on the bullet screen layer.
[0199] S115, Layer rendering and compositing service settings: The bullet screen layer is set to participate in layer rendering and compositing processing.
[0200] Optionally, upon receiving the second control command, the layer rendering and compositing service can set the layer indicated in the second control command (determined by the layer name) to the visible attribute. This allows the layer, i.e., the bullet screen layer, to participate in the layer rendering and compositing process.
[0201] S116, the power management service listens for the event of exiting the control scene of the bullet screen layer.
[0202] Optionally, events that exit the control scene of the bullet screen layer (exit events) can be detected, such as listening for touch events (exit event 1), such as the user clicking the pause control to stop playing the video; or the decoder is destroyed, but the foreground application changes (exit event 2), such as closing the currently playing video; or the foreground application changes (exit event 3), such as exiting the current video application.
[0203] Optionally, to ensure the reasonable management of the bullet screen layer and prevent it from being consistently set to not participate in layer rendering and compositing, thus causing users to miss bullet screen content and affecting user experience, the power management service can monitor layers in the buffer corresponding to the layer rendering and compositing service, touch events on the display screen, and the lifecycle of the decoder.
[0204] Understandably, for different exit events, relevant information can be pushed to the power management service through the stub functions embedded in the corresponding functions, so that the power management service can determine that an exit event has occurred.
[0205] S117, the power management service updates the first and second markers based on the event of exiting the control scene of the bullet screen layer, and sends the third control command to the layer rendering and compositing service.
[0206] Optionally, the third control command is used to instruct the layer rendering compositing service to exit control over the bullet screen layer.
[0207] Optionally, the updates to the first and second markers can be determined based on the specific exit event.
[0208] Optionally, for exit events that are touch events, since the currently running application is still the video application previously identified as a pre-defined whitelist application, the value of the first flag does not need to be updated and remains at its first value. Other flags, such as the second flag, are restored to their default values. In this case, after the touch event ends, if a touchup event is detected, it is possible to monitor whether a new touch event occurs within a set time, i.e., execute step S110. If not, step S111 can be executed, and subsequent steps can be performed based on the judgment result.
[0209] Optionally, if the exit event is that the decoder is destroyed, but the foreground application remains unchanged, since the currently running application is still the video application previously identified as a default whitelist application, the value of the first flag does not need to be updated and will remain at the first value. Other flags, such as the second flag, will revert to their default values. In this case, we can wait for the layer information sent by the media encoder service after recreating the decoder, i.e., execution can begin from step S107.
[0210] Optionally, if the exit event is due to a change in the foreground application, then all flags, such as the first and second flags, should be restored to their default values, such as the second value. Alternatively, the first flag can be left unset.
[0211] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.
[0212] S118, The layer rendering and compositing service has exited control over the bullet screen layer.
[0213] Optionally, after exiting control of the bullet screen layer, if the video is still playing, regardless of whether there is bullet screen content, the bullet screen layer that has not been destroyed will participate in the layer rendering and compositing process.
[0214] Therefore, when an application is detected to be launching, a pre-embedded stub function is called in the method for creating the application's activity task to push application information that uniquely identifies the application to the power management service. This allows the power management service to determine whether the currently launched application is a pre-defined whitelist application, i.e., an application whose video layer and bullet screen layer do not belong to the same layer. When a foreground application is detected to start playing a video, a pre-embedded stub function is called in the method for creating the decoder that decodes the video source to push application information that uniquely identifies the application to the power management service. This allows the power management service to obtain the corresponding layer information from the layer rendering and compositing service based on the application information, thereby determining whether the currently playing video is playing in a preset playback mode. If the currently playing video is determined to be playing in a preset playback mode and no touch events occur within the set time of the video playback, the corresponding layer information is obtained from the layer rendering and compositing service to determine whether the current scene is without bullet screens. If the current scene is determined to be without bullet screens, the bullet screen layer without bullet screen content is not processed for layer rendering and compositing, thereby reducing the power consumption required for layer rendering and compositing on the terminal device.
[0215] Furthermore, during the management of the bullet screen layer, continuous monitoring of objects that trigger exit events, such as applications, layer rendering and compositing services, and media codec services, allows for timely detection of exit events. Based on these exit events, the values of markers set during the management process, such as the first and second markers, are updated, and the layer rendering and compositing service is notified to exit the management of the bullet screen layer. This approach balances the power consumption of the terminal device with meeting actual usage requirements.
[0216] The following examples illustrate specific scenarios for using the bullet screen layer control method provided in the embodiments of this application.
[0217] See Figure 9 In (1), for example, the desktop of a terminal device, such as a mobile phone, displays two installed video applications, namely video application 1 (first application) and video application 2 (second application).
[0218] Optionally, video application 1 is the preset whitelist application mentioned in the above embodiments, that is, the application where the video layer and the bullet screen layer do not belong to the same layer.
[0219] Optionally, video application 2 may not be a default whitelist application.
[0220] Optionally, video application 2 is an application where the video layer and the bullet screen layer belong to the same layer.
[0221] See also Figure 9In example (1), when a user performs a first operation on the icon of video application 1, such as clicking, the mobile phone responds to the first operation and launches video application 1.
[0222] Optionally, during the launch of video application 1, application information of video application 1 can be obtained. This allows the determination of whether the currently launched video application is a pre-defined whitelist application based on the obtained application information.
[0223] Optionally, in some possible implementations, it can be specified that if the application information of video application 1 is the same as the application information of a preset whitelist application, then video application 1 is determined to be a preset whitelist application.
[0224] Optionally, if it is determined that the video application is a preset whitelist application, a first flag of the first value can be set. The first flag of the first value is used to indicate that the first application is a preset whitelist application.
[0225] For details on the implementation of launching the video application, please refer to [link / reference]. Figure 6 Steps S101 and S102 in the illustrated embodiment will not be described again here.
[0226] For information on determining whether video application 1 is a default whitelist application, and the actions to take if video application 1 is confirmed to be a default whitelist application, please refer to [link to relevant documentation]. Figure 6 Steps S103 and S104 in the illustrated embodiment will not be described again here.
[0227] See Figure 9 In example (2), after launching video application 1, the phone's interface will switch from the desktop to the first interface.
[0228] See Figure 9 In (2), for example, the first interface may include option 201 corresponding to the first video.
[0229] For example, when the user performs a second action on option 201, such as clicking, the phone responds to the second action by displaying a second interface and starting to play the first video.
[0230] Optionally, in some possible implementations, the second interface may be, for example, an interface that plays the first video in full-screen mode, such as... Figure 10 The second interface is shown in (1).
[0231] Alternatively, in some other possible implementations, the second interface may be, for example, an interface that plays the first video in a half-screen playback mode.
[0232] Optionally, the interface for playing the first video in half-screen mode may include a full-screen control for switching the first video to full-screen mode. Accordingly, when the user interacts with the full-screen control, the phone responds to the interaction, and the phone's interface switches from the half-screen mode for playing the first video to the full-screen mode for playing the first video, such as... Figure 10 The second interface is shown in (1).
[0233] For ease of explanation, the embodiments of this application use the second interface as an example. Figure 10 The second interface shown in (1) is an example.
[0234] Optionally, the second interface may include the multimedia screen corresponding to the first video and a first control 202. The first control 202 is used to enable the bullet screen function, i.e., its function is the same as that of control 10a-1 described in the above embodiment.
[0235] Understandably, when starting to play the first video, a decoder corresponding to the first video needs to be created first. This is necessary to create an interface for the video source of the first video and obtain the video data that can be used to draw layers. For implementation details of this step, please refer to [link to documentation / reference]. Figure 6 Steps S105 and S106 in the illustrated embodiment will not be described again here.
[0236] The determination of the first video playback mode can be based on the application information obtained during the decoder creation process, or the layer information obtained from the layer rendering and compositing service.
[0237] Optionally, layer information may include, for example, the layer name and layer size.
[0238] For details on determining whether the first video playback mode is the default playback mode, such as full-screen or half-screen playback mode, please refer to [link to documentation]. Figure 6 Steps S107 and S108 in the illustrated embodiment will not be described again here.
[0239] Optionally, if it is determined that the playback mode of the first video is the first playback mode, a second flag of the first value can be set. The second flag of the first value is used to indicate that the first video is played in the first playback mode. For details on setting the second flag, please refer to [link to documentation]. Figure 6 Step S109 in the illustrated embodiment will not be repeated here.
[0240] See also Figure 10 In example (1), when the user performs a third operation on the first control 202, such as a click operation, the mobile phone responds to the third operation and will enable the bullet screen function.
[0241] Optionally, when the bullet screen function is enabled, if the corresponding bullet screen content exists on the multimedia screen corresponding to the first video, the phone will display... Figure 10 The third interface is shown in (2). The third interface is obtained by rendering and compositing N layers, where N is an integer greater than 1.
[0242] It should be understood that, when the video layer and the bullet screen layer of video application 1 are not on the same layer, during the playback of the first video using video application 1, if there is corresponding bullet screen content for the multimedia screen currently corresponding to the first video, the content finally displayed on the phone screen is obtained by rendering and compositing the video layer and the bullet screen layer. That is, N is at least 2.
[0243] Optionally, when the bullet screen feature is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, the phone will display... Figure 10 The fourth interface is shown in (3). This fourth interface is obtained by rendering and compositing N-1 layers, where N is an integer greater than 1. For example... Figure 10 As shown in (3), when the bullet screen function is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, the video layer participates in the layer rendering and compositing process, while the bullet screen layer does not participate in the layer rendering and compositing process. Therefore, the number of layers for rendering and compositing is one less than the number of layers drawn by video application 1.
[0244] It should be noted that all layers involved in the layer rendering and compositing process are provided by the video application 1 currently playing the first video. That is, after enabling the bullet comment function, video application 1 will draw N layers. Among these N layers is the bullet comment layer.
[0245] However, when the bullet screen function is enabled, whether the drawn bullet screen layer participates in the layer rendering and compositing process depends on whether the corresponding bullet screen content exists in the multimedia screen corresponding to the first video.
[0246] Accordingly, when bullet comments are present, the N layers drawn by video application 1 will be rendered and composited to obtain... Figure 10 The third interface is shown in (2). Conversely, in the absence of bullet screen content, N-1 layers other than the bullet screen layer will be rendered and composited to obtain the result. Figure 10 The fourth interface is shown in (3).
[0247] Furthermore, to avoid conflicts between user operations and the bullet screen layer management method provided in this application embodiment, thus affecting user experience, a third interface can be displayed first when the bullet screen function is enabled and the multimedia screen corresponding to the first video does not contain corresponding bullet screen content. This third interface is obtained by rendering and compositing N layers (including the bullet screen layer). Understandably, in this case, although the bullet screen layer participates in layer rendering and compositing, the final third interface differs from the original. Figure 10 The third interface mentioned in (2) does not include the bullet screen content.
[0248] Furthermore, after displaying the third interface without any bullet comments for the first duration, if the multimedia screen corresponding to the first video does not contain any corresponding bullet comments, then it can display... Figure 10 The fourth interface shown in (3) is to set the barrage layer not to participate in layer rendering and compositing.
[0249] In other words, if the first marker is set to the first value, the second marker is set to the first value, and the first application has enabled the bullet screen function for a set time, and no other touch events occur within the first time period, it can be determined whether to perform layer rendering and compositing on the bullet screen layer or not by identifying whether bullet screen content exists, i.e. whether the current scene is without bullet screens.
[0250] Optionally, in some possible implementations, the AI image recognition function can be used to determine whether the first control 202 is included among the N layers drawn by the video application 1. Furthermore, if the first control 202 is determined to be included among the N layers drawn by the video application 1, it can be determined that the N layers drawn by the video application 1 include a bullet comment layer without bullet comment content. That is, it is determined to belong to a scene without bullet comments.
[0251] Alternatively, in other possible implementations, the drawing frame rate or time difference can be used to determine the drawing frame rate. Taking the drawing frame rate as an example, specifically, the drawing frame rate of each layer drawn by video application 1 can be determined, and then by judging whether the drawing frame rate of each layer is 0 in several consecutive frames, it can be determined whether the layer belongs to the bullet screen layer without bullet screen content. That is, it determines whether it belongs to the no-bullet screen scene.
[0252] For details on the implementation of the process, please refer to [link / reference]. Figure 6 Steps S110 and S111 in the illustrated embodiment will not be repeated here.
[0253] In addition, regarding whether to perform layer rendering and compositing on the bullet screen layer when the bullet screen function is enabled, this can be achieved by issuing corresponding control commands through the lower layer rendering and compositing service.
[0254] Optionally, if layer rendering and compositing of the bullet comments layer is not required, the first control command described in the above embodiments can be sent. If layer rendering and compositing of the bullet comments layer is required, the second control command described in the above embodiments can be sent. For specific implementation details, please refer to [link to implementation details]. Figure 6 Steps S112 to S115 in the illustrated embodiment will not be repeated here.
[0255] In addition, it should be noted that after enabling the bullet screen function, the currently displayed interface is as follows: Figure 10 The third interface shown in (2) or Figure 10 The first control 202 will not be displayed in the fourth interface shown in (3), but the second control 203 will be displayed. The second control 203 is used to turn off the bullet screen function, that is, the function is the same as that of the controls 10a-3 mentioned in the above embodiment.
[0256] Understandably, in some video or live streaming applications, the bullet comment layer is not destroyed when the bullet comment function is enabled and then disabled. For example... Figure 11 The third interface shown in (1) represents a scenario where the bullet screen function is enabled and bullet screen content exists. That is, the third interface is obtained by layer rendering and compositing at least a video layer containing video content and a bullet screen layer containing bullet screen content. When the user performs a fourth operation on the second control 203, such as clicking, the phone responds to the fourth operation and disables the bullet screen function. For this scenario, based on the bullet screen layer management method provided in this application embodiment, the following will be displayed: Figure 11 The fifth interface is shown in (2). The fifth interface is obtained by rendering and compositing N-1 layers. Specifically, these N-1 layers include video layers with video content, but do not include bullet screen layers without bullet screen content.
[0257] Understandably, when the user performs a fourth operation on the second control 203, the exit event 1 mentioned in the above embodiment will be triggered. For details on the operations after triggering exit event 1, please refer to... Figure 6 The description of exit event 1 in steps S116 to S118 of the embodiment will not be repeated here.
[0258] In addition, it should be noted that video and live streaming applications currently also support picture-in-picture playback mode (first playback mode). For example... Figure 12 As shown, the picture-in-picture playback mode window is small, and there may be other application layers below the window. Figure 12(This refers to the desktop layer). Therefore, to simplify processing, the bullet comment layer is usually destroyed in picture-in-picture playback mode. Thus, when the bullet comment function is enabled, if the first video is played in the second playback mode (picture-in-picture), the number of layers participating in layer rendering and compositing is the same as the number of drawn layers, such as M. Here, M is an integer greater than 1. For example... Figure 12 In the picture-in-picture playback mode, the sixth interface is obtained by rendering and compositing at least two layers: the video layer and the desktop layer.
[0259] In addition, it should be noted that if the user performs a fifth operation to close the first video while the video application 1 is playing, the phone will respond to the fifth operation and return to the previous screen. Figure 9 The first interface is shown in (2). In this case, the previously set second flag will change from the first value to the second value. The second flag with the second value is used to indicate that the decoder corresponding to the first video has been destroyed. In this case, you can first exit the control of the bullet screen layer.
[0260] For implementation details of this step, please refer to [link / reference]. Figure 6 The description of exit event 2 in steps S116 to S118 of the embodiment will not be repeated here.
[0261] In addition, it should be noted that if the user performs the sixth operation to exit the video application 1 while the first video is playing, the phone will respond to the sixth operation and return to the previous screen. Figure 9 The desktop shown in (1) can also be switched to other applications. In this case, the previously set first flag will change from the first value to the second value, and the second flag will change from the first value to the second value. Among them, the first flag of the second value is used to indicate that the preset whitelist application has been exited, and the second flag of the second value is used to indicate that the decoder corresponding to the first video has been destroyed. In this case, you can also exit the control of the bullet screen layer first.
[0262] For implementation details of this step, please refer to [link / reference]. Figure 6 The description of exit event 3 in steps S116 to S118 of the embodiment will not be repeated here.
[0263] For applications that are not on the default whitelist, such as Figure 13 The video application 2 shown on the desktop in Figure (1) will launch when the user performs a seventh operation on the video application 2, such as clicking.
[0264] Optionally, during the launch of video application 2, application information of video application 2 can also be obtained. This allows determination of whether the currently launched video application 2 is a pre-defined whitelist application based on the obtained application information.
[0265] For details on the implementation of launching video application 2, please refer to [link / reference]. Figure 6 Steps S101 and S102 in the illustrated embodiment will not be described again here.
[0266] For information on determining whether video application 2 is a default whitelist application, and the actions to take if video application 2 is not a default whitelist application, please refer to [link to relevant documentation]. Figure 6 Step S103 in the illustrated embodiment, and Figure 5 The description of setting the first flag to the second value or not setting the first flag in the power management mode is not repeated here.
[0267] See Figure 13 In example (2), after launching video application 2, the phone's interface will switch from the desktop to the seventh interface.
[0268] See Figure 13 In (2), for example, the seventh interface may include option 301 corresponding to the second video.
[0269] For example, when the user performs a seventh operation on option 301, such as clicking, the phone responds to the seventh operation by displaying an eighth screen and starting to play the second video.
[0270] Optionally, in some possible implementations, the eighth interface may be, for example, an interface for playing the second video in full-screen mode, such as... Figure 14 The second interface is shown in (1).
[0271] Alternatively, in some other possible implementations, the eighth interface may be, for example, an interface that plays the second video in a half-screen playback mode.
[0272] For ease of explanation, this application embodiment uses the eighth interface as an example. Figure 14 Take the eighth interface shown in (1) as an example.
[0273] Optionally, the eighth interface may include the multimedia screen corresponding to the second video and a third control 302. The third control 302 is used to enable the bullet screen function, i.e., its function is the same as that of control 10a-1 mentioned in the above embodiment.
[0274] Understandably, since video application 1 is not on the preset whitelist, it will not execute the bullet screen layer control method provided in this application embodiment. Therefore, regardless of whether the current scenario has bullet screens or not, the final number of layers participating in layer rendering and composition is the same as the number of layers drawn by video application 2. For example, if video application 2 draws K layers, regardless of whether the bullet screen function is enabled, since the bullet screen layer and the video layer belong to the same layer, the initial number of layers participating in layer rendering and composition is K. Here, K is a number greater than 1.
[0275] This allows for the control of the bullet screen layer during the playback of the first video by applications on the preset whitelist. This ensures that users can see the bullet screen content in a timely manner, while also reducing the power consumption of the terminal device when there is no bullet screen content.
[0276] Furthermore, it is understood that, in order to achieve the aforementioned functions, the terminal device includes hardware and / or software modules corresponding to the execution of each function. Based on the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0277] Furthermore, it should be noted that in practical application scenarios, the bullet screen layer management methods provided in the above embodiments, implemented by the terminal device, can also be executed by a chip system included in the terminal device. This chip system may include a processor. The chip system can be coupled to a memory, enabling it to call computer programs stored in the memory during runtime to implement the steps executed by the terminal device. The processor in this chip system can be an application processor or a non-application processor.
[0278] In addition, this application embodiment also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on a terminal device, the terminal device performs the above-mentioned related method steps to implement the bullet screen layer control method in the above embodiment.
[0279] In addition, this application also provides a computer program product that, when run on a terminal device, causes the terminal device to perform the above-mentioned related steps to realize the bullet screen layer control method in the above embodiments.
[0280] In addition, embodiments of this application also provide a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuits communicate with each other through internal connection paths, and the processing circuits execute the above-mentioned related method steps to implement the bullet screen layer control method in the above embodiments, so as to control the receiving pin to receive signals and control the sending pin to send signals.
[0281] Furthermore, as can be seen from the above description, the terminal device, computer-readable storage medium, computer program product, or chip provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0282] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for controlling bullet screen layers, characterized in that, include: In response to the first operation, the first application is launched and the first interface is displayed. The first interface includes options corresponding to the first video. The first application is a preset whitelist application, which is an application where the video layer and the bullet screen layer do not belong to the same layer. In response to a second operation applied to the option corresponding to the first video, a second interface is displayed. The second interface includes a multimedia screen corresponding to the first video and a first control, which is used to enable the bullet screen function. In response to a third operation applied to the first control, the bullet screen function is enabled, the first control is not displayed, and a second control is displayed, the second control being used to disable the bullet screen function; When the bullet screen function is enabled, if the multimedia screen corresponding to the first video currently contains corresponding bullet screen content, a third interface is displayed. The third interface is rendered and synthesized from N layers, including the video layer corresponding to the multimedia screen and the bullet screen layer containing the bullet screen content, where N is an integer greater than 1. When the bullet screen function is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, a fourth interface is displayed. The fourth interface is rendered and synthesized by N-1 layers. The N-1 layers include the video layer but do not include the bullet screen layer that does not have bullet screen content. In response to a fourth operation applied to the second control, the bullet screen function is turned off; wherein, if the bullet screen function is turned off after being turned on, the bullet screen layer will not be destroyed; When the bullet screen function is turned off, a fifth interface is displayed. The fifth interface is rendered and composed of N-1 layers, including the video layer but excluding the bullet screen layer.
2. The method according to claim 1, characterized in that, After enabling the bullet screen function, the method further includes: The first application draws N layers, including the bullet screen layer; When the bullet screen function is enabled, if the multimedia screen corresponding to the first video currently contains corresponding bullet screen content, a third interface is displayed, including: When the bullet screen function is enabled, if the multimedia screen corresponding to the first video currently contains corresponding bullet screen content, the N layers are rendered and composited to obtain the third interface; Display the third interface; When the bullet screen function is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, a fourth interface is displayed, including: When the bullet screen function is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, the N-1 layers excluding the bullet screen layer are rendered and composited to obtain the fourth interface. The fourth interface is displayed.
3. The method according to claim 1, characterized in that, When the bullet screen function is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, a fourth interface is displayed, including: When the bullet screen function is enabled, if there is no corresponding bullet screen content on the multimedia screen corresponding to the first video, the third interface is displayed. After the third interface has been displayed for a first duration, if the multimedia screen corresponding to the first video does not contain corresponding bullet comments, the fourth interface is displayed.
4. The method according to claim 1, characterized in that, After disabling the bullet screen function, the method further includes: The first application draws N layers, including the bullet screen layer; When the bullet screen function is turned off, a fifth interface is displayed, including: With the bullet screen function disabled, N-1 layers excluding the bullet screen layer are rendered and composited to obtain the fifth interface; The fifth interface is displayed.
5. The method according to claim 1, characterized in that, In response to the first operation, the first application is launched and the first interface is displayed, including: In response to the first operation, launch the first application and obtain the application information of the first application; Determine whether the application information of the first application is the same as the application information of the preset whitelist applications, and display the first interface.
6. The method according to claim 5, characterized in that, Determining whether the application information of the first application is the same as the application information of the preset whitelist applications includes: If it is determined that the application information of the first application is the same as the application information of the preset whitelist application, a first flag of the first value is set, and the first flag of the first value is used to indicate that the first application is the preset whitelist application.
7. The method according to claim 6, characterized in that, When the bullet screen function is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, a fourth interface is displayed, including: When the bullet screen function is enabled, if the first video is played in the first playback mode and there is no corresponding bullet screen content on the multimedia screen corresponding to the first video, the fourth interface is displayed, and the first playback mode is either full-screen playback mode or half-screen playback mode.
8. The method according to claim 7, characterized in that, The method further includes: When the bullet screen function is enabled, if the first video is played in the second playback mode, a sixth interface is displayed. The sixth interface is rendered and composed of M layers, including the video layer, where M is an integer greater than 1. The second playback mode is a picture-in-picture playback mode.
9. The method according to claim 7, characterized in that, When the first video is played in the first playback mode, the method further includes: A second flag is set to a first value, which is used to indicate that the first video is played in the first playback mode.
10. The method according to claim 9, characterized in that, When the bullet screen function is enabled, if the multimedia screen corresponding to the first video does not have corresponding bullet screen content, a fourth interface is displayed, including: When the first marker is the first value, the second marker is the first value, and the first application has the bullet screen function enabled, determine whether the N layers drawn by the first application include the bullet screen layer without bullet screen content; If it is determined that among the N layers drawn by the first application is a bullet screen layer without bullet screen content, the fourth interface is displayed.
11. The method according to claim 10, characterized in that, Determining whether the N layers drawn by the first application include a bullet screen layer without bullet screen content includes: Based on the AI image recognition function, determine whether the first control is included in the N layers drawn by the first application; If it is determined that the first control is included among the N layers drawn by the first application, then it is determined that the N layers drawn by the first application include the bullet screen layer without bullet screen content.
12. The method according to claim 10, characterized in that, Determining whether the N layers drawn by the first application include a bullet screen layer without bullet screen content includes: Determine the rendering frame rate for each layer rendered by the first application; Based on the drawing frame rate, determine whether the N layers drawn by the first application include the bullet screen layer without bullet screen content.
13. The method according to claim 12, characterized in that, Based on the rendering frame rate, determining whether the N layers rendered by the first application include a bullet screen layer without bullet screen content includes: For each layer, if the drawing frame rate is 0 for multiple consecutive frames, the layer is determined to be the bullet screen layer without bullet screen content.
14. The method according to claim 13, characterized in that, The method further includes: In response to the fifth operation, the first video is closed, the first interface is displayed, and the second flag is changed from the first value to a second value, the second flag of the second value being used to indicate that the decoder corresponding to the first video has been destroyed.
15. The method according to claim 13, characterized in that, The method further includes: In response to the sixth operation, the first application is exited, and the first flag is changed from the first value to the second value, and the second flag is changed from the first value to the second value. The first flag of the second value is used to indicate that the preset whitelist application has been exited, and the second flag of the second value is used to indicate that the decoder corresponding to the first video has been destroyed.
16. The method according to claim 13, characterized in that, The method further includes: In response to the seventh operation, the second application is launched and the seventh interface is displayed. The seventh interface includes options corresponding to the second video. The second application is not the preset whitelist application. In response to an eighth operation applied to the option corresponding to the second video, an eighth interface is displayed, the eighth interface including the multimedia screen corresponding to the second video and a third control, the third control being used to enable the bullet screen function; In response to the ninth operation performed on the third control, the bullet screen function is enabled; When the bullet screen function is enabled, if the multimedia screen corresponding to the second video currently contains corresponding bullet screen content, the ninth interface is displayed. The ninth interface is rendered and synthesized by K layers, including the video layer corresponding to the multimedia screen and the bullet screen layer containing the bullet screen content, where K is an integer greater than 1. When the bullet screen function is enabled, if the multimedia screen corresponding to the second video does not have corresponding bullet screen content, the tenth interface is displayed. The tenth interface is rendered and synthesized by K layers, including the video layer and the bullet screen layer without bullet screen content.
17. A terminal device, characterized in that, The terminal device includes: a memory and a processor, the memory and the processor being coupled; the memory stores program instructions, which, when executed by the processor, cause the terminal device to perform the control method for the bullet screen layer as described in any one of claims 1 to 16.
18. A computer-readable storage medium, characterized in that, The method includes a computer program that, when run on a terminal device, causes the terminal device to perform the control method for the bullet screen layer as described in any one of claims 1 to 16.
Citation Information
Patent Citations
Terminal control method, device, terminal device, and storage medium
CN109151966A
Interface identification method and device
CN115633219A
Bullet screen identification method and related device
CN116095382A