patents.google.com

CN105245596B - A remote control method and server - Google Patents

  • ️Tue Feb 05 2019

Summary of the invention

Present invention solves the technical problem that being that cannot directly access private clound and right for user existing in the prior art The problem of terminal is manipulated provides a kind of long-range control method, server, system and network attached storage equipment, for solving It certainly can not achieve user in the prior art and directly access private clound and the problem of to the direct long-range control of terminal.

In order to solve the above technical problem, the present invention provides a technical solution be: a kind of long-range control method is provided, It include: the access side that client obtains corresponding second server using the first account and first password login first server Formula;Client is established P2P with second server with the help of first server using access mode and is connect;Client uses the Two accounts and the second password login second server;Client sends control signal to terminal by second server;Terminal connects It receives control signal and executes operation according to control signal.

Wherein, client logs in first server to include: client with the access mode for obtaining second server uses the One account and first password log in first server;Client is checked using the addressable server list of the first account and is selected When the second server to be accessed only may have access to second server with the access mode for obtaining second server or the first account, Client directly obtains the access mode of second server from first server.

Wherein, each addressable server runs several terminal interaction programs, and periodically reports to first server The mount message of terminal interaction program is further listed in addressable server using the addressable server list of the first account The terminal interaction program listing of installation, in order to which client is checked and is managed.

Wherein, client is identical or different using permission possessed by different account login second servers.

Wherein, password needed for password needed for client logs in first server and login third server is third Password;The step of client login first server includes: that first server reception client is close using the first account and first The logging request of code;First server obtains the access mode and corresponding third account of third server according to the first account; First server is according to access mode and corresponding third account request third server, to obtain the 4th password, the 4th password It is to be obtained to third password using the first non-reversible algorithm;The 4th password and the 5th password are matched, wherein the 5th password is first Server obtains first password using the first non-reversible algorithm;Logging request is responded according to matching result, if the 4th password With the 5th password match, then client logs in first server success, otherwise login failure.

Wherein, password needed for password needed for client logs in first server and login third server is third Password;The step of client login first server includes: that first server reception client is close using the first account and first The logging request of code;First server obtains the access mode and corresponding third account of third server according to the first account; First server is according to access mode and corresponding third account request third server, to obtain the 4th password, the 4th password It is to be obtained to third password using the first non-reversible algorithm;The 6th password and the 7th password are matched, wherein the 6th password is first Server obtains the 4th password with the 8th password combination, and the 8th password is making to third password of saving in advance of first server The password obtained with the second non-reversible algorithm, the 7th password is obtained to the 5th password and the 9th password combination, wherein the 5th Password is that first server obtains first password using the first non-reversible algorithm, and the 9th password is that first server is close to first Code is obtained using the second non-reversible algorithm;Logging request is responded according to matching result, if the 6th password and the 7th password match, Then client logs in first server success, otherwise login failure.

Wherein, second server runs several terminal interaction programs, the corresponding terminal of each terminal interaction program;Visitor It includes: that client accesses second server that family end, which sends control signal to terminal by second server, with to selected end Interactive program is held to issue control signal;Second server receives control signal, sends control signals to selected terminal and hands over Mutual program;Terminal interaction program receives control signal and is sent to corresponding terminal.

Wherein, terminal generates feedback signal also according to the working condition of itself and is sent to corresponding terminal interaction program;Eventually Interactive program is held to receive feedback signal and accordingly more new state, so that client is checked and is manipulated.

Wherein, first server is publicly-owned Cloud Server, and second server is privately owned Cloud Server.

Wherein, first server is publicly-owned Cloud Server, and third server is privately owned Cloud Server.

In order to solve the above technical problem, the present invention provides another technical solution be: a kind of remote control method is provided Method, comprising: first server receives and customer in response end uses the logging request of the first account and first password;First server The access mode of corresponding second server is sent to client;First server helps client to use access mode and the Two servers establish P2P connection so that client using after the second account and the second code entry second server by the Two servers send control signal to terminal, and terminal receives control signal and executes operation according to control signal.

Wherein, password needed for password needed for client logs in first server and login third server is third Password;The step of first server reception and the logging request at customer in response end includes: that first server receives client use The logging request of first account and first password;First server according to the first account obtain third server access mode and Corresponding third account;First server is according to access mode and corresponding third account request third server, to obtain Four passwords, the 4th password are to be obtained to third password using the first non-reversible algorithm;The 4th password and the 5th password are matched, wherein 5th password is that first server obtains first password using the first non-reversible algorithm;It is logged in and is asked according to matching result response It asks, if the 4th password and the 5th password match, client logs in first server success, otherwise login failure.

Wherein, password needed for password needed for client logs in first server and login third server is third Password;The step of first server reception and the logging request at customer in response end includes: that first server receives client use The logging request of first account and first password;First server according to the first account obtain third server access mode and Corresponding third account;First server is according to access mode and corresponding third account request third server, to obtain Four passwords, the 4th password are to be obtained to third password using the first non-reversible algorithm;The 6th password and the 7th password are matched, wherein 6th password is that first server obtains the 4th password with the 8th password combination, and the 8th password is that first server saves in advance The password that third password is obtained using the second non-reversible algorithm, the 7th password be to the 5th password and the 9th password combination and It obtains, wherein the 5th password is that first server obtains first password using the first non-reversible algorithm, the 9th password is first Server obtains first password using the second non-reversible algorithm;Logging request is responded according to matching result, if the 6th password With the 7th password match, then client logs in first server success, otherwise login failure.

In order to solve the above technical problem, the present invention provides another technical solution be: a kind of server is provided, wrap Include: login response module uses the logging request of the first account and first password for receiving simultaneously customer in response end;Send mould Block, for the access mode of corresponding second server to be sent to client;Link block is established, being used to help client makes It establishes P2P with second server with access mode to connect, so that client uses the second account and the second code entry second Control signal is sent to terminal by second server after server, terminal receives control signal and executes behaviour according to control signal Make.

Wherein, password needed for password needed for client logs in first server and login third server is third Password;Login response module includes: receiving unit, is asked for receiving client using the login of the first account and first password It asks;Unit is addressed, for obtaining the access mode and third account of third server according to the first account;Acquiring unit is used for According to access mode and corresponding third account request third server, to obtain the 4th password, the 4th password is close to third Code is obtained using the first non-reversible algorithm;Matching unit, for matching the 4th password and the 5th password, wherein the 5th password is pair First password is obtained using the first non-reversible algorithm;Response unit, for responding logging request according to matching result, if the 4th Password and the 5th password match, then the first account logins successfully, otherwise login failure.

Wherein, password needed for password needed for client logs in first server and login third server is third Password;Login response module includes: receiving unit, is asked for receiving client using the login of the first account and first password It asks;Unit is addressed, for obtaining the access mode and corresponding third account of third server according to the first account;It obtains single Member, for according to access mode and corresponding third account request third server, to obtain the 4th password, the 4th password to be pair Third password is obtained using the first non-reversible algorithm;Matching unit, for matching the 6th password and the 7th password, wherein the 6th is close Code is obtained to the 4th password and the 8th password combination, and the 8th password is that using third password for pre- preservation is second irreversible The password that algorithm obtains, the 7th password is obtained to the 5th password and the 9th password combination, wherein the 5th password is to first Password is obtained using the first non-reversible algorithm, and the 9th password is to be obtained to first password using the second non-reversible algorithm;Response is single Member, for according to matching result respond logging request, if the 6th password and the 7th password match, the first account log at Function, otherwise login failure.

In order to solve the above technical problem, the present invention provides another technical solution be: a kind of server is provided, wrap Include: processor, memory and network communications circuits, memory and network communications circuits are separately connected processor;Processor is used for Operation service program is asked with receiving simultaneously customer in response end by network communications circuits using the login of the first account and first password It asks, the access mode of corresponding second server is sent to client by network communications circuits, passes through network communications circuits It helps client to establish P2P with second server using access mode to connect, so that client uses the second account and second Control signal is sent to terminal by second server after code entry second server, terminal receives control signal and according to control Signal processed executes operation.

Wherein processor is also used to operation service program, with check with management client application program, second server and The control of second server installation.

In order to solve the above technical problem, the present invention provides another technical solution be: a kind of network attached deposit is provided Store up equipment, comprising: processor, hard disk and routing circuit, hard disk and routing circuit are separately connected processor;Processor is for running First service program is connect with establishing P2P with client by routing circuit with the help of first server, is received and is responded The logging request of use the second account and the second password that client is sent by routing circuit, processor are also used to run second Then service routine will control signal hair by routing circuit to receive the control signal that client is sent by routing circuit Give terminal.

Wherein, processor is for running several terminal interaction programs, the corresponding terminal of each terminal interaction program;Place Reason device is also used to run second service program, to receive the terminal interaction journey for manipulating selection that client is sent by routing circuit The control signal of sequence sends control signals to selected terminal interaction program;Processor is used to run terminal interaction program, To receive control signal and be sent to corresponding terminal by routing circuit.

Wherein, processor is also used to run terminal interaction program, is sent by routing circuit with to receive corresponding terminal Feedback signal, and more new state based on the feedback signal, so that client is checked and is manipulated;Wherein feedback signal is terminal according to certainly What the working condition of body generated.

The beneficial effects of the present invention are: the access side of first server management the first account and corresponding second server Formula, so that client logs in the access mode of available second server after first server using the first account, and the P2P is established with second server with the help of one server to connect, and allows user to pass through second server remotely to control Terminal.Even if second server is among Intranet or does not have fixed IP, can also with the help of first server with Client connection, and using client access second server to realize remote control terminal.

Specific embodiment

As shown in Figure 1, the first embodiment of long-range control method of the present invention includes:

S110: client logs in first server using the first account and first password to obtain corresponding second server Access mode;

User inputs the first account on client (such as browser or application program) and first password logs in the first clothes It is engaged in device, operation is for recording the data of account and the information using the addressable another server of the account in first server The first account is searched in library in the database, and obtains the address and port of corresponding second server, obtains corresponding second clothes The access mode of business device.

S120: client is established P2P with second server with the help of first server using access mode and is connect;

If second server is located on public network, the access mode of second server can be used to connect second service for client Device.If client and second server are located among two different Intranets, client uses the second service obtained The address and port of device send the first connection request to second server, due to logical not with second server before client Believed, the first connection of network address translation (Network Address Translation, NAT) refusal of second server side Request.Although request is refused, the NAT of client-side is had recorded in the address and port information and this Intranet of second server Client once initiated the connection this information to second server.The client that second server is issued according to first server The second connection request is initiated to client in address and port, since the NAT of client-side retains the record of second server, the Two servers are considered as the external host once crossed with client communication, and the second connection request is allowed through.Client end response is asked It asks and establishes P2P with second server and connect.

S130: client uses the second account and the second password login second server;

Client and second server are established after P2P connect, and user is defeated at client (such as browser or application program) Enter the second account and the second password login second server, log in the second password of second server and logs in first server First password can be the same or different.

S140: client sends control signal to terminal by second server;

User checks the terminal list that second server is listed, chooses certain after client successfully logs in second server A terminal makes control action, and client sends control signal to second server, control in signal comprising the terminal chosen and Control action.Second server receives the control signal that client is sent, and then sends control signals to selected terminal. The equipment that terminal refers to for manipulation further includes that other are controllable other than the household electrical appliances such as air-conditioning, water heater, humidifier, TV Home equipment, such as lamps and lanterns, door lock, curtain etc..

S150: terminal receives control signal and executes operation according to control signal.

The terminal chosen receives the control signal that second server is sent, and is executed according to the control action in control signal Corresponding operating.For example, user's client to be logged in, and by second server to the behaviour of terminal progress " opening " or " closing " Make: firstly, control signal of the user in client input " opening " or " closing ", and then client is by " opening " or " closing " Control signal is sent to second server, and " opening " or the control signal of " closing " are sent to accordingly by the second last server again Terminal, terminal according to control signal execute " opening " or " closing " operation.

From above embodiments it is found that user inputs account and password login first server, first service on the client Device operation data library obtains the access mode of corresponding second server, and access mode is sent to client by first server, Client is established P2P with second server with the help of first server and is connect, and client inputs account number cipher and logs in second Server.Client can be communicated directly with second server as a result, realize remotely controling and operating to terminal.

The second embodiment of long-range control method of the present invention is on the basis of first embodiment, and client logs in the first clothes Business device includes: that client uses the first account and password login first server with the access mode for obtaining second server;Visitor Family end is checked using the addressable server list of the first account and selects the second server to be accessed to obtain second service The access mode of device;Or first account only may have access to second server when, client directly from first server obtain second clothes The access mode of business device.

After client logs in first server, in the user interface of client, can view can using the first account Server list with the server list of access, i.e., with the binding of the first account.After viewing accessible server list, The server to be accessed is selected, selected server is second server, and obtains the access mode of second server.If Using only one accessible second server of the first account, client directly obtains second server from first server Access mode, no longer selected.

Each addressable server runs several terminal interaction programs, and periodically hands over to first server reporting terminal The mount message of mutual program lists the end of each addressable server installation using the addressable server list of the first account Interactive program list is held, as shown in Fig. 2, in order to which client is checked and is managed.

The terminal interaction program that first server is managed collectively addressable server and installs thereon, addressable service Device is periodically to the mount message of first server reporting terminal interactive program, therefore addressable server list can be arranged further The terminal interaction program listing of addressable server installation out, for client selection.

The 3rd embodiment of long-range control method of the present invention is on the basis of first embodiment, and client uses different Account logs in that permission possessed by second server is identical or different, if any account can manage and to be installed on second server All terminal interaction programs, and some accounts can only manage a portion terminal interaction program installed on second server. Such as all terminal interaction programs can be managed using parent's account, the account of child is unable to the terminal interaction of Management Television machine Program, guest's account cannot manage terminal interaction program of door lock etc..

As shown in figure 3, client logs in the close of first server in the fourth embodiment of long-range control method of the present invention The step of code and the password for logging in third server are third password, and client logs in first server include:

S111: first server receives the logging request that client uses the first account and first password;

User inputs the first account and first password on the client (such as browser or application program) to attempt to log on First server, first server operation service program further can be with operation data library.

S112: first server obtains the access mode and corresponding third account of third server according to the first account;

Client logs in first server and third server uses same password.Remember in the database of first server It has recorded the first account, is corresponding with the first account using another server of same password and the information of corresponding another account, To be verified for obtaining password.First server searches the first account in the database, and obtains the account corresponding Address, port information and the corresponding third account of three servers.

S113: first server is according to access mode and corresponding third account request third server, to obtain the 4th Password, the 4th password are to be obtained to third password using the first non-reversible algorithm;

First server establishes connection according to the address port information of corresponding third server and third server, to the Three servers send obtain the 4th password request, the 4th password be third password is obtained using the first non-reversible algorithm it is close Code.In general, the first non-reversible algorithm refer to Hash (Hash) algorithm or add salt hash algorithm, can be used MD5, SHA1, SHA2, SHA256, SHA512, PBKDF2 any of them are as hash algorithm.User is when completing the setting of the first account The user password of confirmation is third password, and the password that login first server and third server use is third password.

S114: matching the 4th password and the 5th password, wherein the 5th password, which is first server, uses the to first password One non-reversible algorithm obtains;

First server obtains the 5th password using the first non-reversible algorithm to the first password that user inputs, and to the 4th Password and the 5th password are matched, and judge that the 4th password and whether identical or both the relationship of the 5th password meet predetermined article Part.

S115: responding logging request according to matching result, if the 4th password and the 5th password match, client is logged in First server is successful, otherwise login failure;

If the 4th password and the success of the 5th password match, judgement first password is identical with third password or both pass System meets predetermined condition, i.e. the password of user's input is identical as user password or both relationship meets predetermined condition, first service Device refuses the logging request of client by the logging request of client, otherwise first server, and returns to miscue.

Client logs in third server and first server uses same password, saves on third server complete Password does not save password in first server.First server is obtained to the request of third server when user logs in first server Complete password is obtained, and the password of user's input is verified accordingly.Accordingly even when first server is broken, can not also obtain User password is used to access third server, ensure that the safety of third server data.

As shown in figure 4, client logs in the close of first server in the 5th embodiment of long-range control method of the present invention The step of code and the password for logging in third server are third password, and client logs in first server include:

S121: first server receives the logging request that client uses the first account and first password;

User inputs the first account and first password on the client (such as browser or application program) to attempt to log on First server, first server operation service program further can be with operation data library.

S122: first server obtains the access mode and corresponding third account of third server according to the first account;

Client logs in first server and third server uses same password.Remember in the database of first server It has recorded the first account, is corresponding with the first account using another server of same password and the information of corresponding another account, To be verified for obtaining password.First server searches the first account in the database, and obtains the account corresponding Address, port information and the corresponding third account of three servers.

S123: first server is according to access mode and corresponding third account request third server, to obtain the 4th Password, the 4th password are to be obtained to third password using the first non-reversible algorithm;

First server establishes connection according to the address port information of corresponding third server and third server, to the Three servers send obtain the 4th password request, the 4th password be third password is obtained using the first non-reversible algorithm it is close Code.In general, the first non-reversible algorithm refer to Hash (Hash) algorithm or add salt hash algorithm, can be used MD5, SHA1, SHA2, SHA256, SHA512, PBKDF2 any of them are as hash algorithm.User is when completing the setting of the first account The user password of confirmation is third password, and the password that login first server and third server use is third password.The Three servers can save third password, use the first non-reversible algorithm to third password after receiving the request of first server First server is sent to after obtaining the 4th password;The 4th password can also be obtained using the first non-reversible algorithm to third password And the 4th password is saved, the 4th password is directly transmitted after receiving the request of first server.It cannot be reversed according to the 4th password Reckoning obtains third password, prevents the leakage for being trapped and causing user password in data transmission procedure.

S124: the 6th password of matching and the 7th password, wherein the 6th password is first server to the 4th password and the 8th Password combination and obtain, the 8th password is being obtained to third password using the second non-reversible algorithm of saving in advance of first server Password, the 7th password is obtained to the 5th password and the 9th password combination, wherein the 5th password is first server to first Password is obtained using the first non-reversible algorithm, and the 9th password is that first server obtains first password using the second non-reversible algorithm It arrives;

Preserve the 8th password in first server in advance, first server is just after each user confirms modification user password The 8th password is obtained using the second non-reversible algorithm to the third password after modification and is saved;First server is to the 4th password The 6th password is obtained with the 8th password combination.Hash calculation is reused after referring to extraction section digit using the second non-reversible algorithm Method adds salt hash algorithm to be handled.Combination, which can be, is stitched together the 4th password and the 8th password, is also possible to Refer to by the 4th password and the 8th password splicing after using hash algorithm or add salt hash algorithm handle.First server The 5th password also is obtained using the first non-reversible algorithm to the first password of user's input, it is irreversible using second to first password Algorithm obtains the 9th password, then obtains the 7th password to the 5th password and the 9th password combination;Then first server is to the 6th Password and the 7th password are matched, and judge that the 6th password and whether identical or both the relationship of the 7th password meet predetermined article Part.

S125: responding logging request according to matching result, if the 6th password and the 7th password match, client is logged in First server is successful, otherwise login failure;

If the 6th password and the success of the 7th password match, judgement first password is identical with third password or both pass System meets predetermined condition, that is, the password inputted is identical as user password or both relationship meets predetermined condition, and first server is logical The logging request of client is crossed, the logging request of first server refusal client is otherwise returned, and returns to miscue.Such as One account is equipped with a main password and at least one sub- password, and there are corresponding relationships, such as son between sub- password and main password Password is a part of main password, and the first password of user's input can also be logged in successfully when being any one sub- password, at this time The relationship of the relationship of 6th password and the 7th password, first password and third password meets scheduled condition.

From above embodiments it is found that needed for password needed for client login first server and login third server Password is third password, and complete password is saved on third server, only saves in first server and passes through non-reversible algorithm The password of processing, and complete password cannot be obtained according to the password saved in first server.User logs in first service First server obtains complete password to the request of third server when device, and verifies accordingly to the password of user's input.This Even if sample first server is broken, it can not also obtain user password and be used to access third server, ensure that third server The safety of data.

As shown in Figure 5 and Figure 6, in the sixth embodiment of long-range control method of the present invention, second server operation is several A terminal interaction program, the corresponding terminal of each terminal interaction program;Client is sent to terminal by second server and is controlled Signal processed includes:

S210: client accesses second server, to issue control signal to selected terminal interaction program;

Client checks the terminal interaction program listing on second server, and the corresponding terminal of the terminal to be manipulated is selected to hand over Mutual program simultaneously makes control action, and client sends control signal to selected terminal interaction program.

S220: second server receives control signal, sends control signals to selected terminal interaction program;

Second server receives the control signal that client is sent, then by the control of the selected terminal interaction program of manipulation Signal processed is sent to selected terminal interaction program.

S230: terminal interaction program receives control signal and is sent to corresponding terminal;

Selected terminal interaction program receives control signal and simultaneously sends control signals to corresponding terminal, terminal according to It controls signal and executes corresponding operating.

S240: terminal generates feedback signal according to the working condition of itself and is sent to corresponding terminal interaction program;

After terminal executes corresponding operating according to control signal, working condition may change, and terminal is according to certainly at this time The working condition of body generates feedback signal, and is sent to corresponding terminal interaction program.

S250: terminal interaction program receives feedback signal and accordingly more new state, so that client is checked and is manipulated;

Terminal interaction program receives the feedback signal that corresponding terminal is sent, and more new state based on the feedback signal, so that Terminal interaction program can reflect the working condition of counterpart terminal in real time, so that client is checked and is manipulated.

As seen from the above embodiment, client is established P2P with second server with the help of first server and is connect, visitor Family end can directly log in second server, check simultaneously controlling terminal, realization pair by the terminal interaction program in second server Terminal is remotely directly controlled and is operated.

In one embodiment of long-range control method of the present invention, first server is publicly-owned Cloud Server, second service Device is privately owned Cloud Server, and second server is the server that user selects access.Public cloud is mainly used for managing user's letter Breath, private clound facility information and entry maps relationship of corresponding user's private clound etc., private clound is mainly used for saving user Private information and privately owned file etc..The present embodiment can be in conjunction with the embodiment of one server of any of the above.

In one embodiment of long-range control method of the present invention, first server is publicly-owned Cloud Server, third service Device is privately owned Cloud Server, and third server can be the same or different with second server.Public cloud is mainly used for managing User information, private clound facility information and entry maps relationship of corresponding user's private clound etc., private clound is mainly used for protecting Deposit the private information and privately owned file etc. of user.The present embodiment can be combined with above-described embodiment four or embodiment five.

As shown in fig. 7, the 7th embodiment of long-range control method of the present invention includes:

S310: first server receives and customer in response end uses the logging request of the first account and first password;

User inputs the first account on the client and first password logs in first server, runs and uses in first server In the database of record account and the information using the addressable another server of the account, the first account is searched in the database Number, and obtain the address and port of corresponding second server, that is, obtain the access mode of corresponding second server.

S320: the access mode of corresponding second server is sent to client by first server;

The access mode for the second server that first server will acquire, the i.e. address and port of second server are sent to Client connect so that client establishes P2P using access mode and second server and logs in second server.

S330: first server help client is established P2P with second server using access mode and is connect, so that Client sends control signal to terminal by second server using after the second account and the second code entry second server, Terminal receives control signal and executes operation according to control signal;

First server, which helps client to establish the process that P2P is connect with second server, can refer to long-range control of the invention The description of S120 step in method first embodiment, the wherein main effect of first server is by the address and port of client It issues second server and second server is notified to initiate the connection request.Client and second server are established after P2P connect, The second account and the second code entry second server can be used in client, then sends control letter to terminal by second server Number, terminal receives control signal and executes operation according to control signal.

From above embodiments it is found that first server receives and customer in response end stepping on using the first account and first password Record request, first server operation data library obtains the access mode of corresponding second server and access mode is sent to visitor Family end, first server also help client to establish P2P with second server to connect, allow client directly with the second clothes Business device is communicated, and realizes remotely controling and operating to terminal.

As shown in figure 8, the 8th embodiment of long-range control method of the present invention is further limited on the basis of seven embodiments Password needed for determining password needed for client logs in first server and logging in third server is third password;

First server receive and customer in response end logging request the step of include:

S311: first server receives the logging request that client uses the first account and first password;

User inputs the first account and first password on the client (such as browser or application program) to attempt to log on First server, first server operation service program further can be with operation data library.

S312: first server obtains the access mode and corresponding third account of third server according to the first account;

Client logs in first server and third server uses same password.Remember in the database of first server It has recorded the first account, is corresponding with the first account using another server of same password and the information of corresponding another account, To be verified for obtaining password.First server searches the first account in the database, and obtains the account corresponding Address, port information and the corresponding third account of three servers.

S313: first server is according to access mode and corresponding third account request third server, to obtain the 4th Password, the 4th password are to be obtained to third password using the first non-reversible algorithm;

First server establishes connection according to the address port information of corresponding third server and third server, to the Three servers send obtain the 4th password request, the 4th password be third password is obtained using the first non-reversible algorithm it is close Code.In general, the first non-reversible algorithm refer to Hash (Hash) algorithm or add salt hash algorithm, can be used MD5, SHA1, SHA2, SHA256, SHA512, PBKDF2 any of them are as hash algorithm.User is when completing the setting of the first account The user password of confirmation is third password, and the password that login first server and third server use is third password.

S314: matching the 4th password and the 5th password, wherein the 5th password, which is first server, uses the to first password One non-reversible algorithm obtains;

First server obtains the 5th password using the first non-reversible algorithm to the first password that user inputs, and to the 4th Password and the 5th password are matched, and judge that the 4th password and whether identical or both the relationship of the 5th password meet predetermined article Part.

S315: responding logging request according to matching result, if the 4th password and the 5th password match, client is logged in First server is successful, otherwise login failure;

If the 4th password and the success of the 5th password match, judgement first password is identical with third password or both pass System meets predetermined condition, i.e. the password of user's input is identical as user password or both relationship meets predetermined condition, first service Device refuses the logging request of client by the logging request of client, otherwise first server, and returns to miscue.

Client logs in third server and first server uses same password, saves on third server complete Password does not save password in first server.First server is obtained to the request of third server when user logs in first server Complete password is obtained, and the password of user's input is verified accordingly.Accordingly even when first server is broken, can not also obtain User password is used to access third server, ensure that the safety of third server data.

As shown in figure 9, client logs in needed for first server in the 9th embodiment of long-range control method of the present invention Password and log in third server needed for password be third password;

First server receive and customer in response end logging request the step of include:

S321: first server receives the logging request that client uses the first account and first password;

User inputs the first account and first password on the client (such as browser or application program) to attempt to log on First server, first server operation service program further can be with operation data library.

S322: first server obtains the access mode and corresponding third account of third server according to the first account;

Client logs in first server and third server uses same password.Remember in the database of first server It has recorded the first account, is corresponding with the first account using another server of same password and the information of corresponding another account, To be verified for obtaining password.First server searches the first account in the database, and obtains the account corresponding Address, port information and the corresponding third account of three servers.

S323: first server is according to access mode and corresponding third account request third server, to obtain the 4th Password, the 4th password are to be obtained to third password using the first non-reversible algorithm;

First server establishes connection according to the address port information of corresponding third server and third server, to the Three servers send obtain the 4th password request, the 4th password be third password is obtained using the first non-reversible algorithm it is close Code.In general, the first non-reversible algorithm refer to Hash (Hash) algorithm or add salt hash algorithm, can be used MD5, SHA1, SHA2, SHA256, SHA512, PBKDF2 any of them are as hash algorithm.User is when completing the setting of the first account The user password of confirmation is third password, and the password that login first server and third server use is third password.The Three servers can save third password, use the first non-reversible algorithm to third password after receiving the request of first server First server is sent to after obtaining the 4th password;The 4th password can also be obtained using the first non-reversible algorithm to third password And the 4th password is saved, the 4th password is directly transmitted after receiving the request of first server.It cannot be reversed according to the 4th password Reckoning obtains third password, prevents the leakage for being trapped and causing user password in data transmission procedure.

S324: the 6th password of matching and the 7th password, wherein the 6th password is first server to the 4th password and the 8th Password combination and obtain, the 8th password is being obtained to third password using the second non-reversible algorithm of saving in advance of first server Password, the 7th password is obtained to the 5th password and the 9th password combination, wherein the 5th password is first server to first Password is obtained using the first non-reversible algorithm, and the 9th password is that first server obtains first password using the second non-reversible algorithm It arrives;

Preserve the 8th password in first server in advance, first server is just after each user confirms modification user password The 8th password is obtained using the second non-reversible algorithm to the third password after modification and is saved;First server is to the 4th password The 6th password is obtained with the 8th password combination.Hash calculation is reused after referring to extraction section digit using the second non-reversible algorithm Method adds salt hash algorithm to be handled.Combination, which can be, is stitched together the 4th password and the 8th password, is also possible to Refer to by the 4th password and the 8th password splicing after using hash algorithm or add salt hash algorithm handle.First server The 5th password also is obtained using the first non-reversible algorithm to the first password of user's input, it is irreversible using second to first password Algorithm obtains the 9th password, then obtains the 7th password to the 5th password and the 9th password combination;Then first server is to the 6th Password and the 7th password are matched, and judge that the 6th password and whether identical or both the relationship of the 7th password meet predetermined article Part.

S325: responding logging request according to matching result, if the 6th password and the 7th password match, client is logged in First server is successful, otherwise login failure;

If the 6th password and the success of the 7th password match, judgement first password is identical with third password or both pass System meets predetermined condition, that is, the password inputted is identical as user password or both relationship meets predetermined condition, and first server is logical The logging request of client is crossed, the logging request of first server refusal client is otherwise returned, and returns to miscue.Such as One account is equipped with a main password and at least one sub- password, and there are corresponding relationships, such as son between sub- password and main password Password is a part of main password, and the first password of user's input can also be logged in successfully when being any one sub- password, at this time The relationship of the relationship of 6th password and the 7th password, first password and third password meets scheduled condition.

From above embodiments it is found that needed for password needed for client login first server and login third server Password is third password, and complete password is saved on third server, only saves in first server and passes through non-reversible algorithm The password of processing, and complete password cannot be obtained according to the password saved in first server.User logs in first service First server obtains complete password to the request of third server when device, and verifies accordingly to the password of user's input.This Even if sample first server is broken, it can not also obtain user password and be used to access third server, ensure that third server The safety of data.

As shown in Figure 10, the first embodiment of server of the present invention includes:

Login response module 11 uses the logging request of the first account and first password for receiving simultaneously customer in response end;

Sending module 12, for the access mode of corresponding second server to be sent to client;

Link block 13 is established, is used to help client and establishes P2P with second server using access mode to connect, with So that client sends control to terminal by second server using after the second account and the second code entry second server Signal, terminal receive control signal and execute operation according to control signal.

From above embodiments it is found that first server receives and customer in response end stepping on using the first account and first password Record request, first server operation data library obtains the access mode of corresponding second server and access mode is sent to visitor Family end, first server also help client to establish P2P with second server to connect, allow client directly with second Server is communicated, and realizes remotely controling and operating to terminal.

As shown in figure 11, the second embodiment of server of the present invention is on the basis of the first embodiment of server of the present invention Improvement, wherein client log in first server needed for password and log in third server needed for password be that third is close Code;Login response module 11 includes:

Receiving unit 111 uses the logging request of the first account and first password for receiving client;It is transported on server Row service routine receives the logging request of user.

Unit 112 is addressed, for obtaining the access mode and corresponding third account of third server according to the first account; Further operation data library on server, for recording the corresponding another clothes using same password of the first account, the first account The information for device and the third account of being engaged in, to be verified for obtaining password.The first account is searched in the database, and obtains correspondence Third server address and port and third account, refuse logging request if it can not find corresponding account information and return Return miscue.

Acquiring unit 113 is used for according to access mode and corresponding third account request third server, to obtain the 4th Password, the 4th password are to be obtained to third password using the first non-reversible algorithm.In general, the first non-reversible algorithm refers to Kazakhstan Uncommon (Hash) algorithm adds salt hash algorithm, and it is wherein any that MD5, SHA1, SHA2, SHA256, SHA512, PBKDF2 can be used It is a kind of to be used as hash algorithm.User is third password in the user password for completing to confirm when the setting of the first account, logs in first Password needed for password needed for server and login third server is third password.Reverse push is unable to according to the 4th password Calculation obtains third password, prevents the leakage for being trapped and causing user password in data transmission procedure.

Matching unit 114, for matching the 4th password and the 5th password, wherein the 5th password is to use the to first password One non-reversible algorithm obtains;It is close that the 5th is calculated from the acquisition first password of receiving unit 111 and using the first non-reversible algorithm Code obtains the 4th password from acquiring unit 113, and the two is compared.

Response unit 115, for responding logging request according to matching result, if the 4th password and the 5th password match, Then client logins successfully, otherwise login failure;If the 4th password and the 5th password are identical or both relationship meets pre- Fixed condition determines that identical with third password or both the relationship of first password meets predetermined condition, and server passes through client Logging request, otherwise refuse the logging request of client, and return to miscue.Such as an account is equipped with a main password With at least one sub- password, there are corresponding relationships between sub- password and main password, for example sub- password is a part of main password, is used The first password of family input can also be logged in successfully when being any one sub- password, at this time the pass of the 4th password and the 5th password The relationship of system, first password and third password meets scheduled condition.

As shown in figure 12, in the 3rd embodiment of server of the present invention, wherein client is logged in needed for first server Password and log in third server needed for password be third password;Login response module 11 includes:

Receiving unit 211 uses the logging request of the first account and first password for receiving client;It is transported on server Row service routine receives the logging request of user, stores user information in database.

Unit 212 is addressed, for obtaining the access mode and corresponding third account of third server according to the first account; Further operation data library on server, for recording the first account, the corresponding another server of the first account and third account Information, to be verified for obtaining password.The first account is searched in the database, and obtains corresponding third server Address and port and third account refuse logging request if it can not find corresponding account information and return to miscue.

Acquiring unit 213 is used for according to access mode and corresponding third account request third server, to obtain the 4th Password, the 4th password are to be obtained to third password using the first non-reversible algorithm;User is true when completing the setting of the first account The user password recognized is third password, and password needed for password needed for logging in first server and login third server is Third password.It cannot reversely be calculated according to the 4th password and obtain third password, prevent from being trapped and causing in data transmission procedure The leakage of user password.

Matching unit 214, for matching the 6th password and the 7th password, wherein the 6th password is to from acquiring unit 213 The 4th password and the 8th password combination that obtain and obtain, the 8th password be the third password saved in advance is used it is second irreversible The password that algorithm obtains;7th password is obtained to the 5th password and the 9th password combination, wherein the 5th password is to from connecing It receives the first password that unit 211 obtains to obtain using the first non-reversible algorithm, the 9th password is obtained to from receiving unit 211 First password is obtained using the second non-reversible algorithm;Second non-reversible algorithm is different from the first non-reversible algorithm, even if second not Reversible algorithm is cracked, and obtained result is also different from third password, and cannot extrapolate complete according to result is cracked Three passwords.

Response unit 215, for responding logging request according to matching result, if the 6th password and the 7th password match, Then client logins successfully, otherwise login failure;If the 6th password and the 7th password are identical or both relationship meets pre- Fixed condition determines that identical with third password or both the relationship of first password meets predetermined condition, and server passes through client Logging request, otherwise refuse the logging request of client, and return to miscue.Such as an account is equipped with a main password With at least one sub- password, there are corresponding relationships between sub- password and main password, for example sub- password is a part of main password, is used The first password of family input can also be logged in successfully when being any one sub- password, at this time the pass of the 6th password and the 7th password The relationship of system, first password and third password meets scheduled condition.

From above embodiments it is found that needed for password needed for client login first server and login third server Password is third password, and client uses the login first server of the first account and first password, first server according to First account obtains the access mode and corresponding third account of third server, and then according to access mode and corresponding third Account request third server carries out password authentification to obtain the 4th password, and the verifying correct client of password logins successfully, otherwise Client login failure.

As shown in figure 13, the fourth embodiment of server of the present invention includes:

Processor, memory and network communications circuits, memory and network communications circuits are separately connected processor;

Processor uses first for running first service program, to receive simultaneously customer in response end by network communications circuits The logging request of account and first password, runs and inquires database, searches the first account in the database, and obtains corresponding The access mode (i.e. address and port) of corresponding second server is passed through network communication by the address and port of second server Circuit is sent to client, helps client to establish P2P using access mode and second server by network communications circuits and connects It connects, so that client is sent by second server to terminal using after the second account and the second code entry second server Signal is controlled, and then terminal receives control signal and executes operation according to control signal.

5th embodiment of server of the present invention is on the basis of fourth embodiment, and processor is further used for operation Two service routines are installed on second server and second server with issuing and safeguarding client application, check and manage Terminal interaction program.Second service program is responsible for issuing new client application and carries out daily maintenance and pipe to it Reason.Second service program is also responsible for that the terminal interaction program installed on second server and second server is checked and managed Reason, including when terminal manufacturer update terminal interaction program, push and update to second server, the terminal interaction newly issued is provided Program is for second server downloading.

The server that any embodiment of server of the present invention provides is usually publicly-owned Cloud Server, and second server is private There is Cloud Server.Publicly-owned Cloud Server is for checking and management client application program, privately owned Cloud Server and privately owned cloud service The terminal interaction program installed on device, and help privately owned Cloud Server to establish P2P with client and connect, so that client logs in private There is Cloud Server and the long-range control and management to terminal are realized by privately owned Cloud Server.

As shown in figure 14, the first embodiment of inventive network attached storage device includes:

Processor, hard disk and routing circuit, hard disk and routing circuit are separately connected processor;The wan interface of routing circuit It is connected through the internet to server, LAN interface is separately connected Intranet equipment, and routing circuit is for completing data packet in processor Transmission between corresponding interface.Processor is for exchanging routing iinformation, searching routing table and forwarding data packet, cooperation routing electricity Realize the routing functions such as the interconnection of local area network and wide area network, the processing of data and distribution, flow control in road.

Processor is also used to run first service program, to pass through routing circuit and client with the help of first server P2P connection is established at end, receives the login of use the second account and the second password that simultaneously customer in response end is sent by routing circuit Request, processor are also used to run second service program, to receive the control signal that client is sent by routing circuit, then Terminal is sent control signals to by routing circuit.

The second embodiment of inventive network attached storage device is implemented in inventive network attached storage device first On the basis of example, processor is also used to run several terminal interaction programs, the corresponding terminal of each terminal interaction program;Place Reason device is also used to run second service program, to receive the terminal interaction journey that client is chosen by the manipulation that routing circuit is sent The control signal of sequence sends control signals to selected terminal interaction program;Processor is used to run terminal interaction program, To receive control signal and be sent to corresponding terminal by routing circuit, receive what corresponding terminal was sent by routing circuit Feedback signal, and more new state based on the feedback signal, so that client is checked and is manipulated, wherein feedback signal is terminal according to certainly What the working condition of body generated.

Each terminal interaction program corresponds to a terminal, and user logs in second server operation control terminal by client and hands over Mutual program and realize the operation and control to corresponding terminal.Client first sends control signals to the terminal interaction journey chosen Sequence, the terminal interaction program then chosen send control signals to corresponding terminal, and corresponding terminal makes phase according to control signal It should operate.

Client is established the purpose that P2P is connect with second server and is, realization directly controls terminal, therefore terminal Interactive program needs to show the current working status of counterpart terminal.Terminal will indicate that itself after itself working condition changes The feedback signal of working condition issues corresponding terminal interaction program on second server, so that client is checked and is manipulated.This One operation can be to be carried out after terminal receives the control signal sent of terminal interaction program and carries out corresponding operating, can also be Other operations (such as reservation switch, manipulation of other user's short distances etc.) for changing terminal operating status carry out after occurring.

Network attached storage equipment is generally as privately owned Cloud Server, help of the privately owned Cloud Server in publicly-owned Cloud Server P2P is established with client down to connect, and client is allowed to log in privately owned Cloud Server and by the realization pair of privately owned Cloud Server The long-range control and management of terminal.

Mode the above is only the implementation of the present invention is not intended to limit the scope of the invention, all to utilize this Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, it is relevant to be applied directly or indirectly in other Technical field is included within the scope of the present invention.