Display method, user interface and related device

By displaying notification messages in blank areas of the user interface or in the form of barrage/chat messages, the problem of notification messages blocking user operations is solved and the user experience is improved.

CN120428897APending Publication Date: 2025-08-05HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410171435.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-05
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

When an electronic device displays notification messages pushed by the application, the notification messages can easily obscure the actions performed by the user, resulting in distraction and affecting the user experience.

Method used

Electronic devices identify blank areas of the user interface and display notification messages in the blank areas, or display notification messages in the form of barrage or chat messages, maintaining the same as the original display style of the application and avoiding obstructing the user interface content.

Benefits of technology

Optimize the display effect of notification messages in different scenarios, avoid notification messages from obscuring the content users are viewing, and improve the user's operating experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120428897A_ABST
    Figure CN120428897A_ABST
Patent Text Reader

Abstract

The invention discloses a display method, a user interface and a related device, in the method, an electronic device can display a first user interface of a first application, the electronic device receives a first notification message from a second application, the first notification message can be displayed in a first blank area in the first user interface, or the first notification message is displayed in a second blank area in the second application. The first notification message is displayed on the first user interface in the form of a bullet screen, the first application has the function of displaying the bullet screen on the first user interface, or the first notification message is displayed on the first user interface in the form of a chat message, and the first application has the function of displaying the chat message on the first user interface. Therefore, the electronic equipment can display the notification message in different forms in different scenes, and the notification message is prevented from shielding effective information in a user interface and interrupting the operation executed by a user, so that the operation and use experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminals, and in particular to display methods, user interfaces, and related devices. Background Art

[0002] With the continuous development of the terminal field, the number of applications installed on electronic devices has gradually increased, and the number of notification messages pushed by applications has also increased. In order to facilitate users to view the notification messages pushed by applications in a timely manner, electronic devices usually display the notification messages pushed by applications in the form of banners above the display screen after receiving the notification messages pushed by applications. Figure 1 An exemplary user interface for displaying notification messages is shown. Figure 1 As shown, notification message A is a notification message displayed in the form of a banner at the top of the display screen.

[0003] However, when an electronic device displays a notification message pushed by an application, the notification message will occupy a certain display area. If the user is performing operations such as watching videos, making video calls, playing games, etc., the appearance of the notification message will easily interrupt the user's current operations, causing the user's attention to be distracted, and affecting the user's operation and usage experience. Summary of the Invention

[0004] The present application provides a display method, a user interface, and related devices, which can prevent notification messages from obstructing the screen that the user is browsing while displaying notification messages.

[0005] In a first aspect, an embodiment of the present application provides a display method, which includes: an electronic device displays a first user interface of a first application; the electronic device receives a first notification message from a second application; the electronic device displays the first notification message in a first blank area in the first user interface; or, the electronic device displays the first notification message in the form of a barrage in the first user interface, wherein the first application has the function of displaying a barrage in the first user interface; or, the electronic device displays the first notification message in the form of a chat message in the first user interface, wherein the first application has the function of displaying a chat message in the first user interface.

[0006] By implementing the method provided in the first aspect, the electronic device can display the notification messages pushed by the application in different forms in different scenarios, and the display of the notification message will not block the content that the user is viewing, thereby optimizing the display effect of the notification message, avoiding the user's operations being interrupted by the notification message pushed by the application, and improving the user's operating experience in the notification message push scenario.

[0007] In combination with the first aspect, in one implementation, before the electronic device displays the first notification message in the first blank area, the method further includes: the electronic device identifying the first blank area based on the screenshot of the first user interface.

[0008] That is, after receiving the notification message, the electronic device can identify the blank area of the user interface through the screenshot of the currently displayed user interface, so that the electronic device can display the notification message in the blank area.

[0009] In combination with the first aspect, in one implementation, the electronic device identifies a first blank area based on a screenshot of the first user interface, specifically including: the electronic device inputs the screenshot of the first user interface into a first model to identify the first blank area, and the first model is trained using screenshots of multiple user interfaces with known blank areas.

[0010] In this way, electronic devices can use the model to identify blank areas in the user interface and improve the recognition accuracy of blank areas. Moreover, when training the model, developers can define the blank areas in the user interface by themselves, so that electronic devices can identify as many areas of the user interface as possible that can be used to display notification messages.

[0011] In combination with the first aspect, in one implementation, if the first user interface plays a first video, the first blank area includes: the intersection of blank areas in multiple frame images; the multiple frame images include image frames of the first video played after the current time point, and the blank area in a frame image does not include valid information of a frame image.

[0012] That is to say, if the user interface contains a video whose screen changes over time, the electronic device can predict the blank areas that may exist in the video after the current time point, and try its best to find blank areas in the user interface that can be used to display notification messages. At the same time, it also avoids the subsequent video screen being blocked by the pushed notification message due to changes in the screen.

[0013] In combination with the first aspect, in one implementation, the first blank area includes any one or more of the following: a color block area with a single color contained in the first user interface, a pattern or texture area that appears repeatedly in the first user interface, and a blurred area contained in the first user interface.

[0014] In combination with the first aspect, in one implementation, if the first user interface includes a first blank area, after the electronic device displays the first notification message in the first blank area, the method also includes: the electronic device stops displaying the first notification message after displaying the first notification message for a first time period.

[0015] That is, the electronic device can stop displaying the notification message after the notification message is displayed for a period of time, thereby preventing the notification message from being continuously displayed in the user interface and reducing user operations.

[0016] In combination with the first aspect, in one implementation, if the message content of the first notification message includes multiple characters, in the first notification message displayed in the first blank area, the multiple characters are scrolled and only some of the multiple characters are displayed at the same time.

[0017] In this way, the electronic device does not need to fully display the multiple characters at one time. When the first notification message contains a large amount of characters, the area occupied by the first notification message can be reduced as much as possible.

[0018] In combination with the first aspect, in one implementation, the first user interface is a full-screen video playback interface, and the first blank area includes an area where a black border of the video played in the first user interface is located.

[0019] That is to say, if an electronic device receives a notification message while playing a video containing black borders, the electronic device can display the notification message in the black borders, avoiding the notification message blocking the video screen, while also effectively utilizing the black border area to display the notification message.

[0020] In combination with the first aspect, in one implementation method, the electronic device displays the first notification message in the form of a barrage on the first user interface, specifically including: the electronic device sends the first notification message as a barrage to the first application; the electronic device displays the first notification message in the form of a barrage on the first user interface through the first application.

[0021] In this way, the electronic device 100 can display the notification message inside the application, so that the application can use the notification message as one of the contents it needs to display, avoiding the notification message being displayed too abruptly.

[0022] In combination with the first aspect, in one implementation, the first user interface includes a barrage display area, the barrage display area displays one or more barrages of the first application, and the electronic device displays the first notification message in the form of a barrage, specifically including: the electronic device displays the first notification message in the form of a barrage in the barrage display area.

[0023] In this way, the application can display the notification message together with the application's bullet screen in the bullet screen display area, and the user can view the notification message from the bullet screen display area.

[0024] In combination with the first aspect, in one implementation, the first notification message displayed in the form of a barrage maintains the same display style as one or more barrages, and the display style includes any one or more of the following: color, size, scrolling speed, position and font.

[0025] That is to say, the notification message pushed by the electronic device can maintain the same display effect as the barrage of the application, avoiding the notification message being too abrupt when displayed in the form of a barrage.

[0026] In combination with the first aspect, in one implementation, the electronic device is pre-installed with a first whitelist, which is used to record one or more applications that include a barrage function. The first application belongs to the application recorded in the first whitelist, and the first user interface is: a video playback interface, a music playback interface, or a live broadcast interface; or, the first user interface includes controls corresponding to the barrage.

[0027] That is to say, the electronic device can determine whether the first application has the function of displaying barrage in the first user interface by determining whether the first application has the barrage function and whether the first application displays a specified interface, or by checking whether the first user interface contains controls corresponding to the barrage.

[0028] In combination with the first aspect, in one implementation, the electronic device displays the first notification message in the form of a chat message on the first user interface, specifically including: the electronic device sends the first notification message as a chat message to the first application; the electronic device displays the first notification message in the first user interface in the form of a chat message through the first application.

[0029] In this way, the electronic device can display the notification message inside the application, so that the application can use the notification message as one of the contents it needs to display, avoiding the notification message being displayed too abruptly.

[0030] In combination with the first aspect, in one implementation, the first user interface includes a chat window, the chat window displays one or more chat messages of the first application, and the electronic device displays the first notification message in the form of a chat message, specifically including: the electronic device displays the first notification message in the chat window in the form of a chat message.

[0031] In this way, the application can display the notification message together with the application's chat message in the chat window, and the user can view the notification message in the chat window.

[0032] In combination with the first aspect, in one implementation, the first notification message displayed in the form of a chat message maintains the same display style as one or more chat messages, and the display style includes any one or more of the following: color, size, position, and font.

[0033] That is to say, the notification message pushed by the electronic device can maintain the same display effect as the chat message of the application, avoiding the notification message being too abrupt when displayed in the form of a chat message.

[0034] In combination with the first aspect, in one implementation, the electronic device is pre-installed with a second whitelist, and the second whitelist is used to record one or more applications that include a chat function. The first application belongs to the application recorded in the second whitelist, and the first user interface is: a video playback interface, a game interface or a live broadcast interface; or, the first user interface includes an editText control and / or a TextView control.

[0035] That is to say, the electronic device can determine whether the first application has the function of displaying chat messages in the first user interface by determining whether the first application has the chat function and whether the first application displays a specified interface, or by checking whether the first user interface contains controls corresponding to the chat messages.

[0036] In combination with the first aspect, in one implementation, the electronic device displays the first notification message in the form of a barrage in the first user interface, specifically including: the electronic device displays the first notification message in the form of a barrage in the first user interface when the first user interface does not include a blank area.

[0037] That is to say, the priority of displaying notification messages in a blank area may be higher than the priority of displaying notification messages in the form of barrage. When the electronic device receives a notification message, it may first determine whether the first user interface contains a blank area. If there is no blank area, it may display the first notification message in the form of barrage.

[0038] In combination with the first aspect, in one implementation, the electronic device displays the first notification message in the form of a chat message in the first user interface, specifically including: when the electronic device does not include a blank area in the first user interface and the first application does not have the function of displaying barrage in the first user interface, the electronic device displays the first notification message in the form of a chat message in the first user interface.

[0039] That is to say, the priority of displaying notification messages in a blank area and the priority of displaying notification messages in the form of barrage may be higher than the priority of displaying notification messages in the form of chat messages. When receiving a notification message, the electronic device may first determine whether the first user interface contains a blank area and whether the first application has the function of displaying barrage in the first user interface. If the first user interface does not contain a blank area and the first application does not have the function of displaying barrage in the first user interface, the first notification message may be displayed in the form of a chat message in the first user interface.

[0040] In combination with the first aspect, in one implementation, the first user interface is displayed in full screen, or a portion of the content of the first user interface is displayed at the top of the display screen.

[0041] This is because when an electronic device pushes a notification message, it generally displays the notification message in the form of a banner. Therefore, if the user interface currently displayed by the electronic device is displayed in full screen, or a user interface is displayed at the top of the display screen, the electronic device can adopt the method provided in the embodiment of the present application to change the display method of the notification message to avoid the notification message blocking the valid information in the user interface, causing the user's attention to be distracted and affecting the user's operation and usage experience.

[0042] In a second aspect, an embodiment of the present application provides an electronic device comprising a memory, one or more processors, and one or more programs; when the one or more processors execute the one or more programs, the electronic device implements the method described in the first aspect or any one of the implementation methods of the first aspect.

[0043] In a third aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, causes the electronic device to execute the method described in the first aspect or any one of the implementations of the first aspect.

[0044] In a fourth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the first aspect or any one of the implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 An exemplary user interface for displaying a notification message;

[0046] Figure 2A-2B 、 Figure 3A-3C The electronic device 100 provided in the embodiment of the present application displays a user interface related to the notification message in a blank area;

[0047] Figure 4A-4B The electronic device 100 provided in the embodiment of the present application displays the relevant user interface of the notification message in the form of a bullet screen;

[0048] Figure 5A-5B The electronic device 100 provided in the embodiment of the present application displays a related user interface of the notification message in the form of a chat message;

[0049] Figure 6 An internal interaction diagram of the electronic device 100 provided in an embodiment of the present application displaying a notification message in a blank area;

[0050] Figure 7 A schematic diagram illustrating the principle of determining a blank area in a video based on N frames of video provided in an embodiment of the present application;

[0051] Figure 8An internal interaction diagram of the electronic device 100 provided in an embodiment of the present application displaying notification messages in the form of bullet screens;

[0052] Figure 9 The electronic device 100 provided in the embodiment of the present application displays an internal interaction diagram of a notification message in the form of a chat message;

[0053] Figure 10 A schematic diagram of a flow chart of a display method provided in an embodiment of the present application;

[0054] Figure 11 A flowchart of another display method provided in an embodiment of the present application;

[0055] Figure 12 A schematic diagram of the hardware structure of the electronic device 100 provided in an embodiment of the present application;

[0056] Figure 13 This is a software structure block diagram of the electronic device 100 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0058] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0059] The term "user interface (UI)" in the following embodiments of this application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device and finally presented as content that the user can recognize. The commonly used form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0060] An embodiment of the present application provides a display method, which may include: an electronic device displays a first user interface of a first application, receives a first notification message pushed from a second application, and if the first user interface includes a first blank area, the first notification message can be displayed in the first blank area; if the first application has a function of displaying a barrage in the first user interface, the first notification message can be displayed in the first user interface in the form of a barrage; if the first application has a function of displaying a chat message in the first user interface, the first notification message can be displayed in the first user interface in the form of a chat message.

[0061] It can be seen that the method provided in the embodiment of the present application can take into account the user interfaces that may be displayed by various electronic devices, and display the notification messages pushed by the application in different forms in different scenarios. Moreover, the display of the notification message will not block the content that the current user is viewing, thereby optimizing the display effect of the notification message and improving the user's operating experience in the notification message push scenario.

[0062] The following introduces the relevant user interfaces involved in the embodiments of this application.

[0063] Figure 2A-2B 、 Figure 3A-3C The electronic device 100 provided in the embodiment of the present application displays a related user interface of the notification message in a blank area.

[0064] Figure 2A The user interface 10 is displayed on the electronic device 100. The user interface 10 may be a video playback interface of a video playback application. The video playback interface may be used to play a video (hereinafter referred to as video 1).

[0065] Among them, if the size of video 1 is different from the size of the display screen of electronic device 100, then in addition to displaying video 1, the user interface 10 also displays black borders at the top, bottom, and / or left and right. In this case, the electronic device 100 can determine whether the user interface 10 contains black borders by judging whether the size of video 1 is consistent with the size of the display screen of electronic device 100. Alternatively, if the screen of video 1 itself contains black borders, then the video screen displayed in user interface 10 contains not only the valid content of video 1 but also black borders at the top, bottom, and / or left and right. In this case, the electronic device 100 can identify the black borders in user interface 10 by identifying whether video 1 contains a fixed black area during playback.

[0066] like Figure 2A As shown, the user interface 10 can be divided into three areas: area 101, area 102, and area 103. Area 101 and area 103 are displayed with black borders, and area 102 displays valid content of the video.

[0067] If the electronic device 100 receives a notification message pushed by an application while displaying the user interface 10, the electronic device 100 can identify a blank area in the current user interface 10 and display the notification message in the blank area, for example, displaying the notification message in area 101 or area 103 in the user interface 10.

[0068] like Figure 2B As shown, if the electronic device 100 receives an incoming call message (hereinafter referred to as notification message 1) from the contact "Lucy" pushed by the call application, the electronic device 100 can display a prompt message 104 in the user interface 10, and the prompt message 104 can be used to display the notification message 1. In addition, the prompt message 104 is displayed in area 103.

[0069] For example, the prompt information 104 may include a hang-up control 104A and an answer control 104B. The hang-up control 104A may be used to trigger hanging up the call of the contact "Lucy", and the answer control 104B may be used to trigger answering the call of the contact "Lucy".

[0070] For example, if the electronic device 100 detects a user operation on the answer control 104B, such as a click operation, the electronic device 100 can stop playing the video 1 and trigger the answering of the call from the contact "Lucy".

[0071] from Figure 2A-2BIt can be seen that when the user is watching a video, if the electronic device 100 receives a notification message pushed by an application, the electronic device 100 can display the notification message in the black edge area of the video to prevent the notification message from blocking the video screen, while also allowing the user to view the notification message pushed by the application.

[0072] Figure 3A The user interface 20 displayed by the electronic device 100 may be a video playback interface of a video playback application. The video playback interface may be used to play videos and may also be used to display relevant information of the video publisher.

[0073] like Figure 3A As shown, the user interface 20 may include a menu bar 201, a video playback area 202, and an information display area 203. The menu bar 201 may be used to display one or more functional options, such as a return option, a search option, and more options. The video playback area 202 may be used to display the playback screen of a video (hereinafter referred to as video 2), and the information display area 203 may be used to display relevant information about video 2, including the video publisher's avatar, name, and a brief introduction to video 2.

[0074] If the electronic device 100 receives a notification message (hereinafter referred to as notification message 2 ) pushed by an application while displaying the user interface 20 , the electronic device 100 may identify a blank area in the user interface 20 and display the notification message 2 in the blank area.

[0075] For example, Figure 3B The blank area recognized by the electronic device 100 for the user interface 20 is shown as an example (see Figure 3B Therefore, the electronic device 100 can Figure 3B The gray area shown shows the notification message 2. The display position of the notification message 2 can be seen in Figure 3C .

[0076] like Figure 3C As shown, if the notification message 2 received by the electronic device 100 is a text message notification message "How are you?" sent by the contact "Lucy" pushed by the text message application, the electronic device 100 can add a prompt message 204 to the blank area in the user interface 20, and the prompt message can be used to display the notification message 2.

[0077] In some embodiments, if the electronic device 100 does not detect any user operation on the prompt information 204 after displaying the prompt information 204 for a certain period of time, the electronic device 100 can stop displaying the prompt information 204 to avoid the electronic device 100 continuously displaying the prompt information 204.

[0078] In some embodiments, the electronic device 100 can detect a user operation acting on the prompt information 204, and process the prompt information 204 in response to the operation, such as replying to the notification message 2 displayed in the prompt information 204, or deleting the notification message 2, moving the display position of the prompt information 204, adjusting the display size of the prompt information 204, and so on.

[0079] from Figure 3A-3C It can be seen that when the user is watching a video, if the electronic device 100 receives a notification message pushed by an application, the electronic device 100 can display the notification message in a blank area of the current user interface to avoid the notification message blocking the content displayed in the user interface, while also allowing the user to view the notification message pushed by the application.

[0080] It should be noted that Figure 2A-2B 、 Figure 3A-3C Only the blank areas recognized by the electronic device 100 in the video playback scenario are shown. In other embodiments of the present application, other user interfaces displayed by the electronic device 100 may also recognize blank areas, such as the chat interface of the SMS application, the contact page of the phone application, etc. The embodiments of the present application do not limit this user interface.

[0081] Figure 4A-4B The electronic device 100 provided in the embodiment of the present application displays the relevant user interface of the notification message in the form of a bullet screen.

[0082] Figure 4A The user interface 30 displayed on the electronic device 100 may be a video playback interface of a video playback application. The video playback interface can be used to play a video (hereinafter referred to as video 3). In addition, the video playback interface can also be used to display bullet comments provided by the video playback application for the video. Bullet comments refer to commentary subtitles that pop up when watching a video.

[0083] like Figure 4A As shown, the sentence consisting of several "X"s displayed above the user interface 30 is a bullet screen. It should be understood that Figure 4A In the example, the letter "X" represents the bullet screen, but in fact the letter "X" can refer to any symbol or text. For example, these bullet screens can appear from the right side of the display screen and move to the left until they disappear.

[0084] If the electronic device 100 receives a notification message (hereinafter referred to as notification message 3) pushed by the application during the display of the user interface 30, the electronic device 100 can send the notification message 3 to the video playback application, and the video playback application displays the notification message 3 in the form of a bullet screen in the user interface 30. For example, the notification message 3 displayed in the form of a bullet screen can be referred to. Figure 4B .

[0085] Compared to Figure 4A ,like Figure 4B As shown, a new text 301 is displayed in the user interface 30: "[Local message] SMS notification-Lucy: How are you?", and the content displayed by the text 301 is the content in the notification message 3.

[0086] Exemplarily, the electronic device 100 may move the text 301 while maintaining the same moving speed and moving direction as the bullet screen in the video.

[0087] It should be noted that since the electronic device 100 sends the notification message 3 to the application, which displays the notification message 3 in the form of a bullet screen, the application can keep the display style of the notification message 3 consistent with that of the bullet screen appearing in the video. The display style may include, but is not limited to, one or more of the following: font, size, color, position, scrolling speed, etc. In this way, the display effect of the notification message 3 in the video can be avoided from being too abrupt, and the style can be kept consistent with the bullet screen appearing in the video.

[0088] It is understandable that, in addition to the video playback interface, other user interfaces, such as the music playback interface and the live broadcast interface, can also display barrage. Therefore, in addition to displaying similar Figure 4A In addition to displaying the received notification message in the form of barrage when using the video playback interface shown, when the electronic device 100 displays other user interfaces, as long as the application has the function of displaying barrage in the user interface, the received notification message can be displayed in the form of barrage. The embodiment of the present application does not limit this user interface.

[0089] from Figure 4A-4B It can be seen that when the user is watching a video, if the electronic device 100 receives a notification message pushed by an application, the electronic device 100 can display the notification message in the form of a barrage, so that the user can view the notification message while watching the video, avoiding the notification message appearing too abruptly, and ensuring that the user can continue watching the video while also viewing the notification message pushed by the application.

[0090] Figure 5A-5B The electronic device 100 provided in the embodiment of the present application displays a related user interface of the notification message in the form of a chat message.

[0091] Figure 5A The user interface 40 is displayed on the electronic device 100. The user interface 40 may refer to a live broadcast interface of a live broadcast application, which may be used to display live broadcast images.

[0092] like Figure 5A As shown, the user interface 40 may include: a screen display area 401 and a chat window 402. The screen display area 401 may be used to display the live screen, and the chat window 402 may be used to display chat messages and system prompts posted by each user entering the live room.

[0093] If the electronic device 100 receives a notification message (hereinafter referred to as notification message 4) pushed by the application during the process of displaying the user interface 40, the electronic device 100 can send the notification message 4 to the live broadcast application, and the live broadcast application will display the notification message 4 in the user interface 40 in the form of a chat message. For example, the notification message 4 displayed in the form of a chat message can be referred to in the following example. Figure 5B .

[0094] Compared to Figure 5A ,like Figure 5B As shown, a new text 402A is displayed in the chat window 402 of the user interface 40: "

Local message

[0095] It is understandable that the electronic device 100 has the function of displaying Figure 5A-5B During the live broadcast interface shown, the received notification message can be displayed outside the chat window in the form of a chat message. When the electronic device 100 displays any user interface with a chat window, the received notification message can be displayed in the chat window in the form of a chat message. For example, if the electronic device 100 receives a notification message while displaying a game interface, if the game interface has a chat window, the electronic device 100 can display the notification message in the chat window in the form of a chat message.

[0096] from Figure 5A-5B It can be seen that if the electronic device 100 receives a notification message pushed by an application when displaying a user interface with a chat window, the electronic device 100 can display the notification message in the chat window in the form of a chat message, thereby avoiding the notification message pushed by the application blocking the screen viewed by the user. At the same time, it can also integrate the notification message into the user interface currently displayed by the electronic device 100, thereby optimizing the display effect of the notification message.

[0097] It is understandable that Figure 2A-2B 、 Figure 3A-3C 、 Figure 4A-4B 、 Figure 5A-5B This is merely an exemplary introduction and does not constitute a limitation on the embodiments of the present application.

[0098] In order to better understand this solution, Figure 6-Figure 9The internal implementation principle of the display method provided in the embodiment of the present application is introduced.

[0099] Figure 6 The electronic device 100 provided in the embodiment of the present application displays an internal interaction diagram of the notification message in a blank area.

[0100] like Figure 6 As shown, the internal interaction diagram involves: application A, application B, notification service (notification service), and System UI.

[0101] Among them, application A may refer to any application installed in the electronic device 100 that pushes notification messages. Application B may refer to an application installed in the electronic device 100 that is currently running in the foreground, and the electronic device 100 may currently display the user interface of application B. The notification service can be used to manage notification messages pushed by applications and adjust the display form of notification messages according to different scenarios. SystemUI is a system-level APK application that can provide display content such as the status bar, notification bar, recent task interface, navigation bar, etc. In an embodiment of the present application, SystemUI can be used to display notification messages in a blank area in the user interface of application B.

[0102] S101. Application A sends a notification message to a notification service.

[0103] Application A may refer to an application running in the background. A notification message may refer to a notification message provided by Application A. For example, if Application A is an instant messaging application, the notification message may refer to a notification message sent by a contact in Application A. If Application A is an audio and video entertainment application, the notification message may refer to audio and video entertainment-related information in Application A.

[0104] It is understandable that application A may also be in a closed state, that is, application A is not running in the foreground or background. In this case, the application server corresponding to application A may also send a notification message of application A to the electronic device 100, so that the notification service can receive the notification message of application A.

[0105] S102 : The notification service determines a blank area in the user interface 1 according to the user interface 1 currently displayed by the application B.

[0106] After the notification service receives the notification message pushed by application A, the notification service can determine the application currently running in the foreground of the electronic device 100, that is, the blank area in the user interface displayed by application B, so that the electronic device 100 can display the notification message pushed by application A in the blank area.

[0107] The blank area may refer to an area in the user interface that cannot convey valid image information to the user, for example, a single color area in the user interface, or an area with repeated patterns or textures, or an area with blurred images.

[0108] For example, the notification service can take a screenshot of the user interface 1 displayed by the current application B, input the screenshot into a blank area recognition model, and identify the blank areas contained in the screenshot. The blank area recognition model can be a model trained using a neural network algorithm using a large number of screenshots of user interfaces with known blank areas. Alternatively, the notification service can also determine the blank areas in the current user interface 1 by traversing all controls contained in the current user interface 1 and based on the layout of these controls, such as position, shape, and size.

[0109] In one implementation, if application B is a video playback application and the user interface 1 currently displayed by application B is a video playback interface, the blank area in user interface 1 may include a blank area in the video identified based on the video currently being played by application B and the current video playback progress. In this way, blank areas in user interface 1 that can be used to display notification messages can be found as much as possible.

[0110] Specifically, the notification service can obtain N (N ≥ 1) frames of video that will be played in the video based on the progress of the current video playback, identify the blank areas in each of these N frames of video using a blank area recognition model, and finally determine the overlapping areas among these N blank areas as blank areas in the video. The number of frames N of the video that the notification service obtains can be determined by the duration of the notification message. If the notification message remains for a longer period of time, the number of frames N will be larger; if the notification message remains for a shorter period of time, the number of frames N will be smaller.

[0111] In order to better understand the principle of determining blank areas based on N frames of video, Figure 7 A schematic diagram of the principle of determining a blank area in a video based on N frames of video images in an embodiment of the present application.

[0112] in, Figure 7 The diagram shows screens 00, 01, 02, and 03 displayed in sequence in the user interface 1. These multiple screens may also refer to video screens played in the user interface 1. Screen 00 is the video screen currently being played in the user interface 1, and screens 01, 02, and 03 are the three frames of video screens that will be played subsequently.

[0113] like Figure 7As shown, the blank areas obtained by the blank area recognition model for pictures 01, 02, and 03 are areas 11, 12, and 13 (see the gray areas in the figure). Afterwards, the intersection of areas 11, 12, and 13 is taken, and the area included in all three areas is area 12. Area 12 is then determined as the blank area in the video.

[0114] In addition, it should be noted that if the video playback interface only plays videos in a small window, then the video playback interface displays other screen content in addition to the video. Therefore, the blank area determined by the video and the progress of video playback, and the blank area determined by the screenshot of the video playback interface or the layout of all controls in the video playback interface can be determined as the blank area of the video playback interface.

[0115] It is understandable that Figure 7 Just an illustrative introduction. Figure 7 The size, shape, etc. of the blank areas identified in each video frame shown in the figure do not constitute a limitation to the embodiments of the present application.

[0116] S103: The notification service determines the display form of the notification message based on the blank area.

[0117] The display form of the notification information may include: the display size, shape, position, etc. of the control corresponding to the notification message. Specifically, the notification service may determine the display form of the notification message based on the width and height of the blank area, ensuring that the notification message can be displayed within the blank area and does not exceed the blank area, thereby preventing the notification message from obstructing the display screen in the user interface 1.

[0118] In some embodiments, before executing step S103, the notification service may further determine whether the size of the blank area is greater than a preset size. If it is determined that the size of the blank area is greater than the preset size, step S103 is executed again. Otherwise, it indicates that the blank area in the current user interface is too small to display the notification message, and the electronic device 100 may display the notification message as a banner. In this way, the electronic device 100 can avoid displaying the notification message in an excessively small blank area, which may affect the user's ability to read the notification message.

[0119] S104. The notification service sends a notification message to the SystemUI.

[0120] After the notification service determines the display form of the notification message, the notification service can send the notification message to the SystemUI, and the SystemUI displays the notification message in the blank area.

[0121] It is understandable that, in addition to sending the notification message to the SystemUI, the notification service may also send indication information of the display form of the notification message to the SystemUI, so that the SystemUI can display the notification message in the determined display form.

[0122] S105. SystemUI displays a notification message in the blank area.

[0123] For example, see Figure 2A-2B , the blank area can refer to Figure 2A As shown in the area 101 and area 103, the notification message may refer to Figure 2B The prompt information 104 shown. Or, for example, see Figure 3A-3C , the blank area can refer to Figure 3B In the gray area shown, the notification message may refer to Figure 3C The prompt information 204 is shown.

[0124] That is to say, after the electronic device 100 receives the notification message pushed by application A, the notification message can be displayed in the blank area of the user interface of the currently displayed application B, ensuring that the user can be informed of the notification message while avoiding the notification message blocking the screen displayed in the current user interface.

[0125] S106. SystemUI processes the notification message based on the user operation or stops displaying the notification message after waiting for a preset time.

[0126] After the electronic device 100 displays the notification message, the electronic device 100 may detect the user's operation on the notification message and process the notification message.

[0127] For example, if the notification message is Figure 2B As shown in the prompt message 104, the electronic device 100 can detect the user operation of the hang-up control 104A in the prompt message 104 to hang up the call of the contact "Lucy", or detect the user operation of the answer control 104B in the prompt message 104 to answer the call of the contact "Lucy".

[0128] In addition, if the electronic device 100 does not detect any user operation on the notification message within a preset time period after displaying the notification message, the electronic device 100 may stop displaying the notification message.

[0129] Furthermore, after the electronic device 100 stops displaying the notification message in the user interface 1 , the electronic device 100 may display the notification message in the notification bar to prevent the user from missing the notification message.

[0130] It is understandable that step S106 is an optional step and is not limited in this embodiment of the present application.

[0131] It can be seen from steps S101-S106 that after receiving the notification message of the application, the electronic device 100 can first identify the blank area of the currently displayed user interface, and then display the notification message in the blank area, thereby avoiding the notification message blocking the effective screen in the user interface and ensuring that the task currently being processed by the user is not interrupted.

[0132] Figure 8 The electronic device 100 provided in the embodiment of the present application displays an internal interaction diagram of the notification message in the form of a bullet screen.

[0133] like Figure 8 As shown, the internal interaction diagram involves: Application A, Application B, and Notification Service. For a detailed description of the definitions of Application A, Application B, and Notification Service, please refer to the previous Figure 6 The relevant content in will not be repeated here.

[0134] S201. Application A sends a notification message to the notification service.

[0135] S202: The notification service determines whether there is a blank area in the user interface 1 currently displayed by application B.

[0136] That is to say, after receiving the notification message from the application, the notification service can first determine whether there is a blank area in the currently displayed user interface. If so, the notification message can be displayed in the blank area, as can be seen in the above steps S101-S106. If not, it can be further determined whether application B currently has a barrage function, that is, executing the subsequent step S203. If application B has a barrage function, the electronic device 100 can display the notification message in the form of a barrage.

[0137] It is understandable that step S202 is an optional step. That is, after receiving the notification message, the notification service can directly determine whether the application currently running in the foreground, that is, application B, has the bullet screen function.

[0138] S203 . The notification service checks whether application B has the function of displaying bullet screen on user interface 1 .

[0139] For example, whether application B has the function of displaying bullet comments on user interface 1 can be checked in the following two ways:

[0140] 1) Check whether application B has the function of displaying bullet screen in user interface 1 by judging whether application B has the function of displaying bullet screen and whether user interface 1 is the designated interface

[0141] Among them, the electronic device 100 can use the whitelist to determine whether the application has a barrage function.

[0142] Specifically, the electronic device 100 may be pre-installed with a bullet screen whitelist, which may be used to record common applications with a bullet screen function. The electronic device 100 may determine whether the bullet screen whitelist records application B to determine whether application B has a bullet screen function. For example, the bullet screen whitelist may store the application package names of applications with a bullet screen function, and the electronic device 100 may determine whether the application package name of application B is in the bullet screen whitelist to check whether application B has a bullet screen function.

[0143] For example, the applications recorded in the barrage whitelist can be applications that developers frequently use among current consumers, such as the top 500 most popular applications, and applications with barrage functions are selected from them.

[0144] In addition, the barrage whitelist can be built into the configuration file of the operating system, and developers can also continuously maintain and update the barrage whitelist, and update the barrage whitelist synchronously when the next operating system is updated.

[0145] Consider that even if an application has a bullet screen function, it can only be displayed on specific interfaces. For example, a video playback application needs to display bullet screen only when displaying the video playback interface, but not when displaying the page corresponding to the application account. Therefore, in addition to determining whether the application has a bullet screen function, it is also necessary to determine whether the currently displayed user interface is a designated interface in order to accurately determine whether application B has the function of displaying bullet screen on user interface 1.

[0146] Exemplarily, the designated interface may refer to a video playback interface, a music playback interface, a live broadcast interface, and the like.

[0147] 2) Check whether application B has the function of displaying bullet screen in user interface 1 by judging whether there is a preset control in user interface 1 displayed by current application B

[0148] Among them, if the barrage is displayed in the user interface 1, it means that the application B has the function of displaying the barrage in the user interface 1.

[0149] For example, you can traverse all views of the current user interface 1 starting from the rootview of the user interface 1 and determine whether the view name contains "danmaku" to check whether the user interface 1 displays Danmu. Among them, the view named "danmaku" is the view corresponding to Danmu. If the user interface 1 contains a view named "danmaku", it means that the user interface 1 displays Danmu.

[0150] Furthermore, the coordinates of the view can be combined to determine whether the user interface 1 displays a danmaku. For example, if the view named "danmaku" is located at the top or bottom of the display screen and is at the topmost layer of the current user interface layer (i.e., the topmost layer in the Z-order), then it is determined that the user interface 1 displays a danmaku. This can improve the accuracy of identifying whether the user interface 1 displays a danmaku.

[0151] It can be understood that in other embodiments of the present application, the view named "danmaku" is just an example, and the name of the control corresponding to the barrage can also be other. The embodiments of the present application do not limit the name. In addition, the electronic device 100 can also determine whether application B has the function of displaying barrage in the user interface 1 in other ways. The embodiments of the present application do not limit this.

[0152] S204. When the notification service determines that application B has the function of displaying barrage on user interface 1, the notification message is sent to application B as barrage.

[0153] When it is determined that application B has the function of displaying a bullet screen on user interface 1 , the notification service can send the notification message as a bullet screen to application B, so that application B can draw the notification message in the form of a bullet screen.

[0154] In a specific implementation, the notification service can call the application's bullet screen system interface and send the notification message to application B through the bullet screen system interface, so that application B can display the notification message in the form of a bullet screen.

[0155] For example, the bullet message sent by the notification service to application B may consist of at least three parts of text information: a fixed field, an application name field, and a notification message content field. The fixed field is used to distinguish the notification message from the original bullet message in application B. For example, the fixed field may be "[Local Message]". The application name field can be used to display the name of the application from which the notification message originated. The notification message content field is the notification message content contained in the notification message for informing the user.

[0156] It is understandable that the fixed field can also be other content, such as "

local message

local notification message

[0157] S205. Application B displays a notification message in the form of a bullet screen on user interface 1.

[0158] Among them, application B can display notification messages in the form of bullet screen in the bullet screen display area in user interface 1.

[0159] For example, see Figure 4A-4B , the notification message in the form of bullet screen can refer to Figure 4B The text 301 is shown.

[0160] Among them, after receiving the notification message in the form of barrage, application B can regard it as the barrage input by the user that needs to be displayed, and then maintain the same display style as the barrage that application B originally needs to display, and display the notification message in the form of barrage, so that the notification message can be perfectly integrated into the barrage, avoiding the notification message being too abrupt. At the same time, the notification message in the form of barrage is sent to application B, so that application B does not need to perceive that the output barrage is a notification message pushed by the application. In this way, the application does not need to adapt to implement this solution, which broadens the application scenarios of the solution and is more conducive to the commercial promotion of the solution.

[0161] In addition, it should be noted that after the notification message is sent to application B in the form of a barrage, application B will display the notification message as a barrage entered by the user in the current user interface. In order to ensure that the notification message is only visible to the local device, that is, to avoid application B sending the notification message to the application server, and the application server sending it to other electronic devices, other users can view the notification message sent by electronic device 100 to application B when watching the video through the application.

[0162] Among them, you can prevent application B from sending the notification message to the application server in the following three ways:

[0163] 1) Intercept the notification message on the protocol side

[0164] When the notification message is sent to the main thread of application B through the interface, application B draws the notification message in the form of a bullet screen and displays it. In the process of application B uploading the notification message in the form of a bullet screen to the application server, it is intercepted on the protocol side to prevent application B from sending the notification message to the application server.

[0165] 2) Delete the notification message by calling the interface for deleting the bullet screen in the application

[0166] After the notification message is sent to the main thread of application B through the interface, causing application B to draw the notification message in the form of a barrage and display it, the electronic device 100 can call the interface for deleting the barrage in application B to delete the notification message, thereby preventing application B from sending the notification message to the application server.

[0167] 3) When application B receives a notification message, it is received by a special interface of application B, and this special interface is only used to display the notification message on the local machine.

[0168] Developers can set up a dedicated API in their apps to display the bullet comments locally without uploading them. This way, when App B receives a bullet comment notification, it can receive it through this dedicated API, preventing App B from sending the notification message to the app server.

[0169] It is understandable that other methods can be used to prevent the application from sending notification messages in the form of barrage to the application server, and the embodiments of the present application do not limit this.

[0170] It can be seen from steps S201-S205 that after receiving the notification message of the application, the electronic device 100 can determine whether the application currently running in the foreground has the function of displaying barrage in the user interface 1. If it is determined that application B has the function of displaying barrage in the user interface 1, the notification message can be sent to the application running in the foreground in the form of barrage, and the application outputs the notification message in the form of barrage, which not only realizes the display of the notification message, but also avoids the display of the notification message interrupting the content currently being watched by the user.

[0171] For details about the contents not described in detail in steps S201-S205, please refer to the relevant contents in the above steps S101-S106, which will not be repeated here.

[0172] Figure 9 The electronic device 100 provided in the embodiment of the present application displays an internal interaction diagram of the notification message in the form of a chat message.

[0173] like Figure 9 As shown, the internal interaction diagram involves: Application A, Application B, and Notification Service. For a detailed description of the definitions of Application A, Application B, and Notification Service, please refer to the previous Figure 6 The relevant content in will not be repeated here.

[0174] S301. Application A sends a notification message to the notification service.

[0175] S302: The notification service determines whether there is a blank area in the user interface 1 currently displayed by application B.

[0176] That is to say, after receiving the notification message from the application, the notification service can first determine whether there is a blank area in the currently displayed user interface. If so, the notification message can be displayed in the blank area, see the above steps S101-S106. If not, the subsequent step S303 can be executed.

[0177] S303 , the notification service determines whether application B has the function of displaying bullet screen on user interface 1 .

[0178] That is to say, after receiving the notification message from the application, the notification service can determine whether application B has the function of displaying barrage on the user interface 1. If application B has the function of displaying barrage on the user interface 1, the notification message can be sent to application B in the form of barrage, and application B displays the notification message in the form of barrage on the user interface 1, as shown in the above steps S201-S205. If application B does not have the function of displaying barrage on the user interface 1, it can be further determined whether application B has the function of displaying chat messages on the user interface 1, that is, executing the subsequent step S304. If application B has the function of displaying chat messages on the user interface 1, the electronic device 100 can display the notification message in the form of a chat message on the user interface 1.

[0179] It can be understood that step S302 and / or step S303 are optional steps.

[0180] Among them, if step S302 is an optional step, then after receiving the notification message, the electronic device 100 does not need to determine whether there is a blank area in the user interface 1 currently displayed by application B, but instead determines whether application B has the function of displaying barrage in the user interface 1. If it is determined that application B does not have the function of displaying barrage in the user interface 1, step S304 is executed.

[0181] If step S303 is an optional step, the electronic device 100 can determine whether there is a blank area in the user interface 1 currently displayed by application B after receiving the notification message, without having to determine whether application B has the function of displaying barrage in the user interface 1. If it is determined that there is no blank area in the user interface currently displayed by application B, step S304 is executed.

[0182] If step S302 and step S303 are both optional steps, then after receiving the notification message, the electronic device 100 can directly determine whether application B has the function of displaying chat messages on the user interface 1, that is, execute step S304, without having to determine whether there is a blank area in the user interface 1 currently displayed by application B, or whether application B has the function of displaying barrage on the user interface 1.

[0183] In addition, the embodiment of the present application does not limit the order in which step S302 and step S303 are executed. The electronic device 100 may first execute step S302 and then execute step S303, or first execute step S303 and then execute step S302. In other words, the electronic device 100 may first determine whether the user interface 1 currently displayed by application B has a blank area, and then determine whether application B has the function of displaying barrage on user interface 1. Alternatively, the electronic device 100 may first determine whether application B has the function of displaying barrage on user interface 1, and then determine whether the user interface currently displayed by application B has a blank area.

[0184] S304 . The notification service checks whether application B has the function of displaying chat messages on user interface 1 .

[0185] For example, whether application B has the function of displaying chat messages on user interface 1 can be checked in the following two ways:

[0186] 1) Check whether application B has the function of displaying chat messages on user interface 1 by judging whether application B has a chat function and whether user interface 1 is a designated interface

[0187] Among them, the electronic device 100 can determine whether the application has a chat function through a whitelist.

[0188] The electronic device 100 may be pre-installed with a chat whitelist that can be used to record common applications with chat functions. The electronic device 100 can determine whether application B is recorded in the chat whitelist to determine whether application B has a chat function. For example, the chat whitelist may store the application package names of applications with chat functions. The electronic device 100 can determine whether the application package name of application B is in the chat whitelist to check whether application B has a chat function.

[0189] For example, the applications recorded in the chat whitelist can be applications with chat functions that developers have selected from among the applications currently used by consumers, such as the top 500 most frequently activated applications, which are screened one by one.

[0190] In addition, the chat whitelist can be built into the configuration file of the operating system, and the developer can also continuously maintain and update the chat whitelist, and the chat whitelist will be updated synchronously when the next operating system is updated.

[0191] Consider that even if an application has a chat function, chat messages can only be displayed on specific interfaces. For example, a live broadcast application will only display chat messages when the live broadcast interface is displayed, and will not display chat messages when the page corresponding to the application account is displayed. Therefore, in addition to determining whether the application has a bullet screen function, it is also necessary to determine whether the currently displayed user interface is a designated interface to accurately determine whether Application B has the function of displaying chat messages on User Interface 1.

[0192] Exemplarily, the designated interface may refer to a game interface, a live broadcast interface, and the like.

[0193] 2) Check whether application B has the function of displaying chat messages on user interface 1 by determining whether there is a preset control in user interface 1 currently displayed by application B

[0194] For example, you can search for the EditText control and the TextView control in the mainActivity of application B. The EditText control is used to enter text, and the TextView control corresponds to the chat window. If user interface 1 contains any one or more of these controls, it can be determined whether application B has the function of displaying chat messages in user interface 1.

[0195] It is understandable that the electronic device 100 can also determine whether application B has the function of displaying chat messages on the user interface 1 in other ways, and the embodiment of the present application does not limit this.

[0196] S305 . When the notification service determines that application B has the function of displaying chat messages on user interface 1 , the notification service sends the notification message as a chat message to application B.

[0197] When it is determined that application B has the function of displaying chat messages on user interface 1, the notification service can send the notification message as a chat message to application B, so that application B can draw the notification message in the form of a chat message.

[0198] In a specific implementation, the notification service may call the chat system interface of the application and send the notification message to application B through the chat system interface, so that application B can display the notification message in the form of a chat message.

[0199] For example, similar to the description in step S204, the chat message sent by the notification service to application B may consist of at least three parts of text information: a fixed field, an application name field, and a notification message content field. The fixed field is used to implement the area between the notification message and the original bullet screen in application B. For example, the fixed field may be "[Local Message]". The application name field may be used to display the name of the application from which the notification message originated. The notification message content field is the notification message content contained in the notification message for informing the user.

[0200] It is understandable that the fixed field can also be other content, such as "

Local message

Local notification message

[0201] S306. Application B displays a notification message in the form of a chat message on user interface 1.

[0202] Among them, application B can display notification messages in the form of chat messages in the chat window in user interface 1.

[0203] For example, see Figure 5A-5B, the notification message in the chat message form can refer to Figure 5B Text 402A is shown.

[0204] Among them, after receiving the notification message in the form of a chat message, application B can regard it as a chat message input by the user that needs to be displayed, and then maintain the same style as the chat message that application B originally needs to display, and display the notification message in the form of a chat message, so that the notification message can be perfectly integrated into the chat message, avoiding the notification message being too abrupt. At the same time, the notification message in the form of a chat message is sent to application B, so that application B does not need to perceive that the output chat message is a notification message pushed by the application. In this way, the application does not need to adapt to implement this solution, which broadens the application scenarios of the solution and is more conducive to the commercial promotion of the solution.

[0205] In addition, it should be noted that after the notification message is sent to application B in the form of a chat message, application B will display the notification message as a chat message entered by the user in the current user interface. In order to ensure that the notification message is only visible to the local device, that is, to avoid application B sending the notification message to the application server, and the application server sending it to other electronic devices, other users can view the notification message sent by electronic device 100 to application B when viewing the chat message through the chat window of the application.

[0206] Among them, you can prevent application B from sending the notification message to the application server in the following three ways:

[0207] 1) Intercept the notification message on the protocol side

[0208] When the notification message is sent to the main thread of application B through the interface, application B draws the notification message in the form of a chat message and displays it. In the process of application B uploading the notification message in the form of a chat message to the application server, it is intercepted on the protocol side to prevent application B from sending the notification message to the application server.

[0209] 2) Delete the notification message by calling the chat message deletion interface in the application

[0210] After the notification message is sent to the main thread of application B through the interface, causing application B to draw the notification message in the form of a chat message and display it, the electronic device 100 can call the interface for deleting chat messages in application B to delete the notification message, thereby preventing application B from sending the notification message to the application server.

[0211] 3) When application B receives a notification message, it is received by a special interface of application B, and this special interface is only used to display the notification message on the local machine.

[0212] Developers can set up a custom interface in their applications to display chat messages locally without uploading them. This way, when application B receives a notification message in the form of a chat message, it can receive it through this custom interface, preventing application B from sending the notification message to the application server.

[0213] It is understandable that other methods can be used to prevent the application from sending notification messages in the form of chat messages to the application server, and the embodiments of the present application do not limit this.

[0214] It can be seen from steps S301-S306 that after receiving the notification message of the application, the electronic device 100 can determine whether the application currently running in the foreground has the function of displaying chat messages in the user interface 1. When it is determined that application B has the function of displaying chat messages in the user interface 1, the notification message can be sent to the application running in the foreground in the form of a chat message, and the application outputs the notification message in the form of a barrage, which not only realizes the display of the notification message, but also avoids the display of the notification message interrupting the content currently being watched by the user.

[0215] For details about the contents not described in detail in steps S301-S306, please refer to the relevant contents in the above steps S101-S106 and S201-S205, which will not be repeated here.

[0216] Figure 10 A flowchart of a display method provided in an embodiment of the present application.

[0217] S401: The electronic device 100 displays a first user interface of a first application.

[0218] The first application may refer to any application installed on the electronic device 100, and this embodiment of the application does not limit this. For example, the electronic device 100 may display the first user interface in full screen, or may display the first user interface in a suspended manner, or may display the first user interface and another user interface, such as a second user interface, in a split screen. This embodiment of the application does not limit the form in which the electronic device 100 displays the first user interface.

[0219] S402: The electronic device 100 receives a first notification message from a second application.

[0220] The electronic device 100 may receive a first notification message from the second application while displaying the first user interface.

[0221] Exemplarily, the first notification message may be a notification message generated by a second application running in the background, or may be a notification message sent by an application server of the second application and received by the electronic device 100 .

[0222] In some embodiments, after the electronic device 100 receives the first notification message from the second application, the electronic device 100 may first determine whether the first user interface meets the preset requirements, and then execute step S403 if the first user interface meets the preset requirements.

[0223] Exemplarily, the preset requirement may mean that the first user interface is displayed in full screen, or a portion of the content of the first user interface is displayed at the top of the display screen.

[0224] This is because the electronic device 100 generally displays a banner of the notification message after receiving the notification message. If the first user interface is displayed in full screen or part of the content is displayed at the top of the display screen, the banner display of the notification message will definitely block part of the content of the first user interface. Therefore, in this case, the method provided in the embodiment of the present application can be used to display the first notification message to avoid the first notification message blocking the effective screen in the first user interface and affecting the user's perception of the first user interface.

[0225] S403: The electronic device 100 determines whether there is a first blank area on the first user interface.

[0226] The first blank area may refer to an area included in the user interface that cannot deliver valid screen information to the user. In other words, the content displayed in the first blank area does not include valid information of the first application.

[0227] Exemplarily, the first blank area may include any one or more of the following: a color block area with a single color contained in the first user interface, or a pattern or texture area that appears repeatedly in the first user interface, a blurred area contained in the first user interface, etc.

[0228] In some implementations, the electronic device 100 may identify the first blank area based on a screenshot of the first user interface.

[0229] Specifically, the electronic device 100 may input a screenshot of the first user interface into a first model, where the first model may refer to the blank area recognition model mentioned in step S102 above, and the first model is trained using screenshots of multiple user interfaces with known blank areas.

[0230] In other embodiments, the electronic device 100 may identify the first blank area in the first user interface by traversing all controls included in the first user interface and according to layout conditions such as positions, shapes, and sizes of these controls.

[0231] In addition, if the first user interface plays the first video, the first blank area may include: the intersection of blank areas in multiple frames of images; wherein, the multiple frames of images include image frames of the first video played after the current time point, and the blank area in a frame of image does not include valid information of this frame of image.

[0232] That is, if the electronic device 100 receives a notification message while playing a video, the electronic device 100 can predict that there will be blank areas in the next few frames of the video so that the electronic device 100 can display the notification message in the area. In this way, the possible blank areas in the user interface currently displayed by the electronic device 100 can be identified as much as possible.

[0233] Specific details about the method by which the electronic device 100 identifies the first blank area on the first user interface can be found in the relevant description in the above step S102, which will not be repeated here.

[0234] In a specific application scenario, the first user interface may refer to a video playback interface displayed in full screen, and the first blank area may include an area where a black border of a video played in the first user interface is located.

[0235] If there is a first blank area on the first user interface, the electronic device 100 may execute step S404; otherwise, the electronic device 100 may execute step S405.

[0236] In some embodiments, if there is no first blank area on the first user interface, the electronic device 100 can directly display the first notification message as a banner, that is, overlay the first notification message on top of the first user interface.

[0237] In other embodiments, if there is no first blank area on the first user interface, the electronic device 100 can execute step S408, i.e., determine whether the first application has the function of displaying chat messages on the first user interface, wherein, if the first application has the function of displaying chat messages on the first user interface, the electronic device 100 can display the first notification message in the form of a barrage on the first user interface.

[0238] That is to say, in a specific scenario, after receiving the notification message, the electronic device 100 can first identify whether there is a blank area in the user interface, and if there is no blank area in the user interface, display the notification message in the form of a barrage.

[0239] In other embodiments, if the first notification message is not an immediate notification message, for example, an incoming call notification message, a video call notification message, or other notification message that requires immediate user processing, then if there is no first blank area on the first user interface, the electronic device 100 may wait for a period of time until the first blank area appears on the first user interface before executing step S404. This ensures that the notification message displayed by the electronic device 100 does not obscure valid information on the user interface.

[0240] S404: The electronic device 100 displays a first notification message in a first blank area of the first user interface.

[0241] For example, the first user interface may refer to Figure 2A-2B The user interface 10 shown in FIG. 1 may be a first notification message. Figure 2B The prompt information 104 shown, the first blank area may refer to Figure 2A or Figure 2B Alternatively, the first user interface may refer to the area 101 and the area 103 shown. Figure 3A and Figure 3C The user interface 20 shown in FIG. 1 may be a first notification message. Figure 3C The prompt information 204 shown, the first blank area may refer to Figure 3B The gray area shown.

[0242] If the first user interface includes a first blank area, the electronic device 100 may display the first notification message in the first blank area.

[0243] For example, the electronic device 100 may be pre-installed with multiple display templates for notification messages. Different display templates have different display sizes to accommodate first blank areas of different sizes. The display size includes parameters such as width, height, and shape. In other words, the electronic device 100 may select a display template with a corresponding display size based on the size of the first blank area and use the display template to display the first notification message. This allows the electronic device 100 to display the first notification message in the first blank area, and the display range of the first notification message does not exceed the first blank area, thereby avoiding obstruction of the user's browsing screen.

[0244] In some embodiments, the electronic device 100 may display the first notification message in the first blank area when the display size of the first blank area is larger than a preset size, to avoid the first blank area being too small and affecting the display effect of the first notification message.

[0245] In some embodiments, if the first notification message contains prompt information consisting of multiple texts, the electronic device 100 can scroll and display these multiple texts when displaying the first notification message in the first blank area, such as scrolling up and down or scrolling left and right, and only part of these multiple texts are displayed at the same time. In this way, the electronic device 100 does not need to fully display these multiple texts at one time. When the first notification message contains a large amount of text, the area occupied by the first notification message can be reduced as much as possible.

[0246] In some embodiments, the electronic device 100 may stop displaying the first notification message after displaying the first notification message for a first duration, thereby preventing the first notification message from being displayed in the user interface for too long and affecting the user's viewing experience of the user interface.

[0247] It should be noted that steps S403-S404 are optional steps. That is, after receiving the first notification message, the electronic device 100 can also directly determine whether the first application has the function of displaying bullet screen on the first user interface, that is, execute step S405.

[0248] S405. The electronic device 100 determines whether the first application has the function of displaying a bullet screen on the first user interface.

[0249] The electronic device 100 determines whether the first application has the function of displaying the bullet screen on the first user interface, that is, determines whether the first user interface can display the bullet screen of the first application.

[0250] If any one of the following conditions is met, the first application has the function of displaying bullet screen on the first user interface:

[0251] 1) The first application is an application in the bullet screen whitelist, and the first user interface is the default interface

[0252] Among them, the barrage whitelist is pre-set with a variety of applications that include the barrage function. Exemplarily, the preset interface can refer to a video playback interface, a music playback interface, a live broadcast interface, and the like.

[0253] For a detailed description of the bullet screen whitelist, please refer to the relevant content in the above step S203, which will not be repeated here.

[0254] 2) The first user interface includes preset controls

[0255] Exemplarily, the preset control may refer to a control whose name contains "danmaku".

[0256] Furthermore, the coordinates of the preset control can be combined to determine whether the first application has the function of displaying bullet screen in the first user interface. For example, the preset control is located at the bottom or top of the display screen and is located at the top layer of the current layer of the user interface.

[0257] Specific descriptions of how the electronic device 100 determines whether the first application has the function of displaying a bullet screen on the first user interface can be found in the relevant content of the above step S203, which will not be repeated here.

[0258] If the first application has the function of displaying a bullet screen on the first user interface, the electronic device 100 may execute step S406; otherwise, the electronic device 100 may execute step S408, i.e., determine whether the first application has the function of displaying a chat message on the first user interface. If the first application has the function of displaying a chat message on the first user interface, the electronic device 100 may display the first notification message in the form of a chat message on the first user interface.

[0259] That is to say, in a specific scenario, after receiving the notification message, the electronic device 100 can first identify whether there is a blank area in the user interface, and whether the first application has the function of displaying barrage in the first user interface. If there is no blank area in the user interface and the first application does not have the function of displaying barrage in the first user interface, the notification message can be displayed in the form of a chat message.

[0260] In some embodiments, if the first application does not have the function of displaying a bullet screen in the first user interface, the electronic device 100 can directly display the first notification message as a banner, that is, superimpose the first notification message on the top of the first user interface.

[0261] S406. The electronic device 100 sends the first notification message as a bullet screen to the first application.

[0262] In one implementation, the electronic device 100 may send the first notification message to the first application by calling the bullet screen system interface of the first application.

[0263] Exemplarily, the barrage sent by the electronic device 100 to the first application may consist of at least three parts of text information: a fixed field, an application name field, and a notification message content field. Among them, the fixed field is used to distinguish the first notification message from the barrage originally displayed in the first application. Exemplarily, the fixed field may be "

Local message

[0264] It is understandable that the first notification message can be distinguished from the barrage originally displayed in the first application in other ways, such as setting different colors to distinguish the first notification message from the original barrage of the first application by color. The embodiment of the present application does not limit this.

[0265] S407. The electronic device 100 displays the first notification message in the first user interface in the form of a bullet screen through the first application.

[0266] For example, the first user interface may refer to Figure 4A-4B The user interface 30 shown in FIG. 30 may be a first notification message. Figure 4B The text 301 is shown.

[0267] The first user interface may include a bullet screen display area, which may display one or more bullet screens provided by the first application, and the electronic device 100 may display the first notification message in the bullet screen display area. For example, the bullet screen display area may be located at the top or bottom of the display screen.

[0268] Because the first notification message is delivered to the first application and displayed by the first application, the first notification message can maintain the same display style as the one or more bullet comments provided by the first application. The display style can include any one or more of the following: color, size, scrolling speed, position, and font. This allows the first notification message to blend seamlessly into the bullet comment, avoiding being too obtrusive.

[0269] It should be noted that steps S405-S407 are optional steps. That is, after determining that there is no first blank area on the first user interface, the electronic device 100 can determine whether the first application has the function of displaying chat messages on the first user interface, that is, execute step S408.

[0270] S408. The electronic device 100 determines whether the first application has the function of displaying chat messages on the first user interface.

[0271] The electronic device 100 determines whether the first application has the function of displaying chat messages on the first interface, that is, determines whether the first user interface can display the chat messages of the first application.

[0272] If any one of the following conditions is met, the first application has the function of displaying chat messages on the first user interface:

[0273] 1) The first application is an application in the chat whitelist, and the first user interface is a preset interface

[0274] Among them, the chat whitelist is pre-set with a variety of applications including chat functions. Exemplarily, the pre-set interface may refer to: a video playback interface, a live broadcast interface, or a game interface, etc.

[0275] For a detailed description of the chat whitelist, please refer to the relevant content in the above step S304, which will not be repeated here.

[0276] 2) The first user interface includes preset controls

[0277] Exemplarily, the preset control may include one or more of the following: an editText control, a TextView control.

[0278] For a specific description of how the electronic device 100 determines whether the first application has the function of displaying chat messages in the first user interface, please refer to the relevant content in the above step S304, which will not be repeated here.

[0279] If the first application has the function of displaying chat messages on the first user interface, the electronic device 100 can execute step S409.

[0280] In some embodiments, if the first application does not have the function of displaying chat messages on the first user interface, the electronic device 100 can directly display the first notification message as a banner, that is, superimpose the first notification message on the top of the first user interface.

[0281] S409. The electronic device 100 sends the first notification message as a chat message to the first application.

[0282] In one implementation, the electronic device 100 may send the first notification message to the first application by calling the chat system interface of the first application.

[0283] For example, the chat message sent by the electronic device 100 to the first application may consist of at least three parts of text information: a fixed field, an application name field, and a notification message content field. Among them, the fixed field is used to distinguish the first notification message from the chat message originally displayed in the first application. For example, the fixed field can be "

Local Message

[0284] It is understandable that the first notification message can be distinguished from the chat message originally displayed in the first application in other ways, such as setting different colors to distinguish the first notification message from the original chat message of the first application by color. The embodiment of the present application does not limit this.

[0285] S410. The electronic device 100 displays a first notification message in a first user interface in the form of a chat message through a first application.

[0286] For example, the first user interface may refer to Figure 5A-5B The user interface 40 shown in FIG. 4 shows a first notification message. Figure 5B Text 402A is shown.

[0287] The first user interface may include a chat window, which may display one or more chat messages provided by the first application. The electronic device 100 may display the first notification message in the chat window.

[0288] Because the first notification message is delivered to the first application and displayed by the first application, the first notification message can maintain the same display style as the one or more chat messages provided by the first application. This display style can include any one or more of the following: color, size, position, and font. This allows the first notification message to blend seamlessly into the chat message, avoiding being too obtrusive.

[0289] It is understandable that the embodiment of the present application does not limit the execution order of steps S403-S404, S405-S407, and S408-S410. For example, after the electronic device 100 executes step S402, the electronic device 100 may first execute step S405, and if the first application has the function of displaying bullet screen on the first user interface, execute steps S406-S407. Otherwise, it may execute step S403, and if there is a first blank area on the first user interface, execute step S404. Otherwise, it may execute step S408, and if the first application has the function of displaying chat messages on the first user interface, execute steps S409-S410. For another example, after the electronic device 100 executes step S402, the electronic device 100 may first execute step S408, and if the first application has the function of displaying chat messages on the first user interface, execute steps S409-S410; otherwise, it may execute step S403, and if there is a first blank area on the first user interface, execute step S404; otherwise, execute step S405, and if the first application has the function of displaying barrage on the first user interface, execute steps S406-S407.

[0290] That is to say, the embodiment of the present application does not limit the order in which the electronic device 100 determines whether the first blank area exists in the first user interface, whether the first application has the function of displaying a bullet screen in the first user interface, and whether the first application has the function of displaying a chat message in the first user interface. In addition, the electronic device 100 can only perform the execution steps in any one or more of the above steps S403-S404, S405-S407, and S408-S410. For example, after executing step S402, the electronic device 100 can execute step S405. If the first application has the function of displaying a bullet screen in the first user interface, it can execute steps S406-S407. Otherwise, the judgment is terminated. For another example, after executing step S402, the electronic device 100 can execute step S408. If the first application has the function of displaying a chat message in the first user interface, it can execute steps S409-S410. Otherwise, it can execute step S405. If the first application has the function of displaying a bullet screen in the first user interface, it can execute steps S406-S407. Otherwise, the judgment is terminated.

[0291] That is to say, the electronic device 100 can only perform any one or more of the above-mentioned judgment steps of determining whether there is a first blank area in the first user interface, determining whether the first application has the function of displaying barrage in the first user interface, and determining whether the first application has the function of displaying chat messages in the first user interface. The embodiment of the present application does not limit this.

[0292] In general, the method provided in the embodiment of the present application can enable the electronic device 100 to have different display effects for notification messages in different scenarios, make full use of the characteristics of the screen content viewed by the user, and enable the electronic device 100 to better integrate the notification message into the screen when displaying it, avoid the notification message interrupting the user's ongoing operations, avoid distracting the user's attention, and improve the user's experience when viewing the notification message.

[0293] In some embodiments, the electronic device 100 may further be provided with a switch that can be used to turn on or off the user's permission to use the display method provided in the embodiment of the present application. If the switch is on, the electronic device 100 can determine whether to display the notification message in a blank area, in the form of a bullet screen, or in the form of a chat message based on the display of the user interface after receiving the notification message. If the switch is off, the electronic device 100 displays the notification message in a default banner after receiving the notification message. For example, the electronic device 100 can control the switch by setting an application, and the electronic device 100 can turn the switch on or off based on user operations, which can increase the user's freedom of operation.

[0294] Therefore, when the electronic device 100 executes step S403, it can first read the user configuration and determine whether the switch is in the on state based on the user configuration. If it is, continue to execute subsequent steps S403-S410. If the switch is in the off state, it can determine how to display the first notification message based on the system configuration, such as directly displaying the first notification message as a banner.

[0295] Furthermore, if the first application itself contains an application configuration, that is, the first application is pre-set with a processing strategy for notification messages, then when the electronic device 100 determines that the switch is in the off state, it can first read whether the first application contains an application configuration, and determine how to display the first notification message according to the application configuration. If the first application does not contain an application configuration, it can determine how to display the first notification message according to the system configuration, such as directly displaying the first notification message as a banner.

[0296] In some embodiments, after the electronic device 100 displays the first notification message, the electronic device 100 can detect the user operation of the user on the first notification message and process the first notification message. In addition, the electronic device 100 can also set the configuration information corresponding to the first notification message according to the user operation of the user on the first notification message. In this way, when the electronic device 100 receives a second notification message of the same category as the first notification message again, the electronic device 100 can set the display effect of the second notification message according to the configuration information. The display effect may include: display duration, display color, display size, etc. For example, the user operation may include setting the importance level of the first notification message. If the electronic device 100 detects that the user operation on the first notification message increases the importance level of the first notification message, the next time the electronic device 100 displays the second notification message of the same category as the first notification message, the display duration of the second notification message can be extended.

[0297] Figure 11 A flowchart of another display method provided in an embodiment of the present application.

[0298] like Figure 11 As shown, the display method may include but is not limited to the following steps:

[0299] S501. The electronic device 100 displays a first user interface of a first application.

[0300] Exemplarily, the first application may refer to any application running in the foreground of the electronic device 100 .

[0301] For example, see Figure 2A , the first application may refer to a video playback application, and the first user interface may refer to Figure 2AThe user interface 10 shown, or, see Figure 3A , the first application may refer to a video playback application, and the first user interface may refer to Figure 3A The user interface 20 shown, or, see Figure 4A , the first application may refer to a video playback application, and the first user interface may refer to Figure 4A The user interface 30 shown, or, see Figure 5A , the first application may refer to a live broadcast application, and the first user interface may refer to Figure 5A User interface 40 is shown.

[0302] S502. The electronic device 100 receives a first notification message from the second application.

[0303] Exemplarily, the first application and the second application may be the same application or different applications, and the embodiments of the present application do not limit this.

[0304] Exemplarily, the first notification message may refer to Figure 2A-2B The notification message 1 described in the relevant content of Figure 3A-3C The notification message 2 described in the relevant content of Figure 4A-4B The notification message 3 described in the relevant content of Figure 5A-5B The notification message 4 is described in the related content.

[0305] After executing step S502, the electronic device 100 may execute any one of steps S503-S505. That is, after receiving the notification message, the electronic device 100 may display the notification message in any of the ways described in steps S503-S505, thereby achieving the effect of pushing the notification message in different display modes in different scenarios.

[0306] S503. The electronic device 100 displays the first notification message in the first blank area in the first user interface.

[0307] The first blank area may include any one or more of the following: a color block area with a single color included in the first user interface, a pattern or texture area that appears repeatedly in the first user interface, and a blurred area included in the first user interface.

[0308] For example, see Figure 2A-2B The first user interface may refer to the user interface 10, and the first blank area may include Figure 2B In the area 103 shown, the first notification message may be a prompt message 104. Alternatively, see Figure 3A-3C , the first user Jiamin may refer to the user interface 20, and the first blank area may refer to Figure 3B As shown in the gray area, the first notification message may refer to prompt information 204 .

[0309] Before the electronic device 100 displays the first notification message in the first blank area of the first user interface, the first blank area can be identified based on the screenshot of the first user interface. In other words, after the electronic device 100 receives the notification message, the blank area of the user interface can be identified based on the cross-section of the currently displayed user interface, so that the electronic device 100 can display the notification message in the blank area.

[0310] For example, in a specific implementation, the electronic device 100 may identify a first blank area in the first user interface by inputting a screenshot of the first user interface into a first model, wherein the first model may be trained using screenshots of multiple user interfaces with known blank areas.

[0311] In this way, the electronic device 100 can use the model to identify blank areas in the user interface and improve the recognition accuracy of blank areas. Moreover, when training the model, the developer can define the blank areas in the user interface by himself, so that the electronic device 100 can identify as many areas as possible in the user interface that can be used to display notification messages.

[0312] In some embodiments, if the first user interface plays a first video, the first blank area may include: the intersection of blank areas in multiple frame images, the multiple frame images may include image frames of the first video played after the current time point, and the blank area in a frame image does not include valid information of the frame image.

[0313] That is to say, if the user interface contains a video whose screen changes over time, the electronic device 100 can predict the blank areas that may exist in the video after the current time point, and try to find blank areas in the user interface that can be used to display notification messages. At the same time, it also avoids the subsequent video screen being blocked by the pushed notification message due to changes in the screen.

[0314] In some embodiments, after the electronic device 100 displays the first notification message in the first blank area, the electronic device 100 may further stop displaying the first notification message after displaying the first notification message for a first duration.

[0315] That is to say, the electronic device 100 can stop displaying the notification message after the notification message is displayed for a period of time, so as to avoid the notification message being continuously displayed in the user interface and reduce the user's operations.

[0316] In some implementations, if the message content of the first notification message includes multiple characters, in the first notification message displayed in the first blank area, the multiple characters may be scrolled and displayed, and only some of the multiple characters may be displayed at the same time.

[0317] In this way, the electronic device 100 does not need to fully display the multiple characters at one time. When the first notification message contains a large amount of characters, the area occupied by the first notification message can be reduced as much as possible.

[0318] In a specific application scenario, the first user interface is a full-screen video playback interface, and the first blank area includes an area where a black border of the video played in the first user interface is located.

[0319] That is to say, if the electronic device 100 receives a notification message while playing a video containing black borders, the electronic device 100 can display the notification message in the black borders, avoiding the notification message blocking the video screen, while also effectively utilizing the black border area to display the notification message.

[0320] S504. The electronic device 100 displays the first notification message in the form of a bullet screen on the first user interface, wherein the first application has a function of displaying a bullet screen on the first user interface.

[0321] For example, see Figure 4A-4B , the first user interface may refer to user interface 30, the first notification message may refer to Figure 4B The text 301 is shown.

[0322] In a specific implementation, after the electronic device 100 receives the first notification message, the electronic device 100 can send the first notification message as a barrage to the first application, and display the first notification message in the form of a barrage on the first user interface through the first application, thereby enabling the electronic device 100 to display the first notification message in the form of a barrage on the first user interface.

[0323] The electronic device 100 sends the first notification message to the first application, and displays the first notification message through the first application, so that the first notification message can be displayed inside the first application.

[0324] In some embodiments, the first user interface may include a barrage display area, which may display one or more barrages of the first application. The electronic device 100 displays the first notification message in the form of a barrage, which may specifically include: the electronic device 100 displays the first notification message in the form of a barrage in the barrage display area.

[0325] Optionally, the first notification message displayed in the form of a bullet screen may maintain the same display style as the one or more bullet screens, and the display style may include any one or more of the following: color, size, scrolling speed, position, and font.

[0326] That is to say, the notification message pushed by the electronic device 100 can maintain the same display effect as the barrage of the application, avoiding the notification message being too abrupt when displayed in the form of a barrage.

[0327] In some embodiments, the electronic device 100 can be pre-installed with a first whitelist, which can be used to record one or more applications that include a barrage function. The first application belongs to the application recorded in the first whitelist, and the first user interface is: a video playback interface, a music playback interface, or a live broadcast interface; or, the first user interface includes controls corresponding to the barrage.

[0328] That is to say, the electronic device 100 can determine whether the first application has the function of displaying barrage in the first user interface by determining whether the first application has the barrage function and whether the first application displays a specified interface, or by checking whether the first user interface contains controls corresponding to the barrage.

[0329] S505. The electronic device 100 displays the first notification message in the form of a chat message on the first user interface, wherein the first application has a function of displaying the chat message on the first user interface.

[0330] For example, see Figure 5A-5B , the first user interface may refer to user interface 40, the first notification message may refer to Figure 5B Text 402A is shown.

[0331] In a specific implementation, after the electronic device 100 receives the first notification message, the electronic device 100 can send the first notification message as a chat message to the first application, and display the first notification message in the form of a chat message on the first user interface through the first application, thereby enabling the electronic device 100 to display the first notification message in the form of a chat message on the first user interface.

[0332] The electronic device 100 sends the first notification message to the first application, and displays the first notification message through the first application, so that the first notification message can be displayed in the content of the first application.

[0333] In some embodiments, the first user interface may include a chat window, which may display one or more chat messages of the first application. The electronic device 100 displays the first notification message in the form of a chat message, which may specifically include: the electronic device 100 displays the first notification message in the chat window in the form of a chat message.

[0334] Optionally, the first notification message displayed in the form of a chat message may maintain the same display style as the one or more chat messages, and the display style may include any one or more of the following: color, size, position, and font.

[0335] That is to say, the notification message pushed by the electronic device 100 can maintain the same display effect as the chat message of the application, avoiding the notification message being too abrupt when displayed in the form of a chat message.

[0336] In some embodiments, the electronic device 100 can be pre-installed with a second whitelist, which can be used to record one or more applications that include a chat function. The first application belongs to the application recorded in the second whitelist, and the first user interface is: a video playback interface, a game interface, or a live broadcast interface; or, the first user interface includes an editText control and / or a TextView control.

[0337] That is to say, the electronic device 100 can determine whether the first application has the function of displaying chat messages in the first user interface by determining whether the first application has a chat function and whether the first application displays a specified interface, or by checking whether the first user interface contains controls corresponding to the chat messages.

[0338] In some embodiments, the electronic device 100 may display the first notification message in the form of a bullet screen on the first user interface when the first user interface does not include a blank area.

[0339] That is to say, the priority of displaying the notification message in a blank area may be higher than the priority of displaying the notification message in the form of a barrage. When the electronic device 100 receives a notification message, it may first determine whether the first user interface contains a blank area. If there is no blank area, it may display the first notification message in the form of a barrage.

[0340] In some embodiments, the electronic device 100 may display the first notification message in the form of a chat message on the first user interface when the first user interface does not include a blank area and the first application does not have the function of displaying a barrage on the first user interface.

[0341] That is to say, the priority of displaying the notification message in a blank area and the priority of displaying the notification message in the form of a barrage may be higher than the priority of displaying the notification message in the form of a chat message. When the electronic device 100 receives a notification message, it may first determine whether the first user interface includes a blank area and whether the first application has the function of displaying a barrage in the first user interface. If the first user interface does not include a blank area and the first application does not have the function of displaying a barrage in the first user interface, the first notification message may be displayed in the form of a chat message in the first user interface.

[0342] In some implementations, the first user interface may be displayed in full screen, or a portion of the first user interface may be displayed at the top of the display screen.

[0343] Considering that when the electronic device 100 pushes a notification message, the notification message is generally displayed in the form of a banner. Therefore, if the user interface currently displayed on the electronic device 100 is displayed in full screen, or a user interface is displayed at the top of the display screen, the electronic device 100 can adopt the method provided in the embodiment of the present application to change the display method of the notification message to avoid the notification message blocking the valid information in the user interface, causing the user's attention to be distracted, and affecting the user's operation and usage experience.

[0344] Figure 12 A schematic diagram of the hardware structure of the electronic device 100 is shown.

[0345] The electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device.

[0346] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0347] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0348] The processor 110 may include one or more processing units. For example, the processor 110 may 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). The different processing units may be independent devices or integrated into one or more processors.

[0349] In some embodiments, the processor 110 can be used to identify a blank area in the user interface currently displayed on the electronic device 100 after receiving a notification message from the application, or to determine whether the application currently running in the foreground has the function of displaying barrage or chat messages in the currently displayed user interface.

[0350] For details on the recognition principle of blank areas, please refer to the above Figure 6-Figure 7 For details on how to determine whether an application has the function of displaying bullet screen in the user interface, please refer to the above Figure 8 For details on how to determine whether an application has the function of displaying chat messages in the user interface, please refer to the above Figure 9 Related content in .

[0351] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0352] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

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

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

[0355] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0356] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the 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. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0357] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0358] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0359] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

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

[0361] In some embodiments, the display screen 194 can be used to display the user interface of the application, and after the electronic device 100 receives a notification message, the notification message is displayed in a blank area of the user interface, or if the user interface can display barrage, the notification message is displayed in the form of barrage on the user interface, or if the user interface can display chat messages, the notification message is displayed in the form of chat message on the user interface.

[0362] For details about the user interface displayed on the display screen 194, please refer to the above Figure 2A-2B 、 Figure 3A-3C 、 Figure 4A-4B 、 Figure 5A-5B .

[0363] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

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

[0365] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0366] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0367] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0368] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0369] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.

[0370] The electronic device can be a portable terminal device equipped with Harmony, iOS, Android, Microsoft or other operating systems, such as a mobile phone, tablet computer, wearable device, etc., and can also be a non-portable terminal device such as a laptop computer with a touch-sensitive surface or touch panel, a desktop computer with a touch-sensitive surface or touch panel. The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present invention takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100.

[0371] Figure 13 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0372] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

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

[0374] like Figure 13 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0375] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0376] like Figure 13As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a message notification module, a scenario judgment module, a block notification module, a barrage display module, a chat message module, and the like.

[0377] The message notification module can be used to receive notification messages and pre-process the notification messages, which may include: intercepting notification messages to be pushed, caching and sorting notification messages, etc.

[0378] The scenario judgment module can be used to determine how to push notification messages based on the currently displayed user interface. Push methods may include: displaying notification messages in a blank area of the user interface, displaying notification messages in the form of a bullet screen, and displaying notification messages in the form of a chat message. The scenario judgment mode can be used to implement a blank area in the user interface, determine whether the user interface can display a bullet screen, or determine whether the user interface can display a chat message.

[0379] The Block Notification Module can be used to display notification messages in a blank area of the user interface. Furthermore, the Block Notification Module can be used to respond to user interactions with notification messages, stop displaying notification messages after a preset display duration, scroll through the content of notification messages, and so on.

[0380] The bullet screen display module can be used to display notification messages in the form of bullet screens in the user interface. Furthermore, the bullet screen display module can also be used to obtain the display style of the bullet screen currently displayed in the user interface, set the same display style for the notification message, adjust the notification message to distinguish it from the bullet screen originally displayed in the user interface, and ensure that the notification message displayed in the form of bullet screen is only visible to the local device.

[0381] The chat message module can be used to display notification messages as chat messages in the user interface. Furthermore, the chat message module can also be used to obtain the display style of the chat messages currently displayed in the user interface, set the same display style for the notification messages, adjust the notification messages to distinguish them from the chat messages originally displayed in the user interface, and ensure that notification messages displayed as chat messages are only visible to the local device.

[0382] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0383] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0384] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0385] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0386] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0387] The Notification Manager allows applications to display notifications in the status bar. These notifications can be used to convey informational messages, remain on display briefly, and then disappear automatically without requiring user interaction. For example, the Notification Manager can be used to notify users of completed downloads, or to notify users of message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include displaying text messages in the status bar, sounding notifications, vibrating electronic devices, or flashing indicator lights.

[0388] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0389] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0390] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0391] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0392] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0393] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0394] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0395] A 2D graphics engine is a drawing engine for 2D drawings.

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

[0397] The following describes the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.

[0398] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, touch operation timestamp, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture a still image or video through the camera 193.

[0399] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0400] The present application also provides an electronic device, which may include a memory and a processor. The memory may be used to store a computer program, and the processor may be used to call the computer program in the memory so that the electronic device executes the method executed by the electronic device 100 in any of the above embodiments.

[0401] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the method performed by the electronic device 100 in any of the above embodiments.

[0402] In one possible design, the chip system further includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0403] The chip system can be composed of chips, or can include chips and other discrete devices.

[0404] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0405] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in the embodiments of the present application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. The embodiments of the present application do not specifically limit the type of memory or the configuration of the memory and the processor.

[0406] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0407] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute any method executed by the electronic device 100 in any of the above embodiments.

[0408] The present application also provides a computer-readable storage medium storing a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by any one of the electronic devices 100 in any of the above embodiments.

[0409] It should be understood that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above-mentioned method embodiment can be completed by hardware integrated logic circuits in the processor or by software instructions. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above-mentioned method.

[0410] In addition, embodiments of the present application further provide a device. Specifically, the device may be a component or module, and may include one or more processors and a memory connected to each other. The memory is configured to store a computer program. When the computer program is executed by one or more processors, the device performs the methods described in each of the above method embodiments.

[0411] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0412] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.

[0413] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0414] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0415] In short, the above description is only an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of the present invention should be included in the scope of protection of the present invention.

Claims

1. A display method, characterized in that: The method comprises: The electronic device displays a first user interface of a first application; The electronic device receives a first notification message from a second application; The electronic device displays the first notification message in a first blank area of the first user interface; Alternatively, the electronic device displays the first notification message in the form of a bullet screen on the first user interface, wherein the first application has a function of displaying a bullet screen on the first user interface; Alternatively, the electronic device displays the first notification message in the form of a chat message on the first user interface, wherein the first application has a function of displaying chat messages on the first user interface.

2. The method according to claim 1, characterized in that Before the electronic device displays the first notification message in the first blank area, the method further includes: The electronic device identifies the first blank area based on the screenshot of the first user interface.

3. The method according to claim 2, characterized in that The electronic device identifying the first blank area according to the screenshot of the first user interface specifically includes: The electronic device inputs the screenshot of the first user interface into a first model to identify the first blank area, where the first model is trained using screenshots of multiple user interfaces with known blank areas.

4. The method according to any one of claims 1 to 3, characterized in that If the first user interface plays a first video, the first blank area includes: the intersection of blank areas in multiple frame images; the multiple frame images include image frames of the first video played after the current time point, and the blank area in a frame image does not include valid information of the frame image.

5. The method according to any one of claims 1 to 4, characterized in that The first blank area includes any one or more of the following: a color block area with a single color included in the first user interface, a pattern or texture area that appears repeatedly in the first user interface, and a blurred area included in the first user interface.

6. The method according to any one of claims 1 to 5, characterized in that If the first user interface includes a first blank area, after the electronic device displays the first notification message in the first blank area, the method further includes: After displaying the first notification message for a first time period, the electronic device stops displaying the first notification message.

7. The method according to any one of claims 1 to 6, characterized in that If the message content of the first notification message includes multiple characters, in the first notification message displayed in the first blank area, the multiple characters are scrolled and only part of the multiple characters are displayed at the same time.

8. The method according to any one of claims 1 to 7, characterized in that The first user interface is a full-screen video playback interface, and the first blank area includes an area where the black border of the video played in the first user interface is located.

9. The method according to any one of claims 1 to 8, characterized in that The electronic device displays the first notification message in the form of a bullet screen on the first user interface, specifically including: The electronic device sends the first notification message as a bullet screen to the first application; The electronic device displays the first notification message in the form of a bullet screen on the first user interface through the first application.

10. The method according to any one of claims 1 to 9, characterized in that The first user interface includes a bullet screen display area, the bullet screen display area displays one or more bullet screens of the first application, and the electronic device displays the first notification message in the form of a bullet screen, specifically including: The electronic device displays the first notification message in the bullet screen display area in the form of a bullet screen.

11. The method according to any one of claim 10, characterized in that: The first notification message displayed in the form of a bullet screen maintains the same display style as the one or more bullet screens, and the display style includes any one or more of the following: color, size, scrolling speed, position and font.

12. The method according to any one of claims 1 to 11, characterized in that The electronic device is pre-installed with a first whitelist, the first whitelist being used to record one or more applications including a barrage function, the first application being an application recorded in the first whitelist, and the first user interface being: a video playback interface, a music playback interface, or a live broadcast interface; or, The first user interface includes controls corresponding to the bullet screen.

13. The method according to any one of claims 1 to 12, characterized in that The electronic device displays the first notification message in the form of a chat message on the first user interface, specifically including: The electronic device sends the first notification message to the first application as a chat message; The electronic device displays the first notification message in the form of a chat message on the first user interface through the first application.

14. The method according to any one of claims 1 to 13, characterized in that The first user interface includes a chat window, the chat window displays one or more chat messages of the first application, and the electronic device displays the first notification message in the form of a chat message, specifically including: The electronic device displays the first notification message in the chat window in the form of a chat message.

15. The method according to claim 14, characterized in that The first notification message displayed in the form of a chat message maintains the same display style as the one or more chat messages, and the display style includes any one or more of the following: color, size, position, and font.

16. The method according to any one of claims 1 to 15, characterized in that The electronic device is pre-installed with a second whitelist, the second whitelist being used to record one or more applications including a chat function, the first application being an application recorded in the second whitelist, and the first user interface being: a video playback interface, a game interface, or a live broadcast interface; or, The first user interface includes an editText control and / or a TextView control.

17. The method according to any one of claims 1 to 16, characterized in that The electronic device displays the first notification message in the form of a bullet screen on the first user interface, specifically including: When the first user interface does not include a blank area, the electronic device displays the first notification message in the form of a bullet screen on the first user interface.

18. The method according to any one of claims 1 to 17, characterized in that The electronic device displays the first notification message in the form of a chat message on the first user interface, specifically including: When the first user interface does not include a blank area and the first application does not have the function of displaying a barrage in the first user interface, the electronic device displays the first notification message in the form of a chat message in the first user interface.

19. The method according to any one of claims 1 to 18, characterized in that The first user interface is displayed in full screen, or a portion of the first user interface is displayed at the top of the display screen.

20. An electronic device, characterized in that: The electronic device comprises a memory, one or more processors, and one or more programs; when the one or more processors execute the one or more programs, the electronic device implements the method according to any one of claims 1 to 19.

21. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 19.