Disclosure of Invention
In view of this, the main objective of the present invention is to provide a notification method based on a new message, so as to improve user experience.
Another objective of the present invention is to provide a notification apparatus based on a new message, so as to improve user experience.
Still another objective of the present invention is to provide a notification system based on new messages, so as to improve user experience.
In order to achieve the above object, the present invention provides a notification method based on a new message, which comprises:
timing according to a new information request time threshold value obtained in advance, and obtaining a user state when the new information request time threshold value is timed;
determining that the user state is that the user resides in a microblog message page, triggering to generate a new message request carrying a current microblog message page identifier of the user, and outputting the new message request to a server;
and extracting a microblog message count value contained in the new message prompt message returned by the server, displaying the microblog message count value to a user, and updating a new message request time threshold value obtained in advance according to the new message request time threshold value contained in the new message prompt message.
Obtaining the new information request time threshold specifically includes:
and starting a microblog message page, pulling the microblog message and a new message request time threshold from a server, displaying the pulled microblog message, and storing the pulled new message request time threshold.
The starting of the microblog message page, pulling the microblog message from the server and displaying specifically comprises the following steps:
when monitoring that a microblog message page is started, a client sends a microblog message pulling request to a server, receives a microblog message pulling request response carrying a new message request time threshold value and microblog messages returned by the server, displays the microblog messages carried in the response, and stores the new message request time threshold value.
The user states include: the user currently resides on the microblog message page and the user currently leaves the microblog message page.
The microblog message page comprises: a home message page, a page message page, and a private message page.
The server receives a new information request and acquires a microblog message count value according to a user current microblog message page identifier carried in the new information request;
acquiring an updated new information request time threshold;
and carrying the microblog message count value and the new message request time threshold value in the new message prompt message, and sending the new message prompt message to the client.
The obtaining of the microblog message count value according to the user's current microblog message page identifier specifically includes:
and the server receives the new information request, acquires the stored microblog information of the client to which the new information request belongs, and inquires and acquires a microblog information counting value corresponding to the microblog information page identifier according to the microblog information page identifier carried in the new information request.
The acquiring of the updated new information request time threshold specifically includes:
and the server calculates a new information request time threshold value for new information access according to the acquired microblog message count value and a preset new information access control strategy.
The new information access control policy specifically includes:
if the current microblog message count value is 0, performing index avoidance on the next new message request time threshold; or,
the method comprises the steps of storing a record of a client starting a microblog message page and a new message request record, and grading users according to the record number of starting the microblog message page and the new message request record number, wherein each grade corresponds to a new message request time threshold value.
A new message based notification system, the system comprising: a client and a server, wherein,
the client is used for timing according to a new information request time threshold value obtained in advance after the microblog information is pulled from the server and displayed for the first time, acquiring a user state when the new information request time threshold value is reached by timing, triggering and generating a new information request carrying a current microblog information page identifier of the user if the user state is that the user resides on a microblog information page, outputting the new information request carrying the current microblog information page identifier to the server, extracting a microblog information count value contained in new information prompt information returned by the server, displaying the microblog information count value to the user, and updating the new information request time threshold value obtained in advance according to the new information request time threshold value contained in the new information prompt information;
the server is used for calculating a new information request time threshold value for new information access according to a preset new information access control strategy when the microblog information is sent to the client for the first time, outputting the new information request time threshold value to the client, classifying and storing the microblog information which is subsequently sent to the client, and counting the microblog information which is classified and stored;
receiving a new message request, acquiring a stored microblog message of a client to which the new message request belongs, inquiring and acquiring a microblog message count value corresponding to a microblog message page identifier according to the microblog message page identifier carried in the new message request, recalculating a new message request time threshold value for new message access according to a preset new message access control strategy, carrying the new message request time threshold value in new message prompt information, and outputting the new message request time threshold value to the client.
The client comprises: a microblog message page starting monitoring module, a new message request time threshold value storage module, a timing module, a user state acquisition module, a microblog message pulling module, a new message pulling module and a display module, wherein,
the microblog message page starting monitoring module is used for monitoring whether the client starts a microblog message page or not, and outputting a trigger signal to the microblog message pulling module when the microblog message page starting is monitored;
a new message request time threshold storage module, configured to receive and store a new message request time threshold output by the microblog message pull module; receiving a new information request time threshold output by a new information pulling module, and updating the stored new information request time threshold;
the timing module is used for receiving the trigger signal, timing and outputting the trigger signal to the user state acquisition module when the new information request time threshold stored by the new information request time threshold storage module is timed;
the user state acquisition module is used for receiving the trigger signal, acquiring a user state, and outputting the identification information of the current microblog message page to the new information pulling module if the user state is that the user resides in the microblog message page;
the microblog message pulling module receives the trigger signal, sends a microblog message pulling request to an external server, receives a microblog message pulling request response carrying a new message request time threshold value and microblog messages returned by the server, outputs the microblog messages carried in the response to the display module, outputs the new message request time threshold value to the new message request time threshold value storage module, and outputs the trigger signal to the timing module;
the new information pulling module is used for receiving the identification information of the microblog message page, triggering and generating a new information request and sending the new information request to an external server; receiving new message prompt information returned by the server, outputting a microblog message count value carried in the new message prompt information to a display module, and outputting a new message request time threshold value carried in the new message prompt information to a new message request time threshold value storage module;
and the display module is used for displaying the received microblog messages and the microblog message count value.
The server includes: a microblog message storage module, an access control strategy module, a microblog message processing module and a new message processing module, wherein,
the microblog message storage module is used for receiving microblog messages, storing the microblog messages in a classified mode according to the receiver list information contained in the microblog messages, and counting the microblog messages stored in the classified mode;
the access control strategy module is used for storing a new information access control strategy;
the microblog message processing module is used for receiving an external microblog message pulling request, acquiring microblog messages corresponding to the microblog message pulling request from the microblog message storage module, and updating a microblog message counting value; calculating a new information request time threshold value for new information access according to a new information access control strategy in the access control strategy module, and sending a pulling microblog message request response carrying the new information request time threshold value and the microblog message to the outside;
the new information processing module is used for receiving an external new information request, acquiring a microblog message count value from the microblog message storage module and updating the microblog message count value stored by the microblog message storage module; and calculating a new information request time threshold value for new information access according to a new information access control strategy in the access control strategy module, and sending new information prompt information carrying the new information request time threshold value and the microblog information count value to the outside.
A new message based notification apparatus, the apparatus comprising: a microblog message page starting monitoring module, a new message request time threshold value storage module, a timing module, a user state acquisition module, a microblog message pulling module, a new message pulling module and a display module, wherein,
the microblog message page starting monitoring module is used for monitoring whether the client starts a microblog message page or not, and outputting a trigger signal to the microblog message pulling module when the microblog message page starting is monitored;
a new message request time threshold storage module, configured to receive and store a new message request time threshold output by the microblog message pull module; receiving a new information request time threshold output by a new information pulling module, and updating the stored new information request time threshold;
the timing module is used for receiving the trigger signal, timing and outputting the trigger signal to the user state acquisition module when the new information request time threshold stored by the new information request time threshold storage module is timed;
the user state acquisition module is used for receiving the trigger signal, acquiring a user state, and outputting the identification information of the current microblog message page to the new information pulling module if the user state is that the user resides in the microblog message page;
the microblog message pulling module receives the trigger signal, sends a microblog message pulling request to an external server, receives a microblog message pulling request response carrying a new message request time threshold value and microblog messages returned by the server, outputs the microblog messages carried in the response to the display module, outputs the new message request time threshold value to the new message request time threshold value storage module, and outputs the trigger signal to the timing module;
the new information pulling module is used for receiving the identification information of the microblog message page, triggering and generating a new information request and sending the new information request to an external server; receiving new message prompt information returned by the server, outputting a microblog message count value carried in the new message prompt information to a display module, and outputting a new message request time threshold value carried in the new message prompt information to a new message request time threshold value storage module;
and the display module is used for displaying the received microblog messages and the microblog message count value.
Further comprising:
the user operation monitoring module is used for outputting a trigger signal to the microblog message pulling module after monitoring that the user operates the microblog message page; and outputting a trigger signal to the microblog message pulling module after the confirmation operation of the user on the microblog message counting value displayed by the display module is monitored.
The user operation monitoring module is further provided with a frequency of the user actively operating the microblog message page, after the fact that the user operates the microblog message page is monitored, whether the preset frequency of the user actively operating the microblog message page is met or not is judged, and if the preset frequency of the user actively operating the microblog message page is met, a trigger signal is output to the microblog message pulling module.
A new message based notification apparatus, the apparatus comprising: a microblog message storage module, an access control strategy module, a microblog message processing module and a new message processing module, wherein,
the microblog message storage module is used for receiving microblog messages, storing the microblog messages in a classified mode according to the receiver list information contained in the microblog messages, and counting the microblog messages stored in the classified mode;
the access control strategy module is used for storing a new information access control strategy;
the microblog message processing module is used for receiving an external microblog message pulling request, acquiring microblog messages corresponding to the microblog message pulling request from the microblog message storage module, and updating a microblog message counting value; calculating a new information request time threshold value for new information access according to a new information access control strategy in the access control strategy module, and sending a pulling microblog message request response carrying the new information request time threshold value and the microblog message to the outside;
the new information processing module is used for receiving an external new information request, acquiring a microblog message count value from the microblog message storage module and updating the microblog message count value stored by the microblog message storage module; and calculating a new information request time threshold value for new information access according to a new information access control strategy in the access control strategy module, and sending new information prompt information carrying the new information request time threshold value and the microblog information count value to the outside.
The microblog message storage module comprises: a microblog message processing unit, a microblog message storage unit and a microblog message counting unit, wherein,
the microblog message processing unit is used for receiving the microblog messages, analyzing and acquiring receiver list information contained in the microblog messages, respectively outputting the microblog messages to the microblog message storage units corresponding to the receiver list information, and outputting trigger signals to the microblog message counting units corresponding to the receiver list information;
the microblog message storage unit is used for receiving the microblog messages, performing classified storage, setting unread microblog message identifications of the classified storage, outputting the microblog messages with the unread microblog messages to the microblog message processing module according to a microblog message pulling request of the microblog message processing module, and updating the unread microblog message identifications to be read identifications;
the microblog message counting unit is used for receiving the trigger signal and adding 1 to the stored count value; and receiving the update information output by the microblog message processing module, and updating the stored count value.
The microblog message storage unit comprises: a pulled microblog message storage subunit and a microblog message to be pulled storage subunit, wherein,
the microblog message storage subunit is used for receiving and storing the microblog messages; according to the microblog message pulling request of the microblog message processing module, respectively outputting the stored microblog messages to the microblog message processing module and the microblog message pulled storage subunit, and performing emptying processing;
and the pulled microblog message storage subunit is used for storing the microblog message output by the to-be-pulled microblog message storage subunit.
The to-be-pulled microblog message storage subunit comprises:
and the main page message memory to be pulled, the page message memory to be pulled and the private message memory to be pulled are used for respectively storing the received main page message, the received page message and the received private message, respectively outputting the stored microblog messages to the microblog message processing module and the microblog message storage subunit after pulling according to the microblog message request of the microblog message processing module, and emptying the main page message memory to be pulled, the page message memory to be pulled and the private message memory to be pulled.
The microblog message counting unit comprises: a home page message counting subunit, a page message counting subunit, and a private message counting subunit that store a home page message count value, a page message count value, and a private message count value, respectively.
Each client corresponds to one microblog message storage unit and one microblog message counting unit.
The microblog message storage unit comprises: a microblog message processing unit, a homepage message storage unit, a page message storage unit, a private letter message storage unit, a homepage message counting unit, a page message counting unit and a private letter message counting unit, wherein,
a microblog message processing unit for receiving the microblog message, analyzing the type of the microblog message,
if the microblog message is a private message, outputting the microblog message to a private message storage unit corresponding to a receiver contained in the microblog message, and outputting a trigger signal to a private message counting unit corresponding to the receiver;
if the microblog message is a page message, outputting the microblog message to a page message storage unit, and outputting a trigger signal to a page message counting unit corresponding to the receiver list information contained in the microblog message;
if the microblog message is a homepage message, outputting the microblog message to a homepage message storage unit, and outputting a trigger signal to a homepage message counting unit corresponding to recipient list information contained in the microblog message;
the main page message storage unit, the page message storage unit and the private message storage unit are respectively used for storing the received microblog messages, setting the stored unread microblog message identifications, outputting the microblog messages with the unread identifications to the microblog message processing module according to the microblog message pulling request of the microblog message processing module and updating the unread microblog message identifications to be read identifications;
the home page message counting unit, the page message counting unit and the private message counting unit are respectively used for receiving the trigger signal, adding 1 to the stored count value and respectively setting a new message link pointing to the home page message storage unit, the page message storage unit or the private message storage unit; and receiving the update information output by the microblog message processing module, and updating the stored count value.
The number of the homepage message storage units and the number of the page message storage units are respectively one; each client side corresponds to a private message storage unit, a home page message counting unit, a page message counting unit and a private message counting unit respectively.
According to the technical scheme, the notification method, the notification device and the notification system based on the new message start a microblog message page, pull the microblog message and a new message request time threshold from a server, and display the pulled microblog message; timing according to the acquired new information request time threshold, and acquiring the user state when the new information request time threshold is timed; determining that the user state is that the user resides in a microblog message page, triggering to generate a new message request carrying a current microblog message page identifier of the user, and outputting the new message request to a server; acquiring a microblog message count value according to a current microblog message page identification of a user; acquiring an updated new information request time threshold; and extracting a microblog message count value contained in the new message prompt message returned by the server, displaying the microblog message count value to a user, and updating a new message request time threshold value obtained in advance according to the new message request time threshold value contained in the new message prompt message. Thus, by setting a new information request time threshold, frequent operations by the user can be avoided; meanwhile, a new message request is triggered only when the user is determined to reside in the microblog message page, so that the overhead of extra traffic brought to the client is avoided, and the use cost of the user is reduced; and the new information request time threshold is dynamically adjusted according to the microblog message count value of the requesting user, so that better experience is provided for the user.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Microblogs are developing rapidly as a new application of the internet, and increasingly become an important way for information acquisition and communication. The embodiment of the invention provides a method for notifying a new message of a home page, a page and a private page of a microblog client by taking the microblog client as a carrier, and provides an implementation scheme for notifying the change of the message of the client, so that a user receiving the message can be quickly notified of the message published by the user and pushed to a message receiver, and the convenience for the user to use a microblog is improved.
In practical application, because the user quantity and the message quantity related to the QQ client using the microblog version are very large, the QQ client is taken as an example for explanation, and for the user using the microblog version QQ online, the user expects to be capable of instantly knowing whether the pages such as microblog homepages, pages, private pages and the like have the reminding of the latest update message; furthermore, the reminding is expected to tend to be weak, namely other operations of the user are not influenced, and the user can decide whether to check the specific updating message of the microblog according to the needs of the user. Of course, the user of other clients can also know the updating condition of each information page by using the function.
It should be noted that embodiments of the present invention are equally applicable to other IMs, e.g., QQ, MSN, etc.
Based on the above analysis and description, the method for notifying a new message according to the embodiment of the present invention adopts a mode of combining Push and Get. The client acquires the update count value through the Get, determines whether each page of the user has a new message or not, and if so, reminds the user; meanwhile, in order to effectively control the new information request of the user, the server dynamically calculates the frequency of the next Get and the frequency of the Get data of each user and informs the client, and the client triggers and generates the new information request according to the frequency dynamically issued by the server. It should be noted that, for the situation that the user actively triggers generation of a new information request when refreshing the page, the same as the prior art is not described herein again.
Fig. 1 is a flowchart illustrating a notification method based on a new message according to an embodiment of the present invention. Referring to fig. 1, the process includes:
step 101, starting a microblog message page, pulling a microblog message and a new message request time threshold from a server, and displaying the pulled microblog message;
the method specifically comprises the following steps:
when monitoring that a microblog message page is started, a client sends a microblog message pulling request to a server, receives a microblog message pulling request response carrying a new message request time threshold value and microblog messages returned by the server, displays the microblog messages carried in the response, and stores the new message request time threshold value. Wherein,
and the new information request time threshold is calculated by the server according to a preset new information access control strategy.
Step 102, timing according to a new information request time threshold value obtained in advance, and obtaining a user state when timing to the new information request time threshold value;
in this step, the user state includes: the user currently resides on the microblog message page and the user currently leaves the microblog message page.
Step 103, determining that the user state is that the user resides in a microblog message page, triggering to generate a new message request carrying a current microblog message page identifier of the user, and outputting the new message request to a server;
in this step, the microblog message page includes: a home message page, a page message page, and a private message page.
104, acquiring a microblog message count value according to a current microblog message page identification of a user;
in this step, the server receives the new information request, acquires the stored microblog message of the client to which the new information request belongs, and queries and acquires a microblog message count value corresponding to the microblog message page identifier according to the microblog message page identifier carried in the new information request.
Step 105, obtaining an updated new information request time threshold;
in this step, the server calculates a new information request time threshold for new information access according to the acquired microblog message count value and a preset new information access control strategy.
The new information access control policy specifically includes:
and if the current microblog message count value is 0, performing index avoidance on the next new message request time threshold (frequency of updating count access). For example, assuming that the default update frequency (new information request time threshold) is 5 minutes, at the time of the client first Get access, if the update count is 0, the frequency of the client second access is set to 10 minutes; and in the second Get access, if the update count is still 0, the frequency of the third access of the client is 20 minutes, and so on. Or,
the method comprises the steps of storing a record of a client starting a microblog message page and a new message request record, and grading users according to the record number of starting the microblog message page and the new message request record number, wherein each grade corresponds to a new message request time threshold value. For example, if the user never opens the microblog message page, the setting server returns a larger new message request time threshold; and if the user frequently uses the microblog, setting a smaller new information request time threshold value correspondingly returned by the server. Or,
the new information request time threshold is determined by comprehensively considering the two schemes.
And step 106, extracting a microblog message count value contained in the new message prompt message returned by the server, displaying the microblog message count value to a user, and updating a new message request time threshold value obtained in advance according to the new message request time threshold value contained in the new message prompt message.
Fig. 2 is a schematic structural diagram of a notification system based on a new message according to an embodiment of the present invention. Referring to fig. 2, the system includes: a client and a server, wherein,
the client is used for timing according to a new information request time threshold value obtained in advance after the microblog information is pulled from the server and displayed for the first time, acquiring a user state when the new information request time threshold value is reached by timing, triggering and generating a new information request carrying a current microblog information page identifier of the user if the user state is that the user resides on a microblog information page, outputting the new information request carrying the current microblog information page identifier to the server, extracting a microblog information count value contained in new information prompt information returned by the server, displaying the microblog information count value to the user, and updating the new information request time threshold value obtained in advance according to the new information request time threshold value contained in the new information prompt information;
in the embodiment of the invention, the step of pulling and displaying the microblog message from the server by the client for the first time comprises the following steps: when monitoring that a microblog message page is started, a client sends a microblog message pulling request to a server, receives a microblog message pulling request response carrying a new message request time threshold value and microblog messages returned by the server, displays the microblog messages carried in the response, and stores the new message request time threshold value.
The microblog message page includes: a home message page, a page message page, and a private message page.
In the embodiment of the invention, the microblog messages comprise a microblog client homepage message, a page message and a private page message, wherein the homepage refers to the microblog users in the microblog and the message pages issued by the people listened to by the microblog users, the pages comprise three types of message pages, and the first type of message page refers to the message page referring to the microblog users in the microblog and the page displaying the microblog messages referring to the microblog users (e.g. ppchen); the second type of message page refers to a page for replying a microblog message of a microblog user (e.g., ppchen) in the microblog; the third type of message page refers to a page of the microblog message of private messages between other microblog users and the microblog user in the microblog.
In practical application, a client monitors whether a microblog message page is started or not, whether a user logs in the microblog message page or not can be judged after the client is started, if the user logs in the microblog message page, the microblog message page is started, and which page of a main page message page, a page message page and a private message page is started is judged, so that a message corresponding to the started page is pulled.
The method comprises the steps that a client side monitors the start of a microblog message page, and pulls a microblog message from a server, and the method is the same as the prior art, but is different from the prior art that a new message request time threshold value is also carried in a microblog message pulling request response returned by the server and used for indicating whether the client side adopts an active acquisition mechanism to acquire the frequency of whether the server has the new message of the client side.
The user states include: the user currently resides on the microblog message page and the user currently leaves the microblog message page.
The server is used for calculating a new information request time threshold value for new information access according to a preset new information access control strategy when the microblog information is sent to the client for the first time, outputting the new information request time threshold value to the client, classifying and storing the microblog information which is subsequently sent to the client, and counting the microblog information which is classified and stored;
receiving a new message request, acquiring a stored microblog message of a client to which the new message request belongs, inquiring and acquiring a microblog message count value corresponding to a microblog message page identifier according to the microblog message page identifier carried in the new message request, recalculating a new message request time threshold value for new message access according to a preset new message access control strategy, carrying the new message request time threshold value in new message prompt information, and outputting the new message request time threshold value to the client.
In the embodiment of the invention, the server receives the microblog message pulling request, acquires the microblog message of the client side to which the microblog message pulling request belongs, calculates the new message request time threshold value for new message access according to the preset new message access control strategy, carries the new message request time threshold value and the acquired microblog message in the microblog message pulling request response, and outputs the new message request time threshold value and the acquired microblog message to the client side.
In the embodiment of the present invention, the number of the clients may be one or more, and the number of the servers may be one or more.
In the following, the user triggers the client to pull the corresponding microblog message from the server according to the displayed microblog message count value, which belongs to the prior art, and reference may be made to related technical documents, which are not described herein again.
The client and the server according to the embodiment of the present invention are described below.
Fig. 3 is a schematic structural diagram of a client according to an embodiment of the present invention. Referring to fig. 3, the client includes: a microblog message page starting monitoring module, a new message request time threshold value storage module, a timing module, a user state acquisition module, a microblog message pulling module, a new message pulling module and a display module, wherein,
the microblog message page starting monitoring module is used for monitoring whether the client starts a microblog message page or not, and outputting a trigger signal to the microblog message pulling module when the microblog message page starting is monitored;
a new message request time threshold storage module, configured to receive and store a new message request time threshold output by the microblog message pull module; receiving a new information request time threshold output by a new information pulling module, and updating the stored new information request time threshold;
the timing module is used for receiving the trigger signal, timing and outputting the trigger signal to the user state acquisition module when the new information request time threshold stored by the new information request time threshold storage module is timed;
the user state acquisition module is used for receiving the trigger signal, acquiring a user state, and outputting the identification information of the current microblog message page to the new information pulling module if the user state is that the user resides in the microblog message page;
the microblog message pulling module receives the trigger signal, sends a microblog message pulling request to an external server, receives a microblog message pulling request response carrying a new message request time threshold value and microblog messages returned by the server, outputs the microblog messages carried in the response to the display module, outputs the new message request time threshold value to the new message request time threshold value storage module, and outputs the trigger signal to the timing module;
the new information pulling module is used for receiving the identification information of the microblog message page, triggering and generating a new information request and sending the new information request to an external server; receiving new message prompt information returned by the server, outputting a microblog message count value carried in the new message prompt information to a display module, and outputting a new message request time threshold value carried in the new message prompt information to a new message request time threshold value storage module;
and the display module is used for displaying the received microblog messages and the microblog message count value.
In this embodiment of the present invention, the client may further include:
the user operation monitoring module is used for outputting a trigger signal to the microblog message pulling module after monitoring that the user operates the microblog message page; and outputting a trigger signal to the microblog message pulling module after the confirmation operation of the user on the microblog message counting value displayed by the display module is monitored.
In the prior art, for an active operation microblog message page of a user, a client automatically triggers to pull corresponding microblog messages, but in practical application, when the user operates the microblog message page, frequent switching or frequent refreshing may be performed on each microblog message page instead of expecting to acquire related microblog messages, so that, if the user operation monitoring module monitors that the user operates the microblog message page, the microblog message pulling module is triggered to pull corresponding microblog messages. Therefore, in the embodiment of the invention, the frequency of the user actively operating the microblog message page can be further set in the user operation monitoring module, the user operation monitoring module judges whether the preset frequency of the user actively operating the microblog message page is met or not after the user operation monitoring module monitors that the user operates the microblog message page, and if the preset frequency of the user actively operating the microblog message page is met, a trigger signal is output to the microblog message pull module. Therefore, by performing policy control on the user active operation, the extra traffic overhead caused by frequent pulling of the microblog messages due to frequent refreshing or switching of microblog message pages by the user can be effectively reduced.
The set frequency information of the microblog message page actively operated by the user can be set by the user and can also be acquired in a mode of being issued by the server.
In the embodiment of the present invention, the trigger signals output by the modules may be the same or different, and are only used for triggering the corresponding modules to start the corresponding processing flows.
Fig. 4 is a schematic structural diagram of a server according to an embodiment of the present invention. Referring to fig. 4, the server includes: a microblog message storage module, an access control strategy module, a microblog message processing module and a new message processing module, wherein,
the microblog message storage module is used for receiving microblog messages, storing the microblog messages in a classified mode according to the receiver list information contained in the microblog messages, and counting the microblog messages stored in the classified mode;
the access control strategy module is used for storing a new information access control strategy;
the microblog message processing module is used for receiving an external microblog message pulling request, acquiring microblog messages corresponding to the microblog message pulling request from the microblog message storage module, and updating a microblog message counting value; calculating a new information request time threshold value for new information access according to a new information access control strategy in the access control strategy module, and sending a pulling microblog message request response carrying the new information request time threshold value and the microblog message to the outside;
the new information processing module is used for receiving an external new information request, acquiring a microblog message count value from the microblog message storage module and updating the microblog message count value stored by the microblog message storage module; and calculating a new information request time threshold value for new information access according to a new information access control strategy in the access control strategy module, and sending new information prompt information carrying the new information request time threshold value and the microblog information count value to the outside.
The new message prompt message may include: the frequency of the next pull update count, the frequency of reading data of each page and the frequency of actively refreshing each page by the user are obtained.
In the embodiment of the invention, the microblog message storage module comprises: a microblog message processing unit, a microblog message storage unit, and a microblog message counting unit (not shown in the figure), wherein,
the microblog message processing unit is used for receiving the microblog messages, analyzing and acquiring receiver list information contained in the microblog messages, respectively outputting the microblog messages to the microblog message storage units corresponding to the receiver list information, and outputting trigger signals to the microblog message counting units corresponding to the receiver list information;
the microblog message storage unit is used for receiving the microblog messages, performing classified storage, setting unread microblog message identifications of the classified storage, outputting the microblog messages with the unread microblog messages to the microblog message processing module according to a microblog message pulling request of the microblog message processing module, and updating the unread microblog message identifications to be read identifications;
the microblog message counting unit is used for receiving the trigger signal and adding 1 to the stored count value; and receiving the update information output by the microblog message processing module, and updating the stored count value.
In the above example, each client corresponds to one microblog message storage unit and one microblog message counting unit. Wherein,
the microblog message storage unit comprises: a pulled microblog message storage sub-unit and a to-be-pulled microblog message storage sub-unit (not shown in the figure), wherein,
the microblog message storage subunit is used for receiving and storing the microblog messages; according to the microblog message pulling request of the microblog message processing module, respectively outputting the stored microblog messages to the microblog message processing module and the microblog message pulled storage subunit, and performing emptying processing;
and the pulled microblog message storage subunit is used for storing the microblog message output by the to-be-pulled microblog message storage subunit.
In the embodiment of the invention, when a microblog message page of the client is started, the server sends the microblog messages stored in the pulled microblog message storage sub-area and the microblog message storage sub-area to be pulled to the client.
If the storage space of the pulled microblog message storage sub-area is full, the pulled microblog message storage sub-area can be updated in a first-in first-out mode.
Therefore, the microblog message storage subunit to be pulled is equivalent to setting unread marks for the microblog messages.
Further, the to-be-pulled microblog message storage subunit may include: the microblog message processing module is used for receiving a microblog message pulling request from the microblog message processing module, respectively outputting the received microblog message to the microblog message processing module and the microblog message pulled storage subunit, and performing emptying processing.
Likewise, the microblog message counting unit may include: a home page message counting subunit, a page message counting subunit, and a private message counting subunit that store a home page message count value, a page message count value, and a private message count value, respectively.
In practical applications, because the microblog messages include a home message, a page message and a private letter message, only one message receiver is provided for the private letter message, and one or more message receivers are provided for the home message and the page message. In this way, if the homepage message and the page message are stored according to the recipient list information, a storage space of the server is consumed, and therefore, in the embodiment of the present invention, the microblog message storage module may also include: a microblog message processing unit, a homepage message storage unit, a page message storage unit, a private letter message storage unit, a homepage message counting unit, a page message counting unit and a private letter message counting unit, wherein,
a microblog message processing unit for receiving the microblog message, analyzing the type of the microblog message,
if the microblog message is a private message, outputting the microblog message to a private message storage unit corresponding to a receiver contained in the microblog message, and outputting a trigger signal to a private message counting unit corresponding to the receiver;
if the microblog message is a page message, outputting the microblog message to a page message storage unit, and outputting a trigger signal to a page message counting unit corresponding to the receiver list information contained in the microblog message;
if the microblog message is a homepage message, outputting the microblog message to a homepage message storage unit, and outputting a trigger signal to a homepage message counting unit corresponding to recipient list information contained in the microblog message;
the homepage message storage unit is used for storing the received microblog messages, setting the stored unread microblog message identifications, outputting the microblog messages with the unread microblog messages to the microblog message processing module according to the microblog message pulling request of the microblog message processing module and updating the unread microblog message identifications to be read identifications;
the page message storage unit is used for storing the received microblog messages, setting the stored unread microblog message identifications, outputting the microblog messages with the unread microblog messages to the microblog message processing module according to the microblog message pulling request of the microblog message processing module, and updating the unread microblog message identifications to be read identifications;
in the embodiment of the invention, the main page message storage unit and the page message storage unit are one.
The private message storage unit is used for storing the received microblog messages, setting the stored unread microblog message identifications, outputting the microblog messages with the unread microblog identifications to the microblog message processing module according to the microblog message pulling request of the microblog message processing module and updating the unread microblog message identifications to be read identifications;
in the embodiment of the invention, each client corresponds to a private message storage unit.
The homepage message counting unit is used for receiving the trigger signal, adding 1 to the stored counting value and setting a new message link pointing to the homepage message storage unit; receiving update information output by the microblog message processing module, and updating the stored count value;
the page message counting unit is used for receiving the trigger signal, adding 1 to the stored count value and setting a new message link pointing to the page message storage unit; receiving update information output by the microblog message processing module, and updating the stored count value;
the private message counting unit is used for receiving the trigger signal and adding 1 to the stored count value; and receiving the update information output by the microblog message processing module, and updating the stored count value.
In the embodiment of the invention, each client corresponds to a home page message counting unit, a page message counting unit and a private message counting unit respectively. The identification can be distinguished through the client identification and the microblog message type identification.
In practical application, the server can also actively trigger the function of the Push message, when the update count of the user changes, the server firstly restores the frequency of the update count to a default value, then checks whether the Push condition is met, if the Push condition is met, the server actively pushes a message prompt message to inform the client to pull the update count, otherwise, the client does not process the update count.
The Push condition includes: a time difference threshold, an update count threshold, a Push switch state, and a client state, wherein,
if the time difference between the last Get time and the current time is larger than the set time difference threshold value, the Push condition is met;
the accumulated update count value of the user is greater than the update count threshold value and meets the Push condition;
the client is in the on-line state, the Push switch is set to be on, the Push condition is met, the client is in the off-line state, and the client calls the protocol to open the Push switch after monitoring that the user is on-line.
In practical application, in order to avoid unnecessary pull requests, based on the above analysis, the client performs pull according to the following principle:
(1) after logging in, updating the count and the data strictly according to the frequency Get issued by the server;
(2) the user is informed that the update state exists at present, but the user does not read, the update state is always kept, and the Get update count and data are not needed;
(3) when the QQ client is not in the foreground of the user client, the counting and the data are not updated by the Get, the counting is changed from the background to the foreground every time, and the counting is updated by the Get once under the condition of meeting the frequency limit;
(4) if the user is not on the microblog panel, data is obtained at most once; if the user is on the microblog panel, circularly Get to update the count under the condition of meeting the frequency limit condition, and if a new update count exists, automatically pulling the message of updating the current page to the client side to remind the user under the condition of meeting the data pull-out frequency limit condition;
(5) and if the update count cannot be pulled (the pulling fails), the frequency of the next pull update count is used for index avoidance.
Further, the situation that the request quantity is uncontrollable due to the automatic pulling logic is avoided. In the embodiment of the invention, the user pulling request is graded:
the user switches to the microblog panel for the first time to cause the level of the pull data to be 1; the level of data pull caused by user active refresh is 2; the auto-pull logic causes the level of the pull data to be 3, etc. The priority of the level 1 is highest, the server responds to the request with high level preferentially, and the server can decide whether to reject the request according to the load condition of the server.
As can be seen from the above, according to the notification method, device and system based on the new message, disclosed by the embodiment of the invention, when the microblog message page is started, the microblog message is pulled from the server and displayed; timing according to a new information request time threshold value obtained in advance, and obtaining a user state when the new information request time threshold value is timed; determining that the user state is that the user resides in a microblog message page, triggering to generate a new message request carrying a current microblog message page identifier of the user, and outputting the new message request to a server; acquiring a microblog message count value; acquiring an updated new information request time threshold; and extracting a microblog message count value contained in the new message prompt message returned by the server, displaying the microblog message count value to a user, and updating a new message request time threshold value obtained in advance according to the new message request time threshold value contained in the new message prompt message. Thus, by setting a new information request time threshold, frequent operations by the user can be avoided; meanwhile, the new information request is triggered only when the user is determined to reside on the microblog message page, so that the operation that the client automatically pulls the microblog message when the user does not reside on the microblog message page is avoided, the overhead of extra traffic brought to the client is avoided, and the use cost of the user is reduced; moreover, through a new information access control strategy of the server, the server can control the pulling request quantity of the user, dynamically adjust a new information request time threshold value according to the microblog message count value or the user classification of the requesting user, and provide better service for the user, thereby providing better experience for the user.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.