CN116192792A - Message processing method, device, electronic equipment and storage medium - Google Patents

Message processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116192792A
CN116192792A CN202310112079.6A CN202310112079A CN116192792A CN 116192792 A CN116192792 A CN 116192792A CN 202310112079 A CN202310112079 A CN 202310112079A CN 116192792 A CN116192792 A CN 116192792A
Authority
CN
China
Prior art keywords
message
message data
notification
client
sending
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.)
Pending
Application number
CN202310112079.6A
Other languages
Chinese (zh)
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202310112079.6A priority Critical patent/CN116192792A/en
Publication of CN116192792A publication Critical patent/CN116192792A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The disclosure relates to a message processing method, a device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring the message content of a notification message to be sent, traversing first sending objects of the notification message, and creating notification message data for each first sending object according to the message content; the notification message data of each first sending object are written into a preset first database; responding to a reading request sent by a client, and acquiring notification message data from a first database under the condition that an account of the client is a first sending object; the notification class message data is sent to the client to cause the client to present the notification class message data. According to the scheme, a large amount of notification message data sent in a short time are directly written into the first database, then the message data are read from the first database for display, only the message data of the current account are read each time, the read data size is small, and the stability and timeliness of the message sending service can be guaranteed.

Description

Message processing method, device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a message processing method, a device, an electronic device and a storage medium.
Background
In a common content platform class application, the types of information exist in both interactive class messages and notification class messages. The interactive messages refer to messages triggered between people and are used for carrying interactive behaviors of users on contents, such as praise, comment, attention and other message types of works. Notification class messages refer to messages generated between the platform and the user. For example, the platform privacy protocol update message belongs to a notification class message. The notification message needs to send a corresponding message to all users in the platform, and most cases need to be sent in an emergency, so that the characteristics of large sending amount, high timeliness and the like exist.
The large transmission amount of the notification message often causes stacking of message transmission queues, thereby affecting the stability of the message transmission service and causing delay in message transmission and reception.
Disclosure of Invention
The present disclosure provides a message processing method, apparatus, electronic device, and storage medium, so as to at least solve the problem of message transmission and reception delay caused by a large transmission amount of notification messages in the related art. The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided a message processing method, including:
Acquiring the message content of a notification message to be sent, traversing first sending objects of the notification message, and creating notification message data for each first sending object according to the message content;
writing notification message data of each first sending object into a preset first database;
responding to a reading request sent by a client, and acquiring the notification message data from a first database corresponding to an account of the client when the account is one of the first sending objects;
and sending the notification message data to the client so that the client can display the notification message data.
In one possible implementation manner, after the notification class message data of each first sending object is written into a preset first database, the method further includes:
acquiring message content of an interaction type message to be sent, traversing second sending objects of the interaction type message, and creating interaction type message data for each second sending object according to the message content;
writing the interactive message data of each second sending object into a preset second database;
Responding to a reading request sent by the client, acquiring the notification message data from the first database and acquiring the interaction message data from the second database under the condition that an account of the client is the first sending object and the second sending object at the same time;
and sending the notification message data and the interaction message data to the client so that the client displays the notification message data and the interaction message data.
In a possible implementation manner, the notification message data and the interaction message data at least comprise sending time of a message, the sending time of the notification message refers to the time when a platform sends the notification message to a server, and the sending time of the interaction message refers to the time when an interaction object sends the interaction message to the server; after the interactive class message data is obtained from the second database, the method further comprises:
adding the notification type message data and the interaction type message data into a message queue;
sequencing each message data in the first message queue according to the sending time to obtain a first message sequence;
And sending the first message sequence to the client so that the client displays the notification message data and the interaction message data according to the message data sequence in the first message sequence.
In a possible implementation manner, the notification type message data and the interaction type message data at least include priority information of messages, and after the interaction type message data is acquired from the second database, the method further includes:
adding the notification type message data and the interaction type message data into a message queue;
determining the priority of each message data in the second message queue according to the priority information, and sequencing the message data according to the order of the priority from high to low to obtain a second message sequence;
and sending the second message sequence to the client so that the client displays the notification message data and the interaction message according to the message data sequence in the second message sequence.
In one possible implementation manner, the notification class message data at least includes an effective time of the notification class message, and after the notification class message data is acquired from the first database corresponding to the account, the notification class message data further includes:
According to the effective time, determining effective notification message data in an effective state at the current moment in the notification message data;
and sending the effective notification type message data to the client so that the client displays the effective notification type message data.
In one possible implementation manner, after the valid notification class message data is sent to the client, the method further includes:
scanning the notification class message data in the first database with a polling task;
and deleting the invalid notification class message data from the first database when the invalid notification class message data exceeding the effective time is scanned.
In one possible implementation manner, the notification message data includes at least a display level of the notification message, where the display level includes a top display and a normal display, and the normal display is displayed according to a transmission time sequence, and after the notification message data is transmitted to the client, the method further includes:
recording the number of times that the notification message data are displayed by the client under the condition that the display level of the notification message is the set-top display;
And when the times reach the preset display times, adjusting the display grade of the notification message data to be the common display.
According to a second aspect of embodiments of the present disclosure, there is provided a message processing apparatus, the apparatus comprising:
the notification type message data creation module is configured to acquire message content of a notification type message to be sent, traverse first sending objects of the notification type message and create notification type message data for each first sending object according to the message content;
the first writing module is configured to execute the writing of notification message data of each first sending object into a preset first database;
the notification message data acquisition module is configured to execute a read request sent by a client, and acquire notification message data from a first database corresponding to an account of the client when the account is one of the first sending objects;
and the first sending module is configured to send the notification type message data to the client so that the client can display the notification type message data.
In one possible embodiment, the apparatus further comprises:
The interactive type message data creation module is configured to acquire the message content of the interactive type message to be sent, traverse the second sending objects of the interactive type message and create one piece of interactive type message data for each second sending object according to the message content;
the second writing module is configured to execute writing of the interaction type message data of each second sending object into a preset second database;
an interactive message data acquisition module configured to perform, in response to a read request sent by the client, acquiring the notification message data from the first database and the interactive message data from the second database when the account of the client is the first sending object and the second sending object at the same time;
and the second sending module is configured to send the notification type message data and the interaction type message data to the client so that the client can display the notification type message data and the interaction type message data.
In a possible implementation manner, the notification message data and the interaction message data at least comprise sending time of a message, the sending time of the notification message refers to the time when a platform sends the notification message to a server, and the sending time of the interaction message refers to the time when an interaction object sends the interaction message to the server; the apparatus further comprises:
A first joining module configured to perform joining the notification class message data and the interaction class message data into a first message queue;
the first ordering module is configured to order each message data in the first message queue according to the sending time to obtain a first message sequence;
and the third sending module is used for sending the first message sequence to the client so that the client displays the notification message data and the interaction message data according to the message data sequence in the first message sequence.
In a possible implementation manner, at least the notification class message data and the interaction class message data include priority information of a message, and the apparatus further includes:
a second joining module configured to perform joining the notification class message data and the interaction class message data into a second message queue;
the second sorting module is configured to determine the priority of each message data in the second message queue according to the priority information, and sort the message data according to the order of the priority from high to low to obtain a second message sequence;
And a fourth sending module configured to send the second message sequence to the client, so that the client displays the notification type message data and the interaction type message according to the message data sequence in the second message sequence.
In a possible implementation manner, the notification class message data at least includes an effective time of the notification class message, and the apparatus further includes:
an effective notification message data determining module configured to determine effective notification message data in an effective state at a current time in the notification message data according to the effective time;
and a fifth sending module configured to send the valid notification class message data to the client, so that the client can display the valid notification class message data.
In one possible embodiment, the apparatus further comprises:
a scanning module configured to perform scanning of the notification class message data in the first database with a polling task;
a deletion module configured to perform deletion of the invalid notification class message data from the first database when the invalid notification class message data exceeding the validation time is scanned.
In one possible implementation manner, the notification message data includes at least a display level of the notification message, where the display level includes a top display and a normal display, and the normal display is displayed according to a transmission time sequence, and the apparatus further includes:
a recording module configured to perform recording of the number of times the notification-type message data is presented by the client in a case where the display level of the notification-type message is the set-top display;
and the adjusting module is configured to execute the adjustment of the display level of the notification message data to the common display when the times reach the preset display times.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the method comprises the steps of obtaining message content of notification messages to be sent, traversing first sending objects of the notification messages, and creating notification message data for each first sending object according to the message content; writing notification message data of each first sending object into a preset first database; responding to a reading request sent by a client, and acquiring the notification message data from a first database corresponding to an account of the client when the account is one of the first sending objects; and sending the notification message data to the client so that the client can display the notification message data. According to the scheme, a large amount of notification message data sent in a short time are directly written into the first database, then the message data are read from the first database for display, only the message data of the current account are read each time, the read data size is small, and the stability and timeliness of the message sending service can be guaranteed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
Fig. 1 is a diagram illustrating a related art notification-type messaging scheme according to an exemplary embodiment.
Fig. 2 is an application environment diagram illustrating a message processing method according to an exemplary embodiment.
Fig. 3 is a flow chart illustrating a first message processing method according to an exemplary embodiment.
Fig. 4 is a flow chart illustrating a second message processing method according to an exemplary embodiment.
Fig. 5 is a schematic diagram illustrating a second message processing method according to an exemplary embodiment.
Fig. 6 is a block diagram of a message processing apparatus according to an example embodiment.
Fig. 7 is a block diagram of an electronic device for message processing, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
Referring to fig. 1, a schematic diagram of a notification-type messaging scheme in the related art is shown according to an exemplary embodiment.
As shown in fig. 1, when the service condition is satisfied, the message sending function is triggered, the message is sent to the message sending queue, and the message is sent to the database through the message sending service, so that the storage of the message is realized.
The inventor finds that the notification message data is generally for all users in the process of researching the related technology, the flow is particularly large, and the database cannot be impacted by the large flow. Therefore, in the related art, after the notification messages are generated, a large number of notification messages are issued to the message sending queue in an asynchronous manner, and then sent to the database through the message sending service, and the database stores a large number of notification messages. However, this approach, which has a large message delivery level, tends to cause message queues to accumulate, message service pressure to increase, and database storage pressure to increase, thereby affecting the stability of the message service, resulting in message transmission and reception delays.
In order to improve the sending efficiency of a message, the disclosure provides a message processing method, a device, an electronic device and a storage medium.
Referring to fig. 2, an application environment diagram of a message processing method is shown, where the application environment may include a server 01 and a client 02, according to an exemplary embodiment.
Specifically, in the embodiment of the present disclosure, the server 01 may include a server that operates independently, or a distributed server, or a server cluster that is formed by a plurality of servers, and may also be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (content delivery network), and basic cloud computing services such as big data and artificial intelligence platforms. The server 01 may include a network communication unit, a processor, a memory, and the like. Specifically, the server 01 may be configured to traverse a transmission object of a notification message to be transmitted, and create a piece of notification message data for each transmission object according to a message content of the notification message; the notification message data of each sending object is written into a first database corresponding to the sending object; responding to a reading request sent by a client, and acquiring notification message data from a first database corresponding to an account of the client under the condition that the account is one of the sending objects; the notification class message data is sent to the client 02, so that the notification class message data is displayed on the client 02.
Specifically, in the embodiment of the present disclosure, the client 02 may include a smart phone, a desktop computer, a tablet computer, a notebook computer, a digital assistant, an intelligent wearable device, an on-vehicle terminal, or other types of entity devices, or may include software running in the entity devices, for example, web pages provided by some service providers to users, or may also provide applications provided by the service providers to users.
Fig. 3 is a flowchart illustrating a first message processing method according to an exemplary embodiment, and as shown in fig. 3, the method may be applied to the server 01 shown in fig. 2, including the following steps.
In step S101, the message content of the notification message to be sent is obtained, the first sending object of the notification message is traversed, and a piece of notification message data is created for each first sending object according to the message content.
Notification class messages refer to messages generated between the platform and the user. For example, after a user triggers an event action, the platform backend system automatically triggers service notifications, such as service openings, audit result notifications, service expiration notifications, and the like. In addition, a message automatically generated by the platform, such as a platform privacy protocol update message, is included. The notification message has the characteristics of large transmission quantity, strong timeliness and the like.
In the scheme, after the platform generates the notification message, the notification message is sent to the server. The server side firstly acquires the message content of the notification message, such as the title, content, time and other important content of the message. And traversing the sending object of the notification class message to obtain a first sending object. The server creates a piece of notification type message data for each first sending object, wherein the content of the notification type message data is important message content such as the title, the content, the time and the like of the message.
In particular, the first sending object may be a user on the platform.
In step S102, notification message data of each first sending object is written into a preset first database.
The server may be pre-configured with a first database to store notification class message data.
The first database may be one shared by a plurality of first transmission objects, or may be a corresponding first database provided for each first transmission object.
After creating the completion notification class message data for each first sending object, the notification class message data is written into the first database.
Compared with the related art, the method and the device skip the steps of writing the notification message data into the message queue and sending the notification message data to the database by using the message sending service, so that the problem of stacking of the sending queue caused by large sending quantity of the notification message data is avoided.
In addition, when a corresponding first database is provided for each first transmission object, notification message data is scattered and stored in the databases of the respective first transmission objects, and compared with the related art, the storage pressure of the databases is reduced by storing all message data in the same database.
In step S103, in response to the read request sent by the client, when the account of the client is one of the first sending objects, the notification message data is obtained from a first database corresponding to the account.
When a user opens a message reading page of the client, the client is triggered to send a reading request to the server.
And under the condition that the account of the user is determined to be one of the first sending objects in the step S101, the server acquires notification message data of the first sending object from the first database.
In step S104, the notification class message data is sent to the client, so that the client displays the notification class message data.
The server returns the notification message data acquired from the first database to the client, so that the client can display the notification message data on a message reading page.
For the notification message data with higher emergency degree, the scheme can complete the display of the message data at the client in a shorter time so as to ensure that a user can acquire information in time.
For notification type message data with short validation time and extremely large transmission order, with the scheme in the related art, a situation may occur that the message data has not yet been issued to the client, and the validation time has expired. By utilizing the technical scheme in the application, the notification message data is directly stored in the database, the links of putting the data into a message sending queue and a message sending service are omitted, the data circulation efficiency is improved, and a user can acquire the message data in time.
The purpose of setting a message transmission queue and a message transmission service in the related art is that: when a large amount of data is written in a short time, the data flow is relatively large, the database cannot bear, and the impact of a large amount of data on the database can be reduced by adopting an asynchronous mode of a transmission queue. However, the disadvantage is that setting up a messaging queue and messaging service is prone to large amounts of data accumulation, causing message delays. According to the scheme, two links of the message sending queue and the message sending service are omitted, data is directly written into the first database, data accumulation caused by the sending queue is avoided, and the stability and timeliness of the message sending service can be guaranteed.
In summary, obtaining the message content of a notification message to be sent, traversing the first sending objects of the notification message, and creating notification message data for each first sending object according to the message content; writing notification message data of each first sending object into a preset first database; responding to a reading request sent by a client, and acquiring the notification message data from a first database corresponding to an account of the client when the account is one of the first sending objects; and sending the notification message data to the client so that the client can display the notification message data. According to the scheme, a large amount of notification message data sent in a short time are directly written into the first database, then the message data are read from the first database for display, only the message data of the current account are read each time, the read data size is small, and the stability and timeliness of the message sending service can be guaranteed.
In a possible implementation manner, the notification class message data includes at least an effective time of the notification class message, and after step S103, the method further includes:
In step S201, according to the effective time, valid notification message data in an effective state at the current moment is determined in the notification message data;
in step S202, the valid notification class message data is sent to the client, so that the client displays the valid notification class message data.
In step S201-step S202, the validation time is also included in the data content of the notification class message data. When the server receives a read request, acquiring notification message data from a first database, and marking the state of each notification message data according to the current moment and the effective time carried in each notification message data, wherein the marking content can be specifically: an active state and an inactive state. Then, the server selects message data marked as 'valid state' from all notification message data in the first database, and obtains valid notification message data.
Illustratively, if the effective time of a certain notification class message data is 5 months 1 day 00:00-5 months 2 day 23:59 and the current time is 5 months 1 day 12:00, the notification class message data will be marked as "valid state", which is valid notification class message data.
The server returns the valid notification class message data to the client, so that the client will only display the valid notification class message data.
According to the scheme, the effective state of each notification message data is determined according to the effective time, and only the effective notification message data is returned to the client, so that the data transmission quantity from the server to the client is reduced; the client only displays the effective notification message data, so that the page display data volume of the client is reduced, meanwhile, the user can rapidly acquire the effective message data, and the information acquisition efficiency of the user is improved.
In one possible implementation, after step S202, the method further includes:
in step S203, scanning the notification class message data in the first database with a polling task;
in step S204, when invalid notification class message data exceeding the effective time is scanned, the invalid notification class message data is deleted from the first database.
In step S203-step S204, the server-side background starts a polling task to scan all notification message data in the first database, and marks the status of each notification message data according to the current time and the effective time carried in each notification message data. When notification class message data marked as "invalid state" is found, the message data is deleted from the first database.
According to the scheme, the invalid notification message data are timely deleted from the first database, so that the storage pressure of the first database is reduced, and the storage cost of the first database is reduced.
Fig. 4 is a flowchart illustrating a second message processing method according to an exemplary embodiment, and as shown in fig. 4, the method may be applied to the server 01 shown in fig. 2, including the following steps.
In step S301, the message content of the notification message to be sent is obtained, the first sending objects of the notification message are traversed, and a piece of notification message data is created for each first sending object according to the message content.
In the embodiment of the present disclosure, step S301 may refer to step S101, which is not described herein.
In step S302, notification message data of each first sending object is written into a preset first database.
In the embodiment of the present disclosure, step S302 may refer to step S102, which is not described herein.
In step S303, the message content of the interaction class message to be sent is obtained, the second sending objects of the interaction class message are traversed, and an interaction class message data is created for each second sending object according to the message content.
The interactive messages refer to messages triggered between people and are used for carrying interactive behaviors of users on contents, such as praise, comment, attention and other message types of works.
In the scheme, the interactive object generates an interactive message, clicks a sending key and sends the interactive message to the server. The server side firstly acquires the message content of the interactive message, such as the title, content, time and other important content of the message. And then traversing the second sending objects of the interaction type message, and creating interaction type message data for each second sending object, wherein the content of the interaction type message data is important message content such as the title, the content, the time and the like of the message.
In step S304, the interactive message data of each second sending object is written into a preset second database.
The server may be pre-configured with a second database to store interaction class message data.
The second database may be one shared by a plurality of second transmission objects, or may be provided with a corresponding second database for each second transmission object.
After creating the interaction class message data for each second sending object, the interaction class message data is written into the second database.
In step S305, in response to the read request sent by the client, in a case where the account of the client is the first sending object and the second sending object at the same time, the notification type message data is acquired from the first database, and the interaction type message data is acquired from the second database.
When a user opens a message reading page of the client, the client is triggered to send a reading request to the server.
Under the condition that the account of the user is determined to be a first sending object and a second sending object at the same time, the server acquires notification message data from a first database corresponding to the account, and acquires interaction message data from a second database.
In step S306, the notification class message data and the interaction class message data are sent to the client, so that the client displays the notification class message data and the interaction class message data.
The server returns the acquired notification message data and interaction message data to the client, so that the client can display the notification message data and the interaction message data on a message reading page at the same time.
Fig. 5 is a schematic diagram illustrating a second message processing method according to an exemplary embodiment.
As shown in fig. 5, the server writes notification class message data into the first database and interaction class message data into the second database. When the information is read, the server side acquires the notification information data from the first database and acquires the interaction information data from the second database. And sending the notification type message data and the interaction type message data to the client so that the client displays the notification type message data and the interaction type message data.
In the scheme, in response to a reading request sent by a client, notification message data are acquired from a first database, and interaction message data are acquired from a second database, so that the client can display the notification message data and the interaction message data at the same time. According to the scheme, the notification message data and the interaction message data are respectively stored in different databases, so that the storage pressure of the data is reduced, the data transmission pressure is reduced, and the stability and timeliness of the message sending service can be ensured. And the notification message data and the interaction message data are displayed at the client side at the same time, so that the display efficiency and the information acquisition efficiency of the user are improved.
In a possible implementation manner, the notification type message data and the interaction type message data at least include a sending time of a message, and after step S305, the method further includes:
in step S401, the notification type message data and the interaction type message data are added into a message queue;
in step S402, ordering each message data in the first message queue according to the sending time to obtain a first message sequence;
in step S403, the first message sequence is sent to the client, so that the client displays the notification message data and the interaction message data according to the message data sequence in the first message sequence.
In steps S401 to S403, the sending time of the notification class message refers to the time when the platform sends the notification class message to the server, and the sending time of the interaction class message refers to the time when the interaction object sends the interaction class message to the server.
The server orders the messages according to the sending time of the messages, for example, the messages may be ordered according to the order from early to late, and the message data with earlier sending time is arranged in front of the message data with later sending time. Or may be ordered in the order of the transmission times from late to early. After ordering a first message sequence is obtained.
The client displays the message data according to the sequence of the first message sequence, so that a user can conveniently browse the message data according to the time sequence, and the efficiency of acquiring information by the user is improved.
In a possible implementation manner, at least the notification type message data and the interaction type message data include priority information of a message, and after step S305, the method further includes:
in step S501, the notification type message data and the interaction type message data are added into a message queue;
in step S502, determining the priority of each message data in the second message queue according to the priority information, and sorting the message data according to the order of the priority from high to low to obtain a second message sequence;
in step S503, the second message sequence is sent to the client, so that the client displays the notification message data and the interaction message according to the message data sequence in the second message sequence.
In step S501-step S503, the message data are ordered according to the order of high priority and low priority, so that the client can display the message data with high priority in front of the message data with low priority, and the user can conveniently browse the message data according to the order of priority, thereby improving the efficiency of obtaining the information by the user.
In one possible implementation manner, the notification message data includes at least a display level of the notification message, where the display level includes a top display and a normal display, and the normal display is displayed according to a transmission time sequence, and after the notification message data is transmitted to the client, the method further includes:
in step S601, when the display level of the notification message is the set top display, recording the number of times that the notification message data is displayed by the client;
in step S602, when the number of times reaches a preset number of display times, the display level of the notification message data is adjusted to the normal display.
In step S601-step S602, if the display level of a notification class message is set-top display, the number of times that the notification class message is presented is marked in the first database.
Each time the server receives a read request sent by the client to it, the server obtains a message from the database and sends the message to the client for presentation. Thus, the number of presentations of a message is determined by the number of times the message is sent by the server to the client.
The maximum display times of the message data displayed on the top are preset, when the marked display times reach the maximum display times, the top display of the message data is canceled, and the display level of the message is adjusted to be common display.
Specifically, the common display refers to display according to the sending time sequence of the messages, and the sending time of the messages refers to the time when the platform sends the messages to the server. For example, the display may be performed in the order from early to late in the transmission time, or may be performed in the order from late to early in the transmission time.
The scheme can present important notification message data to the user in a top-set display mode, and is convenient for the user to obtain important information efficiently. After the information is displayed for a plurality of times, the user is considered to acquire the information content of the set-top display, and the server side cancels the set-top display of the message data, so that the position of the top is reserved for more important new messages.
Fig. 6 is a block diagram of a message processing apparatus according to an example embodiment. Referring to fig. 6, the apparatus 700 includes:
a notification class message data creation module 701 configured to perform obtaining a message content of a notification class message to be sent, and traverse first sending objects of the notification class message, and create one notification class message data for each of the first sending objects according to the message content;
a first writing module 702 configured to perform writing of notification class message data of each of the first sending objects into a preset first database;
A notification message data obtaining module 703 configured to perform, in response to a read request sent by a client, obtaining, in a case where an account of the client is one of the first sending objects, the notification message data from a first database corresponding to the account;
a first sending module 704 configured to send the notification class message data to the client, so that the client exposes the notification class message data.
In one possible embodiment, the apparatus further comprises:
the interactive type message data creation module is configured to acquire the message content of the interactive type message to be sent, traverse the second sending objects of the interactive type message and create one piece of interactive type message data for each second sending object according to the message content;
the second writing module is configured to execute writing of the interaction type message data of each second sending object into a preset second database;
an interactive message data acquisition module configured to perform, in response to a read request sent by the client, acquiring the notification message data from the first database and the interactive message data from the second database when the account of the client is the first sending object and the second sending object at the same time;
And the second sending module is configured to send the notification type message data and the interaction type message data to the client so that the client can display the notification type message data and the interaction type message data.
In a possible implementation manner, the notification message data and the interaction message data at least comprise sending time of a message, the sending time of the notification message refers to the time when a platform sends the notification message to a server, and the sending time of the interaction message refers to the time when an interaction object sends the interaction message to the server; the apparatus further comprises:
a first joining module configured to perform joining the notification class message data and the interaction class message data into a first message queue;
the first ordering module is configured to order each message data in the first message queue according to the sending time to obtain a first message sequence;
and the third sending module is used for sending the first message sequence to the client so that the client displays the notification message data and the interaction message data according to the message data sequence in the first message sequence.
In a possible implementation manner, at least the notification class message data and the interaction class message data include priority information of a message, and the apparatus further includes:
a second joining module configured to perform joining the notification class message data and the interaction class message data into a second message queue;
the second sorting module is configured to determine the priority of each message data in the second message queue according to the priority information, and sort the message data according to the order of the priority from high to low to obtain a second message sequence;
and a fourth sending module configured to send the second message sequence to the client, so that the client displays the notification type message data and the interaction type message according to the message data sequence in the second message sequence.
In a possible implementation manner, the notification class message data at least includes an effective time of the notification class message, and the apparatus further includes:
an effective notification message data determining module configured to determine effective notification message data in an effective state at a current time in the notification message data according to the effective time;
And a fifth sending module configured to send the valid notification class message data to the client, so that the client can display the valid notification class message data.
In one possible embodiment, the apparatus further comprises:
a scanning module configured to perform scanning of the notification class message data in the first database with a polling task;
a deletion module configured to perform deletion of the invalid notification class message data from the first database when the invalid notification class message data exceeding the validation time is scanned.
In one possible implementation manner, the notification message data includes at least a display level of the notification message, where the display level includes a top display and a normal display, and the normal display is displayed according to a transmission time sequence, and the apparatus further includes:
a recording module configured to perform recording of the number of times the notification-type message data is presented by the client in a case where the display level of the notification-type message is the set-top display;
and the adjusting module is configured to execute the adjustment of the display level of the notification message data to the common display when the times reach the preset display times.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 7 is a block diagram illustrating an electronic device for message processing, which may be a terminal, according to an exemplary embodiment, and an internal structure diagram thereof may be as shown in fig. 7. The electronic device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the electronic device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a message processing method. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the electronic equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of a portion of the structure associated with the disclosed aspects and is not limiting of the electronic device to which the disclosed aspects apply, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an exemplary embodiment, there is also provided an electronic device including:
a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the message processing method described above.
In an exemplary embodiment, a computer readable storage medium is also provided, e.g., a memory, comprising instructions executable by a processor of an electronic device to perform the above-described message processing method. Alternatively, the computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, a computer program product is also provided, comprising a computer program which, when executed by a processor, implements the above-described message processing method.
The method and the device have the advantages that a plurality of attribute category labels of the object are displayed on a preset screening page; responding to an operation instruction triggered based on any attribute type label, and displaying an object set identifier corresponding to any attribute type on the preset screening page; responding to an operation instruction triggered based on the object set identification, displaying the object set identification in a first preset form on the preset screening page, and displaying a screening completion control; the user can conveniently and quickly screen the screening object set corresponding to any attribute type label; the user can determine the screening object set by one key, so that the selection difficulty and complexity of the objects are reduced; each attribute category corresponds to a service field, so that object screening according to the field category is realized; the method includes the steps that a resource transfer page is displayed in response to an operation instruction triggered based on the screening completion control; the resource transfer page comprises a resource transfer control; thereby facilitating the rapid payment of virtual resources after the user determines the screening object; responding to an operation instruction triggered based on the resource transfer control, and sending a resource recommendation request to a server; the resource recommendation request carries the object set identifier; the server pushes multimedia resources to recommended objects based on the resource recommendation request; the recommended object is an interactive object corresponding to a screening object, and the screening object is an object corresponding to the object set identifier; the payment can be completed based on the triggering operation of the resource transfer control, so that a resource recommendation request is sent to the server, and the server can quickly determine the screening object according to the object set identification and recommend the multimedia resource.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method of message processing, the method comprising:
acquiring the message content of a notification message to be sent, traversing first sending objects of the notification message, and creating notification message data for each first sending object according to the message content;
writing notification message data of each first sending object into a preset first database;
Responding to a reading request sent by a client, and acquiring the notification message data from the first database under the condition that an account of the client is the first sending object;
and sending the notification message data to the client so that the client can display the notification message data.
2. The method according to claim 1, further comprising, after writing notification class message data of each of the first transmission objects into a preset first database:
acquiring message content of an interaction type message to be sent, traversing second sending objects of the interaction type message, and creating interaction type message data for each second sending object according to the message content;
writing the interactive message data of each second sending object into a preset second database;
responding to a reading request sent by the client, acquiring the notification message data from the first database and acquiring the interaction message data from the second database under the condition that an account of the client is the first sending object and the second sending object at the same time;
And sending the notification message data and the interaction message data to the client so that the client displays the notification message data and the interaction message data.
3. The method according to claim 2, wherein the notification message data and the interaction message data at least comprise a sending time of a message, the sending time of the notification message refers to a time when a platform sends the notification message to a server, and the sending time of the interaction message refers to a time when an interaction object sends the interaction message to the server; after the interactive class message data is obtained from the second database, the method further comprises:
adding the notification type message data and the interaction type message data into a first message queue;
sequencing each message data in the first message queue according to the sending time to obtain a first message sequence;
and sending the first message sequence to the client so that the client displays the notification message data and the interaction message data according to the message data sequence in the first message sequence.
4. The method of claim 2, wherein at least message priority information is included in the notification class message data and in the interaction class message data, further comprising, after retrieving the interaction class message data from the second database:
adding the notification type message data and the interaction type message data into a second message queue;
determining the priority of each message data in the second message queue according to the priority information, and sequencing the message data according to the order of the priority from high to low to obtain a second message sequence;
and sending the second message sequence to the client so that the client displays the notification message data and the interaction message according to the message data sequence in the second message sequence.
5. The method of claim 1, wherein the notification class message data includes at least an effective time of the notification class message, and further comprising, after retrieving the notification class message data from the first database corresponding to the account:
according to the effective time, determining effective notification message data in an effective state at the current moment in the notification message data;
And sending the effective notification type message data to the client so that the client displays the effective notification type message data.
6. The method of claim 5, further comprising, after sending the valid notification class message data to the client:
scanning the notification class message data in the first database with a polling task;
and deleting the invalid notification class message data from the first database when the invalid notification class message data exceeding the effective time is scanned.
7. The method according to claim 1, wherein the notification-type message data includes at least a display level of the notification-type message, the display level including a set-top display and a normal display, the normal display being displayed according to a transmission time sequence, and further comprising, after transmitting the notification-type message data to the client:
recording the number of times that the notification message data are displayed by the client under the condition that the display level of the notification message is the set-top display;
and when the times reach the preset display times, adjusting the display grade of the notification message data to be the common display.
8. A message processing apparatus, the apparatus comprising:
the notification type message data creation module is configured to acquire message content of a notification type message to be sent, traverse first sending objects of the notification type message and create notification type message data for each first sending object according to the message content;
the first writing module is configured to execute the writing of notification message data of each first sending object into a preset first database;
the notification message data acquisition module is configured to execute a read request sent by a client, and acquire notification message data from a first database corresponding to an account of the client when the account is one of the first sending objects;
and the first sending module is configured to send the notification type message data to the client so that the client can display the notification type message data.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the message processing method of any of claims 1-7.
10. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by an electronic device processor, enable an electronic device to perform the message processing method of any one of claims 1-7.
CN202310112079.6A 2023-02-06 2023-02-06 Message processing method, device, electronic equipment and storage medium Pending CN116192792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310112079.6A CN116192792A (en) 2023-02-06 2023-02-06 Message processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310112079.6A CN116192792A (en) 2023-02-06 2023-02-06 Message processing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116192792A true CN116192792A (en) 2023-05-30

Family

ID=86441862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310112079.6A Pending CN116192792A (en) 2023-02-06 2023-02-06 Message processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116192792A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110661668A (en) * 2019-09-29 2020-01-07 深圳前海微众银行股份有限公司 Message sending management method and device
CN110971669A (en) * 2019-11-11 2020-04-07 北京达佳互联信息技术有限公司 Message notification method, device, server, electronic equipment and readable storage medium
CN111385294A (en) * 2020-03-04 2020-07-07 腾讯科技(深圳)有限公司 Data processing method, system, computer device and storage medium
US20200243083A1 (en) * 2017-08-10 2020-07-30 Sony Corporation Information processing device, program, and information processing method
CN113094002A (en) * 2021-05-12 2021-07-09 北京字节跳动网络技术有限公司 Message processing method and device, electronic equipment and computer medium
WO2021238287A1 (en) * 2020-05-29 2021-12-02 苏州浪潮智能科技有限公司 Method, system and device for active pushing of distributed system, and medium
CN114900489A (en) * 2021-01-26 2022-08-12 腾讯科技(深圳)有限公司 Message processing method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200243083A1 (en) * 2017-08-10 2020-07-30 Sony Corporation Information processing device, program, and information processing method
CN110661668A (en) * 2019-09-29 2020-01-07 深圳前海微众银行股份有限公司 Message sending management method and device
CN110971669A (en) * 2019-11-11 2020-04-07 北京达佳互联信息技术有限公司 Message notification method, device, server, electronic equipment and readable storage medium
CN111385294A (en) * 2020-03-04 2020-07-07 腾讯科技(深圳)有限公司 Data processing method, system, computer device and storage medium
WO2021238287A1 (en) * 2020-05-29 2021-12-02 苏州浪潮智能科技有限公司 Method, system and device for active pushing of distributed system, and medium
CN114900489A (en) * 2021-01-26 2022-08-12 腾讯科技(深圳)有限公司 Message processing method and device, electronic equipment and storage medium
CN113094002A (en) * 2021-05-12 2021-07-09 北京字节跳动网络技术有限公司 Message processing method and device, electronic equipment and computer medium

Similar Documents

Publication Publication Date Title
US9760909B2 (en) Systems and methods for generating lead intelligence
CN107979632B (en) Processing method, device and system for push information
CA2682037C (en) Method and system for facilitating access to a promotional offer
WO2011002989A1 (en) System and method for enhancing digital content
CN105808277A (en) Card type desktop realization method, device and system
CN112328564A (en) Special resource sharing method and device and electronic equipment
CN113900764B (en) Page data acquisition method, page data display method and device
US20220150197A1 (en) Integration of an email client with hosted applications
JP2008046911A (en) Group management system and group management method in bidirectional communication service
CN113742601A (en) Content sharing method and device, computer equipment and storage medium
JP7003318B2 (en) Information management device and information management method
CN112905936A (en) Page recording animation generation method, page operation log query method and computer equipment
CN116192792A (en) Message processing method, device, electronic equipment and storage medium
RU2002112343A (en) Methods and systems for the presentation and display of information on the keyboard
JP4937317B2 (en) Questionnaire distribution apparatus, method, and computer program
CN112347382A (en) Product page sharing method and device and electronic equipment
JP4513418B2 (en) Posted article update method, posted article update apparatus, and posted article update program via network
US11736427B2 (en) Integration of client applications with hosted applications
US11855951B2 (en) Method used in a message posting assistance service that assists a user in posting a message including thumbnail image data and text data to a message sharing service
CN112291329B (en) Information display method, device and equipment
CN114385360A (en) Virtual resource distribution method, device, equipment, medium and product
CN116468008A (en) Information insertion method, apparatus, device, medium and computer program product
CN117193924A (en) Page display method and device and computer equipment
CN116880869A (en) System interface updating method, device, computer equipment and storage medium
CN118656506A (en) Picture management method, device and system

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