CN109151590B - Bidirectional digital television upgrading method - Google Patents

Bidirectional digital television upgrading method Download PDF

Info

Publication number
CN109151590B
CN109151590B CN201811301859.0A CN201811301859A CN109151590B CN 109151590 B CN109151590 B CN 109151590B CN 201811301859 A CN201811301859 A CN 201811301859A CN 109151590 B CN109151590 B CN 109151590B
Authority
CN
China
Prior art keywords
file
upgrade
package
partition
packet
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.)
Active
Application number
CN201811301859.0A
Other languages
Chinese (zh)
Other versions
CN109151590A (en
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201811301859.0A priority Critical patent/CN109151590B/en
Publication of CN109151590A publication Critical patent/CN109151590A/en
Application granted granted Critical
Publication of CN109151590B publication Critical patent/CN109151590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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

Abstract

The invention discloses a bidirectional digital television upgrading method, which comprises the following steps: A. defining an upgrade package structure, and respectively defining an upgrade trigger package, an upgrade file content check package and an upgrade file package; B. generating an upgrade package; C. entering an upgrading process: C1. the server broadcasts an upgrade trigger packet and an upgrade file content check packet; C2. the digital television receives and processes the broadcast upgrade trigger packet and the upgrade content check packet; C3. the digital television applies for an upgrade file package from a server; C4. the digital television checks the upgrading content and carries out software upgrading and updating; C5. and the server counts the upgrading result and performs data analysis. The bidirectional digital television upgrading method can be used for solving the problems of more upgrading contents, frequent upgrading and low upgrading efficiency of digital television software.

Description

Bidirectional digital television upgrading method
Technical Field
The invention relates to the technical field of digital television upgrading, in particular to a bidirectional digital television upgrading method.
Background
With the advent of the internet era, more and more televisions or set-top boxes support network functions (hereinafter collectively referred to as digital televisions). The digital television with the bidirectional communication function is called as a dual-digital television for short. The software becomes larger and larger while the performance is higher and the functions are richer, and the upgrading is more and more frequent. Therefore, upgrading functions become more and more important, and the efficiency of upgrading becomes a focus of attention of digital television operators. Each large-scale and large-batch upgrading is a test for upgrading the server by an operator.
Disclosure of Invention
The present invention is directed to overcome the above-mentioned deficiencies in the background art, and provides a method for upgrading a bidirectional digital tv, which can effectively solve the problem of low efficiency of upgrading a large number of digital tvs, and can significantly improve the efficiency of upgrading a digital tv especially when there are more partitions in a tv system and there are more partition files in each partition.
In order to achieve the technical effects, the invention adopts the following technical scheme:
a bidirectional digital television upgrading method comprises the following steps:
A. defining an upgrade package structure;
A1. defining an upgrade trigger package;
A2. defining an upgrade file content check package;
A3. defining an upgrade file package;
B. generating an upgrade package;
C. entering an upgrading process:
C1. the server broadcasts an upgrade trigger packet and an upgrade file content check packet;
C2. the digital television receives and processes the broadcast upgrade trigger packet and the upgrade content check packet;
C3. the digital television applies for an upgrade file package from a server;
C4. the digital television checks the upgrading content and carries out software upgrading and updating;
C5. and the server counts the upgrading result and performs data analysis.
Further, when the upgrade trigger package is defined in step a1, the following is specifically defined: the upgrading method comprises the steps of fixed-length upgrading trigger packet marking character strings, packet length, hardware version, upgrading software version, software version judging mode, software version difference, total upgrading number, starting serial number, ending serial number, server address, upgrading type, upgrading file packet number, partition number, n partition descriptors and crc check bits, wherein the n partition descriptors are specifically partition descriptors 1-n.
Further, the packet length is from the hardware version to the end of the packet, and includes the crc bit length at the end of the file packet;
the region for checking the crc check bit is from the beginning of the packet to the partition descriptor n, and specifically, crc calculation is carried out on the content of the region during checking;
the software version judging mode is defined as follows: 0 represents that the software version is not judged to be directly upgraded; 1 represents that the software version of the set-top box plus the software version difference is equal to the version to be upgraded; 2, the difference value of the software version minus the software version of the set-top box is equal to the version to be upgraded;
the upgrade type is defined as follows: 0 represents the forced upgrade of the foreground, 1 represents the forced upgrade of the background, 2 represents the non-forced upgrade of the foreground, and 3 represents the non-forced upgrade of the background;
the partition descriptor comprises a partition ID number, a partition name, a partition file mode and the number of upgrading files; wherein, in the partition file mode, 0 is defined as a single file partition, and 1 is defined as a multi-file system partition.
Further, the step a2 of defining the upgrade file content check package specifically includes defining the following contents: the method comprises the steps of fixing the mark character string of the upgrade file content check package, the package length, the partition number, n partition check descriptors and crc check bits, wherein the n partition check descriptors are specifically a partition check descriptor 1 to a partition check descriptor n.
Further, the field of the packet length comprises the number of partitions plus the length of the crc parity bit; the crc check bits check the packet head to the partition check descriptor n;
the partition check descriptor comprises a partition ID, a partition name, the total number of the upgrade files and n file check descriptors, wherein the n file check descriptors specifically comprise a file check descriptor 1 to a file check descriptor n; the file check descriptor comprises a file name length, a file name, a file path length, a file path, a compressed file length, a compressed file crc check value, an original file length and an original file crc check value.
Further, when the upgrade file package is defined in step a3, the following contents are specifically defined: the method comprises the steps that fixed-length upgrade file packet marker character strings, packet lengths, upgrade packet serial numbers, partition IDs, partition names, partition file modes, the total number of upgrade files, packet file modes, current file serial numbers, the number of packet files, n packet file descriptors, packet file 1 data to packet file n data and CRC (cyclic redundancy check) check are carried out; wherein the n package file descriptors include package file descriptor 1 through package file descriptor n.
Furthermore, the number of the upgrade file packets in the upgrade trigger packet corresponds to the number of the upgrade file packets in the upgrade trigger packet, and 0 is defined as a single file partition and 1 is defined as a multi-file system partition in the partition file mode; the total number of the upgrade files is the same as that of the upgrade files in the partition check descriptor;
the package file mode defines: 0 represents a multi-file combination, 1 represents single file cutting, the number of the package files is based on a package file mode, when the package file mode is 0, n upgrade files exist under the package, when the package file mode is 1, one upgrade file S under the package is cut into n small files, only 1 package file descriptor is followed subsequently, the file sequence number in the descriptor is the subsection of the upgrade file S, and the sequence number is 1, 2 … n;
the packet file descriptor comprises a file sequence number, a file name length, a file name, a file path length, a file path, a compressed file length, a compressed file CRC, an original file length, an original file CRC, a sub-segment data length, a sub-segment CRC and a file start position; when the package file mode is 1, the two fields of the sub-segment data length and the sub-segment CRC are valid, the file start position is the offset position of the compressed file data in the whole upgrade file package, and when the package file mode is 1, the file start position is the offset position of the sub-segment data.
Further, the generating of the upgrade package in the step B is to use a tool at the server side to package the upgrade files of the partitions, and specifically includes: firstly, setting the size of each upgrade package; combining files to be upgraded of each partition according to the size, combining some small files into an upgrading file package according to the definition in the upgrading file package, and splitting the oversized files into a plurality of upgrading file packages meeting the requirements;
recording field information defined in the upgrade file content check package in the packaging process, and generating an upgrade file content check package after packaging files of all partitions;
then, the hardware version of the digital television to be upgraded, the upgrading software version, the software version judgment mode, the software version difference value, the total number of upgrading units, the starting serial number, the ending serial number, the server address and the upgrading type are carried out through a tool; and then obtaining the total number of the upgrade files and the upgrade descriptor information of each partition according to the packaging result, calculating a crc value, and finally generating an upgrade trigger package.
Further, the step C1 specifically includes: importing a broadcast upgrade trigger package, an upgrade file content check package and an upgrade file package into a server; the server broadcasts an upgrade trigger packet and an upgrade file content check packet to the whole network in a circulating manner; and waiting for the request sent by the digital television;
the step C2 specifically includes: the digital television starts a special process to monitor the corresponding port, when an upgrade trigger packet broadcasted by the server is detected and the content is captured and analyzed, whether the digital television meets the upgrade requirement is judged according to each field defined in the upgrade trigger packet; if the upgrade requirement is met, capturing an upgrade content check package, and analyzing the content; if the upgrade content check package is not captured within a certain time, skipping the upgrade content check package, and applying for the upgrade content check package to the server in step C3, and the server separately sends the upgrade content check package to the digital television;
the step C3 specifically includes:
c3.1, the digital television applies for obtaining an upgrade file package from the server: among them, the application is divided into two modes: the first is a fuzzy application, and the second is a precise application;
c3.2, the server receives the request of the digital television and analyzes the content of the request; if the request is a fuzzy application, preferentially sending the upgrade file packet with a small instantaneous request amount according to the condition of the server resources, and subsequently sending the upgrade file packet with a large request amount to enable the server resources to be in a relatively balanced state; if a certain upgrade file packet is accurately applied and other digital television terminals simultaneously apply for the upgrade file packet in a fuzzy manner, the upgrade file packet is preferentially sent to the client side which applies for the accurate upgrade file packet, and the upgrade file packet is subsequently sent to the client side which applies for the fuzzy upgrade file packet;
c3.3 after the digital television applies for the upgrade file package to the server, begin to obtain the upgrade file package that the server sends back, then according to the definition in the upgrade file package to the upgrade file package, withdraw the upgrade file of every subregion in the opposite direction; if a certain upgrade file packet cannot be received for a long time, sending an accurate application to the server, and then continuously receiving the upgrade file packet;
c3.4, if the data can not be received, ending the receiving of the upgrade file packet, sending the reason and the result of the upgrade failure to the server, and ending the upgrade;
c3.5 after receiving all upgrade file packages, firstly carrying out self accuracy verification on the data, including verification of the number of partitions, the number of upgrade files under each partition, the file length in the package and the file crc, secondly analyzing the upgrade file packages according to the definition of the upgrade file packages, extracting the upgrade files of each partition in a compressed state, comparing the upgrade files with the data defined in the upgrade file content verification package, if the data are inconsistent, ending the reception of the upgrade file packages, sending reasons and results of upgrade failure to the server, and ending the upgrade;
if the file data are consistent, decompressing the compressed file to obtain an upgrade file in an original state, comparing the upgrade file with original file information in an upgrade file content check package, if the data are inconsistent, ending receiving of the upgrade file package, sending reasons and results of upgrade failure to the server, and ending the upgrade; if the data are consistent, go to step C4;
C4. and (4) updating new software:
updating software according to partitions, and obtaining a specific writing method of partition files according to the mode information of the partition files; and if the partition is a multi-file system partition, replacing the corresponding file under the original path according to the path of the problem of upgrading the file, sending upgrading success information to the server after all the files are updated, and restarting the digital television after determining that the server receives the information.
C5. The server counts the upgrading result and analyzes the upgrading data:
and the server counts and analyzes the upgrade result information fed back by each digital television client to generate an upgrade result feedback table.
Compared with the prior art, the invention has the following beneficial effects:
according to the bidirectional digital television upgrading method, by formulating a digital television upgrading packet rule, with partitions as a reference, upgrading contents in each partition are packed according to the rule formulated in the finding step A, scattered small files are packed into a large file packet with a proper size, and the files with an overlarge capacity are divided into small file packets with a specified size to be transmitted; therefore, the problem of server resource shortage caused by frequent application of small files to the server or application of oversized files to the service request of the digital television is solved, and meanwhile, the upgrading file packet is applied to the server in a mode of combining fuzzy application and accurate application, so that the server can use the resources more efficiently, and the upgrading efficiency is improved.
Detailed Description
The invention will be further elucidated and described with reference to the embodiments of the invention described hereinafter.
Example (b):
a two-way digital television upgrading method can be used for solving the problems of more upgrading contents, frequent upgrading and low upgrading efficiency of digital television software, and comprises the following steps:
A. defining an upgrade package structure; the upgrade package is divided into three packages: the upgrade trigger package, the upgrade file content check package and the upgrade file package, so the step A specifically comprises the following steps:
A1. defining an upgrade trigger package structure;
the upgrade trigger package specifically includes the following field contents: the fixed-length upgrading trigger packet comprises a flag character string, a packet length, a hardware version, an upgrading software version, a software version judging mode, a software version difference value, the total upgrading number, a starting serial number, an ending serial number, a server address, an upgrading type, the number of upgrading file packets, the number of partitions, a partition descriptor 1, a partition descriptor 2 … …, and a crc check bit.
The package length of the upgrade trigger package is the length from the hardware version to the package end, and comprises the crc check bit length of the file package end; the area for checking the crc of the upgrade trigger packet is from the start of the packet to the partition descriptor n, and crc calculation is performed on the content of the interval.
In this embodiment, the following definitions are specifically defined when the software version determination mode of the upgrade trigger package is defined: when the software version judging mode is 0, the software version is not judged, the software version is directly upgraded, when the software version judging mode is 1, the difference value of the set top box software version and the software version is equal to the version to be upgraded, and when the software version judging mode is 2, the difference value of the set top box software version and the software version is equal to the version to be upgraded.
Correspondingly, in the present embodiment, the upgrade type of the upgrade trigger package has the following definitions:
when the upgrade type is 0, the foreground is forced to upgrade, the user is informed through an interface that the machine needs to be upgraded, and an upgrade flow is entered; starting to receive the upgrading data, displaying the progress, updating the upgrading software and restarting the upgrading software (the user cannot select the upgrading software in the process);
when the upgrade type is 1, the background is used for forcedly upgrading, the background receives upgrade data, the received data does not prompt a user, and the user is prompted to upgrade until the upgrade data is prepared; displaying the progress, updating the upgrade software and restarting the upgrade software (the user cannot select the upgrade software in the process);
when the upgrade type is 2, the foreground is represented as non-mandatory upgrade, at this time, the user needs to be prompted to need the upgrade, and the user can make the following selections, namely, immediate upgrade (the same as the upgrade type 0), next startup upgrade (entering data acceptance, displaying the receiving progress, accepting to finish the upgrade, updating the software when the startup is next time), and no upgrade.
And when the upgrade type is 3, the background is used for non-compulsory upgrade, the background receives upgrade data, the user is not prompted by the received data until the upgrade data is prepared, and then the user is prompted to upgrade. The user may choose to upgrade immediately and to upgrade and not upgrade the next boot.
Specifically, the number of partitions of the upgrade trigger package represents the total number of partitions related to the upgrade, and the partition descriptor of the upgrade trigger package comprises a partition ID number, a partition name, a partition file mode and the number of upgrade files; wherein the following definitions are provided in partition file schema:
when the partition file mode is 0, the file is expressed as a single file partition, such as boot, kernel and other non-file system partitions (a read-only file system is treated as a single file); when the partition file mode is 1, the partition is represented as a multi-file system partition, such as a non-read-only file system ubi file system.
A2. Defining an upgrade file content check package structure;
the upgrade file content check package specifically includes the following field contents: the method comprises the steps that the mark character string of an upgrade file content check packet, the packet length, the partition number, a partition check descriptor 1, a partition check descriptor 2 … …, a partition check descriptor n and a crc check bit are fixed in length, and a packet length field comprises the partition number plus the crc check bit length; the crc parity bits check the start of the packet to the partition check descriptor n.
The partition check descriptor of the upgrade file content check packet comprises a partition ID, a partition name, the total number of upgrade files, and a file check descriptor 1-a file check descriptor n.
Specifically, the file verification descriptor includes a file name length, a file name, a file path length, a file path, a compressed file length, a compressed file crc verification value, an original file length, and an original file crc verification value.
A3. Defining an upgrade file package structure;
the upgrade file package specifically includes the following field contents: the fixed length upgrading file package flag character string, the package length, the upgrading package serial number, the partition ID, the partition name, the partition file mode, the total number of upgrading files, the package file mode, the current file serial number, the number of package files, the package file descriptor 1 … … package file descriptor n, the package file 1 data (after compression) … package file n data, and CRC check.
When the serial number of the upgrade package is defined, the serial number corresponds to the number of the upgrade packages in the step a1, and the partition file mode defining the upgrade package is also the same as the definition of the partition file mode in the step a1, that is, when the partition file mode is 0, the partition file mode is represented as a single file partition, such as a boot partition, a kernel partition, and other non-file system partitions (a read-only file system is treated as a single file); when the partition file mode is 1, the partition is represented as a multi-file system partition, such as a non-read-only file system ubi file system.
When the total number of the upgrade files of the upgrade file package is defined, the total number of the upgrade files under the partition check descriptor defined in the step A2 is the same, namely, the number of files needing to be updated under 1 partition is defined; the specific definition of the package file mode of the upgrade file package is as follows:
when the package file mode is 0, it represents a multi-file combination (1 file or multiple files), and when the package file mode is 1, it represents a single file cutting (i.e. 1 very large file is cut into multiple small files and cut into different upgrade file packages, and one upgrade file package may contain multiple upgrade files or may be a part of one cut file).
When the current file serial number of the upgrade file package is defined, the total number of files to be upgraded is needed, and the total number is the serial number of the first file under the definition upgrade file package. In this embodiment, it is assumed that the current file number is S. When the number of package files of the upgrade file package is defined, the package file mode based on the upgrade file package is as follows:
if the package file mode is 0, n upgrade files are under the package; the following package file descriptor has n pieces, the file serial number in the descriptor is a normal upgrade file, and the file serial number is s, s +1 … … s + n-1;
when the package file mode is 1, the file S is cut into n small files; only 1 package file descriptor is followed subsequently, and the file sequence number in the descriptor is the subsection of the file S, and the sequence number is 1, 2 … n; (2-n in subsequent upgrade file packages, upgrade package sequence number +1 to upgrade package sequence number + n-1).
When defining the package file descriptor of the upgrade file package, the package file descriptor specifically includes: file sequence number, file name length, file name, file path length, file path, compressed file length, compressed file CRC, original file length, original file CRC, sub-segment data length, sub-segment CRC, and file start position.
Wherein, the file serial number is described by the number of package files of the upgrade file package; the data length of the subsegment and the CRC of the subsegment take effect when the mode of the packet file is 1; the file start position is specifically an offset position of the compressed file data in the whole upgrade file package, and when the package file mode is 1, the field is an offset position of the sub-segment data.
Defining the package file data of the upgrade file package, specifically defining the compressed data of the file to be upgraded, where it is noted that when the package file mode is 1, there is only one package file data; i.e. when a file needs to be cut, all the cut sub-segments of the file use 1 individual upgrade file package, and the package file data is the sub-segment data.
B. Generating an upgrade package:
and packaging the upgrade files of all the partitions by using a server-side tool. The tool sets the size of each upgrade file package; and then combining the files to be upgraded of each partition according to the size, combining some small files into one upgrade file package according to the definition of the step A3, and splitting the oversized files into a plurality of upgrade file packages meeting the requirements.
And recording each field information defined in the step A2 in the packaging process, and generating an upgrade file content check package after packaging the files of all the partitions.
Generation of an upgrade trigger package: hardware version of the digital television to be upgraded, upgrading software version, software version judging mode, software version difference, total upgrading number, starting serial number, ending serial number, server address and upgrading type are carried out through a tool; and then obtaining the total number of the upgrade files and the upgrade descriptor information of each partition according to the packaging result, calculating a crc value, and finally generating an upgrade trigger package.
C. And (3) upgrading process:
and B, according to the upgrade type information defined in the step A, really judging whether an interface prompts a user, and then entering a data receiving process.
C1. The server side broadcasts an upgrade trigger packet and an upgrade file content check packet;
importing a broadcast upgrade trigger package, an upgrade file content check package and all upgrade file packages into a server; the server broadcasts an upgrade trigger packet and an upgrade file content check packet to the whole network in a circulating manner; the upgrading trigger packet has high frequency, and the content verifies the packet frequency; the server then waits for the digital television to issue a request.
C2. The digital television receives and processes the broadcast upgrade trigger packet and the upgrade content check packet;
after the digital television is started, a special process is carried out to monitor a corresponding port, the digital television detects an upgrade trigger packet broadcasted by a server, captures the packet, analyzes the content, and then defines each field according to the hardware version, the software version and other steps A1 of the local computer to judge whether the local computer meets the upgrade requirement; if the upgrade requirement is met, capturing an upgrade content check package, and analyzing the content; if the upgrade content check package is not captured within a certain time, the package is skipped, the package is applied to the server in step C3, and the server sends the upgrade content check package to the local computer separately.
C3. The digital television applies for an upgrade file package from a server;
c3.1, the digital television applies for obtaining an upgrade file package from a server;
the application is divided into two modes: 1. fuzzy application, namely applying for a package in a range, such as a package with an upgrade package serial number of 1-100, from a server; 2. the precise application, if the digital television definitely finds that the digital television needs the upgrade package, the digital television requests the server for the package data through the serial number of the upgrade package (a plurality of data packages with definite serial numbers can be requested at one time);
c3.2, the server receives the request of the digital television and analyzes the content of the request;
if the request is a fuzzy application, firstly sending a packet with a small instantaneous request amount and subsequently sending a packet with a large request amount according to the condition of server resources so that the server resources are in a relatively balanced state; if a certain packet is accurately applied and other clients simultaneously apply for the packet in a fuzzy manner, the packet is preferentially sent to the client side which applies for the accurate application, and then the packet is sent to the client side which applies for the fuzzy application;
c3.3 after the digital television applies for the upgrade file package to the server, begin to obtain the upgrade package that the server sends back, then according to the definition of step A3 to the upgrade package, withdraw the upgrade file of every subregion in the opposite direction; if a certain package cannot be received for a long time, sending an accurate application to the server, and then continuously receiving the upgrade package;
c3.4, if the data can not be received, ending the receiving of the upgrade package, sending the reason and the result of the upgrade failure to the server, and ending the upgrade;
c3.5 when receiving all the packages, firstly carrying out self accuracy verification on the data, including verification of the number of partitions, the number of upgrading files under each partition, the file length in the package, the file crc and the like, and ensuring that the received upgrade package is accurate; secondly, after the package is completely collected, analyzing the package according to the definition of the step A3, extracting the upgrade files (including the files which are cut back) of each partition in the compression state, comparing the upgrade files with the related data in the upgrade file content check package defined in the step A2, and if the upgrade files are wrong, processing the upgrade files according to C3.4 (namely, finishing receiving the upgrade package, sending reasons and results of upgrade failure to the server, and finishing the upgrade); if the files are correct, decompressing the compressed file to obtain an upgrade file in an original state, comparing the upgrade file with original file information in an upgrade file content check package, and if the files are incorrect, processing according to C3.4 (namely finishing receiving the upgrade package, sending reasons and results of upgrade failure to a server, and finishing upgrading); if so, go to step C4.
C4. And (4) updating new software:
and B, after the data are received, prompting the user to select according to the upgrade type information defined in the step A. Software updating is required no matter immediate upgrading or starting up upgrading.
Updating software and searching for a partition, and obtaining a specific writing method of a partition file according to partition file mode information; the operation method of a single file partition is to erase the whole partition and then write the file of the partition; and if the partition is a multi-file system partition, replacing the corresponding file under the original path according to the path of the problem of upgrading the file. And after all files are updated, sending upgrade success information to the server, and restarting the digital television after determining that the server receives the information.
C5. The server side counts the upgrading result, and if the upgrading data are analyzed:
after upgrading for a certain time, the server counts and analyzes the upgrading result information fed back by each digital television client to generate an upgrading result feedback table.
In summary, in the bidirectional digital television upgrading method, by formulating the digital television upgrading packet rule, the upgrading content in each partition is packed according to the rule formulated in the finding step A on the basis of the partition, scattered small files are packed into a large file packet with a proper size, and the files with an overlarge capacity are divided into small file packets with a specified size to be transmitted; therefore, the problem of server resource shortage caused by frequent application of small files to the server or application of oversized files to the service request of the digital television is solved, and meanwhile, the upgrading file packet is applied to the server in a mode of combining fuzzy application and accurate application, so that the server can use the resources more efficiently, and the upgrading efficiency is improved.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (6)

1. A bidirectional digital television upgrading method is characterized by comprising the following steps:
A. defining an upgrade package structure;
A1. defining an upgrade trigger package; the step a1 specifically includes defining the following contents when defining the upgrade trigger package: the method comprises the steps that an upgrade trigger packet flag character string, the length of an upgrade trigger packet, a hardware version, the number of upgrade software versions, a software version judgment mode, a software version difference value, the total number of upgrade stations, a starting serial number, an ending serial number, a server address, an upgrade type, the number of upgrade file packets, the number of partitions, n partition descriptors and a crc (crc) check bit are fixed, wherein the n partition descriptors are specifically a partition descriptor 1-a partition descriptor n;
the length of the upgrade trigger packet is the length from the hardware version to the end of the packet, and comprises the length of the crc bit at the end of the file packet;
the region for checking the crc check bit is from the beginning of the packet to the partition descriptor n, and specifically, crc calculation is carried out on the content of the region during checking;
the software version judging mode is defined as follows: 0 represents that the software version is not judged to be directly upgraded; 1 represents that the software version of the set-top box plus the software version difference is equal to the version to be upgraded; 2, the difference value of the software version minus the software version of the set-top box is equal to the version to be upgraded;
the upgrade type is defined as follows: 0 represents the forced upgrade of the foreground, 1 represents the forced upgrade of the background, 2 represents the non-forced upgrade of the foreground, and 3 represents the non-forced upgrade of the background;
the partition descriptor comprises a partition ID number, a partition name, a partition file mode and the number of upgrading files; wherein, in the partition file mode, 0 is defined as a single file partition, and 1 is defined as a multi-file system partition;
A2. defining an upgrade file content check package; the step a2 of defining the upgrade file content check package specifically includes defining the following contents: the method comprises the steps that an upgrade file content check package mark character string, an upgrade file content check package length, the number of partitions, n partition check descriptors and a crc check bit are fixed, wherein the n partition check descriptors are specifically a partition check descriptor 1-a partition check descriptor n; the partition check descriptor comprises a partition ID, a partition name, the total number of the upgrade files and n file check descriptors; the n file check descriptors specifically include a file check descriptor 1 to a file check descriptor n; the file verification descriptor comprises a file name length, a file name, a file path length, a file path, a compressed file length, a compressed file crc verification value, an original file length and an original file crc verification value;
A3. defining an upgrade file package; specifically, the following is defined: partition ID, partition name, partition file mode, total number of upgrade files, package file mode, current file sequence number, number of package files, n package file descriptors, and package file 1 data to package file n data;
the package file mode defines: 0 represents a multi-file combination, 1 represents single file cutting, the number of the package files is based on a package file mode, when the package file mode is 0, n upgrade files exist under the package, when the package file mode is 1, one upgrade file S under the package is cut into n small files, only 1 package file descriptor is followed subsequently, the file sequence number in the descriptor is the subsection of the upgrade file S, and the sequence number is 1, 2 … n;
the packet file descriptor comprises a file sequence number, a file name length, a file name, a file path length, a file path, a compressed file length, a compressed file CRC, an original file length, an original file CRC, a sub-segment data length, a sub-segment CRC and a file start position; when the package file mode is 1, the two fields of the sub-segment data length and the sub-segment CRC take effect, the file start position is the offset position of the compressed file data in the whole upgrade file package, and when the package file mode is 1, the file start position is the offset position of the sub-segment data;
B. generating an upgrade package; the step B of generating the upgrade package is to use a tool at the server end to package the upgrade files of the partitions, and specifically includes: firstly, setting the size of each upgrade package; combining files to be upgraded of each partition according to the size, combining some small files into an upgrading file package according to the definition in the step A3, and splitting the oversized files into a plurality of upgrading file packages meeting the requirements; the specific criterion of the discrimination size can be set according to actual requirements;
C. entering an upgrading process:
C1. the server broadcasts an upgrade trigger packet and an upgrade file content check packet;
C2. the digital television receives and processes the broadcast upgrade trigger packet and the upgrade content check packet;
C3. the digital television applies for an upgrade file package from a server;
the step C3 includes:
c3.1, the digital television applies for obtaining an upgrade file package from the server: among them, the application is divided into two modes: the first is a fuzzy application, and the second is a precise application;
c3.2, the server receives the request of the digital television and analyzes the content of the request; if the request is a fuzzy application, preferentially sending the upgrade file packet with a small instantaneous request amount according to the condition of the server resources, and subsequently sending the upgrade file packet with a large request amount to enable the server resources to be in a relatively balanced state; if a certain upgrade file packet is accurately applied and other digital television terminals simultaneously apply for the upgrade file packet in a fuzzy manner, the upgrade file packet is preferentially sent to the client side which applies for the accurate upgrade file packet, and the upgrade file packet is subsequently sent to the client side which applies for the fuzzy upgrade file packet;
c3.3 after the digital television applies for the upgrade file package to the server, begin to obtain the upgrade file package that the server sends back, then according to the definition in the upgrade file package to the upgrade file package, withdraw the upgrade file of every subregion in the opposite direction; if a certain upgrade file packet cannot be received for a long time, sending an accurate application to the server, and then continuously receiving the upgrade file packet;
C4. the digital television checks the upgrading content and carries out software upgrading and updating;
C5. and the server counts the upgrading result and performs data analysis.
2. The method according to claim 1, wherein the length field of the upgrade file content check package comprises the number of partitions plus the length of crc check bit; the crc parity bits check the start of the packet to the partition check descriptor n.
3. The method for upgrading two-way digital television according to claim 2, wherein the step a3 of defining the upgrade file package further comprises defining the following contents: the fixed length of the upgrading file packet is the mark character string, the length of the upgrading file packet, the serial number of the upgrading packet and the CRC check; wherein the n package file descriptors include package file descriptor 1 through package file descriptor n.
4. The method according to claim 3, wherein the upgrade package sequence number defined in step A3 corresponds to the upgrade file package number defined in step A1, and step A3 defines 0 as a single file partition and 1 as a multi-file system partition in the partition file mode; the total number of the upgrade files defined in the step A3 is the same as the total number of the upgrade files defined in the partition check descriptor defined in the step A2.
5. The two-way digital television upgrade method according to claim 4,
recording each field information defined in the step A2 in the packaging process, and generating an upgrade file content check package after packaging all partitioned files;
then, the hardware version of the digital television to be upgraded, the upgrading software version, the software version judgment mode, the software version difference value, the total number of upgrading units, the starting serial number, the ending serial number, the server address and the upgrading type are carried out through a tool; and then obtaining the total number of the upgrade files and the upgrade descriptor information of each partition according to the packaging result, calculating a crc value, and finally generating an upgrade trigger package.
6. The method for upgrading a bidirectional digital television according to claim 5, wherein the step C1 specifically comprises: importing a broadcast upgrade trigger package, an upgrade file content check package and an upgrade file package into a server; the server broadcasts an upgrade trigger packet and an upgrade file content check packet to the whole network in a circulating manner; and waiting for the request sent by the digital television;
the step C2 specifically includes: the digital television starts a special process to monitor the corresponding port, when an upgrade trigger packet broadcasted by the server is detected and the content is captured and analyzed, whether the digital television meets the upgrade requirement is judged according to each field defined in the upgrade trigger packet; if the upgrade requirement is met, capturing an upgrade content check package, and analyzing the content; if the upgrade content check package is not captured within a certain time, skipping the upgrade content check package, and applying for the upgrade content check package to the server in step C3, and the server separately sends the upgrade content check package to the digital television;
the step C3 further includes, after the step C3.3:
c3.4, if the data can not be received, ending the receiving of the upgrade file packet, sending the reason and the result of the upgrade failure to the server, and ending the upgrade;
c3.5 after receiving all upgrade file packages, firstly carrying out self accuracy verification on the data, including verification of the number of partitions, the number of upgrade files under each partition, the file length in the package and the file crc, secondly analyzing the upgrade file packages according to the definition of the upgrade file packages, extracting the upgrade files of each partition in a compressed state, comparing the upgrade files with the data defined in the upgrade file content verification package, if the data are inconsistent, ending the reception of the upgrade file packages, sending reasons and results of upgrade failure to the server, and ending the upgrade;
if the file data are consistent, decompressing the compressed file to obtain an upgrade file in an original state, comparing the upgrade file with original file information in an upgrade file content check package, if the data are inconsistent, ending receiving of the upgrade file package, sending reasons and results of upgrade failure to the server, and ending the upgrade; if the data are consistent, go to step C4;
C4. and (4) updating new software:
updating software according to partitions, and obtaining a specific writing method of partition files according to the mode information of the partition files; if the partition is a multi-file system partition, replacing the corresponding file under the original path according to the path of the problem of upgrading the file, sending upgrading success information to the server after all the files are upgraded, and restarting the digital television after determining that the server receives the information;
C5. the server counts the upgrading result and analyzes the upgrading data:
and the server counts and analyzes the upgrade result information fed back by each digital television client to generate an upgrade result feedback table.
CN201811301859.0A 2018-11-02 2018-11-02 Bidirectional digital television upgrading method Active CN109151590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811301859.0A CN109151590B (en) 2018-11-02 2018-11-02 Bidirectional digital television upgrading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811301859.0A CN109151590B (en) 2018-11-02 2018-11-02 Bidirectional digital television upgrading method

Publications (2)

Publication Number Publication Date
CN109151590A CN109151590A (en) 2019-01-04
CN109151590B true CN109151590B (en) 2021-01-26

Family

ID=64807480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811301859.0A Active CN109151590B (en) 2018-11-02 2018-11-02 Bidirectional digital television upgrading method

Country Status (1)

Country Link
CN (1) CN109151590B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001316A (en) * 2006-12-31 2007-07-18 北京广博数字电视科技有限公司 Software staging management method and system of set-top box
CN101710934A (en) * 2009-11-25 2010-05-19 中兴通讯股份有限公司 Set-top box edition upgrading method and system
CN102222011A (en) * 2011-06-28 2011-10-19 广东中大讯通软件科技有限公司 Software upgrading method for set-top box and set-top box
CN102253850A (en) * 2011-07-08 2011-11-23 烽火通信科技股份有限公司 Incremental software updating method of internet protocol television (IPTV) set top box
CN102385520A (en) * 2011-09-06 2012-03-21 四川金网通电子科技有限公司 USB (Universal Serial Bus) upgrading method based on partition name for digital television set-top box
CN102419713A (en) * 2011-12-31 2012-04-18 四川长虹电器股份有限公司 Method for upgrading software of nandflash-based set-top box
CN102890638A (en) * 2012-09-29 2013-01-23 深圳市九洲电器有限公司 Upgrade method of STB (set top box)
CN103458298A (en) * 2012-06-01 2013-12-18 北京四达时代软件技术股份有限公司 Method and system or upgrading set top box software
CN103701856A (en) * 2013-11-29 2014-04-02 四川长虹电器股份有限公司 Method for defining and acquiring upgrade package of terminal equipment
CN106572372A (en) * 2016-11-14 2017-04-19 青岛海信宽带多媒体技术有限公司 Set-top box upgrading method and set-top box
CN107181971A (en) * 2017-05-22 2017-09-19 华为软件技术有限公司 The upgrade method and relevant device of a kind of IPTV terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI499301B (en) * 2013-10-08 2015-09-01 Wistron Corp Controlling method for recording digital television programs

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001316A (en) * 2006-12-31 2007-07-18 北京广博数字电视科技有限公司 Software staging management method and system of set-top box
CN101710934A (en) * 2009-11-25 2010-05-19 中兴通讯股份有限公司 Set-top box edition upgrading method and system
CN102222011A (en) * 2011-06-28 2011-10-19 广东中大讯通软件科技有限公司 Software upgrading method for set-top box and set-top box
CN102253850A (en) * 2011-07-08 2011-11-23 烽火通信科技股份有限公司 Incremental software updating method of internet protocol television (IPTV) set top box
CN102385520A (en) * 2011-09-06 2012-03-21 四川金网通电子科技有限公司 USB (Universal Serial Bus) upgrading method based on partition name for digital television set-top box
CN102419713A (en) * 2011-12-31 2012-04-18 四川长虹电器股份有限公司 Method for upgrading software of nandflash-based set-top box
CN103458298A (en) * 2012-06-01 2013-12-18 北京四达时代软件技术股份有限公司 Method and system or upgrading set top box software
CN102890638A (en) * 2012-09-29 2013-01-23 深圳市九洲电器有限公司 Upgrade method of STB (set top box)
CN103701856A (en) * 2013-11-29 2014-04-02 四川长虹电器股份有限公司 Method for defining and acquiring upgrade package of terminal equipment
CN106572372A (en) * 2016-11-14 2017-04-19 青岛海信宽带多媒体技术有限公司 Set-top box upgrading method and set-top box
CN107181971A (en) * 2017-05-22 2017-09-19 华为软件技术有限公司 The upgrade method and relevant device of a kind of IPTV terminal

Also Published As

Publication number Publication date
CN109151590A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
EP3468177A1 (en) Receiver, reception method, program and information processing system
CN110083714B (en) Acquisition, recovery, and matching of unique information from file-based media for automatic file detection
US20190158936A1 (en) Method and Apparatus for Downloading Streaming Media File Fragment and Terminal
US20070076625A1 (en) Data communication apparatus
WO2020248324A1 (en) Streaming media data processing method and streaming media processing server
US20080098365A1 (en) Performance analyzer
CN1842152A (en) Method and system for realizing pre-recording based on electronic program guide information
CN105979356A (en) Channel searching method and device of set-top box
CN112600952B (en) Method and system for accelerating distribution of mobile terminal network
US11924480B2 (en) Content-modification system with system resource request feature
CN109600671B (en) System and method for rapidly upgrading network set top box
KR20220124271A (en) Fault detection method, device, electronic device and readable storage medium of live traffic
CN105450686B (en) Method and device for establishing server cluster
CN108322825A (en) A kind of difference upgrade method and system
CN109151590B (en) Bidirectional digital television upgrading method
US20130040627A1 (en) Data Cut-over Method and Apparatus
US20060200675A1 (en) Method for identifying signature authentication in broadcast receiver
WO2017067374A1 (en) Message push method and push server
CN109189455B (en) Network digital television upgrading method
CN101742247A (en) Method and system for interactive web TV service authentication and EPG server
CN111930482A (en) Task processing method, device and equipment based on node cluster and storage medium
CN109948082B (en) Live broadcast information processing method and device, electronic equipment and storage medium
US20070050826A1 (en) VOD transaction error correlator
WO2014153843A1 (en) Classification method, device and system for digital television users
US20220239638A1 (en) Method and device for registration and login, and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190104

Assignee: Sichuan Changhong Xinwang Technology Co.,Ltd.

Assignor: SICHUAN CHANGHONG ELECTRIC Co.,Ltd.

Contract record no.: X2023980043949

Denomination of invention: A Bidirectional Digital TV Upgrade Method

Granted publication date: 20210126

License type: Common License

Record date: 20231030

EE01 Entry into force of recordation of patent licensing contract