A set-top box upgrade method, device and storage medium

Through automatic detection and configuration of the Internet of Things, silent upgrades of set-top boxes are achieved, solving the problems of cumbersome and long time in traditional upgrades, and providing a convenient, stable and safe upgrade experience.

CN117979099BActive Publication Date: 2024-12-20BEIJING BARLEY XINGYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311850897.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2024-12-20
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

The traditional set-top box upgrade method is cumbersome and time-consuming, and users need to operate manually. The large download file size leads to a long download time, and problems such as failure or system crash are prone to occur during the upgrade process.

Method used

The Internet of Things establishes a data channel between the set-top box and the server, the detection module automatically detects the new ROM, the background server transmits configuration information, and the set-top box performs information configuration and download selection, realizes silent upgrades, and ensures file integrity through MD5 detection, providing mandatory and timed upgrades. Options, record download errors and upload logs.

Benefits of technology

It realizes convenient and real-time remote upgrades, reduces user operation steps and time, ensures the stability and integrity of the upgrade process, and provides better user experience and system security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117979099B_ABST
    Figure CN117979099B_ABST
Patent Text Reader

Abstract

The present invention proposes a set-top box upgrade method, device and storage medium. The method is characterized in that the method includes: establishing a data channel between a set-top box and a server through the Internet of Things, the set-top box detects whether there is an available new ROM through a detection module; if it is detected that there is a new ROM, the background server transmits configuration information to the set-top box through the Internet of Things; after the set-top box receives the configuration information, the system is configured; after the information configuration is completed, the set-top box performs a configuration information download operation, and after the download is completed, the upgrade download address of the new ROM is obtained, and a download selection is made; the upgrade operation is performed, the firmware is installed, and a new user interface is entered, and the application is silently upgraded in the background; after the silent upgrade is completed, the expansion package is upgraded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention provides a set-top box upgrading method, device and storage medium, belonging to the technical field of set-top boxes. Background Art

[0002] A set-top box is a widely used home entertainment device that receives TV signals and plays video, audio, and other multimedia content. With the development of technology, the functions of set-top boxes are constantly enhanced, requiring higher performance and updated software to support them. Therefore, the upgrade of set-top boxes has become an important issue.

[0003] The traditional method of upgrading a set-top box is usually to connect to the Internet via wired or wireless means, then download the upgrade file and install it in the set-top box. However, there are some problems with this method. First, the upgrade process requires manual operation by the user, which increases the trouble and inconvenience of the user. Secondly, the size of the upgrade file is usually large and requires a long download time, which affects the user experience. In addition, various problems may occur during the upgrade process, such as upgrade failure, system crash, etc., which will cause unnecessary trouble to the user. Summary of the invention

[0004] The present invention provides a set-top box upgrade method, device and storage medium, which are used to solve the problems of complicated set-top box upgrade steps and long upgrade time in the prior art:

[0005] The present invention provides a set-top box upgrading method, the method comprising:

[0006] A data channel is established between a set-top box and a server through the Internet of Things, and the set-top box detects whether there is an available new ROM through a detection module;

[0007] If a new ROM is detected, the backend server transmits the configuration information to the set-top box through the Internet of Things; after receiving the configuration information, the set-top box performs information configuration on the system;

[0008] After the information configuration is completed, the set-top box performs a configuration information download operation, and after the download is completed, obtains the upgrade download address of the new ROM and makes a download selection;

[0009] Execute the upgrade operation, install the firmware, enter the new user interface, and silently upgrade the application in the background; after the silent upgrade is completed, upgrade the expansion package.

[0010] Furthermore, the data channel between the set-top box and the server is established through the Internet of Things, and the set-top box detects whether there is an available new version through a detection module, including:

[0011] Start the set-top box, connect to the Internet of Things after startup, and listen to the startup broadcast;

[0012] Start the detection module, communicate with the background server, and communicate with the background ROM through the network interface;

[0013] The detection module detects whether there is a new ROM, and if so, returns the configuration information of the new ROM.

[0014] Further, if the new ROM is detected, the background server transmits the configuration information to the set-top box through the Internet of Things; after the set-top box receives the configuration information, the system is configured; if the new ROM is detected, the background server transmits the configuration information to the set-top box through the Internet of Things; after the set-top box receives the configuration information, the system is configured; after the information configuration is completed, the set-top box executes the configuration information download operation, and after the download is completed, the upgrade download address of the new ROM is obtained, and the download selection is performed; including:

[0015] If a new ROM is detected, the cache space of the current cache area of ​​the set-top box is detected to determine the current cache space size;

[0016] If the current cache space is not less than the size of the new ROM package file, the configuration information is downloaded directly to the cache directory;

[0017] If the current cache space is smaller than the size of the new ROM package, the junk information in the cache space will be cleaned up through the cleaning manager; after the cleaning is completed, the configuration information will be downloaded in the cache directory;

[0018] After the configuration information is downloaded, the upgrade download address of the ROM is obtained from the configuration information, and the ROM package is downloaded through the upgrade download address;

[0019] After the ROM download is complete, make the download selection.

[0020] Furthermore, the download selection includes whether to perform a forced upgrade; if "Yes" is selected, the system will detect the ROM package, and immediately perform the upgrade operation to upgrade after the detection is completed; if "No" is selected, the system will record the instruction and perform a detection and upgrade on the ROM the next time the computer is turned on; after the detection is completed, the system will pop up the corresponding instruction, and the user will select the corresponding instruction to perform the upgrade operation, and the corresponding instruction includes downloading immediately or downloading after 10 minutes; after the download is completed, the ROM package is detected, and the upgrade operation is performed after the detection is completed. Further, the detection includes MD5 detection; the steps of the MD5 detection include:

[0021] The downloaded ROM package is calculated using the MD5 algorithm, and a fixed-length MD5 hash value is generated based on the calculation result; this can usually be done through command line tools or library functions provided by the programming language.

[0022] And obtain the expected MD5 value of the ROM package from the configuration information downloaded from the server;

[0023] Compare the calculated MD5 value with the expected MD5 value. If the two are equal, it means that the downloaded ROM package is complete and has not been tampered with. If they are not equal, it means that the downloaded file may be damaged or tampered with.

[0024] Based on the comparison results, confirm whether the downloaded ROM package is complete and trustworthy;

[0025] If the MD5 values ​​match, the upgrade operation is performed;

[0026] If the MD5 values ​​do not match, you need to re-download the ROM package.

[0027] Furthermore, the upgrade operation is performed, the firmware is installed, and a new user interface is entered to perform a silent upgrade in the background; after the silent upgrade is completed, the expansion package upgrade includes:

[0028] Restart the system and install the new firmware. After the installation is complete, enter the new user interface.

[0029] And enter other settings interface through setting instructions to perform version detection, and determine whether silent upgrade is needed based on the version detection result;

[0030] After the silent upgrade is complete, upgrade the expansion package.

[0031] Furthermore, the method for determining whether a silent upgrade is required includes:

[0032] Click the Version Detection button. After clicking Finish, the system will check whether the memory is greater than 30%. If the memory is not greater than 30%, the memory will be cleaned up through the Cleanup Manager.

[0033] After the cleaning is completed, the data is obtained by interacting with the backend server through the network and judging the obtained situation;

[0034] If the data obtained is empty, it is marked that no application needs to be upgraded, and a 4-hour polling detection is set through the polling algorithm;

[0035] If the acquired data is not empty or the data is detected to be not empty after polling detection, the number of applications that currently need to be updated is recorded;

[0036] Determine whether the current set-top box space is sufficient. If not, clean it up through the cleaning manager.

[0037] After the cleaning is completed, the APK is downloaded in a loop; after the download is complete, it is verified through MD5, and after the verification is completed, it is installed by calling the silent installation method provided by the system.

[0038] Furthermore, the APK is downloaded in a loop. If a download error occurs, the download is performed again and the error situation is recorded. After the download and installation is completed, the error information download log is uploaded to the background, and the cause of the download error is determined by analyzing the error download log.

[0039] The present invention provides a set-top box upgrade system, the set-top box upgrade system comprising:

[0040] Channel establishment module: establishes a data channel between the set-top box and the server through the Internet of Things, and the set-top box detects whether there is an available new ROM through the detection module;

[0041] Information configuration module: If a new ROM is detected, the backend server transmits the configuration information to the set-top box through the Internet of Things; after receiving the configuration information, the set-top box performs information configuration on the system;

[0042] Download selection module: After the information configuration is completed, the set-top box performs the configuration information download operation. After the download is completed, the upgrade download address of the new ROM is obtained and the download selection is performed;

[0043] Silent upgrade module: performs upgrade operations, installs firmware, enters a new user interface, and silently upgrades the application in the background; after the silent upgrade is completed, the expansion package is upgraded.

[0044] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements any of the above-mentioned set-top box upgrading methods.

[0045] The beneficial effects of the present invention are as follows: a data channel between a set-top box and a server is established through the Internet of Things, thereby achieving the convenience and real-time performance of remote upgrading; the set-top box actively detects whether there is an available new ROM through a detection module, thereby ensuring that the user can obtain the latest functions and experience in a timely manner; the background server transmits configuration information to the set-top box through the Internet of Things, and the set-top box configures the system according to the configuration information, and makes a download selection according to the upgrade download address of the new ROM; after the firmware is installed, the set-top box enters a new user interface, and silently upgrades the application in the background, and the user can enjoy the updated application and function without intervention; the downloaded ROM package is calculated and compared through the MD5 algorithm, thereby ensuring that the downloaded ROM package is complete and has not been tampered with; the selection of forced upgrade and scheduled upgrade is provided, and the user can choose to upgrade immediately or postpone the upgrade as needed; the system can record download errors and upload download logs, thereby facilitating subsequent analysis and locating the cause of the error. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A step diagram of a set-top box upgrade method according to the present invention;

[0047] Figure 2 This is a module diagram of a set-top box upgrading device described in the present invention. DETAILED DESCRIPTION

[0048] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0049] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0051] One embodiment of the present invention, as Figure 1 As shown, a set-top box upgrading method comprises:

[0052] S1: A data channel is established between a set-top box and a server through the Internet of Things, and the set-top box detects whether there is an available new ROM through a detection module;

[0053] S2: If a new ROM is detected, the backend server transmits the configuration information to the set-top box through the Internet of Things; after receiving the configuration information, the set-top box configures the system; after the information configuration is completed, the set-top box executes a configuration information download operation, and after the download is completed, obtains the upgrade download address of the new ROM and selects the download;

[0054] S3: Execute the upgrade operation, install the firmware, enter the new user interface, and silently upgrade the application in the background; after the silent upgrade is completed, upgrade the expansion package.

[0055] The working principle of the above technical solution is as follows: the set-top box establishes a data channel with the background server through the Internet of Things, and detects whether there is an available new ROM through the detection module. If there is an available new ROM, proceed to the next step; the background server transmits the configuration information to the set-top box through the Internet of Things, and the set-top box performs system information configuration after receiving the configuration information. After the configuration information is downloaded, the set-top box obtains the upgrade download address of the new ROM and makes a download selection; the set-top box executes the upgrade operation, installs the firmware, and enters the new user interface. The background silently upgrades the application, and upgrades the expansion package after the upgrade is completed.

[0056] The effects of the above technical solution are as follows: a data channel is established between the set-top box and the server through the Internet of Things to achieve remote upgrading, and users do not need to manually download and install upgrading files, which provides a more convenient upgrading method; the set-top box automatically detects whether there is an available new ROM through a detection module, which reduces the user's operation steps and saves time and energy; the background server transmits configuration information to the set-top box through the Internet of Things, and the set-top box performs system information configuration after receiving the configuration information, and can perform personalized configuration according to user needs, providing a more flexible upgrading solution; after the information configuration is completed, the set-top box executes the configuration information download operation, obtains the upgrade download address of the new ROM, and makes a download selection, which realizes incremental upgrading and saves bandwidth and download time; during the execution of the upgrading operation, the set-top box enters a new user interface and silently upgrades the application in the background, which will not interfere with the functions and interfaces that the user is using, and provides a better user experience; after the silent upgrade is completed, the expansion package is also upgraded to ensure the integrity and stability of the system and application.

[0057] In one embodiment of the present invention, the data channel between the set-top box and the server is established through the Internet of Things, and the set-top box detects whether there is an available new version through a detection module, including:

[0058] S11: Start the set-top box, connect to the Internet of Things after startup, and monitor the startup broadcast;

[0059] S12: Start the detection module, communicate with the background server, and communicate with the background ROM through the network interface;

[0060] S13: Detect whether there is a new ROM through the detection module, and if so, return the configuration information of the new ROM.

[0061] The working principle of the above technical solution is as follows: start the set-top box and connect to the Internet of Things. After the start-up is completed, the set-top box starts to listen to the startup broadcast in order to establish a data channel with the background server; start the detection module and communicate with the background server through the network interface. The detection module can obtain relevant information of the background ROM by sending a request, and send the current version information of the set-top box to the background server; the detection module obtains the configuration information of the new ROM through communication with the background server. The detection module will compare the version number of the current set-top box with the version number of the background ROM to determine whether there is a new version available. If there is a new version, the configuration information of the new ROM is returned to the set-top box.

[0062] The effects of the above technical solution are as follows: a data channel is established between the set-top box and the server through the Internet of Things to achieve remote upgrading, and users do not need to manually download and install upgrading files, which provides a more convenient upgrading method; the set-top box automatically detects whether there is an available new ROM through a detection module, which reduces the user's operation steps and saves time and energy; the background server transmits configuration information to the set-top box through the Internet of Things, and the set-top box performs system information configuration after receiving the configuration information, and can perform personalized configuration according to user needs, providing a more flexible upgrading solution; after the information configuration is completed, the set-top box executes the configuration information download operation, obtains the upgrade download address of the new ROM, and makes a download selection, which realizes incremental upgrading and saves bandwidth and download time; during the execution of the upgrading operation, the set-top box enters a new user interface and silently upgrades the application in the background, which will not interfere with the functions and interfaces that the user is using, and provides a better user experience; after the silent upgrade is completed, the expansion package is also upgraded to ensure the integrity and stability of the system and application.

[0063] In one embodiment of the present invention, if a new ROM is detected, the backend server transmits configuration information to the set-top box through the Internet of Things; after the set-top box receives the configuration information, the system is configured; if a new ROM is detected, the backend server transmits the configuration information to the set-top box through the Internet of Things; after the set-top box receives the configuration information, the system is configured; after the information configuration is completed, the set-top box executes a configuration information download operation, and after the download is completed, the upgrade download address of the new ROM is obtained, and the download selection is performed; including:

[0064] S21: If a new ROM is detected, the cache space of the current cache area of ​​the set-top box is detected to determine the current cache space size; the storage space size is calculated by the following formula;

[0065]

[0066] Among them, H represents the cache space size in MB, N represents the number of files in the current cache area, and f j Indicates the size of the j file, F j represents the cache frequency of the jth file, T represents the usage time of the cache, and R represents the average access speed of the file.

[0067] S22: If the current cache space is not less than the size of the new ROM package file, the configuration information is directly downloaded to the cache directory;

[0068] S23: If the current cache space is smaller than the size of the new ROM package, the junk information in the cache space is cleaned up by the cleaning manager; after the cleaning is completed, the configuration information is downloaded in the cache directory;

[0069] S24: After the configuration information is downloaded, the upgrade download address of the ROM is obtained from the configuration information, and the ROM package is downloaded through the upgrade download address;

[0070] S25: After the ROM download is completed, download selection is performed.

[0071] The working principle of the above technical solution is: if the existence of a new ROM is detected, the cache space of the current cache area of ​​the set-top box is detected to determine the current cache space size;

[0072] If the current cache space is not less than the size of the new ROM package file, the configuration information is downloaded directly to the cache directory;

[0073] If the current cache space is smaller than the size of the new ROM package, the junk information in the cache space will be cleaned up through the cleaning manager; after the cleaning is completed, the configuration information will be downloaded in the cache directory;

[0074] After the configuration information is downloaded, the upgrade download address of the ROM is obtained from the configuration information, and the ROM package is downloaded through the upgrade download address; after the ROM download is completed, the download selection is performed.

[0075] The effects of the above technical solution are: by transmitting configuration information to the set-top box through the background server, the set-top box can automatically perform system information configuration and ROM upgrade operations, reducing the manual intervention of users and improving the efficiency and convenience of upgrades; by detecting and managing the cache space of the current cache area of ​​the set-top box, it is ensured that there is enough space to download and store configuration information and new ROMs to avoid upgrade failures due to insufficient space; when the cache space is insufficient, the junk information in the cache space is cleaned up by the cleaning housekeeper to release more available space to ensure the smooth download and update of configuration information and ROMs; users do not need to manually search and download ROM upgrade packages, the set-top box will automatically obtain the ROM upgrade download address and make download selections, reducing the user's operation steps and complexity; through automated upgrade processes and simplified operations, users can obtain the latest ROM upgrades in a timely manner and enjoy the optimized experience brought by improvements, repairs and new features of system functions. Through the above formulas and related strategies, the cache space of the set-top box can be reasonably managed, the process of downloading configuration information and ROM upgrades can be optimized, and system performance and user experience can be improved. At the same time, the formula takes into account factors such as the number and size of files, cache frequency, cache usage time, and file access speed, and can more accurately estimate the actual available capacity of the current cache space; the cache space size calculated according to the formula can be conditionally judged according to a threshold (for example, 500MB). If the current cache space is greater than or equal to 500MB, the configuration information can be downloaded directly in the cache directory to avoid cleaning operations and improve download speed and efficiency. If the current cache space is less than 500MB, it is necessary to clean up junk information through the cleaning housekeeper before downloading the configuration information to free up more space; after the configuration information is downloaded, the upgrade download address of the ROM is obtained, and the ROM package is downloaded through the address. By dynamically calculating the cache space size and taking corresponding processing strategies, the download efficiency can be improved, download failures or freezes caused by insufficient cache space can be reduced, and the user experience can be improved.

[0076] In one embodiment of the present invention, the download selection includes whether to perform a forced upgrade; if "yes" is selected, the system will detect the ROM package, and immediately perform the upgrade operation to upgrade after the detection is completed; if "no" is selected, the system will record the instruction and detect and upgrade the ROM the next time it is turned on; after the detection is completed, the system will pop up the corresponding instruction, and the user will select the corresponding instruction to perform the upgrade operation, and the corresponding instruction includes downloading immediately or downloading after 10 minutes; after the download is completed, the ROM package is detected, and the upgrade operation is performed after the detection is completed. The download progress of the upgrade package is prompted in the lower right corner; before downloading, the old installation package in the cache directory will be clearly installed before the new one;

[0077] The working principle of the above technical solution is as follows: when the user chooses whether to force an upgrade, if "Yes" is selected, the system will immediately detect the ROM package and perform the upgrade operation to upgrade. If "No" is selected, the system will record the instruction and detect and upgrade the ROM the next time it is turned on; after the detection is completed, the system will pop up the corresponding instruction according to the user's selection, including downloading immediately or downloading after 10 minutes. After the user selects the corresponding instruction, the system will start downloading the upgrade package and prompt the download progress of the upgrade package in the lower right corner; after the download is complete, the system will detect the ROM package to ensure the integrity and correctness of the ROM package. After the test passes, the system will perform the upgrade operation and update the ROM version of the set-top box; before downloading, the system will clear the old installation package in the cache directory to ensure that the installation of the new ROM package will not be affected by the old version.

[0078] The effects of the above technical solution are as follows: users can choose whether to perform a forced upgrade according to their own needs, thus avoiding resistance to forced upgrades and improving user experience; the system records the upgrade instructions selected by the user, and detects and upgrades the ROM the next time the computer is turned on, and pops up the corresponding download instructions based on the user's choice, allowing the user to choose to download immediately or later, thereby increasing user participation and control; the download progress of the upgrade package is prompted in the lower right corner, allowing the user to clearly understand the progress of the upgrade, thereby improving user experience and satisfaction; the old installation packages in the cache directory are cleared before downloading to ensure that the installation process of the new ROM package is not affected, thereby improving the stability and success rate of the upgrade; by providing flexible upgrade options, customized upgrade operations, friendly prompts and cleaning up the cache directory, the overall user satisfaction with the upgrade process is improved and user loyalty is enhanced.

[0079] In one embodiment of the present invention, the detection includes MD5 detection; the steps of the MD5 detection include:

[0080] A1: Calculate the downloaded ROM package through the MD5 algorithm and generate a fixed-length MD5 hash value based on the calculation result; this can usually be done through command line tools or library functions provided by the programming language.

[0081] A2: Get the expected MD5 value of the ROM package from the configuration information downloaded from the server;

[0082] A3: Compare the calculated MD5 value with the expected MD5 value. If the two are equal, it means that the downloaded ROM package is complete and has not been tampered with. If they are not equal, it means that the downloaded file may be damaged or tampered with.

[0083] A4: Based on the comparison results, confirm whether the downloaded ROM package is complete and trustworthy;

[0084] A5: If the MD5 values ​​match, the upgrade operation is performed;

[0085] A6: If the MD5 values ​​do not match, you need to re-download the ROM package.

[0086] The working principle of the above technical solution is as follows: after the user chooses to perform the upgrade operation, the system will start downloading the ROM package; the system uses the MD5 algorithm to calculate the downloaded ROM package and generate an MD5 hash value of a fixed length; and obtains the expected MD5 value of the ROM package from the configuration information downloaded from the server;

[0087] The system compares the calculated MD5 value with the expected MD5 value; if the two are equal, it means that the downloaded ROM package is complete and has not been tampered with, and the system confirms the integrity and trustworthiness of the ROM package; if the MD5 values ​​match, the system performs the upgrade operation and applies the ROM package to the device; if the MD5 values ​​do not match, it means that the downloaded file may be damaged or tampered with, and the system needs to download the ROM package again.

[0088] The effects of the above technical solution are: through MD5 detection, it can be ensured that the downloaded ROM package is complete and has not been tampered with, thereby improving the security and stability of the upgrade operation; MD5 detection can help the system to promptly detect problems with the downloaded ROM package, such as damage or tampering, thereby avoiding device failure or safety problems caused by this; MD5 detection can be automatically completed through library functions or command line tools provided by the programming language, which simplifies the upgrade operation process and improves efficiency; users only need to perform MD5 detection after downloading the ROM package to confirm the integrity and trustworthiness of the ROM package, without the need for complex manual detection, which facilitates user operation.

[0089] In one embodiment of the present invention, the performing of the upgrade operation, installing the firmware, entering the new user interface, and performing a silent upgrade in the background; and performing an expansion package upgrade after the silent upgrade is completed include:

[0090] S31: Restart the system and install new firmware. After the installation is complete, enter a new user interface;

[0091] S32: Enter other setting interfaces through setting instructions to perform version detection, and determine whether silent upgrade is required based on the version detection result;

[0092] S33: After the silent upgrade is completed, upgrade the expansion package.

[0093] The working principle of the above technical solution is: the system installs the firmware according to the upgrade package selected by the user, enters the new user interface, and performs silent upgrades in the background. Silent upgrades can prevent users from interrupting the upgrade operation, thereby improving the success rate and efficiency; after the upgrade is completed, the system restarts and installs the new firmware. After the installation is complete, the system enters a new user interface to provide a better user experience; the system enters other setting interfaces through setting instructions to perform version detection, and determines whether a silent upgrade is required based on the version detection results. If there is a new upgrade package, the system will automatically download and perform a silent upgrade to ensure timely updates and security of the system; after the silent upgrade is completed, the system can upgrade the expansion package, that is, multiple applications are upgraded at the same time, but there is a sequence, so enter an expansion package for simultaneous upgrades; to increase system functions and improve user experience.

[0094] The effects of the above technical solution are: silent upgrades can be performed in the background, and users do not need to operate manually, avoiding tedious upgrade processes and improving user convenience and satisfaction; when performing the upgrade operation, the system will install the firmware and install the new firmware after restarting. Through the automated upgrade process, human errors can be greatly reduced and the success rate of upgrades can be improved; by setting instructions to enter other setting interfaces for version detection, the system can check in real time whether there is a new upgrade package. If so, the system will automatically perform a silent upgrade to ensure timely updates and security of the system; after the silent upgrade is completed, the system can upgrade the expansion package to increase system functions or fix bugs, thereby improving user experience and system stability.

[0095] In one embodiment of the present invention, the method for determining whether a silent upgrade is required includes:

[0096] C1: Click the version detection button. After clicking, the system determines whether the memory is greater than 30%. If the memory is not greater than 30%, the memory is cleaned up through the cleaning manager.

[0097] C2: After the cleaning is completed, it interacts with the backend server through the network to obtain data and makes judgments on the acquisition situation;

[0098] C3: If the acquired data is empty, it is marked that no application needs to be upgraded, and a 4-hour polling detection is set through the polling algorithm;

[0099] C4: If the acquired data is not empty or the data is detected to be not empty after polling detection, the number of applications that currently need to be updated is recorded;

[0100] C5: Determine whether the current set-top box space is sufficient. If not, clean it up through the cleaning manager. The sufficiency standard is whether the current set-top box space is greater than 30%. If so, it is sufficient.

[0101] C6: After the cleaning is completed, the APK is downloaded in a loop; after the download is completed, it is verified through MD5, and after the verification is completed, it is installed by calling the silent installation method provided by the system.

[0102] The working principle of the above technical solution is as follows: the user clicks the "Version Detection" button to trigger the version detection operation; the system determines the current memory usage. If the memory is less than 30%, the memory is cleaned up through the cleaning housekeeper; the system interacts with the background server through the network and obtains the data of the upgraded application. If the acquired data is empty, it is marked that no application needs to be upgraded, and a 4-hour polling detection is set through the polling algorithm; otherwise, the next step is entered; the system records the number of applications that need to be updated; the system determines the current set-top box space usage. If it is not enough, it is cleaned up through the cleaning housekeeper; after the cleaning is completed, the system performs APK loop downloads and verifies the integrity of the downloaded file through MD5. After the verification is completed, the upgraded application is installed by calling the silent installation method provided by the system.

[0103] The effects of the above technical solution are: by judging the memory usage and cleaning it up, it is ensured that there are sufficient memory resources when performing the upgrade operation, avoiding upgrade failure or system crash due to insufficient memory; by interacting with the background server and obtaining data, the system can accurately judge whether there is an application that needs to be upgraded, avoiding unnecessary upgrade operations, and improving the upgrade efficiency and user experience; when the data is empty for the first time, by setting a polling detection algorithm, the system can periodically re-detect whether there is a new application that needs to be upgraded, ensuring that the upgrade data is obtained in time; the number of applications that need to be updated is recorded to facilitate subsequent processing and statistics, and provide better management and control; by judging the usage of the set-top box space and cleaning it up, it is ensured that there is enough space to store and install the upgraded application program, avoiding upgrade failure due to insufficient space; by using MD5 to verify the downloaded file, it is ensured that the downloaded file is complete and correct, avoiding installation failure or system attack due to download errors or tampering.

[0104] In one embodiment of the present invention, the APK is downloaded in a loop. If a download error occurs, the download is performed again and the error situation is recorded. After the download and installation is completed, the error information download log is uploaded to the background, and the cause of the download error is determined by analyzing the error download log.

[0105] The working principle of the above technical solution is as follows: the system starts the APK download operation; the system monitors the APK download process, including download progress, download speed and other information; if an error occurs during the download process (such as network disconnection, download timeout, etc.), the system will record the error information and re-download; the system will record the error information and upload the error download log to the backend server after the download is completed; after receiving the error download log, the backend server will analyze the error information and determine the cause of the download error. Possible causes include network instability, server abnormality, file non-existence, etc.

[0106] The effect of the above technical solution is: by downloading the APK in a loop and re-downloading when a download error occurs, the download success rate can be effectively improved. In particular, for download errors caused by network instability or other temporary problems, timely re-downloading can overcome these problems and ensure the completion of the download; by recording the download error information and uploading it to the background server, the error download log can be analyzed. By analyzing the error log, you can deeply understand the cause of the download error and identify the problem, so as to optimize and improve it in a targeted manner to improve the stability and reliability of the download; by cyclic downloading and error recording, it can reduce the user's troubles and dissatisfaction caused by download errors. Timely handling of download errors, re-downloading and avoiding repeated downloads as much as possible will help improve the user experience and increase the user's trust in the application; recording error information and uploading it to the background server will facilitate developers to troubleshoot and handle download errors. By analyzing the error log, potential problems can be discovered in a timely manner, related download logic can be quickly repaired and optimized, and the stability and reliability of the overall system can be improved.

[0107] One embodiment of the present invention, as Figure 2 As shown, a set-top box upgrade system, the set-top box upgrade system comprises:

[0108] Channel establishment module: establishes a data channel between the set-top box and the server through the Internet of Things, and the set-top box detects whether there is an available new ROM through the detection module; Information configuration module: if the new ROM is detected, the background server transmits the configuration information to the set-top box through the Internet of Things; after receiving the configuration information, the set-top box performs information configuration on the system;

[0109] Download selection module: After the information configuration is completed, the set-top box performs the configuration information download operation. After the download is completed, the upgrade download address of the new ROM is obtained and the download selection is performed;

[0110] Silent upgrade module: performs upgrade operations, installs firmware, enters a new user interface, and silently upgrades the application in the background; after the silent upgrade is completed, the expansion package is upgraded.

[0111] The working principle of the above technical solution is as follows: the set-top box establishes a data channel with the background server through the Internet of Things, and detects whether there is an available new ROM through the detection module. If there is an available new ROM, proceed to the next step; the background server transmits the configuration information to the set-top box through the Internet of Things, and the set-top box performs system information configuration after receiving the configuration information. After the configuration information is downloaded, the set-top box obtains the upgrade download address of the new ROM and makes a download selection; the set-top box executes the upgrade operation, installs the firmware, and enters the new user interface. The background silently upgrades the application, and upgrades the expansion package after the upgrade is completed.

[0112] The effects of the above technical solution are as follows: a data channel is established between the set-top box and the server through the Internet of Things to achieve remote upgrading, and users do not need to manually download and install upgrading files, which provides a more convenient upgrading method; the set-top box automatically detects whether there is an available new ROM through a detection module, which reduces the user's operation steps and saves time and energy; the background server transmits configuration information to the set-top box through the Internet of Things, and the set-top box performs system information configuration after receiving the configuration information, and can perform personalized configuration according to user needs, providing a more flexible upgrading solution; after the information configuration is completed, the set-top box executes the configuration information download operation, obtains the upgrade download address of the new ROM, and makes a download selection, which realizes incremental upgrading and saves bandwidth and download time; during the execution of the upgrading operation, the set-top box enters a new user interface and silently upgrades the application in the background, which will not interfere with the functions and interfaces that the user is using, and provides a better user experience; after the silent upgrade is completed, the expansion package is also upgraded to ensure the integrity and stability of the system and application.

[0113] One embodiment of the present invention is a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements any of the above-mentioned set-top box upgrade methods.

[0114] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A set-top box upgrade method, characterized in that: The method comprises: A data channel is established between a set-top box and a server through the Internet of Things, and the set-top box detects whether there is an available new ROM through a detection module; If a new ROM is detected, the backend server transmits the configuration information to the set-top box through the Internet of Things; after receiving the configuration information, the set-top box configures the system; after the information configuration is completed, the set-top box performs a configuration information download operation, and after the download is completed, obtains the upgrade download address of the new ROM and selects the download; Execute the upgrade operation, install the firmware, enter the new user interface, and silently upgrade the application in the background; after the silent upgrade is completed, upgrade the expansion package; The upgrade operation is performed to install the firmware, enter the new user interface, and perform a silent upgrade in the background; after the silent upgrade is completed, the expansion package upgrade includes: Restart the system and install the new firmware. After the installation is complete, enter the new user interface. And enter other settings interface through setting instructions to perform version detection, and determine whether silent upgrade is needed based on the version detection result; After the silent upgrade is completed, upgrade the expansion package; The method for determining whether a silent upgrade is required includes: Click the Version Detection button. After clicking Finish, the system will check whether the memory is greater than 30%. If the memory is not greater than 30%, the memory will be cleaned up through the Cleanup Manager. After the cleaning is completed, the data is obtained by interacting with the backend server through the network and judging the obtained situation; If the acquired data is empty, it is marked that no application needs to be upgraded, and a 4-hour polling detection is set through the polling algorithm; If the acquired data is not empty or the data is detected to be not empty after polling detection, the number of applications that currently need to be updated is recorded; Determine whether the current set-top box space is sufficient. If not, clean it up through the cleaning manager. After the cleaning is completed, the APK is downloaded in a loop; after the download is completed, it is verified through MD5, and after the verification is completed, it is installed by calling the silent installation method provided by the system; If the new ROM is detected, the backend server transmits the configuration information to the set-top box through the Internet of Things; after the set-top box receives the configuration information, the system is configured; if the new ROM is detected, the backend server transmits the configuration information to the set-top box through the Internet of Things; after the set-top box receives the configuration information, the system is configured; after the information configuration is completed, the set-top box executes the configuration information download operation, and after the download is completed, the upgrade download address of the new ROM is obtained, and the download selection is performed; including: If a new ROM is detected, the cache space of the current cache area of ​​the set-top box is detected to determine the current cache space size; the cache space size is calculated by the following formula; Among them, H represents the cache space size in MB, N represents the number of files in the current cache area, and f j Indicates the size of the j file, F j represents the cache frequency of the jth file, T represents the usage time of the cache, and R represents the average access speed of the file; If the current cache space is not less than the size of the new ROM package file, the configuration information is downloaded directly to the cache directory; If the current cache space is smaller than the size of the new ROM package, the junk information in the cache space will be cleaned up through the cleaning manager; after the cleaning is completed, the configuration information will be downloaded in the cache directory; After the configuration information is downloaded, the upgrade download address of the ROM is obtained from the configuration information, and the ROM package is downloaded through the upgrade download address; After the ROM download is complete, make the download selection.

2. A set-top box upgrade method according to claim 1, characterized in that: The step of establishing a data channel between a set-top box and a server through the Internet of Things, wherein the set-top box detects whether a new version is available through a detection module, includes: Start the set-top box, connect to the Internet of Things after startup, and listen to the startup broadcast; Start the detection module, communicate with the background server, and communicate with the background ROM through the network interface; The detection module detects whether there is a new ROM, and if so, returns the configuration information of the new ROM.

3. A set-top box upgrade method according to claim 1, characterized in that: The download options include whether to perform a forced upgrade; if "Yes" is selected, the system will detect the ROM package, and immediately perform the upgrade operation to upgrade after the detection is completed; if "No" is selected, the system will record the instruction and detect and upgrade the ROM at the next startup; after the detection is completed, the system will pop up the corresponding instruction, and the user will select the corresponding instruction to perform the upgrade operation, and the corresponding instruction includes downloading immediately or downloading after 10 minutes; after the download is completed, the ROM package will be detected, and the upgrade operation will be performed after the detection is completed.

4. A set-top box upgrade method according to claim 3, characterized in that: The detection includes MD5 detection; the steps of the MD5 detection include: Calculate the downloaded ROM package through the MD5 algorithm and generate a fixed-length MD5 hash value based on the calculation result; And obtain the expected MD5 value of the ROM package from the configuration information downloaded from the server; Compare the calculated MD5 value with the expected MD5 value. If the two are equal, the downloaded ROM package is complete and has not been tampered with. If they are not equal, the downloaded file may be damaged or tampered with. According to the comparison result, confirm whether the downloaded ROM package is complete; If the MD5 values ​​match, the upgrade operation is performed; If the MD5 values ​​do not match, you need to re-download the ROM package.

5. A set-top box upgrade method according to claim 1, characterized in that: The APK is downloaded in a loop. If a download error occurs, the download is performed again and the error situation is recorded. After the download and installation is completed, the error information download log is uploaded to the background, and the cause of the download error is determined by analyzing the error download log.

6. A system for implementing the set-top box upgrade method according to any one of claims 1 to 5, characterized in that: The set-top box upgrade system comprises: Channel establishment module: establishes a data channel between the set-top box and the server through the Internet of Things, and the set-top box detects whether there is an available new ROM through the detection module; Information configuration module: If a new ROM is detected, the backend server transmits the configuration information to the set-top box through the Internet of Things; after receiving the configuration information, the set-top box performs information configuration on the system; Download selection module: After the information configuration is completed, the set-top box performs the configuration information download operation. After the download is completed, the upgrade download address of the new ROM is obtained and the download selection is performed; Silent upgrade module: performs upgrade operations, installs firmware, enters a new user interface, and silently upgrades the application in the background; after the silent upgrade is completed, the expansion package is upgraded.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the set-top box upgrading method as described in any one of claims 1-5.