CN108803983B - Display control method and device of notification message, electronic device and storage medium - Google Patents

Display control method and device of notification message, electronic device and storage medium Download PDF

Info

Publication number
CN108803983B
CN108803983B CN201810377305.2A CN201810377305A CN108803983B CN 108803983 B CN108803983 B CN 108803983B CN 201810377305 A CN201810377305 A CN 201810377305A CN 108803983 B CN108803983 B CN 108803983B
Authority
CN
China
Prior art keywords
notification message
display
monitored
trigger event
duration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810377305.2A
Other languages
Chinese (zh)
Other versions
CN108803983A (en
Inventor
陆智弘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810377305.2A priority Critical patent/CN108803983B/en
Publication of CN108803983A publication Critical patent/CN108803983A/en
Application granted granted Critical
Publication of CN108803983B publication Critical patent/CN108803983B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a display control method and device of a notification message, an electronic device and a storage medium, wherein in the process of displaying the notification message through a floating window, the actual display duration of the notification message can be controlled by using a trigger event which is kept displayed by the notification message, so that the display duration of the notification message is not limited to the preset duration, and the display control method and device can be controlled based on the needs of a user, for example, the actual display duration which is shorter than the preset duration is suitable for a scene that the user does not care about the notification message, the influence of the display of the notification message on the current operation of the user is avoided, or the actual display duration which is longer than the preset duration is suitable for a scene that the user needs to clearly see the notification message, and the problem that the user needs to pull down a notification bar to further know the content of the notification message due to the. Therefore, the actual display duration of the notification message can meet the actual requirements of the user better by utilizing the trigger event of the notification message for keeping the display, and the flexibility is better.

Description

通知消息的显示控制方法及装置、电子装置及存储介质Display control method and device of notification message, electronic device and storage medium

技术领域technical field

本发明涉及电子装置显示领域,尤其涉及一种通知消息的显示控制方法及装置、电子装置及存储介质。The present invention relates to the field of electronic device display, and in particular, to a display control method and device of a notification message, an electronic device and a storage medium.

背景技术Background technique

随着智能手机和平板电脑等电子装置的不断更新换代,通知栏已经广泛的应用到基于各个操作系统的移动终端中。在电子装置中,通知栏是基于各个操作系统接口的一种消息推送通道,电子装置内的各种应用程序的服务器正是通过通知栏来向电子装置推送消息的。With the continuous upgrading of electronic devices such as smart phones and tablet computers, notification bars have been widely used in mobile terminals based on various operating systems. In an electronic device, the notification bar is a message push channel based on interfaces of various operating systems, and the server of various application programs in the electronic device pushes messages to the electronic device through the notification bar.

目前,电子装置在接收到通知消息之后,通知消息在显示界面上短暂显示,并将位于通知栏内,用户需要下拉通知栏,才能在电子装置的当前显示界面上呈现每条通知消息的部分或全部信息。At present, after the electronic device receives the notification message, the notification message is briefly displayed on the display interface and will be located in the notification bar, and the user needs to pull down the notification bar to display part of each notification message on the current display interface of the electronic device or full information.

然而,现有技术中存在通知消息在显示界面上的显示时长固定,不灵活的问题。However, in the prior art, the display duration of the notification message on the display interface is fixed and inflexible.

发明内容SUMMARY OF THE INVENTION

本发明实施例的主要目的在于提供一种通知消息的显示控制方法及装置、电子装置及存储介质,可以解决现有技术中通知消息在显示界面上的显示时长固定,不灵活的问题。The main purpose of the embodiments of the present invention is to provide a notification message display control method and device, an electronic device and a storage medium, which can solve the problem of fixed and inflexible display time of notification messages on a display interface in the prior art.

为实现上述目的,本发明实施例第一方面提供一种通知消息的显示控制方法,包括:To achieve the above purpose, a first aspect of the embodiments of the present invention provides a display control method for a notification message, including:

接收通知消息,通过浮动窗口显示所述通知消息;receiving a notification message, and displaying the notification message through a floating window;

在所述通知消息的实际显示时长等于预设时长之前,确定是否监测到通知消息保持显示的触发事件;Before the actual display duration of the notification message is equal to the preset duration, determining whether a trigger event for the notification message to remain displayed is monitored;

若监测到所述触发事件,则控制所述通知消息保持显示状态,直至所述触发事件结束;If the trigger event is detected, the notification message is controlled to remain displayed until the trigger event ends;

若未监测到所述触发事件,则在所述通知消息的实际显示时长等于预设时长时,结束所述通知消息的显示。If the triggering event is not detected, when the actual display duration of the notification message is equal to the preset duration, the display of the notification message is ended.

为实现上述目的,本发明实施例第二方面提供一种通知消息的显示控制装置,该装置包括:To achieve the above object, a second aspect of the embodiments of the present invention provides a display control device for a notification message, the device comprising:

接收显示模块,用于接收通知消息,通过浮动窗口显示所述通知消息;a receiving display module for receiving a notification message, and displaying the notification message through a floating window;

第一确定模块,用于在所述通知消息的实际显示时长等于预设时长之前,确定是否监测到通知消息保持显示的触发事件;a first determining module, configured to determine whether a triggering event for the notification message to remain displayed is monitored before the actual display duration of the notification message is equal to a preset duration;

控制模块,用于若监测到所述触发事件,则控制所述通知消息保持显示状态,直至所述触发事件结束;a control module, configured to control the notification message to remain displayed until the trigger event ends if the trigger event is monitored;

结束模块,用于若未监测到所述触发事件,则在所述通知消息的实际显示时长等于预设时长时,结束所述通知消息的显示。An end module, configured to end the display of the notification message when the actual display duration of the notification message is equal to a preset duration if the trigger event is not detected.

为实现上述目的,本发明实施例第三方面提供一种电子装置,电子装置包括存储器、处理器及存储在所述存储器上且在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时,实现如第一方面所述的通知消息的显示控制方法中的各个步骤。In order to achieve the above object, a third aspect of the embodiments of the present invention provides an electronic device, the electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the When the processor executes the computer program, each step in the display control method of the notification message according to the first aspect is implemented.

为实现上述目的,本发明实施例第四方面提供一种存储介质,其上存储有计算机程序,计算机程序被处理器执行时,实现如第一方面所述的通知消息的显示控制方法中的各个步骤。In order to achieve the above object, a fourth aspect of the embodiments of the present invention provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, each of the display control methods for notification messages as described in the first aspect is implemented. step.

本发明实施例提供通知消息的显示控制方法,包括:接收通知消息,通过浮动窗口显示该通知消息,在通知消息的实际显示时长等于预设时长之前,确定是否监测到该通知消息保持显示的触发事件,若监测到该触发事件,则控制通知消息保持显示状态,直至该触发事件结束,若未监测到触发事件,则在通知消息的实际显示时长等于预设时长时,结束所述通知消息的显示。相对于现有技术,在通过浮动窗口显示通知消息的过程中,可以利用通知消息保持显示的触发事件控制通知消息的实际显示时长,使得通知消息的显示时长不限于上述预设时长,可以基于用户的需要进行控制,例如,比上述预设时长更短的实际显示时长,适用于用户不关心该通知消息的场景,避免通知消息的显示对用户当前操作的影响,或者比上述预设时长更长的实际显示时长,适用于用户需要看清楚通知消息的场景,避免因显示时长太短导致用户需要下拉通知栏进一步了解通知消息的内容的问题。因此,通过利用通知消息保持显示的触发事件使得通知消息的实际显示时长更满足用户的实际需求,灵活性更好。An embodiment of the present invention provides a display control method for a notification message, including: receiving the notification message, displaying the notification message through a floating window, and determining whether to monitor a trigger for keeping the notification message displayed before the actual display duration of the notification message is equal to a preset duration If the trigger event is detected, the notification message will be controlled to remain displayed until the trigger event ends. If the trigger event is not detected, the notification message will end when the actual display duration of the notification message is equal to the preset duration. show. Compared with the prior art, in the process of displaying the notification message through the floating window, the actual display duration of the notification message can be controlled by using the trigger event that the notification message keeps displayed, so that the display duration of the notification message is not limited to the above-mentioned preset duration, and can be based on the user. For example, the actual display duration shorter than the above preset duration is suitable for scenarios where the user does not care about the notification message, so as to avoid the influence of the display of the notification message on the user's current operation, or longer than the above preset duration The actual display duration is suitable for the scenario where the user needs to see the notification message clearly, to avoid the problem that the user needs to pull down the notification bar to learn more about the content of the notification message due to the short display duration. Therefore, by using the trigger event that the notification message keeps displayed, the actual display duration of the notification message can better meet the actual needs of the user, and the flexibility is better.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1为一种电子装置的结构框图;1 is a structural block diagram of an electronic device;

图2为本发明实施例中通知消息的显示控制方法的流程示意图;2 is a schematic flowchart of a display control method for a notification message in an embodiment of the present invention;

图3为本发明实施例中通知消息的显示控制方法的另一流程示意图;3 is another schematic flowchart of a display control method for a notification message in an embodiment of the present invention;

图4为本发明实施例中通知消息的显示控制装置的结构示意图;4 is a schematic structural diagram of a display control device for a notification message in an embodiment of the present invention;

图5为本发明实施例中通知消息的显示控制装置的另一接收示意图。FIG. 5 is another schematic diagram of a display control apparatus for receiving a notification message according to an embodiment of the present invention.

具体实施方式Detailed ways

为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而非全部实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. The embodiments described above are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.

图1示出了一种电子装置的结构框图。本发明实施例提供的通知消息的显示控制方法可应用于如图1所示的电子装置10中,电子装置10可以但不限于包括:需依靠电池维持正常运行且支持网络及下载功能的智能手机、笔记本、平板电脑、穿戴智能设备等。FIG. 1 shows a structural block diagram of an electronic device. The display control method of the notification message provided by the embodiment of the present invention can be applied to the electronic device 10 as shown in FIG. 1 . The electronic device 10 may include, but is not limited to, a smart phone that requires a battery to maintain normal operation and supports network and download functions , notebooks, tablets, wearable smart devices, etc.

如图1所示,电子装置10包括存储器101、存储控制器102,一个或多个(图中仅示出一个)处理器103、外设接口104、射频模块105、按键模块106、音频模块107以及触控屏幕108、接近传感器110及压力传感器111。这些组件通过一条或多条通讯总线/信号线109相互通讯。As shown in FIG. 1 , the electronic device 10 includes a memory 101 , a memory controller 102 , one or more (only one is shown in the figure) processor 103 , a peripheral interface 104 , a radio frequency module 105 , a key module 106 , and an audio module 107 And the touch screen 108 , the proximity sensor 110 and the pressure sensor 111 . These components communicate with each other via one or more communication bus/signal lines 109 .

可以理解,图1所示的结构仅为示意,其并不对电子装置的结构造成限定。电子装置10还可包括比图1所示更多或者更少的组件,或者具有与图1所示不同的配置。图1所示的各组件可以采用硬件、软件或其组合实现。It can be understood that the structure shown in FIG. 1 is for illustration only, and does not limit the structure of the electronic device. The electronic device 10 may also include more or fewer components than shown in FIG. 1 , or have a different configuration than that shown in FIG. 1 . Each component shown in FIG. 1 may be implemented by hardware, software or a combination thereof.

存储器101可用于存储软件程序以及模块,如本发明实施例中的通知消息的显示控制方法及电子装置对应的程序指令/模块,处理器103通过运行存储在存储器101内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的通知消息的显示控制方法。The memory 101 can be used to store software programs and modules, such as the display control method of the notification message and the program instructions/modules corresponding to the electronic device in the embodiment of the present invention. The processor 103 runs the software programs and modules stored in the memory 101, thereby Executing various functional applications and data processing implements the above-mentioned display control method of the notification message.

其中,接近传感器110及压力传感器111设置在电子装置的侧面、背面或者显示界面的下部等等这些用户握持电子装置时便于触摸到的地方,其中,接近传感器110用于检测距离值,压力传感器111用于检测压力值。Among them, the proximity sensor 110 and the pressure sensor 111 are arranged on the side, the back, or the lower part of the display interface of the electronic device, where the user can easily touch the electronic device. The proximity sensor 110 is used to detect the distance value, and the pressure sensor 111 is used to detect the pressure value.

存储器101可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器101可进一步包括相对于处理器103远程设置的存储器,这些远程存储器可以通过网络连接至电子装置10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。处理器103以及其他可能的组件对存储器101的访问可在存储控制器102的控制下进行。Memory 101 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 101 may further include memory located remotely from the processor 103, and these remote memories may be connected to the electronic device 10 through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. Access to memory 101 by processor 103 and possibly other components may be under the control of memory controller 102 .

外设接口104将各种输入/输入装置耦合至CPU以及存储器101。处理器103运行存储器101内的各种软件、指令以执行电子装置10的各种功能以及进行数据处理。A peripheral interface 104 couples various input/input devices to the CPU and memory 101 . The processor 103 runs various software and instructions in the memory 101 to perform various functions of the electronic device 10 and perform data processing.

在一些实施例中,外设接口104,处理器103以及存储控制器102可以在单个芯片中实现。在其他一些实例中,他们可以分别由独立的芯片实现。In some embodiments, peripheral interface 104, processor 103, and memory controller 102 may be implemented in a single chip. In other instances, they may be implemented by separate chips.

射频模块105用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯。射频模块105可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。射频模块105可与各种网络如互联网、企业内部网、预置类型的无线网络进行通讯或者通过预置类型的无线网络与其他设备进行通讯。上述的预置类型的无线网络可包括蜂窝式电话网、无线局域网或者城域网。上述的预置类型的无线网络可以使用各种通信标准、协议及技术,包括但并不限于全球移动通信系统(Global System for MobileCommunication,GSM),增强型移动通信技术(Enhanced Data GSM Environment,EDGE),宽带码分多址技术(Wideband Code Division Multiple Access,W-CDMA),码分多址技术(Code Division Access,CDMA),时分多址技术(Time Division Multiple Access,TDMA),蓝牙,无线保真技术(Wireless-Fidelity,WiFi)(如美国电气和电子工程师协会标准IEEE802.11a、IEEE 802.11b、IEEE802.11g和/或IEEE 802.11n),网络电话(Voice overInternet Protocal,VoIP),全球微波互联接入(Worldwide Interoperability forMicrowave Access,Wi-Max),其他用于邮件、即时通讯及短消息的协议,以及任何其他合适的通讯协议。The radio frequency module 105 is used for receiving and sending electromagnetic waves, realizing mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The radio frequency module 105 may include various existing circuit elements for performing these functions, eg, antennas, radio frequency transceivers, digital signal processors, encryption/decryption chips, subscriber identity module (SIM) cards, memory, and the like. The radio frequency module 105 can communicate with various networks such as the Internet, an intranet, a preset type of wireless network, or communicate with other devices through a preset type of wireless network. The aforementioned preset types of wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned preset types of wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE) , Wideband Code Division Multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Bluetooth, Wireless Fidelity Technology (Wireless-Fidelity, WiFi) (e.g. Institute of Electrical and Electronics Engineers standards IEEE802.11a, IEEE 802.11b, IEEE802.11g and/or IEEE 802.11n), Voice over Internet Protocol (VoIP), World Interconnection for Microwave Access (Worldwide Interoperability for Microwave Access, Wi-Max), other protocols for mail, instant messaging and short messages, and any other suitable communication protocols.

按键模块106提供用户向电子装置进行输入的接口,用户可以通过按下不同的按键以使电子装置10执行不同的功能。The key module 106 provides an interface for the user to input to the electronic device, and the user can press different keys to make the electronic device 10 perform different functions.

音频模块107向用户提供音频接口,其可包括一个麦克风、一个或者多个扬声器、一个受话器以及音频电路。音频电路从外设接口104处接收声音数据,将声音数据转换为电信息,将电信息传输至扬声器或者受话器。扬声器将电信息转换为人耳能听到的声波。音频电路还从麦克风处接收电信息,将电信号转换为声音数据,并将声音数据传输至外设接口104中以进行进一步的处理。音频数据可以从存储器101处或者通过射频模块105获取。此外,音频数据也可以存储至存储器101中或者通过射频模块105进行发送。在一些实例中,音频模块107还可包括一个耳机播孔,用于向耳机或者其他设备提供音频接口。Audio module 107 provides an audio interface to the user, which may include a microphone, one or more speakers, a receiver, and audio circuitry. The audio circuit receives the sound data from the peripheral interface 104, converts the sound data into electrical information, and transmits the electrical information to the speaker or the receiver. Speakers convert electrical information into sound waves that the human ear can hear. The audio circuit also receives electrical information from the microphone, converts the electrical signal into sound data, and transmits the sound data to the peripheral interface 104 for further processing. Audio data can be obtained from the memory 101 or through the radio frequency module 105 . In addition, audio data can also be stored in the memory 101 or transmitted through the radio frequency module 105 . In some instances, the audio module 107 may also include a headphone jack for providing an audio interface to headphones or other devices.

触控屏幕108在电子装置与用户之间同时提供一个输出及输入界面。具体地,触控屏幕108向用户显示视频输出,这些视频输出的内容可包括文字、图形、视频、及其任意组合。一些输出结果是对应于一些用户界面对象。触控屏幕108还接收用户的输入,例如用户的点击、滑动等手势操作,以便用户界面对象对这些用户的输入做出响应。检测用户输入的技术可以是基于电阻式、电容式或者其他任意可能的触控检测技术。触控屏幕108显示单元的具体实例包括但并不限于液晶显示器或发光聚合物显示器。The touch screen 108 simultaneously provides an output and input interface between the electronic device and the user. Specifically, the touch screen 108 displays video output to the user, and the content of the video output may include text, graphics, video, and any combination thereof. Some output results correspond to some user interface objects. The touch screen 108 also receives user input, such as the user's tap, swipe, and other gesture operations, so that the user interface objects respond to these user inputs. The technology for detecting user input may be based on resistive, capacitive or any other possible touch detection technology. Specific examples of the display unit of the touch screen 108 include, but are not limited to, liquid crystal displays or light emitting polymer displays.

基于上述电子装置描述本发明实施例中通知消息的显示控制方法。Based on the above electronic device, the display control method of the notification message in the embodiment of the present invention is described.

由于现有技术中,通知消息在显示界面上的显示时长固定,存在不灵活的问题。Since in the prior art, the display time of the notification message on the display interface is fixed, there is a problem of inflexibility.

为了解决上述技术问题,本发明提出一种通知消息的显示控制方法,在通过浮动窗口显示通知消息的过程中,可以利用通知消息保持显示的触发事件控制通知消息的实际显示时长,使得通知消息的显示时长不限于上述预设时长,可以基于用户的需要进行控制,例如,比上述预设时长更短的实际显示时长,适用于用户不关心该通知消息的场景,避免通知消息的显示对用户当前操作的影响,或者比上述预设时长更长的实际显示时长,适用于用户需要看清楚通知消息的场景,避免因显示时长太短导致用户需要下拉通知栏进一步了解通知消息的内容的问题。因此,通过利用通知消息保持显示的触发事件使得通知消息的实际显示时长更满足用户的实际需求,灵活性更好。In order to solve the above technical problems, the present invention proposes a display control method for a notification message. In the process of displaying the notification message through a floating window, the actual display duration of the notification message can be controlled by using the trigger event that the notification message keeps displayed, so that the notification message is displayed. The display duration is not limited to the above preset duration, and can be controlled based on the user's needs. For example, an actual display duration shorter than the above preset duration is suitable for scenarios where the user does not care about the notification message, and prevents the display of the notification message from affecting the user's current status. The impact of the operation, or the actual display duration longer than the above preset duration, is suitable for scenarios where the user needs to see the notification message clearly, avoiding the problem that the user needs to pull down the notification bar to learn more about the content of the notification message due to the short display duration. Therefore, by using the trigger event that the notification message keeps displayed, the actual display duration of the notification message can better meet the actual needs of the user, and the flexibility is better.

请参阅图2,为本发明实施例中通知消息的显示控制方法的流程示意图,包括:Please refer to FIG. 2 , which is a schematic flowchart of a display control method for a notification message in an embodiment of the present invention, including:

步骤201、接收通知消息,通过浮动窗口显示所述通知消息;Step 201, receiving a notification message, and displaying the notification message through a floating window;

在本发明实施例中,上述通知消息的显示控制方法由通知消息的显示控制装置(以下简称为:显示控制装置)实现,且该显示控制装置为程序模块,存储在电子装置的存储器内,电子装置内的处理器可以调用该显示控制装置,以实现上述的显示控制方法。In this embodiment of the present invention, the display control method for the notification message is implemented by a display control device for the notification message (hereinafter referred to as a display control device), and the display control device is a program module, stored in the memory of the electronic device, and the electronic The processor in the device can call the display control device to implement the above-mentioned display control method.

在本发明实施例中,电子装置内可安装多种不同的应用程序,这些应用程序都将接收到相应的服务器发送的通知消息,其中,该通知消息可以是即时消息,例如,即时通讯应用程序的聊天信息,也可以是内容推广信息,例如,新闻类的应用程序推送的最新新闻等等。In this embodiment of the present invention, a variety of different application programs may be installed in the electronic device, and these application programs will receive a notification message sent by a corresponding server, where the notification message may be an instant message, for example, an instant messaging application program chat information, or content promotion information, for example, the latest news pushed by news applications, etc.

其中,显示控制装置在接收到通知消息之后,将通过浮动窗口显示该通知消息,具体的,可以显示在显示界面的上部,或者通过滚动的方式滚动播放该通知消息内的内容,通常情况下,该通知消息的显示时长为预设时长,例如,通知消息在浮动窗口中显示3秒,或者通知消息在浮动窗口中显示5秒,显示时长达到3秒或5秒之后,将结束该通知消息的显示,并将通知消息放置在通知栏中,用户若需要查看通知消息,则需要下拉通知栏。Wherein, after receiving the notification message, the display control device will display the notification message through a floating window. Specifically, the notification message may be displayed on the upper part of the display interface, or the content in the notification message may be scrolled and played in a scrolling manner. Usually, The notification message is displayed for a preset duration. For example, the notification message is displayed in the floating window for 3 seconds, or the notification message is displayed in the floating window for 5 seconds. After the display time reaches 3 seconds or 5 seconds, the notification message will end. display, and place the notification message in the notification bar. If the user wants to view the notification message, they need to pull down the notification bar.

步骤202、在所述通知消息的实际显示时长等于预设时长之前,确定是否监测到所述通知消息保持显示的触发事件;Step 202, before the actual display duration of the notification message is equal to a preset duration, determine whether a trigger event that keeps the notification message displayed is monitored;

在本发明实施例中,预设时长是通知消息通过浮动窗口显示的默认时长,若用户想要控制通知消息的显示时长,则可以利用通知消息保持显示的触发事件。其中,通知消息保持显示的触发事件需要用户在电子装置上执行相应的操作,且用户在执行相应的操作生成该触发事件之后,通知消息的显示时间将不再是默认的预设时长,而是与该触发事件的有效时间有关。In this embodiment of the present invention, the preset duration is the default duration for the notification message to be displayed through the floating window. If the user wants to control the display duration of the notification message, the trigger event for keeping the display of the notification message can be used. The trigger event for the notification message to remain displayed requires the user to perform a corresponding operation on the electronic device, and after the user performs the corresponding operation to generate the trigger event, the display time of the notification message will no longer be the default preset duration, but It is related to the valid time of the trigger event.

其中,用户执行的相应操作可以是指定位置的按压操作,或者针对指定类型的传感器的触控或靠近操作等等,在实际应用中可根据具体的情况设置,此处不做限定。The corresponding operation performed by the user may be a pressing operation at a specified position, or a touch or approach operation for a specified type of sensor, etc., which may be set according to specific conditions in practical applications, which is not limited here.

在本发明实施例中,在通知消息的实际显示时长等于预设时长之前,确定是否监测到通知消息保持显示的触发事件,需要说明的是,一旦监测到触发事件,则通知消息的实际显示时长则由触发事件控制,而非按照预设时长显示。In this embodiment of the present invention, before the actual display duration of the notification message is equal to the preset duration, it is determined whether a trigger event for the notification message to remain displayed is monitored. It should be noted that, once the trigger event is monitored, the actual display duration of the notification message It is controlled by the trigger event, rather than displayed for a preset duration.

步骤203、若监测到所述触发事件,则控制所述通知消息保持显示状态,直至所述触发事件结束;Step 203: If the trigger event is monitored, control the notification message to keep the display state until the trigger event ends;

步骤204、若未监测到所述触发事件,则在所述通知消息的实际显示时长等于预设时长时,结束所述通知消息的显示。Step 204: If the trigger event is not detected, when the actual display duration of the notification message is equal to the preset duration, end the display of the notification message.

在本发明实施例中,若监测到触发事件,表明通知消息的实际显示时长则由触发事件控制,显示控制装置将控制该通知消息保持显示状态,若监测到触发事件结束,则结束通知消息的显示,在这种情况下,通知消息的实际显示时间等于a+b,其中a小于或等于预设时长,且具体为通知消息的开始显示的时间点至监测到触发事件的时间点之间的时长,b则表示监测到触发事件的时间点至监测到触发事件结束的时间点之间的时长。可以理解的是,该通知消息的实际显示时长可以小于或等于该预设时长,例如,若用户在全屏玩游戏时,若接收到新闻应用程序推送的新闻消息时,该新闻消息默认是通过浮动窗口的形式显示5秒,然而该新闻消息的显示将影响到用户玩游戏的体验,此时,用户通过执行相应操作生成上述触发事件并立即结束该触发事件,则可以立即结束该新闻消息的显示,例如,新闻消息在显示到第二秒时,电子装置监测到触发事件的生成,在第三秒时,监测到触发事件的结束,则在新闻消息显示到第三秒时,就将结束其显示,降低对用户玩游戏的体验的影响。此外,该通知消息的实际显示时长也可以大于该预设时长。例如,若用户在全屏看电影时,若接收到微信好友发送的微信消息,此时,该微信消息将通过浮动窗口的形式显示,且默认是5秒,此时,若用户需要仔细看该微信消息的内容,5秒的时间显然是不够的,用户则可以通过执行相应的操作生成触发事件,并保持该触发事件不结束,则可以有足够的时间看清楚该微信消息的内容,使得用户不需要在5秒结束后退出全屏状态,并下拉通知栏的方式查看微信消息,满足用户的使用需求。In the embodiment of the present invention, if a trigger event is monitored, it indicates that the actual display duration of the notification message is controlled by the trigger event, and the display control device will control the notification message to keep the display state, and if the end of the trigger event is monitored, it will end the display of the notification message. Display, in this case, the actual display time of the notification message is equal to a+b, where a is less than or equal to the preset duration, and is specifically the time between the time when the notification message starts to be displayed and the time when the trigger event is monitored. duration, and b represents the duration between the time when the trigger event is monitored and the time when the trigger event ends. It can be understood that the actual display duration of the notification message may be less than or equal to the preset duration. For example, if the user is playing a game in full screen, if a news message pushed by a news application is received, the news message will be displayed by floating by default. The window is displayed for 5 seconds, but the display of the news message will affect the user's experience of playing the game. At this time, the user generates the above trigger event by performing the corresponding operation and immediately ends the trigger event, then the display of the news message can be ended immediately. For example, when the news message is displayed for the second second, the electronic device monitors the generation of the trigger event, and at the third second, the end of the trigger event is monitored, and when the news message is displayed for the third second, it will end its Display, reduce the impact on the user's experience of playing the game. In addition, the actual display duration of the notification message may also be longer than the preset duration. For example, if a user is watching a movie in full screen and receives a WeChat message from a WeChat friend, the WeChat message will be displayed in a floating window, and the default is 5 seconds. At this time, if the user needs to carefully read the WeChat message The content of the message, 5 seconds is obviously not enough time, the user can generate a trigger event by performing the corresponding operation, and keep the trigger event not over, then there is enough time to clearly see the content of the WeChat message, so that the user does not You need to exit the full-screen state after 5 seconds, and pull down the notification bar to view WeChat messages to meet the needs of users.

可以理解的是,本发明技术方案的优点在全屏状态下更加明显,使得用户不需要退出全屏状态即可有足够的时间查看通知消息,避免对用户全屏状态下的操作的影响。It can be understood that the advantages of the technical solution of the present invention are more obvious in the full screen state, so that the user does not need to exit the full screen state to have enough time to view the notification message, avoiding the impact on the user's operation in the full screen state.

在本发明实施例中,接收通知消息,通过浮动窗口显示该通知消息,在通知消息的实际显示时长等于预设时长之前,确定是否监测到该通知消息保持显示的触发事件,若监测到该触发事件,则控制通知消息保持显示状态,直至该触发事件结束,若未监测到触发事件,则在通知消息的实际显示时长等于预设时长时,结束所述通知消息的显示。相对于现有技术,在通过浮动窗口显示通知消息的过程中,可以利用通知消息保持显示的触发事件控制通知消息的实际显示时长,使得通知消息的显示时长不限于上述预设时长,可以基于用户的需要进行控制,例如,比上述预设时长更短的实际显示时长,适用于用户不关心该通知消息的场景,避免通知消息的显示对用户当前操作的影响,或者比上述预设时长更长的实际显示时长,适用于用户需要看清楚通知消息的场景,避免因显示时长太短导致用户需要下拉通知栏进一步了解通知消息的内容的问题。因此,通过利用通知消息保持显示的触发事件使得通知消息的实际显示时长更满足用户的实际需求,灵活性更好。In this embodiment of the present invention, a notification message is received, the notification message is displayed through a floating window, and before the actual display duration of the notification message is equal to a preset duration, it is determined whether a trigger event for keeping the notification message displayed is detected, and if the trigger event is detected If the trigger event is not detected, the display of the notification message is ended when the actual display duration of the notification message is equal to the preset duration. Compared with the prior art, in the process of displaying the notification message through the floating window, the actual display duration of the notification message can be controlled by using the trigger event that the notification message keeps displayed, so that the display duration of the notification message is not limited to the above-mentioned preset duration, and can be based on the user. For example, the actual display duration shorter than the above preset duration is suitable for scenarios where the user does not care about the notification message, so as to avoid the influence of the display of the notification message on the user's current operation, or longer than the above preset duration The actual display duration is suitable for the scenario where the user needs to see the notification message clearly, to avoid the problem that the user needs to pull down the notification bar to learn more about the content of the notification message due to the short display duration. Therefore, by using the trigger event that the notification message keeps displayed, the actual display duration of the notification message can better meet the actual needs of the user, and the flexibility is better.

请参阅图3,为本发明实施例中通知消息的显示控制方法的流程示意图,该方法包括:Please refer to FIG. 3 , which is a schematic flowchart of a display control method of a notification message in an embodiment of the present invention, and the method includes:

步骤301、接收通知消息,通过浮动窗口显示所述通知消息;Step 301: Receive a notification message, and display the notification message through a floating window;

在本发明实施例中,步骤301与图2所示实施例中步骤201描述的内容相似,具体可参阅图2所示实施例中的步骤201,此处不做赘述。In this embodiment of the present invention, step 301 is similar to the content described in step 201 in the embodiment shown in FIG. 2 . For details, reference may be made to step 201 in the embodiment shown in FIG. 2 , which is not repeated here.

步骤302、在所述通知消息的实际显示时长等于预设时长之前,实时获取所述接近传感器的感应到的距离值;Step 302: Acquire the sensed distance value of the proximity sensor in real time before the actual display duration of the notification message is equal to a preset duration;

步骤303、当所述距离值小于或等于第一阈值时,确定监测到所述触发事件;Step 303, when the distance value is less than or equal to a first threshold, determine that the trigger event is detected;

步骤304、若监测到所述触发事件,则控制所述通知消息保持显示状态,直至所述触发事件结束;Step 304: If the trigger event is monitored, control the notification message to keep the display state until the trigger event ends;

步骤305、若未监测到所述触发事件,则在则在所述通知消息的实际显示时长等于预设时长时,结束所述通知消息的显示;Step 305: If the trigger event is not detected, when the actual display duration of the notification message is equal to the preset duration, end the display of the notification message;

在本发明实施例中,电子装置包含接近传感器,该接近传感器设置在用户握持电子装置时,容易接触到的地方,例如,以智能手机为例,可以设置在智能手机的侧面或者背面,或者设置在智能手机显示界面的下部,这样,用户在操作智能手机时,能够方便的将手指覆盖或靠近接近传感器所在的位置,便于用户通过利用该接近传感器实现与电子装置之间的交互。In this embodiment of the present invention, the electronic device includes a proximity sensor, and the proximity sensor is disposed at a place that is easily accessible to a user when holding the electronic device. It is arranged at the lower part of the display interface of the smartphone, so that when the user operates the smartphone, the user can conveniently cover or approach the position of the proximity sensor, so that the user can interact with the electronic device by using the proximity sensor.

其中,接近传感器是代替限位开关等接触式检测方式,以无需接触检测对象进行检测为目的的传感器的总称。能检测对象的移动信息和存在信息,并转换为电气信号。在本发明实施例中,该接近传感器用于检测用户与电子装置的距离值。Among them, a proximity sensor is a general term for a sensor that replaces a contact detection method such as a limit switch and aims to detect without touching the detection object. The movement information and presence information of objects can be detected and converted into electrical signals. In this embodiment of the present invention, the proximity sensor is used to detect the distance between the user and the electronic device.

在本发明实施例中,为了降低接近传感器的电量消耗,及避免误操作,显示控制装置可以在接收到通知消息之后才开启接近传感器,或者在通知栏内存在至少一个通知消息保持接近传感器处于开启状态,在通知栏内无任何通知消息且未接收到通知消息时,关闭接近传感器。In this embodiment of the present invention, in order to reduce the power consumption of the proximity sensor and avoid misoperation, the display control device may turn on the proximity sensor after receiving the notification message, or at least one notification message exists in the notification bar to keep the proximity sensor turned on Status, when there is no notification message in the notification bar and no notification message is received, turn off the proximity sensor.

其中,在通知消息的实际显示时长等于预设时长之前,显示控制装置将实施获取接近传感器感应到的距离值。其中,接近传感器具体可以为红外接近传感器,红外接近传感器可通过发送红外线的方式检测具有温度的物体(如人体)与其之间的距离。Wherein, before the actual display duration of the notification message is equal to the preset duration, the display control device will implement the acquisition of the distance value sensed by the proximity sensor. The proximity sensor may specifically be an infrared proximity sensor, and the infrared proximity sensor may detect the distance between an object with temperature (such as a human body) and it by sending infrared rays.

其中,在接近传感器感应到的距离值小于或等于第一阈值时,确定监测到通知消息保持显示的触发事件。此时,显示控制装置将基于该触发事件控制通知消息保持显示状态,直至该触发事件结束,即直至该接近传感器感应到的距离值大于上述第一阈值,其中,该第一阈值可以设置0至0.5cm中的任意一个数值。其中,第一阈值为0则表示用户的手指必须要触摸到电子装置中接近传感器所处的位置对应的表面。为红外接近传感器设置与智能手机的左侧面为例,用户在使用智能手机全屏观看视频时,若接收到好友发送的微信消息,则用户可以利用握持智能手机的左手拇指接触智能手机左侧面的红外接近传感器,并保持触摸的状态,以使得触发事件一直保持,智能手机则将一直显示微信消息,直至触发事件结束。Wherein, when the distance value sensed by the proximity sensor is less than or equal to the first threshold, it is determined to monitor the triggering event that the notification message remains displayed. At this time, the display control device will control the notification message based on the trigger event to keep the display state until the trigger event ends, that is, until the distance value sensed by the proximity sensor is greater than the above-mentioned first threshold, wherein the first threshold can be set from 0 to Any value in 0.5cm. The first threshold value of 0 indicates that the user's finger must touch the surface corresponding to the position of the proximity sensor in the electronic device. Take the infrared proximity sensor setting and the left side of the smartphone as an example. When a user is watching a video in full screen on the smartphone, if a WeChat message sent by a friend is received, the user can use the left thumb holding the smartphone to touch the left side of the smartphone. Infrared proximity sensor on the face, and keep the touch state, so that the trigger event is always maintained, and the smartphone will continue to display the WeChat message until the trigger event ends.

可以理解的是,在本发明实施例中,触发事件结束是指接近传感器的距离值大于第一阈值的情况,且若需要保持通知消息的处于保持显示状态,则需要保持监测到的距离值保持小于或等于第一阈值的状态,例如,若需要触发事件保持通知消息显示10秒钟,则在该10秒内连续监测到的距离值都需要保持小于或等于第一阈值的状态,即触发事件未结束。It can be understood that, in this embodiment of the present invention, the end of the trigger event refers to the situation where the distance value of the proximity sensor is greater than the first threshold, and if the notification message needs to be kept in the display state, the monitored distance value needs to be kept. The state is less than or equal to the first threshold. For example, if the trigger event needs to keep the notification message displayed for 10 seconds, the distance value continuously monitored during the 10 seconds needs to be kept less than or equal to the first threshold, that is, the trigger event Not over.

需要说明的是,在本发明实施例中,用户除了基于与接近传感器进行交互生成通知消息保持显示的触发事件之外,还可以通过其他的方式生成该触发事件,例如,可以在电子装置内设置压力传感器,该压力传感器具体可以设置在电子装置的侧面,或者电子装置的背面,或者电子装置的显示界面的下部分等等这些方便用户触摸到的地方。且当监测到电子装置内的压力传感器感应到的压力值大于或等于第二阈值时,则确定监测到通知消息保持显示的触发事件,使得用户可以通过按压压力传感器的方式控制通知消息的实际显示时长。It should be noted that, in this embodiment of the present invention, in addition to generating a trigger event for the notification message to remain displayed based on interaction with the proximity sensor, the user may also generate the trigger event in other ways, for example, the trigger event may be set in the electronic device A pressure sensor, the pressure sensor can be specifically arranged on the side of the electronic device, or the back of the electronic device, or the lower part of the display interface of the electronic device, etc., which are convenient for the user to touch. And when it is detected that the pressure value sensed by the pressure sensor in the electronic device is greater than or equal to the second threshold, it is determined that the trigger event that the notification message is kept displayed is monitored, so that the user can control the actual display of the notification message by pressing the pressure sensor. duration.

或者,还可以设置用户可通过在通知消息的显示区域内执行长按操作的方式生成触发事件,使得当监测到通知消息的显示区域内的长按操作时,确定监测到触发事件,其中,将按压时间超过2秒的按压操作确定为长按操作。Alternatively, it can also be set that the user can generate a trigger event by performing a long-press operation in the display area of the notification message, so that when the long-press operation in the display area of the notification message is detected, it is determined that the trigger event is detected, wherein the A pressing operation whose pressing time exceeds 2 seconds is determined as a long pressing operation.

在实际应用中,可以根据具体的需要设置触发事件的生成方式,此处不做赘述。In practical applications, the generation method of the trigger event may be set according to specific needs, which will not be repeated here.

步骤306、若监测到通知消息的召回显示触发事件,则确定最近接收到的且位于通知栏内的目标通知消息;Step 306, if the recall display trigger event of the notification message is monitored, determine the target notification message recently received and located in the notification bar;

步骤307、通过浮动窗口在当前显示界面上显示所述目标通知消息。Step 307: Display the target notification message on the current display interface through a floating window.

在本发明实施例中,用户若在预设时长内未来得及通过相应的操作生成触发事件,或者不小心结束了触发事件,还可以通过生成召回显示触发事件的方式,召回在通知栏中的通知消息,具体的,电子装置上可以设置接近传感器或者压力传感器实现召回显示触发事件的生成,例如,用户可以通过接近或触摸接近传感器的方式,使得接近传感器监测到的距离值小于或等于第一阈值,以生存召回显示触发事件,或者用户可以通过按压压力传感器的方式,使得压力值大于或等于第二阈值,以生成召回显示触发事件,使得用户即使来不及在预设时长内执行相应操作,也可以通过召回的方式,查看到通知消息。In this embodiment of the present invention, if the user fails to generate a trigger event through a corresponding operation within a preset time period, or accidentally ends the trigger event, the user can also recall the notification in the notification bar by generating a recall display trigger event. Message, specifically, a proximity sensor or a pressure sensor can be set on the electronic device to realize the generation of a recall display trigger event. For example, the user can approach or touch the proximity sensor, so that the distance value monitored by the proximity sensor is less than or equal to the first threshold. , display the trigger event by survival recall, or the user can press the pressure sensor to make the pressure value greater than or equal to the second threshold to generate the trigger event for recall display, so that the user can perform the corresponding operation even if it is too late to perform the corresponding operation within the preset time period. Check the notification message by recalling.

可以理解的是,为了避免误操作,可以设置一个时长,通知消息结束显示之后的某一个时长内,用户可以执行相应操作生成召回显示触发事件,若超过该时长,则无法生成召回显示触发事件,即无法召回通知消息并显示。It is understandable that, in order to avoid misoperation, a time period can be set. Within a certain period of time after the notification message finishes displaying, the user can perform corresponding operations to generate a recall display trigger event. If the time period exceeds, the recall display trigger event cannot be generated. That is, the notification message cannot be recalled and displayed.

在本发明实施例中,在通过浮动窗口显示通知消息的过程中,可以利用通知消息保持显示的触发事件控制通知消息的实际显示时长,使得通知消息的显示时长不限于上述预设时长,可以基于用户的需要进行控制,例如,比上述预设时长更短的实际显示时长,适用于用户不关心该通知消息的场景,避免通知消息的显示对用户当前操作的影响,或者比上述预设时长更长的实际显示时长,适用于用户需要看清楚通知消息的场景,避免因显示时长太短导致用户需要下拉通知栏进一步了解通知消息的内容的问题。因此,通过利用通知消息保持显示的触发事件使得通知消息的实际显示时长更满足用户的实际需求,灵活性更好。且通知消息在结束显示之后,还可以通过生成召回显示触发事件的方式,重新显示通知消息,使得用户在通知消息结束显示之后,不需要退出全屏状态,也不需要下拉通知栏,即可查看到通知消息。In the embodiment of the present invention, in the process of displaying the notification message through the floating window, the actual display duration of the notification message can be controlled by using the trigger event that the notification message keeps displayed, so that the display duration of the notification message is not limited to the above-mentioned preset duration, and can be based on The user needs to control, for example, the actual display duration shorter than the above preset duration is suitable for the scenario where the user does not care about the notification message, so as to avoid the influence of the display of the notification message on the user's current operation, or longer than the above preset duration. The long actual display time is suitable for scenarios where the user needs to see the notification message clearly, avoiding the problem that the user needs to pull down the notification bar to learn more about the content of the notification message due to the short display time. Therefore, by using the trigger event that the notification message keeps displayed, the actual display duration of the notification message can better meet the actual needs of the user, and the flexibility is better. And after the notification message is displayed, the notification message can be redisplayed by generating a recall display trigger event, so that the user does not need to exit the full-screen state or pull down the notification bar to view the notification message after the notification message is displayed. notification message.

请参阅图4,为本发明实施例中通知消息的显示控制装置的结构示意图,该装置包括:Please refer to FIG. 4 , which is a schematic structural diagram of a display control device for a notification message in an embodiment of the present invention, the device includes:

接收显示模块401,用于接收通知消息,通过浮动窗口显示所述通知消息;A receiving display module 401, configured to receive a notification message, and display the notification message through a floating window;

第一确定模块402,用于在所述通知消息的实际显示时长等于预设时长之前,确定是否监测到通知消息保持显示的触发事件;a first determining module 402, configured to determine whether a trigger event for the notification message to remain displayed is monitored before the actual display duration of the notification message is equal to a preset duration;

控制模块403,用于若监测到所述触发事件,则控制所述通知消息保持显示状态,直至所述触发事件结束;a control module 403, configured to control the notification message to remain displayed until the trigger event ends if the trigger event is monitored;

结束模块404,用于若未监测到所述触发事件,则在所述通知消息的实际显示时长等于预设时长时,结束所述通知消息的显示。The end module 404 is configured to end the display of the notification message when the actual display duration of the notification message is equal to a preset duration if the trigger event is not detected.

在本发明实施例中,接收通知消息,通过浮动窗口显示该通知消息,在通知消息的实际显示时长等于预设时长之前,确定是否监测到该通知消息保持显示的触发事件,若监测到该触发事件,则控制通知消息保持显示状态,直至该触发事件结束,若未监测到触发事件,则在通知消息的实际显示时长等于预设时长时,结束所述通知消息的显示。相对于现有技术,在通过浮动窗口显示通知消息的过程中,可以利用通知消息保持显示的触发事件控制通知消息的实际显示时长,使得通知消息的显示时长不限于上述预设时长,可以基于用户的需要进行控制,例如,比上述预设时长更短的实际显示时长,适用于用户不关心该通知消息的场景,避免通知消息的显示对用户当前操作的影响,或者比上述预设时长更长的实际显示时长,适用于用户需要看清楚通知消息的场景,避免因显示时长太短导致用户需要下拉通知栏进一步了解通知消息的内容的问题。因此,通过利用通知消息保持显示的触发事件使得通知消息的实际显示时长更满足用户的实际需求,灵活性更好。In this embodiment of the present invention, a notification message is received, the notification message is displayed through a floating window, and before the actual display duration of the notification message is equal to a preset duration, it is determined whether a trigger event for keeping the notification message displayed is detected, and if the trigger event is detected If the trigger event is not detected, the display of the notification message is ended when the actual display duration of the notification message is equal to the preset duration. Compared with the prior art, in the process of displaying the notification message through the floating window, the actual display duration of the notification message can be controlled by using the trigger event that the notification message keeps displayed, so that the display duration of the notification message is not limited to the above-mentioned preset duration, and can be based on the user. For example, the actual display duration shorter than the above preset duration is suitable for scenarios where the user does not care about the notification message, so as to avoid the influence of the display of the notification message on the user's current operation, or longer than the above preset duration The actual display duration is suitable for the scenario where the user needs to see the notification message clearly, to avoid the problem that the user needs to pull down the notification bar to learn more about the content of the notification message due to the short display duration. Therefore, by using the trigger event that the notification message keeps displayed, the actual display duration of the notification message can better meet the actual needs of the user, and the flexibility is better.

请参阅图5,为本发明实施例中通知消息的显示控制装置的结构示意图,包括如图4所示实施例中的接收显示模块401、第一确定模块402、控制模块403及结束模块404,且与图4所示实施例中描述的内容相似,此处不做赘述。Please refer to FIG. 5 , which is a schematic structural diagram of a display control device for a notification message in an embodiment of the present invention, including a receiving display module 401 , a first determining module 402 , a control module 403 and an end module 404 in the embodiment shown in FIG. 4 , It is similar to the content described in the embodiment shown in FIG. 4 , and is not repeated here.

在本发明实施例中,第一确定模块402包括:In this embodiment of the present invention, the first determining module 402 includes:

第一获取模块501,用于在所述通知消息的实际显示时长等于预设时长之前,实时获取电子装置内的接近传感器的感应到的距离值;The first acquiring module 501 is configured to acquire, in real time, a distance value sensed by a proximity sensor in the electronic device before the actual display duration of the notification message is equal to a preset duration;

第二确定模块502,用于当所述距离值小于或等于第一阈值时,确定监测到所述触发事件;a second determining module 502, configured to determine that the trigger event is detected when the distance value is less than or equal to a first threshold;

或者,所述第一确定模块402包括:Alternatively, the first determining module 402 includes:

第三确定模块503,用于当监测到所述电子装置内的压力传感器感应到的压力值大于或等于第二阈值时,或者当监测到所述通知消息的显示区域内的长按操作时,确定监测到所述触发事件。The third determination module 503 is configured to: when monitoring that the pressure value sensed by the pressure sensor in the electronic device is greater than or equal to the second threshold, or when monitoring the long-press operation in the display area of the notification message, It is determined that the trigger event is detected.

在本发明实施例中,该装置还包括:In an embodiment of the present invention, the device further includes:

第二获取模块504,用于实时获取电子装置上的接近传感器或者压力传感器感应到距离值或者压力值;The second acquisition module 504 is configured to acquire the distance value or pressure value sensed by the proximity sensor or pressure sensor on the electronic device in real time;

第四确定模块505,用于当所述距离值小于或等于第一阈值时,或者当所述压力值大于或等于第二阈值时,确定监测到所述召回显示触发事件;a fourth determination module 505, configured to determine that the recall display trigger event is monitored when the distance value is less than or equal to a first threshold, or when the pressure value is greater than or equal to a second threshold;

第五确定模块506,用于若监测到通知消息的召回显示触发事件,则确定最近接收到的且位于通知栏内的目标通知消息;The fifth determining module 506 is configured to determine the recently received target notification message located in the notification bar if the recall display trigger event of the notification message is monitored;

显示模块507,用于通过浮动窗口在当前显示界面上显示所述目标通知消息。The display module 507 is configured to display the target notification message on the current display interface through a floating window.

在本发明实施例中,在通过浮动窗口显示通知消息的过程中,可以利用通知消息保持显示的触发事件控制通知消息的实际显示时长,使得通知消息的显示时长不限于上述预设时长,可以基于用户的需要进行控制,例如,比上述预设时长更短的实际显示时长,适用于用户不关心该通知消息的场景,避免通知消息的显示对用户当前操作的影响,或者比上述预设时长更长的实际显示时长,适用于用户需要看清楚通知消息的场景,避免因显示时长太短导致用户需要下拉通知栏进一步了解通知消息的内容的问题。因此,通过利用通知消息保持显示的触发事件使得通知消息的实际显示时长更满足用户的实际需求,灵活性更好。且通知消息在结束显示之后,还可以通过生成召回显示触发事件的方式,重新显示通知消息,使得用户在通知消息结束显示之后,不需要退出全屏状态,也不需要下拉通知栏,即可查看到通知消息。In the embodiment of the present invention, in the process of displaying the notification message through the floating window, the actual display duration of the notification message can be controlled by using the trigger event that the notification message keeps displayed, so that the display duration of the notification message is not limited to the above-mentioned preset duration, and can be based on The user needs to control, for example, the actual display duration shorter than the above preset duration is suitable for the scenario where the user does not care about the notification message, so as to avoid the influence of the display of the notification message on the user's current operation, or longer than the above preset duration. The long actual display time is suitable for scenarios where the user needs to see the notification message clearly, avoiding the problem that the user needs to pull down the notification bar to learn more about the content of the notification message due to the short display time. Therefore, by using the trigger event that the notification message keeps displayed, the actual display duration of the notification message can better meet the actual needs of the user, and the flexibility is better. And after the notification message is displayed, the notification message can be redisplayed by generating a recall display trigger event, so that the user does not need to exit the full-screen state or pull down the notification bar to view the notification message after the notification message is displayed. notification message.

进一步的,在本发明实施例中还提供一种电子装置,该电子装置包括存储器、处理器及存储在存储器上且在处理器上运行的计算机程序,处理器执行计算机程序时,实现图2或图3所示实施例中的通知消息的显示控制方法中的各个步骤。Further, in an embodiment of the present invention, an electronic device is also provided. The electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it realizes FIG. 2 or Various steps in the display control method of the notification message in the embodiment shown in FIG. 3 .

进一步的,本发明实施例中还提供一种存储介质,其上存储有计算机程序,计算机程序被处理器执行时,实现图2或图3所示实施例中的通知消息的显示控制方法中的各个步骤。Further, an embodiment of the present invention also provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, realizes the display control method of the notification message in the embodiment shown in FIG. 2 or FIG. 3 . each step.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical, mechanical or other forms.

所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules.

所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本发明所必须的。It should be noted that, for the convenience of description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. As in accordance with the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily all necessary to the present invention.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

以上为对本发明所提供的一种通知消息的显示控制方法及装置、电子装置及存储介质的描述,对于本领域的技术人员,依据本发明实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本发明的限制。The above is a description of the display control method and device, electronic device and storage medium of a notification message provided by the present invention. For those skilled in the art, according to the idea of the embodiment of the present invention, the specific implementation and application scope are all There will be changes. In conclusion, the contents of this specification should not be construed as limiting the present invention.

Claims (9)

1. A display control method of a notification message is applied to an electronic device, and is characterized by comprising the following steps:
receiving a notification message, and displaying the notification message through a floating window;
determining whether a trigger event that the notification message keeps displaying is monitored or not before the actual display duration of the notification message is equal to the preset duration;
if the trigger event is monitored, controlling the notification message to keep a display state until the trigger event is finished;
if the trigger event is not monitored, ending the display of the notification message when the actual display duration of the notification message is equal to the preset duration;
the method further comprises the following steps: if a recall display triggering event of the notification message is monitored, determining a target notification message which is received recently and is positioned in the notification bar; and displaying the target notification message on the current display interface through a floating window.
2. The method of claim 1, wherein determining whether a triggering event is monitored that a notification message remains displayed comprises:
acquiring a sensed distance value of a proximity sensor in the electronic device in real time;
determining that the trigger event is monitored when the distance value is less than or equal to a first threshold.
3. The method of claim 1, wherein determining whether a triggering event is monitored that a notification message remains displayed comprises:
determining that the trigger event is monitored when it is monitored that a pressure value sensed by a pressure sensor in the electronic device is greater than or equal to a second threshold value, or when a long press operation in a display area of the notification message is monitored.
4. The method of claim 1, further comprising:
acquiring a distance value or a pressure value sensed by a proximity sensor or a pressure sensor on the electronic device in real time;
determining that the recall display trigger event is monitored when the distance value is less than or equal to a first threshold or when the pressure value is greater than or equal to a second threshold.
5. A display control apparatus for a notification message, applied to an electronic apparatus, the apparatus comprising:
the receiving and displaying module is used for receiving the notification message and displaying the notification message through the floating window;
the first determining module is used for determining whether a trigger event that the notification message keeps displaying is monitored or not before the actual display duration of the notification message is equal to the preset duration;
the control module is used for controlling the notification message to keep a display state until the triggering event is finished if the triggering event is monitored;
the ending module is used for ending the display of the notification message when the actual display duration of the notification message is equal to the preset duration if the trigger event is not monitored;
the device further comprises: the fifth determining module is used for determining a target notification message which is received recently and is positioned in the notification bar if a recall display triggering event of the notification message is monitored; and the display module is used for displaying the target notification message on the current display interface through the floating window.
6. The apparatus of claim 5, wherein the first determining module comprises:
the first acquisition module is used for acquiring the sensed distance value of the proximity sensor in the electronic device in real time before the actual display duration of the notification message is equal to the preset duration;
a second determining module, configured to determine that the trigger event is monitored when the distance value is less than or equal to a first threshold;
alternatively, the first determining module includes:
and the third determining module is used for determining that the trigger event is monitored when the pressure value sensed by the pressure sensor in the electronic device is monitored to be greater than or equal to a second threshold value or when the long press operation in the display area of the notification message is monitored.
7. The apparatus of claim 5, further comprising:
the second acquisition module is used for acquiring a distance value or a pressure value sensed by a proximity sensor or a pressure sensor on the electronic device in real time;
a fourth determining module, configured to determine that the recall display trigger event is monitored when the distance value is less than or equal to a first threshold value or when the pressure value is greater than or equal to a second threshold value.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the steps of the method for controlling display of a notification message according to any one of claims 1 to 4 when executing the computer program.
9. A storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the steps in the notification message display control method according to any one of claims 1 to 4.
CN201810377305.2A 2018-04-25 2018-04-25 Display control method and device of notification message, electronic device and storage medium Active CN108803983B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810377305.2A CN108803983B (en) 2018-04-25 2018-04-25 Display control method and device of notification message, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810377305.2A CN108803983B (en) 2018-04-25 2018-04-25 Display control method and device of notification message, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN108803983A CN108803983A (en) 2018-11-13
CN108803983B true CN108803983B (en) 2020-08-07

Family

ID=64093862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810377305.2A Active CN108803983B (en) 2018-04-25 2018-04-25 Display control method and device of notification message, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN108803983B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109917985A (en) * 2019-02-22 2019-06-21 网易(杭州)网络有限公司 Information interacting method and device, medium and calculating equipment
CN113934331B (en) * 2020-06-29 2024-03-15 北京小米移动软件有限公司 Information processing method, device and storage medium
CN114268809B (en) * 2021-12-31 2024-05-28 广州方硅信息技术有限公司 Public screen control method and device in live broadcasting room, computer equipment and medium
CN116033064B (en) * 2022-05-30 2023-10-20 荣耀终端有限公司 Card display method, electronic device and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580670A (en) * 2013-10-23 2015-04-29 腾讯科技(深圳)有限公司 Method for processing notification message of mobile terminal and mobile terminal
CN106201249A (en) * 2016-06-28 2016-12-07 联想(北京)有限公司 The display packing of announcement information and display device
CN106713105A (en) * 2015-11-12 2017-05-24 阿里巴巴集团控股有限公司 Instant communication method, client and electronic device
CN106791049A (en) * 2016-12-06 2017-05-31 深圳市金立通信设备有限公司 A kind of notification message processing method and terminal
CN106933441A (en) * 2017-01-24 2017-07-07 珠海市魅族科技有限公司 A kind of notification message display methods and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150082255A1 (en) * 2013-09-16 2015-03-19 Motorola Mobility Llc Methods and apparatus for displaying notification information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580670A (en) * 2013-10-23 2015-04-29 腾讯科技(深圳)有限公司 Method for processing notification message of mobile terminal and mobile terminal
CN106713105A (en) * 2015-11-12 2017-05-24 阿里巴巴集团控股有限公司 Instant communication method, client and electronic device
CN106201249A (en) * 2016-06-28 2016-12-07 联想(北京)有限公司 The display packing of announcement information and display device
CN106791049A (en) * 2016-12-06 2017-05-31 深圳市金立通信设备有限公司 A kind of notification message processing method and terminal
CN106933441A (en) * 2017-01-24 2017-07-07 珠海市魅族科技有限公司 A kind of notification message display methods and system

Also Published As

Publication number Publication date
CN108803983A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108803983B (en) Display control method and device of notification message, electronic device and storage medium
CN108833779B (en) Shooting control method and related product
CN106445609A (en) Automatic updating method of application program and mobile terminal
CN106713653B (en) A kind of audio and video playback control method, device and terminal
CN109067984B (en) Data transmission method, electronic device and computer readable storage medium
CN107871015B (en) Log data processing method and device, terminal and readable storage medium
CN112913199A (en) Data transmission method and related product
CN107193664A (en) A kind of display methods of message, device and mobile terminal
CN108733337B (en) Screen display method and device, electronic equipment and computer readable storage medium
CN107908705A (en) A kind of information-pushing method, information push-delivery apparatus and mobile terminal
CN108932102A (en) Data processing method and device and mobile terminal
WO2018049901A1 (en) Data migration method and related devices
CN106791084A (en) Synchronization method of personalized parameters and mobile terminal
CN105872980B (en) Method and device for scanning wireless network signals
CN108833683B (en) Dynamic antenna adjustment implementation method and related product
CN106569916A (en) Data backup method and mobile terminal
CN109032465B (en) Data processing method, device and mobile terminal
CN108803961B (en) Data processing method, device and mobile terminal
KR101876394B1 (en) Method and device for playing media data on a terminal
CN111522674B (en) Cross-application processing method of multimedia content and electronic equipment
CN105991510B (en) Method, device and system for synchronizing session between multiple terminals
CN108900385B (en) Network connection method and related product
CN105808077A (en) Method and mobile terminal for controlling page turning
CN110062412A (en) Wireless pairing method, system, storage medium and mobile terminal
CN106304287B (en) Method for reducing standby power consumption of mobile terminal and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant