WO2018171335A1 - 一种机顶盒升级数据选择方法、系统及机顶盒 - Google Patents

一种机顶盒升级数据选择方法、系统及机顶盒 Download PDF

Info

Publication number
WO2018171335A1
WO2018171335A1 PCT/CN2018/074587 CN2018074587W WO2018171335A1 WO 2018171335 A1 WO2018171335 A1 WO 2018171335A1 CN 2018074587 W CN2018074587 W CN 2018074587W WO 2018171335 A1 WO2018171335 A1 WO 2018171335A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
top box
set top
retained
upgrade
Prior art date
Application number
PCT/CN2018/074587
Other languages
English (en)
French (fr)
Inventor
陈建辉
Original Assignee
深圳市九洲电器有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市九洲电器有限公司 filed Critical 深圳市九洲电器有限公司
Publication of WO2018171335A1 publication Critical patent/WO2018171335A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/458Scheduling content for creating a personalised stream, e.g. by combining a locally stored advertisement with an incoming stream; Updating operations, e.g. for OS modules ; time-related management operations
    • H04N21/4586Content update operation triggered locally, e.g. by comparing the version of software modules in a DVB carousel to the version stored locally
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB

Definitions

  • the present application relates to the field of digital television, and in particular, to a method, system, and set top box for selecting a set top box upgrade data.
  • Flash is divided into different areas according to different purposes, and data corresponding to different areas is written in a mirror image.
  • the data stored in the data storage area will not be written in the same process, some data is written during the programming process, some data is written during the production test process; some data will be written after leaving the factory. .
  • the set-top box provided to the user for the first time is often only a preliminary version. Users will gradually feedback various problems or new requirements during the use process, which needs to be modified by the set-top box manufacturer, and finally updated to each set-top box by upgrading. It is necessary to upgrade the set-top box regularly.
  • the set-top box upgrade will generally replace the old system with the old one, replacing the corresponding image in different areas of Flash with the latest image.
  • This upgrade method is applicable in most cases.
  • some areas of the set-top box Flash store data that needs to be retained.
  • a complete replacement will erase the data that needs to be retained, and the set-top box must be returned to the factory to recover the data that needs to be retained.
  • the data involved in the latest upgrade is in the same area as the write number data. Since the write number data contains the unique identifier of each set-top box, it can only be written during the production process.
  • the step S10 further includes: setting a flag bit for each piece of data, the flag bit is used to indicate whether the data needs to be retained, and detecting whether there is data to be retained in the set top box according to the flag bit.
  • the step S10 further includes: the flag bit being 0 indicates that the data does not need to be reserved, and the flag bit being 1 indicates that the data needs to be reserved.
  • the step S10 further comprises: grouping the flag bits of all the data into a binary array, and detecting whether all the flag bits in the array are all 0. If yes, there is no data to be reserved in the set top box, if the array is in the array If there is a flag bit, there is data in the set-top box that needs to be reserved.
  • the data detection module is retained, and when the set top box is upgraded, it is detected whether there is data to be retained in the set top box;
  • the mirror data is written to the module. If there is no data to be retained, the mirrored data is written, and the upgrade data is directly replaced with the data in the set top box.
  • Non-mirrored data is written in the module. If there is data to be retained, it is judged whether the upgrade data exists in the non-mirrored data. If all the data exists in the non-mirrored data, the non-mirrored data is written in the non-mirrored data. The upgrade data replaces the data in the set top box;
  • Reliable data merge write module if not all exist in non-mirrored data, use reliable data merge mode, write the data that needs to be retained in the set top box to the mirror data, replace the same kind of data in the mirror data, and replace the replaced data.
  • the mirrored data is written to the set-top box to replace the data in the set-top box.
  • a flag bit is set in advance for each piece of data, the flag bit is used to indicate whether the data needs to be retained, and the retained data detecting module detects whether there is data to be retained in the set top box according to the flag bit.
  • a flag of 0 indicates that the data does not need to be reserved, and a flag of 1 indicates that the data needs to be retained.
  • the flag bits of all the data are grouped into a binary array, and the reserved data detection module detects whether all the flag bits in the array are all 0. If yes, there is no data to be reserved in the set top box, if the flag in the array If there is a bit, there is data in the set-top box that needs to be reserved.
  • At least one processor and,
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a set top box upgrade data selection method as described above.
  • the embodiment of the present application further provides a non-transitory computer readable storage medium storing computer executable instructions for causing a set top box to execute a set top box as described above Upgrade data selection method.
  • the embodiment of the present application further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instruction is executed by a set top box The set top box is caused to perform the set top box upgrade data selection method as described above.
  • the set top box upgrade data selection method, system and set top box provided by the embodiment of the present application select the mirror data writing mode and the non-mirror according to whether there is data to be retained in the set top box and whether the data to be retained exists in the non-mirrored data.
  • Which of the three methods of data writing and reliable data merging can not only complete the upgrade of the set-top box, but also preserve the data that needs to be retained without being replaced, and the set-top box upgrade does not need to be returned to the factory, greatly reducing
  • the upgrade cost of the set-top box brings great convenience to users.
  • FIG. 1 is a flow chart of a method for selecting a set top box upgrade data in an embodiment
  • FIG. 2 is a structural diagram of a set top box upgrade data selection system in an embodiment
  • FIG. 3 is a schematic diagram showing the hardware structure of a set top box in an embodiment.
  • the upgrade of the set-top box is completed by the Loader program, and the upgrade data image is packaged into an upgrade package, which is placed in a specified directory of the U disk, and is upgraded by manual operation (USB upgrade mode); or the upgrade package is converted into an upgrade stream.
  • the signal line or network cable is upgraded remotely (OTA upgrade mode).
  • the upgrade data is packaged into a file of the upgrade package, such as partition data, software and hardware version information, identification bits, and so on.
  • Upgrade package During the upgrade process, the Loader program will parse the relevant information in the upgrade package for upgrade. In the process of converting the upgrade package into the upgrade stream, the data can be parsed and inserted into the upgrade stream, and the Loader program will parse the relevant data in the upgrade stream for upgrade.
  • the data involved in the set-top box upgrade process is mainly divided into three parts: the mirror data in the upgrade package, the non-mirror data in the upgrade package, and the data in the set-top box.
  • Mirror data is the upgrade data required for the upgrade of the set-top box (the main purpose of the upgrade is to replace the mirrored data with the data in the set-top box);
  • the non-mirrored data is some auxiliary data used for the upgrade, such as partition data, signature data, and set-top box information data. Etc.; the data in the set-top box is the data that was replaced.
  • the Loader program can read both mirrored and non-mirrored data in the upgrade package, as well as data in the set-top box.
  • Mirror data write mode upgrade data will replace the data in the set-top box, and non-mirror data write mode can ensure that some data in the set-top box is not changed, only the data that needs to be changed.
  • there is a lot of data in the mirrored data It is impossible to pack all the mirrored data into non-mirrored data, and the non-mirrored data is generated as independent mirror data. Packing too much mirrored data into non-mirrored data will increase the data. The probability of inconsistency.
  • reliable data combining can be used to read the data to be retained before writing the data to the set top box, replace the same type of data in the mirrored data, and write the replaced data into the set top box.
  • the non-mirror write mode can reduce the upgrade process and shorten the upgrade time; the reliable data merge mode increases the complexity of program processing and increases the upgrade time. Therefore, the method for selecting the upgrade data of the set-top box provided by the present application adopts the non-mirror write mode preferentially under the premise of ensuring the correct data.
  • the reliable data merge mode is adopted, specifically:
  • FIG. 1 is a flowchart of a method for selecting a set top box upgrade data in an embodiment. Referring to FIG. 1, the method includes the following steps:
  • the step further includes: setting a flag bit for each piece of data, the flag bit is used to indicate whether the data needs to be retained, and detecting whether the set top box needs to be retained according to the flag bit. data.
  • a flag of 0 indicates that the data does not need to be reserved, and a flag of 1 indicates that the data needs to be retained.
  • the step further comprises: grouping the flag bits of all the data into a binary array, detecting whether all the flag bits in the array are all 0, and if so, there is no data to be reserved in the set top box, if the flag bit exists in the array 1, there is data in the set-top box that needs to be retained. In this way, as long as the set of flag bits is obtained when the set-top box is upgraded, it is immediately known whether there is data to be retained in the set-top box.
  • the mirror data writing mode is used to directly write the upgrade data into the set-top box, and the upgrade can be completed quickly and accurately.
  • the flag bit array is not all 0, there is 1 indicating that there is data in the set-top box that needs to be reserved. In this case, if the image data write mode is used, the data to be retained will be replaced, and the non-mirror data write mode or reliable data merge will be adopted. This way you can avoid replacing the data you need to keep. First, it is judged whether the upgrade data all exists in the non-mirrored data, that is, whether the upgrade data whose flag bit is 0 data is all present in the non-mirror data.
  • the non-mirrored data write mode is used, and both the upgrade data and the data to be retained are retained.
  • the non-mirrored data write mode cannot be used.
  • the reliable data merge mode is required, and the data to be retained in the set top box is written into the mirror data, and replaced. Mirroring the same kind of data in the data, and then writing the replaced mirrored data into the set-top box by mirroring data writing, thus retaining the data that needs to be retained.
  • the set top box upgrade data selection method selects the mirror data write mode, the non-mirror data write mode, and the reliable data merge mode according to whether there is data to be retained in the set top box and whether the data to be retained exists in the non-mirror data. Which of the three can not only complete the upgrade of the set-top box, but also retain the data that needs to be retained without being replaced.
  • the set-top box upgrade does not need to be returned to the factory, which greatly reduces the upgrade cost of the set-top box and brings the user the use. Great convenience.
  • the embodiment of the present application further provides a set top box upgrade data selection system, as shown in FIG. 2, the system includes:
  • the reserved data detecting module 100 detects whether there is data to be retained in the set top box when the set top box is upgraded.
  • the retained data detecting module 100 When the set-top box is upgraded, in order to avoid replacing the data that needs to be retained, the retained data detecting module 100 first needs to detect the data in the set-top box and whether there is data that needs to be retained.
  • a flag bit is set in advance for each piece of data, the flag bit is used to indicate whether the data needs to be retained, and the retained data detecting module 100 detects whether there is a need to retain in the set top box according to the flag bit. The data.
  • a flag of 0 indicates that the data does not need to be reserved, and a flag of 1 indicates that the data needs to be retained.
  • all the data flag bits are grouped into a binary array, and the reserved data detection module 100 detects whether all the flag bits in the array are all 0. If so, there is no data to be reserved in the set top box, if the flag bit exists in the array 1, there is data in the set-top box that needs to be retained. In this way, as long as the set of flag bits is obtained when the set-top box is upgraded, it is immediately known whether there is data to be retained in the set-top box.
  • the mirror data is written to the module 200. If there is no data to be retained, the mirror data writing mode is adopted, and the upgrade data is directly replaced with the data in the set top box.
  • the mirror data writing mode is used to directly write the upgrade data into the set-top box, and the upgrade can be completed quickly and accurately.
  • the non-mirrored data writing module 300 determines whether the upgrade data exists in the non-mirrored data, and if all of the data exists in the non-mirrored data, the non-mirrored data writing mode is adopted, and the non-mirrored data is used.
  • the upgrade data in the data replaces the data in the set-top box.
  • the non-mirror data writing module 300 first determines whether the upgrade data is all present in the non-mirrored data, that is, whether the upgrade data whose flag is 0 data is all present in the non-mirrored data. If the upgrade data with the flag bit of 0 data exists in the non-mirrored data, the non-mirrored data write mode is used, and both the upgrade data and the data to be retained are retained.
  • the reliable data merge writing module 400 if not all of the non-mirrored data, uses a reliable data merge mode to write the data to be retained in the set top box into the mirror data, replacing the same type of data in the mirror data, and replacing The mirrored data is written to the set-top box to replace the data in the set-top box.
  • the reliable data merge write module 400 uses the reliable data merge mode to write the data to be retained in the set top box.
  • the same type of data in the mirrored data is replaced, and then the replaced mirrored data is written into the set top box by using the mirrored data write mode, which also retains the data that needs to be retained.
  • the set top box upgrade data selection system selects the mirror data writing mode, the non-mirror data writing mode, and the reliable data combining mode according to whether there is data to be retained in the set top box and whether the data to be retained exists in the non-mirrored data. Which of the three can not only complete the upgrade of the set-top box, but also retain the data that needs to be retained without being replaced.
  • the set-top box upgrade does not need to be returned to the factory, which greatly reduces the upgrade cost of the set-top box and brings the user the use. Great convenience.
  • the embodiment of the present application further provides a set top box.
  • the set top box 500 includes:
  • One or more processors 501 and memory 502, one processor 501 is taken as an example in FIG.
  • the processor 501 and the memory 502 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 502 is used as a non-transitory computer readable storage medium, and can be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions corresponding to the set top box upgrade data selection method in the embodiment of the present application.
  • / Module for example, the retained data detecting module 100, the mirrored data writing module 200, the non-mirrored data writing module 300, and the reliable data merge writing module 400 shown in FIG. 2).
  • the processor 501 executes various functional applications and data processing of the set top box upgrade data selection system by running the non-transitory software programs, instructions, and modules stored in the memory 502, that is, implementing the set top box upgrade data selection of any of the foregoing method embodiments. method.
  • the memory 502 can include a storage program area and an storage data area, wherein the storage program area can store an operating system, an application required for at least one function; the storage data area can store data created according to the use of the set top box upgrade data selection system, and the like.
  • memory 502 can include high speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
  • memory 502 can optionally include memory remotely located relative to processor 501, which can be connected to set top box 500 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the one or more modules are stored in the memory 502, and when executed by the one or more processors 501, perform a set top box upgrade data selection method in any of the above method embodiments, for example, performing the above described diagram
  • the method steps S10 to S50 of 1 implement the functions of the modules 100-400 of FIG. 2.
  • the embodiment of the present application further provides a non-transitory computer readable storage medium storing computer executable instructions executed by one or more processors, for example, Executed by a processor 501 in FIG. 3, the one or more processors may be configured to perform the set top box upgrade data selection method in any of the foregoing method embodiments, for example, to perform the method steps S10 to S50 in FIG. 1 described above.
  • the functions of the modules 100-400 in Figure 2 are implemented.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the various embodiments can be implemented by means of software plus a general hardware platform, and of course, by hardware.
  • One of ordinary skill in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program in a computer program product, and the computer program can be stored in a non-transitory computer.
  • the computer program includes program instructions that, when executed by the set top box, cause the set top box to perform the flow of the method embodiments as described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
  • set top box non-transitory computer readable storage medium, and computer program product
  • the method for selecting the upgrade data of the set top box provided by the embodiment of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

本申请涉及一种机顶盒升级数据选择方法、系统及机顶盒,根据机顶盒中是否存在需要保留的数据,以及需要保留的数据是否存在于非镜像数据中,来选择采用镜像数据写入方式、非镜像数据写入方式及可靠数据合并方式三者中哪一种,从而既能很快的完成机顶盒的升级,又能很好的保留需要保留的数据不被替换,机顶盒升级不需要返厂,大大降低机顶盒升级成本,给用户使用带来极大的便利。

Description

一种机顶盒升级数据选择方法、系统及机顶盒
相关申请的交叉参考
本申请要求于2017年03月22日提交中国专利局、申请号为201710175302.6、发明名称为“一种机顶盒升级数据选择方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数字电视领域,尤其涉及一种机顶盒升级数据选择方法、系统及机顶盒。
背景技术
机顶盒的系统及所有数据都存储在Flash中。根据不同的用途Flash被划分为不同的区域,不同区域对应的数据是以镜像的方式被写入。在机顶盒在实际生产过程中,数据存储区域存储的数据不会在同一过程写入,有些数据在烧写镜像过程中写入,有些数据在生产测试过程写入;有些数据会在出厂后写入。
通常,首次提供给用户的机顶盒往往只是初级版本,用户在使用过程中会陆续反馈各种问题或新的需求,需要机顶盒生产商进行修改,并最终通过升级的方式更新到每台机顶盒上,这就需要定期对机顶盒进行升级。
机顶盒升级,一般会将新的系统完全替换老的系统,即将Flash中不同区域对应的镜像替换为最新的镜像,这种升级方式在绝大多数情况下是适用的。但是,在某些特定情况下,机顶盒Flash中某些区域存储的是需要保留的数据,完全替换会将需要保留的数据擦除,机顶盒必须返厂才能恢复需要保留的数据。比如当机顶盒已经生产完成提供给用户后,最新的升级涉及到的数据与写号数据在同一区域中,由于写号数据中包含每台机顶盒的唯一标识,只能在生产过程中写入,如果升级该区域,所有机顶盒的写号数据就会都被擦除,机顶盒需要返厂重新写号才能使用,这就会导致机顶盒升级成本大大增加,也会给用户使用带来极大的不便。
发明内容
有鉴于此,有必要针对上述机顶盒升级新的数据全部替换旧的数据,会擦除需要保留的数据导致机顶盒返厂问题,提供一种机顶盒升级数据选择方法、系统及机顶盒。
本申请实施例提供的一种机顶盒升级数据选择方法,包括如下步骤:
S10:在机顶盒升级时,检测机顶盒中是否有需要保留的数据;
S20:若没有需要保留的数据,则采用镜像数据写入方式,直接将升级数据替换机顶盒中的数据;
S30:若有需要保留的数据,则判断升级数据是否全部存在于非镜像数据中;
S40:若全部存在于非镜像数据中,则采用非镜像数据写入方式,将非镜像数据中的升级数据替换机顶盒中的数据;
S50:若不是全部存在于非镜像数据中,则采用可靠数据合并方式,将机顶盒中需要保留的数据写入镜像数据中,替换掉镜像数据中的同类数据,将替换后的镜像数据写入机顶盒中,替换机顶盒中的数据。
在其中的一个实施方式中,所述步骤S10还包括:对每一项数据设置标志位,标志位用来标示该数据是否需要保留,根据标志位来检测机顶盒中是否有需要保留的数据。
在其中的一个实施方式中,所述步骤S10还包括:标志位为0标示该数据不需要保留,标志位为1则标示该数据需要保留。
在其中的一个实施方式中,所述步骤S10还包括:将所有数据的标志位组成一个二进制数组,检测数组中所有标志位是否全为0,若是则机顶盒中没有需要保留的数据,若数组中标志位存在1,则机顶盒中存在需要保留的数据。
本申请实施例提供的一种机顶盒升级数据选择系统,包括:
保留数据检测模块,在机顶盒升级时,检测机顶盒中是否有需要保留的数据;
镜像数据写入模块,若没有需要保留的数据,则采用镜像数据写入方式,直接将升级数据替换机顶盒中的数据;
非镜像数据写入模块,若有需要保留的数据,则判断升级数据是否全部存在于非镜像数据中,若全部存在于非镜像数据中,则采用非镜像数据写入方式,将非镜像数据中的升级数据替换机顶盒中的数据;
可靠数据合并写入模块,若不是全部存在于非镜像数据中,则采用可靠数据合并方式,将机顶盒中需要保留的数据写入镜像数据中,替换掉镜像数据中的同类数据,将替换后的镜像数据写入机顶盒中,替换机顶盒中的数据。
在其中的一个实施方式中,预先对每一项数据设置标志位,标志位用来标示该数据是否需要保留,保留数据检测模块根据标志位来检测机顶盒中是否有需要保留的数据。
在其中的一个实施方式中,标志位为0标示该数据不需要保留,标志位为1则标示该数据需要保留。
在其中的一个实施方式中,将所有数据的标志位组成一个二进制数组,所述保留数据检测模块检测数组中所有标志位是否全为0,若是则机顶盒中没有需要保留的数据,若数组中标志位存在1,则机顶盒中存在需要保留的数据。
本申请实施例提供的一种机顶盒,包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如上所述的机顶盒升级数据选择方法。
本申请实施例还提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使机顶盒执行如上所述的机顶盒升级数据选择方法。
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被机顶盒执行时,使所述机顶盒执行如上所述的机顶盒升级数据选择方法。
本申请实施例提供的机顶盒升级数据选择方法、系统及机顶盒,根据机顶盒中是否存在需要保留的数据,以及需要保留的数据是否存在于非镜像数据中,来选择采用镜像数据写入方式、非镜像数据写入方式及可靠数据合并方式三者中哪一种,从而既能很快的完成机顶盒的升级,又能很好的保留需要保留的数据不被替换,机顶盒升级不需要返厂,大大降低机顶盒升级成本,给用户使用带来极大的便利。
附图说明
图1是一个实施例中的机顶盒升级数据选择方法的流程图;
图2是一个实施例中的机顶盒升级数据选择系统的结构图;
图3是一个实施例中的机顶盒的硬件结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
机顶盒的升级通过Loader程序来完成,将升级数据镜像打包成一个升级包,放在U盘某个指定目录下,通过手动操作进行升级(USB升级方式);或者将升级包转换成升级流,通过信号线或网线进行远程升级(OTA升级方式)。
镜像打包过程中会将升级数据打包到升级包的某个文件中,如分区数据、软硬件版本信息、标识位等等。升级包在升级的过程中,Loader程序会解析升级包中的相关信息进行升级。升级包转换成升级流的过程中也可以将这些数据解析出来插入升级流中,Loader程序会解析升级流中的相关数据进行升级。
机顶盒升级过程中涉及到的数据主要分为三大部分:升级包中的镜像数据、升级包中的非镜像数据以及机顶盒中的数据。镜像数据是机顶盒升级所需要的升级数据(升级的主要目的就是将镜像数据替换掉机顶盒中的数据);非镜像数据是升级用到的一些辅助数据,如:分区数据、签名数据、机顶盒信息数据等等;机顶盒中的数据是被替换掉的数据。Loader程序既可以读取升级包中的镜像数据和非镜像数据,也可以读取机顶盒中的数据。
镜像数据写入方式升级数据会替换掉机顶盒中的数据,而非镜像数据写入方式可以保证机顶盒中的部分数据不被更改,只更改需要更改的数据。但是,镜像数据中的数据非常多,不可能将所有镜像数据都打包到非镜像数据中,并且非镜像数据是独立镜像数据生成出来,将太多的镜像数据打包到非镜像数据中会增加数据不一致的概率。同时,在需要替换的数据中,最可靠的数据来源于镜像数据;在需要保留的数据中,最可靠的数据来源于机顶盒中的数据。故可以采用可靠数据合并方式,在将数据写入机顶盒之前读取需要保留的数据,替换掉镜像数据中的同类数据,将替换后的数据写入到机顶盒中。
在部分数据需要保留的情况下,非镜像写入方式能够减少升级处理流程,缩短升级时间;可靠数据合并方式增加了程序处理的复杂性,增加了升级时间。故本申请提供的机顶盒升级数据选择方法在保证数据正确的前提下,优先采用非镜像写入方式,当非镜像写入方式不满足条件的时候,再采用可靠数据合并方式,具体的:
如图1所示是一个实施例中的机顶盒升级数据选择方法的流程图,结合图1,该方法包括如下步骤:
S10:在机顶盒升级时,检测机顶盒中是否有需要保留的数据。
在机顶盒升级时,为避免将需要保留的数据替换掉,首先要检测机顶盒中的数据,是否有需要保留的数据。
进一步的,为快速和准确的对数据进行检测,该步骤还包括:对每一项数据设置标志位,标志位用来标示该数据是否需要保留,根据标志位来检测机顶盒中是否有需要保留的数据。
更进一步的,标志位为0标示该数据不需要保留,标志位为1则标示该数据需要保留。
为更加快速的进行检测,该步骤进一步包括:将所有数据的标志位组成一个二进制数组,检测数组中所有标志位是否全为0,若是则机顶盒中没有需要保留的数据,若数组中标志位存在1,则机顶盒中存在需要保留的数据。这样只要在机顶盒升级时获取标志位数组则可立刻知道机顶盒中是否有需要保留的数据。
S20:若没有需要保留的数据,则采用镜像数据写入方式,直接将升级数据替换机顶盒中的数据。
若标志位数组全为0,机顶盒没有需要保留的数据,则采用镜像数据写入方式直接将升级数据写入机顶盒,即可快速准确的完成升级。
S30:若有需要保留的数据,则判断升级数据是否全部存在于非镜像数据中。
若标志位数组不全为0,存在1,则标示机顶盒中有需要保留的数据,此时如果采用镜像数据写入方式会替换掉需要保留的数据,而采用非镜像数据写入方式或者可靠数据合并方式可以避免替换掉需要保留的数据。首先判断升级数据是否全部存在于非镜像数据中,即判断标志位为0数据的升级数据是否全部存在于非镜像数据中。
S40:若全部存在于非镜像数据中,则采用非镜像数据写入方式,将非镜像数据中的升级数据替换机顶盒中的数据。
若标志位为0数据的升级数据全部存在于非镜像数据中,则采用非镜像数据写入方式,既写入升级数据,又保留了需要保留的数据。
S50:若不是全部存在于非镜像数据中,则采用可靠数据合并方式,将机顶盒中需要保留的数据写入镜像数据中,替换掉镜像数据中的同类数据,将替换后的镜像数据写入机顶盒中,替换机顶盒中的数据。
若标志位为0数据的升级数据不全部存在于非镜像数据中,则不能采用非镜像数据写入方式,需要采用可靠数据合并方式,将机顶盒中需要保留的数据写入镜像数据中,替换掉镜像数据中的同类数据,然后再将替换后的镜像数据采用镜像数据写入方式写入机顶盒,这样也保留了需要保留的数据。
该机顶盒升级数据选择方法,根据机顶盒中是否存在需要保留的数据,以及需要保留的数据是否存在于非镜像数据中,来选择采用镜像数据写入方式、非镜像数据写入方式及可靠数据合并方式三者中哪一种,从而既能很快的完成机顶盒的升级,又能很好的保留需要保留的数据不被替换,机顶盒升级不需要返厂,大大降低机顶盒升级成本,给用户使用带来极大的便利。
同时,本申请实施例还提供一种机顶盒升级数据选择系统,如图2所示,该系统包括:
保留数据检测模块100,在机顶盒升级时,检测机顶盒中是否有需要保留的数据。
在机顶盒升级时,为避免将需要保留的数据替换掉,保留数据检测模块100首先要检测机顶盒中的数据,是否有需要保留的数据。
进一步的,为快速和准确的对数据进行检测,预先对每一项数据设置标志位,标志位用来标示该数据是否需要保留,保留数据检测模块100根据标志位来检测机顶盒中是否有需要保留的数据。
更进一步的,标志位为0标示该数据不需要保留,标志为1则标示该数据需要保留。
为更加快速的进行检测,将所有数据的标志位组成一个二进制数组,保留数据检测模块100检测数组中所有标志位是否全为0,若是则机顶盒中没有需要保留的数据,若数组中标志位存在1,则机顶盒中存在需要保留的数据。这样只要在机顶盒升级时获取标志位数组则可立刻知道机顶盒中是否有需要保留的数据。
镜像数据写入模块200,若没有需要保留的数据,则采用镜像数据写入方式,直接将升级数据替换机顶盒中的数据。
若标志位数组全为0,机顶盒没有需要保留的数据,则采用镜像数据写入方式直接将升级数据写入机顶盒,即可快速准确的完成升级。
非镜像数据写入模块300,若有需要保留的数据,则判断升级数据是否全部存在于非镜像数据中,若全部存在于非镜像数据中,则采用非镜像数据写入方式,将非镜像数据中的升级数据替换机顶盒中的数据。
若标志位数组不全为0,存在1,则标示机顶盒中有需要保留的数据,此时如果采用镜像数据写入方式会替换掉需要保留的数据,而采用非镜像数据写入方式或者可靠数据合并方式可以避免替换掉需要保留的数据。非镜像数据写入模块300首先判断升级数据是否全部存在于非镜像数据中,即判断标志位为0数据的升级数据是否全部存在于非镜像数据中。若标志位为0数据的升级数据全部存在于非镜像数据中,则采用非镜像数据写入方式,既写入升级数据,又保留了需要保留的数据。
可靠数据合并写入模块400,若不是全部存在于非镜像数据中,则采用可靠数据合并方式,将机顶盒中需要保留的数据写入镜像数据中,替换掉镜像数据中的同类数据,将替换后的镜像数据写入机顶盒中,替换机顶盒中的数据。
若标志位为0数据的升级数据不全部存在于非镜像数据中,则不能采用非镜像数据写入方式,可靠数据合并写入模块400采用可靠数据合并方式,将机顶盒中需要保留的数据写入镜像数据中,替换掉镜像数据中的同类数据,然后再将替换后的镜像数据采用镜像数据写入方式写入机顶盒,这样也保留了需要保留的数据。
该机顶盒升级数据选择系统,根据机顶盒中是否存在需要保留的数据,以及需要保留的数据是否存在于非镜像数据中,来选择采用镜像数据写入方式、非镜像数据写入方式及可靠数据合并方式三者中哪一种,从而既能很快的完成机顶盒的升级,又能很好的保留需要保留的数据不被替换,机顶盒升级不需要返厂,大大降低机顶盒升级成本,给用户使用带来极大的便利。
此外,本申请实施例还提供了一种机顶盒,如图3所示,该机顶盒500包括:
一个或多个处理器501以及存储器502,图3中以一个处理器501为例。
处理器501和存储器502可以通过总线或者其他方式连接,图3中以通过总线连接为例。
存储器502作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态性计算机可执行程序以及模块,如本申请实施例中的机顶盒升级数据选择方法对应的程序指令/模块(例如,附图2所示的保留数据检测模块100、镜像数据写入模块200、非镜像数据写入模块300以及可靠数据合并写入模块400)。处理器501通过运行存储在存储器502中的非暂态软件程序、指令以及模块,从而执行机顶盒升级数据选择系统的各种功能应用以及数据处理,即实现上述任一方法实施例的机顶盒升级数据选择方法。
存储器502可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据机顶盒升级数据选择系统的使用所创建的数据等。此外,存储器502可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器502可选包括相对于处理器501远程设置的存储器,这些远程存储器可以通过网络连接至机顶盒500。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
所述一个或者多个模块存储在所述存储器502中,当被所述一个或者多个处理器501执行时,执行上述任意方法实施例中的机顶盒升级数据选择方法,例如,执行以上描述的图1中的方法步骤S10至S50,实现图2中的模块100-400的功能。
本申请实施例还提供了一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如,被图3中的一个处理器501执行,可使得上述一个或多个处理器执行上述任意方法实施例中的机顶盒升级数据选择方法,例如,执行以上描述的图1中的方法步骤S10至S50,实现图2中的模块100-400的功能。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
通过以上的实施方式的描述,本领域普通技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程是可以通过计算机程序产品中的计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非暂态计算机可读取存储介质中,该计算机程序包括程序指令,当所述程序指令被机顶盒执行时,可使所述机顶盒执行如上述各方法实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM)或随机存储记忆体(Random Access Memory, RAM)等。
上述产品(机顶盒、非暂态计算机可读存储介质以及计算机程序产品)可执行本申请实施例所提供的机顶盒升级数据选择方法,具备执行机顶盒升级数据选择方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的机顶盒升级数据选择方法。
以上仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本申请的保护范围之内。

Claims (11)

  1. 一种机顶盒升级数据选择方法,其特征在于,包括如下步骤:
    S10:在机顶盒升级时,检测机顶盒中是否有需要保留的数据;
    S20:若没有需要保留的数据,则采用镜像数据写入方式,直接将升级数据替换机顶盒中的数据;
    S30:若有需要保留的数据,则判断升级数据是否全部存在于非镜像数据中;
    S40:若全部存在于非镜像数据中,则采用非镜像数据写入方式,将非镜像数据中的升级数据替换机顶盒中的数据;
    S50:若不是全部存在于非镜像数据中,则采用可靠数据合并方式,将机顶盒中需要保留的数据写入镜像数据中,替换掉镜像数据中的同类数据,将替换后的镜像数据写入机顶盒中,替换机顶盒中的数据。
  2. 根据权利要求1所述的机顶盒升级数据选择方法,其特征在于,所述步骤S10还包括:对每一项数据设置标志位,标志位用来标示该数据是否需要保留,根据标志位来检测机顶盒中是否有需要保留的数据。
  3. 根据权利要求2所述的机顶盒升级数据选择方法,其特征在于,所述步骤S10还包括:标志位为0标示该数据不需要保留,标志位为1则标示该数据需要保留。
  4. 根据权利要求3所述的机顶盒升级数据选择方法,其特征在于,所述步骤S10还包括:将所有数据的标志位组成一个二进制数组,检测数组中所有标志位是否全为0,若是则机顶盒中没有需要保留的数据,若数组中标志位存在1,则机顶盒中存在需要保留的数据。
  5. 一种机顶盒升级数据选择系统,其特征在于,包括:
    保留数据检测模块,在机顶盒升级时,检测机顶盒中是否有需要保留的数据;
    镜像数据写入模块,若没有需要保留的数据,则采用镜像数据写入方式,直接将升级数据替换机顶盒中的数据;
    非镜像数据写入模块,若有需要保留的数据,则判断升级数据是否全部存在于非镜像数据中,若全部存在于非镜像数据中,则采用非镜像数据写入方式,将非镜像数据中的升级数据替换机顶盒中的数据;
    可靠数据合并写入模块,若不是全部存在于非镜像数据中,则采用可靠数据合并方式,将机顶盒中需要保留的数据写入镜像数据中,替换掉镜像数据中的同类数据,将替换后的镜像数据写入机顶盒中,替换机顶盒中的数据。
  6. 根据权利要求5所述的机顶盒升级数据选择系统,其特征在于,预先对每一项数据设置标志位,标志位用来标示该数据是否需要保留,保留数据检测模块根据标志位来检测机顶盒中是否有需要保留的数据。
  7. 根据权利要求6所述的机顶盒升级数据选择系统,其特征在于,标志位为0标示该数据不需要保留,标志位为1则标示该数据需要保留。
  8. 根据权利要求7所述的机顶盒升级数据选择系统,其特征在于,将所有数据的标志位组成一个二进制数组,所述保留数据检测模块检测数组中所有标志位是否全为0,若是则机顶盒中没有需要保留的数据,若数组中标志位存在1,则机顶盒中存在需要保留的数据。
  9. 一种机顶盒,其特征在于,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1-4任一项所述的方法。
  10. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使机顶盒执行如权利要求1-4任一项所述的方法。
  11. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被机顶盒执行时,使所述机顶盒执行如权利要求1-4任一项所述的方法。
PCT/CN2018/074587 2017-03-22 2018-01-30 一种机顶盒升级数据选择方法、系统及机顶盒 WO2018171335A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710175302.6A CN106954098B (zh) 2017-03-22 2017-03-22 一种机顶盒升级数据选择方法及系统
CN201710175302.6 2017-03-22

Publications (1)

Publication Number Publication Date
WO2018171335A1 true WO2018171335A1 (zh) 2018-09-27

Family

ID=59473582

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/074587 WO2018171335A1 (zh) 2017-03-22 2018-01-30 一种机顶盒升级数据选择方法、系统及机顶盒

Country Status (2)

Country Link
CN (1) CN106954098B (zh)
WO (1) WO2018171335A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106954098B (zh) * 2017-03-22 2019-04-09 深圳市九洲电器有限公司 一种机顶盒升级数据选择方法及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436142A (zh) * 2008-12-05 2009-05-20 四川长虹电器股份有限公司 一种机顶盒开机画面更换方法
CN102082966A (zh) * 2010-10-15 2011-06-01 福建新大陆通信科技股份有限公司 一种机顶盒脚本配置升级的方法
CN102253850A (zh) * 2011-07-08 2011-11-23 烽火通信科技股份有限公司 Iptv机顶盒增量式软件升级方法
CN105657552A (zh) * 2015-12-30 2016-06-08 惠州市伟乐科技股份有限公司 一种保留用户配置的机顶盒升级方法
CN106028152A (zh) * 2016-06-13 2016-10-12 天脉聚源(北京)传媒科技有限公司 一种机顶盒操作系统升级方法及装置
CN106954098A (zh) * 2017-03-22 2017-07-14 深圳市九洲电器有限公司 一种机顶盒升级数据选择方法及系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IES61672B2 (en) * 1993-08-09 1994-11-16 Dunbar Limited An integrated electronic parts warehousing and distribution system
JP2002297321A (ja) * 2001-03-30 2002-10-11 Toshiba Corp ディスク装置、データバックアップ方法およびプログラム
CN102110154B (zh) * 2011-02-21 2012-12-26 中国科学院计算技术研究所 一种集群文件系统中文件冗余存储方法
CN103677884B (zh) * 2012-09-21 2017-05-31 华为技术有限公司 flash分区表文件生成及其数据升级方法、装置
CN104317730B (zh) * 2014-10-27 2018-02-06 浪潮(北京)电子信息产业有限公司 一种基于二次分配管理磁盘扩展空间方法及系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436142A (zh) * 2008-12-05 2009-05-20 四川长虹电器股份有限公司 一种机顶盒开机画面更换方法
CN102082966A (zh) * 2010-10-15 2011-06-01 福建新大陆通信科技股份有限公司 一种机顶盒脚本配置升级的方法
CN102253850A (zh) * 2011-07-08 2011-11-23 烽火通信科技股份有限公司 Iptv机顶盒增量式软件升级方法
CN105657552A (zh) * 2015-12-30 2016-06-08 惠州市伟乐科技股份有限公司 一种保留用户配置的机顶盒升级方法
CN106028152A (zh) * 2016-06-13 2016-10-12 天脉聚源(北京)传媒科技有限公司 一种机顶盒操作系统升级方法及装置
CN106954098A (zh) * 2017-03-22 2017-07-14 深圳市九洲电器有限公司 一种机顶盒升级数据选择方法及系统

Also Published As

Publication number Publication date
CN106954098A (zh) 2017-07-14
CN106954098B (zh) 2019-04-09

Similar Documents

Publication Publication Date Title
EP2966566B1 (en) Driver program loading method and embedded device
CN103473067B (zh) 嵌入式Linux分区与数据还原方法、系统及系统开发方法
US8949799B2 (en) Program log record optimization
US20150277897A1 (en) Software upgrade method and system for mobile terminal
JP5575338B2 (ja) 情報処理装置、情報処理方法、およびコンピュータプログラム
CN104750527A (zh) 一种嵌入式系统升级方法及系统
US20140189674A1 (en) Information processing apparatus and information processing method
US20130185484A1 (en) File programming method and associated device for nand flash
US8874519B1 (en) Method and apparatus for restoring a table in a database
US10346150B2 (en) Computerized system and method for patching an application by separating executables and working data using different images
WO2018209958A1 (zh) 可升级文件的升级方法、机顶盒和存储介质
WO2017193885A1 (zh) 一种应用启动方法及装置
CN108509215B (zh) 一种系统软件的更换方法、装置、终端设备及存储介质
US20120303944A1 (en) Data recovering system and method
WO2022148185A1 (zh) 一种数据包更新方法、装置、电子设备及可读存储介质
TW201526007A (zh) Nand快閃記憶體燒錄資料的處理、使用方法及裝置、運行系統
CN108920725B (zh) 一种对象存储的方法及对象存储网关
US20140337301A1 (en) Big data extraction system and method
US9588884B2 (en) Systems and methods for in-place reorganization of device storage
US20080196009A1 (en) Apparatus and method for componentizing legacy system
CN107977222A (zh) 适用于eMMC的升级文件的转换、生成方法及装置
CN110888648A (zh) 一种交互界面生成自定义linux镜像的方法
WO2018171335A1 (zh) 一种机顶盒升级数据选择方法、系统及机顶盒
WO2023169164A1 (zh) 应用程序的修复方法、装置、计算机设备以及存储介质
WO2017076244A1 (zh) 一种动态修复应用程序的方法、装置及相关系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18770453

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18770453

Country of ref document: EP

Kind code of ref document: A1