Message processing method, system, electronic device and computer readable storage medium
By storing push messages in the client's local database and monitoring user behavior to generate operation instructions, the problems of message push delay and server-side storage burden are solved, enabling instant reminders and efficient message management.
Patent Information
- Application Number
- CN202311281726.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2043-09-28
AI Technical Summary
Existing mobile application messaging solutions result in message push delays, preventing users from receiving important message alerts in a timely manner and increasing the storage burden on the server side.
Push messages are stored in the client's local database. User behavior is monitored to generate operation instructions and push messages are sent directly from the server. The message storage and notification are combined with aggregation and classification mechanisms.
This enables users to receive important message alerts instantly, reduces the server's storage burden, and improves the real-time performance of message delivery and user experience.
Smart Images

Figure CN117119048B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of mobile communication, and in particular to a message processing method and system, an electronic device, and a computer readable storage medium. BACKGROUND
[0002] At present, with the popularity and development of mobile applications, the mobile applications have become an important channel for users to obtain messages, social interaction, and business processing. The existing message processing scheme of the mobile applications stores user messages on a server, and a client displays the messages by requesting message data from the server. This scheme causes a certain delay in message pushing, and users cannot receive important message reminders in time. Moreover, all message data are stored on the server, which increases the burden on the server and limits the storage capacity.
[0003] Therefore, how to provide a scheme to solve the above technical problems is a problem that those skilled in the art need to solve at present. SUMMARY
[0004] The present application aims to provide a message processing method, system, electronic device, and computer readable storage medium, so that users can receive important push message reminders in time, and push messages are stored in the local database of the client, thereby ensuring the persistence and local access of push messages and reducing the storage burden on the server.
[0005] To solve the above technical problems, the present application provides a message processing method applied to a client, which comprises the following steps:
[0006] sending an operation instruction to a server according to user behavior, so that the server generates and issues a push message corresponding to the operation instruction when receiving the operation instruction;
[0007] determining the prompt type of the received push message;
[0008] storing the push message in the local database of the client when it is determined that the push message meets the storage condition based on the prompt type;
[0009] prompting the push message according to the prompt type.
[0010] Optionally, the process of storing the push message in the local database of the client comprises the following steps:
[0011] determining the aggregation type of the push message;
[0012] storing the push message in a preset data table of the local database of the client according to the aggregation type;
[0013] The preset data table includes a first data table and a second data table, the first data table is used to store the aggregated push message and the un-aggregated push message, and the second data table is used to store the aggregated push message.
[0014] Optionally, the process of storing the push message into the preset data table of the local database of the client according to the aggregation type includes:
[0015] When the aggregation type is non-aggregation, the push message is stored into the first data table;
[0016] and / or,
[0017] When the aggregation type is aggregation, the push message is stored into the first data table and the second data table based on the aggregation identifier of the push message, or the push message is stored into the second data table;
[0018] and / or,
[0019] When the aggregation type is coverage, the push message is stored into the first data table, and the historical push message with the same aggregation identifier stored in the first data table is deleted.
[0020] Optionally, when the aggregation type is aggregation, the process of storing the push message into the first data table and the second data table based on the aggregation identifier of the push message, or storing the push message into the second data table includes:
[0021] When the aggregation type is aggregation, the aggregation identifier of the push message is determined, and the aggregation identifier includes a group identifier and an independent identifier;
[0022] It is judged whether the data of the push message with the same group identifier exists in the first data table;
[0023] If not, the push message is stored into the first data table and the second data table;
[0024] If yes, the push message is stored into the second data table, and the data with the same group identifier in the first data table is updated.
[0025] Optionally, the process of prompting the push message according to the prompt type includes:
[0026] If the prompt type is pop-up window prompt, a prompt box corresponding to the push message is popped up on the page of the client;
[0027] and / or,
[0028] If the prompt type is a notification bar prompt, a prompt message corresponding to the push message is determined, and the prompt message is prompted on a notification bar page of the client.
[0029] Optionally, the process of determining the prompt message corresponding to the push message comprises:
[0030] A delivery channel of the push message and a use state of the client are determined.
[0031] According to the delivery channel and the use state, the prompt message is determined as a prompt identifier or message content of the push message.
[0032] Optionally, before the prompt box corresponding to the push message is popped up on the page of the client, the message processing method further comprises:
[0033] If the prompt type is a pop-up prompt, the push message is written into a global pop-up window queue.
[0034] The process of popping up the prompt box corresponding to the push message on the page of the client comprises:
[0035] The pop-up priority of each push message in the global pop-up window queue is determined.
[0036] The push message with the highest pop-up priority is determined as a to-be-pushed message, and a prompt box corresponding to the to-be-pushed message is popped up on the page of the client.
[0037] Optionally, the process of determining the push message with the highest pop-up priority as the to-be-pushed message and popping up the prompt box corresponding to the to-be-pushed message on the page of the client comprises:
[0038] The push message with the highest pop-up priority is determined as the to-be-pushed message.
[0039] It is judged whether the client satisfies a push condition; the push condition comprises that a current display page of the client is a preset whitelist page and / or the current display page does not exist a prompt box that is not closed and / or a current time satisfies a preset minimum interval time condition of a pop-up window.
[0040] If yes, a prompt box corresponding to the to-be-pushed message is popped up on the page of the client.
[0041] Optionally, the process of determining the pop-up priority of each push message in the global pop-up window queue comprises:
[0042] When it is monitored that the current display page of the client is closed, the current pop-up priority of each push message in the global pop-up window queue is determined.
[0043] and / or,
[0044] determining a current pop-up priority of each push message in the global pop-up queue when it is monitored that a prompt box popped up on a current display page of the client is closed;
[0045] and / or,
[0046] determining a current pop-up priority of each push message in the global pop-up queue when the push message is written into the global pop-up queue.
[0047] To solve the above technical problems, the application further provides a message processing method applied to a server, the message processing method comprising:
[0048] receiving an operation instruction sent by a client based on user behavior, and generating a push message based on the operation instruction;
[0049] determining an associated user corresponding to the push message;
[0050] issuing the push message to a client corresponding to the associated user, so as to prompt the push message on the client corresponding to the associated user.
[0051] Optionally, the process of issuing the push message to the client corresponding to the associated user, so as to prompt the push message on the client corresponding to the associated user, comprises: determining a push manner and a push priority corresponding to each associated user;
[0052] issuing the push message to the client corresponding to each associated user in the order from high to low of the push priority and the push manner.
[0053] Optionally, the process of determining the push manner and the push priority corresponding to each associated user comprises:
[0054] when it is determined that the push manner of the associated user is offline push, determining the push priority of the associated user based on a last online time of the associated user and / or a preset priority corresponding to a message type of the push message.
[0055] To solve the above technical problems, the application further provides a message processing system applied to a client, the message processing system comprising:
[0056] an output module configured to send an operation instruction to a server according to user behavior, so that the server generates and issues a push message corresponding to the operation instruction when the operation instruction is received;
[0057] a receiving module configured to determine a prompt type of the received push message;
[0058] a storage module, configured to store the push message to a local database of the client when it is determined that the push message meets a storage condition based on the prompt type;
[0059] a prompt module, configured to prompt the push message according to the prompt type.
[0060] To solve the above technical problems, the present application further provides an electronic device, comprising:
[0061] a memory, configured to store a computer program;
[0062] a processor, configured to execute the computer program to implement the steps of the message processing method according to any one of the above.
[0063] To solve the above technical problems, the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the message processing method according to any one of the above.
[0064] The present application provides a message processing method, when a client monitors a user behavior, an operation instruction is sent to a server according to the user behavior, the server immediately issues a push message corresponding to the operation instruction to the client, without the client actively requesting the server, so that the user can immediately receive an important push message prompt, and the push message is stored in the local database of the client, ensuring the persistence and local access of the push message, and reducing the storage burden of the server. The present application further provides another message processing method, system, electronic device and computer readable storage medium, which have the same beneficial effects as the above message processing method. BRIEF DESCRIPTION OF DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0066] Figure 1 a message processing method provided by the present application;
[0067] Figure 2 a storage flowchart of the push message provided by the present application;
[0068] Figure 3 a processing flowchart of the push message provided by the present application;
[0069] Figure 4Another push message processing flowchart provided by the present application;
[0070] Figure 5 A structural schematic diagram of a message processing system provided by the present application;
[0071] Figure 6 A step flowchart of another message processing method provided by the present application;
[0072] Figure 7 A structural schematic diagram of another message processing system provided by the present application. DETAILED DESCRIPTION
[0073] The core of the present application is to provide a message processing method, system, electronic device and computer readable storage medium, so that the user can receive the prompt of important push message in time, and the push message is stored in the local database of the client, which guarantees the persistence and local access of the push message and reduces the storage burden of the server.
[0074] To make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0075] In a first aspect, refer to Figure 1 , Figure 1 A step flowchart of a message processing method provided by the present application, the message processing method comprising:
[0076] S101: sending an operation instruction to the server according to the user behavior, so that the server generates and issues a push message corresponding to the operation instruction when receiving the operation instruction;
[0077] On the client, the user behavior is monitored, and when the user behavior such as user likes, comments, private messages and the like is monitored, the data corresponding to the user behavior is encapsulated into an operation instruction, and the operation instruction is sent to the server through the HTTP protocol. The server receives the operation instruction, parses the operation instruction, obtains the message data, stores the message data into the MySQL database of the server, and generates the push message based on the parsed message data and issues it to the corresponding target client. The target client is the client of the user associated with the above-mentioned user behavior. It can be understood that the server generates and issues the push message according to the user behavior monitored by the client.
[0078] For example, when user A likes a post initiated by user B, after the client A of user A monitors the like behavior of user A, an operation instruction is generated to the server. After the server receives the operation instruction, the operation instruction is parsed to obtain message data. According to the message data, it is determined that the associated user corresponding to the user behavior monitored by the client of user A is user B. Then, the client B of user B is determined as the target client. The server sends a push message corresponding to the user behavior of user A to the client B. For example, when user A likes a comment made by user C under a post initiated by user B, after the client A of user A monitors the like behavior of user A, an operation instruction is generated to the server. After the server receives the operation instruction, the operation instruction is parsed to obtain message data. According to the message data, it is determined that the associated user corresponding to the user behavior monitored by the client A of user A is user B and user C. Then, the client B of user B and the client C of user C are both determined as the target client. The server sends a push message corresponding to the user behavior of user A to the client B and the client C.
[0079] S102: Determine the prompt type of the received push message;
[0080] It can be understood that the push message issued by the server includes but is not limited to message content, prompt type identifier, message source, etc. The prompt type of the push message can be determined according to the prompt type identifier in the push message. The prompt type refers to the prompt method of the push message on the client. The prompt type includes but is not limited to notification bar prompt and pop-up window prompt, i.e. prompting the push message in the notification bar of the client or prompting the push message in the pop-up window on the page of the client. For example, the push message corresponding to the like behavior of the user can be selected as the notification bar prompt, and the push message corresponding to the related activity can be selected as the pop-up window prompt. This embodiment is not limited here.
[0081] In an optional embodiment, the prompt type can be determined according to the setting of the target user. The target user is the user triggered by the above-mentioned user behavior. For example, when user A likes a post initiated by user B, the target user is user B. User B sets the pop-up window prompt to the off state and sets the notification bar prompt to the on state. Therefore, the prompt type can be the notification bar prompt. In an optional embodiment, the prompt type can also be determined according to the message type. The message type includes but is not limited to like message, comment message, and private message, etc. If the message type is like message, the prompt type is the notification bar prompt. If the message type is comment message, the prompt type is the pop-up window prompt. The selection can be made according to the actual needs. This embodiment is not limited here.
[0082] S103: When it is determined that the push message meets the storage condition based on the prompt type, store the push message to the local database of the client;
[0083] In this embodiment, a correspondence between the prompt type and the storage condition can be pre-set. For example, a push message corresponding to a notification bar prompt satisfies the storage condition, and a push message corresponding to a pop-up prompt does not satisfy the storage condition. It can be understood that the push message satisfying the storage condition is written into the local database of the client, and the push message not satisfying the storage condition can be first written into the cache and then deleted after the prompt of the push message is completed. The data of the push message satisfying the storage condition is stored into the local database, which can ensure the persistence and local access of the message data, improve the query efficiency when the user needs to query the push message, and reduce the storage burden of the server.
[0084] S104: Prompting the push message according to the prompt type.
[0085] It can be understood that if the prompt type is a pop-up prompt, a prompt box corresponding to the push message is popped up on the page of the client, and if the prompt type is a notification bar prompt, a prompt message corresponding to the push message is determined and the prompt message is prompted on the notification bar page of the client. The prompt message corresponding to the push message can be the specific content of the push message or the number of push messages, which can be set according to actual needs, and is not limited in this embodiment. It can be seen that in this embodiment, when the user behavior is monitored by the client, the operation instruction is sent to the server according to the user behavior, the server immediately issues the push message corresponding to the operation instruction to the client, and the client does not need to actively request the server, so that the user can immediately receive the prompt of the important push message, and the push message is stored in the local database of the client, which ensures the persistence and local access of the push message and reduces the storage burden of the server.
[0086] Based on the above embodiment:
[0087] In an example embodiment, the process of storing the push message into the local database of the client includes:
[0088] determining the aggregation type of the push message;
[0089] storing the push message into a preset data table of the local database of the client according to the aggregation type;
[0090] The preset data table includes a first data table and a second data table, the first data table is used to store the aggregated push message and the un-aggregated push message, and the second data table is used to store the aggregated push message.
[0091] In an example embodiment, the process of storing the push message into the preset data table of the local database of the client according to the aggregation type includes:
[0092] When the aggregation type is not aggregated, the push message is stored to the first data table;
[0093] and / or,
[0094] When the aggregation type is aggregated, based on the aggregation identifier of the push message, the push message is stored to the first data table and the second data table, or the push message is stored to the second data table;
[0095] and / or,
[0096] When the aggregation type is overwritten, the push message is stored to the first data table, and the historical push message with the same aggregation identifier already stored in the first data table is deleted.
[0097] It can be understood that the embodiment creates the first data table s_notice and the second data table s_merged_notice in the local database of the client, wherein s_notice is used to store the aggregated push message and the unaggregated push message, and the unaggregated push message herein specifically refers to the push message that does not need to be aggregated, and s_merged_notice is used to store the push message that has been aggregated. It can be understood that s_notice is the first-level page display content, and s_merged_notice is the second-level page display content, so that the user can easily view different types of push messages and improve the user experience.
[0098] It can be understood that the server can also include an aggregation type identifier in the push message issued, and each aggregation type identifier corresponds to a type of aggregation type. The aggregation type of the push message can be determined according to the aggregation type identifier in the push message. The aggregation type is used to indicate the storage manner of the push message in the local database. The aggregation type identifier includes but is not limited to M0, M1, and M2. The aggregation type corresponding to M0 is not aggregated, the aggregation type corresponding to M1 is aggregated, and the aggregation type corresponding to M2 is overwritten.
[0099] Exemplarily, taking the user's like behavior and comment behavior as an example, assuming that the aggregation type of the push message corresponding to the like behavior is aggregated, and the aggregation type of the push message corresponding to the comment behavior is not aggregated, the number of likes and the specific information of the comments (including the comment source and the comment content) are stored in s_notice, and the specific information of the likes, such as the like source and the like, is stored in s_merged_notice.
[0100] In an exemplary embodiment, when the aggregation type is aggregated, based on the aggregation identifier of the push message, the process of storing the push message to the first data table and the second data table, or storing the push message to the second data table includes:
[0101] When the aggregation type is aggregation, determine the aggregation identifier of the push message. The aggregation identifier includes a group identifier and an independent identifier.
[0102] Determine if the first data table contains push message data with the same group identifier;
[0103] If not, store the push message in the first data table and the second data table;
[0104] If so, store the push message in the second data table and update the data with the same group identifier in the first data table.
[0105] Understandable, refer to Figure 2 As shown, Figure 2 The flowchart illustrates a push message storage method provided in this application. If the aggregation type is "no aggregation," the message data of the push message is directly inserted into `s_notice`. If the aggregation type is "overlay" or "aggregation," the aggregation identifier of the push message is obtained. The aggregation identifier includes, but is not limited to, a group ID and a unique ID. It can be understood that the same group ID represents a group of aggregated data. For example, the group ID can be the ID of a post initiated by a user through a client, or it can be an ID of a message type. The unique ID is used to indicate the message source, and the unique ID within the same group is unique.
[0106] If the aggregation type is cover, it is judged whether there is historical data of the same group ID in s_notice, if yes, the existing historical data is deleted, the message data of the push message is inserted into s_notice, if not, the message data of the push message is directly inserted into s_notice. If the aggregation type is aggregation, it is judged whether there is historical data of the same group ID in s_notice, if not, the message data of the push message is inserted into s_notice and s_merged_notice, if there is historical data of the same group ID in s_notice, it is judged whether the unique ID is empty, if yes, an update operation is performed, the update operation includes but is not limited to updating the aggregated script, the reading state, the update time of the last message data, the number of unread push messages and the like, if the unique ID is not empty, it is judged whether there is historical data of the same group ID and the same unique ID in s_merged_notice, if yes, the existing historical data is deleted, the message data of the push message is inserted into s_merged_notice, and then the update operation is performed, if there is no historical data of the same group ID and the same unique ID in s_merged_notice, the message data of the push message is directly inserted into s_merged_notice, and then the update operation is performed. In the embodiment, a message classification and aggregation mechanism is introduced, push messages of the same type and the same source are combined and classified and displayed, so that the user can more easily view different types of messages, and the user experience is improved.
[0107] In an example embodiment, the process of determining the prompt message corresponding to the push message includes:
[0108] Determining the delivery channel of the push message and the use state of the client;
[0109] According to the delivery channel and the use state, determining that the prompt message is a prompt identifier or the message content of the push message.
[0110] Referring to Figure 3 As shown in the figure, the delivery channel of the push message initiated by the server includes but is not limited to an IM (Instant Messaging, instant messaging) channel, a service provider channel, a client manufacturer channel and the like, first it is judged whether IM is online, if yes, an IM communication is established with the client, and the push message is delivered to the client through the IM channel, if IM is not online, it is judged whether individual push is online, if yes, it is judged whether the push message is a marketing message and / or a business message, if yes, the push message is delivered through the service provider channel, if it is not a marketing message and / or a business message or if individual push is not online, the push message is delivered to the client offline through the client manufacturer channel.
[0111] After the push message is issued through the IM channel, whether to perform push interception is determined based on the use state of the client and the message classification of the push message, which is private chat, group chat, official push or other message. The use state is determined by the user setting. If push interception is needed, the specific message content is not displayed in the notification bar, and only a chat red dot, a bell and other prompt identifiers are used for prompting. If no interception is performed, whether the message is a historical message is determined. If it is a historical message, the specific message content is not displayed in the notification bar, and only a chat red dot, a bell and other prompt identifiers are used for prompting. If it is not a historical message, whether the push message is in the foreground is determined. If it is, the specific message content is not displayed in the notification bar, and only a chat red dot, a bell and other prompt identifiers are used for prompting. If it is not, the specific message content is displayed in the notification bar. It can be understood that the push messages issued through the service provider channel and the client manufacturer channel are all displayed in the notification bar with the specific message content.
[0112] The IM is a technology and service for realizing instant communication through a computer or a mobile device, allowing users to send messages in the form of text, pictures, audio and video on the network to realize real-time communication and communication.
[0113] In an example embodiment, the push message can also be a push message triggered by the client, such as a client actively requesting server data, a background retreat trigger for keep-alive notification, a voice call trigger, etc. The client constructs a notification and prompts in the notification bar.
[0114] In an example embodiment, before a prompt box corresponding to the push message is popped up on the page of the client, the message processing method further comprises:
[0115] If the prompt type is a pop-up prompt, the push message is written into a global pop-up queue.
[0116] The process of popping up a prompt box corresponding to the push message on the page of the client comprises:
[0117] The pop-up priority of each push message in the global pop-up queue is determined.
[0118] The push message with the highest pop-up priority is determined as a to-be-pushed message, and a prompt box corresponding to the to-be-pushed message is popped up on the page of the client.
[0119] In this embodiment, after the client receives a push message that needs to be prompted in a pop-up window, the corresponding prompt box is not directly popped up, but the push message that needs to be prompted in a pop-up window is first written into a global pop-up queue, and then queued according to the pop-up priority of each push message in the global pop-up queue and the pop-up interval time. After a preset time after the previous prompt box is closed, the prompt box corresponding to the push message with the highest current pop-up priority is popped up, which avoids frequent pop-up windows disturbing the user and improves the accuracy and intelligence of the prompt.
[0120] In an example embodiment, the process of determining the push message with the highest pop-up priority as the to-be-pushed message includes:
[0121] determining the push message with the highest pop-up priority as the to-be-pushed message;
[0122] determining whether the client satisfies a push condition; the push condition includes that the current display page of the client is a preset whitelist page and / or that the current display page does not have an un-closed prompt box;
[0123] if yes, popping up a prompt box corresponding to the to-be-pushed message on the page of the client.
[0124] In an example embodiment, the process of determining the pop-up priority of each push message in the global pop-up queue includes:
[0125] determining the current pop-up priority of each push message in the global pop-up queue when it is monitored that the current display page of the client is closed;
[0126] and / or,
[0127] determining the current pop-up priority of each push message in the global pop-up queue when it is monitored that a prompt box popped up on the current display page of the client is closed;
[0128] and / or,
[0129] determining the current pop-up priority of each push message in the global pop-up queue when a push message is written into the global pop-up queue.
[0130] wherein the current display page is the top page on the client, and the preset whitelist page is any page in a list of pages determined by the server as being able to pop up a prompt box.
[0131] Reference is made to Figure 4As shown, after receiving a push message requiring a pop-up prompt, the push message is written into the global pop-up queue, and then the pop-up priorities of the push messages in the global pop-up queue are determined, the push message with the highest pop-up priority is determined as a to-be-pushed message, a prompt box corresponding to the to-be-pushed message is generated, it is judged whether the current display page is a preset whitelist page, if yes, it is judged whether there is an un-closed prompt box on the current display page, if no, the prompt box corresponding to the to-be-pushed message is popped up, if the current display page is not the preset whitelist page or there is an un-closed prompt box on the current display page, it is judged whether the prompt box corresponding to the to-be-pushed message is a non-discarded prompt box based on the message category of the to-be-pushed message, if yes, the to-be-pushed message is written into the global pop-up queue again, the pop-up priority of each push message in the global pop-up queue is determined again whenever a push message is written into the global pop-up queue, and if the prompt box corresponding to the to-be-pushed message is a discarded prompt box, the push message is discarded and is not written into the global pop-up queue again. In the embodiment, when it is monitored that the current display page of the client is closed and / or it is monitored that the prompt box popped up on the current display page of the client is closed, the pop-up priority of each push message in the global pop-up queue is determined, and the to-be-pushed message with the highest pop-up priority is taken out.
[0132] On this basis, the client records data at each time point of message flow, and reports to the server for storage through an HTTP interface when the user switches the software to the system background or other inactive scenes. The exposure rate and click rate of the pop-up are analyzed regularly according to the stored data.
[0133] In summary, the present application introduces IM technology to achieve instant message pushing. When a new push message is generated, the server sends it to the client through the IM channel, eliminating the need for the client to actively poll the server for messages, thus eliminating the push delay problem of traditional message systems. Users can receive important message reminders in the first time, improving the real-time performance of message delivery and user experience. The client uses SQLite database for local storage of message data. Once a message is pushed to the client, it is immediately stored in the local database, ensuring the persistence and local access of message data. This not only reduces the storage burden of the server, but also improves the accessibility of message data and user experience. The present application combines and classifies messages of the same type and source, avoiding the confusion problem of traditional message lists. By aggregation, similar messages are combined and displayed, making it easier for users to view different types of messages and improving user efficiency and operational convenience. For messages that require pop-up reminders, the present application introduces a pop-up queue that is managed according to certain strategies. After a message is added to the queue, the system intelligently queues and reminds it based on pop-up priority and time, avoiding frequent pop-up interruptions and improving the accuracy and intelligence of reminders.
[0134] In a second aspect, referring to Figure 5 , Figure 5 a structural diagram of a message processing system provided by the present application, applied to a client, the message processing system comprising:
[0135] an output module 51 for sending an operation instruction to the server according to the user behavior, so that the server generates and issues a push message corresponding to the operation instruction when receiving the operation instruction;
[0136] a receiving module 52 for determining the prompt type of the received push message;
[0137] a storage module 53 for storing the push message in the local database of the client when it is determined that the push message meets the storage condition based on the prompt type;
[0138] a prompt module 54 for prompting the push message according to the prompt type.
[0139] As can be seen, in the present embodiment, when the client monitors user behavior, it sends an operation instruction to the server according to the user behavior. The server immediately issues a push message corresponding to the operation instruction to the client, eliminating the need for the client to actively request the server. This allows users to immediately receive important push message reminders, and the push message is stored in the local database of the client, ensuring the persistence and local access of the push message and reducing the storage burden of the server.
[0140] In an example embodiment, the process of storing the push message to the preset data table of the local database of the client according to the aggregation type comprises:
[0141] determining the aggregation type of the push message;
[0142] storing the push message to the preset data table of the local database of the client according to the aggregation type;
[0143] the preset data table comprises a first data table and a second data table, the first data table is used to store the aggregated push message and the un-aggregated push message, and the second data table is used to store the aggregated push message.
[0144] In an example embodiment, the process of storing the push message to the preset data table of the local database of the client according to the aggregation type comprises:
[0145] when the aggregation type is no aggregation, storing the push message to the first data table;
[0146] and / or,
[0147] when the aggregation type is aggregation, storing the push message to the first data table and the second data table based on the aggregation identifier of the push message, or storing the push message to the second data table;
[0148] and / or,
[0149] when the aggregation type is cover, storing the push message to the first data table and deleting the historical push message with the same aggregation identifier stored in the first data table.
[0150] In an example embodiment, when the aggregation type is aggregation, the process of storing the push message to the first data table and the second data table based on the aggregation identifier of the push message, or storing the push message to the second data table comprises:
[0151] when the aggregation type is aggregation, determining the aggregation identifier of the push message, the aggregation identifier comprises a group identifier and an independent identifier;
[0152] judging whether the data of the push message with the same group identifier exists in the first data table;
[0153] if not, storing the push message to the first data table and the second data table;
[0154] if yes, storing the push message to the second data table and updating the data with the same group identifier in the first data table.
[0155] In an example embodiment, the process of prompting the push message according to the prompt type comprises:
[0156] if the prompt type is pop-up prompt, a prompt box corresponding to the push message is popped up on the page of the client.
[0157] and / or,
[0158] If the prompt type is a notification bar prompt, a prompt message corresponding to the push message is determined, and the prompt message is prompted on a notification bar page of the client.
[0159] In an example embodiment, the process of determining the prompt message corresponding to the push message includes:
[0160] Determining a delivery channel of the push message and a use state of the client;
[0161] Determining the prompt message to be a prompt identifier or message content of the push message according to the delivery channel and the use state.
[0162] In an example embodiment, before the prompt box corresponding to the push message is popped up on the page of the client, the message processing system further includes:
[0163] The writing module is configured to, if the prompt type is a pop-up prompt, write the push message into a global pop-up queue;
[0164] The process of popping up the prompt box corresponding to the push message on the page of the client includes:
[0165] Determining a pop-up priority of each push message in the global pop-up queue;
[0166] Determining the push message with the highest pop-up priority as a to-be-pushed message, and popping up the prompt box corresponding to the to-be-pushed message on the page of the client.
[0167] In an example embodiment, the process of determining the push message with the highest pop-up priority as the to-be-pushed message and popping up the prompt box corresponding to the to-be-pushed message on the page of the client includes:
[0168] Determining the push message with the highest pop-up priority as the to-be-pushed message;
[0169] Determining whether the client satisfies a push condition; the push condition includes that a current display page of the client is a preset whitelist page and / or that the current display page does not exist a prompt box that is not closed;
[0170] If yes, popping up the prompt box corresponding to the to-be-pushed message on the page of the client.
[0171] In an example embodiment, the process of determining the pop-up priority of each push message in the global pop-up queue includes:
[0172] When it is monitored that the current display page of the client is closed, determining a current pop-up priority of each push message in the global pop-up queue;
[0173] and / or,
[0174] determining the current pop-up priority of each push message in the global pop-up queue when it is monitored that the prompt box popped up on the current display page of the client is closed;
[0175] and / or,
[0176] determining the current pop-up priority of each push message in the global pop-up queue when the push message is written into the global pop-up queue.
[0177] In a third aspect, referring to Figure 6 , Figure 6 A step flowchart of another message processing method provided by the present application is provided, which is applied to a server side, and the message processing method comprises the following steps:
[0178] S601: receiving an operation instruction sent by a client based on a user behavior, and generating a push message based on the operation instruction;
[0179] S602: determining an associated user corresponding to the push message;
[0180] S603: issuing the push message to the client corresponding to the associated user, so as to prompt the push message on the client corresponding to the associated user.
[0181] In an exemplary embodiment, the process of issuing the push message to the client corresponding to the associated user, so as to prompt the push message on the client corresponding to the associated user, comprises: determining a push manner and a push priority corresponding to each associated user;
[0182] issuing the push message to the client corresponding to each associated user in the order from high to low of the push priority and the push manner.
[0183] In an exemplary embodiment, the process of determining the push manner and the push priority corresponding to each associated user comprises:
[0184] when it is determined that the push manner of the associated user is offline push, determining the push priority of the associated user based on the last online time of the associated user and / or a preset priority corresponding to the message type of the push message.
[0185] In the embodiment, the server receives an operation instruction sent by a client based on a user behavior, parses the operation instruction to obtain message data, saves the message data into a MySQL database of the server, and classifies the message data according to a trigger type and a trigger source, determines an event type and an associated user that need to be notified, wherein the trigger type and the user behavior are one-to-one corresponding, the trigger source refers to a specific user, the event type specifically refers to a push manner, such as online push, offline push, telephone notification, etc., and the associated user refers to a user corresponding to the user behavior and needing to receive a push message corresponding to the user behavior.
[0186] When the client is started, the service end and the client use the WebSocket to establish the communication channel for instant messaging. The service end sends a push message to the associated client through the IM channel according to the event type and the associated user, and the push message contains the trigger type, the trigger source, the message content and the like. The trigger type includes but is not limited to the likes, comments, private messages and the like. The service end adjusts the push strategy according to the online state of the user and the push priority, so as to ensure that important messages can be delivered in time. For the associated user who is online, the push priority can be determined according to the preset priority of the message type. In an example embodiment, the push priority of the associated user in the online state is higher than the push priority of the associated user in the offline state. For the associated user in the offline state, the push priority can be determined according to the last online time of the associated user and the preset priority of the message type, so as to ensure that important messages can be delivered in time.
[0187] In a fourth aspect, referring to Figure 7 , In a fourth aspect, referring to Figure 7 Another structural schematic diagram of a message processing system provided by the present application is shown in FIG. 4. The message processing system includes:
[0188] A message generation module 71 is configured to receive an operation instruction sent by a client based on a user behavior, and generate a push message based on the operation instruction.
[0189] A user determination module 72 is configured to determine an associated user corresponding to the push message.
[0190] A message push module 73 is configured to send the push message to a client corresponding to the associated user, so as to prompt the push message on the client corresponding to the associated user.
[0191] In an example embodiment, the process of sending the push message to the client corresponding to the associated user, so as to prompt the push message on the client corresponding to the associated user, includes determining a push manner and a push priority corresponding to each associated user.
[0192] The push message is sent to the client corresponding to each associated user in the order from high to low of the push priority and the push manner.
[0193] In an example embodiment, the process of determining the push manner and the push priority corresponding to each associated user includes:
[0194] When the push manner of the associated user is determined to be offline push, the push priority of the associated user is determined based on the last online time of the associated user and / or the preset priority corresponding to the message type of the push message.
[0195] In a fifth aspect, the present application further provides an electronic device, including:
[0196] A memory is configured to store a computer program.
[0197] a processor configured to implement a method according to any one of the preceding embodiments when executing the computer program.
[0198] Of course, the electronic device can also include various network interfaces, power supplies, and the like.
[0199] For the electronic device provided in the present application, refer to the above embodiments, and the present application will not be repeated here.
[0200] The electronic device provided in the present application has the same beneficial effects as the message processing method described above.
[0201] In a sixth aspect, the present application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the message processing method described in any one of the preceding embodiments are implemented.
[0202] The computer readable storage medium includes, but is not limited to, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0203] For the computer readable storage medium provided in the present application, refer to the above embodiments, and the present application will not be repeated here.
[0204] The computer readable storage medium provided in the present application has the same beneficial effects as the message processing method described above.
[0205] It should also be noted that in the present specification, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0206] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Therefore, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A message processing method characterized by, The message processing method applied to a client comprises: sending an operation instruction to a server according to a user behavior, so that the server generates and issues a push message corresponding to the operation instruction when receiving the operation instruction; determining a prompt type of the received push message, the prompt type comprising a pop-up prompt and a notification bar prompt, the pop-up prompt not satisfying a storage condition, and the notification bar prompt satisfying the storage condition; storing the push message in a local database of the client when it is determined that the push message satisfies the storage condition based on the prompt type, and writing the push message into a cache of the client when it is determined that the push message does not satisfy the storage condition based on the prompt type; prompting the push message according to the prompt type.
2. The message processing method of claim 1, wherein, The process of storing the push message in the local database of the client comprises: determining an aggregation type of the push message; storing the push message in a preset data table of the local database of the client according to the aggregation type; the preset data table comprises a first data table and a second data table, the first data table being used to store aggregated push messages and un-aggregated push messages, and the second data table being used to store aggregated push messages.
3. The message processing method of claim 2, wherein, The process of storing the push message in the preset data table of the local database of the client according to the aggregation type comprises: when the aggregation type is non-aggregation, storing the push message in the first data table; and / or, when the aggregation type is aggregation, storing the push message in the first data table and the second data table, or storing the push message in the second data table, based on an aggregation identifier of the push message; and / or, when the aggregation type is coverage, storing the push message in the first data table and deleting a historical push message with the same aggregation identifier that has been stored in the first data table.
4. The message processing method of claim 3, wherein, The process of storing the push message in the first data table and the second data table, or storing the push message in the second data table, based on the aggregation identifier of the push message when the aggregation type is aggregation, comprises: when the aggregation type is aggregation, determining an aggregation identifier of the push message, the aggregation identifier comprising a grouping identifier and an independent identifier; judging whether there is data of a push message with the same grouping identifier in the first data table; if not, storing the push message in the first data table and the second data table; if yes, storing the push message in the second data table and updating data with the same grouping identifier in the first data table.
5. The message processing method according to any one of claims 1 to 4, characterized by, The process of prompting the push message according to the prompt type comprises: if the prompt type is a pop-up prompt, popping up a prompt box corresponding to the push message on a page of the client; and / or, if the prompt type is a notification bar prompt, determining a prompt message corresponding to the push message and prompting the prompt message on a notification bar page of the client.
6. The message processing method of claim 5, wherein, The process of determining the prompt message corresponding to the push message comprises: determining an issuing channel of the push message and a use state of the client; The prompt message is determined as a prompt identifier or message content of the push message according to the delivery channel and the use state.
7. The message processing method of claim 5, wherein, Before the prompt box corresponding to the push message is popped up on the page of the client, the message processing method further includes: If the prompt type is a pop-up prompt, the push message is written into a global pop-up window queue. The process of popping up the prompt box corresponding to the push message on the page of the client includes: The pop-up priorities of each push message in the global pop-up window queue are determined. The push message with the highest pop-up priority is determined as a to-be-pushed message, and a prompt box corresponding to the to-be-pushed message is popped up on the page of the client.
8. The message processing method of claim 7, wherein, The process of determining the push message with the highest pop-up priority as the to-be-pushed message and popping up the prompt box corresponding to the to-be-pushed message on the page of the client includes: The push message with the highest pop-up priority is determined as the to-be-pushed message. It is determined whether the client satisfies a push condition; the push condition includes that a current display page of the client is a preset whitelist page and / or the current display page does not have an un-closed prompt box and / or a current time satisfies a preset minimum interval time condition of a pop-up window; If yes, the prompt box corresponding to the to-be-pushed message is popped up on the page of the client.
9. The message processing method of claim 8, wherein, The process of determining the pop-up priorities of each push message in the global pop-up window queue includes: When it is monitored that the current display page of the client is closed, the current pop-up priorities of each push message in the global pop-up window queue are determined; and / or, When it is monitored that a prompt box popped up on the current display page of the client is closed, the current pop-up priorities of each push message in the global pop-up window queue are determined; and / or, When the push message is written into the global pop-up window queue, the current pop-up priorities of each push message in the global pop-up window queue are determined.
10. A message processing method characterized by, Applied to a server, the message processing method includes: An operation instruction sent by a client based on a user behavior is received, and a push message is generated based on the operation instruction; An associated user corresponding to the push message is determined; The push message is delivered to a client corresponding to the associated user, so as to prompt the push message on the client corresponding to the associated user; Further, when the client corresponding to the associated user determines that the push message satisfies a storage condition based on a prompt type, the push message is stored into a local database of the client corresponding to the associated user, and when the client corresponding to the associated user determines that the push message does not satisfy the storage condition based on the prompt type, the push message is written into a cache of the client corresponding to the associated user, the prompt type includes a pop-up prompt and a notification bar prompt, the pop-up prompt does not satisfy the storage condition, and the notification bar prompt satisfies the storage condition.
11. The message processing method of claim 10, wherein, The process of delivering the push message to the client corresponding to the associated user so as to prompt the push message on the client corresponding to the associated user includes: A push manner and a push priority corresponding to each associated user are determined; The push message is sent to the client corresponding to each of the associated users according to the push priority from high to low and the push mode.
12. The message processing method of claim 11, wherein, The process of determining the push mode and the push priority corresponding to each of the associated users comprises: When the push mode of the associated user is determined as offline push, the push priority of the associated user is determined based on the last online time of the associated user and / or the preset priority corresponding to the message type of the push message.
13. A message processing system characterized by The message processing system applied to the client comprises: The output module is configured to send an operation instruction to the server according to the user behavior, so that the server generates and sends a push message corresponding to the operation instruction when receiving the operation instruction. The receiving module is configured to determine the prompt type of the received push message, wherein the prompt type comprises a pop-up prompt and a notification bar prompt, the pop-up prompt does not satisfy a storage condition, and the notification bar prompt satisfies the storage condition. The storage module is configured to store the push message in a local database of the client when it is determined that the push message satisfies the storage condition based on the prompt type, and write the push message into a cache of the client when it is determined that the push message does not satisfy the storage condition based on the prompt type. The prompt module is configured to prompt the push message according to the prompt type.
14. An electronic device, comprising: The message processing system comprises: A memory configured to store a computer program; A processor configured to execute the computer program to implement the steps of the message processing method according to any one of claims 1-9 and / or the steps of the message processing method according to any one of claims 10-12.
15. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium, and the computer program is executed by the processor to implement the steps of the message processing method according to any one of claims 1-9 and / or the steps of the message processing method according to any one of claims 10-12.
Citation Information
Patent Citations
User-defined control global popup notification processing method and device
CN111555959A
Message pushing method and device, electronic equipment and computer readable storage medium
CN112733010A
Message prompting method, system and device for live broadcasting room, and computer equipment
CN113727130A