Message display method and electronic equipment

CN121605628APending Publication Date: 2026-03-03HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480036378.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

During user interaction with electronic devices, banner or pop-up notifications may distract users and impede their focus, resulting in a poor user experience.

Method used

Instead of displaying messages as banners or pop-ups, reuse controls from the first application to show messages, leveraging the controllability of these controls, such as chat or voice buttons, and displaying indicators in edge areas to notify the user that the message has been received.

Benefits of technology

It avoids interference with the user's field of vision and concentration, improves the user interaction experience, ensures that important messages are not missed, and intelligently displays messages according to the scenario.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121605628A_ABST
    Figure CN121605628A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a message display method and electronic equipment, and relates to the technical field of terminals. The message display method can be applied to the electronic equipment, and comprises the following steps: displaying a first interface of a first application program; under the condition that the first interface is displayed, obtaining a first message; and displaying a message window control of the first application program on the first interface, and displaying the first message on the message window control. Therefore, the method and the device can prevent the banner or the pop-up window from interfering with the current interaction process of the user in a part of scenes where the user interacts with the electronic equipment, so as to improve the interaction experience of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Message display method and electronic device TECHNICAL FIELD

[0001] The present application relates to the technical field of terminals, and in particular to a message display method and an electronic device. BACKGROUND

[0002] Electronic devices usually have various forms of messages, such as short messages, multimedia messages, instant messages, emails, application notifications, system notifications, push messages, and the like.

[0003] In some scenarios, when a user interacts with an electronic device, the electronic device can receive a message and notify the user of the message in the form of a banner or a pop-up window. In this way, the banner or the pop-up window can interfere with the current interaction process of the user. For example, in a game scenario, a message received by a chat application can be displayed on a current game page of a game application in the form of a banner. In this way, the banner can block a game character on the current game page, affecting the user's field of vision and concentration, and resulting in a poor user interaction experience.

[0004] SUMMARY

[0005] Embodiments of the present application provide a message display method and an electronic device, which can avoid interference of a banner or a pop-up window with a current interaction process of a user in some scenarios in which the user interacts with the electronic device, so as to improve the user's interaction experience.

[0006] In a first aspect, an embodiment of the present application provides a message display method applied to an electronic device, including: displaying a first interface of a first application; obtaining a first message while the first interface is displayed; displaying a first control of the first application on the first interface, and displaying the first message on the first control. The first control is used to display a message window.

[0007] The message display method shown in the embodiments of the present application can display a first message on a first control in a first application, instead of displaying the first message on a first interface of the first application in the form of a banner or a pop-up window, when the electronic device obtains the first message during the user's interaction with the electronic device based on the first application. In this way, since the display mode of the first control is controllable, interference with the user's field of vision and concentration can be avoided, and therefore, the message display method based on the first control can improve the user's interaction experience.

[0008] In an implementation manner, the first message includes at least one of an application message of a second application and a system message. In this implementation manner, the first message can be not only an application message, but also a system message issued by a server, and the embodiments of the present application support display of the first message of various message types.

[0009] In an implementation manner, the first control includes at least one operation button, each operation button has a corresponding operation window; wherein the operation button includes at least one of a signal button, a voice button and a chat button, and the operation window includes at least one of a signal window corresponding to the signal button, a voice window corresponding to the voice button and a chat window corresponding to the chat button. By using the implementation manner, the specific control characteristics of the first control are shown, and it is indicated that the embodiments of the present application reuse the first control in the first application.

[0010] In an implementation manner, the first control of the first application is displayed on the first interface, and the first message is displayed on the first control, including: the first control of the first application is displayed on the first interface, the chat button is highlighted displayed on the first control, the chat window corresponding to the chat button is displayed on the first control, and the first message is displayed on the chat window. By using the implementation manner, based on the specific control characteristics of the first control, the embodiments of the present application show the specific way of displaying the first message in the first control.

[0011] In an implementation manner, the first interface includes the second control of the first application, and the second control is used for message prompt, and after the first message is acquired in the case of displaying the first interface, the implementation manner further includes: the first identifier is displayed in the adjacent area of the second control, the first identifier is used for identifying that the first message has been acquired; after the first identifier is displayed, in response to the click operation of the user on the second control, the first control of the first application is displayed on the first interface, and the first message is displayed on the first control. By using the implementation manner, the electronic device can notify the user that the first message has been received through the first identifier, so that the user can avoid missing important messages, and since the second control is usually located in the edge area of the first interface, the first identifier is displayed in the adjacent area of the second control, which can avoid interfering with the user's field of vision and concentration, so that the user's interaction experience can be improved.

[0012] In an implementation, after displaying the first interface of the first application, the method further includes: determining a target scene in which the first interface is located, the target scene including a preset key scene and a preset non-key scene; in a case where the target scene is the key scene, after displaying the first identifier, in response to a click operation of the second control by the user, displaying the first control of the first application in the first interface, and displaying the first message in the first control; in a case where the target scene is the non-key scene, displaying the first control of the first application in the first interface, and displaying the first message in the first control. With this implementation, the electronic device can determine a specific target scene to provide a specific manner of displaying the first message, so that in the non-key scene, the electronic device can directly pop up the first control to quickly display the first message, avoiding missing of important messages by the user. In the key scene, the electronic device can notify the user that the first message has been received through the first identifier, avoiding interference to the user. This implementation can more specifically meet the needs of the user.

[0013] In an implementation, the first control is displayed in an edge region of the first interface, the edge region being a region that does not block a target character in the target scene, the target character being a character controlled by the user on the electronic device. With this implementation, a specific display position of the first control is shown, so that the first control can avoid interference to the field of view of the user.

[0014] In an implementation, in a case where the first interface is displayed, the first message is obtained by: obtaining N second messages based on the second application, N being a positive integer; in a case where the do-not-disturb mode is started, caching M target messages in the N second messages as the first message, and intercepting N-M non-target messages in the N second messages, M being a positive integer, and N being greater than or equal to M. With this implementation, even in the do-not-disturb mode, the electronic device will not shield all messages, but selectively cache important target messages as the first message, so that missing of important messages by the user can be avoided.

[0015] In an implementation, in a case where the do-not-disturb mode is started, the M target messages in the N second messages are cached as the first message, and the N-M non-target messages in the N second messages are intercepted, by: determining at least one sender corresponding to the N second messages; selecting at least one preset target sender from the at least one sender; caching the M target messages corresponding to the target sender as the first message, and intercepting the N-M non-target messages in the N second messages. With this implementation, a specific manner of selecting target messages by the electronic device in the do-not-disturb mode is shown.

[0016] In an implementation, the application layer of the electronic device includes a first application, the system library of the electronic device includes a first interface, a first engine, and a system-level synthesizer SurfaceFlinger, and the hardware layer of the electronic device includes a graphics processing unit GPU. Displaying a first interface of the first application includes: starting the first application; the first application calling the first interface to issue a first instruction to the GPU, the first interface including at least one of an embedded system graphics library EGL interface and an open graphics library OpenGL interface; based on the first instruction, the GPU performing a user interface UI separation operation to obtain a second control and a first control; the first engine obtaining the second control and the first control, the first engine including a game update engine GUE; the first engine sending the second control and / or the first control to the SurfaceFlinger; and the SurfaceFlinger sending the second control and / or the first control to be displayed to display the first interface, the second control and / or the first control being displayed in the first interface. With this implementation, the electronic device can reuse the first control and the second control based on the UI separation operation, so that the electronic device can display a first message based on the first control. This can not only avoid interfering with the current interaction process of the user, but also avoid the user missing important information, and improve the user's interaction experience.

[0017] In an implementation, the framework layer of the electronic device includes an activity management service AMS. When the first interface is displayed, obtaining the first message includes: the AMS monitoring the first message and sending the first message to the first engine; and the first engine caching the first message. With this implementation, the electronic device caches the first message to the first engine, so that the first engine can call the first message. The first engine can further interact with the SurfaceFlinger to process the first message, reuse the first control, and further improve the user's interaction experience and avoid the user missing important information.

[0018] In an implementation, when the first interface displays the first control of the first application, the first control displays the first message, which includes: when the first engine caches the first message, the first engine sends a first request to the SurfaceFlinger, so that the SurfaceFlinger sends a first buffer to the GUE; the GUE fills the first message with graphics data in the first buffer and sends the filled first buffer to the SurfaceFlinger.

[0019] The SurfaceFlinger synthesizes and displays the graphic data of the first message with the first control based on the filled first Buffer, so as to display the first control on the first interface, and display the first message on the first control. By using the implementation manner, the reuse of the first control can be implemented, and the interactive experience of the user is improved, and the user can avoid missing important information.

[0020] In an implementation manner, in the case that the first engine caches the first message, the first engine sends a first request to the SurfaceFlinger to make the SurfaceFlinger send the first Buffer to the GUE, comprising: in the case that the first engine caches the first message, the first engine sends a second request to the SurfaceFlinger to make the SurfaceFlinger send the second Buffer to the GUE; the GUE fills the first layer in the second Buffer, and sends the filled second Buffer to the SurfaceFlinger, wherein the first layer includes the first identifier, and the area of the first layer other than the first identifier is a transparent area; the SurfaceFlinger synthesizes and displays the first layer with the second control based on the filled second Buffer, to display the second control, and display the first identifier in the adjacent area of the second control, wherein the layer level of the first layer includes being above the second control; after displaying the first identifier, in response to the click operation of the user on the second control, the first engine sends the first request to the SurfaceFlinger to make the SurfaceFlinger send the first Buffer to the GUE. By using the implementation manner, the specific manner in which the electronic device arouses the first control based on the second control is shown, so that the display manner of the first control is controllable, the interference on the field of vision and concentration of the user can be avoided, and the interactive experience of the user is improved.

[0021] In an implementation manner, the framework layer of the electronic device includes an input service InputFlinger, in response to the click operation of the user on the second control, the first engine sends the first request to the SurfaceFlinger, comprising: the InputFlinger acquires the click operation on the second control; the InputFlinger sends a first notification event to the SurfaceFlinger, the first notification event includes that the click operation is located in the first layer; the SurfaceFlinger sends the first notification event to the first engine; the first engine reads the cached first message based on the first notification event; and the first engine sends the first request to the SurfaceFlinger. By using the implementation manner, the specific manner in which the user interacts with the electronic device is shown.

[0022] In an implementation, the system library of the electronic device includes a scene identification module, and determining a target scene in which the first interface is located includes: the InputFlinger obtaining a target operation on the first interface; the InputFlinger sending a second notification event to the scene identification module, the second notification event including that the target operation is a single-hand operation or a double-hand operation; in a case where the target operation is the double-hand operation, the scene identification module determining that the target scene is a critical scene; in a case where the target operation is the single-hand operation, the scene identification module determining that the target scene is a non-critical scene. With this implementation, the specific manner in which the electronic device determines the target scene is shown, so that the electronic device can perform scene identification based on the operation manner of the user, and can more targetedly meet the user demand.

[0023] In an implementation, in a case where the target operation is the single-hand operation, the scene identification module determining that the target scene is the non-critical scene includes: the scene identification module obtaining target information corresponding to a target region from the GPU, the target information including a position and a size of the target region, the target region including a first region and a second region; the scene identification module identifying the first region and the second region based on the target information; the scene identification module determining whether the single-hand operation is located in the first region or the second region; in a case where the single-hand operation is located in the first region or the second region, the scene identification module determining that the target scene is the non-critical scene. With this implementation, the specific manner in which the electronic device determines the target scene is shown, so that the electronic device can perform scene identification according to the operation manner of the user and the operation region of the user, the accuracy of scene identification is improved, and the user demand can be more targetedly met.

[0024] In an implementation, the system library of the electronic device includes a scene identification module, and determining a target scene in which the first interface is located includes: the scene identification module obtaining at least one animation effect from the GPU; the scene identification module determining whether the animation effect is a target animation effect; in a case where the animation effect is the target animation effect, the scene identification module determining that the target scene is a non-critical scene. With this implementation, the specific manner in which the electronic device determines the target scene is shown, so that the electronic device can perform scene identification according to the animation effect, in a case where the animation effect is a return base effect or a death effect, the electronic device can determine that these effects correspond to the non-critical scene, the accuracy of scene identification is improved, and the user demand can be more targetedly met.

[0025] In an implementation manner, the application layer of the electronic device includes a second application, the framework layer of the electronic device includes an activity management service (AMS) and a first component, the first component includes a game kit (GameKit), and the first message is acquired in a case where the first interface is displayed, including: in a case where N second messages are acquired based on the second application, the AMS monitors the second messages, and sends the second messages to the first engine; in a case where the do-not-disturb mode is started, the first component acquires a sender list from the second application, wherein the sender list includes at least one target sender; the first component sends the sender list to the first engine; the first engine compares at least one sender corresponding to the second message with the sender list to filter out at least one preset target sender; the first engine caches M target messages corresponding to the target sender as the first message, and intercepts N-M non-target messages in the N second messages. By adopting the implementation manner, the electronic device can filter the sender, and only provide important messages sent by the target sender to the user.

[0026] In a second aspect, an electronic device is provided, which includes a touch screen, a memory and one or more processors; the touch screen, the memory and the processors are coupled; the memory stores computer program codes including computer instructions, which, when executed by the processors, cause the electronic device to perform the message display method according to any possible implementation manner of the first aspect.

[0027] In a third aspect, a computer readable storage medium is provided, which includes computer instructions, which, when executed on an electronic device, cause the electronic device to perform the message display method according to the first aspect and any possible implementation manner thereof.

[0028] In a fourth aspect, a computer program product is provided, which, when executed on an electronic device, causes the electronic device to perform the message display method according to the first aspect and any possible implementation manner thereof.

[0029] It can be understood that the beneficial effects that can be achieved by the technical solutions provided in the second aspect to the fourth aspect can refer to the beneficial effects in the first aspect and any possible implementation manner thereof, which will not be described herein again. BRIEF DESCRIPTION OF DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0031] FIG. 1 is a schematic diagram of a scenario in which a message interferes with a user's field of view;

[0032] FIG. 2 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application;

[0033] FIG. 3 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;

[0034] FIG. 4 is a first flowchart of a message display method according to an embodiment of the present application;

[0035] FIG. 5 is a first schematic diagram of a scenario of a message display method according to an embodiment of the present application;

[0036] FIG. 6 is a second flowchart of a message display method according to an embodiment of the present application;

[0037] FIG. 7 is a first interaction diagram of software modules involved in a message display method according to an embodiment of the present application;

[0038] FIG. 8 is a schematic diagram of a scenario in which an electronic device acquires a first message according to an embodiment of the present application;

[0039] FIG. 9 is a schematic diagram of a scenario in which an electronic device displays a first identifier according to an embodiment of the present application;

[0040] FIG. 10 is a schematic diagram of a scenario in which an electronic device arouses a message window control according to an embodiment of the present application;

[0041] FIG. 11 is a third flowchart of a message display method according to an embodiment of the present application;

[0042] FIG. 12 is a second interaction diagram of software modules involved in a message display method according to an embodiment of the present application;

[0043] FIG. 13 is a first flowchart of a message display method according to an embodiment of the present application;

[0044] FIG. 14 is a schematic diagram of a scenario in which an electronic device displays a first message according to an embodiment of the present application;

[0045] FIG. 15 is a second flowchart of a message display method according to an embodiment of the present application;

[0046] FIG. 16 is an interaction diagram of software modules involved in a message display method according to an embodiment of the present application;

[0047] FIG. 17 is a first flowchart of a message display method according to an embodiment of the present application;

[0048] FIG. 18 is a schematic diagram of a scenario in which an electronic device displays a first message according to an embodiment of the present application;

[0049] FIG. 19 is a first flowchart of a message display method according to an embodiment of the present application;

[0050] FIG. 20 is a schematic diagram of a critical scenario according to an embodiment of the present application;

[0051] FIG. 21 is a first schematic diagram of a non-critical scenario according to an embodiment of the present application;

[0052] FIG. 22 is a second schematic diagram of a non-critical scenario according to an embodiment of the present application;

[0053] FIG. 23 is a third schematic diagram of a non-critical scenario according to an embodiment of the present application;

[0054] FIG. 24 is a fourth schematic diagram of a non-critical scenario according to an embodiment of the present application;

[0055] FIG. 25 is a second flowchart of a message display method according to an embodiment of the present application;

[0056] FIG. 26 is an interaction diagram of software modules involved in a message display method according to an embodiment of the present application;

[0057] FIG. 27 is a schematic diagram of a scenario in which a user performs a target operation according to an embodiment of the present application;

[0058] FIG. 28 is a first flowchart of a message display method according to an embodiment of the present application;

[0059] FIG. 29 is a schematic diagram of a scenario in which an electronic device starts a do-not-disturb mode according to an embodiment of the present application;

[0060] FIG. 30 is a second flowchart of a message display method according to an embodiment of the present application;

[0061] FIG. 31 is an interaction diagram of software modules involved in a message display method according to an embodiment of the present application;

[0062] FIG. 32 is a schematic diagram of a target sender according to an embodiment of the present application;

[0063] FIG. 33 is a schematic diagram of a message display apparatus according to an embodiment of the present application;

[0064] FIG. 34 is a schematic diagram of a chip system according to an embodiment of the present application. DETAILED DESCRIPTION

[0065] The technical solutions of the embodiments of the present application will be described clearly below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, other embodiments obtained by those skilled in the art without creative effort are within the scope of the present application.

[0066] In the description of the present application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" herein is only a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can mean that A exists alone, A and B exist together, and B exists alone. In addition, "at least one" means one or more, and "multiple" means two or more. "First", "second", etc. do not limit the quantity and execution order, and "first", "second", etc. do not necessarily mean different.

[0067] It should be noted that in the present application, the words "exemplary" or "for example" are used to mean an example, illustration, or description. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design solutions. Rather, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner.

[0068] The application scenario of the embodiments of the present application will be described first as follows.

[0069] In some scenarios, when a user interacts with an electronic device, the electronic device can receive a message and notify the user of the message in the form of a banner or a pop-up window. In this way, the banner or the pop-up window can interfere with the current interaction process of the user.

[0070] The game scenario is exemplarily described as an example.

[0071] FIG. 1 is a schematic diagram of a scenario in which a message interferes with the user's field of view.

[0072] As shown in A of FIG. 1, an electronic device loads an action game application and displays a game interface 10. The user can control a game character 11 to perform real-time physical actions such as walking, running, jumping, fighting, climbing, and throwing in the game interface 10. In the current game interface 10, the user controls the game character 11 to fight in an A1 area.

[0073] As shown in B of FIG. 1, when the user controls the game character 11 to fight, a chat application running in the background of the electronic device can receive a chat message 12. The electronic device can display a banner control 13 in the game interface 10 and display the chat message 12 in the banner control 13. In this way, the banner control 13 blocks the A1 area of the game interface 10, affecting the user's control field of view of the game character 11, resulting in a poor user interaction experience.

[0074] To solve the above problem, the present application provides a message display method.

[0075] The message display method provided by the embodiments of the present application can be applied to an electronic device. The electronic device includes, but is not limited to, a mobile phone, a tablet computer, a personal computer, a workstation device, a large-screen device (for example, a smart screen, a smart television, etc.), a wearable device (for example, a smart bracelet, a smart watch), a palm game console, a home game console, a virtual reality device, an augmented reality device, a mixed reality device, a vehicle-mounted intelligent terminal, and the like.

[0076] FIG. 2 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.

[0077] As shown in FIG. 2, the electronic device 100 can include a processor 110, a memory 120, 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 loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, a camera 192, a display screen 193, and a subscriber identification module (SIM) card interface 194, and the like. The sensor module 180 can include a touch sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a geomagnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, and the like. The gyroscope sensor 180B, the barometric pressure sensor 180C, the geomagnetic sensor 180D, the acceleration sensor 180E, and the like can be used to detect the motion state of the electronic device, and thus can also be referred to as a motion sensor.

[0078] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0079] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0080] In the embodiments of the application, the GPU can be used to process graphics rendering and image processing tasks. For example, in a game scenario, the GPU can render 3D models and scenes to provide an immersive gaming experience. The GPU can also perform graphics pipeline processing to ensure real-time rendering of game pictures. The GPU can also execute shader programs to control the visual effects of graphics rendering. In the process of rendering game pictures by the GPU, processing of message prompt controls and message window controls is involved.

[0081] The memory 120 can be used to store computer executable program codes, and the executable program codes include instructions. The memory 120 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during use of the electronic device 100 (such as audio data, a phonebook, etc.), etc. In addition, the memory 120 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various function applications and data processing of the electronic device 100 by running instructions stored in the memory 120 and / or instructions stored in the memory arranged in the processor.

[0082] The USB interface 130 is an interface conforming to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect earphones to play audio through the earphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0083] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection modes or a combination of multiple interface connection modes.

[0084] The charging management module 140 is configured to receive charging input from a charger.

[0085] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to supply power to the processor 110, the memory 120, the display screen 193, the camera 192, and the wireless communication module 160.

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

[0087] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0088] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The modem processor can include a modulator and a demodulator. Among them, the modulator is used to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is transmitted to the application processor after being processed by the baseband processor. The application processor outputs the sound signal through the audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays the image or video through the display screen 193. The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc. applied to the electronic device 100.

[0089] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.

[0090] The electronic device 100 realizes the display function through the GPU, the display screen 193, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.

[0091] The display screen 193 is used to display images, videos, etc. The display screen 193 includes a display panel. In some embodiments, the electronic device 100 can include 1 or N display screens 193, N being a positive integer greater than 1.

[0092] The electronic device 100 can realize the shooting function through the ISP, the camera 192, the video codec, the GPU, the display screen 193, and the application processor, etc.

[0093] ISP is used to process the data feedback by the camera 192. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and conversion into a visible image. ISP can also optimize the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, ISP can be provided in the camera 192.

[0094] The camera 192 is used to capture still images or videos. Objects generate optical images through lenses and project them onto photosensitive elements. The photosensitive elements convert the light signals into electrical signals, which are then transmitted to the ISP for conversion into digital image signals. The ISP outputs the digital image signals to the DSP for processing. The DSP converts the digital image signals into standard RGB, RYYB, YUV, and other formats of image signals. In some embodiments, the electronic device 100 can include one or N cameras 192, where N is a positive integer greater than 1.

[0095] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the microphone 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playback, recording, etc.

[0096] The touch sensor 180A is also referred to as a "touch device". The touch sensor 180A can be provided on the display screen 193, and the touch sensor 180A and the display screen 193 form a touch screen, also referred to as a "touch screen". The touch sensor 180A is used to detect touch operations acting on or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the touch event type. The display screen 193 can provide visual output related to the touch operation. In other embodiments, the touch sensor 180A can also be provided on the surface of the electronic device 100, which is different from the position of the display screen 193.

[0097] In the embodiments of the present application, the touch sensor 180A can detect single-finger touch operations and double-finger touch operations, so that the electronic device 100 can identify scenes according to different touch operations.

[0098] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of shaking of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and lets the lens offset the shaking of the electronic device 100 by reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and motion sensing game scenarios.

[0099] The barometer sensor 180C is used to measure air pressure. The geomagnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of a flip cover by using the geomagnetic sensor 180D. The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 180E can also be used to identify the posture of the electronic device, and can be applied to landscape / portrait screen switching and pedometer applications.

[0100] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance by infrared or laser. In some embodiments, in a shooting scenario, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0101] The proximity light sensor 180G can include, for example, a light-emitting diode and a light detector, such as a photodiode. The light-emitting diode can be an infrared light-emitting diode. The electronic device 100 emits infrared light outwardly by the light-emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that a user is holding the electronic device 100 close to the ear for a call, so as to automatically turn off the screen to achieve power saving. The proximity light sensor 180G can also be used for automatic unlocking and locking of the skin cover mode and the pocket mode.

[0102] In embodiments of the present application, the proximity light sensor 180G can be used to detect whether a user is holding the electronic device 100 with one hand or with both hands, so that the electronic device 100 can perform scene recognition according to different holding postures.

[0103] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locking, fingerprint shooting, fingerprint answering a call, and the like.

[0104] The temperature sensor 180J is configured to detect a temperature.

[0105] The keys 190 include a power key, a volume key, and the like. The keys 190 can be mechanical keys. Alternatively, the keys 190 can be touch keys. The electronic device 100 can receive a key input and generate a key signal input related to user settings and function control of the electronic device 100.

[0106] The motor 191 can generate a vibration prompt. The SIM card interface 194 is configured to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by being inserted into or pulled out of the SIM card interface 194.

[0107] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. Embodiments of the present application take an Android system with a layered architecture as an example to exemplarily illustrate the software structure of the electronic device 100.

[0108] FIG. 3 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application.

[0109] The layered architecture divides software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Android runtime and system library, and a kernel layer.

[0110] The application layer can include a series of application packages.

[0111] As shown in FIG. 3, the application packages can include battery management, a camera, a gallery, a calendar, a call, a map, navigation, music, a video, a short message, and the like.

[0112] In embodiments of the present application, the application packages can further include a game application and a chat application.

[0113] The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some pre-defined functions.

[0114] As shown in FIG. 3, the application framework layer can include a window manager, an input manager InputManager, a sensor manager SensorManager, a phone manager, a resource manager, a notification manager, and the like.

[0115] In the embodiments of the present application, the application framework layer further includes an input service InputFlinger, an activity management service (AMS), and a game component GameKit.

[0116] The input manager can be used to listen to input events of a user, such as a click event or a sliding event performed by a finger of the user on the display screen 193 of the electronic device 100. By listening to the input events, the electronic device 100 can determine whether the electronic device 100 is being used.

[0117] The sensor manager is used to listen to data returned by various sensors in the electronic device 100, such as motion sensor data, proximity light sensor data, and temperature sensor data. Using the data returned by the various sensors, the electronic device 100 can determine whether the electronic device 100 is shaking or whether the display screen 193 is blocked.

[0118] The InputFlinger is used to manage events of input devices (such as a touch screen, a keyboard, and a mouse) and distribute the events to applications in the system to ensure accuracy of user input. Specifically, the InputFlinger receives signals from input devices (such as signals from a touch screen), converts the signals into standard input events, and distributes the input events to applications that are currently active to ensure that user operations can be accurately responded to by the applications. The InputFlinger supports obtaining single-point touch operations and multi-point touch operations, such as double-clicking, double-zooming, and the like.

[0119] The AMS is used to manage the life cycle and state of an application and can control processes such as starting, running, pausing, stopping, and destroying the application. The AMS provides a set of interfaces for building an application and provides system services and core components, which provide necessary running environments for the application. In some embodiments, the AMS can monitor message notifications in the application. The GameKit can be a component used to implement services such as user statistics, social interaction, cloud storage, and user matching.

[0120] The Android Runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0121] The core library includes two parts: one part is a function function that needs to be called by the java language, and the other part is the core library of Android.

[0122] The application program layer and the application framework layer run in a virtual machine. The virtual machine executes the java files of the application program layer and the application framework layer into binary files. The virtual machine is used to perform functions such as management of object life cycle, stack management, thread management, management of security and exceptions, and garbage collection.

[0123] The system library can include a plurality of functional modules. For example, a surface manager, media libraries, a three-dimensional graphics processing library (for example, an open graphics library OpenGL, an embedded system graphics library EGL), a 2D graphics engine (for example, SGL), a system-level compositor (SurfaceFlinger, SF), a game update engine (GUE), a scene recognition module, and the like.

[0124] The surface manager is used to manage a display subsystem, and provides fusion of 2D and 3D layers for a plurality of applications.

[0125] The media library supports playback and recording of a plurality of commonly used audio, video formats, and static image files. The media library can support a plurality of audio and video encoding formats, for example, MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, and the like.

[0126] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, composition, and layer processing, and the like.

[0127] In the embodiments of the present application, OpenGL is a cross-platform graphics API, which can be used to render 2D and 3D vector graphics. OpenGL provides a rich set of function libraries to create complex graphics applications. OpenGL can complete processes such as graphics rendering, shader programming, and hardware acceleration.

[0128] In the embodiments of the present application, EGL is a graphics API for embedded systems, which can be used to manage graphics display and window buffering.

[0129] 2D graphics engine is a drawing engine for 2D drawing. In embodiments of the present application, SurfaceFlinger is used to manage and compose the graphical interface of an application and display it on the display screen of the device. For example, an application can provide image data to SurfaceFlinger, and after receiving the image data from the application, SurfaceFlinger can put it into a queue for processing. SurfaceFlinger can traverse the queue for processing in a specific order and perform image composition according to the properties of each image data. When the image composition is completed, SurfaceFlinger can send the image to a hardware display pipeline, which transmits the image to the screen for display. In some embodiments, SurfaceFlinger can perform drawing of UI controls and drawing of transparent layers.

[0130] In embodiments of the present application, GUE can be a service for managing and distributing game content updates. This engine can be integrated into a game client or run as a standalone service to perform content distribution, incremental updates, version control, compatibility checks, user notifications, automatic updates, and other services. In some embodiments, GUE can update received message notifications.

[0131] In embodiments of the present application, the scene recognition module can recognize different elements in the game environment, such as terrain, objects, characters, etc. The scene recognition module can also detect the occurrence of specific events, such as a game character entering a certain area or collecting a specific item. In this way, the scene recognition module can trigger corresponding game logic based on the occurrence of specific events. The scene recognition module can also recognize user interaction with the game environment to provide a dynamic game experience. The scene recognition module can also recognize specific scenes to trigger visual and animation effects to enhance the visual expressiveness of the game environment.

[0132] The kernel layer is the layer between hardware and software. The kernel layer at least includes display driver, camera driver, audio driver, sensor driver, and graphics driver.

[0133] In embodiments of the present application, the graphics driver program can be used to manage and control the GPU in a computer system and related graphics functions and display devices.

[0134] In the embodiments of this application, the display driver can manage the output of the display device (such as the display screen 193) and transmit the rendered image frame in the GPU from the GPU to the display device. The display driver can cooperate with the graphics driver to control the output of the image frame. It can be understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different arrangement of components. The illustrated components can be implemented in hardware, software or a combination of software and hardware.

[0135] FIG. 4 is a first flowchart of a message display method according to an embodiment of the present application.

[0136] As shown in FIG. 4, in some embodiments, the method includes the following steps S101-S104.

[0137] In step S101, the electronic device 100 displays a first interface of a first application program.

[0138] The first application program includes a game application program, and the embodiments of this application exemplarily illustrate the first application program as a game application program, and the embodiments of this application do not limit the specific type of the first application program.

[0139] The first interface can include at least one of a message prompt control and a message window control of the first application program, and the message prompt control can be used to arouse the message window control.

[0140] This embodiment exemplarily illustrates that the first interface only includes the message prompt control. The message prompt control and the message window control both belong to a user interface (User Interface, UI) control, and the UI control is a building block of a user interface, which usually has a visual appearance and programmable behavior, and is a tool for users to interact with application programs, operating systems and web pages.

[0141] FIG. 5 is a first scenario diagram of a message display method according to an embodiment of the present application.

[0142] As shown in A of FIG. 5, the user can click the first icon 101, and in response to the click operation on the first icon 101, the electronic device 100 loads the first application program and displays the first interface 102. The first interface 102 is usually displayed in a full screen mode by the electronic device 100.

[0143] The first interface 102 includes the message prompt control 103. The message prompt control 103 is usually located at the edge region of the first interface 102 and is a small and non-intrusive UI control.

[0144] The following describes a manner in which the message prompt control arouses the message window control.

[0145] As shown in B of FIG. 5, further, the user can click the message prompt control 103 for the first time, and in response to the click operation on the message prompt control 103, the electronic device 100 arouses the message window control 104.

[0146] The message window control 104 can show detailed message content and provide operation buttons related to the message, such as a signal button 1041, a voice button 1042, a chat button 1043, and the like.

[0147] Each operation button has a corresponding operation window, so that the user can perform different types of interaction in the corresponding operation window based on different operation buttons, for example, the user can send a preset signal to other users based on the signal window corresponding to the signal button 1041 to implement game strategies such as team collection and team attack. The user can also send a voice message to other users based on the voice window corresponding to the voice button 1042. The user can also send a text message to other users based on the chat window 1044 corresponding to the chat button 1043.

[0148] An exemplary description is made with respect to the chat button 1043 and the chat window 1044 corresponding thereto.

[0149] The user can click the chat button 1043, and in response to the click operation of the user on the chat button 1043, the electronic device 100 displays the chat window 1044 corresponding to the chat button 1043. The chat window 1044 can include a chat text box 1045 and a chat scroll bar 1046. In this way, the user can interact with the electronic device 100 in the chat window 1044 to implement functions such as replying to a message and browsing historical messages.

[0150] It should be noted that, as shown in A of FIG. 5, generally, the electronic device 100 only displays the message prompt control 103 in the first interface 102, and the message window control 104 is usually in an unaroused state.

[0151] As shown in B of FIG. 5, the electronic device 100 can also keep the message window control 104 in an aroused state for a certain length of time. When the user clicks the message prompt control 103 again, the electronic device 100 can close the message window control 104, and the first interface 102 is displayed as the interface shown in A of FIG. 5.

[0152] It should be noted that after the electronic device 100 invokes the message window control 104, the message prompt control 103 can no longer be displayed, and a close control (not shown in the figure) can be displayed instead. In this way, the user can click the close control to make the electronic device 100 close the message window control 104. That is, the electronic device 100 can be in a case where only the message prompt control 103 is displayed as shown in FIG. 5A, in a case where both the message prompt control 103 and the message window control 104 are displayed as shown in FIG. 5B, or in a case where only the message window control 104 is displayed (not shown in the figure).

[0153] In this embodiment, the first interface 102 only displays the message prompt control 103. Actually, the specific display content of the first interface 102 is not limited in the embodiment of the application.

[0154] The specific interaction process involved in step S101 is described below.

[0155] FIG. 6 is a second flowchart of the message display method provided by the embodiment one of the application.

[0156] FIG. 7 is a first interaction diagram of software modules involved in the message display method provided by the embodiment one of the application.

[0157] As shown in FIG. 6 and FIG. 7, in one implementation, step S101 includes steps S1011-S1016.

[0158] In step S1011, the electronic device 100 starts the first application.

[0159] In one implementation, in response to the click operation on the first icon, the electronic device 100 can start the first application.

[0160] In step S1012, the first application calls a first interface to issue a first instruction to a GPU.

[0161] The first interface includes at least one of an embedded system graphics library (EGL) interface and an open graphics library (OpenGL) interface. The specific type of the OpenGL interface is not limited in the embodiment of the application.

[0162] In step S1013, based on the first instruction, the GPU performs a UI separation operation to obtain a message prompt control and a message window control.

[0163] The steps S1011-S1013 are exemplarily described taking the first interface as the OpenGL interface.

[0164] In response to the click operation on the first icon, the electronic device 100 starts the first application located at the application layer, and the first application invokes the OpenGL interface of the system library to issue a first instruction to the graphics driver at the kernel layer, so that the graphics driver invokes the GPU at the hardware layer to perform the UI separation operation.

[0165] The process in which the first application issues the first instruction to the graphics driver through the OpenGL interface is described below.

[0166] For example, the first application can initialize an OpenGL environment in the OpenGL interface. After the OpenGL environment is initialized, the first application configures a rendering state in the OpenGL environment, for example, a rendering state including a shader program, a texture, and a buffer. After the configuration of the rendering state is completed, the first application can further invoke the OpenGL interface to compile a shader code and generate a shader program. After the shader program is generated, the first application can create a buffer required for UI rendering and set a UI rendering pipeline. After the above configuration is completed, the first application further invokes the OpenGL interface to issue the first instruction, and the first instruction can trigger the GPU to perform a corresponding rendering operation to render the UI elements. In the process of rendering, the GPU can use multiple rendering targets, and each rendering target corresponds to a different UI element, so that the separation of the UI controls can be achieved.

[0167] Specifically, based on the first instruction, the GPU logically decouples the message prompt control and the message window control in the rendering target, so that the message prompt control and the message window control can be separated from the 3D scene or other UI controls, and the message prompt control and the message window control can be reused.

[0168] It should be noted that the specific process of the above UI separation operation can also be implemented in other forms, and the embodiments of the present application do not limit this.

[0169] In step S1014, the first engine obtains the message prompt control and the message window control.

[0170] The first engine includes a GUE. The GUE can be a system or service for managing and distributing game content updates.

[0171] In step S1015, the first engine sends the message prompt control to the SurfaceFlinger.

[0172] In step S1016, the SurfaceFlinger displays the message prompt control, so that the electronic device 100 displays the first interface and displays the message prompt control on the first interface.

[0173] The steps S1014-S1016 are exemplarily described with the first engine as a GUE.

[0174] After the GUE obtains the message prompt control and the message window control, the GUE can store the message prompt control in a built-in data structure, such as an object pool, a hash table, or an array, so as to facilitate subsequent reuse of the message window control.

[0175] It should be noted that after the GUE obtains the message prompt control and the message window control, the GUE can further process these controls, for example, rebind event listeners to these controls or update event processing logic, to ensure that these controls can be accurately responded. The specific manner in which the GUE processes the message prompt control and the message window control is not limited in the embodiments of the present application.

[0176] In the present embodiment, since the electronic device 100 only displays the message prompt control in the first interface, the GUE can only send the message prompt control to the SurfaceFlinger, and the SurfaceFlinger displays the message prompt control to make the electronic device 100 display the first interface and display the message prompt control in the first interface.

[0177] Step S102: In the case of displaying the first interface, the electronic device 100 obtains a first message.

[0178] FIG. 8 is a schematic diagram of a scenario in which the electronic device obtains a first message according to an embodiment of the present application.

[0179] As shown in FIG. 8, in an implementation manner, when the electronic device 100 displays the first interface 102 in a full-screen form, the second application program can run in the background of the electronic device 100.

[0180] The second application program includes a chat application program, and the embodiments of the present application only exemplarily describe the second application program as a chat application program, and the specific type of the second application program is not limited in the embodiments of the present application.

[0181] The electronic device 100 can receive the first message 105 based on the chat application program. In this case, the electronic device 100 does not display the first message 105 in the first interface 102 in the form of a banner or a pop-up window.

[0182] In an implementation, the first message comprises at least one of an application message of the second application program, a system message. The embodiment is exemplarily described by taking the first message as an application message of the second application program. In fact, the embodiment of the present application supports obtaining a plurality of types of first messages. It should be noted that, since the electronic device 100 can generally receive a plurality of forms of messages, some of the messages can be received in dependence on a specific application program, for example, a message received based on a chat application program. Some of the messages can be received without dependence on a specific application program, for example, a system notification, a push notification, and the like. Generally, in a game scenario, the system notification, the push notification, and the like are generally unimportant notification messages, and the message received by the chat application program is generally an important notification message. Therefore, the embodiment of the present application is exemplarily described by taking the first message as an application message of the chat application program. The embodiment of the present application does not limit the message source and the message type of the first message.

[0183] The following describes a specific interaction process involved in the step S102.

[0184] Further, as shown in FIGS. 6 and 7, in an implementation, the step S102 comprises steps S1021-S1022.

[0185] In the step S1021, the electronic device 100 monitors the first message based on the AMS, and sends the first message to the first engine.

[0186] In the step S1022, the first engine caches the first message.

[0187] In this way, after the AMS of the framework layer of the electronic device 100 monitors the first message, the first message is sent to the GUE of the system library, and the GUE can cache the first message, so that the electronic device 100 can further display the cached first message.

[0188] In the step S103, the electronic device 100 displays the first identifier in the adjacent area of the message prompt control.

[0189] The first identifier is used to identify that the electronic device 100 has obtained the first message.

[0190] FIG. 9 is a schematic diagram of a scenario in which the electronic device displays the first identifier according to the embodiment of the present application.

[0191] As shown in FIG. 9, in an implementation, after the electronic device 100 receives the first message 105 based on the chat application program, the electronic device 100 displays the first identifier 106 in the adjacent area of the message prompt control 103.

[0192] The first identifier 106 can be a circular identifier capable of displaying the number of messages. The specific identifier form of the first identifier 106 is not limited in the embodiments of the present application.

[0193] The specific interaction process involved in step S103 is described below.

[0194] Further, as shown in FIGS. 6 and 7, in an implementation, step S103 includes steps S1031-S1033.

[0195] In step S1031, when the first message is cached by the first engine, the first engine sends a second request to the SurfaceFlinger to make the SurfaceFlinger send a second buffer unit Buffer to the GUE.

[0196] In step S1032, the GUE fills the first layer in the second Buffer, and sends the filled second Buffer to the SurfaceFlinger.

[0197] The first layer includes the first identifier, and the area of the first layer other than the first identifier is a transparent area.

[0198] The process of filling a layer in the second Buffer by the GUE is described below by way of example.

[0199] In an implementation, after caching the first message, the GUE can trigger a request for creating the first layer, and send the request to the SurfaceFlinger. Based on the request, the SurfaceFlinger can send the second Buffer to the GUE. The GUE creates a new layer object in the second Buffer, and uses the layer object as a canvas. Further, the GUE can set pixels of different formats in different areas of the canvas in the second Buffer, for example, set transparent format pixels in the area other than the first identifier, and fill pixels of different color formats in the area corresponding to the first identifier. In this way, the GUE can complete the filling of the first layer in the second Buffer.

[0200] In step S1033, the SurfaceFlinger composites and displays the first layer and the message prompt control based on the filled second Buffer, so that the electronic device 100 displays the first interface, the message prompt control, and the first identifier in the adjacent area of the message prompt control.

[0201] The layer level of the first layer includes a layer above the message prompt control.

[0202] Specifically, the SurfaceFlinger can maintain a list of layers to perform layer composition according to the order and rules in the list of layers. This is because each layer has corresponding attributes, which can include the size, position, stacking order, transparency, etc. of the layer, and the SurfaceFlinger can determine the composition strategy of the layer according to the attributes of the layer. Since the layer level of the first layer is above the message prompt control, after receiving the second Buffer, the SurfaceFlinger can overlay the first layer on the message prompt control to compose the first layer and the message prompt control in the same frame interface. In this way, the electronic device 100 displays the message prompt control on the first interface and displays the first identifier in the adjacent area of the message prompt control, and the first identifier can notify the user that the first message has been obtained. Since the display area occupied by the first identifier is small, it will not affect the user's field of view, and can avoid interfering with the user's current interaction process.

[0203] Step S104, after displaying the first identifier, in response to the user's click operation on the message prompt control, the electronic device 100 displays the message window control of the first application on the first interface, and displays the first message in the message window control.

[0204] That is, after displaying the first identifier, the user can click the message prompt control in the idle time, thereby invoking the message window control.

[0205] FIG. 10 is a schematic diagram of a scenario in which the electronic device invokes the message window control according to an embodiment of the present application.

[0206] As shown in FIG. 10, in one implementation, when the first identifier 106 is displayed, the user clicks the message prompt control 103, and in response to the click operation on the message prompt control 103, the electronic device 100 invokes the message window control 104 and displays the first message 105 in the message window control 104.

[0207] In one implementation, the message window control can be displayed in the edge area of the first interface, and the edge area is an area that does not block the target role in the target scene, and the target role is a role controlled by the user on the electronic device. It should be noted that the window area of the message window control can be adjusted in the embodiments of the present application, for example, the width and height values of the message window control can be reduced. In the embodiments of the present application, the message window control with a smaller window area is not shown in the drawings, and in fact, the window area of the message window control is not limited in the embodiments of the present application.

[0208] The specific interaction process involved in step S104 is further described below.

[0209] FIG. 11 is a third flowchart of the message display method according to the first embodiment of the present application.

[0210] FIG. 12 is a second interaction diagram of the software modules involved in the message display method according to the first embodiment of the present application.

[0211] As shown in FIG. 11 and FIG. 12, in one implementation, step S104 further includes steps S1041-S1047.

[0212] In step S1041, the electronic device 100 acquires the click operation on the message prompt control through the input service InputFlinger.

[0213] In step S1042, the InputFlinger sends a first notification event to the SurfaceFlinger, the first notification event including that the click operation is located at the first layer.

[0214] In step S1043, the SurfaceFlinger sends the first notification event to the first engine.

[0215] In step S1044, the first engine reads the cached first message based on the first notification event.

[0216] In step S1045, the first engine sends a first request to the SurfaceFlinger, so that the SurfaceFlinger sends the first Buffer to the first engine.

[0217] In step S1046, the GUE fills the first message with graphic data in the first Buffer, and sends the filled first Buffer to the SurfaceFlinger.

[0218] In step S1047, the SurfaceFlinger composites and displays the graphic data of the first message with the message window control based on the filled first Buffer, so as to display the message window control in the first interface, and display the first message in the message window control.

[0219] The specific implementation of steps S1045-S1047 can refer to the foregoing steps S1031-S1033, which will not be described herein.

[0220] Further as shown in FIG. 10, in one implementation, the electronic device 100 displays the message window control 104 of the first application in the first interface 102, highlights the chat button 1043 in the message window control 104, displays the chat window 1044 corresponding to the chat button 1043 in the message window control 104, and displays the first message 105 in the chat window 1044.

[0221] In this embodiment, during the process that the user interacts with the electronic device 100 based on the first application, if the electronic device 100 obtains the first message, the electronic device 100 can not display the first message in the form of a banner or a pop-up window on the first interface of the first application, but display the first identifier in the adjacent area of the message prompt control of the first interface. Further, the electronic device 100 can arouse the message window control in response to the click operation on the first identifier, and display the first message in the message window control. In this way, since the message prompt control is usually located in the edge area of the first interface, the user is prompted to receive the first message based on the first identifier, which can avoid interference with the user's field of vision and concentration. Moreover, the user can determine the time of arousing the message window control based on the user's own needs, which can not only avoid missing important messages, but also improve the user's interaction experience.

[0222] FIG. 13 is a first flowchart of a message display method provided by the second embodiment of the present application.

[0223] As shown in FIG. 13, in some embodiments, the method includes the following steps S201-S203.

[0224] In step S201, the electronic device 100 displays the first interface of the first application.

[0225] In step S202, the electronic device 100 obtains the first message while displaying the first interface.

[0226] The step S201 can include steps S2011-S2016. The step S202 can include steps S2021-S2022. The specific implementation of steps S2011-S2016 and steps S2021-S2022 can refer to steps S1011-S1016 and steps S1021-S1022 in the first embodiment, which will not be described here.

[0227] In step S201 of the embodiment, the electronic device 100 only displays the message prompt control in the first interface.

[0228] In step S203, the electronic device 100 displays the message window control of the first application in the first interface, and displays the first message in the message window control.

[0229] FIG. 14 is a schematic diagram of a scenario in which the electronic device displays the first message according to the second embodiment of the present application.

[0230] As shown in FIG. 14, in one implementation, the electronic device 100 displays the message prompt control 103 in the first interface 102, so that after the electronic device 100 obtains the first message 105, the electronic device 100 can directly arouse the message window control 104 to make the message window control 104 display the first message 105.

[0231] The following describes the specific interaction process involved in step S203.

[0232] FIG. 15 is a second flowchart of the message display method according to the second embodiment of the present application.

[0233] FIG. 16 is an interaction diagram of software modules involved in the message display method according to the second embodiment of the present application.

[0234] As shown in FIGS. 15 and 16, in one implementation, step S203 includes steps S2031-S2033.

[0235] Step S2031, in the case where the first engine caches the first message, the first engine sends a first request to the SurfaceFlinger, so that the SurfaceFlinger sends the first Buffer to the GUE.

[0236] Step S2032, the GUE fills the first message graphic data in the first Buffer, and sends the filled first Buffer to the SurfaceFlinger.

[0237] Step S2033, the SurfaceFlinger synthesizes and displays the first message graphic data with the message window control based on the filled first Buffer, so as to display the message window control, and display the first message in the message window control.

[0238] The specific implementation of steps S2031-S2033 can be referred to steps S1045-S1047 described above. The present application does not repeat the description here.

[0239] In the present embodiment, during the user interaction with the electronic device 100 based on the first application, if the electronic device 100 obtains the first message, the electronic device 100 can not display the first message in the form of a banner or a pop-up window on the first interface of the first application, but directly arouse the message window control in the edge area of the first interface. Thus, since the message window control is usually more suitable for the layout of the first interface, the interference to the user's vision and concentration is reduced, and the UI form is consistent with the first interface, which can provide better visual experience for the user and avoid missing important messages.

[0240] The following is the third embodiment provided by the present application.

[0241] In some embodiments, the message display method includes steps S301-S303.

[0242] Step S301, the electronic device 100 displays the first interface of the first application.

[0243] FIG. 17 is a first flowchart of the message display method according to the third embodiment of the present application.

[0244] As shown in FIG. 17, in one implementation, step S301 includes steps S3011-S3016.

[0245] In step S3011, the electronic device 100 starts a first application.

[0246] In step S3012, the first application calls a first interface to issue a first instruction to the GPU.

[0247] In step S3013, based on the first instruction, the GPU performs a UI separation operation to obtain a message prompt control and a message window control.

[0248] In step S3014, the first engine acquires the message prompt control and the message window control.

[0249] The specific implementation of steps S3011-S3014 can refer to steps S1011-S1014 of the first embodiment, which will not be repeated here.

[0250] In step S3015, the first engine sends the message window control to the SurfaceFlinger.

[0251] In step S3016, the SurfaceFlinger displays the message window control to make the electronic device 100 display a first interface and display the message window control in the first interface.

[0252] In this embodiment, the electronic device 100 displays the message window control in the first interface, and the message window control can be kept in an awakened state for a certain period of time.

[0253] In step S302, the electronic device 100 acquires a first message while displaying the first interface.

[0254] Step S302 can include steps S3021-S3022. The specific implementation of steps S3021-S3022 can refer to steps S1021-S1022 of the first embodiment, which will not be repeated here.

[0255] In step S303, the electronic device 100 displays the first message in the message window control.

[0256] In one implementation, step S303 includes steps S3031-S3033.

[0257] Step S3031, in the case that the first engine caches the first message, the first engine sends a first request to the SurfaceFlinger, so that the SurfaceFlinger sends the first Buffer to the GUE.

[0258] Step S3032, the GUE fills the graphic data of the first message in the first Buffer, and sends the filled first Buffer to the SurfaceFlinger.

[0259] Step S3033, the SurfaceFlinger synthesizes and displays the graphic data of the first message with the message window control based on the filled first Buffer, so as to display the message window control, and display the first message in the message window control.

[0260] The specific implementation of steps S3031-S3033 can refer to the foregoing steps S1045-S1047. The embodiments of the present application do not repeat them here.

[0261] FIG. 18 is a schematic diagram of a scenario in which the electronic device displays a first message according to an embodiment of the present application.

[0262] As shown in FIG. 18, in one implementation, the electronic device 100 displays the message window control 104 on the first interface 102. Thus, after the electronic device 100 obtains the first message 105, the electronic device 100 can update the message window control 104, so that the message window control 104 displays the first message 105.

[0263] In this embodiment, during the interaction between the user and the electronic device 100 based on the first application, if the electronic device 100 obtains a first message and the electronic device 100 displays a message window control on the first interface, the electronic device 100 can not display the first message in the form of a banner or a pop-up window on the first interface of the first application, but update the first message in the message window control. Thus, since the message window control is usually more suitable for the layout of the first interface, it reduces the interference with the user's field of view and concentration, and its UI form is consistent with the first interface, which can provide better visual experience for the user and avoid missing important messages.

[0264] FIG. 19 is a first flowchart of a message display method according to an embodiment of the present application.

[0265] As shown in FIG. 19, in some embodiments, the method includes the following steps S401-S406.

[0266] Step S401, the electronic device 100 displays a first interface of a first application.

[0267] The step S401 can include steps S4011-S4016. For details, refer to steps S1011-S1016 in Embodiment One.

[0268] In step S401 of this embodiment, the electronic device 100 only displays the message prompt control in the first interface.

[0269] In step S402, the electronic device determines a target scene in which the first interface is located.

[0270] The target scene includes a preset key scene and a preset non-key scene.

[0271] The preset key scene and the preset non-key scene are described below.

[0272] FIG. 20 is a schematic diagram of a key scene according to an embodiment of the present application.

[0273] As shown in FIG. 20, in one implementation, when the first application program is an action game application program, the game mechanism thereof usually involves operating a game character to fight and win. Therefore, the electronic device 100 can preset a fighting scene in the first application program as a key scene. Specifically, since the fighting scene usually involves real-time physical actions such as “hacking”, “shooting”, “spinning”, and “running”, the electronic device 100 can preset a fighting scene in which the game character performs such real-time physical actions as a key scene.

[0274] For example, the user controls the first character 107 in the first interface 102 to perform the real-time physical action of “shooting”, and this scene can be preset as a key scene.

[0275] FIG. 21 is a first schematic diagram of a non-key scene according to an embodiment of the present application.

[0276] As shown in FIG. 21, in one implementation, when the first application program is an action game application program, the game mechanism thereof usually involves, when a game character controlled by the user dies, reviving the game character after waiting for a certain time length. Therefore, the electronic device 100 can preset a death scene in the first application program as a non-key scene.

[0277] For example, the second character 108 controlled by the user in the first interface 102 dies, and this scene can be preset as a non-key scene.

[0278] FIG. 22 is a second schematic diagram of a non-key scene according to an embodiment of the present application.

[0279] As shown in FIG. 22, in an implementation, when the first application is an action game application, the game mechanism usually includes that when the blood value of the game character operated by the user is low, the user can control the game character to return to the base to replenish the blood value, and this process usually needs to wait for a certain time length. Therefore, the electronic device 100 can preset the returning-to-base scene in the first application as a non-key scene.

[0280] For example, the user controls the third character 109 to return to the base in the first interface 102, and this scene can be preset as a non-key scene.

[0281] FIG. 23 is a third schematic diagram of a non-key scene provided by the fourth embodiment of the present application.

[0282] As shown in FIG. 23, in an implementation, when the first application is an action game application, the game mechanism usually includes that the user needs to control the game character to walk along a specific path to a specific area for battle, and then the game character needs to walk on the specific path for a certain time length. Therefore, the electronic device 100 can preset the walking scene in the first application as a non-key scene.

[0283] For example, the user controls the fourth character 110 to walk in the first interface 102, and this scene can be preset as a non-key scene.

[0284] FIG. 24 is a fourth schematic diagram of a non-key scene provided by the fourth embodiment of the present application.

[0285] As shown in FIG. 24, in an implementation, when the first application is an action game application, the game mechanism usually includes that the user needs to control the game character to walk along a specific path to a specific area for battle, and then the game character needs to walk on the specific path for a certain time length. In this process, the user can also open the equipment column to purchase equipment. Therefore, the electronic device 100 can preset the equipment scene in the first application as a non-key scene.

[0286] For example, the user controls the fourth character 110 to walk and opens the equipment column 111 to purchase equipment in the first interface 102, and this scene can be preset as a non-key scene.

[0287] It should be noted that the above key scene and non-key scene are only used for example description, and if the user does not want to be disturbed in the scene of purchasing equipment, the equipment scene shown in FIG. 24 can also be preset as a key scene, and the definition manner of the key scene and the non-key scene is not limited in the embodiments of the present application.

[0288] The specific interaction process involved in step S402 is described below.

[0289] FIG. 25 is a second flowchart illustrating a message display method according to an embodiment of the present application.

[0290] FIG. 26 is an interaction diagram of software modules involved in the message display method according to an embodiment of the present application.

[0291] As shown in FIG. 25 and FIG. 26, in one implementation, step S402 includes steps S4021-S4024.

[0292] In step S4021, the InputFlinger obtains the target operation on the first interface.

[0293] FIG. 27 is a schematic diagram of a scenario in which a user performs a target operation according to an embodiment of the present application.

[0294] As shown in FIG. 27A, the target operation can be a two-handed operation. For example, the user usually holds the electronic device 100 with both hands, places the left thumb over the C1 region of the electronic device 100, and places the right thumb over the C2 region. The C1 region can be used to control the movement of the first character 107, and the C2 region can be used to control the attack of the first character 107. In a battle scenario, the user's left thumb can press the virtual joystick of the C1 region and perform a sliding operation on the C1 region to control the movement direction of the first character 107, while the user's right thumb can click the skill control of the C2 region to control the first character 107 to attack. That is, in a battle scenario, the user usually performs a two-handed operation, i.e., the user's left thumb performs a sliding operation on the C1 region for a certain period of time, and the user's right thumb performs repeated clicking operations on the C2 region within a shorter time interval.

[0295] As shown in FIG. 27B, the target operation can be a one-handed operation. For example, in a walking scenario, the user only needs to press the virtual joystick of the C1 region with the left thumb and perform a sliding operation on the C1 region to control the movement of the fourth character 110, while the right thumb can be suspended over the C2 region. That is, in a walking scenario, the user usually performs a one-handed operation, i.e., the user's left thumb performs a sliding operation on the C1 region for a certain period of time, and the user's right thumb does not perform other operations within this period of time.

[0296] It should be noted that the electronic device 100 can monitor the one-handed operation and the two-handed operation of the user based on the touch sensor 180A and the proximity light sensor 180G.

[0297] The specific process of the InputFlinger obtaining the target operation is described below.

[0298] When the user clicks the first interface on the display screen, a contact point is generated with the first interface, and the InputFlinger can track state information of each contact point for analysis. The state information can include the position, pressure, and number of the contact points. The InputFlinger can determine the target operation as a two-handed operation or a one-handed operation by analyzing the position, pressure, and number of the contact points. Thus, the InputFlinger generates a second notification event according to the specific information of the target operation after determining the specific operation mode of the target operation.

[0299] In step S4022, the InputFlinger sends the second notification event to the scene recognition module of the electronic device 100. The second notification event includes that the target operation is a one-handed operation or a two-handed operation.

[0300] The InputFlinger can only perform preliminary processing on the signals of the input device and convert the signals into standard input events, but cannot further analyze the input events. Therefore, the InputFlinger needs to send the current input event to the scene recognition module in the form of a second notification event, and the scene recognition module can quickly respond to the second notification event and output the result.

[0301] In step S4023, in the case of a two-handed operation, the scene recognition module determines that the target scene is a key scene.

[0302] In step S4024, in the case of a one-handed operation, the scene recognition module determines that the target scene is a non-key scene.

[0303] In fact, in the case of a two-handed operation, the target scene can be a battle scene as shown in FIG. 20, which is usually a key scene defined by the user, and the electronic device 100 can identify the key scene based on the two-handed operation. However, in the case of a two-handed operation, the target scene can also be an equipment scene as shown in FIG. 24, in which the left thumb of the user can press the virtual joystick to move the fourth character 110, and the right thumb can click the equipment in the equipment bar 111 to purchase the equipment. This scene can be a non-key scene defined by the user. Therefore, the way in which the electronic device 100 identifies the key scene based only on the two-handed operation has a misidentification condition.

[0304] In addition, in the case where the target operation is a one-handed operation, the electronic device 100 can identify the return base scenario as shown in FIG. 22 based on the operation of the user clicking the "return base" skill control, or identify the walking scenario as shown in FIG. 23 based on the operation of the user holding the virtual joystick with the left thumb. However, since in the death scenario as shown in FIG. 21, the user generally does not perform an operation, and the left thumb and the right thumb of the user are both in a suspended state above the display screen, the manner in which the electronic device 100 identifies a non-critical scenario based only on a one-handed operation is not comprehensive in identifying scenarios.

[0305] That is, when the electronic device 100 determines a target scenario by an operation manner, there are problems of misidentification of some scenarios and inability to identify some scenarios. In order to improve the accuracy of the electronic device 100 in determining a target scenario, the electronic device 100 can further determine a target scenario by combining an operation manner and an operation area.

[0306] In an implementation manner, the step S4024 includes steps S4024a-S4024d.

[0307] In step S4024a, the scenario identification module obtains target information corresponding to the target area from the GPU, the target information including a position and a size of the target area, and the target area including the first area and the second area.

[0308] Further as shown in A in FIG. 27, the GPU can be used to render the first interface 102 to render the C1 area and the C2 area in the first interface 102. For a rendering event of rendering the C1 area and the C2 area, the GPU can determine the positions of the respective areas in the first interface 102 using a coordinate system, so that the GPU can obtain the position and the size of the C1 area and the position and the size of the C2 area.

[0309] For example, the first area can be the C1 area, and the second area can be the C2 area. The scenario identification module can obtain the position and the size of the C1 area and the position and the size of the C2 area.

[0310] In step S4024b, the scenario identification module identifies the first area and the second area based on the target information.

[0311] In an implementation manner, the scenario identification module can map the position and the size of the C1 area and the position and the size of the C2 area to its built-in coordinate system, so that the scenario identification module can keep the coordinate system corresponding to an input event consistent with the coordinate system corresponding to a rendering event, facilitating subsequent data processing.

[0312] In step S4024c, the scenario identification module determines whether the one-handed operation is located in the first area or the second area.

[0313] The scene recognition module can determine whether the coordinates corresponding to the input event of the single-hand operation match the coordinates in the first region, or match the coordinates in the second region.

[0314] In step S4024d, the scene recognition module determines that the target scene is a non-key scene when the single-hand operation is located in the first region or in the second region.

[0315] As shown in FIG. 22 and FIG. 27, the left thumb of the user can be in a hovering state above the display screen, and the right thumb can click the “return to base” skill control in the C2 region. Thus, when the single-hand operation is located in the second region, the scene recognition module can determine that the target scene is a return-to-base scene, which is a non-key scene.

[0316] As shown in FIG. 23 and FIG. 27, the left thumb of the user can press the virtual joystick in the C1 region to control the fourth character 110 to walk, and the right thumb can be in a hovering state above the display screen. Thus, when the single-hand operation is located in the first region, the scene recognition module can determine that the target scene is a walking scene, which is a non-key scene.

[0317] The step S4024b further includes steps S4024e-S4024g.

[0318] In step S4024e, the scene recognition module determines whether the double-hand operations are located in the first region and the second region, respectively.

[0319] In step S4024f, the scene recognition module determines that the target scene is a key scene when the double-hand operations are located in the first region and the second region, respectively.

[0320] In step S4024g, the scene recognition module determines that the target scene is a non-key scene when the double-hand operations are not located in the first region and the second region, respectively.

[0321] As shown in FIG. 20 and FIG. 27, the left thumb of the user can press the virtual joystick in the C1 region to control the first character 107 to move, and the right thumb of the user can click the “shooting” skill control in the C2 region to control the first character 107 to shoot. Thus, when the double-hand operations are located in the first region and the second region, respectively, the scene recognition module can determine that the target scene is a battle scene, which is a key scene.

[0322] As shown in FIG. 24 and FIG. 27, the left thumb of the user can hold the virtual joystick in the C1 region to control the first character 107 to move, and the right thumb of the user can purchase equipment in the equipment bar 111, so that, in the case that the two-hand operation is not located in the first region and the second region respectively, the scene recognition module can determine that the target scene is the equipment scene, which is a non-key scene.

[0323] The electronic device 100 determines the target scene based on the above-mentioned operation mode combined with the operation region, so that the accuracy of scene recognition can be improved.

[0324] The electronic device 100 can also determine the target scene through an animation effect.

[0325] In an implementation manner, the step S4024 further includes steps S4024h-S4024k.

[0326] In the step S4024h, the scene recognition module acquires at least one animation effect from the GPU.

[0327] In the step S4024i, the scene recognition module identifies the animation effect.

[0328] In the step S4024j, the scene recognition module determines whether the animation effect is a target animation effect.

[0329] In the step S4024k, in the case that the animation effect is the target animation effect, the scene recognition module determines that the current scene is a non-key scene.

[0330] Taking the death effect as shown in FIG. 21 as an example.

[0331] Generally, the developer defines the appearance and triggering condition of the death effect in the game design stage. During the running of the game application, the game application can set a current state mark for the game character, which can indicate whether the game character is in a death state. When the game character triggers the state mark corresponding to the death state, the GPU can render the death effect of the game character. The scene recognition module can monitor and identify this effect. The scene recognition module can preset the death effect as the target animation effect, so that, when the scene recognition module identifies the death effect, the death effect matches the preset target animation effect, and the scene recognition module can determine that the target scene is a non-key scene.

[0332] As shown in FIG. 22, correspondingly, the scene recognition module can also preset the return base effect as the target animation effect, so that, when the scene recognition module identifies the return base effect, the return base effect matches the preset target animation effect, and the scene recognition module can determine that the target scene is a non-key scene.

[0333] The electronic device 100 can also identify the current scene based on the combination of the operation mode, the operation region, and the animation effect.

[0334] As shown in FIG. 22 and FIG. 27, the left thumb of the user can be hovering above the display screen, and the right thumb can click the “return to base” skill control in the C2 region, so as to trigger the animation effect of “return to base”. That is, in the case where the single-hand operation is located in the second region and the target animation effect is triggered, the scene identification module can determine that the target scene is the return-to-base scene, which is a non-key scene.

[0335] It should be noted that the above embodiments provide a manner in which the electronic device 100 determines the target scene of the first interface, which is merely used for example and illustration, and the electronic device 100 can also determine the target scene based on the number of game characters in the first interface, the number of NPCs, and the like. The present application does not limit the manner in which the electronic device 100 determines the target scene.

[0336] In step S403, the electronic device 100 obtains the first message in the case where the first interface is displayed.

[0337] Step S403 can refer to step S102 in the above embodiment one, and the present application does not repeat the description.

[0338] In step S404, in the case where the target scene is a key scene, the electronic device 100 displays a message prompt control on the first interface, and displays a first identifier in the adjacent region of the message prompt control.

[0339] In an implementation manner, step S403 includes steps S4031-S4034.

[0340] In step S4031, the scene identification module sends a third notification event to the first engine in the case where the target scene is a key scene. The third notification event includes that the target scene is a key scene.

[0341] In step S4032, the first engine sends a second request to the SurfaceFlinger based on the third notification event, so as to make the SurfaceFlinger send a second Buffer to the GUE.

[0342] In step S4033, the GUE fills the first layer in the second Buffer, and sends the filled second Buffer to the SurfaceFlinger.

[0343] In step S4034, the SurfaceFlinger synthesizes and displays the first layer and the message prompt control based on the filled second buffer, so that the electronic device 100 displays the first interface, displays the message prompt control on the first interface, and displays the first identifier in the adjacent area of the message prompt control.

[0344] Steps S4032-S4034 can refer to steps S1031-S1033 in the foregoing embodiment one. Details are not described herein again.

[0345] In step S405, after displaying the first identifier, in response to a click operation of the message prompt control by the user, the electronic device 100 displays a message window control of the first application on the first interface, and displays the first message in the message window control.

[0346] In an implementation manner, step S405 includes steps S4051-S4057.

[0347] Steps S4051-S4057 can refer to steps S1041-S1047 in the foregoing embodiment one. Details are not described herein again.

[0348] In an implementation manner, step S403 further includes step S406.

[0349] In step S406, in a case where the target scene is a non-key scene, the electronic device 100 displays a message window control of the first application on the first interface, and displays the first message in the message window control.

[0350] In an implementation manner, step S406 includes steps S4061-S4063.

[0351] Steps S4061-S4063 can refer to steps S2031-S2033 in the foregoing embodiment two. Details are not described herein again.

[0352] In the embodiment, in a process in which the user interacts with the electronic device 100 based on the first application, if the electronic device 100 obtains the first message, the electronic device 100 can not display the first message in the form of a banner or a pop-up window on the first interface of the first application, but select a suitable display manner of the first message according to a target scene.

[0353] In this way, in a critical scenario, the electronic device 100 can arouse the message window control in response to the click operation on the first identifier, and display the first message in the message window control. Since the message prompt control is usually located at the edge region of the first interface, the electronic device 100 can avoid interfering with the user's field of vision and concentration by prompting the user to receive the first message. Moreover, the user can determine the time of arousing the message window control based on his own needs, so as to not only avoid missing important messages, but also improve the user's interaction experience. In a non-critical scenario, the electronic device 100 can quickly arouse the message window control to prompt the user to receive the first message, and will not interfere with the user's interaction process and affect the game result.

[0354] FIG. 28 is a first flowchart of a message display method according to an embodiment of the present application.

[0355] As shown in FIG. 28, in some embodiments, the method includes the following steps S501-S505.

[0356] Step S501, the electronic device 100 displays a first interface of a first application.

[0357] In some embodiments, step S501 can include steps S5011-S5016. The specific implementation of steps S5011-S5016 can refer to steps S1011-S1016 in Embodiment One. The present application will not be described here.

[0358] In step S501 of the present embodiment, the electronic device 100 can display a message prompt control in the first interface, or display a message window control in the first interface.

[0359] Step S502, based on a second application, the electronic device 100 obtains N second messages, N being a positive integer, in the case of displaying the first interface.

[0360] In one implementation, step S502 includes step S5021.

[0361] Step S5021, the electronic device 100 sends the second message to the first engine based on the AMS monitoring the second message.

[0362] For example, in the case where the second application is a chat application, the user can add at least one contact in the chat application to communicate with the contact. For example, the user can add a first contact and a second contact, and the electronic device 100 can receive 3 second messages sent by the first contact and 2 second messages sent by the second contact. That is, the electronic device 100 obtains 5 second messages.

[0363] Step S503, in the case that the electronic device 100 starts the Do Not Disturb mode, the electronic device 100 caches M target messages in the N second messages as first messages, and intercepts N-M non-target messages in the N second messages, M is a positive integer, and N is greater than or equal to M.

[0364] FIG. 29 is a schematic diagram of a scenario in which the electronic device starts the Do Not Disturb mode according to an embodiment of the present application.

[0365] As shown in FIG. 29, the user can click the second icon 112. In response to the click operation on the second icon 112, the electronic device 100 loads the game assistant application and displays the second interface 113, which can include the Do Not Disturb control 114. In response to the opening operation on the Do Not Disturb control 114, the electronic device 100 starts the Do Not Disturb mode.

[0366] It should be noted that the electronic device 100 can start the Do Not Disturb mode through the game assistant application, or start the Do Not Disturb mode built in the first application. The present embodiment only exemplarily describes the case in which the electronic device 100 starts the Do Not Disturb mode through the game assistant application, and the specific mode in which the electronic device 100 starts the Do Not Disturb mode is not limited.

[0367] Generally, after the electronic device 100 starts the Do Not Disturb mode, all second messages in the second application can be intercepted. However, this may miss the notification messages of key contacts.

[0368] The present embodiment changes the message delivery mechanism in the Do Not Disturb mode, so that the electronic device 100 only intercepts unimportant notification messages in the mode.

[0369] FIG. 30 is a second flowchart of a message display method according to an embodiment of the present application.

[0370] FIG. 31 is an interaction diagram of software modules involved in the message display method according to an embodiment of the present application.

[0371] As shown in FIG. 30 and FIG. 31, in one implementation, step S503 includes steps S5031-S5033.

[0372] Step S5031, the electronic device 100 determines at least one sender corresponding to the N second messages.

[0373] In one implementation, the GUE can determine at least one sender corresponding to the N second messages.

[0374] Step S5032, the electronic device 100 screens at least one preset target sender from the at least one sender.

[0375] Figure 32 is a schematic diagram of the target sender provided in Embodiment 5 of this application.

[0376] As shown in Figure 32, during the process of adding contacts based on a chat application, the user can pin important contacts. For example, the user adds a first contact 116 and a second contact 117 on the third page 115, where the first contact 116 is an important contact, and the user can pin the first contact 116. In this way, the electronic device 100 can identify the first contact as the preset target sender.

[0377] In one implementation, step S5032 includes steps S5032a-S5032c.

[0378] In step S5032a, the electronic device 100 obtains a list of senders from the second application based on a first component, wherein the first component includes a game component GameKit, and the list of senders includes at least one target sender.

[0379] GameKit can be a built-in component of game assistant applications.

[0380] For example, GameKit retrieves a list of senders from a chat application, including the first contact.

[0381] In step S5032b, the first component sends the list of senders to the first engine.

[0382] For example, GameKit will send a list of senders with the first contact set to GUE.

[0383] In step S5032c, the first engine compares the sender corresponding to the second message with the sender list to filter out at least one preset target sender.

[0384] For example, GUE compares the first contact and the second contact with the sender list, and can determine that the first contact is in the sender list, that is, filter out the first contact as the target sender.

[0385] In step S5033, the electronic device 100 caches the M target messages corresponding to the target sender as the first message and intercepts NM non-target messages from the N second messages.

[0386] In one implementation, step S5033 includes step S5033a.

[0387] In step S5033a, the first engine caches the M target messages corresponding to the target sender as the first message and intercepts NM non-target messages from the N second messages.

[0388] For example, the GUE caches the three target messages corresponding to the first contact as the first message, and intercepts two non-target messages in the five second messages.

[0389] In an implementation, step S503 is followed by steps S504-S505.

[0390] In step S504, the electronic device 100 displays the first identifier in the adjacent area of the message prompt control.

[0391] In step S505, after displaying the first identifier, in response to the click operation of the user on the message prompt control, the electronic device 100 displays the message window control of the first application in the first interface, and displays the first message in the message window control.

[0392] The specific implementation of steps S504-S505 can be referred to steps S103-S104 in Embodiment One. The embodiments of the present application do not repeat them.

[0393] In an implementation, step S503 is followed by step S506.

[0394] In step S506, the electronic device 100 displays the message window control of the first application in the first interface, and displays the first message in the message window control.

[0395] The specific implementation of step S506 can be referred to step S203 in Embodiment Two. The embodiments of the present application do not repeat them.

[0396] In this embodiment, in the process of the user interacting with the electronic device 100 based on the first application, even if the electronic device 100 is in the Do Not Disturb mode, the electronic device 100 can receive the second message sent by the important contact through the message window control of the first application. In this way, not only can the user's field of vision and concentration be avoided from being disturbed, but also important messages can be avoided from being missed, so as to improve the user's interactive experience.

[0397] It should be noted that the above various embodiments can be mutually referred to to generate more embodiments, and the present application does not repeat them.

[0398] The above mainly introduces the scheme provided by the embodiments of the present application from the perspective of the electronic device. It can be understood that the electronic device contains the hardware structure and / or software module corresponding to the execution of each function in order to implement the above functions. Those skilled in the art should easily realize that the message display method steps of each example described in combination with the embodiments disclosed in the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or software driven hardware by the electronic device depends on the specific application and design constraints of the technical solution. The professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0399] The embodiments of the present application can divide the above electronic device into functional modules or functional units according to the above method examples. For example, each functional module or functional unit can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be realized in the form of hardware or software functional module or functional unit. The division of modules or units in the embodiments of the present application is illustrative, and is only a logical function division. There can be another division manner in actual implementation.

[0400] FIG. 33 is a structural schematic diagram of a message display device provided by the embodiments of the present application.

[0401] As shown in FIG. 33, the message display device 200 provided by the embodiments of the present application can be applied to the electronic device 100 in the above embodiments, and includes:

[0402] The first display module 201 is configured to display a first interface of a first application.

[0403] The acquisition module 202 is configured to acquire a first message in a case where the first interface is displayed.

[0404] The second display module 203 is configured to display a message window control of the first application on the first interface, and display the first message on the message window control.

[0405] The message display apparatus shown in the embodiments of the present application, in the process that a user interacts with an electronic device based on a first application program, if the electronic device obtains a first message, the electronic device can not display the first message in the form of a banner or a pop-up window on a current page of the first application program, but display the first message by reusing a message window control in the first application program. In this way, since the display mode of the message window control is controllable, interference to the user's field of vision and concentration can be avoided, and therefore, the way of displaying the first message based on the message window control in the embodiments of the present application can improve the user's interactive experience.

[0406] The present application also provides an electronic device, comprising a processor, a memory and a touch screen; the memory stores program instructions, when the program instructions are executed by the processor, the electronic device executes the message display method in any of the implementation manners of the above embodiments.

[0407] FIG. 34 is a structural schematic diagram of a chip system according to an embodiment of the present application.

[0408] As shown in FIG. 34, the chip system 300 provided by the embodiments of the present application, for example, a system on a chip (SoC), comprises at least one processor 301 and at least one interface circuit 302. The processor 301 and the interface circuit 302 can be interconnected through a line. For example, the interface circuit 302 can be used to receive signals from other devices (for example, the memory of the electronic device). For another example, the interface circuit 302 can be used to send signals to other devices (for example, the processor 301 or the touch screen of the electronic device). For example, the interface circuit 302 can read the instructions stored in the memory and send the instructions to the processor 301. When the instructions are executed by the processor 301, the electronic device can execute each step in the above embodiments. Of course, the chip system can also include other discrete devices, which are not limited in the embodiments of the present application.

[0409] The embodiments of the present application also provide a computer readable storage medium, which comprises computer instructions, when the computer instructions run on the above-mentioned electronic device, the electronic device executes each function or step in the above-mentioned method embodiments.

[0410] The embodiments of the present application also provide a computer program product, when the computer program product runs on the computer, the computer executes each function or step in the above-mentioned method embodiments.

[0411] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is exemplified, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0412] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0413] The units described as separate components can or can not be physically separated, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0414] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0415] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the part that makes contributions to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method of the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0416] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any change or replacement within the technical scope disclosed by the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A message display method characterized by, The application is applied to an electronic device, comprising: displaying a first interface of a first application; acquiring a first message while displaying the first interface; displaying a message window control of the first application on the first interface, and displaying the first message on the message window control.

2. The message display method of claim 1, wherein: the first message comprises at least one of an application message of a second application and a system message.

3. The message display method of claim 1, wherein: the message window control comprises at least one operation button, and each operation button has a corresponding operation window; wherein the operation button comprises at least one of a signal button, a voice button, and a chat button, and the operation window comprises at least one of a signal window corresponding to the signal button, a voice window corresponding to the voice button, and a chat window corresponding to the chat button.

4. The message display method according to claim 3, characterized by, displaying the message window control of the first application on the first interface, and displaying the first message on the message window control, comprises: displaying the message window control of the first application on the first interface, highlighting the chat button on the message window control, displaying the chat window corresponding to the chat button on the message window control, and displaying the first message on the chat window.

5. The message display method according to claim 2, wherein the first interface comprises a message prompt control of the first application, and after acquiring the first message while displaying the first interface, the method further comprises: displaying a first identifier in an adjacent area of the message prompt control, the first identifier being used to identify that the first message has been acquired; after displaying the first identifier, in response to a click operation of a user on the message prompt control, displaying the message window control of the first application on the first interface, and displaying the first message on the message window control.

6. The message display method according to claim 5, wherein after displaying the first interface of the first application, the method further comprises: determining a target scene in which the first interface is located, the target scene comprising a preset key scene and a preset non-key scene; in a case where the target scene is the key scene, after displaying the first identifier, in response to a click operation of a user on the message prompt control, displaying the message window control of the first application on the first interface, and displaying the first message on the message window control; in a case where the target scene is the non-key scene, displaying the message window control of the first application on the first interface, and displaying the first message on the message window control.

7. The message display method of claim 6, wherein: the message window control is displayed in an edge area of the first interface, the edge area being an area that does not block a target character in the target scene, and the target character being a character controlled by a user on the electronic device.

8. The message display method according to any one of claims 2 to 7, wherein acquiring the first message while displaying the first interface, comprises: acquiring N second messages based on a second application, N being a positive integer; In the case of starting the do-not-disturb mode, cache M target messages in N second messages as the first messages, and intercept N-M non-target messages in N second messages, M is a positive integer, and N is greater than or equal to M.

9. The message display method according to claim 8, wherein The method of caching M target messages in N second messages as the first messages and intercepting N-M non-target messages in N second messages in the case of starting the do-not-disturb mode comprises the following steps. Determine at least one sender corresponding to N second messages; Screen at least one preset target sender from the at least one sender; Cache M target messages corresponding to the target sender as the first messages, and intercept N-M non-target messages in N second messages.

10. The message display method according to claim 9, wherein The application layer of the electronic device comprises the first application, the system library of the electronic device comprises a first interface, a first engine, and a system-level synthesizer SurfaceFlinger, and the hardware layer of the electronic device comprises a graphics processing unit GPU. Start the first application; The first application calls the first interface to issue a first instruction to the GPU, and the first interface comprises at least one of an embedded system graphics library EGL interface and an open graphics library OpenGL interface; Based on the first instruction, the GPU performs a user interface UI separation operation to obtain a message prompt control and the message window control; The first engine obtains the message prompt control and the message window control, and the first engine comprises a game update engine GUE; The first engine sends the message prompt control and / or the message window control to the SurfaceFlinger; The SurfaceFlinger displays the message prompt control and / or the message window control to display the first interface, and displays the message prompt control and / or the message window control on the first interface.

11. The message display method according to claim 10, wherein The framework layer of the electronic device comprises an activity management service AMS, and the method of obtaining a first message in the case of displaying the first interface comprises the following steps. The AMS monitors the first message and sends the first message to the first engine; The first engine caches the first message.

12. The message display method according to claim 11, wherein The method of displaying a message window control of the first application on the first interface and displaying the first message on the message window control comprises the following steps. In the case of caching the first message by the first engine, the first engine sends a first request to the SurfaceFlinger to make the SurfaceFlinger send a first buffer unit to the GUE; The GUE fills the first message with graphics data in the first buffer and sends the filled first buffer to the SurfaceFlinger; and The SurfaceFlinger composites and renders the graphic data of the first message with the message prompt control based on the filled second Buffer, so as to display the message prompt control, and display the first identifier in the adjacent area of the message prompt control.

13. The message display method according to claim 12, wherein In the case that the first engine caches the first message, the first engine sends a first request to the SurfaceFlinger, so that the SurfaceFlinger sends a first cache unit Buffer to the GUE, including: In the case that the first engine caches the first message, the first engine sends a second request to the SurfaceFlinger, so that the SurfaceFlinger sends a second Buffer to the GUE; The GUE fills a first layer in the second Buffer, and sends the filled second Buffer to the SurfaceFlinger, where the first layer includes the first identifier, and an area of the first layer other than the first identifier is a transparent area; The SurfaceFlinger composites and renders the first layer with the message prompt control based on the filled second Buffer, so as to display the message prompt control, and display the first identifier in the adjacent area of the message prompt control, where a layer level of the first layer includes being above the message prompt control; After displaying the first identifier, in response to a click operation of a user on the message prompt control, the first engine sends the first request to the SurfaceFlinger, so that the SurfaceFlinger sends the first Buffer to the GUE.

14. The message display method according to claim 13, wherein The framework layer of the electronic device includes an input service InputFlinger, and the first engine sends the first request to the SurfaceFlinger in response to the click operation of the user on the message prompt control, including: The InputFlinger acquires the click operation on the message prompt control; The InputFlinger sends a first notification event to the SurfaceFlinger, where the first notification event includes that the click operation is located in the first layer; The SurfaceFlinger sends the first notification event to the first engine; The first engine reads the cached first message based on the first notification event; The first engine sends the first request to the SurfaceFlinger.

15. The message display method according to claim 14, wherein The system library of the electronic device includes a scene recognition module, and the determination of the target scene in which the first interface is located includes: The InputFlinger acquires a target operation on the first interface; The InputFlinger sends a second notification event to the scene identification module, the second notification event including that the target operation is a single-hand operation or a double-hand operation; In a case where the target operation is the double-hand operation, the scene identification module determines that a target scene is a preset key scene; In a case where the target operation is the single-hand operation, the scene identification module determines that the target scene is a preset non-key scene.

16. The message display method according to claim 15, wherein The scene identification module determines the target scene as the non-key scene in the case where the target operation is the single-hand operation, including: The scene identification module obtains target information corresponding to a target region from the GPU, the target information including a position and a size of the target region, the target region including a first region and a second region; The scene identification module identifies the first region and the second region based on the target information; and the scene identification module determines whether the single-hand operation is located in the first region or the second region; In a case where the single-hand operation is located in the first region or the second region, the scene identification module determines that the target scene is the non-key scene.

17. The message display method of claim 14, wherein, The system library of the electronic device includes a scene identification module, and the determination of the target scene in which the first interface is located includes: The scene identification module obtains at least one animation effect from the GPU; The scene identification module determines whether the animation effect is a target animation effect; In a case where the animation effect is the target animation effect, the scene identification module determines that the target scene is the non-key scene.

18. The message display method of claim 10, wherein, The application program layer of the electronic device includes the second application program, the framework layer of the electronic device includes an activity management service (AMS) and a first component, the first component includes a game component (GameKit), and the obtaining of the first message in the case where the first interface is displayed includes: In a case where N second messages are obtained based on the second application program, the AMS monitors the second messages and sends the second messages to the first engine; In a case where the do-not-disturb mode is started, the first component obtains a sender list from the second application program, where the sender list includes at least one target sender; The first component sends the sender list to the first engine; The first engine compares the at least one sender corresponding to the second message with the sender list to filter out the at least one preset target sender; The first engine caches M target messages corresponding to the target sender as the first message and intercepts N-M non-target messages in the N second messages.

19. An electronic device, comprising: including: A processor and a memory, the memory storing program instructions, when the program instructions are executed by the processor, causing the electronic device to perform the message display method in any one of claims 1-18. including:

20. A computer-readable storage medium, characterized in that, The computer readable storage medium stores instructions, and when the instructions run on the electronic device, the electronic device performs the message display method in any one of claims 1-18.