Disclosure of Invention
In view of the above, the present invention is directed to a link reconstruction method, which can reduce implementation complexity.
Another object of the present invention is to provide a link reconstruction system capable of reducing implementation complexity.
Still another object of the present invention is to provide a client capable of reducing implementation complexity.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a link reestablishment method is characterized in that two links, namely a link 1 and a link 2, are established in advance between a client and a server; when the link 1 is disconnected, the method comprises the following steps:
the client determines whether the link 2 is normal, if so, the client sends a reconstruction message to the server by using the link 2 and receives signature information generated and returned by the server;
the link 1 is reconstructed from the received signature information.
A link reconstruction system, comprising: the system comprises a client and a server, wherein two links, namely a link 1 and a link 2, are pre-established between the client and the server;
the client is used for determining whether the link 2 is normal or not when the link 1 is disconnected, if so, sending a reconstruction message to the server by using the link 2, receiving signature information generated and returned by the server, and reconstructing the link 1 according to the signature information;
and the server is used for generating and returning the signature information to the client after receiving the reconstruction message.
A client establishes two links in advance between the client and a server, wherein the two links are a link 1 and a link 2 respectively; the client comprises:
the first processing unit is used for determining whether the link 2 is normal or not when the link 1 is disconnected, if so, sending a reconstruction message to the server by using the link 2, receiving signature information generated and returned by the server, and sending the signature information to the second processing unit;
the second processing unit is configured to reconstruct the link 1 according to the received signature information.
Therefore, by adopting the technical scheme of the invention, when one link, such as a main line link, is disconnected, the main line link can be automatically rebuilt by using the other link, namely a chat link, so that the user does not need to restart the game, re-input the account number and the password and the like, and the realization complexity is well reduced.
Detailed Description
Aiming at the problems in the prior art, the invention provides an improved link reconstruction scheme which comprises the following steps: two links, namely a link 1 and a link 2, are pre-established between the client and the server and are used for supporting the game played by the user; when the link 1 is disconnected, the client determines whether the link 2 is normal, if not, the game quits, if so, the reconstruction message is sent to the server by using the link 2, the signature information generated and returned by the server is received, the link 1 is reconstructed according to the signature information, and the game is continued after the establishment is successful.
In order to make the technical solution of the present invention clearer and more obvious, the solution of the present invention is further described in detail below by referring to the drawings and examples.
FIG. 1 is a flow chart of an embodiment of the method of the present invention. In this embodiment, a main line link (link 1) and a chat link (link 2) are pre-established between the client and the server, and are used for supporting a game played by a user. As shown in fig. 1, the method comprises the following steps:
step 11: when the main line link is disconnected, the client determines whether the chat link is normal, if so, step 13 is executed, otherwise, step 12 is executed.
Step 12: the client prompts the user to disconnect the network and quit the game.
Subsequently, the user can perform processing such as restarting the game in the existing manner.
Step 13: the client sends a reconstruction message to the server by using the chat link; the server generates signature information and returns the signature information to the client.
If the chat link is normal, the client can use a fault-tolerant means, namely, request signature information from the server, and rebuild the main line link according to the requested signature information in the following.
For the server, after receiving the reconstruction message sent by the client through the chat link, the server can know that the chat link still exists (is not disconnected), and uses the chat link as a proof that the user has effectively logged in, generates legal signature information, and returns the legal signature information to the client through the chat link.
In this embodiment, the format and the content of the reconstructed message are not limited, as long as the server knows that the subsequent processing needs to be performed according to the method described in this embodiment after receiving the message.
Step 14: and the client side reconstructs the main line link according to the received signature information, and continues the game after the reconstruction is successful.
If the mainline link reconstruction is successful, the previously played game can be continued; when the main line link is disconnected again, step 11 may be repeatedly performed.
If the main line link is not successfully rebuilt for N times continuously due to some reason, such as poor network conditions, the user can be prompted to disconnect the network and quit the game, N is a positive integer, and the specific value can be determined according to actual needs, such as 3.
In addition, in order to make the game more smoothly, after the main line link is successfully rebuilt, data synchronization can be performed between the client and the server, so as to overcome the problem of inconsistent foreground and background data caused by the disconnection of the main line link.
In the embodiment shown in fig. 1, the main line link is disconnected and the chat link is not disconnected as an example, in practical applications, the chat link may be disconnected and the main line link is not disconnected, and for this situation, there is no effective processing manner in the prior art, and the manner shown in fig. 1 is also applicable.
It can be seen that the two links have a mutual proof effect, and the game can be played without quitting as long as the two links are not disconnected at the same time.
Based on the above description, fig. 2 is a schematic structural diagram of the system according to the embodiment of the present invention. As shown in fig. 2, includes: the client 21 and the server 22, two links, namely link 1 and link 2, are pre-established between the client 21 and the server 22; wherein,
the client 21 is used for determining whether the link 2 is normal or not when the link 1 is disconnected, if so, sending a reconstruction message to the server 22 by using the link 2, receiving signature information generated and returned by the server 22, and reconstructing the link 1 according to the signature information;
and the server 22 is used for generating and returning signature information to the client 21 after receiving the reconstruction message.
The client 21 is further configured to synchronize data with the server 22 after the link 1 is successfully rebuilt.
Fig. 3 is a schematic structural diagram of the client according to the embodiment of the present invention. Two links, namely a link 1 and a link 2, are pre-established between the client and the server; as shown in fig. 3, includes:
the first processing unit 31 is used for determining whether the link 2 is normal or not when the link 1 is disconnected, and if so, sending a reconstruction message to the server by using the link 2, receiving signature information generated and returned by the server, and sending the signature information to the second processing unit 32;
a second processing unit 32 for reconstructing the link 1 from the received signature information.
The second processing unit 32 can be further configured to synchronize data with the server after the link 1 is successfully reconstructed.
For the specific work flow of the system and apparatus embodiments shown in fig. 2 to 3, please refer to the corresponding description in the method embodiment shown in fig. 1, which is not described herein again.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.