Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1 and fig. 2,
as shown in fig. 1, the present invention provides a method for prompting a message, including:
receiving a message;
grouping the messages to obtain more than one message group;
associating a tray icon with the message packet; the tray icons and the message groups correspond one to one;
when the message group corresponding to the tray icon is empty, setting the tray icon to be in a first state; otherwise, setting the tray icon to be in a second state.
Further, grouping the messages to obtain more than one message group, specifically:
acquiring a sender corresponding to the message;
identifying a category of the sender;
and grouping the messages according to the categories to obtain more than one message grouping.
According to the description, the message reminding can be realized according to different roles, and the timeliness of the user for processing the important role message is improved.
Further, grouping the messages to obtain more than one message group, specifically:
extracting keywords of the message;
and grouping the messages according to the keywords to obtain more than one message grouping.
According to the description, the message reminding is realized according to the keywords contained in the message, and the timeliness of the user for processing the message containing the important content is improved.
Further, associating a tray icon with the message packet specifically includes:
acquiring the created tray icons to obtain a first tray icon set;
acquiring a message packet corresponding to the message to obtain a first message packet;
if the tray icon corresponding to the first message group does not exist in the first tray icon set, creating a tray icon to obtain a current tray icon; associating the first message packet with the current tray icon.
As can be seen from the above description, dynamically creating a new tray icon saves resources and is beneficial to improving the attention of the user to the received unviewed messages.
Further, still include:
acquiring the created tray icon to obtain a second tray icon set;
and when one message group is empty, deleting the tray icon corresponding to the message group in the second tray icon set.
As can be seen from the above description, only the messages that are not viewed are cached in the message packets, and when all the messages in one message packet are viewed, the message packet is emptied, and at this time, the tray icon corresponding to the message packet is deleted, which is beneficial to improving the attention of the user to the received messages that are not viewed.
Further, still include:
acquiring a message packet to obtain a second message packet;
sorting the messages in the second message packet according to a preset priority rule;
acquiring the message with the highest priority in the second message packet to obtain an important message;
acquiring an icon corresponding to the important message to obtain an important icon;
modifying a tray icon corresponding to the second message packet to the important icon.
As can be seen from the above description, the messages in each message group are reminded according to the priority, which is beneficial for the user to process the most important messages preferentially.
As shown in fig. 2, the present invention further provides a message prompting terminal, including one ormore processors 1 and amemory 2, where thememory 2 stores programs and is configured to be executed by the one ormore processors 1 to:
receiving a message;
grouping the messages to obtain more than one message group;
associating a tray icon with the message packet; the tray icons and the message groups correspond one to one;
when the message group corresponding to the tray icon is empty, setting the tray icon to be in a first state; otherwise, setting the tray icon to be in a second state.
Further, grouping the messages to obtain more than one message group, specifically:
acquiring a sender corresponding to the message;
identifying a category of the sender;
and grouping the messages according to the categories to obtain more than one message grouping.
Further, grouping the messages to obtain more than one message group, specifically:
extracting keywords of the message;
and grouping the messages according to the keywords to obtain more than one message grouping.
Further, associating a tray icon with the message packet specifically includes:
acquiring the created tray icons to obtain a first tray icon set;
acquiring a message packet corresponding to the message to obtain a first message packet;
if the tray icon corresponding to the first message group does not exist in the first tray icon set, creating a tray icon to obtain a current tray icon; associating the first message packet with the current tray icon.
Further, still include:
acquiring the created tray icon to obtain a second tray icon set;
and when one message group is empty, deleting the tray icon corresponding to the message group in the second tray icon set.
Further, still include:
acquiring a message packet to obtain a second message packet;
sorting the messages in the second message packet according to a preset priority rule;
acquiring the message with the highest priority in the second message packet to obtain an important message;
acquiring an icon corresponding to the important message to obtain an important icon;
modifying a tray icon corresponding to the second message packet to the important icon.
The first embodiment of the invention is as follows:
the embodiment provides a message prompting method, which comprises the following steps:
and S1, receiving the message.
The method for prompting the message provided by the embodiment is applied to instant messaging software, and the traditional instant messaging software only uses one tray icon to prompt the user with a new message. The instant messaging software can receive various messages, such as system prompt messages, advertisement push messages, group messages, and friend messages of different groups, and the latest received message can cover the reminding icon of the old message. However, the user only pays attention to the specific type of messages in a specific scene, and in the conventional instant messaging software, the reminding signal of the specific message concerned by the user is easily covered by the unimportant new message, so that the user is easy to miss or cannot process the important message in time.
And S2, grouping the messages to obtain more than one message grouping.
Optionally, a sender corresponding to the message is obtained; identifying a category of the sender; and grouping the messages according to the categories to obtain more than one message grouping.
The classification of the sender can be a group, a friend or the like; and further dividing friends according to friend groups in the instant messaging software.
Optionally, extracting keywords of the message; and grouping the messages according to the keywords to obtain more than one message grouping.
For example, the user is currently interested in meeting notifications, and may group messages containing meeting content into a group by using "meeting" as a keyword, and use a tray icon alone to remind the group of messages to avoid being covered by other message notifications.
S3, associating a tray icon and the message packet; the tray icons and the message groups correspond one to one; the method specifically comprises the following steps:
s31, acquiring the created tray icons to obtain a first tray icon set;
s32, acquiring a message packet corresponding to the message to obtain a first message packet;
s33, if the tray icon corresponding to the first message group does not exist in the first tray icon set, creating a tray icon to obtain a current tray icon; associating the first message packet with the current tray icon.
For example, if there are 5 groups of currently set message groups, there are at most 5 tray icons at the same time, and the tray icons correspond to the message groups one by one.
S4, when the message group corresponding to the tray icon is empty, setting the tray icon to be in a first state; otherwise, setting the tray icon to be in a second state.
Each message group only caches messages which are newly received by the instant messaging software and are not processed by a user, and when no new message exists in a message group, the tray icon corresponding to the message group is in a first state; when a message packet changes from no new message to a new message, the state of the tray icon corresponding to the message packet changes from the first state to the second state to remind the user.
Optionally, acquiring a message packet to obtain a second message packet; sorting the messages in the second message packet according to a preset priority rule; acquiring the message with the highest priority in the second message packet to obtain an important message; acquiring an icon corresponding to the important message to obtain an important icon; modifying a tray icon corresponding to the second message packet to the important icon.
When a message group continuously receives new messages under the condition that the new messages exist, the icon corresponding to the message with the highest priority is used as a tray icon according to a preset priority rule to prompt a user.
Alternatively, the change from the first state to the second state may be from static to dynamic; the dynamic state may specifically be that the tray icon flickers, or the tray icon moves along a preset path, or the like; the change of the first state to the second state can also be a change of color; for example, the first state is that the color of the tray icon is close to the background of the notification bar and is not obvious; the second state is that the color of the tray icon and the background color of the notification bar are opposite colors and are obvious.
Optionally, acquiring the created tray icon to obtain a second tray icon set; and when one message group is empty, deleting the tray icon corresponding to the message group in the second tray icon set.
When the message cached in a message group is empty, the tray icon corresponding to the message group is deleted, namely the first state is that the notification bar does not display the tray icon corresponding to the message group.
The second embodiment of the invention is as follows:
the present embodiment provides a message prompting terminal, including one ormore processors 1 and amemory 2, where thememory 2 stores programs and is configured to be executed by the one ormore processors 1 to perform the following steps:
and S1, receiving the message.
The method for prompting the message provided by the embodiment is applied to instant messaging software, and the traditional instant messaging software only uses one tray icon to prompt the user with a new message. The instant messaging software can receive various messages, such as system prompt messages, advertisement push messages, group messages, and friend messages of different groups, and the latest received message can cover the reminding icon of the old message. However, the user only pays attention to the specific type of messages in a specific scene, and in the conventional instant messaging software, the reminding signal of the specific message concerned by the user is easily covered by the unimportant new message, so that the user is easy to miss or cannot process the important message in time.
And S2, grouping the messages to obtain more than one message grouping.
Optionally, a sender corresponding to the message is obtained; identifying a category of the sender; and grouping the messages according to the categories to obtain more than one message grouping.
The classification of the sender can be a group, a friend or the like; and further dividing friends according to friend groups in the instant messaging software.
Optionally, extracting keywords of the message; and grouping the messages according to the keywords to obtain more than one message grouping.
For example, the user is currently interested in meeting notifications, and may group messages containing meeting content into a group by using "meeting" as a keyword, and use a tray icon alone to remind the group of messages to avoid being covered by other message notifications.
S3, associating a tray icon and the message packet; the tray icons and the message groups correspond one to one; the method specifically comprises the following steps:
s31, acquiring the created tray icons to obtain a first tray icon set;
s32, acquiring a message packet corresponding to the message to obtain a first message packet;
s33, if the tray icon corresponding to the first message group does not exist in the first tray icon set, creating a tray icon to obtain a current tray icon; associating the first message packet with the current tray icon.
For example, if there are 5 groups of currently set message groups, there are at most 5 tray icons at the same time, and the tray icons correspond to the message groups one by one.
S4, when the message group corresponding to the tray icon is empty, setting the tray icon to be in a first state; otherwise, setting the tray icon to be in a second state.
Each message group only caches messages which are newly received by the instant messaging software and are not processed by a user, and when no new message exists in a message group, the tray icon corresponding to the message group is in a first state; when a message packet changes from no new message to a new message, the state of the tray icon corresponding to the message packet changes from the first state to the second state to remind the user.
Optionally, acquiring a message packet to obtain a second message packet; sorting the messages in the second message packet according to a preset priority rule; acquiring the message with the highest priority in the second message packet to obtain an important message; acquiring an icon corresponding to the important message to obtain an important icon; modifying a tray icon corresponding to the second message packet to the important icon.
When a message group continuously receives new messages under the condition that the new messages exist, the icon corresponding to the message with the highest priority is used as a tray icon according to a preset priority rule to prompt a user.
Alternatively, the change from the first state to the second state may be from static to dynamic; the dynamic state may specifically be that the tray icon flickers, or the tray icon moves along a preset path, or the like; the change of the first state to the second state can also be a change of color; for example, the first state is that the color of the tray icon is close to the background of the notification bar and is not obvious; the second state is that the color of the tray icon and the background color of the notification bar are opposite colors and are obvious.
Optionally, acquiring the created tray icon to obtain a second tray icon set; and when one message group is empty, deleting the tray icon corresponding to the message group in the second tray icon set.
When the message cached in a message group is empty, the tray icon corresponding to the message group is deleted, namely the first state is that the notification bar does not display the tray icon corresponding to the message group.
In summary, according to the method and the terminal for prompting the message provided by the present invention, the received messages are grouped, and different tray icons are used to prompt the messages belonging to different groups to the user, so that the user can not miss an important message by only paying attention to a specific tray icon in a specific situation, and a prompt signal of the important message is not covered by other messages, thereby improving the efficiency of the user in processing the important message. Furthermore, message reminding can be realized according to different roles, and the timeliness of the user for processing important role messages is improved. Furthermore, message reminding is realized according to keywords contained in the message, and the timeliness of the user for processing the message containing important content is improved. Further, a new tray icon is dynamically created, resources are saved, and the attention of a user to the received messages which are not viewed is favorably improved. Furthermore, only the messages which are not viewed are cached in the message groups, when all the messages in one message group are viewed, the message groups can be emptied, and at the moment, the tray icons corresponding to the message groups are deleted, so that the attention of a user to the received messages which are not viewed is favorably improved. Furthermore, the messages in each message group are reminded according to the priority, so that the user can process the most important messages preferentially.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.