[0059] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
[0060] figure 1 It is a flowchart of a method for implementing online upgrade of the system software of a set-top box in an embodiment. figure 1 The implementation method of online upgrade of the system software of the set-top box is described from the perspective of the set-top box. Such as figure 1 As shown, the implementation method of online upgrade of the system software of the set-top box includes the following steps:
[0061] Step 102: Detecting an online system software upgrade request generated by the first startup or acquiring a system software online upgrade request generated by a trigger operation, and uploading local system software information to the upgrade server.
[0062] Specifically, when the user turns on the device for the first time or manually clicks the online upgrade button on the set-top box, a system software online upgrade request is generated. System software information includes system software version number, software model, hardware model, MAC (Media Access Control) address, Device, Board, Firmware firmware version, etc.
[0063] Step 104: Receive link information obtained by comparing the system software information stored by the upgrade server with the uploaded local system software information.
[0064] Specifically, the upgrade server compares the system software information stored by itself with the uploaded system software information. If the system software information stored on the upgrade server is newer than the uploaded system software information, it returns the link information. The stored system software information is not newer than the uploaded system software information, that is, the system software information on the set-top box belongs to the latest system software information, and then empty data is returned. The link information includes the link address of the detailed description of the corresponding version.
[0065] Step 106: Download the upgrade data package according to the link information.
[0066] Specifically, the upgrade configuration file is downloaded according to the link address detailed in the corresponding version in the link information, and the upgrade data package is downloaded according to the upgrade configuration file. The upgrade configuration file is in the form of an XML (Extensible Markup Language) file. The upgrade data package can be a zip file.
[0067] Step 108: Update the system software of the set-top box according to the downloaded upgrade data package.
[0068] The above-mentioned method for implementing online upgrade of the system software of the set-top box, after detecting the first boot or obtaining the system software upgrade request generated by the trigger operation, the upgrade server compares the system software information on the set-top box with the system software information stored on the upgrade server, Return the link information, download the upgrade data package according to the link information, and complete the online upgrade according to the upgrade data package. During the entire upgrade process, only power-on or one-key trigger operation is required. There is no need to upgrade by dedicated maintenance personnel, which saves time and reduces cost.
[0069] It is understandable that the step of downloading the upgrade data package according to the link information includes: judging whether there is the download record information of the upgrade data package locally, and if so, obtaining the breakpoint of the last download, and continuing the download from the breakpoint The unfinished upgrade data package, if not, download the upgrade data package. Through the breakpoint resume function, you can save download time.
[0070] It is understandable that the steps of updating the system software of the set-top box according to the downloaded upgrade data package include: after the download is completed and the integrity check of the upgrade data package is successful, copy the upgrade data package to the designated upgrade directory ; Set the system software to Recovery mode, and execute the reboot command to restart the system; after the system software is powered on and restarted, the system software will be upgraded and updated to obtain the new system software.
[0071] figure 2 It is a flowchart of a method for implementing online upgrade of the system software of a set-top box in another embodiment. figure 2 The implementation method of the online upgrade of the system software of the set-top box is a more detailed implementation method described from the perspective of the set-top box. Such as figure 2 As shown, the implementation method of online upgrade of the system software of the set-top box includes the following steps:
[0072] Step 202: Detect the online system software upgrade request generated by the first boot or obtain the system software online upgrade request generated by the trigger operation, and connect to the upgrade server.
[0073] Step 204, the connection is successful, upload the local system software information to the upgrade server, and then perform step 208.
[0074] In step 206, the connection fails, and the user is prompted that the network is abnormal.
[0075] Step 208: Receive the result of comparing the system software information stored by the upgrade server with the uploaded local system software information.
[0076] In step 210, if the comparison result is empty data, the user is prompted that the system software version is the latest version.
[0077] Step 212: If the comparison result is the return link information, the user is prompted to detect a new version, and step 214 is executed.
[0078] In step 214, an interface that prompts the user whether to upgrade is displayed, if the user clicks to confirm the upgrade is received, step 216 is executed, and if the user clicks are received, the upgrade process will be exited.
[0079] In step 216, it is determined whether there is download record information of the upgrade data package corresponding to the link information locally, if yes, step 218 is executed, and if not, step 220 is executed.
[0080] Specifically, the download record information of the upgrade data package corresponding to the link information exists locally, which means that the upgrade data package has been partially downloaded.
[0081] Step 218: Obtain the breakpoint of the last download, use the breakpoint as the starting point to continue downloading the last uncompleted upgrade data package, and record the new download record in real time, save the new download record to the local configuration file, and the download is complete Then, step 222 is executed.
[0082] Step 220, directly download the upgrade data package, and then execute step 222.
[0083] Step 222: After the download is completed, verify the integrity of the upgrade data package. After the verification is successful, copy the upgrade data package to the designated upgrade directory, and delete the temporarily saved upgrade data package. If the verification fails, then Prompt the user that the upgrade data package verification failed.
[0084] Specifically, MD5 (Message Digest Algorithm) may be used for verification processing. Or MD4 etc.
[0085] Step 224: After copying the upgrade data package, set the system software to Recovery mode, and execute the reboot command to restart the system.
[0086] Step 226: After the system component is powered on and restarted, the Recovery upgrade process of the system software is performed to obtain the new system software.
[0087] In step 228, the system software restarts again to run the new system software.
[0088] It should be noted that the downloaded upgrade data package in the method for implementing online upgrade of the system software of the set-top box may be a complete data package or an incremental data package. A complete data package refers to the entire data package corresponding to the downloaded system software version. The incremental data package refers to the data package formed by the system software stored on the upgrade server compared to the data added by the system software on the set-top box.
[0089] image 3 The flow chart of the system software of the set-top box in an embodiment for online upgrade and resumable downloading. Such as image 3 As shown, the steps of online upgrade of the system software of the set-top box for resumable downloading include:
[0090] Step 302: Create multiple threads, and assign an identifier to each thread.
[0091] Specifically, multiple threads are created from the download thread resources, multi-task downloading is started, and an identifier is assigned to each thread. The thread ID is used to uniquely identify the thread.
[0092] Step 304: Obtain the upgrade data package size, and initialize the link information of the upgrade data package corresponding to each thread identifier according to the upgrade data package size and the number of threads.
[0093] It is understandable that when a thread is initialized, it records the starting point and node of each thread downloading file, the thread ID, the size of the current thread downloading file block and other information.
[0094] Step 306: According to the thread identifier and the link information of the corresponding upgrade data package, query whether the link information of the upgrade data package exists in the download record information database, and if so, update the breakpoint record information recorded in the download record information database To the download record information of the thread corresponding to the thread identifier, the thread starts to continue downloading at a breakpoint according to the breakpoint record information. If not, the thread corresponding to the thread identifier directly downloads the upgrade data package.
[0095] Step 308: When a timing recording event is detected, the download record information is updated to the download record information database through the thread.
[0096] Specifically, when a timing recording event is detected, the thread updates the download record information to the download record information database. The update may include adding new record information.
[0097] Step 310: When an abnormal network event is detected, the download record information is updated to the download record information database through the thread, and the thread download is suspended.
[0098] It is understandable that when network connectivity is subsequently detected, multi-threading is automatically started and the download is restarted.
[0099] Step 312: After detecting the end of the thread download, perform an integrity check of the upgrade data package. If the check passes, delete the download record information corresponding to the thread in the download record database, if the check fails, delete the corresponding Download the upgrade data package and the download record information in the download record information database, and return to step 302 to restart the download.
[0100] The above steps 302 to 312 may be specific steps of step 106.
[0101] The above-mentioned realization of breakpoint resumable transmission through thread control saves time. And regularly record download information to facilitate maintenance of download record information.
[0102] Figure 4 It is a flowchart of a method for implementing online upgrade of the system software of a set-top box in another embodiment. Figure 4 The implementation method of the online upgrade of the system software of the set-top box in is described from the perspective of upgrading the server, which specifically includes the following steps:
[0103] Step 402: Obtain the system software upgrade request and the system software information of the set-top box generated when the uploaded set-top box is turned on or triggered for the first time.
[0104] Specifically, the system software information includes system software version number, software model, hardware model, MAC (Media Access Control) address, Device, Board, Android, Firmware firmware version, etc.
[0105] In step 404, the link information obtained by comparing the system software information stored by itself and the uploaded system software information of the set-top box is returned to the set-top box.
[0106] Specifically, the upgrade server compares the system software information stored by itself with the uploaded system software information. If the system software information stored on the upgrade server is newer than the uploaded system software information, it returns the link information. The stored system software information is not newer than the uploaded system software information, that is, the system software information on the set-top box belongs to the latest system software information, and then empty data is returned. The link information includes the link address of the detailed description of the corresponding version.
[0107] The upgrade server performs parameter matching processing for Device, Board, and Android versions according to the system parameter configuration file (parameter.conf). If it does not match, it returns empty data to the set-top box. If it matches, it performs firmware version matching with the upgrade configuration file in the link information. The uploaded system software information is subjected to parameter configuration file matching processing. If it does not match, empty data is returned to the set-top box, and if it matches, the link address of the detailed description of the corresponding version is returned to the user.
[0108] Step 406: Receive a download request sent by the set-top box according to the link information, and provide an upgrade data package download service to the set-top box according to the download request.
[0109] Specifically, the service of downloading the upgrade configuration file is provided to the set-top box according to the link address detailed in the corresponding version, and the service of downloading the upgrade data package is provided to the set-top box according to the upgrade configuration file. The upgrade configuration file is in the form of an XML file. The upgrade data package can be a zip file.
[0110] The above-mentioned method for implementing online upgrade of the system software of the set-top box, after detecting the first boot or obtaining the system software upgrade request generated by the trigger operation, the upgrade server compares the system software information on the set-top box with the system software information stored on the upgrade server, Return the link information, download the upgrade data package according to the link information, and complete the online upgrade according to the upgrade data package. During the entire upgrade process, only power-on or one-key trigger operation is required. There is no need to upgrade by dedicated maintenance personnel, which saves time and reduces cost.
[0111] Figure 5 It is a flowchart of a method for implementing online upgrade of the system software of a set-top box in another embodiment. Figure 5 The implementation method of the online upgrade of the system software of the set-top box in the system is described from the perspective of the interaction between the set-top box and the upgrade server, and specifically includes the following steps:
[0112] Step 502: The set-top box is turned on for the first time or an operation is triggered, and sends an online system software upgrade request to the upgrade server, and uploads the system software information to the upgrade server.
[0113] Step 504: The upgrade server compares the system software information stored by itself with the uploaded system software information on the set-top box, and returns the link information to the set-top box.
[0114] Step 506: The set-top box sends an upgrade configuration file acquisition request to the upgrade server according to the link information.
[0115] Step 508: The upgrade server returns the upgrade configuration file to the set-top box according to the upgrade configuration file acquisition request.
[0116] Step 510: The set-top box sends an upgrade data package download request to the upgrade server according to the upgrade configuration file.
[0117] In step 512, the upgrade server returns the upgrade data package to the set-top box according to the upgrade data package download request.
[0118] The above-mentioned method for implementing online upgrade of the system software of the set-top box, after the set-top box detects the first boot or obtains the system software upgrade request generated by the trigger operation, the upgrade server compares the system software information on the set-top box with the system software information stored on the upgrade server , Return to the link information, download the upgrade configuration file according to the link information, and then download the upgrade data package according to the upgrade configuration file, and complete the online upgrade according to the upgrade data package. During the entire upgrade process, only the boot or one-key trigger operation is required, and no special maintenance is required. The personnel are upgraded, saving time and reducing costs.
[0119] Image 6 It is a structural block diagram of a device for implementing online upgrade of the system software of a set-top box in an embodiment. Such as Image 6 As shown, the device for implementing online upgrade of the system software of the set-top box is described from the perspective of the set-top box, and includes an upload module 620, a link information receiving module 640, a download module 660, and an update module 680. among them:
[0120] The upload module 620 is configured to detect an online system software upgrade request generated by the first startup or obtain an online system software upgrade request generated by a trigger operation, and upload local system software information to the upgrade server.
[0121] System software information includes system software version number, software model, hardware model, MAC (Media Access Control) address, Device, Board, Firmware firmware version, etc.
[0122] The link information receiving module 640 is configured to receive link information obtained by comparing the system software information stored by the upgrade server with the uploaded local system software information.
[0123] Specifically, the upgrade server compares the system software information stored by itself with the uploaded system software information. If the system software information stored on the upgrade server is newer than the uploaded system software information, it returns the link information. The stored system software information is not newer than the uploaded system software information, that is, the system software information on the set-top box belongs to the latest system software information, and then empty data is returned. The link information includes the link address of the detailed description of the corresponding version.
[0124] The download module 660 is used to download the upgrade data package according to the link information. Specifically, the download module 680 downloads the upgrade configuration file according to the link address detailed in the corresponding version in the link information, and downloads the upgrade data package according to the upgrade configuration file.
[0125] The update module 680 is used to update the system software of the set-top box according to the downloaded upgrade data package.
[0126] In addition, if the link information receiving module 640 is used to receive empty data, it will prompt the user that the system software version is already the latest version. An interface that prompts the user whether to upgrade is displayed. If it is received that the user clicks to confirm the upgrade, the download module 660 determines whether the download record information of the upgrade data package corresponding to the link information is available locally, and if it is, it obtains the breakpoint of the last download to The breakpoint is the starting point to continue downloading the last unfinished upgrade package, and record the new download record in real time, and save the new download record to the local configuration file. After the download is complete, check the integrity of the upgrade package Processing, after the verification is successful, copy the upgrade data package to the designated upgrade directory, and delete the temporarily saved upgrade data package, if the verification fails, the user is prompted that the upgrade data package verification failed.
[0127] The device for implementing online upgrade of the system software of the set-top box described above, after detecting the first boot or obtaining the system software upgrade request generated by the trigger operation, the upgrade server compares the system software information on the set-top box with the system software information stored on the upgrade server, Return the link information, download the upgrade data package according to the link information, and complete the online upgrade according to the upgrade data package. During the entire upgrade process, only power-on or one-key trigger operation is required. There is no need to upgrade by dedicated maintenance personnel, which saves time and reduces cost.
[0128] It is understandable that the download module 660 is also used to determine whether there is download record information of the upgrade data package locally, and if so, obtain the breakpoint of the last download, and continue to download the last uncompleted upgrade data from the breakpoint. If not, download the upgrade data package.
[0129] Figure 7 It is a schematic diagram of the internal structure of the download module in an embodiment. The download module 660 includes a creation submodule 661, an initialization submodule 662, a judgment submodule 663, a download submodule 664, a timing detection submodule 665, an abnormality detection submodule 666, and a check submodule 667. among them:
[0130] The creation sub-module 661 is used to create multiple threads and assign identifiers to each thread. Specifically, multiple threads are created from the download thread resources, multi-task downloading is started, and an identifier is assigned to each thread. The thread ID is used to uniquely identify the thread.
[0131] The initialization submodule 662 is used to obtain the upgrade data packet size, and initialize the link information of the upgrade data packet corresponding to each thread identifier according to the upgrade data packet size and the number of threads. When the thread is initialized, it records the starting point and node of each thread to download the file, the thread ID, the size of the current thread to download the file block and other information.
[0132] The judging submodule 663 is configured to query whether the link information of the upgrade data package exists in the download record information database according to the thread identifier and the link information of the corresponding upgrade data package.
[0133] The download sub-module 664 is used to update the breakpoint record information recorded in the download record information database to the download record information of the thread corresponding to the thread identifier when the link information of the upgrade data package exists in the download record information database. According to the breakpoint record information, start the breakpoint to continue the download, and when the link information of the upgrade data package does not exist in the download record information database, the thread to identify the corresponding thread directly downloads the upgrade data package.
[0134] The timing detection sub-module 665 is used to detect a timing recording event, and update the download record information to the download record information database through the thread. Specifically, when a timing recording event is detected, the thread updates the download record information to the download record information database. The update may include adding new record information.
[0135] The abnormality detection sub-module 666 is used to detect network abnormal events, update the download record information to the download record information database through the thread, and suspend the thread download. It is understandable that when network connectivity is subsequently detected, multi-threading is automatically started and the download is restarted.
[0136] The check submodule 667 is used to check the integrity of the upgrade data package after detecting the end of the thread download, and if the check passes, delete the download record information corresponding to the thread in the download record database.
[0137] The above-mentioned realization of breakpoint resumable transmission through thread control saves time. And regularly record download information to facilitate maintenance of download record information.
[0138] Figure 8 It is a block diagram of the internal structure of the update module in an embodiment. Such as Picture 9 As shown, the update module 680 includes a copy submodule 681, a restart submodule 682, and an update submodule 683. among them:
[0139] The copy submodule 681 is configured to copy the upgrade data package to the designated upgrade directory after the download is completed and the integrity check of the upgrade data package is successful.
[0140] The restart submodule 682 is used to set the system software to the Recovery mode, and execute the reboot command to restart the system.
[0141] The update sub-module 683 is used to perform Recovery upgrade and update processing of the system software after the system software is powered on and restarted to obtain new system software.
[0142] Picture 9 It is a structural block diagram of a device for implementing online upgrade of the system software of a set-top box in another embodiment. Picture 9 The device for implementing the online upgrade of the system software of the set-top box in is described from the perspective of an upgrade server, and includes an acquisition module 920, a return module 940, and an upgrade data package providing module 960. among them:
[0143] The obtaining module 920 is configured to obtain the system software upgrade request uploaded by the set-top box and the system software information of the set-top box.
[0144] The return module 940 is configured to return the link information obtained by comparing the system software information stored by itself with the uploaded system software information of the set-top box to the set-top box.
[0145] Specifically, the upgrade server compares the system software information stored by itself with the uploaded system software information. If the system software information stored on the upgrade server is newer than the uploaded system software information, it returns the link information. The stored system software information is not newer than the uploaded system software information, that is, the system software information on the set-top box belongs to the latest system software information, and then empty data is returned. The link information includes the link address of the detailed description of the corresponding version.
[0146] The upgrade server performs parameter matching processing for Device, Board, and Android versions according to the system parameter configuration file (parameter.conf). If it does not match, it returns empty data to the set-top box. If it matches, it performs firmware version matching with the upgrade configuration file in the link information. The uploaded system software information is subjected to parameter configuration file matching processing. If it does not match, empty data is returned to the set-top box, and if it matches, the link address of the detailed description of the corresponding version is returned to the user.
[0147] The upgrade data package providing module 960 is configured to receive a download request sent by the set-top box according to the link information, and provide an upgrade data package download service to the set-top box according to the download request.
[0148] Specifically, the service of downloading the upgrade configuration file is provided to the set-top box according to the link address detailed in the corresponding version, and the service of downloading the upgrade data package is provided to the set-top box according to the upgrade configuration file. The upgrade configuration file is in the form of an XML file. The upgrade data package can be a zip file.
[0149] The above-mentioned method for implementing online upgrade of the system software of the set-top box, after detecting the first boot or obtaining the system software upgrade request generated by the trigger operation, the upgrade server compares the system software information on the set-top box with the system software information stored on the upgrade server, Return the link information, download the upgrade data package according to the link information, and complete the online upgrade according to the upgrade data package. During the entire upgrade process, only power-on or one-key trigger operation is required. There is no need to upgrade by dedicated maintenance personnel, which saves time and reduces cost.
[0150] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The program can be stored in a computer readable storage medium. During execution, it may include the procedures of the above-mentioned method embodiments. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
[0151] The above-mentioned embodiments only express several implementation modes of the present invention, and their description is more specific and detailed, but they should not be understood as a limitation to the patent scope of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can be made, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.