CN116048832B - Batch clearing method and device for notification - Google Patents

Batch clearing method and device for notification Download PDF

Info

Publication number
CN116048832B
CN116048832B CN202211054729.8A CN202211054729A CN116048832B CN 116048832 B CN116048832 B CN 116048832B CN 202211054729 A CN202211054729 A CN 202211054729A CN 116048832 B CN116048832 B CN 116048832B
Authority
CN
China
Prior art keywords
notification
management center
notifications
instruction
center
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211054729.8A
Other languages
Chinese (zh)
Other versions
CN116048832A (en
Inventor
胡少哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211054729.8A priority Critical patent/CN116048832B/en
Publication of CN116048832A publication Critical patent/CN116048832A/en
Application granted granted Critical
Publication of CN116048832B publication Critical patent/CN116048832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The application provides a batch clearing method and equipment for notification, which are applied to the technical field of information processing and are used for solving the problem that partial processing operation information of notification messages is lost or ANR popup window is generated easily under the condition of batch clearing of the notification messages. The method comprises the following steps: the method comprises the steps that a first notification display center of a first electronic device responds to a batch clearing event of the first electronic device, and a plurality of first notifications displayed by the first notification display center are deleted; the first notification display center sends a first clearing instruction to a first notification management center of the first electronic device; the first clearing instruction comprises a first identifier, and the first identifier is used for indicating that an event corresponding to the first clearing instruction is a batch clearing event. In response to the first purge instruction, the first notification management center deletes the plurality of first notifications stored by the first notification management center; wherein after the first notification management center deletes the plurality of first notifications, the first notification display center is not notified of an event to delete the plurality of first notifications.

Description

Batch clearing method and device for notification
Technical Field
The present application relates to the field of information processing technologies, and in particular, to a method and an apparatus for batch clearing of notifications.
Background
The notification message of the electronic device needs to be displayed through the notification display center, and the notification display center needs to acquire the notification message which needs to be displayed currently from the notification management center. The information interaction from the notification management center to the notification display center is developed by invoking a binder (a manner of inter-process communication in the Andorid system).
When the notification message is cleared in batches, the notification management center may be full of the thread pool of the binder when sending the message to the notification display center, so that part of processing operation information of the notification message is lost or an application unresponsive (Application Not Responding, ANR) popup window is generated.
Disclosure of Invention
The embodiment of the application provides a batch clearing method and equipment for notification, which are used for solving the problems that partial processing operation information of notification messages is lost or ANR popup window is generated easily under the condition of batch clearing of the notification messages.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, a batch clearing method for notifications is provided, where the method is applied to a first electronic device, and the first electronic device includes a first notification management center and a first notification display center; the method comprises the following steps:
The first notification display center responds to the batch clearing event of the first electronic equipment and deletes a plurality of first notifications displayed by the first notification display center; the first notification display center sends a first clearing instruction to the first notification management center; the first clearing instruction comprises a first identifier, and the first identifier is used for indicating that an event corresponding to the first clearing instruction is a batch clearing event.
After the first notification management center receives the first clearing instruction, the first notification management center deletes a plurality of first notifications stored in the first notification management center in response to the first clearing instruction; wherein after the first notification management center deletes the plurality of first notifications, the first notification display center is not notified of an event to delete the plurality of first notifications.
When a user triggers the first electronic equipment to trigger batch cleaning events, a first identifier is set in a cleaning instruction sent by the first notification display center to the first notification management center, so that the first notification management center does not notify the first notification display center of the events of the plurality of first notifications after deleting the plurality of first notifications. Therefore, the step that the first electronic equipment needs to call the binder under the batch clearing scene of the notification is cancelled, and the problem that the processing operation information of the first electronic equipment is lost or ANR is generated due to the fact that the binder is occupied is avoided.
In some possible implementations, the first electronic device further includes a first cross-device notification management center; the first electronic device is connected with the second electronic device, and the first electronic device synchronizes the notification in the first electronic device to the second electronic device through the first cross-device notification management center. After deleting the plurality of first notifications displayed by the first notification display center, the method further includes: the first notification display center sends a second clearing instruction to the first cross-device notification management center; the second clearing instruction comprises a second identifier, and the second identifier is used for indicating that an event corresponding to the second clearing instruction is a batch clearing event; the first cross-device notification management center receives the second cleaning instruction and forwards the second cleaning instruction to the second electronic device; the second clearing instruction is used for instructing the second electronic device to delete a plurality of first notifications which are stored in the second electronic device and are synchronized from the first electronic device. In this way, it is ensured that the status of the first notification in the second electronic device is kept consistent with the status of the first notification in the first electronic device.
In some possible implementations, the user clears the notifications in bulk in the second electronic device, and the first electronic device also needs to delete notifications that the first electronic device synchronized with the second electronic device. In this embodiment, the method further comprises: the first cross-device notification management center receives a third clearing instruction from the second electronic device; the third clearing instruction is used for instructing the first electronic device to delete a plurality of second notifications synchronized by the first electronic device to the second electronic device; the first cross-device notification management center forwards a third clearing instruction to the first notification management center; the first notification management center receives a third clearing instruction; in response to the third purge instruction, the first notification management center deletes the plurality of second notifications stored in the first notification management center; when the number of the plurality of second notifications is greater than or equal to the preset number, the first notification management center sends a fourth clearing instruction to the first notification display center every preset time period; the fourth clearing instruction is used for indicating the first notification display center to delete the second notifications corresponding to the preset number.
In this way, if the number of second notifications synchronized by the first electronic device to the second electronic device is greater, a clear instruction is sent to the second notification display center by the first notification management center at intervals of a preset time period, and each clear instruction is only used for indicating to delete the second notifications corresponding to the preset number. Thus, the number of times of calling the binder in a short time is reduced, and the problem that the binder is occupied in a short time to cause the loss of processing operation information or the generation of ANR when the first notification management center notifies the first notification display center of the event of deleting a plurality of second notifications can be avoided.
In some possible embodiments, if the number of second notifications synchronized by the first electronic device to the second electronic device is small, the method further includes: when the number of the second notifications is smaller than the preset number, the first notification management center sends a fifth clearing instruction to the first notification display center; the fifth clear instruction is for instructing the first notification display center to delete the second notification displayed in the first notification display center. In this way, in response to the user's operation in the second electronic device, it is ensured that the first notification display center of the first electronic device, the plurality of second notifications in the first notification management center, are all kept in synchronization with the status of the second notifications in the second communication electronic device.
In a second aspect, the present application provides a batch clearing method for notifications, where the method is applied to a first electronic device, where the first electronic device includes a first notification display center, a first notification management center, and a first cross-device notification management center, where the first electronic device is connected to a second electronic device, and the first electronic device synchronizes notifications in the first electronic device with the second electronic device through the first cross-device notification management center. The method is applied to the application scene that the first electronic device correspondingly deletes the notification synchronized by the first electronic device to the second electronic device when the second electronic device triggers the batch cleaning event. The method comprises the following steps:
the first cross-device notification management center receives a third clearing instruction from the second electronic device; the third clearing instruction is used for instructing the first electronic device to delete a plurality of second notifications synchronized by the first electronic device to the second electronic device; the first cross-device notification management center forwards a third clearing instruction to the first notification management center; the first notification management center receives a third clearing instruction; in response to the third purge instruction, the first notification management center deletes the second notification stored in the first notification management center; when the number of the plurality of second notifications is greater than or equal to the preset number, the first notification management center sends a fourth clearing instruction to the first notification display center every preset time period; the fourth clearing instruction is used for indicating the first notification display center to delete the second notifications corresponding to the preset number.
In this way, if the number of second notifications synchronized by the first electronic device to the second electronic device is greater, a clear instruction is sent to the second notification display center by the first notification management center at intervals of a preset time period, and each clear instruction is only used to instruct the first notification display center to delete the second notifications corresponding to the preset number. Thus, the number of times of calling the binder in a short time is reduced, and the problem that the binder is occupied in a short time to cause the loss of processing operation information or the generation of ANR when the first notification management center notifies the first notification display center of the event of deleting a plurality of second notifications can be avoided.
In some possible embodiments, the above method further comprises: when the number of the second notifications is smaller than the preset number, the first notification management center sends a fifth clearing instruction to the first notification display center; the fifth clear instruction is for instructing the first notification display center to delete the second notification displayed in the first notification display center. In this way, in response to the user's operation in the second electronic device, it is ensured that the first notification display center of the first electronic device, the plurality of second notifications in the first notification management center, are all kept in synchronization with the status of the second notifications in the second communication electronic device.
In a third aspect, the present application provides a batch clearing method for notifications, where the method is applied to a second electronic device, where the second electronic device includes a second notification display center, a second cross-device notification management center, a notification data management center, and a cross-device notification status controller; the second electronic device is connected with the first electronic device, and the second electronic device receives the notification of the synchronization of the first electronic device to the second electronic device through the second cross-device notification management center. The method is applied to the situation that when a second electronic device triggers a batch cleaning event, the second electronic device deletes a plurality of third notifications synchronized by a first electronic device to the second electronic device and notifies the first electronic device to delete a plurality of third known application scenes, and the method comprises the following steps:
the second notification display center responds to the batch cleaning event of the second electronic equipment, and deletes a plurality of third notifications which are displayed by the second notification display center and are synchronized by the first electronic equipment to the second electronic equipment; the second notification display center sends a sixth clearing instruction to the second cross-device notification management center; the sixth purge instruction includes a third identifier, where the third identifier is configured to indicate that an event corresponding to the sixth purge instruction is a batch purge event. The second cross-device notification management center receives the sixth clear instruction and forwards the sixth clear instruction to the notification data management center. Notifying a data management center to receive a sixth clearing instruction; in response to the sixth purge instruction, the notification data management center deletes the plurality of third notifications stored in the notification data management center; the notification data management center sends a seventh clear instruction to the cross-device notification state controller. The cross-device notification state controller receives a seventh clearing instruction and forwards the seventh clearing instruction to the first electronic device; the seventh purge instruction is to instruct the first electronic device to delete the plurality of third notifications.
In the technical scheme provided by the embodiment, when the second electronic device triggers batch cleaning, the second notification management center does not send a notification to the second notification display center after deleting the third notifications stored in the second notification management center, namely, the step of calling the binder in the process of the tablet personal computer 2 is canceled. And, send the clear command to the second cross-device notification management center by the second notification display center to notify the first electronic device of deleting a plurality of third notification events, not involving the operation between processes, nor calling the binder. Thus, the problem of losing operation information or generating ANR caused by the fact that the binder is occupied in a short time is avoided.
In some possible embodiments, the second electronic device further includes a second notification management center, where the method is applied to the second electronic device to delete a plurality of third notification application scenarios in the second electronic device when the second electronic device triggers batch cleaning. The method comprises the following steps:
the second notification display center also sends an eighth clearing instruction to the second notification management center; the eighth clearing instruction comprises a fourth identifier, and the fourth identifier is used for indicating that the event corresponding to the eighth clearing instruction is a batch clearing event; the second notification management center receives an eighth clearing instruction; in response to the eighth purge instruction, the second notification management center deletes the plurality of third notifications stored by the second notification management center; wherein after deleting the plurality of third notifications, the second notification management center does not notify the second notification display center of an event to delete the plurality of third notifications.
In this embodiment, since the fourth identifier carried in the eighth clear instruction indicates that the event corresponding to the eighth clear instruction is a bulk deletion event, that is, after the second notification management center receives the eighth clear instruction, it may be determined that the second notification display center has deleted the plurality of third notifications. Therefore, after the second notification management center deletes the plurality of third notifications stored in the second notification management center, the second notification display center is not notified of an event to delete the plurality of third notifications. In this way, the step of notifying the second notification management center to the second notification display center is canceled, and the display of the deletion notification in the tablet pc 2 is not affected. And the second notification management center does not send a notification to the second notification display center, so that the sender does not need to be called, and the problem of operation information loss or ANR generation caused by the fact that the sender is occupied in a short time is avoided.
In a fourth aspect, the present application further provides a batch clearing method for notifications, which is applied to a second electronic device, where the second electronic device includes a second notification display center, a second notification management center, a second cross-device notification management center, a notification data management center, and a cross-device notification status controller; the second electronic device is connected with the first electronic device, and the second electronic device receives the notification of the synchronization of the first electronic device to the second electronic device through the second cross-device notification management center. The method is applied to the fact that when the second electronic device detects that the second electronic device is disconnected from the first electronic device, the second electronic device empties a plurality of third notifications which are synchronized by the first electronic device to the second electronic device. The method further comprises the steps of:
The second cross-device notification management center responds to the synchronous disconnection event and sends a ninth clearing instruction to the notification data management center; the synchronous disconnection event is used for indicating the first electronic device to be disconnected with the second electronic device; the ninth clearing instruction comprises a fifth identifier, and the fifth identifier is used for indicating that an event corresponding to the ninth clearing instruction is a synchronous disconnection event; notifying a data management center to receive a ninth clearing instruction; in response to the ninth clear instruction, the notification data management center deletes the plurality of third notifications stored in the notification data management center; notifying the data management center to transmit a ninth clearing instruction to the cross-device notification state controller; responding to the ninth clearing instruction, and sending a tenth clearing instruction to the second notification management center by the cross-device notification state controller at intervals of a preset time period based on the fifth identification; the second notification management center receives a tenth clearing instruction and deletes third notifications corresponding to the preset number stored in the second notification management center according to the tenth clearing instruction; the second notification management center forwards a tenth clearing instruction to the second notification display center; the second notification display center receives the tenth clearing instruction and deletes third notifications corresponding to the preset number displayed by the second notification display center.
In this embodiment, for the second electronic device, when detecting disconnection from the first electronic device, the second electronic device quickly empties a scenario of multiple third notifications synchronized by the first electronic device to the second electronic device, sends a clear instruction to the second notification management center by spacing the device notification status controller by a preset period of time, and each clear instruction is only used to instruct the second notification management center to delete the third notifications corresponding to the preset number. In this way, the second notification management center deletes the third notifications corresponding to the preset number every preset time period, and when the second notification management center notifies the second notification display center of the event of deleting the notification, the number of times of calling the binder in a short time is reduced. Thus, loss of processing operation information or generation of ANR due to the fact that the binder is full can be avoided.
In a fifth aspect, there is provided an electronic device comprising: a processor and a memory; the memory is for storing computer-executable instructions that, when executed by the electronic device, cause the electronic device to perform the batch cleaning method of notification as in any of the first aspects above.
In a sixth aspect, there is provided a computer readable storage medium having instructions stored therein that when run on a computer, cause the computer to perform the batch cleaning method of notification of any of the above first aspects.
In a seventh aspect, there is provided a computer program product comprising instructions that, when run on an electronic device, enable the electronic device to perform the batch cleaning method of notification of any of the above first aspects.
In an eighth aspect, there is provided an apparatus (e.g. the apparatus may be a system-on-a-chip) comprising a processor for supporting an electronic device to implement the functions referred to in the first aspect above. In one possible design, the apparatus further includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, the device can be formed by a chip, and can also comprise the chip and other discrete devices.
The technical effects of any one of the design manners of the fourth aspect to the eighth aspect may be referred to the technical effects of the different design manners of the first aspect, and will not be repeated here.
Drawings
Fig. 1A is a schematic display diagram of a status bar interface of a mobile phone 1 according to an embodiment of the present application;
fig. 1B is a schematic structural diagram of a mobile phone 1 according to an embodiment of the present application;
fig. 2A is a schematic structural diagram of a communication system according to an embodiment of the present application;
fig. 2B is a schematic display diagram of a status bar interface of a tablet computer 2 according to an embodiment of the present application;
fig. 2C is a schematic structural diagram of a tablet pc 2 according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for batch cleaning of notifications according to an embodiment of the present application;
FIG. 5A is a flow chart of another method for batch cleaning notification according to an embodiment of the present application;
FIG. 5B is a flowchart illustrating another method for batch cleaning notification according to an embodiment of the present application;
FIG. 6A is a flow chart of another method for batch cleaning notification provided by an embodiment of the present application;
FIG. 6B is a flowchart illustrating another method for batch cleaning notification according to an embodiment of the present application;
FIG. 7A is a flow chart of another method for batch cleaning notification according to an embodiment of the present application;
Fig. 7B is a schematic display diagram of a setting interface of the tablet pc 2 according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a chip system according to an embodiment of the present application.
Detailed Description
When batch clearing of notification messages is performed, modules in the electronic device including a notification management center and a notification display center need to quickly delete a large number of notification messages in a short time in response to a batch clearing event. And the information interaction from the notification management center to the notification display center of the electronic device is developed by calling a binder. If a large number of notification messages need to be deleted in a short time, the thread pool of the binder is easily occupied, resulting in a part of processing operation information on the notification messages being lost or an application unresponsive (Application Not Response, ANR) popup window or the like. It should be noted that the batch processing of notification messages described above will result in a large number of operation requests occurring in a short period of time, which may be referred to as a high concurrency scenario for processing notification messages in some embodiments.
The application provides a batch clearing method of notifications, which is applied to first electronic equipment. The first electronic device may be a mobile phone, tablet, desktop, laptop, handheld computer, notebook, smart watch, ultra-mobile personal computer (UMPC), netbook, cell phone, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) \virtual reality (VR) device, media player, television, etc.
For example, taking the example that the first electronic device is the mobile phone 1 as shown in fig. 1A, the status bar interface 10 of the mobile phone 1 may be used to display notification messages from various application programs of the mobile phone 1. Typically, when a notification message exists in the notification bar, a "one-touch-and-clear" control is displayed in the status bar interface 10 of the mobile phone 1, as shown at 101 in fig. 1A. Typically, when the "one-touch clear" control 101 is triggered by the mobile phone 1, the mobile phone 1 needs to quickly clear all notification messages currently displayed. Illustratively, the user activates the "one-touch clear" control 101 and the handset 1 enters the interface shown in the right-hand diagram of fig. 1A after clearing all notification messages currently displayed. It should be appreciated that the control "one-touch clear" described above may also be named "all clear", "clear all notification" and other names. In the following embodiments of the present application, the notification in the mobile phone 1 and the tablet pc 2 is a notification message.
As shown in fig. 1B, the mobile phone 1 includes a first notification display center 102 and a first notification management center 103. In the process of triggering the "one-touch-and-clear" control 101 by the user, the first notification display center 102 sequentially deletes the plurality of first notifications displayed by the first notification display center 102 in response to the event of triggering the "one-touch-and-clear" control 101 by the user. The first notification display center 102 then transmits a clear instruction to the first notification management center 103. After the first notification management center 103 receives the purge instruction, the first notification management center 103 needs to delete the plurality of first notifications stored in the first notification management center 103 in response to the purge instruction.
In the related art, after the first notification management center 103 deletes the plurality of first notifications stored in the first notification management center 103, a message needs to be sent to each module monitoring the first notification management center 103, so as to notify each module monitoring the first notification management center 103 of an event of deleting the plurality of first notifications. The module for monitoring the first notification management center 103 includes the first notification display center 102, and as can be seen from the above description, when the first notification management center 103 sends a message to the first notification display directivity 102, the binder implementation needs to be invoked. Since the user triggers the one-key clearing in the current scenario, the first notification management center 103 deletes a large number of notification messages in a short time, and when the first notification management center 103 sends a message to the first notification display center 102, the thread pool of the binder is easily occupied, so that the problem that part of processing operation information of the notification messages is lost or ANR popup occurs is caused.
The batch clearing method for the notification is applied to the mobile phone 1. The plurality of first notifications displayed at the first notification display center 102 are deleted at the first notification display center 102 of the handset 1 in response to the batch clear event. Then, the first notification display center 102 sends a purge instruction to the first notification management center 103, where the purge instruction carries a first identifier, and the purge instruction is used to indicate that an event corresponding to the initial instruction is a batch purge event. In response to the purge instruction, the first notification management center 103 deletes the plurality of first notifications stored in the first notification management center 103. In addition, in the technical solution provided in the present application, the first notification management center 103 does not notify the first notification display center 102 of the event of deleting the plurality of first notifications based on the clearing instruction carrying the first identifier. Meanwhile, since the first notification display center 102 has deleted the plurality of first notifications prior to the first notification management center 103, the first notification management center 103 does not notify the first notification display center 102 of the event of deleting the plurality of first notifications, nor does it affect the notification message display problem of the mobile phone 1. That is, the first notification display center 102 is prevented from calling the binder to acquire an event of deleting a plurality of first notifications from the first notification management center 103, so that the problem that the binder is full, processing operation information is lost or ANR is generated due to high concurrency of processing notification messages in the scene is solved.
In other embodiments, the mobile phone 1 may also establish a connection with another electronic device (e.g., a second electronic device), and the mobile phone 1 synchronizes the notification of the mobile phone 1 to the second electronic device. The second electronic device may also be a cell phone, tablet, desktop, laptop, handheld computer, notebook, smart watch, UMPC, netbook, as well as a cell phone, PDA, AR/VR device, media player, television, etc. In an embodiment in which the mobile phone 1 synchronizes the notification message in the mobile phone 1 with the second electronic device, please continue to refer to fig. 1B, the mobile phone 1 further includes a first cross-device notification management center 104. The handset 1 may synchronize the notification messages in the handset 1 to the second electronic device through the first cross-device notification management center 104. The specific implementation process of the mobile phone 1 to establish a connection to the second electronic device and the mobile phone 1 to synchronize the notification in the mobile phone 1 to the second electronic device may refer to the description in the related art, which is not repeated in the embodiment of the present application.
Illustratively, as shown in fig. 2A, the mobile phone 1 establishes connection with the tablet computer 2, the notebook computer 3, the smart watch 4, and the like, respectively, and the mobile phone 1 synchronizes notification messages in the mobile phone 1 to the tablet computer 2, the notebook computer 3, the smart watch 4, respectively. In the scenario shown in fig. 2A, the mobile phone 1 may be referred to as a data source (source) for sending data, and the tablet 2, the notebook 3, and the smart watch 4 may be referred to as a data receiving end (sink) for receiving data on the trust ring of the mobile phone 1.
In the scenario shown in fig. 2A, a user processing a notification at source (e.g., deleting the notification) requires immediate synchronization to all sink ends. Similarly, the user processes (e.g., clicks, replies, deletes, etc.) the notification on one of the sink ends, and the sink end needs to synchronize to the source end first, and after the source end processes the notification, the sink end then resynchronizes to the other sink ends. That is, all devices on the trust ring are based on the state of the source end, and if the notification state of the source end is changed, the notification needs to be synchronized to all sink ends, so that the synchronous notification in all sink ends is ensured to be consistent with the notification of the source end.
For example, fig. 2B shows a notification message from the synchronization of the mobile phone 1 displayed on the status bar interface 200 of the tablet 2. Similar to cell phone 1, in the case where tablet 2 has notification messages from cell phone 1 that are synchronized, tablet 2 may also display a "one-touch clear" control 201 on status bar interface 200. The user triggers the "one-touch clear" control 201 on the tablet 2, and the tablet 2 needs to delete all the second notifications synchronized by the mobile phone 1. Meanwhile, the tablet pc 2 also needs to synchronize the notification message deleted in the tablet pc 2 in the mobile phone 1, that is, the tablet pc 2 needs to notify the mobile phone 1 of deleting the notification message.
In this scenario, the first cross-device notification management center 104 of the mobile phone 1 receives the clearing instruction from the tablet computer 2, and the mobile phone 1 deletes a plurality of second notifications in the mobile phone 1, which are synchronized by the mobile phone 1 to the tablet computer 2, according to the clearing instruction. Specifically, after the first cross-device notification management center 104 of the mobile phone 1 receives the purge instruction, the purge instruction is forwarded to the first notification management center 103. In response to the purge instruction, the first notification management center 103 deletes the plurality of second notifications stored in the first notification management center 103. The first notification display center 102 then learns of the event of clearing the plurality of second notifications from the first notification management center 103 by calling the binder. If the number of second notifications is large, the binder may still be full, resulting in a problem that the mobile phone 1 loses the information about the processing operation of part of the second notifications or generates ANR popup.
In the embodiment of the application, a batch clearing method for notification is provided, which is applied to the mobile phone 1. The user triggers a batch purge event when the tablet computer 2 triggers the "one-touch purge" control 201, and after deleting the plurality of second notifications stored in the tablet computer 2, the tablet computer 2 sends a purge instruction to the mobile phone 1. The second notification includes a notification that the mobile phone 1 synchronizes with the tablet computer 2. The first cross-device notification management center 104 of the mobile phone 1 receives the purge instruction from the tablet computer 2, and in response to the purge instruction, the first cross-device notification management center 104 forwards the purge instruction to the first notification management center 103. And the first notification management center 103 deletes the plurality of second notifications stored in the first notification management center 103 in response to the purge instruction. The first notification management center 103 then needs to notify the first notification display center 102 of the event (by calling the binder implementation) to delete the plurality of second notifications. In order to avoid that the binder is full due to high concurrence of processing notification messages, the first notification management center 103 judges the number of the second notifications, and if the number of the second notifications is greater than or equal to the preset number, the first notification management center 103 sends a clearing instruction to the first notification display center 102 every preset time period so as to notify the first notification display center 102 to delete the second notifications corresponding to the preset number. Thus, when the first notification management center 103 notifies the first notification display center 102 of deleting the second notification, a certain time is set between the two clearing instructions, so that the possibility that the binder is full is reduced, and loss of processing operation information or generation of ANR is avoided.
As shown in fig. 2C, in some embodiments, tablet 2 includes a second cross-device notification management center 202, a notification data management center 203, a second notification management center 204, and a second notification display center 205. The process of deleting the plurality of second notifications stored in the tablet computer 2 by the tablet computer 2 includes the following steps in sequence, wherein the user triggers the "one-key clearing" control 201 on the tablet computer 2: the second notification display center 205 deletes the plurality of second notifications, and the second notification management center 204 notifies the second notification display center 205 of an event to delete the plurality of second notifications. The binder implementation also needs to be invoked in the process of the second notification management center 204 notifying the second notification display center 205 of the deletion of the plurality of second notification events. Therefore, in order to avoid situations that the binder is full, the processing operation information is lost, or ANR is generated in the tablet computer 2, the fourth identifier may be carried in the purge instruction sent by the second notification display center 205 to the second notification management center 204, where the fourth identifier is used to indicate that the current purge instruction corresponds to a batch purge event. Further, after the second notification management center 204 deletes the plurality of second notifications, the second notification display center 205 is not notified of the event of deleting the plurality of second notifications. Therefore, the situation that the binder is full, processing operation information is lost or ANR is generated in the 2 of the tablet personal computer due to the batch deletion event can be avoided.
In other embodiments, when the user triggers the "one-touch clear" control 101 on the status bar interface 10 of the mobile phone 1 in fig. 1A, the notifications from the mobile phone 1, including the tablet 2, need to be deleted at each sink end. After the user triggers the "one-touch clear" control 101 of the mobile phone 1, the mobile phone 1 sends a clear instruction to the tablet computer 2 through the first cross-device notification management center 104 to instruct the tablet computer 2 to delete a plurality of first notifications in the tablet computer 2. The second notification management center 204 of the tablet computer 2 needs to invoke the binder to implement the process of deleting the plurality of first notifications from the second notification display center. If the first notification number is large, the binder may be full. In this scenario, therefore, the second notification management center 204 may be restricted to send clear instructions to the second notification display center 205 every preset time period, and each clear instruction is only used to instruct deletion of the notification corresponding to the preset number. In this way, the number of times of calling the binder in a short time is reduced, the possibility that the binder is full in a short time is reduced, and the loss of the processing operation information of the first notification or the generation of ANR in the tablet computer 2 is avoided.
In addition, when any one of the peer devices on the trust ring of the mobile phone 1 is disconnected from the mobile phone 1, the peer device needs to clear the notification from the synchronization of the mobile phone 1. Taking the case that the opposite terminal device is the tablet computer 2 as an example, when the synchronous switch in the mobile phone 1 or the tablet computer 2 is closed or the tablet computer 2 is offline, the disconnection between the mobile phone 1 and the tablet computer 2 is indicated. At this time, the tablet 2 needs to empty all notifications from the handset 1 synchronization.
In this scenario, multiple third notifications from the handset 1 synchronization need to be deleted quickly in a short time in the tablet 2. In the related art, after the second notification management center 204 deletes the plurality of third notifications stored therein, the second notification display center 205 needs to be notified of an event of deleting the plurality of third notifications. This process also requires invocation of the binder implementation, and thus tablet computer 2 is prone to situations in which the binder is full, processing operation information is lost, or ANR is generated.
With continued reference to fig. 2C, the tablet 2 package further includes a cross-device notification status controller 206.
In the embodiment of the application, a batch clearing method for notification is provided, which is applied to the tablet computer 2. The second cross-device notification management center 202 sends a clear instruction to the notification data management center 203 in response to the synchronized disconnection event. The synchronous disconnection event is used for indicating that the mobile phone 1 is disconnected with the tablet computer 2. In response to the purge instruction, the notification data management center 203 deletes the plurality of third notifications stored by the notification data management center 203. Notification data management center 203 then forwards the clear instruction to cross-device notification state controller 206.
In response to the purge instruction, if the number of third notifications is greater than or equal to the preset number, the cross-device notification status controller 206 sends the purge instruction to the second notification management center 204 every preset time period. The second notification management center 204 deletes the third notifications corresponding to the preset number stored in the second notification management center 204 in response to the clearing instruction. The second notification management center 204 then forwards the clear instruction to the second notification display center 205. In response to the clearing instruction, the second notification display center 205 deletes the third notifications corresponding to the preset number displayed by the second notification display center 205.
In the above embodiment, when the cross-device notification status controller 206 sends the clear instruction to the second notification management center 204, if the number of third notifications is greater than or equal to the preset number, the cross-device notification status controller 206 is restricted to send one clear instruction every preset time period, and each clear instruction is used to instruct the second notification management center 204 to delete the preset number of third notifications. Thus, when the second notification management center 204 notifies the second notification display center 205 of the deletion of the third notification after the third notification is deleted, there is not a large amount of third notifications that need to be deleted in a short time. Thereby avoiding the situation that the second notification display center 205 calls the binder to get the event of deleting the third notification from the second notification management center 204, the binder is full, the processing operation information is lost, or ANR is generated.
Fig. 3 is a schematic structural diagram of an electronic device 100 according to an embodiment of the application. The electronic device 100 may be the mobile phone 1 or the tablet computer 2 described above. As shown in fig. 3, the electronic device 100 may include: processor 110, internal memory 120, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, and display 180, among others.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the connection relationship between the modules illustrated in this embodiment is only illustrative, and does not limit the structure of the electronic device 100. In other embodiments, the electronic device 100 may also employ different interfaces in the above embodiments, or a combination of interfaces.
The charge management module 140 is configured to receive a charge input from a charger. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 120, the external memory, the display 180, the camera 192, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed 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, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), NFC, infrared (IR), etc., as applied on the electronic device 100. 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, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits 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 to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. Wireless communication techniques may include global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 180, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 180 and the application processor. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display 180 is used to display images, videos, and the like. The display 180 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (flex), a mini, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 180, N being a positive integer greater than 1.
The internal memory 120 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 120. For example, in an embodiment of the present application, the processor 110 may establish a bluetooth connection with other electronic devices and interact with short-range data with other electronic devices through the wireless communication module 160 by executing instructions stored in the internal memory 120 to synchronize notifications in the electronic device 100 with other electronic devices or the electronic device 100 may receive notifications synchronized from other electronic devices. The internal memory 120 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 120 may include a high-speed random access memory, and may also include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also 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. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to 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, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The batch clearing method for notification provided by the embodiment of the application can be applied to a scene that a binder is occupied when a batch clearing event of notification is carried out in a single electronic device.
The batch clearing method for the notifications provided by the other embodiment of the application can be applied to a scene that the first electronic device is occupied when the second electronic device generates batch clearing events on the premise that more than two electronic devices are connected, wherein the first electronic device synchronizes the notifications in the first electronic device to the second electronic device.
The batch clearing method for the notification provided by the other embodiment of the application can be applied to the situation that the first electronic device generates the batch clearing event of the notification on the premise that the first electronic device synchronizes the notification in the first electronic device to the second electronic device, and aims at the situation that the binder is occupied in the second electronic device.
The batch clearing method for the notifications provided by the other embodiment of the application can be applied to the scene that the binder is occupied in the second electronic device when the second electronic device is disconnected from the first electronic device on the premise that the first electronic device synchronizes the notifications in the first electronic device to the second electronic device.
Technical terms that may be involved in the present application are described below.
The notification management center refers to a notification manager service (NotificationManager Service, NMS) in the electronic device for storing notifications of the electronic device.
The notification display center refers to a System user interface (System user interface, system UI) in the electronic device, is an application visible to the naked eye of a user in System startup, and has a function of covering everything, such as a screen locking interface seen after startup, a charging interface during charging, a status bar, a navigation bar, a multitasking bar, and the like, which are all functions related to the Android mobile phone user.
Binder is one of the inter-process communication modes of the Android system. In the embodiment of the application, the notification management center and the notification display center of the electronic device respectively belong to two different processes, and the information interaction between the notification management center and the notification display center is realized by calling a binder.
ANR refers to a dialog box that the system displays to the user when the application response is not sensitive enough on the Android system.
Source and sink: source can be understood as a data source for transmitting data and sink as a data sink for receiving data. In the embodiment of the application, after the mobile phone 1 is connected with the tablet personal computer 2, the notebook computer 3, the intelligent watch 4 and the like, a trust ring of the mobile phone 1 is formed. In the trust ring, the mobile phone 1 is a source terminal, and the tablet computer 2, the notebook computer 3 and the smart watch 4 are sink terminals.
FIG. 4 is a flow chart of a method for batch cleaning of notifications according to an embodiment of the application. In this embodiment, the method is applied to the mobile phone 1, and includes steps S400-S404. Wherein:
s400, detecting batch cleaning events in the mobile phone 1 by the first notification display center.
In some embodiments, the batch clear event corresponds to the user triggering a "one-touch clear" control in the status bar interface of the handset 1. In response to the batch clear event, the handset 1 needs to quickly clear the status bar interface display of multiple notification messages. The "one-touch-and-clear" control is one control in the first notification display center, so that the first notification display center can detect when the user triggers the "one-touch-and-clear" control. In some embodiments, a batch purge event is used to purge all notifications in the status bar of handset 1.
S401, in response to the batch cleaning event, the first notification display center deletes a plurality of first notifications displayed by the first notification display center.
After the batch clear event is detected, the first notification display center needs to delete the plurality of first notifications displayed by the first notification display center. It will be appreciated that after the first notification display center deletes the plurality of first notifications displayed by the first notification display center, the plurality of first notifications will not be displayed on the status bar interface of the mobile phone 1.
In some embodiments, the first notification display center deletes the plurality of first notifications displayed by the first notification display center, and may specifically include: the first notification display center deletes each first notification in turn according to the time sequence of each first notification. For example, the first notification display center sequentially deletes the first notification from "information" shown in fig. 1A, the first notification from "game center", the first notification from "mailbox", and the like from near to far in time.
S402, the first notification display center sends a first clearing instruction to the first notification management center.
In some embodiments, the first purge instruction includes a first flag to indicate that an event corresponding to the first purge instruction is a batch purge event.
In some embodiments, the first notification display center deletes each first notification in turn. For example, after deleting the first notification a, the first notification display center sends a corresponding first clear instruction to the first notification management center, where the first clear instruction is used to instruct the first notification management center to delete the first notification a stored in the first notification management center. Similarly, after deleting the first notification B, the first notification display center sends a corresponding first clearing instruction to the first notification management center, so as to instruct the first notification management center to delete the first notification B. For other first notifications, and so on. Wherein the first clear instruction includes a first identification.
In other embodiments, the first notification display center deletes each first notification sequentially, or may send a first clear instruction to the first notification management center, where the first clear instruction is used to instruct the first notification management center to delete multiple first notifications stored in the first notification management center. That is, the first notification display center transmits only one first clear instruction to the first notification management center in the present embodiment.
S403, the first notification management center receives a first clearing instruction.
S404, in response to the first clearing instruction, the first notification management center deletes a plurality of first notifications stored by the first notification management center.
After the first notification management center receives the first clearing instruction, deleting a plurality of first notifications stored in the first notification management center according to the first clearing instruction.
In the related art, after the first notification management center deletes the plurality of first notifications stored in the first notification management center, it is also necessary to notify each module listening to the first notification management center of an event of deleting the plurality of first notifications. The module also includes a first notification display center. The first notification management center needs to call the binder to realize in the process of notifying the first notification management display center of deleting a plurality of first notifications, and if the number of the first notifications is large, the binder may be occupied in a short time, and the problem of processing operation information loss or ANR generation may occur.
As is clear from S401 described above, in the embodiment of the present application, the first notification display center has deleted the plurality of first notifications displayed by the first notification display center before the first notification management center deletes the plurality of first notifications. The first notification management center receives a first clearing instruction including a first identifier, and the first notification management center can determine that the current deletion of the plurality of first notifications corresponds to a batch clearing event. That is, the first notification management center may determine that the first notification display center has deleted the plurality of first notifications before S404, that is, it is not necessary to notify the event of deleting the plurality of first notifications. Therefore, in order to avoid that the binder is fully occupied in a short time, in the embodiment of the present application, the first notification management center does not notify the first notification display center of an event of deleting the plurality of first notifications after deleting the plurality of first notifications.
According to the technical scheme provided by the embodiment of the application, when a user triggers the one-key clearing control of the mobile phone 1, the first notification management center deletes a plurality of first notifications by setting the first identifier in the clearing instruction sent by the first notification display center to the first notification management center, and then the first notification management center is not informed of the events of the plurality of first notifications. Therefore, the step that the mobile phone 1 needs to call the binder under the batch clearing scene of the notification is canceled, and the problem that the processing operation information of the mobile phone 1 is lost or ANR is generated due to the fact that the binder is occupied is avoided.
Further, the mobile phone 1 may establish a connection with a second electronic device (such as the tablet computer 2), and the mobile phone 1 synchronizes the notification message in the mobile phone 1 with the tablet computer 2 through the first cross-device notification management center. In this scenario, after the mobile phone 1 triggers the "one-touch clear" control, the user needs to delete not only the plurality of first notifications of the mobile phone 1, but also the event of deleting the first notifications to the tablet computer 2, so that the states of the plurality of first notifications in the tablet computer 2 are synchronized with the states of the plurality of first notifications in the mobile phone 1. Referring to fig. 5A, in this embodiment, after S401, the method further includes S501-S503, where:
s501, the first notification display center sends a second clearing instruction to the first cross-device notification management center.
The second clearing instruction is used for instructing the first cross-device notification management center to notify the tablet computer 2 of an event of deleting a plurality of first notifications. In some embodiments, the second purge instruction includes a second identifier, where the second identifier is used to indicate that an event corresponding to the second purge instruction is a batch purge event.
S502, the first cross-device notification management center receives a second clearing instruction.
S503, the first cross-device notification management center forwards a second clearing instruction to the tablet computer 2.
The second clearing instruction is used for instructing the tablet computer 2 to delete a plurality of first notifications stored in the tablet computer 2 and synchronized by the mobile phone 1. The first cross-device notification management center is used for managing relevant information of notification synchronization between other electronic devices (such as the tablet computer 2) in the mobile phone 1. After receiving the second clearing instruction, the first cross-device notification management center forwards the second clearing instruction to the tablet computer 2, and notifies the tablet computer 2 to delete the plurality of first notifications from the mobile phone 1 synchronization. Because the second purge instruction includes the second identifier for indicating the batch purge event, the tablet computer 2 needs to delete the plurality of first notifications stored/displayed in the tablet computer 2 after receiving the second purge instruction.
In some embodiments, there may be a later point in time when the tablet 2 establishes a connection with the handset 1, and the handset 1 will synchronize notifications received in the handset 1 after the point in time when the connection is established with the tablet 2 only after the connection is established with the tablet 2. In this way, only the first notification in part of the handset 1 may be synchronized in the tablet 2. In this scenario, after the first cross-device notification management center of the mobile phone 1 sends the second clearing instruction to the tablet computer 2, the tablet computer 2 deletes all notifications in the tablet computer 2 that the mobile phone 1 synchronizes with the tablet computer 2 according to the second identifier in the second clearing instruction.
In some embodiments, the first cross-device notification management center and the first notification display center belong to the same process, so that the first notification display center sends the second clearing instruction to the first cross-device notification management center, interaction between different processes is not involved, and a process needing to call a binder does not exist. There are no problems that may arise from invoking a binder.
In the technical scheme provided by the embodiment of the application, the first notification display center sends the second clearing instruction to the first cross-device notification management center, so that the first cross-device notification management center notifies each second electronic device to delete a plurality of first notifications, and the state of the first notification in the second electronic device is ensured to be consistent with the state of the first notification in the mobile phone 1.
Further, in some embodiments, S503 specifically refers to forwarding the second clear instruction to the second cross-device notification management center of the tablet computer 2. Referring to fig. 5B, after the second cross-device notification management center of the tablet computer 2 receives the second clear command, steps executed by each module in the tablet computer 2 include S504-S519. In fig. 5B, the "batch clear event occurred in the mobile phone 1" indicates S400 to S404 and S501 to S502. Wherein:
S504, the second cross-device notification management center receives a second cleaning instruction.
S505, responding to the second clearing instruction, and forwarding the second clearing instruction to the notification data management center by the second cross-device notification management center.
S506, notifying the data management center to receive a second clearing instruction.
The notification data management center is used for managing all notification messages in the tablet computer 2, including notification messages synchronized by the mobile phone 1 to the tablet computer 2, notification messages received by the tablet computer 2 locally, and notifications synchronized by other electronic devices to the tablet computer 2.
S507, responding to a second clearing instruction, and deleting a plurality of second notifications stored by the notification data management center.
The plurality of second notifications include all notifications that the mobile phone 1 synchronizes with the tablet 2. In some embodiments, when the mobile phone 1 synchronizes all notifications in the mobile phone 1 with the tablet computer 2, the plurality of second notifications in the tablet computer 2 are all notifications in the mobile phone 1, i.e. the plurality of first notifications. In other embodiments, the mobile phone 1 synchronizes only a part of the notifications in the mobile phone 1 to the tablet computer 2, and then the plurality of second notifications in the tablet computer 2 may also be only a part of the notifications in the mobile phone 1, that is, a part of the notifications in the plurality of first notifications.
In this embodiment, in response to the second clearing instruction, the notification data management center needs to determine which notifications in the tablet computer 2 are notifications that the mobile phone 1 synchronizes with the tablet computer 2, i.e., a plurality of second notifications. Meanwhile, in response to the second purge instruction, the notification data management center deletes the plurality of second notifications stored by the notification data management center.
S508, the notification data management center sends an eleventh clearing instruction to the cross-device notification state controller.
Wherein the cross-device notification manager is configured to forward data and instructions between the notification data management center and the second notification management center. In some embodiments, the eleventh clear instruction includes a plurality of second notifications that need to be deleted. Because of the second notification stored in the tablet 2 that is synchronized by the handset 1 to the tablet 2, it is necessary to screen out all notifications of the tablet 2 by the notification data management center. Thus, after the notification data management center filters and deletes the plurality of second notifications of the notification management center, the eleventh clear instruction sent by the notification data management center to the cross-device notification status controller needs to include the plurality of second notifications for instructing the following modules which notifications to delete.
In some embodiments, the eleventh clear instruction includes notification identifications of the plurality of second notifications. In some embodiments, the notification identifier is used to uniquely identify all notifications stored in the current tablet 2, including notifications local to the tablet 2, and notifications synchronized by the cell phone 1 or other electronic devices in the tablet 2 to the tablet 2. For example, the tablet 2 may set a unique notification identifier for each notification according to notification information such as notification source, time of receiving the notification, and the like.
In other embodiments, the notification identifier is used to distinguish between a local notification stored in the tablet 2, a notification that the handset 1 is synchronized to the tablet 2, a notification that other electronic devices are synchronized to the tablet 2, and so on. Illustratively, a first notification identifier is set in the tablet 2 for notifications synchronized by the mobile phone 1 to the tablet 2, a second notification identifier is set for local notifications, a third notification identifier is set for notifications synchronized by other electronic devices (e.g., a third electronic device) to the tablet 2, and so on.
S509. the cross device informs the state controller to receive the eleventh clear instruction.
S510, the cross-device notification state controller forwards an eleventh clearing instruction to the second notification management center.
S511, the second notification management center receives an eleventh clearing instruction.
S512, responding to the eleventh clearing instruction, and deleting a plurality of second notices stored by the second notice management center.
Since the notification stored in the second notification management center includes not only the notification that the mobile phone 1 in the tablet computer 2 is synchronized to the tablet computer 2, but also the notification that the tablet computer 2 is local. Therefore, the second notification management center needs to delete the notification stored in the second notification management center that the mobile phone 1 is synchronized with the tablet computer 2 in response to the eleventh clear instruction. In some embodiments, the second notification management center deletes the plurality of second notifications of the second notification management center according to the notification identifications of the plurality of second notifications included in the eleventh clear instruction.
S513, the second notification management center judges whether the number of the second notifications is larger than or equal to the preset number.
S514, if yes, the second notification management center sends a twelfth clearing instruction to the second notification display center every preset time period.
The twelfth clearing instruction is used for indicating the second notification display center to delete the second notifications corresponding to the preset number. It will be appreciated that, in the tablet 2, the second notification management center notifies the second notification display center of the event of deleting the second notification, which also needs to be implemented by calling the binder. Therefore, when detecting that the number of second notification is large, in order to avoid that the binder is full in a short time, in the embodiment of the present application, the second notification management center sends a clear command to the second notification display center at intervals of a preset time period.
In some embodiments, the twelfth clear instruction includes notification identifiers of the second notifications corresponding to the preset number to be deleted. The second notification display center can determine which part of the second notification in the second notification display center needs to be deleted according to the preset number of notification identifiers contained in the twelfth clearing instruction.
In some embodiments, the preset time period and the preset number may be set according to actual situations. By way of example, the preset time period may be set to 30 milliseconds (ms), 50ms, 80ms, etc.; the preset number may be set to 5, 10, 15, etc.
S515, the second informing display center receives a twelfth clearing instruction.
S516, responding to a twelfth clearing instruction, and deleting second notices corresponding to the preset quantity displayed by the second notice display center.
After the second notification management center and the second notification display center delete the plurality of second notifications, that is, the notifications in the tablet computer 2 synchronized by the mobile phone 1 to the tablet computer 2 are deleted, that is, the state of the notifications in the tablet computer 2 synchronized by the mobile phone 1 is consistent with the state in the mobile phone 1.
In the above embodiment, after the mobile phone 1 triggers the batch clearing event of the notification, the notification from the mobile phone 1 in the tablet computer 2 and the notification in the mobile phone 1 realize the state synchronization. And when the number of second notifications is larger in the tablet computer 2, sending a clearing instruction to the second notification display center through a preset time period at intervals, wherein the clearing instruction is only used for indicating to delete a small number (preset number) of corresponding second notifications. In this way, the number of times of calling the binder in a short time is reduced, and the binder can be prevented from being fully occupied in a short time, so that the loss of processing operation information or the generation of ANR caused by the fully occupied binder is avoided.
In the above embodiment, the execution process of the tablet computer 2 when the second notification is greater than or equal to the preset number is described, but in actual situations, the number of notifications that the mobile phone 1 stored in the tablet computer 2 synchronizes with the tablet computer 2 may also be smaller than the preset number. With continued reference to FIG. 5B, in other embodiments, if the number of second notifications is less than the preset number, then S517-S519 are included.
S517, the second notification management center sends a fourteenth clearing instruction to the second notification display center.
In some embodiments, a fourteenth clear instruction is to instruct the second notification display center to delete the plurality of second notifications. In some embodiments, the fourteenth clear instruction includes a notification identifier of the plurality of second notifications, the notification identifier being for the second notification display center to delete the corresponding second notification according to the notification identifier.
S518, the second informing display center receives a fourteenth clearing instruction.
S519, in response to the fourteenth clearing instruction, the second notification display center deletes the plurality of second notifications.
If the number of the second notifications is small, the second notification management center sends a clearing instruction to the second notification display center after deleting the plurality of second notifications in a conventional manner, and notifies the second notification display center to delete the plurality of second notifications displayed by the second notification display center. In this way, the notification of the synchronization of the tablet computer 2 by the mobile phone 1 and the notification of the state synchronization of the mobile phone 1 are realized, and the situation that the binder is occupied for a short time does not occur.
In other embodiments, after S509 above, the tablet 2 may also determine the number of second notifications at the cross-device notification status controller. And if the number of the second notifications is greater than or equal to the preset number, when the cross-device notification state controller sends a clearing instruction to the second notification management center, the clearing instruction is sent by spacing a preset time period, and the clearing instruction is only used for indicating a mode of deleting a small number (preset number) of corresponding second notifications. Therefore, the number of times of calling the binder in a short time is reduced, so that the problem that the binder of the tablet computer 2 is occupied in a short time and the processing operation information is lost or ANR is generated is avoided.
Further, in this embodiment, after S509, in response to the eleventh purge instruction, the cross-device notification status controller determines whether the number of second notifications is greater than or equal to a preset number. If yes, the cross-equipment notification state controller sends a thirteenth clearing instruction to the second notification management center at preset time intervals. The thirteenth clearing instruction is used for indicating the second notification management center to delete the second notifications corresponding to the preset number. The second notification management center receives a thirteenth clear instruction. In response to the thirteenth clear instruction, the second notification management center deletes the second notifications corresponding to the preset number. And the second notification management center forwards the thirteenth clear instruction to the second notification display center. And deleting the second notices corresponding to the preset quantity displayed in the second notice display center after the thirteenth clearing instruction is received by the second notice display center. In this way, since the number and the time interval are limited when the cross-device notification status controller transmits the thirteenth clear command to the second notification management center, the problem of loss of processing operation information or ANR generation is not caused because the binder is occupied in a short time when the second notification management center forwards the thirteenth clear command to the second notification display center.
In the above embodiment, when the second notification number is greater than or equal to the preset number, the cross-device notification status controller limits the number of notifications to be deleted and the clearing instruction in a time interval. It may be appreciated that, if the second notification number is less than the preset number, the clear instruction sent by the cross-device notification status controller to the second notification management center is used to instruct the second notification management center to delete the plurality of second notifications.
In the scenario shown in fig. 2B, multiple second notifications from the handset 1 sync are displayed in the tablet 2, and a "one-touch clear" control is displayed in the status bar of the tablet 2. The user triggers a one-key clearing control on the tablet computer 2, and the tablet computer 2 needs to delete a plurality of second notifications synchronized by the mobile phone 1 to the tablet computer 2. After the tablet pc 2 deletes the plurality of second notifications, the event of deleting the plurality of second notifications needs to be notified to the mobile phone 1. After receiving the event of deleting the plurality of second notifications notified by the tablet computer 2, the mobile phone 1 needs to delete the plurality of second notifications in the mobile phone 1, so that the states of the mobile phone 1 and the second notifications in the tablet computer 2 are kept synchronous. In the scenario where the tablet 2 triggers a notification batch purge event, the present application provides a notification batch purge method, as shown in fig. 6A, which includes S600-S610.
S600, a second notification display center detects batch cleaning events of the tablet personal computer 2.
In some embodiments, the batch clear event corresponds to the user triggering a "one-touch clear" control in the status bar interface of tablet 2. Tablet 2, in response to the batch purge event, needs to quickly purge the status bar interface display of multiple notification messages. The "one-touch-and-clear" control is one control in the first notification display center, so that when the user triggers the "one-touch-and-clear" control, the first notification display center can detect the event. In some embodiments, a batch purge event is used to purge all notifications displayed in the status bar of tablet 2.
S601, responding to a batch cleaning event, and deleting a plurality of third notifications which are displayed by the second notification display center and are synchronous by the mobile phone 1 to the tablet computer 2 by the second notification display center.
In the present embodiment, in order to distinguish from the previous embodiments, the notification of the synchronization of the mobile phone 1 stored in the tablet computer 2 to the tablet computer 2 is noted as a third notification.
S602, the second notification display center sends an eighth clearing instruction to the second notification management center.
Wherein the eighth clear instruction includes a fourth identification. In some embodiments, the fourth identification is used to indicate that the event corresponding to the eighth flush instruction is a batch flush event. The eighth purge instruction is for instructing the second notification management center to delete the plurality of third notifications stored in the second notification management center.
In other embodiments, the eighth clear instruction further includes a notification identification of a plurality of third notifications. Thus, the second notification management center receives the eighth clear instruction, and can determine which notifications need to be deleted are.
S603, the second notification management center receives an eighth clearing instruction.
S604, responding to an eighth clearing instruction, and deleting a plurality of third notices stored by the second notice management center.
In the present embodiment, after the second notification management center deletes the plurality of third notifications, the second notification display center is not notified of an event of deleting the plurality of third notifications. Since the fourth identifier carried in the eighth clear instruction indicates that the event corresponding to the eighth clear instruction is a batch deletion event, that is, after the second notification management center receives the eighth clear instruction, it may be determined that the second notification display center has deleted the plurality of third notifications. Therefore, in this embodiment, the second notification management center does not notify the second notification display center of an event to delete the plurality of third notifications after deleting the plurality of third notifications stored by the second notification management center. In this way, the step of notifying the second notification management center to the second notification display center is canceled, and the display of the deletion notification in the tablet pc 2 is not affected. And the second notification management center does not send a notification to the second notification display center, so that the sender does not need to be called, and the problem of operation information loss or ANR generation caused by the fact that the sender is occupied in a short time is avoided.
S605, the second notification display center sends a sixth clearing instruction to the second cross-device notification management center.
The sixth clearing instruction comprises a third identifier, and the third identifier is used for indicating that an event corresponding to the sixth clear instruction is a batch clearing event.
S606, the second cross-device notification management center receives the sixth cleaning instruction and forwards the sixth cleaning instruction to the notification management data center.
S607, notifying the management data center to receive a sixth clearing instruction.
S608, responding to a sixth clearing instruction, and deleting a plurality of third notifications stored by the notification management data center.
S609, the notification data management center sends a seventh clearing instruction to the cross-device notification state controller.
In some embodiments, the seventh clear instruction includes notification identifications of a plurality of third notifications, and the module for receiving the seventh clear instruction determines which of the notifications that require deletion based on the seventh clear instruction.
S610, notifying the state controller of the cross-device to receive the seventh clearing instruction and forwarding the seventh clearing instruction to the mobile phone 1.
The seventh clearing instruction is used for instructing the mobile phone 1 to delete a plurality of third notifications.
In the technical scheme provided by the embodiment of the application, when the tablet personal computer 2 triggers batch cleaning, the second notification management center does not send a notification to the second notification display center after deleting a plurality of third notifications stored in the second notification management center, namely, the step of calling the binder in the process of the tablet personal computer 2 is canceled. And, send the clear command to the second cross-device notification management center by the second notification display center to notify the first electronic device of deleting a plurality of third notification events, not involving the operation between processes, nor calling the binder. Thus, the problem of losing operation information or generating ANR caused by the fact that the binder is occupied in a short time is avoided.
In some embodiments, the cross-device notification status controller of the tablet 2 forwards the seventh clear instruction specifically to the first cross-device notification manager of the handset 1. Referring to fig. 6B, after the first cross-device notification management center of the mobile phone 1 receives the seventh clearing command, steps executed by each module in the mobile phone 1 include S611-S616. Note that in fig. 6B, the "batch clear event occurs to the tablet pc 2" indicates S601 to S609 described above. Wherein:
s611. the first cross-device notification management center receives a third clear instruction from the tablet computer 2.
The third clearing instruction is used for instructing the mobile phone 1 to delete a plurality of second notifications synchronized by the mobile phone 1 to the tablet computer 2. In some embodiments, the third clear instruction includes notification identifications of the plurality of second notifications. After receiving the third purge instruction, the mobile phone 1 can determine which notifications are notifications that the third purge instruction needs to be deleted according to the notification identifications of the plurality of second notifications. It should be understood that in the present embodiment, the third clear instruction in S611, that is, the seventh clear instruction in S610; the plurality of second notifications indicated by the third clear instruction are a plurality of third notifications corresponding to the seventh clear instruction.
S612, the first cross-device notification management center forwards a third clearing instruction to the first notification management center.
S613, the first notification management center receives a third clearing instruction.
S614. in response to the third clear instruction, the first notification management center deletes the plurality of second notifications stored in the first notification management center.
S615, when the number of the plurality of second notifications is greater than or equal to the preset number, the first notification management center sends a fourth clearing instruction to the first notification display center every preset time period.
The fourth clearing instruction is used for indicating the first notification display center to delete the second notifications corresponding to the preset number.
In other embodiments, if the number of second notifications is less than the preset number, the first notification management center may directly send a clear instruction to the first notification display center for notifying the first notification display center to delete the plurality of second notifications. As shown in S616 of fig. 6B.
S616, when the number of the second notifications is smaller than the preset number, the first notification management center sends a fifth clearing instruction to the first notification display center.
The fifth clearing instruction is used for instructing the first notification display center to delete the second notification displayed in the first notification display center.
In the technical scheme provided by the embodiment of the application, after the first notification management center deletes the plurality of second notifications, the number of the second notifications is judged before the first notification display center is notified of the event of deleting the plurality of second notifications. And when the number of the second notifications is greater than or equal to the preset number, the second notification management center sends a clearing instruction to the second notification display center through a preset time period at intervals when the second notification management center sends the clearing instruction, and each clearing instruction is only used for indicating to delete the second notifications corresponding to the preset number. The number of times of calling the binder in a short time can be reduced when the second notification management center notifies the second notification display center of the event of deleting the plurality of second notifications, so that the problem that the binder is occupied in a short time to cause the loss of processing operation information or the generation of ANR is avoided.
In some embodiments, when the user triggers a batch purge event at tablet 2 that stores notifications from handset 1 in tablet 2, tablet 2 notifies handset 1 to delete the plurality of second notifications stored in handset 1 after tablet 2 deletes the plurality of second notifications that handset 1 deleted to tablet 2. If the handset 1 also establishes a connection with other electronic equipment and the notifications in the handset 1 are synchronized in the other electronic equipment as well, such as the notebook computer 3, the smart watch 4, etc. as shown in fig. 2A. After the mobile phone 1 deletes the plurality of second notifications, the mobile phone 1 also needs to notify other electronic devices such as the notebook computer 3 and the smart watch 4 of the event of deleting the plurality of second notifications, so that the states of the plurality of second notifications in other electronic devices such as the notebook computer 3 and the smart watch 4 are consistent with the states of the second notifications in the mobile phone 1. After S612, the mobile phone 1 may forward the third clearing instruction to the other electronic device by using the first cross-device notification management center. Accordingly, the process of deleting the plurality of second notification in the other electronic devices after receiving the third clearing instruction may refer to the description related to S504-S519 shown in fig. 5B, which is not described herein.
In the scenario shown in fig. 2A, the handset 1 serves as a source end, establishes a connection with a sink end device (such as the tablet 2) on its trust ring, and the notifications in the handset 1 are synchronized at the tablet 2. Under the condition that the tablet computer 2 is disconnected with the mobile phone 1, the tablet computer 2 needs to empty the notification of the mobile phone 1 to the tablet computer 2 in synchronization in the tablet computer 2. In this scenario, when the tablet pc 2 needs to delete a plurality of notifications in a short time, and the second notification management center of the tablet pc 2 notifies the second notification display center of an event of deleting a plurality of notifications, there may be a case where the processing operation information is lost or ANR is generated due to the fact that the binder is full in a short time. Therefore, in the embodiment of the present application, there is also provided a batch clearing method for notification, as shown in fig. 7A, including S700-S718.
S700, the second cross-device informs the management center of detecting the synchronous disconnection event.
S701, responding to a synchronous disconnection event, and sending a ninth clearing instruction to a notification data management center by a second cross-device notification management center.
The synchronous disconnection event is used for indicating that the mobile phone 1 is disconnected with the tablet computer 2. In some embodiments, the synchronized off event includes a synchronized switch in the cell phone 1 or tablet 2 being closed, or the tablet 2 being offline. In some embodiments, as shown in fig. 7B, a setting interface of the tablet pc 2 according to an embodiment of the present application is provided. In the setup interface shown in fig. 7B, the synchronization function 70 in the tablet computer 2 is in an off state. In some embodiments, the sync-off event may be the user turning off the sync switch in the handset 1 or tablet 2, or the user canceling the sync notification to the tablet 2 in the handset 1, or the tablet 2 going offline, etc.
In some embodiments, the ninth clear instruction includes a fifth identifier, where the fifth identifier is used to indicate that an event corresponding to the ninth clear instruction is a synchronous disconnection event.
S702, notifying the data management center to receive a ninth clearing instruction.
S703, responding to a ninth clearing instruction, and deleting a plurality of third notifications stored by the notification data management center.
Similar to the user triggering a batch purge event in tablet 2, the notification data management center needs to determine which part of the notifications in tablet 2 are notifications that handset 1 is synchronizing to tablet 2. The notification data management center may then delete the portion of the notification.
S704, notifying the data management center to transmit a ninth clearing instruction to the cross-device notification state controller.
S705. the cross device notification status controller receives a ninth clear instruction.
S706, responding to the ninth clearing instruction, and judging whether the number of the third notifications is larger than or equal to the preset number by the cross-device notification state controller.
If the cross-device notification status controller determines that the number of third notifications is greater than or equal to the preset number, the cross-device notification status controller may perform S707.
S707, the cross-device notification state controller sends a tenth clearing instruction to the second notification management center every preset time period.
Since the tablet pc 2 detects the sync-off event, in order to avoid that the processing operation information is lost or ANR is generated because the bundle is full due to the need to delete the plurality of third notifications in a short time when the second notification management center notifies the second notification display center of deleting the plurality of third notifications. When the cross-equipment notification management center sends a clearing instruction to the second notification management center, sending one clearing instruction at intervals of a preset time period, wherein each clearing instruction is only used for instructing the second notification management center to delete third notifications corresponding to the preset number. In this way, the second notification management center deletes the third notifications corresponding to the preset number every preset time period, and when the second notification management center notifies the second notification display center of the event of deleting the notifications, a large number of notifications do not need to be deleted in a short time. Thus, loss of processing operation information or generation of ANR due to the fact that the binder is full can be avoided.
S708, the second notification management center receives a tenth clearing instruction.
S709, responding to a tenth clearing instruction, and deleting third notices corresponding to the preset quantity stored by the second notice management center.
S710, the second notification management center forwards a tenth clearing instruction to the second notification display center.
S711, the second informing display center receives a tenth clearing instruction.
S712, responding to a tenth clearing instruction, and deleting third notices corresponding to the preset quantity displayed by the second notice display center.
It is understood that after S706, if the cross-device notification status controller determines that the third notification number is less than the preset number, the cross-device notification status controller may perform S713. With continued reference to fig. 7A, in this embodiment, the method further includes S713-S718.
S713, the cross-device notification state controller sends a fifteenth clearing instruction to the second notification management center.
S714, the second notification management center receives a fifteenth clearing instruction.
S715, in response to the fifteenth clearing instruction, the second notification management center deletes a plurality of third notifications stored by the second notification management center.
S716, the second notification management center forwards a fifteenth clearing instruction to the second notification display center.
S717, the second informing display center receives a fifteenth clearing instruction.
S718, responding to a fifteenth clearing instruction, and deleting a plurality of third notices displayed by the second notice display center.
According to the technical scheme provided by the embodiment of the application, when the sink end such as the tablet computer 2 and the like detects that the sink end is disconnected with the source end (the mobile phone 1), the sink end quickly empties the notification stored in the sink end and coming from the source end synchronization, so that the problem that processing operation information is lost or ANR is generated due to the fact that the binder is occupied can be avoided.
Some embodiments of the present application provide an electronic device, which is the mobile phone 1 or the tablet computer 2. The electronic device may include: memory, one or more processors. The memory is coupled to the processor. The memory is for storing computer program code, the computer program code comprising computer instructions. When the processor executes the computer instructions, the electronic device may perform the functions or steps performed by the mobile phone 1 or the tablet pc 2 in the above-described method embodiments. The structure of the electronic device may refer to the structure of the electronic device 100 shown in fig. 3.
The present application also provides a chip system, as shown in fig. 8, the chip system 80 includes at least one processor 801 and at least one interface circuit 802. The processor 801 and the interface circuit 802 may be interconnected by wires. For example, interface circuit 802 may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, interface circuit 802 may be used to send signals to other devices (e.g., processor 801). The interface circuit 802 may, for example, read instructions stored in a memory and send the instructions to the processor 801. The instructions, when executed by the processor 801, may cause the electronic device to perform the various steps of the embodiments described above. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium, which comprises computer instructions, when the computer instructions run on the mobile phone 1 or the tablet computer 2, the electronic device is caused to execute the functions or steps executed by the mobile phone 1 or the tablet computer 2 in the embodiment of the method.
The embodiment of the application also provides a computer program product, when the computer program product runs on a computer, the computer is caused to execute the functions or steps executed by the mobile phone 1 or the tablet personal computer 2 in the embodiment of the method. The computer may be the mobile phone 1 or the tablet computer 2.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (12)

1. The batch clearing method for the notifications is characterized by being applied to first electronic equipment, wherein the first electronic equipment comprises a first notification management center and a first notification display center; the method comprises the following steps:
the first notification display center responds to a batch clearing event of the first electronic equipment and deletes a plurality of first notifications displayed by the first notification display center;
the first notification display center sends a first clearing instruction to the first notification management center; the first clearing instruction is used for indicating the first notification management center to delete the plurality of first notifications stored in the first notification management center, the first clearing instruction comprises a first identifier, and the first identifier is used for indicating that an event corresponding to the first clearing instruction is the batch clearing event;
the first notification management center receives the first clearing instruction from the first notification display center;
Responsive to the first purge instruction, the first notification management center deletes the plurality of first notifications stored by the first notification management center; and after deleting the plurality of first notifications, the first notification management center does not notify the first notification display center of an event for deleting the plurality of first notifications.
2. The method of claim 1, wherein the first electronic device further comprises a first cross-device notification management center; the first electronic device is connected with the second electronic device, and the first electronic device synchronizes the notification in the first electronic device to the second electronic device through the first cross-device notification management center;
after the deleting the plurality of first notifications displayed by the first notification display center, the method further includes:
the first notification display center sends a second clearing instruction to the first cross-device notification management center; the second clearing instruction comprises a second identifier, and the second identifier is used for indicating that an event corresponding to the second clearing instruction is the batch clearing event;
the first cross-device notification management center receives the second clearing instruction and forwards the second clearing instruction to the second electronic device; the second clearing instruction is used for instructing the second electronic device to delete the plurality of first notifications stored in the second electronic device and synchronized by the first electronic device.
3. The method according to claim 2, wherein the method further comprises:
the first cross-device notification management center receives a third clearing instruction from the second electronic device; the third clearing instruction is used for indicating the first electronic equipment to delete a plurality of second notifications synchronized by the first electronic equipment to the second electronic equipment;
the first cross-device notification management center forwards the third clearing instruction to the first notification management center;
the first notification management center receives the third clearing instruction;
in response to the third purge instruction, the first notification management center deletes the plurality of second notifications stored in the first notification management center;
when the number of the plurality of second notifications is greater than or equal to the preset number, the first notification management center sends a fourth clearing instruction to the first notification display center every preset time period; the fourth clearing instruction is used for indicating the first notification display center to delete the second notifications corresponding to the preset number.
4. A method according to claim 3, characterized in that the method further comprises:
When the number of the second notifications is smaller than the preset number, the first notification management center sends a fifth clearing instruction to the first notification display center; the fifth clear instruction is for instructing the first notification display center to delete the second notification displayed in the first notification display center.
5. The batch clearing method for the notifications is characterized by being applied to first electronic equipment, wherein the first electronic equipment comprises a first notification display center, a first notification management center and a first cross-equipment notification management center, the first electronic equipment is connected with second electronic equipment, and the first electronic equipment synchronizes the notifications in the first electronic equipment to the second electronic equipment through the first cross-equipment notification management center; the method comprises the following steps:
the first cross-device notification management center receives a third clearing instruction from the second electronic device; the third clearing instruction is used for indicating the first electronic equipment to delete a plurality of second notifications synchronized by the first electronic equipment to the second electronic equipment;
the first cross-device notification management center forwards the third clearing instruction to the first notification management center;
The first notification management center receives the third clearing instruction;
in response to the third purge instruction, the first notification management center deletes a second notification stored in the first notification management center;
when the number of the plurality of second notifications is greater than or equal to the preset number, the first notification management center sends a fourth clearing instruction to the first notification display center every preset time period; the fourth clearing instruction is used for indicating the first notification display center to delete the second notifications corresponding to the preset number.
6. The method of claim 5, wherein the method further comprises:
when the number of the second notifications is smaller than the preset number, the first notification management center sends a fifth clearing instruction to the first notification display center; the fifth clear instruction is for instructing the first notification display center to delete the second notification displayed in the first notification display center.
7. The batch clearing method for the notifications is characterized by being applied to second electronic equipment, wherein the second electronic equipment comprises a second notification display center, a second cross-equipment notification management center, a notification data management center and a cross-equipment notification state controller; the second electronic equipment is connected with the first electronic equipment, the second electronic equipment receives the notification of the synchronization of the first electronic equipment to the second electronic equipment through the second cross-equipment notification management center, and the notification data management center stores a plurality of third notifications of the synchronization of the first electronic equipment to the second electronic equipment; the method comprises the following steps:
The second notification display center responds to a batch clearing event of the second electronic equipment, and deletes a plurality of third notifications which are displayed by the second notification display center and are synchronized by the first electronic equipment to the second electronic equipment;
the second notification display center sends a sixth clearing instruction to the second cross-device notification management center; the sixth clearing instruction comprises a third identifier, wherein the third identifier is used for indicating that an event corresponding to the sixth clearing instruction is the batch clearing event;
the second cross-equipment notification management center receives the sixth clearing instruction and forwards the sixth clearing instruction to the notification data management center;
the notification data management center receives the sixth clearing instruction;
responsive to the sixth purge instruction, the notification data management center deletes the plurality of third notifications stored in the notification data management center;
the notification data management center sends a seventh clearing instruction to the cross-equipment notification state controller;
the cross-device notification state controller receives the seventh clearing instruction and forwards the seventh clearing instruction to the first electronic device; the seventh purge instruction is to instruct the first electronic device to delete the plurality of third notifications.
8. The method of claim 7, wherein the second electronic device further comprises a second notification management center storing a plurality of third notifications synchronized by the first electronic device to the second electronic device, the method further comprising:
the second notification display center also sends an eighth clearing instruction to the second notification management center; the eighth clearing instruction comprises a fourth identifier, and the fourth identifier is used for indicating that an event corresponding to the eighth clearing instruction is the batch clearing event;
the second notification management center receives the eighth clearing instruction;
in response to the eighth purge instruction, the second notification management center deletes the plurality of third notifications stored by the second notification management center; wherein after deleting the plurality of third notifications, the second notification management center does not notify the second notification display center of an event to delete the plurality of third notifications.
9. The batch clearing method of the notification is characterized by being applied to second electronic equipment, wherein the second electronic equipment comprises a second notification display center, a second notification management center, a second cross-equipment notification management center, a notification data management center and a cross-equipment notification state controller; the second electronic equipment is connected with the first electronic equipment, the second electronic equipment receives the notification of the first electronic equipment to the second electronic equipment synchronization through the second cross-equipment notification management center, and the second notification management center and the notification data management center store a plurality of third notifications of the first electronic equipment to the second electronic equipment synchronization; the method further comprises the steps of:
The second cross-device notification management center responds to a synchronous disconnection event and sends a ninth clearing instruction to the notification data management center; the synchronous disconnection event is used for indicating the first electronic device to be disconnected with the second electronic device; the ninth clearing instruction comprises a fifth identifier, and the fifth identifier is used for indicating that an event corresponding to the ninth clearing instruction is the synchronous disconnection event;
the notification data management center receives the ninth clearing instruction;
responsive to the ninth purge instruction, the notification data management center deletes a plurality of third notifications stored in the notification data management center;
the notification data management center forwards the ninth clearing instruction to the cross-device notification state controller;
responding to the ninth clearing instruction, and sending a tenth clearing instruction to the second notification management center by the cross-device notification state controller at intervals of a preset time period based on the fifth identifier;
the second notification management center receives the tenth clearing instruction and deletes the third notifications of the preset number stored in the second notification management center according to the tenth clearing instruction;
The second notification management center forwards the tenth clearing instruction to the second notification display center;
and the second notification display center receives the tenth clearing instruction and deletes the third notifications of the preset number displayed by the second notification display center.
10. An electronic device, wherein the electronic device is the first electronic device, the first electronic device comprising: a processor and a memory; the memory has stored therein computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform the method of any of claims 1-6.
11. An electronic device, wherein the electronic device is the second electronic device, the second electronic device comprising: a processor and a memory; the memory has stored therein computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform the method of any of claims 7-9.
12. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-9.
CN202211054729.8A 2022-08-31 2022-08-31 Batch clearing method and device for notification Active CN116048832B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211054729.8A CN116048832B (en) 2022-08-31 2022-08-31 Batch clearing method and device for notification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211054729.8A CN116048832B (en) 2022-08-31 2022-08-31 Batch clearing method and device for notification

Publications (2)

Publication Number Publication Date
CN116048832A CN116048832A (en) 2023-05-02
CN116048832B true CN116048832B (en) 2023-11-03

Family

ID=86120626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211054729.8A Active CN116048832B (en) 2022-08-31 2022-08-31 Batch clearing method and device for notification

Country Status (1)

Country Link
CN (1) CN116048832B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763686A (en) * 2013-12-23 2014-04-30 北京奇虎科技有限公司 Processing method and device for short messages
CA2858054A1 (en) * 2013-08-01 2015-02-01 General Electric Company Systems and methods for batch device commissioning and decommissioning
CN104392176A (en) * 2014-12-12 2015-03-04 北京奇虎科技有限公司 Mobile terminal and method for intercepting device manager authority thereof
CN106648698A (en) * 2016-12-29 2017-05-10 北京金山安全软件有限公司 Method and device for displaying message notification and electronic equipment
CN107395884A (en) * 2017-07-18 2017-11-24 维沃移动通信有限公司 A kind of display methods and mobile terminal of applicative notifications message
CN108319509A (en) * 2017-12-20 2018-07-24 瑞斯康达科技发展股份有限公司 A kind of event management method, system and main control device
WO2021164445A1 (en) * 2020-02-19 2021-08-26 华为技术有限公司 Notification processing method, electronic apparatus, and system
CN113806105A (en) * 2021-08-02 2021-12-17 荣耀终端有限公司 Message processing method and device, electronic equipment and readable storage medium
US11316806B1 (en) * 2020-01-28 2022-04-26 Snap Inc. Bulk message deletion
CN114741213A (en) * 2021-10-22 2022-07-12 华为技术有限公司 Notification processing method, chip, electronic device and computer-readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080153464A1 (en) * 2006-12-21 2008-06-26 Morris Robert P Methods and systems for indicating the occurrence of an event

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2858054A1 (en) * 2013-08-01 2015-02-01 General Electric Company Systems and methods for batch device commissioning and decommissioning
CN103763686A (en) * 2013-12-23 2014-04-30 北京奇虎科技有限公司 Processing method and device for short messages
CN104392176A (en) * 2014-12-12 2015-03-04 北京奇虎科技有限公司 Mobile terminal and method for intercepting device manager authority thereof
CN106648698A (en) * 2016-12-29 2017-05-10 北京金山安全软件有限公司 Method and device for displaying message notification and electronic equipment
CN107395884A (en) * 2017-07-18 2017-11-24 维沃移动通信有限公司 A kind of display methods and mobile terminal of applicative notifications message
CN108319509A (en) * 2017-12-20 2018-07-24 瑞斯康达科技发展股份有限公司 A kind of event management method, system and main control device
US11316806B1 (en) * 2020-01-28 2022-04-26 Snap Inc. Bulk message deletion
WO2021164445A1 (en) * 2020-02-19 2021-08-26 华为技术有限公司 Notification processing method, electronic apparatus, and system
CN113806105A (en) * 2021-08-02 2021-12-17 荣耀终端有限公司 Message processing method and device, electronic equipment and readable storage medium
CN114741213A (en) * 2021-10-22 2022-07-12 华为技术有限公司 Notification processing method, chip, electronic device and computer-readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
浅析捆绑木马检测技术;郭振江;;网络安全和信息化(第02期);全文 *

Also Published As

Publication number Publication date
CN116048832A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
US11653398B2 (en) Bluetooth connection method and device
WO2021013156A1 (en) Bluetooth switching method and bluetooth device
US11683850B2 (en) Bluetooth reconnection method and related apparatus
WO2022033296A1 (en) Bluetooth communication method, wearable device, and system
EP4109967A1 (en) Method for switching between sim card and esim card, and electronic device
CN111405681B (en) Wi-Fi Aware link establishment method, wi-Fi Aware link establishment system, electronic equipment and storage medium
EP3968670A1 (en) Bluetooth-based object searching method and electronic device
EP4021036A1 (en) Bluetooth reconnection method and related apparatus
CN114244960B (en) Incoming call response method and corresponding terminal and communication system
CN115995856A (en) Charging method of electronic equipment and electronic equipment
CN116048832B (en) Batch clearing method and device for notification
US20120094602A1 (en) Bluetooth headset for mobile phone
CN114554012B (en) Incoming call answering method, electronic equipment and storage medium
CN113678481B (en) Wireless audio system, audio communication method and equipment
CN113691979B (en) Wireless data transmission method, electronic device, system and storage medium
CN114697438B (en) Method, device, equipment and storage medium for carrying out call by utilizing intelligent equipment
CN116707050B (en) Method and device for recording charge and discharge times, electronic equipment and readable storage medium
CN114449492B (en) Data transmission method and terminal equipment
CN117014843A (en) Mobile communication method and electronic equipment
WO2023165513A1 (en) Communication method, electronic device, and apparatus
CN117014884A (en) Number using method and related equipment
CN117041465A (en) Video call optimization method, electronic equipment and storage medium
CN117715001A (en) IMS short message processing method, electronic equipment and storage medium
CN116311843A (en) Alarm information transmission method, system, computer equipment and storage medium
CN115004850A (en) Control method and device for DRX (discontinuous reception) of direct-connection sidelink

Legal Events

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