1. Technical Field
The disclosure relates to an electronic device with automatic software update function and a method thereof.
2. Description of Related Art
In general, software must be updated regularly. However, the update process usually involves a user logging into a server through a website to download a new version of the software, then installing the new software. Although, the above method works, it is time-consuming.
Therefore, what is needed is an electronic device with automatic software update function and a method thereof.
The remote server 10 is configured to send email to the email application 20 of the electronic devices 30 via a communication media 40, for example, a network (e.g., the Internet, a local network, a local area network, or a wireless network). The email content may include, but is not limited to, image information, text information, software file etc. In the exemplary embodiment, the remote server 10 sends an email, which includes a software file to the email application 20. The software file, which includes an identifier, a version number, and a release date, of the software, is to update or replace the corresponding software of the electronic device 30. The identifier, which can be a predetermined filename, or a predetermined suffix, and so on, indicates the software file.
The email application 20 is configured to receive and store emails sent by the remote server 10 via the communication media 40. The electronic device 30 is configured to log into the remote server 10 via the communication media 40 to read the received emails via the email application 20. The electronic device 30 has an automatic software update function.
The detection module 220 is configured to detect whether the read email should be used for updating the software of the electronic device 30. The detection module 220 further includes an authorization detection sub-module 221, an email detection sub-module 222, and a software file detection sub-module 223.
The authorization detection sub-module 221 identifies whether the server ID number of the remote server 10 is an authorization number. If the server ID number is not one of the authorization numbers, the processing unit 200 deals with the read email in a general manner without updating. In the exemplary embodiment, the general manner includes, but is not limited to, reading the email, replying to the email, forwarding the email, and so on. If the server ID number is an authorization number then the email detection sub-module 222 deals with the read email as detailed below.
The email detection sub-module 222 checks email from authorized servers to detect whether parameters of the read email are acceptable according to predetermined rules. The parameters can be, but are not limited to, an email subject, and email content, and so on. In the exemplary embodiment, the predetermined rules are that the email subject and/or email content of the read email include one or more predetermined keywords, and the content of the read email includes a special file or files. The email detection sub-module 222 detects whether the email subject and/or email content of the read email include one or more predetermined keywords, such as, “software updating,” “software updating of the electronic device,” and the content of the read email includes a special file or files. If the subjects and/or contents of the read email include the predetermined keywords, and the content of the read email includes a special file, the email detection module 222 determines that the parameters of the read email are acceptable according to the predetermined rules.
In other exemplary embodiment, the predetermined rules can be: the email subject and/or email content of the read email includes a verification code, and the content of the read email includes a special file or files. The verification code can be a predetermined code or an identification (ID) code of the electronic device 30. The email detection sub-module 222 detects whether the email subject and/or email content of the read email include the verification code, and the content of the read email includes a special file or files. If the email subject and/or email content of the read email include the verification code, and the content of the read email includes a special file or files, the email detection module 222 determines that the parameters of the read email are acceptable according to the predetermined rules.
The software file detection sub-module 223 is configured to detect whether the file of the email content is a software file if the parameters of the read email are acceptable according to the predetermined rules. In the exemplary embodiment, the software file detection sub-module 223 detects whether a filename of the file includes a predetermined suffix. If the filename of the file includes a predetermined suffix, the software file detection sub-module 223 determines that the file of the email content is a software file. In other embodiments, the software file detection sub-module 223 detects whether the filename of the file includes a predetermined keywords. If the filename of the file includes the predetermined keywords, the software file detection sub-module 223 determines that the file of the email content is a software file.
The software update determining module 230 is configured to determine whether to update the software of the electronic device if the file of the email content is a software file. In the exemplary embodiment, the software update determining module 230 acquires the version number and the release date of the software file which the read email includes, compares the acquired version number with the version number of the corresponding software of the electronic device 30, and identifies whether the acquired version number is higher than the version number of the corresponding software. If the acquired version number is higher than the version number of the corresponding software, the software update determining module 230 determines to update the software of the electronic device 30. Otherwise, the software update determining module 230 does not update the software of the electronic device 30.
The software updating module 240 is configured to acquire the software file from the read email if the acquired version number is higher than the version number of the corresponding software, store the acquired software file in the storage unit 300, and run the acquired software file to update the software of the electronic device 30. In the exemplary embodiment, if the acquired software file is a compressed file, the software updating module 240 downloads the software file to the storage unit 300, decompresses and runs the software file to update the software of the electronic device 30.
In step S401, the reading module 210 reads an email.
In step S402, the authorization detection sub-module 221 detects whether the server ID number of the remote server 10 included in the read email matches one of the authorization numbers, if no, go to step S406, if yes, go to step S403.
In step S403, the email detection sub-module 222 detects whether parameters of the read email are acceptable according to predetermined rules, if no, go to step S406, if yes, go to step S404.
In step S404, the software file detection sub-module 223 detects whether the file of the email content is a software file, if no, go to step S406, if yes, go to step S405.
In step S405, the software update determining module 230 determines whether to update the software of the electronic device, if no, go to step S406, if yes, go to step S407.
In step S406, the software updating module 240 does not update the software of the electronic device.
In step S407, the software updating module 240 acquires the software file from the read email, stores the acquired software file in the storage unit 300, and runs the acquired software file to update the corresponding software of the electronic device 30.
Although the present disclosure has been specifically described on the basis of the exemplary embodiment thereof, the disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the embodiment without departing from the scope and spirit of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
200810305191.7 | Oct 2008 | CN | national |