1. Field of the Invention
The present invention relates to a peer-to-peer based message transmitting method for a network system and the network system thereof, and more particularly, to a peer-to-peer based message transmitting method for a network system and the network system thereof, capable of reducing load of a management device in the network system, and ensuring that all clients can receive desired messages, in order to improve performance and reliability of message transmission.
2. Description of the Prior Art
There are usually a large number of messages transmitted in a network system. With advances in data processing techniques, the quantity of transmitted data becomes even larger, such that different communication protocols are developed in the industry for specifying methods of transmitting data and messages. One method specifies the transmission of a specific message to a specific client, where the message is transmitted to a specific location defined by the Internet Protocol (IP), in order to ensure that the specific client can receive the message. Another method comprises the message being transmitted to the network system by broadcasting, where the message is transmitted randomly via routers; hence all clients in the network system may receive this message. Once received, the clients may retain or discard this message.
Please refer to
Although the method of transmitting the specific message to the specific client by the management device 110 ensures that all clients can receive the message, the load is entirely imposed on the management device 110, such that the management device 110 has the burden of performance of the entire network system 10. For example, if a message needs to be transmitted to one hundred clients, the management device 110 has to repeatedly transmit the message one hundred times, which reduces the performance. In order to solve the problem, another conventional method comprises the management device 110 broadcasting the message to the network system 10, where the message is transmitted between the clients C1-CN randomly. Though the load of the management device 110 can be reduced significantly, it cannot ensure that all of the clients C1-CN can receive a desired message, and the reliability of the network system 10 is reduced. Therefore, there is a need for providing a message transmitting method which gives consideration to both the performance and reliability of the network system.
It is therefore an objective of the present invention to provide a peer-to-peer based message transmitting method for a network system and the network system thereof, capable of reducing load of a management device in the network system, and ensuring that all clients can receive desired messages, in order to improve performance and reliability of message transmission.
The present invention discloses a peer-to-peer based message transmitting method for a network system comprising a plurality of clients and a management device. The method comprises: the management device receiving a first message; the management device adding information to the first message which is related to a plurality of target clients corresponding to the first message, in order to generate a second message; and the management device transmitting the second message to the plurality of target clients.
The present invention further discloses a network system, which comprises a plurality of clients and a management device. The management device comprises a processor and a storage device, where the storage device stores a program for instructing the processor to execute the method comprising: receiving a first message; adding information to the first message, the information related to a plurality of target clients corresponding to the first message, in order to generate a second message; and transmitting the second message to the plurality of target clients.
The present invention further discloses a peer-to-peer based message transmitting method for a network system comprising a plurality of clients and a management device. The method comprises the management device receiving information related to a plurality of target clients corresponding to a first message when a client among the plurality of clients sends the first message to the plurality of target clients; and the management device controlling the client to transmit the first message to the plurality of target clients.
The present invention further discloses a network system comprising a plurality of clients and a management device. The management device comprises a processor and a storage device, where the storage device stores a program for instructing the processor to execute the method comprising: receiving information related to a plurality of target clients corresponding to a first message when a client among the plurality of clients sends the first message to the plurality of target clients; and controlling the client to transmit the first message to the plurality of target clients.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Please refer to
In detail, since the clients C1′-C13′ can share partial tasks related to message transmission of the management device 210, the management device 210 is mainly responsible for receiving the messages delivered by the clients C1′-C13′, and managing the message subscription by each of the clients C1′-C13′. The management device 210 further ensures that all of the clients C1′-C13′ can receive desired messages, in order to maintain reliability of the network system 20. Please refer to
The above operation of the program 220 in the management device 210 can be summarized into a peer-to-peer based message transmitting process 40. As shown in
Step 400: Start.
Step 402: Receive the message Msg1.
Step 404: Add information to the message Msg1 which is related to a plurality of target clients corresponding to the message Msg1, in order to generate the message Msg1′.
Step 406: Divide the plurality of target clients into at least one level.
Step 408: Control the plurality of target clients to transmit the message Msg1′ to each target client level by level.
Step 410: End.
Please note that, in order to ensure that all of the clients C1′-C13′ can receive the desired message, the management device 210 has to know information related to all of the clients C1′-C13′. The information may include characteristics of each of the clients C1′-C13′ such as location, types of subscribed messages, transmitting performance, etc. The management device 210 can select the method of transmitting messages between the clients C1′-C13′ arbitrarily, in order to achieve the best message transmission performance of the network system 20. For example, the client closer to the management device 210 or having better channel quality may be put into a higher level; the client with higher transmitting performance can perform more tasks, and thus more target clients are put into the level following the level of this client; the client with a weaker transmitting performance can only perform a few tasks, and thus fewer target clients are put into the level following the level of this client.
In order to enhance the performance of message transmission, the management device 210 may also merge the messages and then perform the transmission. Therefore, a message received by the clients C1′-C13′ may be composed of a plurality of different sub-messages. For example, as shown in
In addition, when a new client needs to enter the network system 20, the management device 210 manages the new client as well. Please refer to
The above operation related to the client CY entering the network system 20 can be summarized into an entering process 60. As shown in
Step 600: Start.
Step 602: The client CY sends a joining request to the management device 210.
Step 604: The management device 210 replies to the joining request and provides an identification for the client CY.
Step 606: The client CY subscribes to at least one message from the management device 210.
Step 608: End.
Please note that the spirit of the present invention is to reduce the load of the management device in the network system and to ensure that all clients can receive their desired messages, in order to improve performance and reliability of message transmission. Those skilled in the art can make modifications and alterations accordingly. For example, in the above embodiments, the management device 210 puts the information related to the clients subscribing to the message Msg1 into a preamble, but in other embodiments, other methods may also be utilized for combining the message Msg1 with the information related to the clients. In some embodiments, before transmitting the message Msg1 to the management device 210, the client can add information related to the target clients in the message Msg1, which is not limited herein. In the above embodiments, all of the messages are transmitted to the management device 210 first, and then the management device 210 transmits the messages to the clients C1′-C13′ level by level; that is, through a peer-to-peer based method. In other embodiments, however, the messages may not be transmitted via the management device 210, and the transmission is performed directly between the clients C1′-C13′, such that the load of the management device 210 is further reduced, in order to improve the performance of the network system 20.
Please refer to
In detail, since the messages Msg4-Msg7 are transmitted between the clients CA-CD and not via the management device 710, the management device 710 is mainly responsible for managing the types of the messages subscribed to, delivered and transmitted by each of the clients CA-CD, and ensuring that all of the clients CA-CD can receive the desired message, in order to maintain reliability of the network system 70. Please refer to
The above operation of the program 720 in the management device 710 can be summarized into another peer-to-peer based message transmitting process 90. As shown in
Step 900: Start.
Step 902: Receive information of a plurality of target clients corresponding to the message Msg1234 when the client CX sends the message Msg1234 to the plurality of target clients.
Step 904: Control the client CX to transmit the message Msg1234 to the plurality of target clients.
Step 906: End.
The process 90 can also be combined with Steps 406 and 408 of the process 40, in order to transmit the message Msg1234 to the target client in each level through a peer-to-peer based method according to the level in which the client CX is located. The management device 710 can select the method of transmitting the message Msg1234 between the clients CA-CD arbitrarily, in order to achieve the best message transmission performance of the network system 70. The steps related to the new client CY entering the network system 20 stated in the process 60 can also be integrated into the network system 70; such a procedure should be well known by those skilled in the art, and will not be narrated herein.
In some embodiments, messages are transmitted between the clients one-on-one and not via the management device 710. For example, as shown in
In the prior art, though the method of transmitting the specific message to the specific client by the management device ensures that all of the clients can receive the message, the load is entirely imposed on the management device, such that the management device always bears the performance burden of the entire network system. If the management device broadcasts the message to the network system, the message is transmitted between the clients randomly. Through this method, though the load of the management device can be reduced significantly, it cannot ensure that all of the clients can receive a desired message, such that the reliability of the network system is reduced. In comparison, according to the present invention, the messages can be transmitted to different clients level by level or through a peer-to-peer based method, which can reduce the load of the management device in the network system and ensure that all of the clients can receive the desired messages, in order to improve the performance and reliability of message transmission.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
101139696 | Oct 2012 | TW | national |