WO2020037611A1 - 通知消息的处理方法及电子设备 - Google Patents

通知消息的处理方法及电子设备 Download PDF

Info

Publication number
WO2020037611A1
WO2020037611A1 PCT/CN2018/101982 CN2018101982W WO2020037611A1 WO 2020037611 A1 WO2020037611 A1 WO 2020037611A1 CN 2018101982 W CN2018101982 W CN 2018101982W WO 2020037611 A1 WO2020037611 A1 WO 2020037611A1
Authority
WO
WIPO (PCT)
Prior art keywords
notification
application
electronic device
notification type
interface
Prior art date
Application number
PCT/CN2018/101982
Other languages
English (en)
French (fr)
Inventor
刘海波
涂永峰
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/101982 priority Critical patent/WO2020037611A1/zh
Priority to EP18931131.9A priority patent/EP3820130B1/en
Priority to CN201880085069.5A priority patent/CN111543042B/zh
Publication of WO2020037611A1 publication Critical patent/WO2020037611A1/zh

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/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
    • 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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72427User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for supporting games or graphical animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72451User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to schedules, e.g. using calendar applications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04803Split screen, i.e. subdividing the display area or the window area into separate subareas

Definitions

  • the embodiments of the present application relate to the field of electronic technology, and in particular, to a method for processing a notification message and an electronic device.
  • the electronic device When the electronic device is running an application, if a notification message generated by the current application or other applications is received, the user may be notified of the notification message. For example, when the user is playing a game, if the electronic device receives a headline message, the electronic device may display the headline message on the game interface. In this way, the notification message displayed by the electronic device will block the current game interface, thereby causing visual interference to the user. In addition, when the user accidentally touches the area where the notification message is located, the electronic device will erroneously switch to the headline application program, interrupting and interrupting the user's game process. Therefore, the user experience is poor.
  • the embodiments of the present application provide a method for processing a notification message and an electronic device, which can determine a notification type of a notification message according to an application displayed in the foreground, thereby reducing interference of the notification message to the application displayed in the foreground.
  • the technical solution of the present application provides a method for processing a notification message, including: the electronic device displays a first interface of a first application on a touch screen. After the electronic device receives the first notification message of the second application, the electronic device determines a first target notification type for the first notification message according to the first interface. Then, the electronic device processes the first notification message according to the first target notification type. The electronic device displays a second interface of the first application on the touch screen. After the electronic device receives the second notification message of the second application, the electronic device determines a second target notification type for the second notification message according to the second interface. After that, the electronic device processes the second notification message according to the second target notification type. The first target notification type is different from the second target notification type.
  • the electronic device may dynamically determine different notification types for different notification messages received by the electronic device according to different interfaces of the application program displayed in the foreground, thereby reducing interference with the first application program displayed in the foreground in real time.
  • different interfaces of the first application program respectively correspond to the first notification type
  • the first notification type corresponding to the first interface is the first target notification type
  • the first notification type corresponding to the second interface is Notification type for the second target.
  • the electronic device can dynamically determine different notification types for different notification messages received by the electronic device according to the first notification types corresponding to different interfaces of the application displayed in the foreground, thereby reducing the first application displayed in the foreground in real time. Interference.
  • different interfaces of the first application program respectively correspond to a first notification type
  • the second application program corresponds to a second notification type
  • the electronic device determining the first target notification type for the first notification message according to the first interface includes: the electronic device determining a first intersection of the first notification type and the second notification type corresponding to the first interface of the first application program; The notification type in the intersection is the first target notification type.
  • the electronic device determining the second target notification type for the second notification message according to the second interface includes: the electronic device determining the first intersection of the first notification type corresponding to the second interface of the first application program and the second intersection of the second notification type; The notification type in the second intersection is the second target notification type.
  • the electronic device may determine the notification type of the notification message by combining the first notification type corresponding to the current interface of the first application displayed in the foreground and the second notification type of the second application that generates the notification message.
  • the first notification type corresponding to the second interface is different from the first notification type corresponding to the first interface.
  • the method further includes: the electronic device determines a third target notification of the first notification message according to the first interface and the second interface. Types of. The electronic device processes the first notification message according to the third target notification type.
  • the electronic device can process the same notification message of the second application multiple times according to different interfaces of the first application displayed in the foreground, thereby reducing the interference to the first application displayed in the foreground in real time and dynamically. At the same time, try to let users know the notification message.
  • the electronic device determines the third target notification type for the first notification message according to the first interface and the second interface, including: the electronic device determines that the electronic device is displaying the second intersection notification type.
  • the third target notification type that is not performed on the first notification message at the first interface.
  • the second intersection is the intersection of the first notification type and the second notification type corresponding to the second interface of the first application.
  • the electronic device may determine the notification message by combining the first notification type corresponding to the first interface and the second interface of the first application displayed in the foreground, and the second notification type of the second application that generates the notification message. Notification type.
  • the method further includes: if the electronic device displays the interface of the first application this time, the notification type adopted for the first notification message does not completely include the second notification type, and then the display is stopped. After the interface of the first application, the electronic device determines a fourth target notification type for the first notification message. Then, the electronic device processes the first notification message according to the determined fourth target notification type.
  • the electronic device processes the notification message generated when the first application program is displayed in the foreground.
  • the electronic device determines the fourth target notification type for the first notification message, including: the electronic device determines that the second notification type is that the electronic device has not responded when displaying the interface of the first application this time. A fourth target notification type performed by the first notification message.
  • the electronic device exits the notification type of the notification message when the interface of the first application is displayed in the foreground, and the electronic device exits.
  • the set of notification types adopted for the notification message after the interface of the first application is displayed in the foreground is the second notification type corresponding to the second application.
  • the first application is a game
  • the first interface is a loading interface, a main interface, a combat interface, or a store shopping interface.
  • the first application is a video player
  • the first interface is an unplayed video interface or a played video interface; or, the first interface is a full-screen playback interface or a non-full-screen playback interface.
  • the technical solution of the present application provides a method for processing a notification message, which includes: the electronic device displays a first interface of the first application program on the touch screen; receives a first notification message of the second application program; The interface determines a first target notification type for the first notification message; and processes the first notification message according to the first target notification type.
  • the electronic device displays a second interface of the first application program on the touch screen; receives a second notification message of the second application program; determines a second target notification type for the second notification message according to the second interface; according to the second target notification The type processes the second notification message.
  • the electronic device determines a third target notification type for the first notification message according to the first interface and the second interface; For processing. If the electronic device displays the interface of the first application this time, the notification type adopted for the first notification message does not completely include the second notification type, the electronic device determines to A fourth target notification type of the notification message; and processing the first notification message according to the determined fourth target notification type.
  • the electronic device may determine the combination of the first notification type corresponding to the current interface and the second notification type corresponding to the first application.
  • the notification type of the notification message is processed multiple times when the interface of the first application is displayed in the foreground and after the interface displaying the first application is exited in the foreground.
  • the technical solution of the present application provides a method for processing a notification message, which includes: the electronic device displays a first interface of the first application on a touch screen, and after the electronic device receives the first notification message of the second application, A first target notification type for the first notification message is determined according to the first interface. Then, the electronic device processes the first notification message according to the first target notification type.
  • the electronic device may determine the notification type of the notification message of the second application according to the interface of the first application displayed in the foreground, so as to not interfere with the normal operation of the first application displayed in the foreground.
  • the different interfaces of the first application program respectively correspond to the first notification type, and the first notification type corresponding to the first interface is the first target notification type.
  • the technical solution of the present application provides a method for processing a notification message, including: displaying a first interface of a first application and a second interface of another first application on a touch screen; and receiving a second application According to the first interface of the first application and the second interface of the other application, determine the notification type of the first notification message; according to the determined notification type of the first notification message, A notification message is used for notification.
  • the electronic device may determine the notification type of the notification message of the second application according to the interface of multiple first applications displayed in the foreground in the case of split screen display, so as not to disturb the display of the foreground as much as possible. Normal operation of the first application.
  • the technical solution of the present application provides an electronic device including: a display unit, configured to display a first interface of a first application program on a touch screen.
  • a receiving unit configured to receive a first notification message of a second application program.
  • a determining unit configured to determine a first target notification type for the first notification message according to the first interface.
  • a processing unit configured to process the first notification message according to the first target notification type.
  • the display unit is further configured to display the second interface of the first application on the touch screen.
  • the receiving unit is further configured to receive a second notification message of the second application program; the determining unit is further configured to determine a second target notification type for the second notification message according to the second interface; the processing unit is further configured to, according to the second The target notification type processes the second notification message.
  • the first target notification type is different from the second target notification type.
  • different interfaces of the first application program respectively correspond to the first notification type
  • the first notification type corresponding to the first interface is the first target notification type
  • the first notification type corresponding to the second interface is Notification type for the second target.
  • different interfaces of the first application program respectively correspond to a first notification type
  • the second application program corresponds to a second notification type.
  • the determining unit is specifically configured to determine a first intersection between the first notification type and the second notification type corresponding to the first interface of the first application, and the notification type in the first intersection is the first target notification type; determining the first application The second intersection of the first notification type and the second notification type corresponding to the second interface of the program, and the notification type in the second intersection is the second target notification type.
  • the first notification type corresponding to the second interface is different from the first notification type corresponding to the first interface.
  • the determining unit is further configured to determine, after the display unit displays the second interface of the first application on the touch screen, the third interface for the first notification message according to the first interface and the second interface.
  • Target notification type The processing unit is further configured to process the first notification message according to the third target notification type.
  • the determining unit is specifically configured to determine a third target notification type that the electronic device has not performed on the first notification message when displaying the first interface in the notification type of the second intersection.
  • the second intersection is the intersection of the first notification type and the second notification type corresponding to the second interface of the first application.
  • the determining unit is further configured to, if the electronic device displays the interface of the first application program this time, the notification type adopted for the first notification message does not completely include the second notification type, and then stop After the interface of the first application is displayed, a fourth target notification type for the first notification message is determined.
  • the processing unit is further configured to process the first notification message according to the determined fourth target notification type.
  • the determining unit is specifically configured to determine, in the second notification type, a fourth target notification type that the electronic device has not performed on the first notification message when displaying the interface of the first application program this time.
  • the technical solution of the present application provides an electronic device including: a display unit, configured to display a first interface of a first application program on a touch screen.
  • a receiving unit configured to receive a first notification message of a second application program.
  • a determining unit configured to determine a first target notification type for the first notification message according to the first interface.
  • a processing unit configured to process the first notification message according to the first target notification type.
  • the technical solution of the present application provides an electronic device including: a display unit, configured to display a first interface of a first application program and a second interface of another first application program on a touch screen.
  • a receiving unit configured to receive a first notification message of a second application program.
  • the determining unit is configured to determine a notification type of the first notification message according to a first interface of the first application and a second interface of another application.
  • the processing unit is configured to notify the first notification message according to the determined notification type of the first notification message.
  • the technical solution of the present application provides an electronic device including: a touch screen, wherein the touch screen includes a touch-sensitive surface and a display; one or more processors; a memory; a plurality of application programs; and one or more computer programs .
  • one or more computer programs are stored in the memory, and the one or more computer programs include instructions.
  • the electronic device is caused to perform the following steps: displaying the first interface of the first application program on the touch screen.
  • the first target notification type is different from the second target notification type.
  • different interfaces of the first application program respectively correspond to the first notification type
  • the first notification type corresponding to the first interface is the first target notification type
  • the first notification type corresponding to the second interface is Notification type for the second target.
  • different interfaces of the first application program respectively correspond to the first notification type, and the second application program corresponds to the second notification type; when the instruction is executed by the electronic device, the electronic device is caused to specifically execute the following steps : Determine the first intersection of the first notification type and the second notification type corresponding to the first interface of the first application, and the notification type in the first intersection is the first target notification type; determine the second interface of the first application The second intersection of the corresponding first notification type and the second notification type, and the notification type in the second intersection is the second target notification type.
  • the first notification type corresponding to the first interface is different from the first notification type corresponding to the second interface.
  • the electronic device when the instruction is executed by the electronic device, the electronic device is caused to further perform the following steps: after displaying the second interface of the first application on the touch screen, determining the response to the first interface and the second interface. A third target notification type of the first notification message; and processing the first notification message according to the third target notification type.
  • the electronic device when the instruction is executed by the electronic device, the electronic device is caused to specifically perform the following steps: In determining the notification type of the second intersection, the electronic device does not execute the first notification message when displaying the first interface. Third target notification type. The second intersection is the intersection of the first notification type and the second notification type corresponding to the second interface of the first application.
  • the electronic device when the instruction is executed by the electronic device, the electronic device further executes the following steps: if the electronic device displays the interface of the first application program this time, the notification type adopted for the first notification message is not If the second notification type is completely included, the fourth target notification type for the first notification message is determined after stopping displaying the interface of the first application program; and the first notification message is processed according to the determined fourth target notification type.
  • the electronic device when the instruction is executed by the electronic device, the electronic device is caused to specifically perform the following steps: In determining the second notification type, the electronic device does not perform the first notification when displaying the interface of the first application this time.
  • the technical solution of the present application provides an electronic device including one or more processors and one or more memories.
  • the one or more memories are coupled to one or more processors.
  • the one or more memories are used to store computer program code.
  • the computer program code includes computer instructions.
  • the electronic device executes the instructions.
  • the technical solution of the present application provides a computer storage medium including computer instructions, and when the computer instructions are run on the electronic device, the electronic device is caused to perform processing of the notification message in any one of the possible implementations of the foregoing aspects. method.
  • the technical solution of the present application provides a computer program product that, when the computer program product runs on an electronic device, causes the electronic device to execute a method for processing a notification message in any one of the possible designs of the foregoing aspects.
  • FIG. 1 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a software architecture of an electronic device according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an interface displayed by an electronic device according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an interface displayed by another electronic device according to an embodiment of the present application.
  • 5a-5b are schematic diagrams of a set of setting interfaces provided by embodiments of the present application.
  • 6a-6b are schematic diagrams of interfaces displayed by a group of electronic devices according to an embodiment of the present application.
  • FIG. 7a to 7b are schematic diagrams of interfaces displayed by another group of electronic devices according to an embodiment of the present application.
  • FIGS. 8a-8b are schematic diagrams of another set of setting interfaces provided by embodiments of the present application.
  • FIGS. 9a-9b are schematic diagrams of another set of setting interfaces provided by the embodiments of the present application.
  • 10a-10d are schematic diagrams of a series of interfaces displayed by electronic devices according to an embodiment of the present application.
  • 11a-b are schematic diagrams of interfaces displayed by another group of electronic devices according to an embodiment of the present application.
  • FIG. 12 is a schematic diagram of an interface displayed by another electronic device according to an embodiment of the present application.
  • FIG. 13a to 13e are schematic diagrams of interfaces displayed by another group of electronic devices according to an embodiment of the present application.
  • 20 to 23 are flowcharts of a method for processing a series of notification messages according to an embodiment of the present application.
  • 24 to 25 are schematic structural diagrams of two types of electronic devices according to embodiments of the present application.
  • first and second are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of 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 this embodiment, unless otherwise stated, the meaning of "plurality" is two or more.
  • the method for processing a notification message provided in this embodiment can be applied to a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, and a super mobile personal On an electronic device such as an ultra-mobile personal computer (UMPC), a netbook, and a personal digital assistant (PDA), this embodiment does not place any restrictions on the specific type of the electronic device.
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • FIG. 1 shows a schematic structural diagram of an electronic device 100.
  • 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 charge management module 130, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display 194, and Subscriber identification module (SIM) card interface 195 and the like.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image, signal processor, ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • different processing units may be independent devices or integrated in one or more processors.
  • the controller may be a nerve center and a command center of the electronic device 100.
  • the controller can generate operation control signals according to the instruction operation code and timing signals, and complete the control of fetching and executing instructions.
  • the processor 110 may further include a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit (inter-integrated circuit, sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver receiver / transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input / output (GPIO) interface, subscriber identity module (SIM) interface, and / Or universal serial bus (universal serial bus, USB) interface.
  • I2C integrated circuit
  • I2S integrated circuit
  • PCM pulse code modulation
  • UART universal asynchronous transceiver receiver / transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input / output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may be respectively coupled to a touch sensor 180K, a charger, a flash, a camera 193, and the like through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to implement a function of receiving a call through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing, and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement the function of receiving calls through a Bluetooth headset. Both I2S interface and PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transferred between serial and parallel communications.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with a Bluetooth module in the wireless communication module 160 through a UART interface to implement a Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to implement a function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display 194, the camera 193, and the like.
  • the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), and the like.
  • CSI camera serial interface
  • DSI display serial interface
  • the processor 110 and the camera 193 communicate through a CSI interface to implement a shooting function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate through a DSI interface to implement a display function of the electronic device 100.
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones and play audio through headphones. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in this embodiment is only a schematic description, and does not constitute a limitation on the structure of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes or a combination of multiple interface connection modes in the above embodiments.
  • the charging management module 130 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 130 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 130 may receive a wireless charging input through a wireless charging coil of the electronic device 100. While the charge management module 130 is charging the battery 142, the power management module 141 can also provide power to the electronic device.
  • the power management module 141 is used to connect the battery 142, the charge management module 130 and the processor 110.
  • the power management module 141 receives inputs from the battery 142 and / or the charge management module 130 and supplies power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, number of battery cycles, battery health (leakage, impedance) and other parameters.
  • the power management module 141 may also be disposed in the processor 110.
  • the power management module 141 and the charge management module 130 may be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, and a baseband processor.
  • the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals.
  • Each antenna in the electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization.
  • antenna 1 can be multiplexed into a diversity antenna for a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G / 3G / 4G / 5G and the like 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), and the like.
  • the mobile communication module 150 may receive the electromagnetic wave by the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic wave, and transmit it to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic wave radiation through the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is configured to modulate a low-frequency baseband signal to be transmitted into a high-frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then 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.
  • the modem processor may be a separate device.
  • the modem processor may be independent of the processor 110 and disposed in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 may provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites applied to the electronic device 100. Wireless communication solutions such as global navigation system, GNSS, frequency modulation (FM), near field communication (NFC), and infrared technology (infrared, IR).
  • the wireless communication module 160 may 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, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it into electromagnetic wave radiation through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150 and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technologies can include global mobile communication systems (GSM), general packet radio services (GPRS), code division multiple access (code division multiple access, CDMA), and broadband code division Multiple access (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.
  • GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), crizot navigation system (BDS), quasi-zenith satellite system (quasi-zenith satellite system (QZSS) and / or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Bertdou navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing and is connected to the display 194 and an application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel may adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode).
  • LED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLEDs flexible light-emitting diodes
  • Miniled MicroLed, Micro-oLed, quantum dot light emitting diodes (QLEDs), etc.
  • the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP processes the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and the light is transmitted to the light receiving element of the camera through the lens, and the light signal is converted into an electrical signal. The light receiving element of the camera passes the electrical signal to the ISP for processing, and the image is visible to the naked eye. ISP can also optimize the image's noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, an ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • An object generates an optical image through a lens and projects it onto a photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs digital image signals to the DSP for processing.
  • DSP converts digital image signals into image signals in standard RGB, YUV and other formats.
  • the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform a Fourier transform on the frequency point energy and the like.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture expert groups (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture expert groups
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can quickly process input information and continuously learn.
  • the NPU can realize applications such as intelligent recognition of the electronic device 100, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, save music, videos and other files on an external memory card.
  • the internal memory 121 may be used to store computer executable program code, and the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area may store an operating system, at least one application required by a function (such as a sound playback function, an image playback function, etc.) and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
  • UFS universal flash memory
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. Such as music playback, recording, etc.
  • the audio module 170 is configured to convert digital audio information into an analog audio signal and output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
  • the speaker 170A also called a "horn" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as the "handset" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 answers a call or a voice message, it can answer the voice by holding the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound through the mouth near the microphone 170C, and input a sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, in addition to collecting sound signals, it may also implement a noise reduction function. In other embodiments, the electronic device 100 may further be provided with three, four, or more microphones 170C to achieve sound signal collection, noise reduction, identification of sound sources, and directional recording.
  • the headset interface 170D is used to connect a wired headset.
  • the headphone interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (United States of America, CTIA) standard interface.
  • OMTP open mobile electronic device platform
  • CTIA cellular telecommunications industry association
  • the pressure sensor 180A is used to sense a pressure signal, and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be disposed on the display screen 194.
  • the capacitive pressure sensor may be at least two parallel plates having a conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity lower than the first pressure threshold is applied to the short message application icon, an instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction for creating a short message is executed.
  • the gyro sensor 180B may be used to determine a movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, the x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the angle of the electronic device 100 shake, and calculates the distance that the lens module needs to compensate according to the angle, so that the lens cancels the shake of the electronic device 100 through the backward movement to achieve image stabilization.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the barometric pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C, and assists in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.
  • the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the opened and closed state of the holster or the opened and closed state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to recognize the posture of electronic devices, and is used in applications such as switching between horizontal and vertical screens, and pedometers.
  • the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 100 emits infrared light through a light emitting diode.
  • the electronic device 100 uses a photodiode to detect infrared reflected light from a nearby object. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficiently reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100.
  • the electronic device 100 may use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in holster mode, and the pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • Ambient light sensor 180L can also be used to automatically adjust white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 may use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint photographing, fingerprint answering an incoming call, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 executes a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 performs a performance reduction of a processor located near the temperature sensor 180J so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid the abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 when the temperature is lower than another threshold, performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • the touch sensor 180K is also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also referred to as a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • a visual output related to the touch operation may be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire a vibration signal of a human voice oscillating bone mass.
  • Bone conduction sensor 180M can also contact the human pulse and receive blood pressure beating signals.
  • the bone conduction sensor 180M may also be disposed in the earphone and combined into a bone conduction earphone.
  • the audio module 170 may analyze the voice signal based on the vibration signal of the oscillating bone mass obtained by the bone conduction sensor 180M to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
  • the keys 190 include a power-on key, a volume key, and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 may receive a key input, and generate a key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 may generate a vibration alert.
  • the motor 191 can be used for vibration alert for incoming calls, and can also be used for touch vibration feedback.
  • the touch operation applied to different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects.
  • Touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 100 by inserting or removing the SIM card interface 195.
  • the electronic device 100 may support one or N SIM card interfaces, and N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple SIM cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards can be the same or different.
  • the SIM card interface 195 may also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through a SIM card to implement functions such as calling and data communication.
  • the electronic device 100 uses an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
  • This embodiment takes a layered Android system as an example, and exemplifies a software structure of the electronic device 100.
  • FIG. 2 is a software configuration block diagram of the electronic device 100 in this embodiment.
  • the layered architecture divides the software into several layers, each of which has a clear role and division of labor.
  • the layers communicate with each other through a software interface.
  • the Android system is divided into four layers, which are an application layer, an application framework layer, an Android runtime and a system library, and a kernel layer from top to bottom.
  • the application layer can include a series of application packages.
  • the application package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS and other applications.
  • the application framework layer provides an application programming interface (API) and a programming framework for applications at the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
  • 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 a screenshot, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, and more.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can consist of one or more views.
  • the display interface including the SMS notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide a communication function of the electronic device 100. For example, management of call status (including connection, hang up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages that can disappear automatically after a short stay without user interaction.
  • the notification manager is used to inform download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • text messages are displayed in the status bar, sounds are emitted, electronic equipment vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one is the functional functions that the Java language needs to call, and the other is the Android core library.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • Virtual machines are used to perform object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (media manager), media library (Media library), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL) and so on.
  • surface manager media manager
  • media library Media library
  • Three-dimensional graphics processing library for example: OpenGL ES
  • 2D graphics engine for example: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports a variety of commonly used audio and video formats for playback and recording, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • the 2D graphics engine is a graphics engine for 2D graphics.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the server of the software provider sends the notification message and the identification of the electronic device of the user to be notified to the Android notification server (the notification server is provided by Google or provided by the manufacturer of the electronic device) .
  • the notification server sends the notification message to the electronic device to be notified.
  • the notification manager of the electronic device displays the notification message through the display screen 194, performs a sound notification of the notification message through the speaker 170A in the audio module 170, or performs a notification notification through the motor 191 Vibration tips, etc.
  • FIG. 3 shows an interface 300 displayed on a touch screen of the electronic device 100 having the hardware structure shown in FIG. 1 and the software structure shown in FIG. 2.
  • the touch screen may include a display screen 194 and a touch panel.
  • the interface is used to display controls.
  • a control is a graphical user interface (GUI) element and a software component included in the software that controls the data processed by the software and the interactive operations on the data.
  • GUI graphical user interface
  • controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
  • the interface 300 may include a status bar 303, a concealable navigation bar 306, a time and weather widget, and multiple application (App) icons such as Weibo icon 304 and Alipay icon 305 , Camera icon 302, WeChat icon 301, etc.
  • the status bar 303 may include the name of the operator (such as China Mobile), time, Wi-Fi icon, signal strength, and current remaining power.
  • the navigation bar 306 may include a back key icon, a home screen key icon, a forward key icon, and the like.
  • the status bar 303 may further include a Bluetooth icon, a mobile network (for example, 4G), an alarm clock icon, an external device icon, and the like.
  • the interface 300 may further include a Dock bar, and the Dock bar may include icons of commonly used applications, and the like.
  • the electronic device 100 may further include a home screen key.
  • the home screen key is used to return the GUI displayed on the touch screen to the home screen according to a user operation.
  • the home screen key may also integrate a fingerprint sensor, so that when the user presses the home screen key, the electronic device collects fingerprints to confirm the identity of the user.
  • the electronic device 100 After the electronic device 100 detects a touch operation of a user's finger (or a stylus pen, etc.) on an application icon on the interface 300, in response to the touch operation, the electronic device can open an application corresponding to the application icon. Interface to run the application in the foreground and display the application on a touch screen. For example, after the electronic device detects the operation of the user's finger touching the game icon 302 on FIG. 3, in response to the operation of the user's finger 307 touching the game icon 302, see FIG. 4, the electronic device runs a game application in the foreground to display the game Interface 308.
  • the mobile device having the structure shown in FIG. 1 and FIG. 2 is taken as an electronic device 100 as an example, and the solutions provided in the following embodiments are specifically described.
  • the notification message is an object that can be understood and known by those skilled in the art.
  • the notification message may include an icon, a title, a detailed text, a notification operation, and the like.
  • the electronic device can process the notification message as follows: for example, displaying the notification message in the status bar or the notification bar, or displaying it in the form of a floating notification above the touch screen; for example, in the form of sound prompts and vibration prompts Presenting the notification message; for example, presenting the notification message in a pop-up prompt box; and for example, not performing any prompt or display on the notification message.
  • the applications in the electronic device may include applications native to the system and applications developed by a third party.
  • This embodiment provides a method for processing a notification message.
  • the electronic device receives (or detects) the notification message, the electronic device can process the notification message according to the application program displayed on the touch screen, so as not to interfere with the application as much as possible.
  • the program runs normally.
  • each application on the electronic device may correspond to a first notification type, respectively.
  • the first notification type may be a notification type that the electronic device can use for the generated notification message when the application is displayed in the foreground.
  • the notification message may be generated by an application displayed in the foreground, or may be generated by another application on the electronic device.
  • the first notification type may include one or more of a display notification type, a sound notification type, a vibration notification type, a beacon notification type, a notification type without notification, a banner notification not used, a sound notification not used, and the like.
  • the display notification type may include a banner display notification type, a pop-up window display notification type, a full-screen display notification type (such as a notification type when a call is received), a left-side display notification type, or a right-side display notification type.
  • the superscript notification type refers to a mark that displays the number of messages on the corners of the icon of the application.
  • the superscript notification type may be an application displayed on the application interface of the application (such as the upper left corner or the upper right corner).
  • the icon and mark can also be the icon and mark of the application displayed on the desktop.
  • the first notification type of the application may be preset by a developer of the application or a system default of the electronic device.
  • the first notification type of the application may also be set by the user through the notification setting interface.
  • the notification setting interface includes setting controls corresponding to the application.
  • the touch screen may display the specific notification settings for WeChat as shown in FIG. 5b. interface.
  • the notification setting interface may further include a control 502 for adding an application, so that the user can add and set more first notification types corresponding to the application.
  • the electronic device may process the notification message by using the first notification type of the first application in the foreground.
  • the second application program may be the same as or different from the first application program.
  • the first notification type of the first application is a sound notification type. If the electronic device receives the notification message generated by the second application when the first application is displayed in the foreground, the electronic device notifies the generated notification message by using the sound notification type in the first notification type instead of using a sound other than sound Other notification types (e.g. banner, vibration, etc.).
  • sound notification types e.g. banner, vibration, etc.
  • the first application is a game application.
  • the electronic device may notify the WeChat notification message through a sound notification type. For example, the electronic device can “click” to remind the user that a notification message has been generated, or voice notification “You have received a message”, or voice notification “received a WeChat notification message”.
  • the foreground display application refers to an interface where the foreground displays an application.
  • the first notification type of the first application is a banner notification type. If the electronic device receives a notification message when the first application is displayed in the foreground, according to the first notification type of the first application, the electronic device does not use the banner notification type to process the generated notification message, and may use a message other than the banner notification type.
  • the notification type e.g., sound, vibration
  • the first application is a game application. If the electronic device receives a WeChat notification message when displaying the game application in the foreground, the electronic device may remind the user to receive the notification message through a notification type such as vibration or sound, without Process by banner display.
  • a notification type such as vibration or sound
  • the first notification type of the first application is no notification. If the electronic device receives a notification message while the first application is running in the foreground, according to the first notification type of the first application, the electronic device does not generate a notification message for notification, that is, the electronic device blocks all notification messages.
  • the first application is a game application. If the electronic device receives a WeChat notification message when the game application is running in the foreground, the electronic device does not notify the WeChat notification message when the first application is the foreground application. .
  • the electronic device may notify a notification message that is not notified when the first application is the foreground application.
  • the exit of the first application by the front end of the electronic device may be that the electronic device returns to the desktop (for example, the user clicks the main touch screen key), or the electronic device returns to the application interface of another application used before using the first application ( For example, the user clicked the back button).
  • the electronic device receives a WeChat notification message when the game application is displayed in the foreground, as shown in FIG. 6b, in the foreground After exiting the first application, the electronic device may notify the WeChat notification message 600.
  • different applications on the electronic device may have different priorities, and the electronic device may be based on the first notification type of the first application displayed in the foreground, and the first application and the The priority of the second application determines the notification type of the notification message. For example, when the first notification type of the first application is no notification, but the priority of the second application that generates the notification message is higher than the priority of the first application, when the electronic device displays the first application in the foreground The notification message generated by the second application may be notified.
  • the first application is a game application and the second application is WeChat.
  • the electronic device may notify the WeChat notification message 700.
  • the electronic device does not treat the first application when the first application is displayed in the foreground.
  • the notification message generated by the application program is used for notification.
  • each application on the electronic device may also correspond to a second notification type.
  • the second notification type is a notification type that the electronic device can use when the application generates a notification message.
  • the second notification type may include one or more of notification types such as display, sound, vibration, or beacon.
  • the second notification type of the application may be preset by a developer of the application or a system preset by the electronic device.
  • the second notification type of the application may also be the notification type set by the user in the notification center.
  • the interface of the notification center includes a setting control 801.
  • the electronic device may display the setting interface shown in FIG. 8b.
  • the notification setting interface may further include an add control 802, so that the user can add and set more second notification types corresponding to the application.
  • the electronic device when the electronic device receives the notification message, the electronic device may determine the notification message ’s combination of the first notification type of the first application in the foreground and the second notification type of the second application that generates the notification message. Notification type.
  • the electronic device may determine the second notification type of the second application and the first notification type of the first application. Intersection, the intersection may be called a third notification type, and the notification message is processed using the third notification type.
  • the first notification type of the first application is a sound notification type
  • the second notification type of the second application includes a sound notification type and a banner notification type.
  • the electronic device may determine that the intersection of the second notification type of the second application and the first notification type of the first application is a sound
  • the notification type that is, the third notification type is a sound notification type, and the electronic device may use the sound notification type to notify the notification message generated by the second application.
  • the first notification type of the first application is a sound notification type
  • the second notification type of the second application includes a vibration notification type and a banner notification type.
  • the first notification type of the first application includes a sound notification type and a banner notification type
  • the second notification type of the second application includes a vibration notification type and a banner notification type.
  • the electronic device displays the game application in the foreground and receives a WeChat notification message, and then the banner notification type Notify the WeChat notification message.
  • the first notification type of the application may also be all notification types.
  • the first notification type of the first application is all notification types
  • the second notification type of the second application includes vibration notification type and banner notification type.
  • the electronic device may determine that the intersection of the second notification type of the second application and the first notification type of the first application is all the notification types in the second notification type, that is, the vibration notification Type and banner notification, the electronic device uses the vibration notification type and banner notification type to notify the notification message generated by the second application.
  • the first notification type of the first application is no notification
  • the second notification type of the second application includes a vibration notification type and a banner notification type.
  • the electronic device may determine that the intersection of the second notification type of the second application and the first notification type of the first application is empty, so the electronic device does not notify the second application. Message for notification.
  • the electronic device processes the notification message generated by the second application with the second notification type of the second application when the first application is displayed in the foreground.
  • the first application is a game
  • the second application is WeChat
  • the second notification type of WeChat is banner notification.
  • the electronic device may use the banner notification type in the second notification type of WeChat to display and notify the WeChat notification message 700.
  • the electronic device does not notify the notification message generated by the second application.
  • the priority of the application may be preset by the system, or may be set by a user through a priority setting interface.
  • the electronic device may set one or more applications corresponding to each priority level.
  • the setting interface shown in FIG. 9a may include a priority setting control 900 for adding or deleting an application included in a priority level corresponding to the setting control 900.
  • the setting interface shown in FIG. 9a may further include a priority.
  • the delete control 901 is used to delete the priority level corresponding to the delete control 901.
  • the setting interface shown in FIG. 9a may further include an add priority control 902 for adding a new priority.
  • the electronic device may set a priority of an application higher than another application, or set a priority of an application lower than another application.
  • the setting interface shown in FIG. 9b may include exchange controls, modify controls, and delete controls.
  • the exchange control 903 corresponding to the priority relationship of “game is higher than WeChat” may be used to exchange the priority of the game and WeChat;
  • the modification control 904 corresponding to this priority relationship may be used to This priority relationship is modified, for example, “games, video applications are higher than WeChat”;
  • a delete control 905 corresponding to this priority relationship may be used to delete the priority relationship.
  • FIG. 9b the exchange control 903 corresponding to the priority relationship of “game is higher than WeChat” may be used to exchange the priority of the game and WeChat;
  • the modification control 904 corresponding to this priority relationship may be used to This priority relationship is modified, for example, “games, video applications are higher than WeChat”;
  • a delete control 905 corresponding to this priority relationship may be used to delete
  • the setting interface may include a control 906 and a control 907.
  • the control 906 is used to add a priority relationship of an application to another application
  • the control 907 is used to add an application.
  • the priority of a program is lower than the priority relationship of another application.
  • the first notification type of the first application includes all notification types in the second notification type of the second application, that is, regardless of whether the electronic device can display the first application in the foreground. All notification types in the second notification type of the two applications process the notification message 1 generated by the second application. After the electronic device quits the first application in the foreground, it no longer processes the notification message 1.
  • the first notification type of the first application does not include all notification types in the second notification type of the second application, that is, when the electronic device displays the first application in the foreground, it fails to use the second notification type. All notification types in the second notification type of the application process the notification message 1 generated by the second application. After the first application is exited from the foreground, the electronic device may process the notification message 1 in all notification types in the fourth notification type.
  • the fourth notification type is a notification type other than the third notification type in the second notification type of the second application. That is, in the second notification type in which the fourth notification type is the second application, the electronic device does not use the notification type for the notification message 1 when displaying the first application in the foreground.
  • the electronic device may cache the fourth notification type that is not executed in the second notification type of the second application, and adopt the fourth notification after exiting the first application in the foreground.
  • the type is processed, and the notification type that has been executed when the first application is displayed in the foreground is not executed after the first application is exited in the foreground.
  • the electronic device can notify the second application when the first application is displayed in the foreground with the complete second notification type of the second application. Message 1 is processed.
  • the first application is a game and the second application is WeChat.
  • the electronic device displays the game application in the foreground, it only uses the banner notification type (that is, the third notification type) to notify.
  • the WeChat notification message 1 was generated, the WeChat notification message 1 was not notified with the vibration notification type (that is, the fourth notification type) in WeChat's second notification type; after the electronic device exits the game, it can respond to the notification through the vibration notification type.
  • WeChat notification message 1 for notification is referring to the above Table 3 and Figs. 6a-6b.
  • the first notification type of the first application includes a sound notification type and a corner notification type
  • the second notification type of the second application includes a vibration notification type, a banner notification type, and a corner notification type.
  • the electronic device displays the game in the foreground and after receiving the WeChat notification message, the WeChat notification message is notified only by the superscript notification type.
  • the second notification type notifies the WeChat notification message of the vibration notification type and the banner notification type.
  • the electronic device may notify the WeChat notification message through the banner notification type and the vibration notification type in the second notification type of WeChat after exiting the game.
  • the banner notification type and the vibration notification type are the fourth notification type.
  • the electronic device may All notification types in the second notification type of the application process the notification messages generated when the second application displays the first application in the foreground.
  • the first application is a game and the second application is WeChat.
  • the electronic device displays the game in the foreground, only the banner notification type is used to notify the generated WeChat notification message, and The WeChat notification message is not notified with the vibration notification type in the WeChat second notification type; the electronic device may notify the WeChat notification message through the vibration notification type and the banner notification type in the WeChat second notification type after exiting the game.
  • the electronic device may use the preset notification type after the electronic device front desk exits the first application.
  • the first application is a game application
  • the second application is WeChat.
  • the preset notification types are sound notification type, vibration notification type, and corner notification type.
  • the electronic device displays the game in the foreground.
  • the application receives the WeChat notification message
  • the generated WeChat notification message is notified only with the banner notification type, and the WeChat notification message is not notified with the vibration notification type in the second notification type of WeChat; the electronic device can pass the In the preset notification types, the subscript notification type, sound notification type, and vibration notification type notify the WeChat notification message.
  • the first notification type of the first application includes a correspondence between a notification message type and a specific notification type, and different message types may correspond to different notification types.
  • the notification type corresponding to the text message type includes sound and banner;
  • the notification type corresponding to the picture message type includes sound and vibration.
  • the electronic device may according to the notification type corresponding to the type of notification message in the first notification type of the first application in the foreground, and the second application that generates the notification message.
  • the second notification type determines the notification type of the notification message.
  • the first notification type corresponding to the application on the electronic device is time-dependent, and the first notification type corresponding to the same application in different time periods may be different.
  • the electronic device may determine the notification type of the notification message according to the first notification type corresponding to the first application and the second notification type of the second application that generates the notification message in the current time period.
  • the first notification type corresponding to the first application in the time period of 22: 00-06: 00 every day is non-notification.
  • the electronic device does not notify the notification message generated by the second application.
  • the first notification type corresponding to the first application within the time period of 06: 00-22: 00 each day includes a sound notification type and a banner notification type.
  • the electronic device uses a sound notification type and a banner notification type to notify the notification message generated by the second application.
  • an application program on an electronic device is a larger program, which may include multiple code segments, and each code segment may be a part of the code in the large program, which is composed of one or more statement blocks.
  • the division is different, and the type and number of code segments obtained by each application are also different.
  • the game application may include a load code segment, a run code segment, and an exit code segment.
  • the game application may include a combat code segment, a store Shopping code snippet, character setting program, task setting program and game setting code snippet.
  • each code segment of the application may correspond to a set of first notification types.
  • the electronic device when the electronic device is running a certain code segment of the first application in the foreground, if the notification message is received, the electronic device uses the first notification type corresponding to the currently running code segment to process the notification message.
  • the electronic device when the electronic device receives the notification message, it may determine the response to the first notification type corresponding to the currently running code segment of the first application in the foreground and the second notification type of the second application that generates the notification message.
  • the notification type used by the notification message That is, the electronic device may determine the notification type adopted for the notification message in combination with the current running status and operating conditions of the first application in the foreground and the second notification type of the second application that generates the notification message.
  • the electronic device may determine the second of the second application.
  • the intersection of the notification type with the first notification type corresponding to code segment 1 of the first application, the intersection may be referred to as the third notification type corresponding to code segment 1, and the notification message 1 is processed using the third notification type;
  • the electronic device may determine the second notification type of the second application and the code segment 2 of the first application The intersection of the corresponding first notification type (that is, the third notification type corresponding to the code segment 2), and the notification message 2 is processed by using the notification type in the intersection.
  • the electronic device may include multiple interfaces (or screens) during the running of the first application, and different interfaces may correspond to different first notification types.
  • the first application is a game application
  • the running process of the first application may include a loading interface, a combat interface, a store shopping interface, and the like.
  • the electronic device when the electronic device is displaying a certain interface of the first application in the foreground, if the notification message is received, the electronic device uses the first notification type corresponding to the currently displayed interface to process the notification message.
  • the electronic device may determine the combination of the first notification type corresponding to the interface currently displayed by the first application in the foreground and the second notification type of the second application that generates the notification message.
  • the notification type to use for the notification message That is, the electronic device may determine the notification type adopted for the notification message in combination with the current display content and running status of the first application in the foreground and the second notification type of the second application that generates the notification message.
  • the electronic device may determine the second notification of the second application.
  • the intersection may be referred to as the third notification type corresponding to the interface 1.
  • the third notification type is used to process the notification message 1.
  • the electronic device may determine that the second notification type of the second application corresponds to the first corresponding to the interface 2 of the first application.
  • the intersection of the notification types that is, the third notification type corresponding to the interface 2
  • the notification message 2 is processed using the notification type in the intersection.
  • the electronic device may include multiple states (or modes) during the running of the first application, and different states may correspond to different first notification types.
  • the first application is a game application
  • the running process of the first application may include a loading state, a combat state, a store shopping state, and a character setting state.
  • the electronic device uses the first notification type corresponding to the current state to process the notification message.
  • the electronic device may determine the notification to the notification by combining the first notification type corresponding to the current status of the first application in the foreground and the second notification type of the second application that generates the notification message.
  • the notification type used by the message That is, the electronic device may determine the notification type adopted for the notification message in combination with the current running status of the first application in the foreground and the second notification type of the second application that generates the notification message.
  • the current application is the first application.
  • the electronic device may determine the second notification type of the second application and the current state of the first application.
  • the intersection of the first notification type corresponding to 1, the intersection may be called the third notification type corresponding to state 1, and the third notification type is used to process the notification message 1; in the state 2 where the first application is currently,
  • the electronic device may determine the intersection of the second notification type of the second application and the first notification type corresponding to the state 2 of the first application (that is, the state 2 corresponds to Third notification type), and use the notification type in the intersection to process the notification message 2.
  • the electronic device may include multiple scenarios during the running of the first application, and different scenarios may correspond to different first notification types.
  • the first application is a game application
  • the running process of the first application may include a loading scene, a main interface scene, a combat scene, a store shopping scene, and the like.
  • the electronic device uses the first notification type corresponding to the current scene to process the notification message.
  • the electronic device may combine the first notification type corresponding to the scene in which the first application in the foreground is currently located and the second notification type of the second application that generates the notification message. Determine the type of notification to use for the notification message. That is, the electronic device may determine the notification type to be used for the notification message in combination with the current scene and operating conditions of the first application in the foreground and the second notification type of the second application that generates the notification message.
  • the current application is the first application.
  • the electronic device may determine the second notification type of the second application and the scene in which the first application is currently located.
  • the intersection of the first notification type corresponding to 1 may be referred to as the third notification type corresponding to scenario 1, and the third notification type is used to process the notification message 1.
  • scenario 2 where the first application is currently located
  • the electronic device may determine the intersection of the second notification type of the second application and the first notification type corresponding to scenario 2 of the first application (that is, scenario 2 corresponds to Third notification type), and use the notification type in the intersection to process the notification message 2.
  • the following description is made by taking an electronic device running a first application in the foreground as multiple scenes, and different scenes may correspond to different first notification types.
  • the case where the electronic device includes multiple code segments, interfaces, or states in the process of running the first application in the foreground is similar to the case where the electronic device includes multiple scenarios in the process of running the first application in the foreground. This embodiment will No longer.
  • the correspondence between different scenarios and different first notification types is preset in the code of the first application, and the first application can load the first notification type corresponding to the current scenario to the first real-time during the running process.
  • the electronic device can quickly and efficiently learn the first notification type of the current scene from the context of the first application, and then use the first notification type to process the notification message; or, according to the first scene of the current scene, A notification type and a second notification type of the second application program determine a third notification type corresponding to the current scene, so that the first notification type is used to process the notification message.
  • the electronic device does not need to determine the notification type according to the foreground application after determining the foreground application or the current scene of the foreground application, but can directly process the notification message according to the notification type in the context.
  • the implementation of equipment system control is relatively simple.
  • the first notification type corresponding to the current scene of the first application and the current scene may also be saved somewhere other than the context, for example, saved in flash or hard disk, so that the electronic device can be saved from flash or hard disk.
  • the corresponding relationship between different scenes of the first application and different first notification types is stored on the electronic device.
  • the electronic device can obtain the current scene from the first application in real time, and obtain the current scene corresponding according to the current scene.
  • the first notification type processes the notification message.
  • the first application is a game.
  • the game scenario may include a loading scenario, a main interface scenario, a combat scenario, and a store shopping scenario.
  • a loading scenario For the correspondence between each scenario and the first notification type, see Table 8 below.
  • the first application is a game and the second application is a short message.
  • the electronic device uses The first notification type of the loading scene includes a sound notification type and a vibration notification type notification short message notification message 1.
  • the first application is a game and the second application is WeChat.
  • the electronic device receives a WeChat notification message 1 in the main interface scenario shown in FIG. 10b, the electronic device
  • the first notification type using the main interface scenario includes a banner notification type and a vibration notification type to notify WeChat notification message 1.
  • the electronic device determines the third notification type according to the first notification type corresponding to the current scene of the first application and the second notification type of the second application, and uses the third notification type to process the notification message received by the electronic device. Instructions.
  • the first application is a game
  • the second application is WeChat
  • the second notification type of WeChat is a vibration notification type, a banner notification type, and a corner notification type.
  • Table 8 if the electronic device is in As shown in FIG. 10a, when a WeChat notification message 1 is received in the loading scene, the third notification type corresponding to the loading scene is a vibration notification type, and the electronic device notifies WeChat notification message 1 in the loading scene with a vibration notification type.
  • the electronic device may enter the main interface scene shown in FIG. 10b. If the electronic device receives a WeChat notification message 2 (or other notification messages such as a short message, etc.) in the main interface scenario shown in FIG. 10b, the third notification type corresponding to the main interface scenario is a vibration notification type and a banner notification type. As shown in FIG. 10b, the electronic device notifies WeChat notification message 2 with banner 1001 and vibration notification type in the main interface scenario.
  • a WeChat notification message 2 or other notification messages such as a short message, etc.
  • the electronic device may enter the combat scene of the game shown in FIG. 10c. If the electronic device receives the WeChat notification message 3 in the combat scenario shown in FIG. 10c, the third notification type corresponding to the combat scenario is empty, that is, the electronic device does not notify the WeChat notification message 3 in the combat scenario.
  • the electronic device can enter the store shopping scene shown in FIG. 10d. If the electronic device receives a WeChat notification message 4 in the store shopping scenario as shown in FIG. 10d, the third notification type corresponding to the store shopping scenario is a subscript notification type. As shown in FIG. 10d, the electronic device uses the Annotation 1003 notifies WeChat notification message 4.
  • the first application is a video player.
  • the scene of the video player may include a scene where a video is played and a scene where no video is played.
  • Table 9 For the correspondence between each scene and the first notification type, see Table 9 below.
  • the first application is a game
  • the second application is WeChat
  • the second notification type of WeChat is a vibration notification type and a banner notification type.
  • Table 9 if the electronic device is as shown in Figure 11a
  • the third notification type corresponding to the unplayed video scenario is a vibration notification type and a banner notification type.
  • the electronic device uses a banner notification in the unplayed video scenario shown in FIG. 11a. Notification type and vibration notification type.
  • the electronic device can enter the playing video scene shown in FIG. 11b. If the electronic device receives a WeChat notification message in a video playing scenario as shown in FIG. 11b, the third notification type corresponding to the playing video scenario is a vibration notification type, and the electronic device generates a pair of generated notifications according to the vibration notification type in the video playing scenario. WeChat notification message for notification.
  • the first application is a video player.
  • the scene of the video player may include a full-screen playback scene and a non-full-screen playback scene.
  • Table 10 For the correspondence between each scene and the first notification type, see Table 10 below.
  • the first application program is WeChat.
  • the scenes of WeChat may include a voice input scene, a text input scene, a friend circle scene, and a friend circle scene.
  • Table 11 For the correspondence between each scene and the first notification type, see Table 11 below.
  • the electronic device if the electronic device receives the notification message 1 generated by the second application under scenario 1 of the first application, and the third notification type corresponding to scenario 1 does not include the second notification type of the second application All notification types in the i.e. the electronic device fails to process the notification message 1 in the second application type complete second notification type under scenario 1 of the first application, then the electronic device quits the first application in the foreground In other scenarios, the notification message 1 may no longer be processed.
  • the first application is a game application and the second application is WeChat.
  • the second notification type of WeChat includes the vibration notification type, banner notification type, and corner notification type.
  • the third notification type corresponding to the loading scenario is a vibration notification type, and the electronic device uses the vibration notification type in the loading scenario.
  • the WeChat notification message 1 is no longer processed in the main interface scenario, the combat scenario, and the shopping scenario before the electronic device exits the game application.
  • the electronic device may process the notification message 1 in the fourth notification type.
  • the fourth notification type is the second notification type of the second application, and the electronic device does not use the notification type for the notification message 1 when displaying the first application in the foreground.
  • the first application is a game application and the second application is WeChat.
  • the second notification type of WeChat includes the vibration notification type, banner notification type, and corner notification type, as shown in Table 8.
  • the electronic device receives the WeChat notification message 1 in the loading scenario shown in FIG. 10a
  • the third notification type corresponding to the loading scenario is the vibration notification type, and the electronic device uses the vibration notification type to WeChat in the loading scenario.
  • the notification message 1 is for notification.
  • the electronic device may use the notification type excluded from the second notification type of WeChat.
  • the electronic device displays a banner 1201 and a corner 1202 which are not executed on the notification message 1 when the game is in the foreground.
  • the notification type of the banner 1201 and the corner mark 1202 may be referred to as a fourth notification type.
  • the electronic device may notify the second application of the first application in the foreground with all the notification types in the second application.
  • Scenario 1 Generate notification message 1 under.
  • the electronic device may notify the WeChat notification message 1 with the notification type of vibration, banner, and superscript in the second notification type of WeChat.
  • the electronic device may notify the second application of the notification message 1 generated in the first application in the foreground with the preset notification type.
  • the electronic device receives the notification message 1 generated by the second application under scenario 1 of the first application, regardless of whether the third notification type corresponding to scenario 1 includes the second notification type of the second application For all notification types in the above, after the electronic device quits the first application program in the foreground, it no longer processes the notification message 1.
  • the electronic device receives the notification message 1 generated by the second application in scenario 1 of the first application, and the third notification type corresponding to scenario 1 of the first application does not include the second application
  • the electronic device may use the fifth notification type to process the notification message 1 in scenario 2.
  • intersection 2 is the first notification type of the other scene (for example, scene 1) before the current scene (i.e., scene 2) and the second notification of the second application during the current display of the first application by the electronic device.
  • intersection of types that is, in the second notification type in which the fifth notification type is the second application, the electronic device has not used the notification type for the notification message 1 in the previous scenario during the display of the first application in the foreground this time.
  • the first application is a game and the second application is WeChat.
  • the second notification type of WeChat includes a vibration notification type, a banner notification type, and a superscript notification type.
  • Table 8 if the electronic device is in As shown in FIG. 10a, when the WeChat notification message 1 is received in the loading scene of the game, the third notification type corresponding to the loading scene is a vibration notification type, and the electronic device notifies WeChat notification message 1 through the vibration notification type in the loading scene. Then, in the main interface scene of the game shown in FIG.
  • the intersection 1 of the first notification type corresponding to the main interface scene and the second notification type of WeChat includes the intersection 2 (the intersection of the first notification type corresponding to the loading scene and the second notification type of WeChat, that is, the vibration notification type) is a banner notification type (that is, the fifth notification type corresponding to the main interface scene), so in the main interface scene,
  • the electronic device may notify WeChat notification message 1 as a banner notification type.
  • the first notification type is no notification, so the electronic device does not process the WeChat notification message 1 in the combat scenario.
  • the intersection of the first notification type corresponding to the store shopping scenario and the second notification type of WeChat includes the intersection 2 (loading scene, main interface scene, and combat scene correspondence).
  • the electronic device may notify the WeChat notification message 1 in the corner notification type.
  • the notification type adopted by the electronic device for the notification message 1 does not include all the notification types in the second notification type of the second application.
  • the notification type processes the notification message 1.
  • the fourth notification type is the second notification type of the second application, and the electronic device does not use the notification type 1 for the notification message 1 when the first application is displayed in the foreground.
  • the first application is a game
  • the second application is WeChat.
  • the second notification type of WeChat includes the vibration notification type, banner notification type, and corner notification type.
  • the third notification type corresponding to the loading scenario is a vibration notification type, and the electronic device performs notification through the vibration notification type in the loading scenario.
  • the first notification type corresponding to the main interface scenario includes banner notification types other than the vibration notification type (that is, the third notification type corresponding to the loading scene) in the second notification type.
  • the electronic device can notify WeChat notification message 1 in the manner of banner 1301.
  • the first notification type is no notification, so the electronic device does not continue to notify WeChat notification message 1.
  • the first notification type is a banner notification type, excluding the vibration notification type (that is, the third notification type corresponding to the loading scene) and the banner notification type (that is, the main notification type) in the second notification type.
  • the electronic device may notify the WeChat notification message 1 in the manner of a corner mark 1302 (that is, the fourth notification type).
  • the electronic device may notify the second application of the notification message 1 generated when the first application is displayed in the foreground in all notification types of the second notification type of the second application.
  • the electronic device may process the notification message 1 generated by the second application when the foreground application is the first application with a preset notification type.
  • the electronic device when the third notification type corresponding to scenario 1 of the first application does not include all the notification types in the second notification type of the second application, but the electronic device displays The notification type used in the notification message 1 includes all notification types in the second notification type of the second application. After the first application is exited in the foreground, the electronic device may use all notifications in the second notification type of the second application. Type, or using a preset notification type, to process the notification message 1 generated by the second application in scenario 1 of the first application.
  • the notification type adopted by the electronic device for the notification message 1 when the first application is displayed in the foreground includes all notification types in the second notification type of the second application, exit the first application in the foreground. After that, the electronic device no longer processes the notification message 1 generated by the second application in the scenario 1 of the first application.
  • the notification message generated by the second application may include multiple types, and different types of notification messages may correspond to different second notification types. For example, a text type notification message, a picture type notification message, a video type notification message, and the like.
  • the electronic device may use the first notification type of the first application or the first notification type corresponding to the specific scenario of the first application in combination with the current status of the second application.
  • the second notification type corresponding to the type of the generated notification message 1 determines the notification type of the notification message 1, and details are not described herein.
  • the notification message generated by the second application may include multiple levels, and notification messages of different levels may correspond to different second notification types. For example, a notification message sent by an important contact has a higher rank, a notification message sent by a frequently contacted contact has a higher rank, or a notification message containing a preset keyword has a higher rank.
  • the electronic device may use the first notification type of the first application or the first notification type corresponding to the specific scenario of the first application in combination with the current status of the second application.
  • the second notification type corresponding to the level of the generated notification message 1 determines the notification type of the notification message 1, which is not described herein again.
  • the above description is made by taking an application displayed in the foreground as an example.
  • the application displayed in the foreground on the electronic device may further include n, where n is an integer greater than 1.
  • the touch screen of an electronic device can be divided into multiple sub-screens, and each sub-screen can be used to display an application interface of a front-end application.
  • the arrangement of multiple sub-screens can be unlimited, for example, it can be arranged up and down, or left and right, or the middle position of the touch screen of an electronic device is a large sub-screen, and a large sub-screen includes a plurality of sub-screens. Small sub-screens and the like are not limited in this embodiment.
  • the electronic device may adopt the processing method of the notification message provided in the foregoing embodiment, respectively, according to the first notification type of the first application Ai and the second notification type of the second application in each front desk.
  • the notification message generated by the second application program is processed.
  • the touch screen of the electronic device includes a sub-screen 1401 and a sub-screen 1402.
  • the first application 1 displayed on the sub-screen 1401 is a game
  • the current scene is a battle scene of the game
  • the first display on the sub-screen 1402 is Application 2 is SMS
  • the second application is WeChat.
  • the first notification type corresponding to the combat scenario of the game is no notification
  • the first notification type of the short message is all notification types
  • the second notification type of WeChat is the sound notification type and banner notification type.
  • the electronic device determines not to perform WeChat notification message 1 on the sub-screen 1401 according to the first notification type corresponding to the combat scenario of the game and the second notification type of WeChat. Notification; the electronic device determines to notify WeChat notification message 1 with a banner notification type on the sub-screen 1402 according to the first notification type of the short message and the second notification type of WeChat, and notify WeChat notification message 1 through a sound notification type.
  • the electronic device when the electronic device receives a WeChat notification message 1 generated by WeChat, referring to FIG. 15, the electronic device corresponds to the combat scenario of the game.
  • the first notification type and the second notification type of WeChat determine the banner notification of WeChat notification message 1 on the sub-screen 1401; the electronic device determines the sound notification type and banner according to the first notification type of SMS 2 and the second notification type of WeChat.
  • the notification type notifies WeChat notification message 1.
  • the electronic device may A notification is displayed on a sub-screen corresponding to a foreground application in the foreground application.
  • the electronic device may be a tablet computer.
  • the touch screen of the electronic device includes a sub-screen 1401, a sub-screen 1402, a sub-screen 1403, and a sub-screen 1404.
  • the first application 1 displayed on the sub-screen 1401 is a game A1.
  • the current scenario is the combat scenario of game A1.
  • the first application 2 displayed on sub-screen 1402 is SMS A2
  • the first application 3 displayed on sub-screen 1403 is Alipay A3
  • the first application 4 displayed on sub-screen 1404 For WeChat A4 the second application is WeChat.
  • the first notification type corresponding to the combat scenario of game A1 is no notification
  • the first notification type of SMS A2 is all notification types
  • the first notification type of Alipay A3 is the sound notification type and banner notification type
  • the first notification type of WeChat A4 It is a banner notification type
  • the second notification type of WeChat is a sound notification type and a banner notification type. Therefore, the text messages A2, Alipay A3, and WeChat A4 displayed at the front desk all support banner notification types (that is, display notification types), so electronic devices can display sub-screens 1402, 1403, and 1404 corresponding to text messages A2, Alipay A3, and WeChat A4 Banner notifications on one of the sub-screens.
  • the electronic device may randomly select one of the sub-screens corresponding to the foreground applications that support the display notification type to display the notification. For example, the electronic device may randomly select one of the sub-screens 1402, 1403, and 1404 for banner notification. For example, referring to FIG. 17, the electronic device may perform banner notification on the sub-screen 1403 where Alipay A3 is located.
  • the electronic device may display the notification message on a sub-screen where the foreground application related to the notification message is located in a plurality of foreground applications that support the display notification type.
  • the notification message generated by the second application and the first foreground application Application Ai related.
  • application types may include instant messaging applications, social applications, video playback applications, and so on.
  • the notification message generated by the second application is related to the front-end first application Ai.
  • WeChat and SMS can belong to the same priority level, and WeChat notification messages are related to the SMS application displayed at the front desk.
  • the electronic device can be on the sub-screen 1404 where WeChat A4 is located Perform banner notification; or, referring to the part within the dashed line in FIG. 19, the electronic device may display and notify the WeChat notification message on the application interface of WeChat A4.
  • the front-end application includes game A1, short message A2, Alipay A3, and video player A4.
  • Short message A2 is also an instant messaging application. Therefore, the electronic device can be used in the child of the short message application A2.
  • the electronic device may display a notification on a sub-screen where the foreground application related to the notification message of the second application is located.
  • the touch screen of the electronic device includes a sub-screen 1401, a sub-screen 1402, a sub-screen 1403, and a sub-screen 1404.
  • the first application 1 displayed on the sub-screen 1401 is a game A1, and the current scene is a combat scene.
  • the first application 2 displayed on the sub-screen 1402 is SMS A2
  • the first application 3 displayed on the sub-screen 1403 is Alipay A3
  • the first application 4 displayed on the sub-screen 1404 is WeChat A4
  • the second application is WeChat.
  • the first notification type corresponding to the combat scenario of game A1 is no notification
  • the first notification type of SMS A2 is all notification types
  • the first notification type of Alipay application A3 is a sound notification type
  • the first notification type of WeChat A4 is a vibration notification.
  • Type the second notification type of WeChat is a sound notification type and a banner notification type.
  • the third notification type corresponding to the short message A2 displayed at the front desk is a banner notification type.
  • the electronic device may determine that the application related to the WeChat notification message in the game A1, the short message A2, Alipay A3, and WeChat A4 is the foreground WeChat A4. Therefore, referring to FIG.
  • the electronic device may perform banner notification on the sub-screen 1404 where WeChat A4 is located; or, referring to the part within the dashed line in FIG. 19, the electronic device may display the WeChat notification message on the application interface of WeChat A4 Notice.
  • the electronic device may display the first notification type of the first application A1-An and the second notification of the second application according to all foregrounds. Among the types, a notification type of the notification message generated by the second application program is determined.
  • the touch screen of the electronic device includes a sub-screen 1401 and a sub-screen 1402.
  • the first application 1 displayed on the front screen on the sub-screen 1401 is game A1
  • the current scene is a combat scene of the game
  • the first application displayed on the sub-screen 1402. 2 is SMS A2
  • the second application is WeChat.
  • the first notification type corresponding to the combat scenario of game A1 is no notification
  • the first notification type of SMS A2 is all notification types
  • the second notification type of WeChat is the sound notification type and banner notification type.
  • the electronic device determines not to notify the WeChat notification message 1 on the sub-screen 1401 and the sub-screen 1402. .
  • the electronic device may perform a second application program according to the first notification type of the first application A1-An in the foreground, including the first notification type with the least notification types and the second notification type of the second application.
  • the generated notification message is processed.
  • the electronic device determines that the first notification type of the first application A1-An in the foreground includes the first notification type with the least notification type and the second notification type of the second application, it is determined that the second application needs to be generated.
  • the notification message of the notification message may be randomly displayed on any sub-screen, or the notification message may be displayed on the sub-screen where the foreground application related to the notification message is located.
  • the touch screen of the electronic device includes a sub-screen 1401, a sub-screen 1402, a sub-screen 1403, and a sub-screen 1404.
  • the first front-end application 1 on the sub-screen 1401 is game A1, and the current scene is the battle scene of the game.
  • the first application on the front desk 2 is SMS A2
  • the first application on the front desk 3 on the subscreen 1403 is Alipay A3
  • the first application on the front desk 4 on the subscreen 1404 is WeChat A4
  • the second application is WeChat.
  • the first notification type corresponding to the combat scenario of game A1 is the vibration notification type and the corner notification type
  • the first notification type of SMS A2 is all the notification types
  • the first notification type of Alipay A3 is the sound notification type, banner notification type, and angle.
  • the first notification type of WeChat A4 is the vibration notification type, the corner notification type and the banner notification type
  • the second notification type of WeChat is the corner notification type and banner notification type.
  • the first notification type including the least notification types is the first notification type corresponding to the combat scenario of the game A1, that is, the vibration notification type and the corner notification type. Therefore, the electronic device determines to notify the WeChat notification message through the corner notification type (that is, the display notification type) according to the first notification type corresponding to the combat scene of the game A1 and the second notification type of WeChat.
  • the electronic device may randomly display the WeChat notification message on any of the sub-screens, or the electronic device may perform a corner mark notification of the notification message on the sub-screen where the WeChat is related to the WeChat notification message, or the electronic device may The notification message is displayed on the application interface of the sub-screen where the WeChat is related to the WeChat notification message.
  • the electronic device may, according to the first notification type of the first application A1-An in the foreground, have the first notification type with the least intersection with the second notification type of the second application, and the second application The second notification type is to process the notification message generated by the second application.
  • the touch screen of the electronic device includes a sub-screen 1401 and a sub-screen 1402.
  • the first application 1 displayed on the sub-screen 1401 is a game A1
  • the current scenario is a combat scene of a game
  • It is SMS A2
  • the second application is WeChat.
  • the first notification type corresponding to the combat scenario of game A1 is no notification
  • the first notification type of SMS A2 is all notification types
  • the second notification type of WeChat is the sound notification type and banner notification type. Therefore, the intersection of the first notification type corresponding to the combat scenario of game A1 and the second notification type of WeChat is the smallest, which is an empty set.
  • the electronic device can according to the first notification type corresponding to the battle scenario of game A1 and the second notification of WeChat Type, it is determined that WeChat notification message 1 is not processed, and WeChat notification message 1 is not displayed on subscreen 1401 and subscreen 1402.
  • the electronic device may perform a WeChat notification message 1 according to the first notification type of the first application A1-An, the second notification type of the second application, and the preset display position of the notification message. Notice.
  • the touch screen of an electronic device includes a sub-screen 1401 and a sub-screen 1402.
  • the first application 1 displayed on the sub-screen 1401 is a game A1
  • the current scenario is a combat scene of a game
  • It is SMS A2
  • the second application is WeChat.
  • the first notification type corresponding to the combat scenario of game A1 is no notification
  • the first notification type of SMS A2 is all notification types
  • the second notification type of WeChat is the sound notification type and banner notification type
  • the preset corresponding to the WeChat notification message The display position is at the top of the touch screen of the electronic device.
  • the electronic device determines that WeChat notification message 1 may not be processed according to the first notification type corresponding to the combat scenario of game A1 and the second notification type of WeChat; It is determined that the first notification type of A2 and the second notification type of WeChat can notify WeChat notification message 1 with banner notification type on the sub-screen 1402 and prompt by vibrating notification type; however, because the preset display position of WeChat notification messages is electronic The top of the device, and the sub-screen 1402 where the short message A2 is located is not on the top of the touch screen of the electronic device. Therefore, the electronic device does not display the WeChat notification message 1 on the sub-screen 1402 through the banner notification type, and the electronic device only prompts through the vibration notification type.
  • different interfaces (or different states, or different scenarios, or different code segments) of the first application program correspond to different whitelists, respectively.
  • the notification message is notified.
  • different interfaces (or different states, or different scenarios, or different code segments) of the first application program correspond to different blacklists, respectively.
  • the notification message is not notified.
  • different interfaces (or different states, or different scenarios, or different code segments) of the first application program correspond to different first notification types and white lists, respectively.
  • the notification message is performed using the first notification type corresponding to the first interface. Notice.
  • different interfaces (or different states, or different scenarios, or different code segments) of the first application correspond to different first notification types and whitelists, respectively, and the second application corresponds to the second notification.
  • Types of When the first interface of the first application is displayed in the foreground, if the second application that generates the notification message is in the white list corresponding to the first interface, the first notification type and the second application corresponding to the first interface are used. The notification type in the intersection of the second notification type of the notification type.
  • the electronic device may stop displaying the notification message, so as to avoid visual interference of the display notification message to the user and obstruction of the application interface of the foreground application.
  • a preset duration for example, 2s
  • the notification message in this embodiment is not limited to a notification message that requires sound or visual display, as long as it is some kind of information used to notify other entities, it can be considered as a notification message.
  • the second application program sends a notification message to inform the system of the electronic device or the first application program displayed in the foreground that the second application program wants to switch to the foreground.
  • the electronic device determines whether to switch the second application to the foreground according to the first notification type of the first application. In this way, the first foreground application can prevent other applications from preempting its own foreground display.
  • this embodiment provides a method for processing a notification message, as shown in FIG. 20.
  • This method may be implemented in an electronic device (such as a mobile phone, a tablet computer, etc.) as shown in FIG. 1 and FIG. 2.
  • the method may specifically include the following steps:
  • the electronic device displays a first interface of a first application on a touch screen.
  • the first application program may be a certain game application, and the first interface may be a combat interface of the game as shown in FIG. 10c.
  • the first interface may also be a loading interface as shown in FIG. 10a, a main interface as shown in FIG. 10b (excluding the banner 1001), or a store shopping interface as shown in FIG. 10d (excluding the corner mark 1003).
  • the first interface may be displayed on the touch screen in a full screen, or may be partially displayed on the touch screen.
  • the electronic device receives the first notification message of the second application program.
  • the second application program may be different from the first application program, or may be the same as the first application program.
  • the second application program may be WeChat.
  • the first notification message may be the above WeChat notification message 3.
  • the second application program may be a power management application program, and the first notification message may be a notification message of low battery power.
  • the electronic device determines a first target notification type for the first notification message according to the first interface.
  • the electronic device may determine that the first target notification type of the WeChat notification message 3 is non-notification according to the combat interface.
  • the electronic device processes the first notification message according to the determined first target notification type.
  • the electronic device After the first target notification type for the WeChat notification message 3 determined by the electronic device in step S2003 is no notification, the electronic device does not notify the WeChat notification message 3 in the case of displaying the combat interface.
  • the electronic device can determine the notification type of the notification message of the second application program according to the interface of the first application program displayed in the foreground, so as not to interfere with the normal operation of the first application program displayed in the foreground.
  • different interfaces of the first application may respectively correspond to a first notification type, and the first notification type corresponding to the first interface is the first target notification type in step S2003.
  • different interfaces of the first application may correspond to the first notification type
  • the second application may correspond to the second notification type.
  • the electronic device determines the notification type of the first notification message according to the first interface, which may specifically include: the electronic device determines the first notification type corresponding to the first interface of the first application and the second notification corresponding to the second application.
  • the first intersection of the second notification types, and the notification type in the first intersection is the first target notification type for the first notification message.
  • the first application is a game
  • the first interface is a combat interface of the game
  • the first notification type corresponding to the combat interface of the game is non-notification
  • the second application is WeChat
  • the second notification type of WeChat is vibration notification Type, banner notification type, and corner notification type
  • the method may further include:
  • the electronic device displays the second interface of the first application on the touch screen.
  • the second interface may be a store shopping interface (excluding the subscript 1003) as shown in FIG. 10d.
  • the electronic device receives a second notification message of the second application program.
  • the second application program in step S2006 may be the same as or different from the second application program in step S2002.
  • the second application programs in step S2006 and step S2002 are both WeChat, and the electronic device receives the WeChat notification message 4 when the store shopping interface is displayed.
  • the electronic device determines a second target notification type for the second notification message according to the second interface.
  • the second target notification type is different from the first target notification type.
  • the electronic device may determine that the second target notification type for the WeChat notification message 4 is a corner notification type according to the store shopping interface shown in FIG. 10d.
  • the electronic device processes the second notification message according to the determined second target notification type.
  • the electronic device After the second target notification type for the WeChat notification message 4 determined by the electronic device in step S2007 is a subscript notification type, referring to FIG. 10d, in a case where the shop shopping interface is displayed, the electronic device sets a subscript 1003 in step S2008. To notify WeChat notification message 4.
  • the electronic device can determine different notification types for different notification messages received by the electronic device according to different interfaces of the application program displayed in the foreground, thereby reducing the interference to the first application program displayed in the foreground in real time and dynamically.
  • different interfaces of the first application may respectively correspond to the first notification type, and the first notification type corresponding to the second interface is the second target notification type in step S2007.
  • step S2007 may specifically include: the electronic device determines the first notification of the first application The second intersection of the first notification type corresponding to the second interface and the second notification type corresponding to the second application, and the notification type in the second intersection is the second target notification type for the second notification message.
  • the first notification type corresponding to the second interface is different from the first notification type corresponding to the first interface.
  • the first application is a game
  • the second interface is a game shop shopping interface
  • the first notification type corresponding to the game shop shopping interface is a corner notification type
  • the second application is WeChat
  • the type is a vibration notification type, a banner notification type, and a corner mark notification type
  • the electronic device determines that the second intersection is a corner mark notification type. Therefore, in step S2008, when the electronic device displays the store shopping interface at the front desk, the WeChat notification message 4 is notified in a corner notification type.
  • the method may further include:
  • the electronic device determines a third target notification type for the first notification message according to the first interface and the second interface.
  • the first application is a game
  • the first interface is a loading interface as shown in FIG. 13a
  • the second interface is a main interface as shown in FIG. 13b (excluding the banner 1301)
  • the first notification message is the above notification.
  • the electronic device may determine that the third target notification type for the WeChat notification message 1 is a banner notification type according to the loading interface shown in FIG. 13a and the main interface shown in FIG. 13b (excluding the banner 1301).
  • the electronic device processes the first notification message according to the determined third target notification type.
  • the electronic device determines that the third target notification type for the WeChat notification message 1 is a banner notification type in step S2009, referring to FIG. 13b, when the main interface is displayed, the electronic device performs a banner 1001 on WeChat in step S2010.
  • the notification message 1 is for notification.
  • the electronic device may determine that the same notification message of the second application is processed multiple times according to different interfaces of the first application displayed in the foreground, thereby reducing the real-time and dynamic performance of the first application displayed in the foreground. While interfering, try to let users know the notification message.
  • step S2009 may specifically include: the electronic device determines the notification type of the second intersection, and the electronic device is in The third target notification type that is not performed on the first notification message when the first interface of the first application is displayed.
  • the first application is a game
  • the first interface is a loading interface
  • the second interface is a main interface.
  • the first notification type of the loading interface includes a sound notification type and a vibration notification type
  • the first notification type of the main interface includes vibration.
  • the second application is WeChat
  • the second notification type of WeChat includes the vibration notification type, banner notification type and corner notification type
  • the first notification message is the above WeChat notification message 1.
  • the second intersection is the vibration notification type and banner notification type.
  • the notification type adopted by the electronic device for WeChat notification message 1 when displaying the first interface of the first application program is the type of vibration notification performed by the electronic device on WeChat notification message 1 under the loading interface.
  • the third target notification type that the electronic device does not perform on the WeChat notification message 1 when displaying the loading interface is a banner notification type. Therefore, in step S2010, referring to FIG. 13b, when the electronic device displays the main interface, the electronic device notifies WeChat notification message 1 in the manner of banner 1301.
  • the method may further include the following steps S2011-2012.
  • the method may include:
  • the electronic device determines The fourth target notification type of the first notification message.
  • the electronic device processes the first notification message according to the determined fourth target notification type.
  • the fourth target notification type is a corner mark notification type, see FIG. 13e.
  • the electronic device may display a WeChat notification message 1 in a corner mark notification type.
  • the fourth target notification type is a preset notification type.
  • the electronic device determines the fourth target notification type for the first notification message in step S2011, which may specifically include: the electronic device determines that the second notification type corresponding to the second application program, the electronic device is in When the interface of the first application is displayed this time, the fourth target notification type that is not performed on the first notification message.
  • the first notification message is a WeChat notification message 1
  • the second notification type is a vibration notification type, a banner notification type, and a beacon notification type; see FIG. 13a to FIG. 13d.
  • the electronic device displays the The notification types used for the WeChat notification message 1 when loading the interface, the main interface, the combat interface, and the store shopping interface are vibration notification types and banner notifications; in the second notification type, the electronic device issues the first notification when the first application is displayed this time
  • the notification type not adopted by the message is a corner notification type, that is, the fourth target notification type is a corner notification type. Therefore, referring to FIG. 13e, after exiting the game interface, the electronic device may notify WeChat notification message 1 with a corner notification type.
  • this embodiment provides a method for processing a notification message.
  • This method can be implemented in an electronic device (such as a mobile phone, a tablet computer, etc.) as shown in FIG. 1 and FIG. 2. Shown, but the method may specifically include the following steps:
  • the electronic device displays a first interface of a first application on a touch screen.
  • the electronic device receives a first notification message of a second application.
  • S2103 The electronic device determines a first intersection of a first notification type corresponding to the first interface of the first application and a second notification type corresponding to the second application, and the notification type in the first intersection is the first to the first notification message.
  • a target notification type The electronic device determines a first intersection of a first notification type corresponding to the first interface of the first application and a second notification type corresponding to the second application, and the notification type in the first intersection is the first to the first notification message.
  • S2104 The electronic device processes the first notification message according to the determined first target notification type.
  • the electronic device displays the second interface of the first application on the touch screen.
  • the electronic device receives a second notification message of the second application program.
  • the electronic device determines a second intersection of the first notification type corresponding to the second interface of the first application and the second notification type corresponding to the second application, and the notification type in the second intersection is the first to the second notification message.
  • Two target notification types Two target notification types.
  • S2108 The electronic device processes the second notification message according to the determined second target notification type.
  • step S2105 the method may further include the following steps S2109-S2110.
  • the electronic device determines the notification type of the second intersection, and the electronic device does not perform the third target notification type on the first notification message when displaying the first application program this time.
  • S2110 The electronic device processes the first notification message according to the determined third target notification type.
  • the method may further include the following steps S2111-step S2112.
  • the notification type adopted for the first notification message does not completely include the second notification type.
  • the electronic device determines the first In the second notification type corresponding to the two applications, when the electronic device displays the interface of the first application this time, the fourth target notification type that is not executed on the first notification message.
  • the electronic device processes the first notification message according to the determined fourth target notification type.
  • the electronic device includes hardware and / or software modules corresponding to performing each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is performed by hardware or computer software-driven hardware depends on the specific application of the technical solution and design constraints. Those skilled in the art may use different methods to implement the described functions for each specific application in combination with the embodiments, but this implementation should not be considered to be beyond the scope of the present application.
  • the electronic device may be divided into functional modules according to the foregoing method example.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules may be implemented in the form of hardware. It should be noted that the division of the modules in this embodiment is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
  • FIG. 24 shows a possible composition diagram of the electronic device 2400 involved in the foregoing embodiment.
  • the electronic device 2400 may include a display unit 2401, a receiving unit 2402, a determining unit 2403, and a processing unit 2404.
  • the display unit 2401 may be used to support the electronic device 3600 to perform the above steps S2001, S2005, S2101, S2105, and the like, and / or other processes used in the technology described herein.
  • the receiving unit 2402 may be used to support the electronic device 2400 to perform the above-mentioned steps S2002, S2006, S2102, S2106, etc., and / or other processes for the technology described herein.
  • the determination unit 2403 may be used to support the electronic device 2400 to perform the above steps S2003, S2007, S2009, S2011, S2103, S2107, S2109, S2111, etc., and / or other processes for the technology described herein .
  • the processing unit 2404 may be used to support the electronic device 2400 to perform the above-mentioned steps S2004, S2008, S2010, S2012, S2104, S2108, S2110, S2112, etc., and / or other processes for the technology described herein . It should be noted that all relevant content of each step involved in the foregoing method embodiments can be referred to the functional description of the corresponding functional module, and will not be repeated here.
  • the electronic device provided in this embodiment is configured to execute the processing method of the notification message, and therefore, the same effect as the implementation method can be achieved.
  • the electronic device may include a processing module, a storage module, and a communication module.
  • the processing module may be used to control and manage the actions of the electronic device.
  • the processing module may be used to support the electronic device to execute the steps performed by the display unit 2401, the determining unit 2403, and the processing unit 2404.
  • the storage module may be used to support the electronic device to store the first notification type corresponding to different interfaces of the first application program, the second notification type corresponding to the second application program, and to store program code and data.
  • the communication module may be used to support communication between the electronic device and other devices.
  • the communication module may be used to support the electronic device to perform the steps performed by the receiving unit 2402.
  • the processing module may be a processor or a controller. It may implement or execute various exemplary logical blocks, modules, and circuits described in connection with the present disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination including one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on.
  • the memory module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • the electronic device involved in this embodiment may be a device having a structure shown in FIG. 1.
  • this embodiment further provides an electronic device 2500.
  • the electronic device may include: a touch screen 2501, wherein the touch screen 2501 may include a touch-sensitive surface 2506 and a display screen 2507; one or more processors 2502; a memory 2503; and one or more computer programs 2504, each of which may be connected through one or more communication buses 2505.
  • the one or more computer programs 2504 are stored in the memory 2503, and are configured to be executed by the one or more processors 2502.
  • the one or more computer programs 2504 include instructions.
  • the above The instructions may be used to perform various steps performed by the electronic device as shown in FIG. 21 and the corresponding embodiment. In some other embodiments, the foregoing instructions may also be used to execute steps performed by the electronic device in FIG.
  • the foregoing instructions may also be used to execute each step performed by the electronic device in FIG. 23 and the corresponding embodiments. In other embodiments, the foregoing instructions may also be used to execute steps 2101-2112 performed by the electronic device in the foregoing embodiments.
  • the electronic device includes but is not limited to the devices listed above.
  • the electronic device may further include a radio frequency circuit, a positioning device, a sensor, etc.
  • the electronic device 2500 may be as shown in FIG. Shown electronic device 100.
  • This embodiment also provides a computer storage medium.
  • the computer storage medium stores computer instructions.
  • the electronic device is caused to execute the related method steps to implement the processing of the notification message in the foregoing embodiment. method.
  • This embodiment also provides a computer program product.
  • the computer program product runs on a computer, the computer is caused to execute the foregoing related steps to implement the method for processing a notification message in the foregoing embodiment.
  • an embodiment of the present application further provides a device.
  • the device may specifically be a chip, a component, or a module.
  • the device may include a connected processor and a memory.
  • the memory is used to store computer execution instructions.
  • the processor may execute computer execution instructions stored in the memory, so that the chip executes the processing method of the notification message in the foregoing method embodiments.
  • the electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above. Therefore, for the beneficial effects that can be achieved, refer to the corresponding ones provided above. The beneficial effects in the method are not repeated here.
  • each functional unit in the embodiment of the present invention may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • a computer program product includes one or more computer instructions.
  • 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 or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center via a wired (e.g., Coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes one or more available medium integrations.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state drive), and the like.

Landscapes

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

Abstract

本发明提供一种通知消息的处理方法及电子设备,涉及电子技术领域,能够根据前台显示的应用程序确定通知消息的通知类型,从而降低通知消息对前台显示的应用程序的干扰。电子设备在触摸屏上显示第一应用程序的第一界面,接收到第二应用程序的第一通知消息,根据第一界面,确定对第一通知消息的第一目标通知类型,根据第一目标通知类型对第一通知消息进行处理,在触摸屏上显示第一应用程序的第二界面,接收到第二应用程序的第二通知消息,根据第二界面,确定对第二通知消息的第二目标通知类型,根据第二目标通知类型对第二通知消息进行处理,第二目标通知类型与第一目标通知类型不同。

Description

通知消息的处理方法及电子设备 技术领域
本申请实施例涉及电子技术领域,尤其涉及一种通知消息的处理方法及电子设备。
背景技术
随着手机等智能电子设备的发展,电子设备的功能越来越强,电子设备上可执行的任务越来越多。
当电子设备正在运行某个应用程序时,若接收到当前应用程序或其他应用程序产生的通知消息,则可以将该通知消息通知给用户。例如,当用户正在打游戏时,若电子设备接收到头条消息,则电子设备可以在游戏界面上显示头条消息。这样,电子设备显示的通知消息会遮挡到当前游戏界面,从而对用户造成视觉干扰。并且,当用户误触了通知消息所在的区域时,将导致电子设备错误地切换到头条应用程序,打扰并中断了用户的游戏过程。因而,用户的体验较差。
发明内容
本申请实施例提供一种通知消息的处理方法及电子设备,能够根据前台显示的应用程序确定通知消息的通知类型,从而降低通知消息对前台显示的应用程序的干扰。
为达到上述目的,本实施例采用如下技术方案:
一方面,本申请技术方案提供了一种通知消息的处理方法,包括:电子设备在触摸屏上显示第一应用程序的第一界面。在电子设备接收到第二应用程序的第一通知消息之后,电子设备根据第一界面确定对第一通知消息的第一目标通知类型。而后,电子设备根据第一目标通知类型对第一通知消息进行处理。电子设备在触摸屏上显示第一应用程序的第二界面。在电子设备接收到第二应用程序的第二通知消息之后,电子设备根据第二界面确定对第二通知消息的第二目标通知类型。之后,电子设备根据第二目标通知类型对第二通知消息进行处理。其中,第一目标通知类型与第二目标通知类型不同。
在该方案中,电子设备可以根据前台显示的应用程序的不同界面,动态地确定对电子设备接收到的不同通知消息的不同通知类型,从而实时降低对前台显示的第一应用程序的干扰。
在一种可能的实现中,第一应用程序的不同界面分别对应有第一通知类型,第一界面对应的第一通知类型即为第一目标通知类型,第二界面对应的第一通知类型即为第二目标通知类型。
这样,电子设备可以根据前台显示的应用程序的不同界面各自对应的第一通知类型,动态地确定对电子设备接收到的不同通知消息的不同通知类型,从而实时降低对前台显示的第一应用程序的干扰。
在另一种可能的实现中,第一应用程序的不同界面分别对应有第一通知类型,第二应用程序对应有第二通知类型。电子设备根据第一界面,确定对第一通知消息的第 一目标通知类型,包括:电子设备确定第一应用程序的第一界面对应的第一通知类型和第二通知类型的第一交集,第一交集中的通知类型即为第一目标通知类型。电子设备根据第二界面,确定对第二通知消息的第二目标通知类型,包括:电子设备确定第一应用程序的第二界面对应的第一通知类型和第二通知类型的第二交集,第二交集中的通知类型即为第二目标通知类型。
在该方案中,电子设备可以结合前台显示的第一应用程序的当前界面对应的第一通知类型,和产生通知消息的第二应用程序的第二通知类型,确定对通知消息的通知类型。
其中,第二界面对应的第一通知类型与第一界面对应的第一通知类型不同。
在另一种可能的实现中,在触摸屏上显示第一应用程序的第二界面之后,该方法还包括:电子设备根据第一界面和第二界面,确定对第一通知消息的第三目标通知类型。电子设备根据第三目标通知类型,对第一通知消息进行处理。
在该方案中,电子设备可以根据前台显示的第一应用程序的不同界面对第二应用程序的同一通知消息进行多次处理,从而在实时、动态地降低对前台显示的第一应用程序的干扰的同时,尽量让用户获知该通知消息。
在另一种可能的实现中,电子设备根据第一界面和第二界面,确定对第一通知消息的第三目标通知类型,包括:电子设备确定第二交集的通知类型中,电子设备在显示第一界面时未对第一通知消息执行的第三目标通知类型。其中,第二交集为第一应用程序的第二界面对应的第一通知类型和第二通知类型的交集。
在该方案中,电子设备可以结合前台显示的第一应用程序的第一界面和第二界面对应的第一通知类型,和产生通知消息的第二应用程序的第二通知类型,确定对通知消息的通知类型。
在另一种可能的实现中,该方法还包括:若电子设备在本次显示第一应用程序的界面时,对第一通知消息采用的通知类型未完全包括第二通知类型,则在停止显示第一应用程序的界面后,电子设备确定对第一通知消息的第四目标通知类型。而后,电子设备根据所确定的第四目标通知类型,对第一通知消息进行处理。
在该方案中,电子设备可以在前台退出显示第一应用程序的界面后,对前台显示第一应用程序时产生的通知消息进行处理。
在另一种可能的实现中,电子设备确定对第一通知消息的第四目标通知类型,包括:电子设备确定第二通知类型中,电子设备在本次显示第一应用程序的界面时未对第一通知消息执行的第四目标通知类型。
也就是说,对于前台显示第一应用程序的界面时产生的第二应用程序的通知消息,电子设备在前台显示第一应用程序的界面时对该通知消息所采用的通知类型,与电子设备退出前台显示第一应用程序的界面后对该通知消息所采用的通知类型的集合,为第二应用程序对应的第二通知类型。
在另一种可能的实现中,第一应用程序为游戏,第一界面为加载界面、主界面、作战界面或商店购物界面。
在另一种可能的实现中,第一应用程序为视频播放器,第一界面为未播放视频界面或播放视频界面;或者,第一界面为全屏播放界面或非全屏播放界面。
另一方面,本申请技术方案提供了一种通知消息的处理方法,包括:电子设备在触摸屏上显示第一应用程序的第一界面;接收到第二应用程序的第一通知消息;根据第一界面,确定对第一通知消息的第一目标通知类型;根据第一目标通知类型对第一通知消息进行处理。电子设备在触摸屏上显示第一应用程序的第二界面;接收到第二应用程序的第二通知消息;根据第二界面,确定对第二通知消息的第二目标通知类型;根据第二目标通知类型对第二通知消息进行处理。在触摸屏上显示第一应用程序的第二界面之后,电子设备根据第一界面和第二界面,确定对第一通知消息的第三目标通知类型;根据第三目标通知类型,对第一通知消息进行处理。若电子设备在本次显示第一应用程序的界面时,对第一通知消息采用的通知类型未完全包括第二通知类型,则电子设备在停止显示第一应用程序的界面后,确定对第一通知消息的第四目标通知类型;根据所确定的第四目标通知类型,对第一通知消息进行处理。
在该方案中,对于前台显示第一应用程序的界面时产生的第二应用程序的通知消息,电子设备可以结合当前界面对应的第一通知类型和第一应用程序对应的第二通知类型,确定对该通知消息的通知类型,并在前台显示第一应用程序的界面时,以及在前台退出显示第一应用程序的界面后,对该通知消息进行多次处理。
另一方面,本申请技术方案提供了一种通知消息的处理方法,包括:电子设备在触摸屏上显示第一应用程序的第一界面,电子设备接收到第二应用程序的第一通知消息后,根据第一界面确定对第一通知消息的第一目标通知类型。而后,电子设备根据第一目标通知类型对第一通知消息进行处理。
在该方案中,电子设备可以根据前台显示的第一应用程序的界面确定对第二应用程序的通知消息的通知类型,从而尽量不干扰到该前台显示的第一应用程序的正常运行。
其中,第一应用程序的不同界面分别对应有第一通知类型,第一界面对应的第一通知类型即为第一目标通知类型。
另一方面,本申请技术方案提供了一种通知消息的处理方法,包括:在触摸屏上显示第一应用程序的第一界面和另一个第一应用程序的第二界面;接收到第二应用程序的第一通知消息;根据第一应用程序的第一界面和另一个应用程序的第二界面,确定对第一通知消息的通知类型;根据所确定的对第一通知消息的通知类型,对第一通知消息进行通知。
在该方案中,电子设备可以在分屏显示的情况下,根据前台显示的多个第一应用程序的界面确定对第二应用程序的通知消息的通知类型,从而尽量不干扰到该前台显示的第一应用程序的正常运行。
另一方面,本申请技术方案提供了一种电子设备,包括:显示单元,用于在触摸屏上显示第一应用程序的第一界面。接收单元,用于接收到第二应用程序的第一通知消息。确定单元,用于根据第一界面确定对第一通知消息的第一目标通知类型。处理单元,用于根据第一目标通知类型对第一通知消息进行处理。显示单元还用于,在触摸屏上显示第一应用程序的第二界面。接收单元还用于,接收到第二应用程序的第二通知消息;确定单元还用于,根据第二界面确定对第二通知消息的第二目标通知类型;处理单元还用于,根据第二目标通知类型对第二通知消息进行处理。其中,第一目标 通知类型与第二目标通知类型不同。
在一种可能的实现中,第一应用程序的不同界面分别对应有第一通知类型,第一界面对应的第一通知类型即为第一目标通知类型,第二界面对应的第一通知类型即为第二目标通知类型。
在另一种可能的实现中,第一应用程序的不同界面分别对应有第一通知类型,第二应用程序对应有第二通知类型。确定单元具体用于:确定第一应用程序的第一界面对应的第一通知类型和第二通知类型的第一交集,第一交集中的通知类型即为第一目标通知类型;确定第一应用程序的第二界面对应的第一通知类型和第二通知类型的第二交集,第二交集中的通知类型即为第二目标通知类型。
其中,第二界面对应的第一通知类型与第一界面对应的第一通知类型不同。
在另一种可能的实现中,确定单元还用于,在显示单元于触摸屏上显示第一应用程序的第二界面之后,根据第一界面和第二界面,确定对第一通知消息的第三目标通知类型。处理单元还用于,根据第三目标通知类型,对第一通知消息进行处理。
在另一种可能的实现中,确定单元具体用于:确定第二交集的通知类型中,电子设备在显示第一界面时未对第一通知消息执行的第三目标通知类型。其中,第二交集为第一应用程序的第二界面对应的第一通知类型和第二通知类型的交集。
在另一种可能的实现中,确定单元还用于,若电子设备在本次显示第一应用程序的界面时,对第一通知消息采用的通知类型未完全包括第二通知类型,则在停止显示第一应用程序的界面后,确定对第一通知消息的第四目标通知类型。处理单元还用于,根据所确定的第四目标通知类型,对第一通知消息进行处理。
在另一种可能的实现中,确定单元具体用于:确定第二通知类型中,电子设备在本次显示第一应用程序的界面时未对第一通知消息执行的第四目标通知类型。
另一方面,本申请技术方案提供了一种电子设备,包括:显示单元,用于在触摸屏上显示第一应用程序的第一界面。接收单元,用于接收到第二应用程序的第一通知消息。确定单元,用于根据第一界面确定对第一通知消息的第一目标通知类型。处理单元,用于根据第一目标通知类型对第一通知消息进行处理。
另一方面,本申请技术方案提供了一种电子设备,包括:显示单元,用于在触摸屏上显示第一应用程序的第一界面和另一个第一应用程序的第二界面。接收单元,用于接收到第二应用程序的第一通知消息。确定单元,用于根据第一应用程序的第一界面和另一个应用程序的第二界面,确定对第一通知消息的通知类型。处理单元,用于根据所确定的对第一通知消息的通知类型,对第一通知消息进行通知。
另一方面,本申请技术方案提供了一种电子设备,包括:触摸屏,其中,触摸屏包括触敏表面和显示器;一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序。其中,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被电子设备执行时,使得电子设备执行以下步骤:在触摸屏上显示第一应用程序的第一界面;接收到第二应用程序的第一通知消息;根据第一界面确定对第一通知消息的第一目标通知类型;根据第一目标通知类型对第一通知消息进行处理;在触摸屏上显示第一应用程序的第二界面;接收到第二应用程序的第二通知消息;根据第二界面确定对第二通知消息的第二目标通知类型;根据第二目标通知类 型对第二通知消息进行处理;第一目标通知类型与第二目标通知类型不同。
在一种可能的实现中,第一应用程序的不同界面分别对应有第一通知类型,第一界面对应的第一通知类型即为第一目标通知类型,第二界面对应的第一通知类型即为第二目标通知类型。
在另一种可能的实现中,第一应用程序的不同界面分别对应有第一通知类型,第二应用程序对应有第二通知类型;当指令被电子设备执行时,使得电子设备具体执行以下步骤:确定第一应用程序的第一界面对应的第一通知类型和第二通知类型的第一交集,第一交集中的通知类型即为第一目标通知类型;确定第一应用程序的第二界面对应的第一通知类型和第二通知类型的第二交集,第二交集中的通知类型即为第二目标通知类型。
其中,第一界面对应的第一通知类型与第二界面对应的第一通知类型不同。
在另一种可能的实现中,当指令被电子设备执行时,使得电子设备还执行以下步骤:在触摸屏上显示第一应用程序的第二界面之后,根据第一界面和第二界面,确定对第一通知消息的第三目标通知类型;根据第三目标通知类型,对第一通知消息进行处理。
在另一种可能的实现中,当指令被电子设备执行时,使得电子设备具体执行以下步骤:确定第二交集的通知类型中,电子设备在显示第一界面时未对第一通知消息执行的第三目标通知类型。其中,第二交集为第一应用程序的第二界面对应的第一通知类型和第二通知类型的交集。
在另一种可能的实现中,当指令被电子设备执行时,使得电子设备还执行以下步骤:若电子设备在本次显示第一应用程序的界面时,对第一通知消息采用的通知类型未完全包括第二通知类型,则在停止显示第一应用程序的界面后,确定对第一通知消息的第四目标通知类型;根据所确定的第四目标通知类型,对第一通知消息进行处理。
在另一种可能的实现中,当指令被电子设备执行时,使得电子设备具体执行以下步骤:确定第二通知类型中,电子设备在本次显示第一应用程序的界面时未对第一通知消息执行的第四目标通知类型。
另一方面,本申请技术方案提供了一种电子设备,包括一个或多个处理器和一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述任一方面任一项可能的实现中的通知消息的处理方法。
另一方面,本申请技术方案提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述任一方面任一项可能的实现中的通知消息的处理方法。
另一方面,本申请技术方案提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述任一方面任一项可能的设计中的通知消息的处理方法。
附图说明
图1为本申请实施例提供的一种电子设备的硬件结构示意图;
图2为本申请实施例提供的一种电子设备的软件架构示意图;
图3为本申请实施例提供的一种电子设备显示的界面的示意图;
图4为本申请实施例提供的另一种电子设备显示的界面示意图;
图5a-图5b为本申请实施例提供的一组设置界面的示意图;
图6a-图6b为本申请实施例提供的一组电子设备显示的界面的示意图;
图7a-图7b为本申请实施例提供的另一组电子设备显示的界面的示意图;
图8a-图8b为本申请实施例提供的另一组设置界面的示意图;
图9a-图9b为本申请实施例提供的另一组设置界面的示意图;
图10a-图10d为本申请实施例提供的一系列的电子设备显示的界面的示意图;
图11a-图11b为本申请实施例提供的另一组电子设备显示的界面的示意图;
图12为本申请实施例提供的另一种电子设备显示的界面的示意图;
图13a-图13e为本申请实施例提供的另一组电子设备显示的界面的示意图;
图14-图19为本申请实施例提供的一系列的电子设备显示的界面的示意图;
图20-图23为本申请实施例提供的一系列的通知消息的处理方法流程图;
图24-图25为本申请实施例提供的两种电子设备的结构示意图。
具体实施方式
下面将结合本实施例中的附图,对本实施例中的技术方案进行描述。其中,在本实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
本实施例提供的通知消息的处理方法可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备上,本实施例对电子设备的具体类型不作任何限制。
示例性的,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块130,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器 180L,骨传导传感器180M等。
可以理解的是,本实施例示意的结构并不构成对电子设备100的具体限定。在另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总 线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块130用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块130可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块130可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块130为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块130与处理器110。电源管理模块141接收电池142和/或充电管理模块130的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块130也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通 信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯系统(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,和/或IR技术等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED), 有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于骨传导传感器180M获取的声部振动骨块的 振动信号,解析出语音信号,实现语音功能。应用处理器可以基于骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
图2是本实施例的电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
此处结合处理通知消息的场景,以Android为例,示例性说明电子设备100的软件以及硬件的工作流程。
当软件提供商需要向用户发送通知消息时,软件提供商的服务器将该通知消息和待通知用户的电子设备的标识发送给Android通知服务器(该通知服务器由Google提供或者由电子设备的厂商提供)。通知服务器将该通知消息发送给待通知的电子设备。电子设备的通知管理器根据电子设备的当前设置,通过显示屏194对该通知消息进行显示通知,通过音频模块170中的扬声器170A对该通知消息进行声音通知,或者通过马达191对该通知消息进行振动提示等。
示例性的,图3示出了具有图1所示的硬件结构和图2所示的软件结构的电子设备100的 触摸屏上显示的一个界面300,该触摸屏可以包括显示屏194和触控面板。其中,界面用于显示控件,控件是一种图形用户界面(graphical user interface,GUI)元素,也是一种软件组件,包含在软件中,控制着该软件处理的数据以及关于这些数据的交互操作,用户可以通过直接操作(direct manipulation)来与控件交互,从而对软件的有关信息进行读取或者编辑。一般而言,控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。
如图3所示,该界面300中可以包括状态栏303、可隐藏的导航栏306、时间和天气Widget,还有多个应用程序(application,App)的图标例如微博图标304、支付宝图标305、相机图标302以及微信图标301等。其中,状态栏303中可以包括运营商的名称(例如中国移动)、时间、Wi-Fi图标、信号强度和当前的剩余电量。导航栏306中可以包括后退(back)键图标、主屏幕键图标和前进键图标等。此外,可以理解的是,在其他一些实施例中,状态栏303中还可以包括蓝牙图标、移动网络(例如,4G)、闹钟图标和外接设备图标等。还可以理解的是,在其他一些实施例中,界面300中还可以包括Dock栏,Dock栏中可以包括常用的应用程序的图标等。
在其他一些实施例中,该电子设备100还可以包括主屏幕键。该主屏幕键用于根据用户的操作,将触摸屏上显示的GUI返回到主屏幕。在本其他一些实施例中,主屏幕键还可以集成指纹传感器,这样用户可以在按下主屏幕键的时候,电子设备随之进行指纹采集,进而对用户身份进行确认。
当电子设备100检测到用户的手指(或触控笔等)针对界面300上某一应用程序图标的触摸操作后,响应于该触摸操作,电子设备可以打开与该应用程序图标对应的应用程序的界面,从而在前台运行该应用程序,在触摸屏上显示该应用程序。例如,当电子设备检测到用户的手指触摸图3上的游戏图标302的操作后,响应于用户的手指307触摸游戏图标302的操作,参见图4,电子设备在前台运行游戏应用程序,显示游戏界面308。
以下将以具有图1和图2所示结构的手机为电子设备100为例,对以下实施例提供的方案进行具体阐述。
当电子设备前台正在运行一个应用程序时,若前台应用程序(即电子设备触摸屏上当前正在显示的应用程序)或电子设备上的其他应用程序产生了通知消息(notification),则电子设备需要对该通知消息进行处理。其中,该通知消息为本领域技术人员可以理解和所知的对象,例如在Andriod系统中,通知消息可以包括图标、标题、详细文本和通知操作等。一般来说电子设备对通知消息可以进行如下处理:例如,将通知消息显示在状态栏或者通知栏,或者以浮动通知的形式显示在触摸屏的上方;又例如,以声音提示、振动提示的方式来呈现该通知消息;又例如,以弹出提示框的方式来呈现该通知消息;又例如,对该通知消息不进行任何提示或显示等。其中,电子设备中的应用程序可以包括系统原生的应用程序和第三方开发的应用程序。
本实施例提供了一种通知消息的处理方法,当电子设备接收(或检测)到通知消息时,电子设备可以根据触摸屏上显示的应用程序对该通知消息进行处理,以尽量不干扰到该应用程序的正常运行。
在一些实施例中,电子设备上的每个应用程序可以分别对应有第一通知类型。该第一通知类型可以为当该应用程序显示在前台时,电子设备对产生的通知消息可以采 用的通知类型。该通知消息可以是该前台显示的应用程序产生的,也可以是电子设备上的其他应用程序产生的。第一通知类型可以包括显示通知类型、声音通知类型、振动通知类型、角标通知类型、不通知的通知类型、不采用横幅通知、不采用声音通知等类型中的一种或多种。其中,显示通知类型可以包括横幅显示通知类型、弹出窗口显示通知类型、全屏显示通知类型(例如来电时的通知类型)、左侧显示通知类型或右侧显示通知类型等。该角标通知类型是指在该应用程序的图标的边角上显示消息条数的标记,该角标通知类型可以是在应用程序的应用界面上(例如左上角或右上角)显示的应用程序的图标和标记,也可以是在桌面上显示的应用程序的图标和标记。
其中,应用程序的第一通知类型可以是应用程序的开发商预设的或者电子设备的系统默认的。或者,参见图5a和图5b,应用程序的第一通知类型也可以是用户通过通知设置界面设置的。如图5a所示,通知设置界面上包括应用程序对应的设置控件,当电子设备接收到用户点击微信对应的设置控件501时,触摸屏上可以显示如图5b所示的针对微信的具体的通知设置界面。在如图5b所示的通知设置界面上,用户可以设置或修改微信显示在前台时电子设备对产生的通知消息的通知类型。另外,如图5a所示,通知设置界面上还可以包括用于添加应用程序的控件502,以便于用户添加和设置更多的应用程序对应的第一通知类型。
当电子设备接收到第二应用程序产生的通知消息时,可以采用前台第一应用程序的第一通知类型对通知消息进行处理。其中,第二应用程序可以与第一应用程序相同或不同。
例如,第一应用程序的第一通知类型为声音通知类型。若电子设备在前台显示第一应用程序时,接收到第二应用程序产生的通知消息,则电子设备以第一通知类型中的声音通知类型对产生的通知消息进行通知,而不采用声音以外的其他通知类型(例如横幅、振动等)进行通知。
示例性的,第一应用程序为游戏应用程序,参见图6a,若电子设备在前台显示该游戏应用程序的过程中接收到了微信通知消息,则电子设备可以通过声音通知类型通知该微信通知消息,例如电子设备可以“滴”一声以提示用户产生了通知消息,或者语音通知“您收到一条消息”,或者语音通知“收到微信通知消息”等。在本实施例中,前台显示应用程序是指前台显示应用程序的界面。
又例如,第一应用程序的第一通知类型为不采用横幅通知类型。若电子设备在前台显示第一应用程序时接收到通知消息,则根据第一应用程序的第一通知类型,电子设备不采用横幅通知类型对产生的通知消息进行处理,可以采用横幅通知类型以外的通知类型(例如声音、振动)对产生的通知消息进行处理。
示例性的,第一应用程序为游戏应用程序,若电子设备在前台显示该游戏应用程序时接收到了微信通知消息,则电子设备可以通过振动或声音等通知类型提醒用户接收到了通知消息,而不通过横幅显示的方式进行处理。
又例如,第一应用程序的第一通知类型为不通知。若电子设备在前台运行第一应用程序时接收到通知消息,则根据第一应用程序的第一通知类型,电子设备不产生的通知消息进行通知,即电子设备屏蔽所有通知消息。
示例性的,第一应用程序为游戏应用程序,若电子设备在前台运行该游戏应用程 序时接收到微信通知消息,则电子设备在第一应用程序为前台应用程序时不对该微信通知消息进行通知。
在一些实施例中,在电子设备前台退出第一应用程序后,电子设备可以对第一应用程序为前台应用程序时不通知的通知消息进行通知。其中,电子设备前台退出第一应用程序可以是电子设备返回到桌面(例如,用户点击了主触摸屏键),或者电子设备返回到在使用第一应用程序之前使用的另一应用程序的应用界面(例如,用户点击了回退按键)。
示例性的,若第一应用程序为游戏应用程序,第一应用程序的第一通知类型为不通知,电子设备在前台显示该游戏应用程序时接收到微信通知消息,则参见图6b,在前台退出第一应用程序之后,电子设备可以通知该微信通知消息600。
在另一些实施例中,电子设备上的不同应用程序可以具有不同的优先级,电子设备可以根据显示在前台的第一应用程序的第一通知类型,以及第一应用程序与产生通知消息的第二应用程序的优先级,确定对通知消息的通知类型。例如,当第一应用程序的第一通知类型为不通知,但产生通知消息的第二应用程序的优先级高于第一应用程序的优先级时,电子设备在第一应用程序显示在前台时可以通知第二应用程序产生的通知消息。示例性的,参见图7a-7b,第一应用程序为游戏应用程序,第二应用程序为微信,若电子设备在前台显示游戏应用程序时接收到微信通知消息,且微信的优先级高于游戏,则电子设备可以通知该微信通知消息700。又例如,当第一应用程序的第一通知类型为不通知,第二应用程序的优先级低于或者等于第一应用程序的优先级时,电子设备在第一应用程序显示在前台时不对第二应用程序产生的通知消息进行通知。
另外,电子设备上的每个应用程序还可以分别对应有第二通知类型。第二通知类型为当该应用程序产生通知消息时电子设备可以采用的通知类型。第二通知类型可以包括显示、声音、振动或角标等通知类型中的一种或多种。其中,应用程序的第二通知类型可以是应用程序的开发商预设的或者电子设备的系统预设的。或者,参见图8a和图8b,应用程序的第二通知类型也可以是用户在通知中心设置的通知类型。如图8a所示,通知中心的界面上包括设置控件801,当电子设备接收到用户点击微信对应的设置控件801时,电子设备可以显示如图8b所示的设置界面。在如图8b所示的设置界面上,用户可以设置或修改微信在产生通知消息时电子设备可以采用的通知类型。另外,如图8a所示,通知设置界面上还可以包括添加控件802,以便于用户添加和设置更多的应用程序对应的第二通知类型。
在另一些实施例中,当电子设备接收到通知消息时,电子设备可以结合前台第一应用程序的第一通知类型和产生通知消息的第二应用程序的第二通知类型,确定该通知消息的通知类型。
比如,当前台应用程序为第一应用程序,电子设备接收到第二应用程序产生的通知消息时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的第一通知类型的交集,该交集可称为第三通知类型,并采用第三通知类型对该通知消息进行处理。
例如,参见表1,第一应用程序的第一通知类型为声音通知类型;第二应用程序 的第二通知类型包括声音通知类型和横幅通知类型。当第一应用程序显示在前台且电子设备接收到第二应用程序产生的通知消息时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的第一通知类型的交集为声音通知类型,即第三通知类型为声音通知类型,则电子设备可以采用声音通知类型对第二应用程序产生的通知消息进行通知。
表1
Figure PCTCN2018101982-appb-000001
又例如,参见表2,第一应用程序的第一通知类型为声音通知类型,第二应用程序的第二通知类型包括振动通知类型和横幅通知类型。当第一应用程序显示在前台且电子设备接收到第二应用程序产生的通知消息时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的第一通知类型的交集为空,因而电子设备不对第二应用程序产生的通知消息进行通知。
表2
Figure PCTCN2018101982-appb-000002
又例如,参见表3,第一应用程序的第一通知类型包括声音通知类型和横幅通知类型,第二应用程序的第二通知类型包括振动通知类型和横幅通知类型。当第一应用程序显示在且电子设备接收到第二应用程序产生的通知消息时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的第一通知类型的交集为横幅通知类型,则电子设备可以采用横幅通知类型对该通知消息进行通知。
表3
Figure PCTCN2018101982-appb-000003
示例性的,参见图7a-图7b,当第一应用程序为游戏应用程序,第二应用程序为微信时,电子设备在前台显示游戏应用程序并接收到微信通知消息后,可以通过横幅通知类型对该微信通知消息进行通知。
此外,当电子设备上的应用程序对应第一通知类型和第二通知类型时,在一种情况下,应用程序的第一通知类型还可以为所有通知类型。
例如,参见表4,第一应用程序的第一通知类型为所有通知类型,第二应用程序的第二通知类型包括振动通知类型和横幅通知类型,当第一应用程序为前台应用程序且电子设备接收到第二应用程序产生的通知消息时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的第一通知类型的交集为第二通知类型中的所有通知 类型即振动通知类型和横幅通知,则电子设备采用振动通知类型和横幅通知类型对第二应用程序产生的通知消息进行通知。
表4
Figure PCTCN2018101982-appb-000004
又例如,参见表5,第一应用程序的第一通知类型为不通知,第二应用程序的第二通知类型包括振动通知类型和横幅通知类型,当第一应用程序显示在前台且电子设备接收到第二应用程序产生的通知消息时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的第一通知类型的交集为空,因而电子设备不对第二应用程序产生的通知消息进行通知。
表5
Figure PCTCN2018101982-appb-000005
在另一些实施例中,参见表6,当电子设备上的应用程序具有优先级时,若第一应用程序的第一通知类型为不通知,且产生通知消息的第二应用程序的优先级高于第一应用程序的优先级,电子设备在第一应用程序显示在前台时以第二应用程序的第二通知类型对第二应用程序产生的通知消息进行处理。示例性的,参见图7a-图7b,第一应用程序为游戏,第二应用程序为微信,微信的第二通知类型为横幅通知,若电子设备在前台显示游戏应用程序时接收到微信通知消息,且微信的优先级高于游戏,则电子设备可以采用微信的第二通知类型中的横幅通知类型对该微信通知消息700进行显示通知。
表6
Figure PCTCN2018101982-appb-000006
此外,若第一应用程序的第一通知类型为不通知,第二应用程序的优先级低于或者等于第一应用程序的优先级,则无论第二应用程序的第二通知类型是什么,在前台显示第一应用程序时,电子设备均不通知第二应用程序产生的通知消息。
其中,应用程序的优先级可以是系统预设的,或者也可以是用户通过优先级设置界面设置的。参见图9a,电子设备可以设置每个优先级别分别对应的一个或多个应用程序。其中,图9a所示的设置界面上可以包括优先级设置控件900,用于添加或删除该设置控件900对应的优先级别中包括的应用程序;图9a所示的设置界面上还可以包括优先级删除控件901,用于删除该删除控件901对应的优先级别;图9a所示的设置 界面上还可以包括添加优先级别控件902,用于添加新的优先级别。
在一些实施例中,参见图9b,电子设备可以设置某个应用程序的优先级高于另一个应用程序,或者设置某个应用程序的优先级低于另一个应用程序。其中,图9b所示的设置界面上可以包括交换控件、修改控件和删除控件。示例性的,在图9b中,“游戏高于微信”这一优先级关系对应的交换控件903可以用于交换游戏和微信的优先级;这一优先级关系对应的修改控件904可以用于对这一优先级关系进行修改,例如修改为“游戏、视频应用程序高于微信”;这一优先级关系对应的删除控件905可以用于删除该优先级关系。此外,如图9b所示,设置界面上可以包括控件906和控件907,控件906用于添加某个应用程序的优先级高于另一个应用程序的优先级关系,控件907用于添加某个应用程序的优先级低于另一个应用程序的优先级关系。
在一些实施例中,无论第一应用程序的第一通知类型是否包括第二应用程序的第二通知类型中的所有通知类型,即不管电子设备在前台显示第一应用程序时,是否能以第二应用程序的第二通知类型中的所有通知类型,对第二应用程序产生的通知消息1进行处理,电子设备在前台退出第一应用程序后,均不再对该通知消息1进行处理。
在另一些实施例中,第一应用程序的第一通知类型不包括第二应用程序的第二通知类型中的所有通知类型,即电子设备在前台显示第一应用程序时,未能以第二应用程序的第二通知类型中的所有通知类型,对第二应用程序产生的通知消息1进行处理。在前台退出第一应用程序后,电子设备可以以第四通知类型中的所有通知类型对通知消息1进行处理。其中,第四通知类型为第二应用程序的第二通知类型中,除第三通知类型以外的其他通知类型。即,第四通知类型为第二应用程序的第二通知类型中,电子设备在前台显示第一应用程序时未对通知消息1采用的通知类型。也就是说,在前台显示第一应用程序时,电子设备可以针对第二应用程序的第二通知类型中没有执行的第四通知类型进行缓存,并在前台退出第一应用程序后采用第四通知类型进行处理,对于在前台显示第一应用程序时已经执行过的通知类型,在前台退出第一应用程序后不再执行。这样,电子设备在前台显示第一应用程序时以及前台退出第一应用程序后,可以以完整的第二应用程序的第二通知类型对第二应用程序在前台显示第一应用程序时产生的通知消息1进行处理。
示例性的,参见上述表3以及图6a-6b,第一应用程序为游戏,第二应用程序为微信,电子设备在前台显示游戏应用程序时仅以横幅通知类型(即第三通知类型)通知了产生的微信通知消息1,并未以微信的第二通知类型中的振动通知类型(即第四通知类型)通知该微信通知消息1;电子设备在退出游戏后,可以通过振动通知类型对该微信通知消息1进行通知。
再示例性的,参见表7,第一应用程序的第一通知类型包括声音通知类型和角标通知类型,第二应用程序的第二通知类型包括振动通知类型、横幅通知类型和角标通知类型。当第一应用程序为游戏,第二应用程序为微信时,电子设备在前台显示游戏并在接收到微信通知消息后,仅通过角标通知类型对该微信通知消息进行通知,并未以微信的第二通知类型中振动通知类型和横幅通知类型对该微信通知消息进行通知。电子设备在退出游戏后可以通过微信的第二通知类型中横幅通知类型和振动通知类型对该微信通知消息进行通知。该横幅通知类型和振动通知类型即为第四通知类型。
表7
Figure PCTCN2018101982-appb-000007
在另一些实施例中,若第一应用程序的第一通知类型不包括第二应用程序的第二通知类型中的所有通知类型,则在前台退出第一应用程序后,电子设备可以以第二应用程序的第二通知类型中的所有通知类型,对第二应用程序在前台显示第一应用程序时产生的通知消息进行处理。
示例性的,参见上述表3,以及图6a-6b,第一应用程序为游戏,第二应用程序为微信,电子设备在前台显示游戏时仅以横幅通知类型通知了产生的微信通知消息,并未以微信的第二通知类型中的振动通知类型通知该微信通知消息;电子设备在退出游戏后可以通过微信的第二通知类型中振动通知类型和和横幅通知类型对该微信通知消息进行通知。
在另一些实施例中,若第一通知类型不包括第二应用程序的第二通知类型中的所有通知类型,则在电子设备前台退出第一应用程序后,电子设备可以以预设的通知类型通知第二应用程序在前台应用程序为第一应用程序时产生的通知消息。
示例性的,参见上述表3,第一应用程序为游戏应用程序,第二应用程序为微信,预设的通知类型为声音通知类型、振动通知类型和角标通知类型,电子设备在前台显示游戏应用程序时接收到微信通知消息后仅以横幅通知类型通知了产生的微信通知消息,并未以微信的第二通知类型中的振动通知类型通知该微信通知消息;电子设备在退出游戏后可以通过预设的通知类型中角标通知类型、声音通知类型以及振动通知类型通知该微信通知消息。
在另一些实施例中,第一应用程序的第一通知类型包括通知消息的类型和具体的通知类型的对应关系,不同消息类型可以对应不同的通知类型。例如文字消息类型对应的通知类型包括声音和横幅;图片消息类型(即包括图标的消息类型)对应的通知类型包括声音和振动。当电子设备接收到第二应用程序产生的通知消息时,电子设备可以根据前台第一应用程序的第一通知类型中该种类型的通知消息对应的通知类型,和产生通知消息的第二应用程序的第二通知类型,确定该通知消息的通知类型。
在另一些实施例中,电子设备上的应用程序对应的第一通知类型与时间有关,同一应用程序在不同时间段对应的第一通知类型可以不同。当第一应用程序显示在前台时,电子设备可以根据当前时间段内第一应用程序对应的第一通知类型和产生通知消息的第二应用程序的第二通知类型,确定该通知消息的通知类型。示例性的,第一应用程序在每天的22:00-06:00这一时间段内对应的第一通知类型为不通知,当第一应用程序在该时间段内为前台应用程序时,则电子设备不对第二应用程序产生的通知消息进行通知。再示例性的,第一应用程序在每天的06:00-22:00这一时间段内对应的第一通知类型包括声音通知类型和横幅通知类型,当第一应用程序在该时间段内显示在前台时,电子设备采用声音通知类型和横幅通知类型对第二应用程序产生的通知消息 进行通知。
一般地,电子设备上的应用程序是一个较大的程序,可以包括多个代码段,每个代码段可以是应用程序这个大程序中的一部分代码,由一个或多个语句块组成,用于负责完成某项任务。其中,划分方式不同,每个应用程序划分得到的代码段的种类和数量也不同。以游戏应用程序为例,在一种划分方式中,游戏应用程序可以包括加载代码段、运行代码段和退出代码段等;在另一种划分方式中,游戏应用程序可以包括作战代码段、商店购物代码段、角色设定程序、任务设定程序和游戏设置代码段等。
在一些实施例中,与每个应用程序对应一组第一通知类型不同,应用程序的每个代码段可以对应一组第一通知类型。在一些方案中,当电子设备在运行前台第一应用程序的某一代码段时,若接收到通知消息,则电子设备采用当前运行的代码段对应的第一通知类型对该通知消息进行处理。
在另一些方案中,当电子设备接收到通知消息时,可以结合前台第一应用程序当前运行的代码段对应的第一通知类型和产生通知消息的第二应用程序的第二通知类型,确定对通知消息采用的通知类型。即电子设备可以结合前台第一应用程序当前的运行状态和运行情况以及产生通知消息的第二应用程序的第二通知类型,确定对通知消息采用的通知类型。
具体的,当前台显示第一应用程序,当前正在运行第一应用程序的代码段1,且电子设备接收到第二应用程序产生的通知消息1时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的代码段1对应的第一通知类型的交集,该交集可以称为代码段1对应的第三通知类型,并采用该第三通知类型对该通知消息1进行处理;当前正在运行第一应用程序的代码段2,且电子设备接收到第二应用程序产生的通知消息2时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的代码段2对应的第一通知类型的交集(即代码段2对应的第三通知类型),并采用该交集中的通知类型对该通知消息2进行处理。
在另一些实施例中,电子设备在运行第一应用程序的过程中可以包括多个界面(或画面),不同界面可以对应不同的第一通知类型。例如,当第一应用程序为游戏应用程序时,第一应用程序的运行过程中可以包括加载界面、作战界面和商店购物界面等。在一些方案中,当电子设备在显示前台第一应用程序的某一界面时,若接收到通知消息,则电子设备采用当前显示的界面对应的第一通知类型对该通知消息进行处理。
在另一些方案中,当电子设备接收到通知消息时,电子设备可以结合前台第一应用程序当前显示的界面对应的第一通知类型和产生通知消息的第二应用程序的第二通知类型,确定对通知消息采用的通知类型。即电子设备可以结合前台第一应用程序当前的显示内容和运行情况以及产生通知消息的第二应用程序的第二通知类型,确定对通知消息采用的通知类型。
具体的,当前台显示第一应用程序,当前正在显示第一应用程序的界面1,且电子设备接收到第二应用程序产生的通知消息1时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的界面1对应的第一通知类型的交集,该交集可以称为界面1对应的第三通知类型,并采用该第三通知类型对该通知消息1进行处理;在当前正在显示第一应用程序的界面2,且电子设备接收到第二应用程序产生的通知消息2 时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的界面2对应的第一通知类型的交集(即界面2对应的第三通知类型),并采用该交集中的通知类型对该通知消息2进行处理。
在另一些实施例中,电子设备在运行第一应用程序的过程中可以包括多种状态(或模式),不同状态可以对应不同的第一通知类型。例如,当第一应用程序为游戏应用程序时,第一应用程序的运行过程中可以包括加载状态、作战状态、商店购物状态和角色设定状态等。在一些方案中,当电子设备在前台第一应用程序的某一状态下时,若接收到通知消息,则电子设备采用当前状态对应的第一通知类型对该通知消息进行处理。
在另一些方案中,当电子设备接收到通知消息时,电子设备可以结合前台第一应用程序当前状态对应的第一通知类型和产生通知消息的第二应用程序的第二通知类型,确定对通知消息采用的通知类型。即电子设备可以结合前台第一应用程序当前的运行情况以及产生通知消息的第二应用程序的第二通知类型,确定对通知消息采用的通知类型。
具体的,当前台应用程序为第一应用程序,电子设备接收到第二应用程序产生的通知消息时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序当前所处的状态1对应的第一通知类型的交集,该交集可以称为状态1对应的第三通知类型,并采用该第三通知类型对该通知消息1进行处理;在第一应用程序当前所处于状态2,且电子设备接收到第二应用程序产生的通知消息2时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的状态2对应的第一通知类型的交集(即状态2对应的第三通知类型),并采用该交集中的通知类型对该通知消息2进行处理。
在另一些实施例中,电子设备在运行第一应用程序的过程中可以包括多个场景,不同场景可以对应不同的第一通知类型。例如,当第一应用程序为游戏应用程序时,第一应用程序的运行过程中可以包括加载场景、主界面场景、作战场景和商店购物场景等。在一些方案中,当电子设备在前台第一应用程序的某一场景下时,若接收到通知消息,则电子设备采用当前场景对应的第一通知类型对该通知消息进行处理。
在另一些方案中,当电子设备接收到通知消息时,电子设备可以结合前台第一应用程序当前所处的场景对应的第一通知类型和产生通知消息的第二应用程序的第二通知类型,确定对通知消息采用的通知类型。即电子设备可以结合前台第一应用程序当前所处的场景和运行情况以及产生通知消息的第二应用程序的第二通知类型,确定对通知消息采用的通知类型。
具体的,当前台应用程序为第一应用程序,电子设备接收到第二应用程序产生的通知消息时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序当前所处的场景1对应的第一通知类型的交集,该交集可以称为场景1对应的第三通知类型,并采用该第三通知类型对该通知消息1进行处理;在第一应用程序当前所处于场景2,且电子设备接收到第二应用程序产生的通知消息2时,电子设备可以确定第二应用程序的第二通知类型与第一应用程序的场景2对应的第一通知类型的交集(即场景2对应的第三通知类型),并采用该交集中的通知类型对该通知消息2进行处理。
以下将以电子设备在前台运行第一应用程序的过程中可以包括多个场景,不同场 景可以对应不同的第一通知类型为例进行说明。对于电子设备在前台运行第一应用程序的过程中包括多个代码段、界面或状态的情况,与电子设备在前台运行第一应用程序的过程中包括多个场景的情况类似,本实施例将不再赘述。
在一种方案中,第一应用程序的代码中预设有不同场景与不同第一通知类型的对应关系,第一应用程序可以在运行过程中实时将当前场景对应的第一通知类型加载到第一应用程序的上下文中,电子设备可以快速、高效地从第一应用程序的上下文中获知当前场景的第一通知类型,从而采用第一通知类型对通知消息进行处理;或者,根据当前场景的第一通知类型和第二应用程序的第二通知类型确定当前场景对应的第三通知类型,从而采用第一通知类型对通知消息进行处理。在该种方案中,电子设备不需要在确定前台应用程序或确定前台应用程序的当前场景后再根据前台应用程序确定通知类型,而可以直接根据上下文中的通知类型对通知消息进行处理,因而电子设备系统控制方面的实现较为简单。
在另一种方案中,第一应用程序当前场景与当前场景对应的第一通知类型也可以保存在上下文以外的其他地方,例如保存在flash或者硬盘中,以便于电子设备可以从flash或硬盘中获知当前场景的第一通知类型,从而采用第一通知类型对通知消息进行处理;或者,根据当前场景的第一通知类型和第二应用程序的第二通知类型确定当前场景对应的第三通知类型,从而采用第一通知类型对通知消息进行处理。
在另一种方案中,电子设备上保存有第一应用程序的不同场景与不同第一通知类型的对应关系,电子设备可以从第一应用程序处实时获知当前场景,根据当前场景获取当前场景对应的第一通知类型,从而采用第一通知类型对通知消息进行处理;或者,根据当前场景的第一通知类型和第二应用程序的第二通知类型确定当前场景对应的第三通知类型,从而采用第一通知类型对通知消息进行处理。
例如,第一应用程序为游戏,游戏场景可以包括加载场景、主界面场景、作战场景和商店购物场景,各场景与第一通知类型的对应关系可以参见如下表8。
表8
Figure PCTCN2018101982-appb-000008
以下,将根据表8对电子设备采用第一应用程序的不同场景对应的第一通知类型,对电子设备接收到的通知消息进行不同的处理进行说明。
示例性的,第一应用程序为游戏,第二应用程序为短信,在表8所示情况下,若电子设备在如图10a所示的加载场景下接收到短信通知消息1,则电子设备采用加载场景的第一通知类型包括的声音通知类型和振动通知类型通知短信通知消息1。
再示例性,第一应用程序为游戏,第二应用程序为微信,在表8所示情况下,若电子设备在如图10b所示的主界面场景下接收到微信通知消息1,则电子设备采用主界面场景的第一通知类型包括的横幅通知类型、振动通知类型通知微信通知消息1。
以下,对电子设备根据第一应用程序的当前场景对应的第一通知类型和第二应用程序的第二通知类型确定第三通知类型,并采用第三通知类型处理电子设备接收到的 通知消息进行说明。
示例性的,第一应用程序为游戏,第二应用程序为微信,微信的第二通知类型为振动通知类型、横幅通知类型和角标通知类型,在表8所示情况下,若电子设备在如图10a所示的加载场景下接收到微信通知消息1,则加载场景对应的第三通知类型为振动通知类型,电子设备在加载场景下以振动通知类型通知微信通知消息1。
在图10a所示的加载场景之后,电子设备可以进入如图10b所示的主界面场景。若电子设备在如图10b所示的主界面场景下接收到微信通知消息2(或其他通知消息例如短消息等),则主界面场景对应的第三通知类型为振动通知类型和横幅通知类型,则如图10b所示电子设备在主界面场景下以横幅1001和振动通知类型通知微信通知消息2。
当用户点击图10b中的作战模式或排位赛之后,电子设备可以进入如图10c所示的游戏的作战场景。若电子设备在如图10c所示的作战场景下接收到微信通知消息3,则作战场景对应的第三通知类型为空,即电子设备在作战场景下不对该微信通知消息3进行通知。
当用户点击图10c中的商店控件1002时,电子设备可以进入如图10d所示的商店购物场景。若电子设备在如图10d所示的商店购物场景下接收到微信通知消息4,则商店购物场景对应的第三通知类型为角标通知类型,如图10d所示,电子设备在购物场景下以角标1003的方式对微信通知消息4进行通知。
又例如,第一应用程序为视频播放器,视频播放器的场景可以包括播放视频的场景和未播放视频的场景,各场景与第一通知类型的对应关系可以参见如下表9。
表9
场景 播放视频的场景 未播放视频的场景
第一通知类型 振动通知类型 所有通知类型
示例性的,第一应用程序为游戏,第二应用程序为微信,微信的第二通知类型为振动通知类型和横幅通知类型,在表9所示情况下,若电子设备在如图11a所示的未播放视频的场景下接收到微信通知消息,则未播放视频场景对应的第三通知类型为振动通知类型和横幅通知类型,电子设备在如图11a所示的未播放视频场景下以横幅通知类型和振动通知类型进行通知。
当用户点击选择播放某一视频时,电子设备可以进入如图11b所示的播放视频场景。若电子设备在如图11b所示的播放视频的场景下接收到微信通知消息,则播放视频场景对应的第三通知类型为振动通知类型,电子设备在播放视频场景下根据振动通知类型对产生的微信通知消息进行通知。
又例如,第一应用程序为视频播放器,视频播放器的场景可以包括全屏播放场景、非全屏播放场景,各场景与第一通知类型的对应关系可以参见如下表10。
表10
场景 全屏播放场景 非全屏播放场景
第一通知类型 不通知 振动通知类型
又例如,第一应用程序为微信,微信的场景可以包括语音输入场景、文字输入场景、显示朋友圈场景和发朋友圈场景,各场景与第一通知类型的对应关系可以参见如下表11。
表11
Figure PCTCN2018101982-appb-000009
在一些实施例中,若电子设备在第一应用程序的场景1下接收到第二应用程序产生的通知消息1,且场景1对应的第三通知类型不包括第二应用程序的第二通知类型中的所有通知类型,即电子设备在第一应用程序的场景1下,未能以第二应用程序完整的第二通知类型对通知消息1进行处理,则电子设备在前台退出第一应用程序之前的其他场景下,可以不再对该通知消息1进行处理。
示例性的,在图10a所示场景下,第一应用程序为游戏应用程序,第二应用程序为微信,微信的第二通知类型包括振动通知类型、横幅通知类型和角标通知类型,在表8所示情况下,若电子设备在如图10a所示的加载场景下接收到微信通知消息1,则加载场景对应的第三通知类型为振动通知类型,电子设备在加载场景下通过振动通知类型对微信通知消息1进行通知。在电子设备退出游戏应用程序之前的主界面场景、作战场景和购物场景等场景下不再对该微信通知消息1进行处理。
在另一些实施例中,若电子设备在第一应用程序的场景1下接收到第二应用程序产生的通知消息1,且场景1对应的第三通知类型不包括第二应用程序的第二通知类型中的所有通知类型,则电子设备在前台退出第一应用程序之后,可以以第四通知类型对该通知消息1进行处理。其中,第四通知类型为第二应用程序的第二通知类型中,电子设备在前台显示第一应用程序时未对通知消息1采用的通知类型。
仍以如10a所示场景为例,第一应用程序为游戏应用程序,第二应用程序为微信,微信的第二通知类型包括振动通知类型、横幅通知类型和角标通知类型,在表8所示情况下,若电子设备在如图10a所示的加载场景下接收到微信通知消息1,则加载场景对应的第三通知类型为振动通知类型,电子设备在加载场景下通过振动通知类型对微信通知消息1进行通知。在退出游戏应用程序后,如图12所示,电子设备可以以微信的第二通知类型中除的通知类型中,电子设备在前台显示游戏时未对通知消息1执行的横幅1201和角标1202的通知类型对微信通知消息1进行通知。其中,该横幅1201和角标1202的通知类型可以称为第四通知类型。
在另一些实施例中,若电子设备在第一应用程序的场景1下接收到第二应用程序产生的通知消息1,且场景1对应的第三通知类型不包括第二应用程序的第二通知类型中的所有通知类型,则电子设备在前台退出第一应用程序之后,可以以第二应用程序的第二通知类型中的所有通知类型,通知第二应用程序在前台第一应用程序的场景1下产生的通知消息1。
仍以如10a所示场景为例,在退出游戏应用程序后,电子设备可以以微信的第二通知类型中的振动、横幅和角标的通知类型对微信通知消息1进行通知。
在另一些实施例中,若电子设备在第一应用程序的场景1下接收到第二应用程序产生的通知消息1,且场景1对应的第三通知类型不包括第二应用程序的第二通知类型中的所有通知类型,则电子设备在前台退出第一应用程序之后,可以以预设的通知类型,通知第二应用程序在前台第一应用程序的场景1下产生的通知消息1。
在另一些实施例中,电子设备在第一应用程序的场景1下接收到第二应用程序产生的通知消息1,无论场景1对应的第三通知类型是否包括第二应用程序的第二通知类型中的所有通知类型,电子设备在前台退出第一应用程序后,均不再对该通知消息1进行处理。
在另一些实施例中,电子设备在第一应用程序的场景1接收到第二应用程序产生的通知消息1,且第一应用程序的场景1对应的第三通知类型不包括第二应用程序的第二通知类型中的所有通知类型,则在第一应用程序的场景2下,若场景2对应的第一通知类型与第二应用程序的第二通知类型的交集1包括除交集2以外的第五通知类型,则电子设备可以在场景2中采用第五通知类型对通知消息1进行处理。其中,交集2为电子设备本次在前台显示第一应用程序的过程中,当前场景(即场景2)之前的其他场景(例如场景1)的第一通知类型与第二应用程序的第二通知类型的交集。也就是说,第五通知类型为第二应用程序的第二通知类型中,电子设备本次在前台显示第一应用程序的过程中,在之前场景中未对通知消息1采用的通知类型。
示例性的,第一应用程序为游戏,第二应用程序为微信,微信的第二通知类型包括振动通知类型、横幅通知类型和角标通知类型,在表8所示情况下,若电子设备在如图10a所示的游戏的加载场景下接收到微信通知消息1,则加载场景对应的第三通知类型为振动通知类型,电子设备在加载场景下通过振动通知类型对微信通知消息1进行通知。而后,在如图10b所示的游戏的主界面场景下,由于主界面场景对应的第一通知类型与微信的第二通知类型的交集1(即振动通知类型和横幅通知类型)中包括除交集2(加载场景对应的第一通知类型与微信的第二通知类型的交集,即振动通知类型)以外的横幅通知类型(即主界面场景对应的第五通知类型),因而在主界面场景下,电子设备可以以横幅通知类型通知微信通知消息1。而后,在如图10c所示的游戏的作战场景下,第一通知类型为不通知,因而电子设备不在作战场景下对微信通知消息1进行处理。之后,在如图10d所示的商店购物场景下,由于商店购物场景对应的第一通知类型与微信的第二通知类型的交集1中包括除交集2(加载场景、主界面场景和作战场景对应的第一通知类型与微信的第二通知类型的交集,即振动通知类型和横幅通知类型)以外的角标通知类型(即商店购物场景对应的第五通知类型),因而在商店购物场景下,电子设备可以以角标通知类型通知微信通知消息1。
若第一应用程序的场景1对应的第三通知类型和场景1之后的其他场景分别对应的第五通知类型的集合不包括第二应用程序的第二通知类型中的所有通知类型,即在前台显示第一应用程序时,电子设备针对通知消息1采用的通知类型未包括第二应用程序的第二通知类型中的所有通知类型,则在电子设备前台退出第一应用程序后,可以以第四通知类型处理该通知消息1。其中,该第四通知类型为第二应用程序的第二通知类型中,电子设备在前台显示第一应用程序时未对通知消息1采用的通知类型。
示例性的,第一应用程序为游戏,第二应用程序为微信,微信的第二通知类型包 括振动通知类型、横幅通知类型和角标通知类型,在表12所示情况下,若电子设备在如图13a所示的加载场景下接收到微信通知消息1,则加载场景对应的第三通知类型为振动通知类型,电子设备在加载场景下通过振动通知类型进行通知。在如图13b所示的游戏的主界面场景下,由于主界面场景对应的第一通知类型包括第二通知类型中除振动通知类型(即加载场景对应的第三通知类型)以外的横幅通知类型(即主界面场景对应的第五通知类型),因而在主界面场景下,电子设备可以以横幅1301的方式通知微信通知消息1。在如图13c所示的作战场景下,第一通知类型为不通知,因而电子设备不继续对微信通知消息1进行通知。在如图13d所示的商店购物场景下,第一通知类型为横幅通知类型,不包括第二通知类型中除振动通知类型(即加载场景对应的第三通知类型)和横幅通知类型(即主界面场景对应的第五通知类型)以外的角标通知类型。因而,在商店购物场景下,电子设备不会对微信通知消息1进行处理。参见图13e,在退出游戏后,电子设备可以以角标1302的方式(即第四通知类型)对微信通知消息1进行通知。
表12
Figure PCTCN2018101982-appb-000010
在一些实施例中,若电子设备在前台显示第一应用程序时对通知消息1采用的通知类型未包括第二应用程序的第二通知类型中的所有通知类型,则在前台退出第一应用程序后,电子设备可以以第二应用程序的第二通知类型中的所有通知类型,通知第二应用程序在前台显示第一应用程序时产生的通知消息1。
在其他一些实施例中,若电子设备在前台显示第一应用程序时对通知消息1采用的通知类型未包括第二应用程序的第二通知类型中的所有通知类型,则在前台退出第一应用程序后,电子设备可以以预设的通知类型处理第二应用程序在前台应用程序为第一应用程序时产生的通知消息1。
在另外一些实施例中,当第一应用程序的场景1对应的第三通知类型不包括第二应用程序的第二通知类型中的所有通知类型,但电子设备在前台显示第一应用程序时对通知消息1采用的通知类型包括第二应用程序的第二通知类型中的所有通知类型,则在前台退出第一应用程序后,电子设备可以以第二应用程序的第二通知类型中的所有通知类型,或者以预设的通知类型,处理第二应用程序在第一应用程序的场景1下产生的通知消息1。
在另外一些实施例中,无论电子设备在前台显示第一应用程序时对通知消息1采用的通知类型是否包括第二应用程序的第二通知类型中的所有通知类型,在前台退出第一应用程序后,电子设备均不再对第二应用程序在第一应用程序的场景1下产生的通知消息1进行处理。
在另一些实施例中,第二应用程序产生的通知消息可以包括多种类型,不同类型的通知消息可以对应不同的第二通知类型。例如,文字类型的通知消息、图片类型的通知消息、视频类型的通知消息等。这样一来,在前台应用程序为第一应用程序时, 电子设备可以根据第一应用程序的第一通知类型或者根据第一应用程序的具体场景对应的第一通知类型,结合第二应用程序当前产生的通知消息1的类型所对应的第二通知类型,确定通知消息1的通知类型,此处不予赘述。
在另一些实施例中,第二应用程序产生的通知消息可以包括多个等级,不同等级的通知消息可以对应不同的第二通知类型。例如,重要联系人发送的通知消息的等级较高,或者频繁联系的联系人发送的通知消息的等级较高,或者包含预设关键字的通知消息的等级较高等。这样一来,在前台应用程序为第一应用程序时,电子设备可以根据第一应用程序的第一通知类型或者根据第一应用程序的具体场景对应的第一通知类型,结合第二应用程序当前产生的通知消息1的等级所对应的第二通知类型,确定通知消息1的通知类型,此处不予赘述。
以上是以前台显示的应用程序为一个应用程序为例进行说明的,电子设备上前台显示的应用程序还可以包括n个,n为大于1的整数。电子设备的触摸屏可以划分为多个子屏,每个子屏可以用于显示一个前台应用程序的应用界面。其中,多个子屏之间的排列方式可以不限,例如可以是上下排列,也可以是左右排列,还可以是电子设备触摸屏的中间位置为一个大的子屏,大的子屏周围包括多个小的子屏等,本实施例不予限定。
当前台显示的第一应用程序包括n个应用程序(即A1-An)时,在一些实施例中,对于每个子屏上的显示的每一个第一应用程序Ai(其中,i为1到n中的任意整数),电子设备可以分别采用上述实施例提供的通知消息的处理方法,分别根据每个前台第一应用程序Ai的第一通知类型以及第二应用程序的第二通知类型式,对第二应用程序产生的通知消息进行处理。
示例性的,参见图14,电子设备的触摸屏包括子屏1401和子屏1402,子屏1401上显示的第一应用程序1为游戏,当前场景为游戏的作战场景,子屏1402上显示的第一应用程序2为短信,第二应用程序为微信。游戏的作战场景对应的第一通知类型为不通知,短信的第一通知类型为所有通知类型,微信的第二通知类型为声音通知类型和横幅通知类型。当电子设备接收到微信产生了微信通知消息1时,参见图14,电子设备根据游戏的作战场景对应的第一通知类型和微信的第二通知类型确定不在子屏1401上对微信通知消息1进行通知;电子设备根据短信的第一通知类型和微信的第二通知类型确定在子屏1402上以横幅通知类型通知微信通知消息1,并通过声音通知类型对微信通知消息1进行通知。
在另一种情况下,若游戏的作战场景对应的第一通知类型为横幅通知,则当电子设备接收到微信产生了微信通知消息1时,参见图15,电子设备根据游戏的作战场景对应的第一通知类型和微信的第二通知类型确定在子屏1401上对微信通知消息1进行横幅通知;电子设备根据短信2的第一通知类型和微信的第二通知类型确定以声音通知类型和横幅通知类型对微信通知消息1进行通知。
在另一些实施例中,若第二应用程序的第二通知类型中包括显示通知类型,且电子设备多个前台应用程序的第一通知类型中包括显示通知类型,则电子设备可以在该多个前台应用程序中的一个前台应用程序对应的子屏上进行显示通知。
示例性的,参见图16,电子设备可以为平板电脑,电子设备的触摸屏包括子屏1401、 子屏1402、子屏1403和子屏1404,子屏1401上显示的第一应用程序1为游戏A1,当前场景为游戏A1的作战场景,子屏1402上显示的第一应用程序2为短信A2,子屏1403上显示的第一应用程序3为支付宝A3,子屏1404上显示的第一应用程序4为微信A4,第二应用程序为微信。游戏A1的作战场景对应的第一通知类型为不通知,短信A2的第一通知类型为所有通知类型,支付宝A3的第一通知类型为声音通知类型和横幅通知类型,微信A4的第一通知类型为横幅通知类型,微信的第二通知类型为声音通知类型和横幅通知类型。因此,前台显示的短信A2、支付宝A3和微信A4均支持横幅通知类型(即显示通知类型),因而电子设备可以在短信A2、支付宝A3和微信A4对应的子屏1402、子屏1403和子屏1404中的其中一个子屏上进行横幅通知。
在一种情况下,电子设备可以在多个支持显示通知类型的前台应用程序对应的子屏中,随机选择一个子屏进行显示通知。比如,电子设备可以在子屏1402、子屏1403和子屏1404中随机选择一个子屏进行横幅通知。举例来说,参见图17,电子设备可以在支付宝A3所在的子屏1403上进行横幅通知。
在另一种情况下,电子设备可以在多个支持显示通知类型的前台应用程序中,与通知消息相关的前台应用程序所在的子屏上显示该通知消息。其中,若产生通知消息的第二应用程序与前台第一应用程序Ai(i为1到n中的任意整数),属于同一种应用程序类型,则第二应用程序产生的通知消息与前台第一应用程序Ai相关。例如应用程序类型可以包括即时通信类应用程序、社交类应用程序、视频播放类应用程序等等。或者,若产生通知消息的第二应用程序与前台第一应用程序Ai属于同一个优先级别,则第二应用程序产生的通知消息与前台第一应用程序Ai相关。例如,微信与短信可以属于同一个优先级别,微信通知消息与前台显示的短信应用程序相关。
举例来说,前台显示的游戏A1、短信A2、支付宝A3和微信A4中,与微信通知消息相关的是前台显示的微信A4,因而参见图18,电子设备可以在微信A4所在的子屏1404上进行横幅通知;或者,参见图19中虚线内的部分,电子设备可以在微信A4的应用界面上对该微信通知消息进行显示通知。又例如,前台应用程序包括游戏A1、短信A2、支付宝A3和视频播放器A4,与微信通知消息相关的是同属于即时通信类应用程序的短信A2,因而电子设备可以在短信应用A2所在的子屏1402上进行横幅通知。
在另一些实施例中,若电子设备根据任意一个前台第一应用程序Ai的第一通知类型和第二应用程序的第二通知类型,确定以显示通知类型处理第二应用程序产生的通知消息,则电子设备可以在与第二应用程序的通知消息相关的前台应用程序所在的子屏上进行显示通知。
示例性的,参见图16,电子设备的触摸屏包括子屏1401、子屏1402、子屏1403和子屏1404,子屏1401上显示的第一应用程序1的为游戏A1,当前场景为作战场景,子屏1402上显示的第一应用程序2为短信A2,子屏1403上显示的第一应用程序3为支付宝A3,子屏1404上显示的第一应用程序4为微信A4,第二应用程序为微信。游戏A1的作战场景对应的第一通知类型为不通知,短信A2的第一通知类型为所有通知类型,支付宝应用A3的第一通知类型为声音通知类型,微信A4的第一通知类型为振动通知类型,微信的第二通知类型为声音通知类型和横幅通知类型。可见,前台显示 的短信A2对应的第三通知类型为横幅通知类型。电子设备可以在游戏A1、短信A2、支付宝A3和微信A4中确定与微信通知消息相关的应用为前台微信A4。因而,参见图18,电子设备可以在微信A4所在的子屏1404上进行横幅通知;或者,参见图19中虚线内的部分,电子设备可以在微信A4的应用界面上对该微信通知消息进行显示通知。
当前台显示的第一应用程序包括n个应用程序时,在另一些实施例中,电子设备可以根据所有前台显示第一应用程序A1-An的第一通知类型以及第二应用程序的第二通知类型中,确定第二应用程序产生的通知消息的通知类型。
示例性的,电子设备的触摸屏包括子屏1401和子屏1402,子屏1401上前台显示的第一应用程序1为游戏A1,当前场景为游戏的作战场景,子屏1402上显示的第一应用程序2为短信A2,第二应用程序为微信。游戏A1的作战场景对应的第一通知类型为不通知,短信A2的第一通知类型为所有通知类型,微信的第二通知类型为声音通知类型和横幅通知类型。因此,虽然短信A2的第一通知类型为所有通知类型,但游戏A1的作战场景对应的第一通知类型为不通知,因而电子设备确定不在子屏1401和子屏1402上对微信通知消息1进行通知。
在一种情况下,电子设备可以根据前台第一应用程序A1-An的第一通知类型中,包括的通知类型最少的第一通知类型以及第二应用程序的第二通知类型对第二应用程序产生的通知消息进行处理。
其中,当电子设备根据前台第一应用程序A1-An的第一通知类型中,包括的通知类型最少的第一通知类型以及第二应用程序的第二通知类型,确定需要对第二应用程序产生的通知消息进行显示通知时,可以随机在任意一个子屏上显示该通知消息,或者可以在与该通知消息相关的前台应用所在的子屏上对该通知消息进行显示通知。
示例性的,电子设备的触摸屏包括子屏1401、子屏1402、子屏1403和子屏1404,子屏1401上的前台第一应用程序1为游戏A1,当前场景为游戏的作战场景,子屏1402上的前台第一应用程序2为短信A2,子屏1403上的前台第一应用程序3为支付宝A3,子屏1404上的前台第一应用程序4为微信A4,第二应用程序为微信。游戏A1的作战场景对应的第一通知类型为振动通知类型和角标通知类型,短信A2的第一通知类型为所有通知类型,支付宝A3的第一通知类型为声音通知类型、横幅通知类型和角标通知类型,微信A4的第一通知类型为振动通知类型、角标通知类型和横幅通知类型,微信的第二通知类型为角标通知类型和横幅通知类型。可见,包括的通知类型最少的第一通知类型为游戏A1的作战场景对应的第一通知类型,即振动通知类型和角标通知类型。因而,电子设备根据游戏A1的作战场景对应的第一通知类型和微信的第二通知类型确定通过角标通知类型(即显示通知类型)通知该微信通知消息。具体的,电子设备可以随机在任意一个子屏上显示该微信通知消息,或者电子设备可以在与该微信通知消息相关的微信所在子屏上对该通知消息进行角标通知,或者电子设备可以在与该微信通知消息相关的微信所在子屏的应用界面上对该通知消息进行显示通知。
在另一种情况下,电子设备可以根据前台第一应用程序A1-An的第一通知类型中,与第二应用程序的第二通知类型的交集最少的第一通知类型,以及第二应用程序的第 二通知类型,对第二应用程序产生的通知消息进行处理。
示例性的,电子设备的触摸屏包括子屏1401和子屏1402,子屏1401上显示的第一应用程序1为游戏A1,当前场景为游戏的作战场景,子屏1402上显示的第一应用程序2为短信A2,第二应用程序为微信。游戏A1的作战场景对应的第一通知类型为不通知,短信A2的第一通知类型为所有通知类型,微信的第二通知类型为声音通知类型和横幅通知类型。因此,游戏A1的作战场景对应的第一通知类型与微信的第二通知类型的交集最少,为空集,因而电子设备可以根据游戏A1的作战场景对应的第一通知类型和微信的第二通知类型,确定不对微信通知消息1进行处理,也不在子屏1401和子屏1402上对微信通知消息1进行显示通知。
在另一种情况下,电子设备可以根据前台第一应用程序A1-An的第一通知类型,第二应用程序的第二通知类型,以及通知消息预设的显示位置,对微信通知消息1进行通知。
举例来说,电子设备的触摸屏包括子屏1401和子屏1402,子屏1401上显示的第一应用程序1为游戏A1,当前场景为游戏的作战场景,子屏1402上显示的第一应用程序2为短信A2,第二应用程序为微信。游戏A1的作战场景对应的第一通知类型为不通知,短信A2的第一通知类型为所有通知类型,微信的第二通知类型为声音通知类型和横幅通知类型,微信通知消息对应的预设的显示位置为电子设备触摸屏的顶部。当电子设备接收到微信产生了微信通知消息1时,电子设备根据游戏A1的作战场景对应的第一通知类型和微信的第二通知类型,确定可以不对微信通知消息1进行处理;电子设备根据短信A2的第一通知类型和微信的第二通知类型确定可以在子屏1402上以横幅通知类型通知微信通知消息1,并通过振动通知类型进行提示;但由于微信通知消息预设的显示位置为电子设备的顶部,而短信A2所在的子屏1402并不在电子设备触摸屏的顶部,因而电子设备并不在子屏1402上通过横幅通知类型显示该微信通知消息1,电子设备仅通过振动通知类型进行提示。
在其他一些实施例中,第一应用程序的不同界面(或不同状态,或不同场景,或不同代码段)分别对应有不同的白名单。在前台显示第一应用程序的第一界面时,若产生通知消息的第二应用程序在该第一界面对应的白名单里,则对该通知消息进行通知。
在其他一些实施例中,第一应用程序的不同界面(或不同状态,或不同场景,或不同代码段)分别对应有不同的黑名单。在前台显示第一应用程序的第一界面时,若产生通知消息的第二应用程序在该第一界面对应的黑名单里,则不对该通知消息进行通知。
在其他一些实施例中,第一应用程序的不同界面(或不同状态,或不同场景,或不同代码段)分别对应有不同的第一通知类型和白名单。在前台显示第一应用程序的第一界面时,若产生通知消息的第二应用程序在该第一界面对应的白名单里,则采用该第一界面对应的第一通知类型对该通知消息进行通知。
在其他一些实施例中,第一应用程序的不同界面(或不同状态,或不同场景,或不同代码段)分别对应有不同的第一通知类型和白名单,第二应用程序对应有第二通知类型。在前台显示第一应用程序的第一界面时,若产生通知消息的第二应用程序在 该第一界面对应的白名单里,则采用该第一界面对应的第一通知类型与第二应用程序的第二通知类型的交集中的通知类型,对该通知消息进行通知。
此外,在本实施例中,在电子设备确地对接收到的通知消息进行显示通知的场景下,若显示时长大于或者等于预设时长(例如2s),且电子设备未接收到用户对所显示的通知消息的操作,则电子设备可以停止对该通知消息的显示,以尽量避免显示通知消息对用户的视觉干扰和对前台应用程序应用界面的遮挡。
另外,本实施例中的通知消息并不限于需要声音或视觉显示的通知消息,只要是用于告知其他实体的某种信息,均可认为是通知消息。例如,第二应用程序发出通知消息,以告知电子设备的系统或前台显示的第一应用程序,第二应用程序想切换到前台。电子设备根据第一应用程序的第一通知类型确定是否将第二应用程序切换到前台。这样,可以实现前台第一应用程序阻止其他一些应用程序抢占自己的前台显示。
结合上述实施例及附图,本实施例提供一种通知消息的处理方法,如图20所示。该方法可以在如图1、图2所示的电子设备(例如手机、平板电脑等)中实现,该方法具体可以包括以下步骤:
S2001、电子设备在触摸屏上显示第一应用程序的第一界面。
示例性地,第一应用程序可以是某一游戏应用,第一界面可以是如图10c所示的该游戏的作战界面。或者,第一界面还可以是如图10a的加载界面,如图10b的主界面(不包括横幅1001),或者如图10d所示的商店购物界面(不包括角标1003)等。在一些实施例中,上述第一界面可以是全屏显示在触摸屏中,也可以是部分显示在触摸屏中。
S2002、电子设备接收到第二应用程序的第一通知消息。
其中,第二应用程序可以与第一应用程序不同,也可以与第一应用程序相同。
示例性的,第二应用程序可以是微信,当第一界面为如图10c所示的作战界面时,第一通知消息可以是上述微信通知消息3。再示例性的,第二应用程序可以是电量管理应用程序,第一通知消息可以是电量低的通知消息等。
S2003、电子设备根据第一界面确定对第一通知消息的第一目标通知类型。
示例性的,当第一界面为如图10c所示的作战界面时,电子设备可以根据该作战界面确定对微信通知消息3的第一目标通知类型为不通知。
S2004、电子设备根据所确定的第一目标通知类型,对第一通知消息进行处理。
电子设备在步骤S2003中确定的对微信通知消息3的第一目标通知类型为不通知后,在显示该作战界面的情况下,电子设备在步骤S2004中不对微信通知消息3进行通知。
通过上述技术方案,电子设备可以根据前台显示的第一应用程序的界面确定对第二应用程序的通知消息的通知类型,从而尽量不干扰到该前台显示的第一应用程序的正常运行。
在一些实施例中,第一应用程序的不同界面可以分别对应有第一通知类型,第一界面对应的第一通知类型即为步骤S2003中的第一目标通知类型。
在其他一些实施例中,第一应用程序的不同的界面可以分别对应有第一通知类型,第二应用程序可以对应有第二通知类型。在步骤S2003中,电子设备根据第一界面, 确定对第一通知消息的通知类型,具体可以包括:电子设备确定第一应用程序的第一界面对应的第一通知类型和第二应用程序对应的第二通知类型的第一交集,第一交集中的通知类型即为对第一通知消息的第一目标通知类型。
示例性的,第一应用程序为游戏,第一界面为游戏的作战界面,游戏的作战界面对应的第一通知类型为不通知;第二应用程序为微信,微信的第二通知类型为振动通知类型、横幅通知类型和角标通知类型,电子设备确定第一交集为空。因而,在步骤S2004中,电子设备在前台显示作战界面的情况下,不对微信通知消息3进行通知。
在其他一些实施例中,在步骤S2004之后,参见图21,该方法还可以包括:
S2005、电子设备在触摸屏上显示上述第一应用程序的第二界面。
示例性的,在第一应用程序为游戏,第一界面为如图10c所示的作战界面的情况下,第二界面可以是如图10d所示的商店购物界面(不包括角标1003)。
S2006、电子设备接收到第二应用程序的第二通知消息。
其中,步骤S2006中的第二应用程序可以与步骤S2002中的第二应用程序相同或不同。示例性的,步骤S2006和步骤S2002中的第二应用程序均为微信,电子设备在显示商店购物界面时接收到上述微信通知消息4。
S2007、电子设备根据第二界面,确定对第二通知消息的第二目标通知类型。
其中,第二目标通知类型与第一目标通知类型不同。示例性的,电子设备可以根据如图10d所示的商店购物界面,确定对微信通知消息4的第二目标通知类型为角标通知类型。
S2008、电子设备根据所确定的第二目标通知类型,对第二通知消息进行处理。
电子设备在步骤S2007中确定的对微信通知消息4的第二目标通知类型为角标通知类型后,参见图10d,在显示该商店购物界面的情况下,电子设备在步骤S2008中以角标1003的方式对微信通知消息4进行通知。
也就是说,电子设备可以根据前台显示的应用程序的不同界面,确定对电子设备接收到的不同通知消息的不同通知类型,从而实时、动态地降低对前台显示的第一应用程序的干扰。
在一些实施例中,第一应用程序的不同界面可以分别对应有第一通知类型,第二界面对应的第一通知类型即为步骤S2007中的第二目标通知类型。
在其他一些实施例中,当第一应用程序的不同界面分别对应有第一通知类型,第二应用程序对应有第二通知类型时,步骤S2007具体可以包括:电子设备确定第一应用程序的第二界面对应的第一通知类型和第二应用程序对应的第二通知类型的第二交集,第二交集中的通知类型即为对第二通知消息的第二目标通知类型。其中,第二界面对应的第一通知类型与第一界面对应的第一通知类型不同。
示例性的,第一应用程序为游戏,第二界面为游戏的商店购物界面,游戏的商店购物界面对应的第一通知类型为角标通知类型,第二应用程序为微信,微信的第二通知类型为振动通知类型、横幅通知类型和角标通知类型;电子设备确定第二交集为角标通知类型。因而,在步骤S2008中,电子设备在前台显示商店购物界面的情况下,以角标通知类型对微信通知消息4进行通知。
在其他一些实施例中,在步骤S2005之后,参见图22,该方法还可以包括:
S2009、电子设备根据第一界面和第二界面,确定对第一通知消息的第三目标通知类型。
示例性的,第一应用程序为游戏,第一界面为如图13a所示的加载界面,第二界面为如图13b所示的主界面(不包括横幅1301),第一通知消息为上述通知消息1。电子设备可以根据如图13a所示的加载界面和如图13b所示的主界面(不包括横幅1301),确定对微信通知消息1的第三目标通知类型为横幅通知类型。
S2010、电子设备根据所确定的第三目标通知类型,对第一通知消息进行处理。
电子设备在步骤S2009中确定对微信通知消息1的第三目标通知类型为横幅通知类型后,参见图13b,在显示该主界面的情况下,电子设备在步骤S2010中以横幅1001的方式对微信通知消息1进行通知。
也就是说,电子设备可以根据前台显示的第一应用程序的不同界面确定对第二应用程序的同一通知消息的进行多次处理,从而在实时、动态地降低对前台显示的第一应用程序的干扰的同时,尽量让用户获知该通知消息。
当第一应用程序的不同界面分别对应有不同的第一通知类型,第二应用程序对应有第二通知类型时,步骤S2009具体可以包括:电子设备确定第二交集的通知类型中,电子设备在显示第一应用程序的第一界面时未对第一通知消息执行的第三目标通知类型。
示例性的,第一应用程序为游戏,第一界面为加载界面,第二界面为主界面,加载界面的第一通知类型包括声音通知类型和振动通知类型,主界面的第一通知类型包括振动通知类型和横幅通知类型;第二应用程序为微信,微信的第二通知类型包括振动通知类型、横幅通知类型和角标通知类型;第一通知消息为上述微信通知消息1。第二交集为振动通知类型和横幅通知类型。电子设备在显示第一应用程序的第一界面时对微信通知消息1采用的通知类型,为电子设备在加载界面下对微信通知消息1执行的振动通知类型。第二交集的通知类型中,电子设备在显示加载界面时未对微信通知消息1执行的第三目标通知类型为横幅通知类型。因而,在步骤S2010中,参见图13b,电子设备在显示主界面的情况下,以横幅1301的方式对微信通知消息1进行通知。
在其他一些实施例中,在上述步骤S2004、步骤S2008或步骤S2010之后,该方法还可以包括以下步骤S2011-2012。示例性的,参见图23,该方法可以包括:
S2011、若电子设备在本次显示第一应用程序的界面时,对第一通知消息采用的通知类型未完全包括第二通知类型,则在停止显示第一应用程序的界面后,电子设备确定对第一通知消息的第四目标通知类型。
S2012、电子设备根据所确定的第四目标通知类型,对第一通知消息进行处理。
示例性的,在上述步骤S2009-2010之后,第四目标通知类型为角标通知类型,参见图13e,在前台退出游戏界面后,电子设备可以以角标通知类型显示微信通知消息1。
在一些实施例中,第四目标通知类型为预设的通知类型。
在另一些实施例中,电子设备在步骤S2011中电子设备确定对第一通知消息的第四目标通知类型,具体可以包括:电子设备确定第二应用程序对应的第二通知类型中,电子设备在本次显示第一应用程序的界面时,未对第一通知消息执行的第四目标通知 类型。
示例性的,第一通知消息为微信通知消息1,第二通知类型为振动通知类型、横幅通知类型和角标通知类型;参见图13a-图13d,电子设备在本次显示第一应用程序的加载界面、主界面、作战界面和商店购物界面时对微信通知消息1采用的通知类型为振动通知类型和横幅通知;第二通知类型中电子设备在本次显示第一应用程序时对第一通知消息未采用的通知类型为角标通知类型,即第四目标通知类型为角标通知类型。因而,参见图13e,电子设备可以在退出游戏界面后,以角标通知类型通知微信通知消息1。
结合上述实施例及附图,本实施例提供一种通知消息的处理方法,该方法可以在如图1、图2所示的电子设备(例如手机、平板电脑等)中实现,附图虽未示出,但该方法具体可以包括以下步骤:
S2101、电子设备在触摸屏上显示第一应用程序的第一界面。
S2102、电子设备接收到第二应用程序的第一通知消息。
S2103、电子设备确定第一应用程序的第一界面对应的第一通知类型和第二应用程序对应的第二通知类型的第一交集,第一交集中的通知类型为对第一通知消息的第一目标通知类型。
S2104、电子设备根据所确定的第一目标通知类型,对第一通知消息进行处理。
S2105、电子设备在触摸屏上显示上述第一应用程序的第二界面。
S2106、电子设备接收到第二应用程序的第二通知消息。
S2107、电子设备确定第一应用程序的第二界面对应的第一通知类型和第二应用程序对应的第二通知类型的第二交集,第二交集中的通知类型为对第二通知消息的第二目标通知类型。
S2108、电子设备根据所确定的第二目标通知类型,对第二通知消息进行处理。
在步骤S2105之后,该方法还可以包括以下步骤S2109-步骤S2110。
S2109、电子设备确定第二交集的通知类型中,电子设备在本次显示第一应用程序时未对第一通知消息执行的第三目标通知类型。
S2110、电子设备根据所确定的第三目标通知类型,对第一通知消息进行处理。
在上述步骤S2104、步骤S2108或步骤S2110之后,该方法还可以包括以下步骤S2111-步骤S2112。
S2111、若电子设备在本次显示第一应用程序的界面时,对第一通知消息采用的通知类型未完全包括第二通知类型,则在停止显示第一应用程序的界面后,电子设备确定第二应用程序对应的第二通知类型中,电子设备在该次显示第一应用程序的界面时,未对第一通知消息执行的第四目标通知类型。
S2112、电子设备根据所确定的第四目标通知类型,对第一通知消息进行处理。
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实 现不应认为超出本申请的范围。
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图24示出了上述实施例中涉及的电子设备2400的一种可能的组成示意图,如图24所示,该电子设备2400可以包括:显示单元2401、接收单元2402、确定单元2403和处理单元2404。
其中,显示单元2401可以用于支持电子设备3600执行上述步骤S2001、步骤S2005、步骤S2101、步骤S2105等,和/或用于本文所描述的技术的其他过程。
接收单元2402可以用于支持电子设备2400执行上述步骤S2002、步骤S2006、步骤S2102、步骤S2106等,和/或用于本文所描述的技术的其他过程。
确定单元2403可以用于支持电子设备2400执行上述步骤S2003、步骤S2007、步骤S2009、步骤S2011、步骤S2103、步骤S2107、步骤S2109、步骤S2111等,和/或用于本文所描述的技术的其他过程。
处理单元2404可以用于支持电子设备2400执行上述步骤S2004、步骤S2008、步骤S2010、步骤S2012、步骤S2104、步骤S2108、步骤S2110、步骤S2112等,和/或用于本文所描述的技术的其他过程。需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本实施例提供的电子设备,用于执行上述通知消息的处理方法,因此可以达到与上述实现方法相同的效果。
在采用集成的单元的情况下,电子设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备的动作进行控制管理,例如,可以用于支持电子设备执行上述显示单元2401、确定单元2403和处理单元2404执行的步骤。存储模块可以用于支持电子设备存储第一应用程序的不同界面分别对应的第一通知类型、第二应用程序对应的第二通知类型,以及存储程序代码和数据等。通信模块,可以用于支持电子设备与其他设备的通信,例如,可以用于支持电子设备执行上述接收单元2402执行的步骤。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的电子设备可以为具有图1所示结构的设备。
如图25所示,本实施例还提供了一种电子设备2500,该电子设备可以包括:触摸屏2501,其中,所述触摸屏2501可以包括触敏表面2506和显示屏2507;一个或多个处理器2502;存储器2503;以及一个或多个计算机程序2504,上述各器件可以通过一个或多个通信总线2505连接。其中该一个或多个计算机程序2504被存储在上述 存储器2503中,并被配置为被该一个或多个处理器2502执行,该一个或多个计算机程序2504包括指令,在一些实施例中,上述指令可以用于执行如图21及相应实施例中电子设备执行的各个步骤。在其他一些实施例中,上述指令还可以用于执行图22及相应实施例中电子设备执行的各个步骤。在另外一些实施例中,上述指令还可以用于执行图23及相应实施例中电子设备执行的各个步骤。在另外一些实施例中,上述指令还可以用于执行上述实施例中电子设备执行的步骤2101-2112。当然,电子设备包括但不限于上述所列举的器件,例如,上述电子设备还可以包括射频电路、定位装置、传感器等等,当电子设备包含有其他的器件时,上述电子设备2500可以为图1所示的电子设备100。
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的通知消息的处理方法。
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的通知消息的处理方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的通知消息的处理方法。
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
需要说明的是,以上实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。本发明实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照以上实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)或者半导体介质(例如固态硬盘)等。
为了解释的目的,前面的描述是通过参考具体实施例来进行描述的。然而,上面 的示例性的讨论并非意图是详尽的,也并非意图要将本申请限制到所公开的精确形式。根据以上教导内容,很多修改形式和变型形式都是可能的。选择和描述实施例是为了充分阐明本申请的原理及其实际应用,以由此使得本领域的其他技术人员能够充分利用具有适合于所构想的特定用途的各种修改的本申请以及各种实施例。

Claims (19)

  1. 一种通知消息的处理方法,其特征在于,包括:
    在触摸屏上显示第一应用程序的第一界面;
    接收到第二应用程序的第一通知消息;
    根据所述第一界面确定对所述第一通知消息的第一目标通知类型;
    根据所述第一目标通知类型对所述第一通知消息进行处理;
    在所述触摸屏上显示所述第一应用程序的第二界面;
    接收到所述第二应用程序的第二通知消息;
    根据所述第二界面确定对所述第二通知消息的第二目标通知类型;
    根据所述第二目标通知类型对所述第二通知消息进行处理;
    其中,所述第一目标通知类型与所述第二目标通知类型不同。
  2. 根据权利要求1所述的方法,其特征在于,所述第一应用程序的不同界面分别对应有第一通知类型,所述第二应用程序对应有第二通知类型;
    所述根据所述第一界面,确定对所述第一通知消息的第一目标通知类型,包括:
    确定所述第一应用程序的第一界面对应的第一通知类型和所述第二通知类型的第一交集,所述第一交集中的通知类型即为所述第一目标通知类型;
    所述根据所述第二界面,确定对所述第二通知消息的第二目标通知类型,包括:
    确定所述第一应用程序的第二界面对应的第一通知类型和所述第二通知类型的第二交集,所述第二交集中的通知类型即为所述第二目标通知类型。
  3. 根据权利要求1或2所述的方法,其特征在于,在所述触摸屏上显示所述第一应用程序的第二界面之后,所述方法还包括:
    根据所述第一界面和所述第二界面,确定对所述第一通知消息的第三目标通知类型;
    根据所述第三目标通知类型,对所述第一通知消息进行处理。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述第一界面和所述第二界面,确定对所述第一通知消息的第三目标通知类型,包括:
    确定第二交集的通知类型中,所述电子设备在显示所述第一界面时未对所述第一通知消息执行的第三目标通知类型;
    其中,所述第二交集为所述第一应用程序的第二界面对应的第一通知类型和所述第二通知类型的交集。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:
    若所述电子设备在本次显示所述第一应用程序的界面时,对所述第一通知消息采用的通知类型未完全包括所述第二通知类型,则在停止显示所述第一应用程序的界面后,确定对所述第一通知消息的第四目标通知类型;
    根据所述第四目标通知类型,对所述第一通知消息进行处理。
  6. 根据权利要求5所述的方法,其特征在于,所述确定对所述第一通知消息的第四目标通知类型,包括:
    确定所述第二通知类型中,所述电子设备在本次显示所述第一应用程序的界面时未对所述第一通知消息执行的第四目标通知类型。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述第一应用程序为游戏,所述第一界面为加载界面、主界面、作战界面或商店购物界面。
  8. 根据权利要求1-6任一项所述的方法,其特征在于,所述第一应用程序为视频播放器,所述第一界面为未播放视频界面或播放视频界面;
    或者,所述第一界面为全屏播放界面或非全屏播放界面。
  9. 一种电子设备,其特征在于,包括:
    触摸屏,其中,所述触摸屏包括触敏表面和显示器;
    一个或多个处理器;
    存储器;
    多个应用程序;
    以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述电子设备执行时,使得所述电子设备执行以下步骤:
    在触摸屏上显示第一应用程序的第一界面;
    接收到第二应用程序的第一通知消息;
    根据所述第一界面确定对所述第一通知消息的第一目标通知类型;
    根据所述第一目标通知类型对所述第一通知消息进行处理;
    在所述触摸屏上显示所述第一应用程序的第二界面;
    接收到所述第二应用程序的第二通知消息;
    根据所述第二界面确定对所述第二通知消息的第二目标通知类型;
    根据所述第二目标通知类型对所述第二通知消息进行处理;
    其中,所述第一目标通知类型与所述第二目标通知类型不同。
  10. 根据权利要求9所述的电子设备,其特征在于,所述第一应用程序的不同界面分别对应有第一通知类型,所述第二应用程序对应有第二通知类型;当所述指令被所述电子设备执行时,使得所述电子设备具体执行以下步骤:
    确定所述第一应用程序的第一界面对应的第一通知类型和所述第二通知类型的第一交集,所述第一交集中的通知类型即为所述第一目标通知类型;
    确定所述第一应用程序的第二界面对应的第一通知类型和所述第二通知类型的第二交集,所述第二交集中的通知类型即为所述第二目标通知类型。
  11. 根据权利要求9或10所述的电子设备,其特征在于,当所述指令被所述电子设备执行时,使得所述电子设备还执行以下步骤:
    在所述触摸屏上显示所述第一应用程序的第二界面之后,根据所述第一界面和所述第二界面,确定对所述第一通知消息的第三目标通知类型;
    根据所述第三目标通知类型,对所述第一通知消息进行处理。
  12. 根据权利要求11所述的电子设备,其特征在于,当所述指令被所述电子设备执行时,使得所述电子设备具体执行以下步骤:
    确定第二交集的通知类型中,所述电子设备在显示所述第一界面时未对所述第一通知消息执行的第三目标通知类型;
    其中,所述第二交集为所述第一应用程序的第二界面对应的第一通知类型和所述 第二通知类型的交集。
  13. 根据权利要求9-12任一项所述的电子设备,其特征在于,当所述指令被所述电子设备执行时,使得所述电子设备还执行以下步骤:
    若所述电子设备在本次显示所述第一应用程序的界面时,对所述第一通知消息采用的通知类型未完全包括所述第二通知类型,则在停止显示所述第一应用程序的界面后,确定对所述第一通知消息的第四目标通知类型;
    根据所述第四目标通知类型,对所述第一通知消息进行处理。
  14. 根据权利要求13所述的电子设备,其特征在于,当所述指令被所述电子设备执行时,使得所述电子设备具体执行以下步骤:
    确定所述第二通知类型中,所述电子设备在本次显示所述第一应用程序的界面时未对所述第一通知消息执行的第四目标通知类型。
  15. 根据权利要求9-14任一项所述的电子设备,其特征在于,所述第一应用程序为游戏,所述第一界面为加载界面、主界面、作战界面或商店购物界面。
  16. 根据权利要求9-14任一项所述的电子设备,其特征在于,所述第一应用程序为视频播放器,所述第一界面为未播放视频界面或播放视频界面;
    或者,所述第一界面为全屏播放界面或非全屏播放界面。
  17. 一种电子设备,包括触摸屏,存储器,一个或多个处理器,多个应用程序,以及一个或多个程序;其中所述一个或多个程序被存储在所述存储器中;其特征在于,所述一个或多个处理器在执行所述一个或多个程序时,使得所述电子设备实现如权利要求1至8中任一项所述的通知消息的处理方法。
  18. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1-8中任一项所述的通知消息的处理方法。
  19. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-8中任一项所述的通知消息的处理方法。
PCT/CN2018/101982 2018-08-23 2018-08-23 通知消息的处理方法及电子设备 WO2020037611A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2018/101982 WO2020037611A1 (zh) 2018-08-23 2018-08-23 通知消息的处理方法及电子设备
EP18931131.9A EP3820130B1 (en) 2018-08-23 2018-08-23 Method and electronic device for processing notification message
CN201880085069.5A CN111543042B (zh) 2018-08-23 2018-08-23 通知消息的处理方法及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/101982 WO2020037611A1 (zh) 2018-08-23 2018-08-23 通知消息的处理方法及电子设备

Publications (1)

Publication Number Publication Date
WO2020037611A1 true WO2020037611A1 (zh) 2020-02-27

Family

ID=69592165

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101982 WO2020037611A1 (zh) 2018-08-23 2018-08-23 通知消息的处理方法及电子设备

Country Status (3)

Country Link
EP (1) EP3820130B1 (zh)
CN (1) CN111543042B (zh)
WO (1) WO2020037611A1 (zh)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970526A (zh) * 2020-08-18 2020-11-20 广州华多网络科技有限公司 界面通知消息处理方法、装置、设备及存储介质
CN113206779A (zh) * 2021-03-31 2021-08-03 广州朗国电子科技有限公司 消息播放的优化方法、终端以及存储装置
CN113806105A (zh) * 2021-08-02 2021-12-17 荣耀终端有限公司 消息处理方法、装置、电子设备和可读存储介质
CN114698081A (zh) * 2020-12-28 2022-07-01 北京小米移动软件有限公司 控制数据发射的方法及装置、电子设备、存储介质
CN114741210A (zh) * 2020-12-23 2022-07-12 成都鼎桥通信技术有限公司 多系统通知消息处理方法、装置、终端及存储介质
EP4044569A4 (en) * 2020-12-15 2022-11-16 Honor Device Co., Ltd. VIBRATION METHOD AND APPARATUS AND ELECTRONIC DEVICE AND READABLE STORAGE MEDIA
CN115576621A (zh) * 2022-03-31 2023-01-06 荣耀终端有限公司 一种应用程序加载方法及电子设备
US20230051784A1 (en) * 2019-12-31 2023-02-16 Lg Electronics Inc. Electronic device for displaying content and control method therefor
CN116709339A (zh) * 2022-10-09 2023-09-05 荣耀终端有限公司 一种应用通知消息的检测方法及电子设备

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115291995B (zh) * 2022-10-08 2023-03-31 荣耀终端有限公司 一种消息显示方法及相关电子设备、可读存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160019604A1 (en) * 2014-07-18 2016-01-21 Yahoo Japan Corporation Information display device, distribution device, information display method, and non-transitory computer readable storage medium
JP2016024513A (ja) * 2014-07-16 2016-02-08 Pfuテクニカルコミュニケーションズ株式会社 情報処理装置、診断支援方法及び制御プログラム
KR20160090709A (ko) * 2015-01-22 2016-08-01 엘지전자 주식회사 이동단말기 및 그 제어방법
CN106201249A (zh) * 2016-06-28 2016-12-07 联想(北京)有限公司 通知信息的显示方法和显示装置
CN106201223A (zh) * 2016-08-15 2016-12-07 宇龙计算机通信科技(深圳)有限公司 一种通知消息显示方法及装置
CN106598403A (zh) * 2016-12-08 2017-04-26 北京小米移动软件有限公司 通知消息的管理方法及装置
CN108111675A (zh) * 2017-12-13 2018-06-01 维沃移动通信有限公司 通知消息的处理方法、装置及移动终端

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999023579A1 (en) * 1997-11-05 1999-05-14 Microsoft Corporation Notification scheduling system on a mobile device
US7458080B2 (en) * 2000-12-19 2008-11-25 Microsoft Corporation System and method for optimizing user notifications for small computer devices
GB0601919D0 (en) * 2006-01-31 2006-03-15 Sonaptic Ltd Themes for a mobile device
US20130241918A1 (en) * 2012-03-13 2013-09-19 Samsung Electronics Co. Ltd. Apparatus and method for centralized application notifications
US9787821B2 (en) * 2013-03-08 2017-10-10 Blackberry Limited System and method for providing an alarm notification
CN103248757B (zh) * 2013-03-28 2016-04-06 小米科技有限责任公司 一种消息通知方法及装置
CN105228109A (zh) * 2014-05-30 2016-01-06 中兴通讯股份有限公司 一种智能消息提示的方法及装置
US9887949B2 (en) * 2014-05-31 2018-02-06 Apple Inc. Displaying interactive notifications on touch sensitive devices
CN104683591A (zh) * 2015-03-10 2015-06-03 苏州天鸣信息科技有限公司 基于移动终端的消息免打扰方法及其移动终端
CN105117211B (zh) * 2015-07-28 2018-09-04 小米科技有限责任公司 消息提醒的方法及装置
CN106469054B (zh) * 2015-08-21 2021-09-21 小米科技有限责任公司 通知消息控制方法、装置及终端
CN106020611A (zh) * 2016-05-26 2016-10-12 深圳市金立通信设备有限公司 一种显示通知消息的方法及终端
CN106095401A (zh) * 2016-05-26 2016-11-09 深圳天珑无线科技有限公司 通知栏消息处理方法及装置
CN111355652B (zh) * 2016-08-10 2021-10-22 华为技术有限公司 管理通知消息的方法及终端
CN106034069A (zh) * 2016-08-15 2016-10-19 努比亚技术有限公司 一种控制推送消息显示的方法及移动终端
CN107734175B (zh) * 2017-10-25 2020-06-30 维沃移动通信有限公司 一种通知消息的提示方法及移动终端

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016024513A (ja) * 2014-07-16 2016-02-08 Pfuテクニカルコミュニケーションズ株式会社 情報処理装置、診断支援方法及び制御プログラム
US20160019604A1 (en) * 2014-07-18 2016-01-21 Yahoo Japan Corporation Information display device, distribution device, information display method, and non-transitory computer readable storage medium
KR20160090709A (ko) * 2015-01-22 2016-08-01 엘지전자 주식회사 이동단말기 및 그 제어방법
CN106201249A (zh) * 2016-06-28 2016-12-07 联想(北京)有限公司 通知信息的显示方法和显示装置
CN106201223A (zh) * 2016-08-15 2016-12-07 宇龙计算机通信科技(深圳)有限公司 一种通知消息显示方法及装置
CN106598403A (zh) * 2016-12-08 2017-04-26 北京小米移动软件有限公司 通知消息的管理方法及装置
CN108111675A (zh) * 2017-12-13 2018-06-01 维沃移动通信有限公司 通知消息的处理方法、装置及移动终端

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3820130A4 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230051784A1 (en) * 2019-12-31 2023-02-16 Lg Electronics Inc. Electronic device for displaying content and control method therefor
CN111970526A (zh) * 2020-08-18 2020-11-20 广州华多网络科技有限公司 界面通知消息处理方法、装置、设备及存储介质
EP4044569A4 (en) * 2020-12-15 2022-11-16 Honor Device Co., Ltd. VIBRATION METHOD AND APPARATUS AND ELECTRONIC DEVICE AND READABLE STORAGE MEDIA
CN114741210A (zh) * 2020-12-23 2022-07-12 成都鼎桥通信技术有限公司 多系统通知消息处理方法、装置、终端及存储介质
CN114698081A (zh) * 2020-12-28 2022-07-01 北京小米移动软件有限公司 控制数据发射的方法及装置、电子设备、存储介质
CN114698081B (zh) * 2020-12-28 2023-10-17 北京小米移动软件有限公司 控制数据发射的方法及装置、电子设备、存储介质
CN113206779A (zh) * 2021-03-31 2021-08-03 广州朗国电子科技有限公司 消息播放的优化方法、终端以及存储装置
CN113806105A (zh) * 2021-08-02 2021-12-17 荣耀终端有限公司 消息处理方法、装置、电子设备和可读存储介质
CN113806105B (zh) * 2021-08-02 2023-10-31 荣耀终端有限公司 消息处理方法、装置、电子设备和可读存储介质
CN115576621A (zh) * 2022-03-31 2023-01-06 荣耀终端有限公司 一种应用程序加载方法及电子设备
CN115576621B (zh) * 2022-03-31 2023-11-03 荣耀终端有限公司 一种应用程序加载方法及电子设备
CN116709339A (zh) * 2022-10-09 2023-09-05 荣耀终端有限公司 一种应用通知消息的检测方法及电子设备

Also Published As

Publication number Publication date
EP3820130A4 (en) 2021-08-11
CN111543042B (zh) 2021-08-27
EP3820130A1 (en) 2021-05-12
EP3820130B1 (en) 2023-12-20
CN111543042A (zh) 2020-08-14

Similar Documents

Publication Publication Date Title
KR102470275B1 (ko) 음성 제어 방법 및 전자 장치
WO2021027747A1 (zh) 一种界面显示方法及设备
WO2020037611A1 (zh) 通知消息的处理方法及电子设备
KR102575123B1 (ko) 애플리케이션 디스플레이 방법 및 전자 장치
CN113542485B (zh) 一种通知处理方法、电子设备及计算机可读存储介质
WO2021129326A1 (zh) 一种屏幕显示方法及电子设备
WO2021103981A1 (zh) 分屏显示的处理方法、装置及电子设备
CN113645351B (zh) 应用界面交互方法、电子设备和计算机可读存储介质
WO2021036770A1 (zh) 一种分屏处理方法及终端设备
WO2020000448A1 (zh) 一种柔性屏幕的显示方法及终端
US11921987B2 (en) System navigation bar display method, system navigation bar control method, graphical user interface, and electronic device
WO2020221063A1 (zh) 切换父页面和子页面的方法、相关装置
JP7268275B2 (ja) 着信があるときに電子デバイス上に映像を提示するための方法、および電子デバイス
CN111913750B (zh) 一种应用程序管理方法、装置及设备
CN114327666B (zh) 应用启动方法、装置和电子设备
US11861156B2 (en) Interface display method and related apparatus
CN116360725B (zh) 显示交互系统、显示方法及设备
WO2021078032A1 (zh) 用户界面的显示方法及电子设备
EP3958106A1 (en) Interface display method and electronic device
US20220358089A1 (en) Learning-Based Keyword Search Method and Electronic Device
CN114077365A (zh) 分屏显示方法和电子设备
WO2021190524A1 (zh) 截屏处理的方法、图形用户接口及终端
WO2020062014A1 (zh) 一种向输入框中输入信息的方法及电子设备
WO2024012398A1 (zh) 消息共享方法及相关设备
CN117440082A (zh) 截屏方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18931131

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2018931131

Country of ref document: EP

Effective date: 20210202

NENP Non-entry into the national phase

Ref country code: DE