Service apparatus and method for providing deferred message, and storage medium

A service apparatus and method for providing a deferred message, and a storage medium. The service method for providing a deferred message comprises: receiving a message parameter sent by a first client and to be forwarded to a second client (S1); determining whether a user associated with the second client is online (S2); if the user associated with the second client is not online, determining that the message parameter to be forwarded is a message parameter of a deferred message, and saving the message parameter into a database of a server (S3); and when receiving an online prompt of the user associated with the second client, delivering the message parameter to the second client (S4). The method can significantly reduce the network traffic and occupation of the storage space.

TECHNICAL FIELD

The present disclosure relates to computer technology, and in particular to a service apparatus and method for providing deferred message, and a storage medium.

BACKGROUND

Email is a network application emerging in earlier days, and email users can transmit data and information in a non-real-time manner with email addresses provided by a server. With email, users can achieve a non-real-time communication which, however, cannot meet a user's requirement for real time property. Instant messaging tools have appeared now for developing Instant messaging (IM) transactions to transmit data and information between users in real time.

With the development of network technology, instant messaging has been accepted by most of cyber-citizens and become an indispensable part of work and life for people, and IM tools have also been indispensable tools for people in daily work and life. IM tools are widely used in network for daily communications by transmitting text messages or transmitting data files, voice messages, etc. in real time. With the wide use of IM tools, higher demands have been made on their usability. Instant messaging is a manner of real time communication and requires users online for efficient communications. While a user is in an offline status, other users can only send deferred messages to that user.

Deferred message service is such a service that enables deferred messages to be sent to a selected user so that the user can see the messages when he/she was not online. Deferred message may be one sent by a message poster to the selected user, e.g. from user A to user B, or one sent to a selected user group, e.g. to a plurality of users that participated in an activity, or one sent to the users that have a common property, e.g. to all the VIP users.

FIG. 1shows a prior art service system for providing deferred message. As shown inFIG. 1, the prior art service system10for providing deferred message includes a first client11used by a message poster, a second client12used by a target user, a server13and a database14in the server13. The first client11and the second client12serve as a front end, and the server13serves as a back end.

The prior art service system10provides deferred message in the following operation flow. The first client11posts a message to the server13. The server13checks whether the target user associated with the second client12is online; if so, the message is directly delivered to the second client12, otherwise the message is stored in the database14in the server13as a deferred message. Then when the target user associated with the second client12becomes online, the server13obtains a notification. The server13checks whether there is a deferred message for the second client12, and if so, the deferred message stored in the database14is delivered to the second client12and is deleted; in other words, the deferred message is no longer stored in the database14in the server13, but stored locally in the second client12.

In the prior art service system10for providing deferred message, if a large amount of deferred messages are received during the offline of the target user associated with the second client12, a mass volume of storage space has to be used for storing these deferred messages in the database14in the server13, resulting in a large consumption of storage space of the database14. In order to avoid excessive occupation of the storage space of the database14, a conventional approach is to keep only the deferred messages of a certain amount and in a certain period. The amount and period set for keeping deferred messages has a direct influence on the scale of the storage medium for the database14.

Moreover, after a deferred message is delivered to the second client12, the delivered deferred message is no longer kept in the database14in the server13, but retained locally in the second client12. The user thus can only review a history record of messages locally but not review the history record of messages on any computer. In other words, the prior art service system10for providing deferred message does not support roaming of history record of messages.

In addition, the prior art service system10for providing deferred message involves a huge amount of network traffic. When a large amount of users are online simultaneously or a large amount of users are logging-in, the huge amount of network traffic will lead to a high requirement on the outward bandwidth of the server.

SUMMARY

The disclosure provides a service apparatus and method for providing deferred message, and a storage medium to greatly decrease the network traffic and the occupation of the storage space, and to enable roaming of history record of messages.

The present disclosure solves its technical problems with the following technical solutions.

In an aspect, a service apparatus for providing deferred message is provided, including: a receiving module configured to receive a message parameter sent by a first client and to be forwarded to a second client; a determining module configured to determine whether a user associated with the second client is online; a storage module configured to determine that the message parameter to be forwarded is a message parameter of a deferred message if the user associated with the second client is not online, and to store the message parameter into a database of a server; and a delivering module configured to deliver the message parameter to the second client when receiving an online prompt of the user associated with the second client.

In another aspect, a service method for providing deferred message is provided, including: receiving a message parameter sent by a first client and to be forwarded to a second client; determining whether a user associated with the second client is online; determining that the message parameter to be forwarded is a message parameter of a deferred message if the user associated with the second client is not online, and storing the message parameter into a database of a server; and delivering the message parameter to the second client when receiving an online prompt of the user associated with the second client.

In yet another aspect, a storage medium is provided including computer-executable instructions for implementing a service method for providing deferred message, the service method for providing deferred message including: receiving a message parameter sent by a first client and to be forwarded to a second client; determining whether a user associated with the second client is online; determining that the message parameter to be forwarded is a message parameter of a deferred message if the user associated with the second client is not online, and storing the message parameter into a database of a server; and delivering the message parameter to the second client when receiving an online prompt of the user associated with the second client.

The service apparatus and method for providing deferred message, and the storage medium provided by the present disclosure may bring various advantages.

Network traffic may be greatly reduced. Since type and content for a non-real-time communication message may be finite and can be generalized, in the present disclosure the message template and the message parameter are separated and the message template is downloaded in advance, thereby the common portion (i.e. the message template) among deferred messages is not downloaded repeatedly and the network traffic is reduced. The yield of service under a limited outward bandwidth is thus increased and the usage of resources is improved.

With the service apparatus and method for providing deferred message, and the storage medium provided by the present disclosure, storage space occupied on the database in the server can be greatly reduced. Since message template is applied, only a few message parameters need to be stored and thus the consumption of storage space in the server can be reduced. It is to be noted that most of the messages of non-real-time communications are group messages covering known user groups, and in the present disclosure group messages are stored collectively in a specialized group message storage, the storage space can be further reduced and prompt responses can be made.

Moreover, the service apparatus and method for providing deferred message, and the storage medium provided by the present disclosure can be configured such that after a deferred message is delivered to the second client, the deferred message stored in the database in the server is not deleted. As a message parameter occupy only a relatively small storage space, this will not excessively increase the burden on the server; as the message parameters can be retained in the server, roaming of history record of messages can be supported whereby a user can view the message history on any computer.

The disclosure as generally described above will be detailed in terms of embodiments with reference to the drawings in the following so that a person skilled in the art will appreciate and be enabled to implement the technical solutions.

DETAILED DESCRIPTION OF THE EMBODIMENTS

In order to make clear the technical approaches that the disclosure takes for achieving one or more goals and its effects, the service apparatus and method for providing deferred message as proposed in the disclosure will be detailed below with reference to the drawings in terms of specific embodiments, methods, steps, structures, features and effects.

The forgoing and other technical content, features and effect of the disclosure will be clearly presented in the detailed description of the embodiments below with reference to the drawings. The drawings however are illustrative instead of limiting.

FIG. 2illustrates an environment in which a service apparatus100for providing deferred message according to an embodiment of the disclosure can be applied. The service apparatus100for providing deferred message is applied in a server130including an access layer131, a database132and a message template storage133. The access layer131is configured to enable communications between the server130and clients, e.g. a first client110and a second client120. A user associated with the first client110is a message poster, and a user associated with the second client120is a target user. In the embodiment, the first client110and the second client120each have a local message template storage111and121.

Reference is made toFIG. 3which illustrates a block diagram of the service apparatus100for providing deferred message according to the embodiment of the disclosure. The service apparatus100for providing deferred message includes a generalizing module101, a receiving module102, a determining module103, a storage module104and a delivering module105. It is to be noted that the respective modules may be computer program or program segments for implementing one or more specific functions, and the dividing of the modules above does not mean that the practical program codes are necessarily separated.

The generalizing module101is configured to classify deferred messages of a type in advance to extract a portion, which is common to the deferred messages in both formality and content, as a message template. The message template may be stored in the local message template storage111of the first client110, the local message template storage112of the second client120, and the message template storage133of the server130. The message template includes mainly a format template and a content template.

In the present disclosure, the message template is stored in the local message template storage111of the first client110, the local message template storage112of the second client120and the message template storage133of the server130in advance, the first client110, when sending a deferred message, can simply post the message parameters of the deferred message to the database132in the server130; the server130, when delivering the deferred message, can simply deliver to the second client120the message parameters of the deferred message stored in the database132. When presenting the deferred message, the second client120can simply retrieve the corresponding message template from its local message template storage121and post the message parameters to the retrieved message template, and the deferred message can thus be presented to the user associated with the second client120.

For example, when the first client110intends to send to the second client120a message of adding a user, the message is a deferred message if the user associated with the second client120is not online. When sending the deferred message of adding a user, the first client110may simply send the message parameters of this deferred message, e.g. the name of the user that is performing the adding and the name of the user to be added, to the server130. The server130needs only to store the received message parameters to the database132, and then delivers the message parameters stored in the database132(e.g. the name of the user that is performing the adding and the name of the user to be added) to the second client120when the user associated with the second client120becomes online.

Moreover, in the present disclosure, the deferred message may include an individual message and a group message, and the message parameter may include an individual message parameter and a group message parameter. Correspondingly, the database132in the server130may include an individual message storage132aand a group message storage132b.The individual message storage132ais configured to store the individual message parameter of an individual message for separate particular target users, and the group message storage132bis configured to store the group message parameter of a group message that covers a plurality of target users of a particular group. In other words, in the present disclosure, a message, by which the people to be covered and of which the content is known, is a group message and collectively stored in the specialized group message storage132b.Target users of a group message may include two types: one being a plurality of users having a common property, e.g. having an identity of player (e.g. VIP users, or users of Photo Show service, or all users of a certain game, etc.), and another being a plurality of users not having a common property, but having specific numbers, e.g. a plurality of users randomly selected. A group message has message content and properties as specialized configuration file for being managed in a configuration and management center. A group message has a user status, e.g. already read by the user or not yet read by the user, which is stored separately from the individual message; e.g. it may be stored in the group message storage132bwhich is in a rank faster than that of the individual message storage132a.

The receiving module102is configured to receive the message parameter sent by the first client110and to be forwarded to the second client120.

The determining module103is configured to determine whether the user associated with the second client120is online.

The delivering module105is configured to deliver the message parameter to the second client120when receiving an online prompt of the user associated with the second client120.

In an embodiment, the delivering module105is further configured to check, when receiving the online prompt of the user associated with the second client120, whether the message template stored in the local message template storage121of the second client120needs to be updated. If the message template stored in the local message template storage121of the second client120needs to be updated, the message template stored in the local message template storage121of the second client120is updated based on the message template in the message template storage133of the server130.

A person skilled in the art will appreciate that in the present disclosure, when the user associated with the second client120becomes online, the message template stored in the local message template storage121of the second client120may be updated. It is possible to both update the message template that has been stored in the local message template storage121and download a new message template from the message template storage133in the server130. Alternatively, it is also possible to configure such that only the message template that has been stored in the local message template storage121is updated. Before presenting the deferred message, the second client120may determine whether a message template corresponding to the deferred message is stored in the local message template storage121of the second client120, and present, if yes, the deferred message based on the message parameter and the message template, or download, if no, the message template corresponding to the deferred message to the local message template storage121of the second client120from the message template storage133of the server130and then present the deferred message based on the message parameter and the message template. In other words, the message template may be pre-downloaded from the message template storage133in the server130at the time of a certain template being needed, which prevents the local storage space of the second client being excessively occupied.

If the message template stored in the local message template storage121of the second client120does not need to be updated or has been updated, the delivering module105may deliver the message parameter to the second client120so that the second client120presents the deferred message based on the message parameter and the message template stored in the local message template storage121. After the delivering module delivers the message parameter to the second client120, a status of the deferred message may be modified so that the deferred message becomes a delivered message.

With reference toFIG. 4, a service method for providing deferred message is provided according to an embodiment of the disclosure. Before the following step S1is performed, deferred messages of a type may be classified in advance to extract a portion, which is common to the deferred messages in both formality and content, as a message template, and the message template may be stored in the message template storage133of the server130and a local message template storage of a client (e.g. the local message template storage111of the first client111and the local message template storage121of the second client120) shown inFIG. 2.

In step S1, a message parameter sent by the first client110and to be forwarded to the second client120is received.

In step S2, it is determined whether a user associated with the second client120is online. If the user associated with the second client120is not online, then it is determined that the message to be forwarded is a deferred message, and step S3is executed. If the user associated with the second client120is online, then step S5is executed.

In step S3, the message parameter of the deferred message is stored into the database132of the server130.

In step S4, when an online prompt of the user associated with the second client120is received, the message parameter is delivered to the second client120.

In step S5, the message parameter is delivered to the second client120.

FIG. 5illustrates a flowchart for delivering the message parameter to the second client120. As shown inFIG. 5, the step of delivering the message parameters to the second client120may further comprise:

step S42of updating, if the message template stored in the local message template storage121of the second client120needs to be updated, the message template stored in the local message template storage121of the second client120based on the message template in the message template storage133of the server130; and

With the service apparatus and method for providing deferred message according to the disclosure, network traffic may be greatly reduced. Since type and content for a non-real-time communication message (i.e. deferred message) may be finite and can be generalized, in the present disclosure the message template and the message parameter are separated and the message template is downloaded in advance, thereby the common portion (i.e. the message template) among deferred messages is not downloaded repeatedly and the network traffic is reduced. The yield of service under a limited outward bandwidth is thus increased and the usage of resources is improved.

With the service apparatus and method for providing deferred message according to the present disclosure, storage space occupied on the database132in the server130can be greatly reduced. Since message template is applied, only a few message parameters need to be stored and thus the consumption of storage space in the server130can be reduced. It is to be noted that most of the messages of non-real-time communications are group messages covering known user groups, and in the present disclosure group messages are stored collectively in a specialized group message storage132b,the storage space can be further reduced and prompt responses can be made.

Moreover, the service apparatus and method for providing deferred message according to the present disclosure can be configured such that after a deferred message is delivered to the second client120, the deferred message stored in the database132in the server130is not deleted. As a message parameter occupy only a relatively small storage space, this will not excessively increase the burden on the server130; as the message parameters can be retained in the server130, roaming of history record of messages can be supported whereby a user can view the message history on any computer.

A person skilled in the art will appreciate that all or part of the steps for implementing the above embodiments can be performed by hardware, or by programs instructing corresponding hardware. The programs may be stored in a computer readable medium which may be a read-only memory, a magnetic disk or an optical disc, and the like.

The inventive disclosure has been described above in terms of specific embodiments which, however, are not intended to limit the scope of the inventive concept. Those skilled in the art may make various modifications and improvements without departing from the spirit and concept of the invention which is solely defined by the appended claims.