CN111050218A - Set top box upgrading and checking method, server, set top box and storage medium - Google Patents

Set top box upgrading and checking method, server, set top box and storage medium Download PDF

Info

Publication number
CN111050218A
CN111050218A CN201811184353.6A CN201811184353A CN111050218A CN 111050218 A CN111050218 A CN 111050218A CN 201811184353 A CN201811184353 A CN 201811184353A CN 111050218 A CN111050218 A CN 111050218A
Authority
CN
China
Prior art keywords
check value
top box
data file
upgrade
list
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201811184353.6A
Other languages
Chinese (zh)
Inventor
陈双全
王亮
张琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Otec Technology Co ltd
Original Assignee
Shanghai Otec Technology Co ltd
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 Shanghai Otec Technology Co ltd filed Critical Shanghai Otec Technology Co ltd
Priority to CN201811184353.6A priority Critical patent/CN111050218A/en
Publication of CN111050218A publication Critical patent/CN111050218A/en
Pending legal-status Critical Current

Links

Images

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25808Management of client data
    • H04N21/25858Management of client data involving client software characteristics, e.g. OS identifier
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26291Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for providing content or additional data updates, e.g. updating software modules, stored at the client

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Graphics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a set-top box upgrading and checking method, a server, a set-top box and a storage medium. The invention can shorten the occupied network, memory resource and time when the set-top box is upgraded, and simultaneously provides higher-level security protection.

Description

Set top box upgrading and checking method, server, set top box and storage medium
Technical Field
The invention relates to the technical field of set top box application. In particular to a set-top box upgrading and verifying method, a server, a set-top box and a storage medium.
Background
With the popularization of digital television set-top boxes, the set-top boxes become household appliances essential for daily life of people, and intelligent set-top boxes gradually replace traditional set-top boxes to become mainstream of the market, and conform to the trends of high-definition, networking and intellectualization of televisions. The intelligent set-top box is provided with a full-open platform and is provided with an operating system, so that a user can install and uninstall various application software by himself while enjoying common television content, and multiple functions of watching intelligent television programs, watching live broadcast streaming media and the like are achieved.
Usually, the intelligent set-top box inevitably performs system upgrade in the using process. With the upgrading, optimizing and updating of the system, the upgrading file is also larger and larger from hundreds of MB to 1G; the system upgrade at one time can take a lot of time to download the upgrade package and take a lot of memory space, so that the time spent on upgrading the set-top box is longer.
In addition, as the intelligent set-top box continuously tends to develop into a network, the security problem in the upgrade of the intelligent set-top box also faces a huge risk.
Therefore, there is a need for a system that can reduce the network, memory resources, and time occupied when upgrading a set-top box, while providing a higher level of security protection.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method for upgrading and verifying a set-top box, a server, a set-top box and a storage medium, wherein the set-top box is upgraded by providing set-top box difference data, and performing multiple verification and comparison. Therefore, the problems of large memory amount of upgrading resources, long upgrading time, low security level and the like in the process of upgrading the set top box are solved.
In order to achieve the above and other related objects, the present invention provides a method for upgrading and verifying a set-top box, which is applied to a server, and comprises: generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of a set top box and at least one second data file in an upgrade package of a target version of the set top box; carrying out check coding on each difference data file, generating an original check value corresponding to each difference data file, and recording each original check value in an original check value list; and sending a difference upgrading packet containing the at least one difference data file and the original check value list to the set top box so as to be downloaded and upgraded by the set top box.
In an embodiment of the present invention, the generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of a set top box and at least one second data file in an upgrade package of a target version of the set top box includes: acquiring at least one first data file in an upgrade package of a current version of a set top box and at least one second data file in an upgrade package of a target version of the set top box; comparing the difference data between at least one first data file in the upgrade package of the current version of the set top box and at least one second data file in the upgrade package of the target version; and generating at least one difference data file according to the difference data.
In an embodiment of the present invention, the method further includes: and carrying out check coding on the original check value list to generate an original list check value, and placing the original list check value in the delta upgrade package or independently sending the original list check value to the set top box.
In an embodiment of the present invention, the method for checking the code includes: any one or more of MD5 check coding, parity coding, CRC coding, and BCC XOR coding.
In order to achieve the above and other related objects, the present invention provides a method for upgrading and verifying a set-top box, which is applied to the set-top box, and comprises: downloading a difference upgrading packet sent by a server; the delta upgrade package comprises: generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of the set top box and at least one second data file in an upgrade package of a target version of the set top box, and an original check value list containing corresponding original check values generated corresponding to each difference data file; carrying out check coding on each difference data file, generating a local check value corresponding to each difference data file, and recording each local check value in a local check value list; performing a first comparison between the check value list and the local check value list; under the condition that the first comparison is consistent, locally upgrading the difference data files corresponding to the original check value or the local check value; checking and coding each upgraded difference data file, generating an upgrade check value corresponding to each upgraded difference data file, and recording each upgrade check value in an upgrade check value list; performing a second comparison on the check value list and the upgrade check value list; under the condition that the second comparison is consistent, prompting that the upgrade is successful; if the second comparison is inconsistent, prompting that the upgrade fails; and under the condition that the first comparison is inconsistent, prompting that the upgrade fails.
In an embodiment of the present invention, after the delta upgrade package sent by the download server, and before the performing check coding on each of the delta data files and generating a local check value corresponding to the delta data file, the method further includes: carrying out check coding on an original check value list in the differential upgrade package and generating a local list check value; reading an original list check value in the delta upgrade package, or downloading and reading the original list check value sent by the server; generating the original list of the check values of the original list corresponding to the original list of the check values; comparing the local list check value with the original list check value; and under the condition that the list check values are consistent in comparison, performing check coding on each difference data file in the difference upgrading packet and generating a local check value corresponding to each difference data file.
In an embodiment of the present invention, the method for checking the code includes: any one or more of MD5 check coding, parity coding, CRC coding, and BCC XOR coding.
In an embodiment of the present invention, the contents of the first comparison and the second comparison include: a check value number, and a check value item number.
To achieve the above and other related objects, the present invention provides a computer-readable storage medium having a set-top box upgrade and verification program stored thereon, the program, when executed by a processor, implementing any one of the set-top box upgrade and verification methods applied to a server; or, the set-top box upgrading and checking program is stored on the device, and when the program is executed by the processor, the set-top box upgrading and checking method applied to the set-top box is realized.
To achieve the above and other related objects, the present invention provides a data transmission apparatus, comprising: the processing module is used for generating at least one difference data file according to difference data between at least one first data file in the upgrade package of the current version of the set top box and at least one second data file in the upgrade package of the target version of the set top box; carrying out check coding on each difference data file, generating an original check value corresponding to each difference data file, and recording each original check value in an original check value list; a sending module, configured to send a delta upgrade package including the at least one delta data file and the original check value list, so that the set-top box can download and upgrade the delta upgrade package; and/or sending check coding to the original check value list to generate an original list check value.
To achieve the above and other related objects, the present invention provides a data receiving apparatus, comprising: the receiving module is used for downloading the difference upgrading packet; the delta upgrade package comprises: generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of the set top box and at least one second data file in an upgrade package of a target version of the set top box, and an original check value list containing corresponding original check values generated corresponding to each difference data file; and/or, downloading the original list check value; the original list check value is generated corresponding to an original check value list; the processing module is used for carrying out check coding on each difference data file, generating a local check value corresponding to each difference data file, and recording each local check value in a local check value list; performing a first comparison between the check value list and the local check value list; under the condition that the first comparison is consistent, locally upgrading the difference data files corresponding to the original check value or the local check value; checking and coding each upgraded difference data file, generating an upgrade check value corresponding to each upgraded difference data file, and recording each upgrade check value in an upgrade check value list; performing a second comparison on the check value list and the upgrade check value list; under the condition that the second comparison is consistent, prompting that the upgrade is successful; if the second comparison is inconsistent, prompting that the upgrade fails; under the condition that the first comparison is inconsistent, prompting that the upgrade fails; and/or, checking and coding each upgraded difference data file, generating an upgrade check value corresponding to each upgraded difference data file, and recording each upgrade check value in an upgrade check value list; and carrying out second comparison on the check value list and the upgrading check value list. To achieve the above and other related objects, the present invention provides a server comprising: the processor is used for executing the set-top box upgrading and verifying program stored in the memory; a memory on which a set-top box upgrade and verification program is stored, the program implementing any one of the set-top box upgrade and verification methods applied to the server when executed by the processor; and the communicator is used for connecting external equipment in a communication mode.
To achieve the above and other related objects, the present invention provides a set top box, comprising: the processor is used for executing the set-top box upgrading and verifying program stored in the memory; and the memory is used for storing a set-top box upgrading and checking program, and the program realizes any set-top box upgrading and checking method applied to the set-top box when being executed by the processor.
To achieve the above and other related objects, the present invention provides a set-top box upgrade system, including: the server as described above, and the set-top box as described above; the server is in communication connection with the set top box.
As described above, the set-top box upgrading and verifying method, the server, the set-top box and the storage medium provided by the invention provide the set-top box difference upgrading data and perform multiple verification and comparison. Compared with the prior art, the method has the following beneficial effects:
the method and the device can shorten occupied network and memory resources and time when the set top box is upgraded, and provide higher-level security protection.
Drawings
Fig. 1 is a schematic view of a scenario of a set-top box upgrade system according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a set-top box upgrading and verifying method applied to a server according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating a set-top box upgrading and verifying method applied to a set-top box according to an embodiment of the present invention.
Fig. 4 is a block diagram of a data transmission device according to an embodiment of the invention.
Fig. 5 is a block diagram of a data receiving device according to an embodiment of the invention.
Fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a set-top box according to an embodiment of the invention.
Fig. 8 is a schematic structural diagram of a set-top box upgrade system according to an embodiment of the present invention.
Description of the element reference numerals
101 server
102 set-top box
Method steps S201 to S203
Method steps S301-S308
401 processing module
402 sending module
501 receiving module
502 processing module
601 memory
602 processor
603 communicator
701 memory
702 processor
703 communicator
801 server
802 set-top box
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
Fig. 1 shows a scene diagram of a set-top box upgrading and verifying method according to an embodiment of the present invention. As shown, the server 101 and the set-top box 102 are included in the scenario.
In a scenario of an embodiment of the present invention, the server 101 sends a difference upgrade package which is obtained by processing the set-top box upgrade and verification method applied to the server and is directed to the set-top box 102, and the set-top box 102 performs processing of the set-top box upgrade and verification method applied to the set-top box after receiving the difference upgrade package, so as to complete upgrade.
Fig. 2 is a schematic flow chart showing a set-top box upgrading and verifying method applied to a server according to an embodiment of the present invention. As shown, the method comprises:
step S201: generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of a set top box and at least one second data file in an upgrade package of a target version of the set top box;
in an embodiment of the present invention, the information of the current version of a set top box needs to be known in advance according to the current version of the set top box. In an embodiment of the present invention, the information obtaining manner may be obtained by obtaining information of an upgrade package that is sent to the set top box by the server last time, or by sending the current version information while the set top box sends an upgrade request to the server, or by obtaining the information in any other process of performing communication interaction between the set top box and the server. Based on the above idea, those skilled in the art can conceive that any other way that the server can obtain the current version information of the set-top box in advance is within the scope of the present invention.
In an embodiment of the present invention, the generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of a set top box and at least one second data file in an upgrade package of a target version of the set top box includes: acquiring at least one first data file in an upgrade package of a current version of a set top box and at least one second data file in an upgrade package of a target version of the set top box; comparing the difference data between at least one first data file in the upgrade package of the current version of the set top box and at least one second data file in the upgrade package of the target version; and generating at least one difference data file according to the difference data.
In an embodiment of the present invention, the server stores multiple versions of upgrade packages.
In an embodiment of the present invention, the server stores all versions of the upgrade package from the original version to the latest version.
In another embodiment of the present invention, the server may further store therein an upgrade package from a lowest version of all set top boxes communicatively interacting with the server to all versions of the lowest version.
For example, if 1 to N set-top boxes are connected to the server, or the server is only responsible for the upgrade service of 1 to N set-top boxes, the server correspondingly connected to the 1 to N set-top boxes only needs to store the upgrade packages of all versions from the lowest version to the latest version of the 1 to N set-top boxes. If the lowest version of the 1-N set-top boxes is 2017, the server can only reserve the upgrade packages of all versions of the 1-N set-top boxes so far in 2017, so that unnecessary storage space is reduced.
In another embodiment of the present invention, at least one first data file in the upgrade package of the current version of the set-top box and at least one second data file in the upgrade package of the target version of the set-top box may be directly obtained from a re-system upgrade database. Or generating an upgrade data file by compiling the server according to the known version information.
In an embodiment of the present invention, the difference data refers to different data in the upgrade package of the current version and the upgrade package of the target version, that is, difference data in the upgrade packages of the two versions. The comparison may be performed according to one or more combination of data file name, format, memory size, and content to select the difference data to form a difference data file.
For example, if an upgrade package of the current version of a set-top box includes A, B, C three data files, and an upgrade package of the target version or the latest version of the set-top box includes A, B, C, D, E, F six data files, the comparison shows that the D, E, F data files are different, and the difference data file is D, E, F.
In an embodiment of the present invention, the server may store a delta upgrade package between a plurality of different versions.
In an embodiment of the present invention, the server may store a difference data file between any lower version and any higher version.
For example, assuming that the original version is the 2010 version and the latest version is the 2018 version, the server may store a difference data file between the version of any one year in the 2017 year and the version of the 2018 year, or between any one year in the years 2010-2011-2018, or between the year N and the year M as 2010< N < M < 2018.
In another embodiment of the present invention, the server may further store therein a difference data file between a lowest version and a higher version of all set-top boxes communicatively interacting with the server.
For example, if 1 to N set-top boxes are connected to the server, or the server is only responsible for upgrading services of 1 to N set-top boxes, the server correspondingly connected to the 1 to N set-top boxes only needs to store the difference data file between the lowest version and the higher version of the 1 to N set-top boxes, and if the lowest version of the 1 to N set-top boxes is 2013, the server may only reserve the difference data file between the versions in 2013 and 2014 to 2018, so as to reduce unnecessary storage space.
Step S202: carrying out check coding on each difference data file, generating an original check value corresponding to each difference data file, and recording each original check value in an original check value list;
in an embodiment of the present invention, the method for checking the code includes: any one or more of MD5 check coding, parity coding, CRC coding, and BCC XOR coding.
In one embodiment of the present invention, MD5 check coding is preferred. MD5 is called Message Digest Algorithm (english: MD5Message-Digest Algorithm), a widely used cryptographic hash function that can generate a 128-bit (16-byte) hash value to ensure the integrity of the information transmission. MD5 processes incoming information in 512-bit packets, each of which is divided into 16 32-bit sub-packets, and after a series of processing, the output of the algorithm consists of four 32-bit packets, which are concatenated to produce a 128-bit hash value. MD5 is a one-way operation that translates a data string of arbitrary length into a short fixed-length value. Any two strings should not have the same hash value. MD5 checks the correctness of data by performing a hash operation on the received transmission data. The calculated hash value is compared with the hash value transmitted with the data. If the two values are the same, the transmitted data is complete and has not been tampered, so that the use can be assured. MD5 verification may be applied in a number of fields, such as verification of confidential information, verification of downloaded files, encryption of plaintext passwords, etc.
For example, if a file is verified by using the MD5, a file with a verification value is transmitted while the file is transmitted, after the file is locally obtained, the MD5 operation is performed on the file again, and the obtained calculation result is compared with the verification value of the file with the verification value, if the calculation result is consistent with the verification value of the file with the verification value, the transmitted file is considered to have no error, otherwise, the file is considered to have an error.
In an embodiment of the present invention, the check encoding process is capable of generating, for each of the difference data files, a check value including the hash value of the difference data file and a unique check code corresponding to the hash value.
In an embodiment of the invention, verification at different stages or for multiple times can be realized by comparing the verification values, and the safety protection of the differential data file in the whole upgrading process is greatly enhanced.
Step S203: and sending a difference upgrading packet containing the at least one difference data file and the original check value list to the set top box so as to be downloaded and upgraded by the set top box.
In an embodiment of the present invention, the delta upgrade package is compressed and sent to the set top box, so as to reduce an occupied memory during transmission or downloading. Correspondingly, the delta upgrade package is obtained by decompressing after the set top box downloads.
In an embodiment of the present invention, the method further includes: and carrying out check coding on the original check value list to generate an original list check value, and placing the original list check value in the delta upgrade package or independently sending the original list check value to the set top box.
In an embodiment of the present invention, by adding a check code to the original check value list and generating an original list check value, it can be avoided that the original check value list is tampered during transmission or downloading, and a virus or garbage data file corresponding to the tampered list is downloaded.
In an embodiment of the invention, the original list check value may be put into the delta upgrade package together with the at least one difference data file and the original check value list, or may be sent separately.
In an embodiment of the present invention, the original list check value may be sent directly or through a compression method when being sent separately. And if the verification value is sent to the set top box in a compression mode, the set top box needs to decompress the verification value after downloading so as to obtain the original list verification value.
Fig. 3 is a schematic flow chart showing a set-top box upgrading and verifying method applied to a set-top box according to an embodiment of the present invention. As shown, the method comprises:
step S301: downloading a difference upgrading packet sent by the server; the delta upgrade package comprises: generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of the set top box and at least one second data file in an upgrade package of a target version of the set top box, and an original check value list containing corresponding original check values generated corresponding to each difference data file;
in an embodiment of the present invention, the delta upgrade package corresponds to the delta upgrade package formed in the processing manner of the set top box upgrade and verification method applied to the server as shown in fig. 2. The difference data files and the original check value list as described in fig. 2 are obtained by downloading.
In an embodiment of the present invention, if the received delta upgrade packet is sent by a compression method, decompression is required.
In an embodiment of the present invention, after the downloading and decompressing the delta upgrade package sent by the server, and before the performing check coding on each of the delta data files and generating a local check value corresponding to the delta data file, the method further includes: carrying out check coding on an original check value list in the differential upgrade package and generating a local list check value; reading an original list check value in the delta upgrade package, or downloading and reading the original list check value sent by the server; the original list check value is generated corresponding to an original check value list; comparing the local list check value with the original list check value; and under the condition that the list check values are consistent in comparison, performing check coding on each difference data file in the difference upgrading packet and generating a local check value corresponding to each difference data file.
In an embodiment of the invention, if the original list parity can be put into the delta upgrade package together with the at least one difference data file and the original parity list, or sent separately.
In an embodiment of the present invention, if the original list check value is separately transmitted in a compression manner, the set top box needs to decompress after downloading.
For example, the difference data file a sent by the server is packaged with the original check value list L, and the original list check value X1 corresponding to the original check value list L is additionally packaged and sent. After the set-top box receives the two packaged files respectively, reading the difference data file A and the original check value list L respectively, then carrying out check coding on the original check value list L to obtain a corresponding local list check value X2, comparing whether the X2 is consistent with the X1, and if so, continuing the subsequent process. Otherwise, the original check value list L is considered to be in error, and the corresponding difference data file a does not need to be subjected to check coding.
In an embodiment of the present invention, by adding a check code to the original check value list and comparing the check code with the check value of the original list, it can be avoided that the original check value list is tampered during transmission or downloading, and a virus or garbage data file corresponding to the tampered list is downloaded.
Step S302: carrying out check coding on each difference data file, generating a local check value corresponding to each difference data file, and recording each local check value in a local check value list;
in an embodiment of the present invention, each downloaded difference data file is re-check-encoded in the set-top box, and a local check value corresponding to the difference data file is obtained, and a local check value list is further obtained, so that the subsequent comparison and check are performed with the original check value list obtained by downloading.
In an embodiment of the present invention, the check encoding of each difference data file may be implemented by setting a check encoder in the set top box.
In an embodiment of the present invention, the content or manner of the check code is the same as the content or manner of the check code shown in fig. 2, and therefore, the description thereof is omitted here.
Step S303: performing a first comparison between the check value list and the local check value list;
in an embodiment of the present invention, the contents of the first comparison and the second comparison include: a check value number, and a check value item number.
In an embodiment of the present invention, a 128-bit (16-byte) unique check value is generated for each of the difference data files, and the difference data files are compared with the check value values to verify whether they are consistent, so as to prevent the contents of the difference data files from being tampered or lost. In addition, the number of the check value items is compared to ensure that the downloaded data file is not lost, so that the downloaded difference data file can be ensured to be correct.
Step S304: under the condition that the first comparison is consistent, locally upgrading the difference data files corresponding to the original check value or the local check value;
in an embodiment of the present invention, after the difference data file is verified to be consistent, the upgrade may be performed in the set-top box system by a patch method or other upgrade methods.
In an embodiment of the present invention, by comparing the steps, the security of the updated difference data file is greatly increased.
Step S305: checking and coding each upgraded difference data file, generating an upgrade check value corresponding to each upgraded difference data file, and recording each upgrade check value in an upgrade check value list;
in an embodiment of the present invention, the upgrade difference data file may be understood as a difference data file that has been loaded to the set-top box system. Due to the unexpected situations such as packet loss or interruption in the upgrading or loading process, verification is necessary after upgrading is completed to ensure successful downloading.
In an embodiment of the invention, the checking and encoding for the upgraded difference data file is performed when the first comparison is consistent.
Step S306: performing a second comparison on the check value list and the upgrade check value list; under the condition that the second comparison is consistent, prompting that the upgrade is successful;
step S307: if the second comparison is inconsistent, prompting that the upgrade fails;
step S308: and under the condition that the first comparison is inconsistent, prompting that the upgrade fails.
In an embodiment of the present invention, the upgrade process is determined to be successful only when the first comparison and the second comparison are consistent, otherwise, the upgrade process is considered to be failed.
In an embodiment of the present invention, the success or failure of the upgrade may be notified to the user by obtaining information of the comparison result and outputting relevant information by the set-top box system.
In an embodiment of the invention, by verifying the upgraded difference data file again, the security in the upgrading process is enhanced on the basis of the original security, so that 3 verification comparison processes are accumulated in the whole upgrading process, and the security in the set top box upgrading process is greatly improved.
To achieve the above and other related objects, the present invention provides a computer-readable storage medium having a set-top box upgrade and verification program stored thereon, the program, when executed by a processor, implementing any one of the set-top box upgrade and verification methods applied to a server; or, the set-top box upgrading and checking program is stored on the device, and when the program is executed by the processor, the set-top box upgrading and checking method applied to the set-top box is realized.
The computer-readable storage medium, as will be appreciated by one of ordinary skill in the art: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned image processing program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Fig. 4 is a block diagram of a data transmission device according to an embodiment of the invention. As shown, it includes: a processing module 401 and a sending module 402.
In an embodiment of the invention, the processing module 401 is configured to execute the steps S201 and S202 as described in fig. 2. The sending module 402 is configured to execute step S203 as described in fig. 2, and send check coding to the original check value list to generate an original list check value.
Please further refer to fig. 5, which shows a block diagram of a data receiving device according to an embodiment of the present invention. The data receiving device comprises a receiving module 501 and a processing module 502. The receiving module 501 is configured to receive data sent by the data sending apparatus, and the processing module 502 is configured to process the received data.
In an embodiment of the present invention, the receiving module 501 is configured to execute step S301 as described in fig. 3, and/or is configured to download the original list check value; the original list check value is generated corresponding to the original check value list. The processing module 502 is configured to execute steps S302 to S308 as described in fig. 3, perform verification coding on each upgraded difference data file, generate an upgrade check value corresponding to each upgraded difference data file, and record each upgrade check value in an upgrade check value list; and carrying out second comparison on the check value list and the upgrading check value list.
In an embodiment of the present invention, it should be understood that the division of the modules of the data sending device and the data receiving device is only a division of logical functions, and the implementation may be implemented by wholly or partially integrating into one physical entity, or by physically separating. And the modules can be realized in the form of software called by a processor; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling by a processor through software, and part of the modules can be realized in the form of hardware. For example, the processing module 401 or the processing module 502 may be implemented by being integrated into a chip on the data transmitting apparatus or the data receiving apparatus, or may be stored in a memory of the data transmitting apparatus or the data receiving apparatus in the form of a program, and the function of the processing module may be called and executed by a processor of the data transmitting apparatus or the data receiving apparatus. Other modules are implemented similarly. In addition, all or part of the modules of the data transmitting device or the data receiving device may be integrated together, or may be implemented independently. The processor described herein may be an integrated circuit having signal processing capabilities. In the implementation process, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
For example, the above processing module 401 or processing module 502 may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a processor scheduler, the processor may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling programs. As another example, these modules may be integrated together, implemented in the form of a system-on-a-chip (SOC).
Fig. 6 is a schematic structural diagram of a server according to an embodiment of the invention. As shown, the server includes: a processor 602, configured to execute the set-top box upgrade and verification program stored in the memory 601; a memory 601 on which a set-top box upgrade and verification program is stored, which when executed by the processor 602 implements the set-top box upgrade and verification method as described in fig. 2; a communicator 603 for communicatively connecting an external device.
In one embodiment of the present invention, the processor 602 is communicatively connected to the memory 601 and the processor 602.
The communicator 603 is used for implementing communication connection between the database access device and other devices (such as a client, a read-write library and a read-only library). The communicator 603 may include one or more sets of modules of different communication means, for example, a CAN communication module communicatively connected to a CAN bus. The communication connection may be one or more wired/wireless communication means and combinations thereof. The communication method comprises the following steps: any one or more of the internet, CAN, intranet, Wide Area Network (WAN), Local Area Network (LAN), wireless network, Digital Subscriber Line (DSL) network, frame relay network, Asynchronous Transfer Mode (ATM) network, Virtual Private Network (VPN), and/or any other suitable communication network. For example: any one or a plurality of combinations of WIFI, Bluetooth, NFC, GPRS, GSM and Ethernet.
The memory 601 may include a Random Access Memory (RAM), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 602 may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the integrated circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components.
Fig. 7 is a schematic structural diagram of a set-top box according to an embodiment of the invention. As shown, the server includes: a processor 702, configured to execute the set-top box upgrade and verification program stored in the memory 701; a memory 701 on which a set-top box upgrade and verification program is stored, which when executed by the processor 502 implements the set-top box upgrade and verification method as described in fig. 3.
In an embodiment of the present invention, the memory 701, the processor 702, and the communicator 703 are the same as those described in fig. 6, and thus are not described herein again.
Fig. 8 is a schematic structural diagram of a set-top box upgrade system according to an embodiment of the present invention. As shown in the figure, the set-top box upgrading system includes: a server 801, and a set-top box 802. The server 801 may be the server 601 as described in fig. 6, and the set-top box 802 may be the set-top box 702 as described in fig. 7. The server 801 is communicatively connected to the set top box 802.
In an embodiment of the present invention, the server 801 generates a delta upgrade package by processing through the set-top box upgrade and verification method as described in fig. 2, and sends the delta upgrade package to the set-top box 802. The set-top box 802 is downloaded and processed by the set-top box upgrade and verification method as described in fig. 3, so that the set-top box 802 can safely complete the upgrade.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
In summary, the set top box upgrading and verifying method, the server, the set top box and the storage medium provided by the invention provide the set top box difference upgrading data and perform multiple verification and comparison. Therefore, the problems of large memory amount of upgrading resources, long upgrading time, low security level and the like in the process of upgrading the set top box are solved.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (14)

1. A set top box upgrading and checking method is applied to a server and comprises the following steps:
generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of a set top box and at least one second data file in an upgrade package of a target version of the set top box;
carrying out check coding on each difference data file, generating an original check value corresponding to each difference data file, and recording each original check value in an original check value list;
and sending a difference upgrading packet containing the at least one difference data file and the original check value list to the set top box so as to be downloaded and upgraded by the set top box.
2. The set-top box upgrading and verifying method of claim 1, wherein the generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of the set-top box and at least one second data file in an upgrade package of a target version comprises:
acquiring at least one first data file in an upgrade package of a current version of a set top box and at least one second data file in an upgrade package of a target version of the set top box;
comparing the difference data between at least one first data file in the upgrade package of the current version of the set top box and at least one second data file in the upgrade package of the target version;
and generating at least one difference data file according to the difference data.
3. The set-top box upgrading and verifying method according to claim 1, further comprising: and carrying out check coding on the original check value list to generate an original list check value, and placing the original list check value in the delta upgrade package or independently sending the original list check value to the set top box.
4. The set-top box upgrading and verifying method of claim 1, wherein the method for verifying the codes comprises: any one or more of MD5 check coding, parity coding, CRC coding, and BCC XOR coding.
5. A set top box upgrading and checking method is applied to a set top box and comprises the following steps:
downloading a difference upgrading packet sent by a server; the delta upgrade package comprises: generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of the set top box and at least one second data file in an upgrade package of a target version of the set top box, and an original check value list containing corresponding original check values generated corresponding to each difference data file;
carrying out check coding on each difference data file, generating a local check value corresponding to each difference data file, and recording each local check value in a local check value list;
performing a first comparison between the check value list and the local check value list;
under the condition that the first comparison is consistent, locally upgrading the difference data files corresponding to the original check value or the local check value;
checking and coding each upgraded difference data file, generating an upgrade check value corresponding to each upgraded difference data file, and recording each upgrade check value in an upgrade check value list;
performing a second comparison on the check value list and the upgrade check value list;
under the condition that the second comparison is consistent, prompting that the upgrade is successful; if the second comparison is inconsistent, prompting that the upgrade fails;
and under the condition that the first comparison is inconsistent, prompting that the upgrade fails.
6. The method for upgrading and verifying the set-top box according to claim 5, wherein after the delta upgrade package is sent by the download server, and before the verification coding is performed on each of the delta data files and a local verification value corresponding to each of the delta data files is generated, the method further comprises:
carrying out check coding on an original check value list in the differential upgrade package and generating a local list check value;
reading an original list check value in the delta upgrade package, or downloading and reading the original list check value sent by the server; the original list check value is generated corresponding to an original check value list;
comparing the local list check value with the original list check value;
and under the condition that the list check values are consistent in comparison, performing check coding on each difference data file in the difference upgrading packet and generating a local check value corresponding to each difference data file.
7. The set-top box upgrading and verifying method of claim 5, wherein the method for verifying the codes comprises: any one or more of MD5 check coding, parity coding, CRC coding, and BCC XOR coding.
8. The set-top box upgrading and verifying method of claim 5, wherein the contents of the first comparison and the second comparison comprise: a check value number, and a check value item number.
9. A computer-readable storage medium, on which a set-top box upgrade and verification program is stored, which, when executed by a processor, implements the set-top box upgrade and verification method of any one of claims 1 to 4; or, a set-top box upgrade and verification program stored thereon, which when executed by a processor implements the set-top box upgrade and verification method of any one of claims 5 to 8.
10. A data transmission apparatus, comprising:
the processing module is used for generating at least one difference data file according to difference data between at least one first data file in the upgrade package of the current version of the set top box and at least one second data file in the upgrade package of the target version of the set top box; carrying out check coding on each difference data file, generating an original check value corresponding to each difference data file, and recording each original check value in an original check value list;
a sending module, configured to send a delta upgrade package including the at least one delta data file and the original check value list, so that the set-top box can download and upgrade the delta upgrade package; and/or sending check coding to the original check value list to generate an original list check value.
11. A data receiving device, comprising:
the receiving module is used for downloading the difference upgrading packet; the delta upgrade package comprises: generating at least one difference data file according to difference data between at least one first data file in an upgrade package of a current version of the set top box and at least one second data file in an upgrade package of a target version of the set top box, and an original check value list containing corresponding original check values generated corresponding to each difference data file; and/or, downloading the original list check value; the original list check value is generated corresponding to an original check value list;
the processing module is used for carrying out check coding on each difference data file, generating a local check value corresponding to each difference data file, and recording each local check value in a local check value list; performing a first comparison between the check value list and the local check value list; under the condition that the first comparison is consistent, locally upgrading the difference data files corresponding to the original check value or the local check value; checking and coding each upgraded difference data file, generating an upgrade check value corresponding to each upgraded difference data file, and recording each upgrade check value in an upgrade check value list; performing a second comparison on the check value list and the upgrade check value list; under the condition that the second comparison is consistent, prompting that the upgrade is successful; if the second comparison is inconsistent, prompting that the upgrade fails; under the condition that the first comparison is inconsistent, prompting that the upgrade fails; and/or, checking and coding each upgraded difference data file, generating an upgrade check value corresponding to each upgraded difference data file, and recording each upgrade check value in an upgrade check value list; and carrying out second comparison on the check value list and the upgrading check value list.
12. A server, comprising: the processor is used for executing the set-top box upgrading and verifying program stored in the memory;
a memory on which a set-top box upgrade and verification program is stored, the program, when executed by the processor, implementing the set-top box upgrade and verification method of any one of claims 1 to 4; and the communicator is used for connecting external equipment in a communication mode.
13. A set top box, comprising: the processor is used for executing the set-top box upgrading and verifying program stored in the memory;
a memory having a set-top box upgrade and verification program stored thereon, which when executed by the processor implements the set-top box upgrade and verification method of any one of claims 5 to 8.
14. A set-top box upgrade system, comprising: the server of claim 12, and the set-top box of claim 13; the server is in communication connection with the set top box.
CN201811184353.6A 2018-10-11 2018-10-11 Set top box upgrading and checking method, server, set top box and storage medium Pending CN111050218A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811184353.6A CN111050218A (en) 2018-10-11 2018-10-11 Set top box upgrading and checking method, server, set top box and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811184353.6A CN111050218A (en) 2018-10-11 2018-10-11 Set top box upgrading and checking method, server, set top box and storage medium

Publications (1)

Publication Number Publication Date
CN111050218A true CN111050218A (en) 2020-04-21

Family

ID=70229162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811184353.6A Pending CN111050218A (en) 2018-10-11 2018-10-11 Set top box upgrading and checking method, server, set top box and storage medium

Country Status (1)

Country Link
CN (1) CN111050218A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113905263A (en) * 2021-10-28 2022-01-07 深圳小湃科技有限公司 Set top box control method, set top box control equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113905263A (en) * 2021-10-28 2022-01-07 深圳小湃科技有限公司 Set top box control method, set top box control equipment and storage medium
CN113905263B (en) * 2021-10-28 2024-03-26 深圳小湃科技有限公司 Set top box control method, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112837160B (en) Block chain-based cross-chain transaction method and device and computer-readable storage medium
US9253234B2 (en) Method and apparatus for providing enhanced streaming content delivery with multi-archive support using secure download manager and content-indifferent decoding
CN108683502B (en) Digital signature verification method, medium and equipment
CN106453474A (en) Network transfer of large files in unstable network environments
US8549165B2 (en) Processing devices and methods for transmitting and receiving data
CN108431819B (en) Method and system for protecting client access to service of DRM agent of video player
US20130311765A1 (en) Information processing apparatus, data generation method, information processing method, and information processing system
CN111045722B (en) Intelligent contract packaging method, device, system, computer equipment and storage medium
CN112328565A (en) Resource sharing method and device based on block chain
CN113051622B (en) Index construction method, device, equipment and storage medium
CN111050218A (en) Set top box upgrading and checking method, server, set top box and storage medium
CN111865557A (en) Check code generation method and device
CN116488818A (en) Block chain-based data processing method, device, equipment and readable storage medium
CN107145342B (en) Method and device for processing channel information of application
US20210344480A1 (en) Install time creation of forward error correction data and integrity checksums
CN112311528A (en) Data secure transmission method based on state cryptographic algorithm
US12061728B2 (en) Content distribution integrity control
CN113609215A (en) Data processing method, device, equipment and computer readable storage medium
CN113536309A (en) Software integrity detection method and device, electronic device and storage medium
CN110780881A (en) Software package manufacturing method and device and electronic equipment
CN114679466B (en) Consensus processing method, device, computer equipment and medium for block chain network
CN116541046B (en) Energy storage system upgrading method and device, computer equipment and readable storage medium
CN117032727B (en) File compiling method, device, equipment, medium and product based on block chain
CN113722015B (en) Method and device for acquiring combined component and storage medium
CN111600846B (en) Recovery method and recovery system of gateway equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200421