Abstract:
An electronic device for automatically updating software and a method thereof are provided. The method includes steps of: reading an email; detecting whether the read mail should be used for updating the software of the electronic device, comprising: identifying whether the server ID number of the remote server, which sends the read email, matches one of the authorization numbers; detecting whether parameters of the read email are acceptable according to predetermined rules; detecting whether a file of an email content is a software file if the parameters of the read email are acceptable according to the predetermined rules; determining whether to update the software of the electronic device; acquiring the software file from the read email, storing the acquired software file in the storage unit, and running the acquired software file to update the software of the electronic device.

Description:
BACKGROUND 
       [0001]    1. Technical Field 
         [0002]    The disclosure relates to an electronic device with automatic software update function and a method thereof. 
         [0003]    2. Description of Related Art 
         [0004]    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. 
         [0005]    Therefore, what is needed is an electronic device with automatic software update function and a method thereof. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0006]      FIG. 1  is a schematic diagram of a system, including an electronic device with automatic software update function which includes an email application with email receiving and accessing function, in accordance with an exemplary embodiment. 
           [0007]      FIG. 2  is a block diagram of a hardware infrastructure of the electronic device of  FIG. 1  in accordance with an exemplary embodiment. 
           [0008]      FIG. 3  is a flowchart of a method for automatically updating software implemented by the electronic device of  FIG. 2  in accordance with an exemplary embodiment. 
       
    
    
     DETAILED DESCRIPTION 
       [0009]      FIG. 1  is a schematic diagram of a system, including an electronic device with automatic software update function which includes an email application with email receiving and accessing function, in accordance with an exemplary embodiment. The system can include a plurality of remote servers  10 , and a plurality of electronic devices  30 . Each of the electronic devices  30  binds an email application  20 , which has an email receiving and accessing function. In the exemplary embodiment, the disclosure only takes one remote server  10  and one electronic device  30  to describe the principles of the disclosure. 
         [0010]    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. 
         [0011]    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. 
         [0012]      FIG. 2  is a block diagram of a hardware infrastructure of the electronic device  30  of  FIG. 1  in accordance with an exemplary embodiment. The electronic device  30  includes a processing unit  200  and a storage unit  300 . The storage unit  300  is configured to store the emails acquired by the electronic device  30 , and a list of authorization numbers corresponding to remote servers authorized to provide updated software such as the remote server  10 , whose server identification (ID) number corresponds to one of the authorization numbers on the list. The processing unit  200  includes a reading module  210 , a detection module  220 , a software update determining module  230 , and a software updating module  240 . The reading module  210  is configured to read emails from the email application  20 . 
         [0013]    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 . 
         [0014]    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. 
         [0015]    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. 
         [0016]    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. 
         [0017]    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. 
         [0018]    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 . 
         [0019]    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 . 
         [0020]      FIG. 3  is a flowchart of a method for automatically updating software implemented by the electronic device of  FIG. 2  in accordance with an exemplary embodiment. 
         [0021]    In step S 401 , the reading module  210  reads an email. 
         [0022]    In step S 402 , 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 S 406 , if yes, go to step S 403 . 
         [0023]    In step S 403 , the email detection sub-module  222  detects whether parameters of the read email are acceptable according to predetermined rules, if no, go to step S 406 , if yes, go to step S 404 . 
         [0024]    In step S 404 , the software file detection sub-module  223  detects whether the file of the email content is a software file, if no, go to step S 406 , if yes, go to step S 405 . 
         [0025]    In step S 405 , the software update determining module  230  determines whether to update the software of the electronic device, if no, go to step S 406 , if yes, go to step S 407 . 
         [0026]    In step S 406 , the software updating module  240  does not update the software of the electronic device. 
         [0027]    In step S 407 , 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 . 
         [0028]    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.