1. Technical Field
The present disclosure relates to electronic devices and particularly to an electronic device and method for automatically logging-in.
2. Description of Related Art
A user usually inputs personal information (user name/password) to log-into an electronic device. However, in some occasions, the user need to repeatedly input the personal information, it is troublesome.
Therefore, it is desirable to provide an electronic device and a method for automatically logging-in, which can overcome the above-mentioned shortcomings.
Embodiments of the disclosure will be described with reference to the accompanying drawings.
The electronic device 20 may be a computer or other electronic terminal with a network communication function. For example, the electronic device 20 may be a mobile phone. The server 30 is a network server, which is connected with the electronic device 20 through network. The electronic device 20 includes a receiving unit 201, a transmission unit 202, a storage unit 203, and a processing unit 204.
The receiving unit 201 receives the log-in information transmitted by the sensor 10. The transmission unit 202 sends data to the server 30. The storage unit 203 stores user information. The storage unit 203 stores a first table recording a relationship of the log-in information and the user information. Different log-in information corresponds to different user information.
The processing unit 204 includes a user information determination module 2041, a login module 2043, and a number determining module 2045. Functions of the modules will be described together with
The server 30 includes a communication unit 301, a verification unit 303, and a database 305. The communication unit 301 receives log-in information from the electronic device 20. The database 305 stores user information. The database 305 also stores a second table recording the relationship of log-in information and user information. The verification unit 303 verifies whether the log-in information matches the user information stored in the database 305. The communication unit 301 transmits the user information corresponding to the log-in information from the database 305 to the electronic device 20 when the log-in information matches the user information stored in the database 305. Functions of the server 30 will be described together with
In step S21, the receiving unit 201 determines whether the log-in information transmitted by the sensor 10 is received. If yes, the procedure goes to step S22, otherwise, the procedure repeats step S21.
In step S22, the user information determination module 2041 verifies whether the log-in information matches the user information stored in the storage unit 203 according to the first table.
If yes, the procedure goes to step S26, otherwise, the procedure returns to step S23.
In step S23, the transmission unit 202 sends the log-in information to the server 30.
In step S24, the communication unit 301 of the server 30 receives the log-in information, the verification unit 303 verifies whether the log-in information matches the user information stored in the database 305 according to the second table, if yes, the procedure goes to step S25, otherwise, the procedure ends.
In step S25, the communication unit 301 of the server 30 sends the user information corresponding to the log-in information to the electronic device 20, and the receiving unit 201 receives the user information from the communication unit 301 of the server 30 and stores the user information to the storage unit 203.
In step S26, the login module 2043 logs into the electronic device 20 according to the user information corresponding to the log-in information stored in the storage unit 203 or in the database 305.
In step S27, the number determining module 2045 determines a number of the electronic devices used in the local work thereby determining whether only one electronic device is used in a local network. If yes, the procedure ends, otherwise, the procedure goes to step S28.
In step S28, the transmission unit 202 sends the user information corresponding to the log-in information to other electronic devices 20 in the local network, thereby, the server 30 does not need to send the user information when needing to use other electronic devices 20.
The method above, the sensor 10 can allow the user to log-in the electronic device 20 according to the user information corresponding to the log-in information without repeatedly inputting the user information.
Particular embodiments are shown here and described by way of illustration only. The principles and the features of the present disclosure may be employed in various and numerous embodiments thereof without departing from the scope of the disclosure as claimed. The above-described embodiments illustrate the scope of the disclosure but do not restrict the scope of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
101127906 | Aug 2012 | TW | national |